summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-02-27 22:59:06 -0800
committerAnna Henningsen <anna@addaleax.net>2019-03-02 14:05:15 +0100
commit536e062c2c9de936a5b3b156d3cd840a7068c0e5 (patch)
tree99bafb6c8ac9df783ffe4b16af5decf17507ae9b /tools
parent99797cc9cd2ead9d25330b263fca808477d55621 (diff)
downloadandroid-node-v8-536e062c2c9de936a5b3b156d3cd840a7068c0e5.tar.gz
android-node-v8-536e062c2c9de936a5b3b156d3cd840a7068c0e5.tar.bz2
android-node-v8-536e062c2c9de936a5b3b156d3cd840a7068c0e5.zip
tools: update babel-eslint to 10.0.1
Update babel-eslint to 10.0.1. PR-URL: https://github.com/nodejs/node/pull/26347 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'tools')
-rw-r--r--tools/node_modules/babel-eslint/README.md13
-rw-r--r--tools/node_modules/babel-eslint/lib/analyze-scope.js9
-rw-r--r--tools/node_modules/babel-eslint/lib/babylon-to-espree/convertTemplateType.js147
-rw-r--r--tools/node_modules/babel-eslint/lib/babylon-to-espree/index.js5
-rw-r--r--tools/node_modules/babel-eslint/lib/babylon-to-espree/toToken.js6
-rw-r--r--tools/node_modules/babel-eslint/lib/babylon-to-espree/toTokens.js15
-rw-r--r--tools/node_modules/babel-eslint/lib/index.js5
-rw-r--r--tools/node_modules/babel-eslint/lib/parse-with-patch.js9
-rw-r--r--tools/node_modules/babel-eslint/lib/parse.js16
-rw-r--r--tools/node_modules/babel-eslint/lib/patch-eslint-scope.js370
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/code-frame/LICENSE22
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/code-frame/README.md121
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/code-frame/lib/index.js209
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/code-frame/package.json35
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/LICENSE22
-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.js86
-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.js628
-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/jsx.js145
-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/template-literals.js33
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/types.js193
-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/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/README.md18
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/lib/index.js157
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/package.json37
-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/README.md24
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/lib/index.js22
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/package.json30
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/LICENSE22
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/README.md19
-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.json16
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/highlight/LICENSE22
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/highlight/README.md19
-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.json26
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/parser/CHANGELOG.md1073
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/parser/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/babylon/LICENSE)0
-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.js (renamed from tools/node_modules/babel-eslint/node_modules/babylon/bin/babylon.js)4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/parser/lib/index.js10706
-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/parser/typings/babel-parser.d.ts127
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/LICENSE22
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/README.md167
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/lib/builder.js38
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/lib/formatters.js50
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/lib/index.js24
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/lib/literal.js52
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/lib/options.js39
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/lib/parse.js138
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/lib/populate.js79
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/lib/string.js10
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/package.json38
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/LICENSE22
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/README.md32
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/cache.js8
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/context.js141
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/hub.js21
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/index.js84
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/ancestry.js76
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/comments.js32
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/context.js72
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/conversion.js321
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/evaluation.js261
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/family.js81
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/index.js195
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/index.js70
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js102
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferers.js115
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/introspection.js206
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/hoister.js118
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js8
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/virtual-types.js170
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/modification.js136
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/removal.js17
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/replacement.js143
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/binding.js54
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/index.js842
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/lib/renamer.js133
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/visitors.js202
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/package.json50
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/LICENSE22
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/README.md2832
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/asserts/assertNode.js8
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/asserts/generated/index.js1539
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/builder.js42
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/generated/index.js1713
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/react/buildChildren.js10
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/clone.js16
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneDeep.js24
-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.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComment.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComments.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritInnerComments.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritLeadingComments.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritTrailingComments.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritsComments.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/removeComments.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/generated/index.js90
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/index.js42
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/ensureBlock.js10
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js62
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBlock.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toComputedKey.js10
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toExpression.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toIdentifier.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toKeyAlias.js20
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toSequenceExpression.js11
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toStatement.js10
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/valueToNode.js60
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/core.js73
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/es2015.js39
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/experimental.js120
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/flow.js323
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/index.js71
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/jsx.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/typescript.js236
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/utils.js152
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.d.ts2058
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js471
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js.flow1960
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js10
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js26
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/inherits.js20
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removeProperties.js54
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js24
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverse.js41
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverseFast.js38
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/inherit.js16
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js24
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/shallowEqual.js11
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js10
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/generated/index.js3540
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/is.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBinding.js12
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBlockScoped.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isImmutable.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isLet.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isNode.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isNodesEquivalent.js23
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isReferenced.js100
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isScope.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isSpecifierDefault.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isType.js22
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidES3Identifier.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidIdentifier.js18
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isVar.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/matchesPattern.js24
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isCompatTag.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isReactComponent.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/validate.js8
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/package.json40
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generateTypeHelpers.js8
-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/generateValidators.js38
-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/formatCode.js2
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/stringifyValidator.js43
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/toFunctionName.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/ansi-styles/index.js23
-rw-r--r--tools/node_modules/babel-eslint/node_modules/ansi-styles/package.json29
-rw-r--r--tools/node_modules/babel-eslint/node_modules/ansi-styles/readme.md2
-rw-r--r--tools/node_modules/babel-eslint/node_modules/babylon/README.md163
-rw-r--r--tools/node_modules/babel-eslint/node_modules/babylon/lib/index.js10635
-rw-r--r--tools/node_modules/babel-eslint/node_modules/babylon/package.json74
-rw-r--r--tools/node_modules/babel-eslint/node_modules/chalk/index.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/chalk/index.js.flow93
-rw-r--r--tools/node_modules/babel-eslint/node_modules/chalk/package.json42
-rw-r--r--tools/node_modules/babel-eslint/node_modules/chalk/readme.md21
-rw-r--r--tools/node_modules/babel-eslint/node_modules/color-convert/conversions.js65
-rw-r--r--tools/node_modules/babel-eslint/node_modules/color-convert/package.json33
-rw-r--r--tools/node_modules/babel-eslint/node_modules/color-name/package.json25
-rw-r--r--tools/node_modules/babel-eslint/node_modules/debug/.coveralls.yml1
-rw-r--r--tools/node_modules/babel-eslint/node_modules/debug/Makefile58
-rw-r--r--tools/node_modules/babel-eslint/node_modules/debug/README.md91
-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/karma.conf.js70
-rw-r--r--tools/node_modules/babel-eslint/node_modules/debug/node.js1
-rw-r--r--tools/node_modules/babel-eslint/node_modules/debug/package.json63
-rw-r--r--tools/node_modules/babel-eslint/node_modules/debug/src/browser.js301
-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/debug.js225
-rw-r--r--tools/node_modules/babel-eslint/node_modules/debug/src/index.js8
-rw-r--r--tools/node_modules/babel-eslint/node_modules/debug/src/node.js265
-rw-r--r--tools/node_modules/babel-eslint/node_modules/escape-string-regexp/package.json25
-rw-r--r--tools/node_modules/babel-eslint/node_modules/eslint-scope/package.json25
-rw-r--r--tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/package.json25
-rw-r--r--tools/node_modules/babel-eslint/node_modules/esrecurse/README.md3
-rw-r--r--tools/node_modules/babel-eslint/node_modules/esrecurse/esrecurse.js26
-rw-r--r--tools/node_modules/babel-eslint/node_modules/esrecurse/package-lock.json4322
-rwxr-xr-xtools/node_modules/babel-eslint/node_modules/esrecurse/package.json32
-rw-r--r--tools/node_modules/babel-eslint/node_modules/estraverse/package.json26
-rw-r--r--tools/node_modules/babel-eslint/node_modules/esutils/package.json26
-rw-r--r--tools/node_modules/babel-eslint/node_modules/globals/globals.json116
-rw-r--r--tools/node_modules/babel-eslint/node_modules/globals/package.json31
-rw-r--r--tools/node_modules/babel-eslint/node_modules/has-flag/index.js10
-rw-r--r--tools/node_modules/babel-eslint/node_modules/has-flag/license20
-rw-r--r--tools/node_modules/babel-eslint/node_modules/has-flag/package.json46
-rw-r--r--tools/node_modules/babel-eslint/node_modules/has-flag/readme.md9
-rw-r--r--tools/node_modules/babel-eslint/node_modules/invariant/README.md37
-rw-r--r--tools/node_modules/babel-eslint/node_modules/invariant/browser.js51
-rw-r--r--tools/node_modules/babel-eslint/node_modules/invariant/invariant.js53
-rw-r--r--tools/node_modules/babel-eslint/node_modules/invariant/invariant.js.flow7
-rw-r--r--tools/node_modules/babel-eslint/node_modules/invariant/package.json70
-rw-r--r--tools/node_modules/babel-eslint/node_modules/js-tokens/LICENSE2
-rw-r--r--tools/node_modules/babel-eslint/node_modules/js-tokens/README.md32
-rw-r--r--tools/node_modules/babel-eslint/node_modules/js-tokens/index.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/js-tokens/package.json36
-rw-r--r--tools/node_modules/babel-eslint/node_modules/jsesc/LICENSE-MIT.txt20
-rw-r--r--tools/node_modules/babel-eslint/node_modules/jsesc/README.md421
-rwxr-xr-xtools/node_modules/babel-eslint/node_modules/jsesc/bin/jsesc148
-rw-r--r--tools/node_modules/babel-eslint/node_modules/jsesc/jsesc.js329
-rw-r--r--tools/node_modules/babel-eslint/node_modules/jsesc/man/jsesc.194
-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.md6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_addMapEntry.js15
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_addSetEntry.js15
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_baseClone.js20
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_baseMerge.js5
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_baseMergeDeep.js7
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_cloneMap.js22
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_cloneSet.js22
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicodeWord.js2
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_initCloneArray.js2
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_initCloneByTag.js11
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_isIndex.js7
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_nodeUtil.js8
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_safeGet.js17
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_stringToPath.js9
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_unicodeWords.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/core.js132
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/core.min.js48
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/debounce.js6
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/defaults.js46
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/fp/_baseConvert.js33
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/fp/_mapping.js10
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/fp/_util.js2
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/invert.js15
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/invertBy.js12
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/lodash.js187
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/lodash.min.js265
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/package.json31
-rw-r--r--tools/node_modules/babel-eslint/node_modules/loose-envify/LICENSE21
-rw-r--r--tools/node_modules/babel-eslint/node_modules/loose-envify/README.md45
-rwxr-xr-xtools/node_modules/babel-eslint/node_modules/loose-envify/cli.js16
-rw-r--r--tools/node_modules/babel-eslint/node_modules/loose-envify/custom.js4
-rw-r--r--tools/node_modules/babel-eslint/node_modules/loose-envify/index.js3
-rw-r--r--tools/node_modules/babel-eslint/node_modules/loose-envify/loose-envify.js36
-rw-r--r--tools/node_modules/babel-eslint/node_modules/loose-envify/package.json67
-rw-r--r--tools/node_modules/babel-eslint/node_modules/loose-envify/replace.js65
-rw-r--r--tools/node_modules/babel-eslint/node_modules/ms/index.js46
-rw-r--r--tools/node_modules/babel-eslint/node_modules/ms/package.json37
-rw-r--r--tools/node_modules/babel-eslint/node_modules/ms/readme.md25
-rw-r--r--tools/node_modules/babel-eslint/node_modules/object-assign/index.js90
-rw-r--r--tools/node_modules/babel-eslint/node_modules/object-assign/package.json74
-rw-r--r--tools/node_modules/babel-eslint/node_modules/object-assign/readme.md61
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/invariant/LICENSE)15
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/README.md729
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.debug.js3091
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.js3090
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.min.js2
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.min.js.map1
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/lib/array-set.js121
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/lib/base64-vlq.js140
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/lib/base64.js67
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/lib/binary-search.js111
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/lib/mapping-list.js79
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/lib/quick-sort.js114
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-consumer.js1082
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-generator.js416
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/lib/source-node.js413
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/lib/util.js417
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/package.json188
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/source-map.js8
-rw-r--r--tools/node_modules/babel-eslint/node_modules/supports-color/browser.js5
-rw-r--r--tools/node_modules/babel-eslint/node_modules/supports-color/index.js68
-rw-r--r--tools/node_modules/babel-eslint/node_modules/supports-color/package.json33
-rw-r--r--tools/node_modules/babel-eslint/node_modules/supports-color/readme.md16
-rw-r--r--tools/node_modules/babel-eslint/node_modules/to-fast-properties/package.json25
-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/license (renamed from tools/node_modules/babel-eslint/node_modules/object-assign/license)0
-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.json62
306 files changed, 43211 insertions, 27275 deletions
diff --git a/tools/node_modules/babel-eslint/README.md b/tools/node_modules/babel-eslint/README.md
index 23f13c3b10..6a4f9085e3 100644
--- a/tools/node_modules/babel-eslint/README.md
+++ b/tools/node_modules/babel-eslint/README.md
@@ -47,6 +47,7 @@ It just needs to export a `parse` method that takes in a string of code and outp
ESLint | babel-eslint
------------ | -------------
+4.x | >= 6.x
3.x | >= 6.x
2.x | >= 6.x
1.x | >= 5.x
@@ -56,9 +57,9 @@ ESLint | babel-eslint
Ensure that you have substituted the correct version lock for `eslint` and `babel-eslint` into this command:
```sh
-$ npm install eslint@3.x babel-eslint@7 --save-dev
+$ npm install eslint@4.x babel-eslint@8 --save-dev
# or
-$ yarn add eslint@3.x babel-eslint@7 -D
+$ yarn add eslint@4.x babel-eslint@8 -D
```
### Setup
@@ -78,9 +79,9 @@ Check out the [ESLint docs](http://eslint.org/docs/rules/) for all possible rule
### Configuration
-`sourceType` can be set to `'module'`(default) or `'script'` if your code isn't using ECMAScript modules.
-`allowImportExportEverywhere` can be set to true to allow import and export declarations to appear anywhere a statement is allowed if your build environment supports that. By default, import and export declarations can only appear at a program's top level.
-`codeFrame` 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.
+- `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**
@@ -90,7 +91,7 @@ Check out the [ESLint docs](http://eslint.org/docs/rules/) for all possible rule
"parserOptions": {
"sourceType": "module",
"allowImportExportEverywhere": false,
- "codeFrame": false
+ "codeFrame": true
}
}
```
diff --git a/tools/node_modules/babel-eslint/lib/analyze-scope.js b/tools/node_modules/babel-eslint/lib/analyze-scope.js
index dd4cc3b35a..9b2a40d6db 100644
--- a/tools/node_modules/babel-eslint/lib/analyze-scope.js
+++ b/tools/node_modules/babel-eslint/lib/analyze-scope.js
@@ -181,6 +181,11 @@ class Referencer extends OriginalReferencer {
this._visitDeclareX(node);
}
+ // visit OptionalMemberExpression as a MemberExpression.
+ OptionalMemberExpression(node) {
+ super.MemberExpression(node);
+ }
+
_visitClassProperty(node) {
this._visitTypeAnnotation(node.typeAnnotation);
this.visitProperty(node);
@@ -314,8 +319,8 @@ module.exports = function(ast, parserOptions) {
directive: false,
nodejsScope:
ast.sourceType === "script" &&
- (parserOptions.ecmaFeatures &&
- parserOptions.ecmaFeatures.globalReturn) === true,
+ (parserOptions.ecmaFeatures &&
+ parserOptions.ecmaFeatures.globalReturn) === true,
impliedStrict: false,
sourceType: ast.sourceType,
ecmaVersion: parserOptions.ecmaVersion || 2018,
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
index d8892f9972..accde61e56 100644
--- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/convertTemplateType.js
+++ b/tools/node_modules/babel-eslint/lib/babylon-to-espree/convertTemplateType.js
@@ -1,99 +1,92 @@
"use strict";
module.exports = function(tokens, tt) {
- var startingToken = 0;
- var currentToken = 0;
- var numBraces = 0; // track use of {}
- var numBackQuotes = 0; // track number of nested templates
+ let curlyBrace = null;
+ let templateTokens = [];
+ const result = [];
- function isBackQuote(token) {
- return tokens[token].type === tt.backQuote;
- }
-
- function isTemplateStarter(token) {
- return (
- isBackQuote(token) ||
- // only can be a template starter when in a template already
- (tokens[token].type === tt.braceR && numBackQuotes > 0)
- );
- }
-
- function isTemplateEnder(token) {
- return isBackQuote(token) || tokens[token].type === tt.dollarBraceL;
- }
+ function addTemplateType() {
+ const start = templateTokens[0];
+ const end = templateTokens[templateTokens.length - 1];
- // append the values between start and end
- function createTemplateValue(start, end) {
- var value = "";
- while (start <= end) {
- if (tokens[start].value) {
- value += tokens[start].value;
- } else if (tokens[start].type !== tt.template) {
- value += tokens[start].type.label;
+ const value = templateTokens.reduce((result, token) => {
+ if (token.value) {
+ result += token.value;
+ } else if (token.type !== tt.template) {
+ result += token.type.label;
}
- start++;
- }
- return value;
- }
- // create Template token
- function replaceWithTemplateType(start, end) {
- var templateToken = {
+ return result;
+ }, "");
+
+ result.push({
type: "Template",
- value: createTemplateValue(start, end),
- start: tokens[start].start,
- end: tokens[end].end,
+ value: value,
+ start: start.start,
+ end: end.end,
loc: {
- start: tokens[start].loc.start,
- end: tokens[end].loc.end,
+ start: start.loc.start,
+ end: end.loc.end,
},
- };
+ });
- // put new token in place of old tokens
- tokens.splice(start, end - start + 1, templateToken);
+ templateTokens = [];
}
- function trackNumBraces(token) {
- if (tokens[token].type === tt.braceL) {
- numBraces++;
- } else if (tokens[token].type === tt.braceR) {
- numBraces--;
- }
- }
+ tokens.forEach(token => {
+ switch (token.type) {
+ case tt.backQuote:
+ if (curlyBrace) {
+ result.push(curlyBrace);
+ curlyBrace = null;
+ }
- while (startingToken < tokens.length) {
- // template start: check if ` or }
- if (isTemplateStarter(startingToken) && numBraces === 0) {
- if (isBackQuote(startingToken)) {
- numBackQuotes++;
- }
+ templateTokens.push(token);
- currentToken = startingToken + 1;
+ if (templateTokens.length > 1) {
+ addTemplateType();
+ }
- // check if token after template start is "template"
- if (
- currentToken >= tokens.length - 1 ||
- tokens[currentToken].type !== tt.template
- ) {
break;
- }
- // template end: find ` or ${
- while (!isTemplateEnder(currentToken)) {
- if (currentToken >= tokens.length - 1) {
- break;
+ case tt.dollarBraceL:
+ templateTokens.push(token);
+ addTemplateType();
+ break;
+
+ case tt.braceR:
+ if (curlyBrace) {
+ result.push(curlyBrace);
}
- currentToken++;
- }
- if (isBackQuote(currentToken)) {
- numBackQuotes--;
- }
- // template start and end found: create new token
- replaceWithTemplateType(startingToken, currentToken);
- } else if (numBackQuotes > 0) {
- trackNumBraces(startingToken);
+ 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);
}
- startingToken++;
- }
+ });
+
+ 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
index ecd8eee6f1..6d6e12bfc0 100644
--- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/index.js
+++ b/tools/node_modules/babel-eslint/lib/babylon-to-espree/index.js
@@ -6,11 +6,6 @@ var toTokens = require("./toTokens");
var toAST = require("./toAST");
module.exports = function(ast, traverse, tt, code) {
- // remove EOF token, eslint doesn't use this for anything and it interferes
- // with some rules see https://github.com/babel/babel-eslint/issues/2
- // todo: find a more elegant way to do this
- ast.tokens.pop();
-
// convert tokens
ast.tokens = toTokens(ast.tokens, tt, code);
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
index 9c5a49ef11..44c73529a1 100644
--- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/toToken.js
+++ b/tools/node_modules/babel-eslint/lib/babylon-to-espree/toToken.js
@@ -19,16 +19,19 @@ module.exports = function(token, tt, source) {
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 ||
@@ -38,7 +41,8 @@ module.exports = function(token, tt, source) {
type === tt.plusMin ||
type === tt.modulo ||
type === tt.exponent ||
- type === tt.prefix ||
+ type === tt.bang ||
+ type === tt.tilde ||
type === tt.doubleColon ||
type.isAssign
) {
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
index a863b871b0..bb30819bac 100644
--- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/toTokens.js
+++ b/tools/node_modules/babel-eslint/lib/babylon-to-espree/toTokens.js
@@ -4,16 +4,7 @@ var convertTemplateType = require("./convertTemplateType");
var toToken = require("./toToken");
module.exports = function(tokens, tt, code) {
- // transform tokens to type "Template"
- convertTemplateType(tokens, tt);
-
- var transformedTokens = [];
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.type !== "CommentLine" && token.type !== "CommentBlock") {
- transformedTokens.push(toToken(token, tt, code));
- }
- }
-
- return transformedTokens;
+ 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
index c4655280af..9e527d26d7 100644
--- a/tools/node_modules/babel-eslint/lib/index.js
+++ b/tools/node_modules/babel-eslint/lib/index.js
@@ -11,10 +11,7 @@ exports.parseForESLint = function(code, options) {
options.allowImportExportEverywhere =
options.allowImportExportEverywhere || false;
- if (options.eslintVisitorKeys && options.eslintScopeManager) {
- return require("./parse-with-scope")(code, options);
- }
- return { ast: require("./parse-with-patch")(code, options) };
+ return require("./parse-with-scope")(code, options);
};
exports.parseNoPatch = function(code, options) {
diff --git a/tools/node_modules/babel-eslint/lib/parse-with-patch.js b/tools/node_modules/babel-eslint/lib/parse-with-patch.js
deleted file mode 100644
index ba1b95b5b1..0000000000
--- a/tools/node_modules/babel-eslint/lib/parse-with-patch.js
+++ /dev/null
@@ -1,9 +0,0 @@
-"use strict";
-
-var parse = require("./parse");
-var patchEscope = require("./patch-eslint-scope");
-
-module.exports = function(code, options) {
- patchEscope(options);
- return parse(code, options);
-};
diff --git a/tools/node_modules/babel-eslint/lib/parse.js b/tools/node_modules/babel-eslint/lib/parse.js
index f29e6af155..b23b9dc9fc 100644
--- a/tools/node_modules/babel-eslint/lib/parse.js
+++ b/tools/node_modules/babel-eslint/lib/parse.js
@@ -1,12 +1,15 @@
"use strict";
var babylonToEspree = require("./babylon-to-espree");
-var parse = require("babylon").parse;
-var tt = require("babylon").tokTypes;
+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,
@@ -16,14 +19,16 @@ module.exports = function(code, options) {
ranges: true,
tokens: true,
plugins: [
- "flow",
+ ["flow", { all: true }],
"jsx",
"estree",
"asyncFunctions",
"asyncGenerators",
"classConstructorCall",
"classProperties",
- "decorators",
+ legacyDecorators
+ ? "decorators-legacy"
+ : ["decorators", { decoratorsBeforeExport: false }],
"doExpressions",
"exponentiationOperator",
"exportDefaultFrom",
@@ -40,8 +45,9 @@ module.exports = function(code, options) {
"bigInt",
"optionalCatchBinding",
"throwExpressions",
- "pipelineOperator",
+ ["pipelineOperator", { proposal: "minimal" }],
"nullishCoalescingOperator",
+ "logicalAssignment",
],
};
diff --git a/tools/node_modules/babel-eslint/lib/patch-eslint-scope.js b/tools/node_modules/babel-eslint/lib/patch-eslint-scope.js
deleted file mode 100644
index aec71fc6ca..0000000000
--- a/tools/node_modules/babel-eslint/lib/patch-eslint-scope.js
+++ /dev/null
@@ -1,370 +0,0 @@
-"use strict";
-
-var Module = require("module");
-var path = require("path");
-var t = require("@babel/types");
-
-function getModules() {
- try {
- // avoid importing a local copy of eslint, try to find a peer dependency
- var eslintLoc = Module._resolveFilename("eslint", module.parent);
- } catch (err) {
- try {
- // avoids breaking in jest where module.parent is undefined
- eslintLoc = require.resolve("eslint");
- } catch (err) {
- throw new ReferenceError("couldn't resolve eslint");
- }
- }
-
- // get modules relative to what eslint will load
- var eslintMod = new Module(eslintLoc);
- eslintMod.filename = eslintLoc;
- eslintMod.paths = Module._nodeModulePaths(path.dirname(eslintLoc));
-
- try {
- var escope = eslintMod.require("eslint-scope");
- var Definition = eslintMod.require("eslint-scope/lib/definition")
- .Definition;
- var referencer = eslintMod.require("eslint-scope/lib/referencer");
- } catch (err) {
- escope = eslintMod.require("escope");
- Definition = eslintMod.require("escope/lib/definition").Definition;
- referencer = eslintMod.require("escope/lib/referencer");
- }
-
- var estraverse = eslintMod.require("estraverse");
-
- if (referencer.__esModule) referencer = referencer.default;
-
- return {
- Definition,
- escope,
- estraverse,
- referencer,
- };
-}
-
-function monkeypatch(modules) {
- var Definition = modules.Definition;
- var escope = modules.escope;
- var estraverse = modules.estraverse;
- var referencer = modules.referencer;
-
- Object.assign(estraverse.VisitorKeys, t.VISITOR_KEYS);
- estraverse.VisitorKeys.MethodDefinition.push("decorators");
- estraverse.VisitorKeys.Property.push("decorators");
-
- // if there are decorators, then visit each
- function visitDecorators(node) {
- if (!node.decorators) {
- return;
- }
- for (var i = 0; i < node.decorators.length; i++) {
- if (node.decorators[i].expression) {
- this.visit(node.decorators[i]);
- }
- }
- }
-
- // iterate through part of t.VISITOR_KEYS
- var flowFlippedAliasKeys = t.FLIPPED_ALIAS_KEYS.Flow.concat([
- "ArrayPattern",
- "ClassDeclaration",
- "ClassExpression",
- "FunctionDeclaration",
- "FunctionExpression",
- "Identifier",
- "ObjectPattern",
- "RestElement",
- ]);
- var visitorKeysMap = Object.keys(t.VISITOR_KEYS).reduce(function(acc, key) {
- var value = t.VISITOR_KEYS[key];
- if (flowFlippedAliasKeys.indexOf(value) === -1) {
- acc[key] = value;
- }
- return acc;
- }, {});
-
- var 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" },
- };
-
- function visitTypeAnnotation(node) {
- // get property to check (params, id, etc...)
- var visitorValues = visitorKeysMap[node.type];
- if (!visitorValues) {
- return;
- }
-
- // can have multiple properties
- for (var i = 0; i < visitorValues.length; i++) {
- var visitorValue = visitorValues[i];
- var propertyType = propertyTypes[visitorValue];
- var nodeProperty = node[visitorValue];
- // check if property or type is defined
- if (propertyType == null || nodeProperty == null) {
- continue;
- }
- if (propertyType.type === "loop") {
- for (var j = 0; j < nodeProperty.length; j++) {
- if (Array.isArray(propertyType.values)) {
- for (var k = 0; k < propertyType.values.length; k++) {
- var loopPropertyNode = nodeProperty[j][propertyType.values[k]];
- if (loopPropertyNode) {
- checkIdentifierOrVisit.call(this, loopPropertyNode);
- }
- }
- } else {
- checkIdentifierOrVisit.call(this, nodeProperty[j]);
- }
- }
- } else if (propertyType.type === "single") {
- checkIdentifierOrVisit.call(this, nodeProperty);
- } else if (propertyType.type === "typeAnnotation") {
- visitTypeAnnotation.call(this, node.typeAnnotation);
- } else if (propertyType.type === "typeParameters") {
- for (var l = 0; l < node.typeParameters.params.length; l++) {
- checkIdentifierOrVisit.call(this, node.typeParameters.params[l]);
- }
- } else if (propertyType.type === "id") {
- if (node.id.type === "Identifier") {
- checkIdentifierOrVisit.call(this, node.id);
- } else {
- visitTypeAnnotation.call(this, node.id);
- }
- }
- }
- }
-
- function checkIdentifierOrVisit(node) {
- if (node.typeAnnotation) {
- visitTypeAnnotation.call(this, node.typeAnnotation);
- } else if (node.type === "Identifier") {
- this.visit(node);
- } else {
- visitTypeAnnotation.call(this, node);
- }
- }
-
- function nestTypeParamScope(manager, node) {
- var parentScope = manager.__currentScope;
- var scope = new escope.Scope(
- manager,
- "type-parameters",
- parentScope,
- node,
- false
- );
- manager.__nestScope(scope);
- for (var j = 0; j < node.typeParameters.params.length; j++) {
- var name = node.typeParameters.params[j];
- scope.__define(name, new Definition("TypeParameter", name, name));
- if (name.typeAnnotation) {
- checkIdentifierOrVisit.call(this, name);
- }
- }
- scope.__define = function() {
- return parentScope.__define.apply(parentScope, arguments);
- };
- return scope;
- }
-
- // visit decorators that are in: ClassDeclaration / ClassExpression
- var visitClass = referencer.prototype.visitClass;
- referencer.prototype.visitClass = function(node) {
- visitDecorators.call(this, node);
- var typeParamScope;
- if (node.typeParameters) {
- typeParamScope = nestTypeParamScope.call(this, this.scopeManager, node);
- }
- // visit flow type: ClassImplements
- if (node.implements) {
- for (var i = 0; i < node.implements.length; i++) {
- checkIdentifierOrVisit.call(this, node.implements[i]);
- }
- }
- if (node.superTypeParameters) {
- for (var k = 0; k < node.superTypeParameters.params.length; k++) {
- checkIdentifierOrVisit.call(this, node.superTypeParameters.params[k]);
- }
- }
- visitClass.call(this, node);
- if (typeParamScope) {
- this.close(node);
- }
- };
-
- // visit decorators that are in: Property / MethodDefinition
- var visitProperty = referencer.prototype.visitProperty;
- referencer.prototype.visitProperty = function(node) {
- if (node.value && node.value.type === "TypeCastExpression") {
- visitTypeAnnotation.call(this, node.value);
- }
- visitDecorators.call(this, node);
- visitProperty.call(this, node);
- };
-
- function visitClassProperty(node) {
- if (node.typeAnnotation) {
- visitTypeAnnotation.call(this, node.typeAnnotation);
- }
- this.visitProperty(node);
- }
-
- // visit ClassProperty as a Property.
- referencer.prototype.ClassProperty = visitClassProperty;
-
- // visit ClassPrivateProperty as a Property.
- referencer.prototype.ClassPrivateProperty = visitClassProperty;
-
- // visit flow type in FunctionDeclaration, FunctionExpression, ArrowFunctionExpression
- var visitFunction = referencer.prototype.visitFunction;
- referencer.prototype.visitFunction = function(node) {
- var typeParamScope;
- if (node.typeParameters) {
- typeParamScope = nestTypeParamScope.call(this, this.scopeManager, node);
- }
- if (node.returnType) {
- checkIdentifierOrVisit.call(this, node.returnType);
- }
- // only visit if function parameters have types
- if (node.params) {
- for (var i = 0; i < node.params.length; i++) {
- var param = node.params[i];
- if (param.typeAnnotation) {
- checkIdentifierOrVisit.call(this, param);
- } else if (t.isAssignmentPattern(param)) {
- if (param.left.typeAnnotation) {
- checkIdentifierOrVisit.call(this, param.left);
- }
- }
- }
- }
- // set ArrayPattern/ObjectPattern visitor keys back to their original. otherwise
- // escope will traverse into them and include the identifiers within as declarations
- estraverse.VisitorKeys.ObjectPattern = ["properties"];
- estraverse.VisitorKeys.ArrayPattern = ["elements"];
- visitFunction.call(this, node);
- // set them back to normal...
- estraverse.VisitorKeys.ObjectPattern = t.VISITOR_KEYS.ObjectPattern;
- estraverse.VisitorKeys.ArrayPattern = t.VISITOR_KEYS.ArrayPattern;
- if (typeParamScope) {
- this.close(node);
- }
- };
-
- // visit flow type in VariableDeclaration
- var variableDeclaration = referencer.prototype.VariableDeclaration;
- referencer.prototype.VariableDeclaration = function(node) {
- if (node.declarations) {
- for (var i = 0; i < node.declarations.length; i++) {
- var id = node.declarations[i].id;
- var typeAnnotation = id.typeAnnotation;
- if (typeAnnotation) {
- checkIdentifierOrVisit.call(this, typeAnnotation);
- }
- }
- }
- variableDeclaration.call(this, node);
- };
-
- function createScopeVariable(node, name) {
- this.currentScope().variableScope.__define(
- name,
- new Definition("Variable", name, node, null, null, null)
- );
- }
-
- referencer.prototype.InterfaceDeclaration = function(node) {
- createScopeVariable.call(this, node, node.id);
- var typeParamScope;
- if (node.typeParameters) {
- typeParamScope = nestTypeParamScope.call(this, this.scopeManager, node);
- }
- // TODO: Handle mixins
- for (var i = 0; i < node.extends.length; i++) {
- visitTypeAnnotation.call(this, node.extends[i]);
- }
- visitTypeAnnotation.call(this, node.body);
- if (typeParamScope) {
- this.close(node);
- }
- };
-
- referencer.prototype.TypeAlias = function(node) {
- createScopeVariable.call(this, node, node.id);
- var typeParamScope;
- if (node.typeParameters) {
- typeParamScope = nestTypeParamScope.call(this, this.scopeManager, node);
- }
- if (node.right) {
- visitTypeAnnotation.call(this, node.right);
- }
- if (typeParamScope) {
- this.close(node);
- }
- };
-
- referencer.prototype.DeclareModule = referencer.prototype.DeclareFunction = referencer.prototype.DeclareVariable = referencer.prototype.DeclareClass = function(
- node
- ) {
- if (node.id) {
- createScopeVariable.call(this, node, node.id);
- }
-
- var typeParamScope;
- if (node.typeParameters) {
- typeParamScope = nestTypeParamScope.call(this, this.scopeManager, node);
- }
- if (typeParamScope) {
- this.close(node);
- }
- };
-
- referencer._babelEslintPatched = true;
-}
-
-// To patch for each call.
-var escope = null;
-var escopeAnalyze = null;
-
-module.exports = function(parserOptions) {
- // Patch `Referencer.prototype` once.
- if (!escope) {
- const modules = getModules();
- monkeypatch(modules);
-
- // Store to patch for each call.
- escope = modules.escope;
- escopeAnalyze = modules.escope.analyze;
- }
-
- // Patch `escope.analyze` based on the current parserOptions.
- escope.analyze = function(ast, opts) {
- opts = opts || {};
- opts.ecmaVersion = parserOptions.ecmaVersion;
- opts.sourceType = parserOptions.sourceType;
- opts.nodejsScope =
- ast.sourceType === "script" &&
- (parserOptions.ecmaFeatures &&
- parserOptions.ecmaFeatures.globalReturn) === true;
-
- return escopeAnalyze.call(this, ast, opts);
- };
-};
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/LICENSE b/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/LICENSE
new file mode 100644
index 0000000000..620366eb90
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/LICENSE
@@ -0,0 +1,22 @@
+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/code-frame/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/README.md
index 7ef4d3f9df..185f93d247 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/README.md
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/README.md
@@ -2,125 +2,18 @@
> Generate errors that contain a code frame that point to source locations.
+See our website [@babel/code-frame](https://babeljs.io/docs/en/next/babel-code-frame.html) for more information.
+
## Install
+Using npm:
+
```sh
npm install --save-dev @babel/code-frame
```
-## Usage
-
-```js
-import { codeFrameColumns } from '@babel/code-frame';
-
-const rawLines = `class Foo {
- constructor()
-}`;
-const location = { start: { line: 2, column: 16 } };
-
-const result = codeFrameColumns(rawLines, location, { /* options */ });
-
-console.log(result);
-```
-
-```
- 1 | class Foo {
-> 2 | constructor()
- | ^
- 3 | }
-```
-
-If the column number is not known, you may omit it.
-
-You can also pass an `end` hash in `location`.
-
-```js
-import { codeFrameColumns } from '@babel/code-frame';
-
-const rawLines = `class Foo {
- constructor() {
- console.log("hello");
- }
-}`;
-const location = { start: { line: 2, column: 17 }, end: { line: 4, column: 3 } };
-
-const result = codeFrameColumns(rawLines, location, { /* options */ });
-
-console.log(result);
-```
-
-```
- 1 | class Foo {
-> 2 | constructor() {
- | ^
-> 3 | console.log("hello");
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
-> 4 | }
- | ^^^
- 5 | };
-```
-
-## Options
-
-### `highlightCode`
-
-`boolean`, defaults to `false`.
-
-Toggles syntax highlighting the code as JavaScript for terminals.
+or using yarn:
-### `linesAbove`
-
-`number`, defaults to `2`.
-
-Adjust the number of lines to show above the error.
-
-### `linesBelow`
-
-`number`, defaults to `3`.
-
-Adjust the number of lines to show below the error.
-
-### `forceColor`
-
-`boolean`, defaults to `false`.
-
-Enable this to forcibly syntax highlight the code as JavaScript (for non-terminals); overrides `highlightCode`.
-
-## Upgrading from prior versions
-
-Prior to version 7, the only API exposed by this module was for a single line and optional column pointer. The old API will now log a deprecation warning.
-
-The new API takes a `location` object, similar to what is available in an AST.
-
-This is an example of the deprecated (but still available) API:
-
-```js
-import codeFrame from '@babel/code-frame';
-
-const rawLines = `class Foo {
- constructor()
-}`;
-const lineNumber = 2;
-const colNumber = 16;
-
-const result = codeFrame(rawLines, lineNumber, colNumber, { /* options */ });
-
-console.log(result);
-```
-
-To get the same highlighting using the new API:
-
-```js
-import { codeFrameColumns } from '@babel/code-frame';
-
-const rawLines = `class Foo {
- constructor() {
- console.log("hello");
- }
-}`;
-const location = { start: { line: 2, column: 16 } };
-
-const result = codeFrameColumns(rawLines, location, { /* options */ });
-
-console.log(result);
+```sh
+yarn add @babel/code-frame --dev
```
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
index 744f9595b3..1f64c6ce7b 100644
--- 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
@@ -1,106 +1,51 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.codeFrameColumns = codeFrameColumns;
exports.default = _default;
-var _jsTokens = _interopRequireWildcard(require("js-tokens"));
+function _highlight() {
+ const data = _interopRequireWildcard(require("@babel/highlight"));
-var _esutils = _interopRequireDefault(require("esutils"));
-
-var _chalk = _interopRequireDefault(require("chalk"));
+ _highlight = function () {
+ return data;
+ };
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ 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; } }
-var deprecationWarningShown = false;
+let deprecationWarningShown = false;
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,
gutter: chalk.grey,
- marker: chalk.red.bold
+ marker: chalk.red.bold,
+ message: chalk.red.bold
};
}
-var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
-var JSX_TAG = /^[a-z][\w-]*$/i;
-var BRACKET = /^[()[\]{}]$/;
-
-function getTokenType(match) {
- var _match$slice = match.slice(-2),
- offset = _match$slice[0],
- text = _match$slice[1];
-
- var 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 highlight(defs, text) {
- return text.replace(_jsTokens.default, function () {
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- var type = getTokenType(args);
- var colorize = defs[type];
-
- if (colorize) {
- return args[0].split(NEWLINE).map(function (str) {
- return colorize(str);
- }).join("\n");
- } else {
- return args[0];
- }
- });
-}
+const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
function getMarkerLines(loc, source, opts) {
- var startLoc = Object.assign({}, {
+ const startLoc = Object.assign({
column: 0,
line: -1
}, loc.start);
- var endLoc = Object.assign({}, startLoc, loc.end);
- var linesAbove = opts.linesAbove || 2;
- var linesBelow = opts.linesBelow || 3;
- var startLine = startLoc.line;
- var startColumn = startLoc.column;
- var endLine = endLoc.line;
- var endColumn = endLoc.column;
- var start = Math.max(startLine - (linesAbove + 1), 0);
- var end = Math.min(source.length, endLine + linesBelow);
+ 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;
@@ -110,23 +55,23 @@ function getMarkerLines(loc, source, opts) {
end = source.length;
}
- var lineDiff = endLine - startLine;
- var markerLines = {};
+ const lineDiff = endLine - startLine;
+ const markerLines = {};
if (lineDiff) {
- for (var i = 0; i <= lineDiff; i++) {
- var lineNumber = i + startLine;
+ for (let i = 0; i <= lineDiff; i++) {
+ const lineNumber = i + startLine;
if (!startColumn) {
markerLines[lineNumber] = true;
} else if (i === 0) {
- var sourceLength = source[lineNumber - 1].length;
+ const sourceLength = source[lineNumber - 1].length;
markerLines[lineNumber] = [startColumn, sourceLength - startColumn];
} else if (i === lineDiff) {
markerLines[lineNumber] = [0, endColumn];
} else {
- var _sourceLength = source[lineNumber - i].length;
- markerLines[lineNumber] = [0, _sourceLength];
+ const sourceLength = source[lineNumber - i].length;
+ markerLines[lineNumber] = [0, sourceLength];
}
}
} else {
@@ -142,61 +87,60 @@ function getMarkerLines(loc, source, opts) {
}
return {
- start: start,
- end: end,
- markerLines: markerLines
+ start,
+ end,
+ markerLines
};
}
-function codeFrameColumns(rawLines, loc, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
- var highlighted = opts.highlightCode && _chalk.default.supportsColor || opts.forceColor;
- var chalk = _chalk.default;
+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);
- if (opts.forceColor) {
- chalk = new _chalk.default.constructor({
- enabled: true
- });
- }
-
- var maybeHighlight = function maybeHighlight(chalkFn, string) {
+ const maybeHighlight = (chalkFn, string) => {
return highlighted ? chalkFn(string) : string;
};
- var defs = getDefs(chalk);
- if (highlighted) rawLines = highlight(defs, rawLines);
- var lines = rawLines.split(NEWLINE);
-
- var _getMarkerLines = getMarkerLines(loc, lines, opts),
- start = _getMarkerLines.start,
- end = _getMarkerLines.end,
- markerLines = _getMarkerLines.markerLines;
-
- var numberMaxWidth = String(end).length;
- var frame = lines.slice(start, end).map(function (line, index) {
- var number = start + 1 + index;
- var paddedNumber = (" " + number).slice(-numberMaxWidth);
- var gutter = " " + paddedNumber + " | ";
- var hasMarker = markerLines[number];
+ if (highlighted) rawLines = (0, _highlight().default)(rawLines, opts);
+ 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;
+ let frame = lines.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) {
- var markerLine = "";
+ let markerLine = "";
if (Array.isArray(hasMarker)) {
- var markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
- var numberOfMarkers = hasMarker[1] || 1;
+ 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;
+ 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 {
@@ -204,25 +148,22 @@ function codeFrameColumns(rawLines, loc, opts) {
}
}
-function _default(rawLines, lineNumber, colNumber, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function _default(rawLines, lineNumber, colNumber, opts = {}) {
if (!deprecationWarningShown) {
deprecationWarningShown = true;
- var deprecationError = new Error("Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.");
- deprecationError.name = "DeprecationWarning";
+ const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
if (process.emitWarning) {
- process.emitWarning(deprecationError);
+ process.emitWarning(message, "DeprecationWarning");
} else {
- console.warn(deprecationError);
+ const deprecationError = new Error(message);
+ deprecationError.name = "DeprecationWarning";
+ console.warn(new Error(message));
}
}
colNumber = Math.max(colNumber, 0);
- var location = {
+ const location = {
start: {
column: colNumber,
line: lineNumber
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
index ddf50f787c..f3b551dfa9 100644
--- 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
@@ -1,43 +1,16 @@
{
- "_from": "@babel/code-frame@7.0.0-beta.36",
- "_id": "@babel/code-frame@7.0.0-beta.36",
- "_inBundle": false,
- "_integrity": "sha512-sW77BFwJ48YvQp3Gzz5xtAUiXuYOL2aMJKDwiaY3OcvdqBFurtYfOpSa4QrNyDxmOGRFSYzUpabU2m9QrlWE7w==",
- "_location": "/babel-eslint/@babel/code-frame",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "@babel/code-frame@7.0.0-beta.36",
- "name": "@babel/code-frame",
- "escapedName": "@babel%2fcode-frame",
- "scope": "@babel",
- "rawSpec": "7.0.0-beta.36",
- "saveSpec": null,
- "fetchSpec": "7.0.0-beta.36"
- },
- "_requiredBy": [
- "/babel-eslint",
- "/babel-eslint/@babel/template",
- "/babel-eslint/@babel/traverse"
- ],
- "_resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.36.tgz",
- "_shasum": "2349d7ec04b3a06945ae173280ef8579b63728e4",
- "_spec": "@babel/code-frame@7.0.0-beta.36",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint",
"author": {
"name": "Sebastian McKenzie",
"email": "sebmck@gmail.com"
},
"bundleDependencies": false,
"dependencies": {
- "chalk": "^2.0.0",
- "esutils": "^2.0.2",
- "js-tokens": "^3.0.0"
+ "@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"
},
"homepage": "https://babeljs.io/",
@@ -48,5 +21,5 @@
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame"
},
- "version": "7.0.0-beta.36"
-}
+ "version": "7.0.0"
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/LICENSE b/tools/node_modules/babel-eslint/node_modules/@babel/generator/LICENSE
new file mode 100644
index 0000000000..f31575ec77
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/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/generator/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/generator/README.md
new file mode 100644
index 0000000000..fc980b167d
--- /dev/null
+++ b/tools/node_modules/babel-eslint/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/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
new file mode 100644
index 0000000000..8a800148c2
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/buffer.js
@@ -0,0 +1,257 @@
+"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
new file mode 100644
index 0000000000..117a61167c
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/base.js
@@ -0,0 +1,86 @@
+"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;
+
+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`);
+} \ 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
new file mode 100644
index 0000000000..7f54632ad0
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/classes.js
@@ -0,0 +1,190 @@
+"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
new file mode 100644
index 0000000000..45efa98efa
--- /dev/null
+++ b/tools/node_modules/babel-eslint/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.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
new file mode 100644
index 0000000000..0b24d2ccad
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/flow.js
@@ -0,0 +1,628 @@
+"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) {
+ this.token(",");
+ this.space();
+ }
+ }
+ });
+ this.space();
+ }
+
+ 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
new file mode 100644
index 0000000000..f2b4cecad5
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/index.js
@@ -0,0 +1,137 @@
+"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/jsx.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/jsx.js
new file mode 100644
index 0000000000..4850913983
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/jsx.js
@@ -0,0 +1,145 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.JSXAttribute = JSXAttribute;
+exports.JSXIdentifier = JSXIdentifier;
+exports.JSXNamespacedName = JSXNamespacedName;
+exports.JSXMemberExpression = JSXMemberExpression;
+exports.JSXSpreadAttribute = JSXSpreadAttribute;
+exports.JSXExpressionContainer = JSXExpressionContainer;
+exports.JSXSpreadChild = JSXSpreadChild;
+exports.JSXText = JSXText;
+exports.JSXElement = JSXElement;
+exports.JSXOpeningElement = JSXOpeningElement;
+exports.JSXClosingElement = JSXClosingElement;
+exports.JSXEmptyExpression = JSXEmptyExpression;
+exports.JSXFragment = JSXFragment;
+exports.JSXOpeningFragment = JSXOpeningFragment;
+exports.JSXClosingFragment = JSXClosingFragment;
+
+function JSXAttribute(node) {
+ this.print(node.name, node);
+
+ if (node.value) {
+ this.token("=");
+ this.print(node.value, node);
+ }
+}
+
+function JSXIdentifier(node) {
+ this.word(node.name);
+}
+
+function JSXNamespacedName(node) {
+ this.print(node.namespace, node);
+ this.token(":");
+ this.print(node.name, node);
+}
+
+function JSXMemberExpression(node) {
+ this.print(node.object, node);
+ this.token(".");
+ this.print(node.property, node);
+}
+
+function JSXSpreadAttribute(node) {
+ this.token("{");
+ this.token("...");
+ this.print(node.argument, node);
+ this.token("}");
+}
+
+function JSXExpressionContainer(node) {
+ this.token("{");
+ this.print(node.expression, node);
+ this.token("}");
+}
+
+function JSXSpreadChild(node) {
+ this.token("{");
+ this.token("...");
+ this.print(node.expression, node);
+ this.token("}");
+}
+
+function JSXText(node) {
+ const raw = this.getPossibleRaw(node);
+
+ if (raw != null) {
+ this.token(raw);
+ } else {
+ this.token(node.value);
+ }
+}
+
+function JSXElement(node) {
+ const open = node.openingElement;
+ this.print(open, node);
+ if (open.selfClosing) return;
+ this.indent();
+
+ for (const child of node.children) {
+ this.print(child, node);
+ }
+
+ this.dedent();
+ this.print(node.closingElement, node);
+}
+
+function spaceSeparator() {
+ this.space();
+}
+
+function JSXOpeningElement(node) {
+ this.token("<");
+ this.print(node.name, node);
+ this.print(node.typeParameters, node);
+
+ if (node.attributes.length > 0) {
+ this.space();
+ this.printJoin(node.attributes, node, {
+ separator: spaceSeparator
+ });
+ }
+
+ if (node.selfClosing) {
+ this.space();
+ this.token("/>");
+ } else {
+ this.token(">");
+ }
+}
+
+function JSXClosingElement(node) {
+ this.token("</");
+ this.print(node.name, node);
+ this.token(">");
+}
+
+function JSXEmptyExpression(node) {
+ this.printInnerComments(node);
+}
+
+function JSXFragment(node) {
+ this.print(node.openingFragment, node);
+ this.indent();
+
+ for (const child of node.children) {
+ this.print(child, node);
+ }
+
+ this.dedent();
+ this.print(node.closingFragment, node);
+}
+
+function JSXOpeningFragment() {
+ this.token("<");
+ this.token(">");
+}
+
+function JSXClosingFragment() {
+ this.token("</");
+ this.token(">");
+} \ 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
new file mode 100644
index 0000000000..39965bacc1
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/methods.js
@@ -0,0 +1,167 @@
+"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
new file mode 100644
index 0000000000..af87bd586e
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/modules.js
@@ -0,0 +1,214 @@
+"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
new file mode 100644
index 0000000000..c74363de59
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/statements.js
@@ -0,0 +1,319 @@
+"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/template-literals.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/template-literals.js
new file mode 100644
index 0000000000..054330362d
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/template-literals.js
@@ -0,0 +1,33 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.TaggedTemplateExpression = TaggedTemplateExpression;
+exports.TemplateElement = TemplateElement;
+exports.TemplateLiteral = TemplateLiteral;
+
+function TaggedTemplateExpression(node) {
+ this.print(node.tag, node);
+ this.print(node.typeParameters, node);
+ this.print(node.quasi, node);
+}
+
+function TemplateElement(node, parent) {
+ const isFirst = parent.quasis[0] === node;
+ const isLast = parent.quasis[parent.quasis.length - 1] === node;
+ const value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");
+ this.token(value);
+}
+
+function TemplateLiteral(node) {
+ const quasis = node.quasis;
+
+ for (let i = 0; i < quasis.length; i++) {
+ this.print(quasis[i], node);
+
+ if (i + 1 < quasis.length) {
+ this.print(node.expressions[i], 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
new file mode 100644
index 0000000000..04a8a2fed8
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/types.js
@@ -0,0 +1,193 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.Identifier = Identifier;
+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 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
new file mode 100644
index 0000000000..0355057de9
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/typescript.js
@@ -0,0 +1,715 @@
+"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
new file mode 100644
index 0000000000..fcdb288b7f
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/index.js
@@ -0,0 +1,92 @@
+"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/printer.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/printer.js
new file mode 100644
index 0000000000..07f6de91e9
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/printer.js
@@ -0,0 +1,501 @@
+"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, () => {
+ this[node.type](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
new file mode 100644
index 0000000000..12b70308db
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/source-map.js
@@ -0,0 +1,81 @@
+"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
new file mode 100644
index 0000000000..9f41959fc0
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/generator/package.json
@@ -0,0 +1,36 @@
+{
+ "author": {
+ "name": "Sebastian McKenzie",
+ "email": "sebmck@gmail.com"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "@babel/types": "^7.3.4",
+ "jsesc": "^2.5.1",
+ "lodash": "^4.17.11",
+ "source-map": "^0.5.0",
+ "trim-right": "^1.0.1"
+ },
+ "deprecated": false,
+ "description": "Turns an AST into code.",
+ "devDependencies": {
+ "@babel/helper-fixtures": "^7.2.0",
+ "@babel/parser": "^7.3.4"
+ },
+ "files": [
+ "lib"
+ ],
+ "gitHead": "1f6454cc90fe33e0a32260871212e2f719f35741",
+ "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.3.4"
+} \ 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
new file mode 100644
index 0000000000..a06ec0e70f
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/LICENSE
@@ -0,0 +1,22 @@
+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/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/README.md
index 97b5b4ded9..a8a6809ace 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/README.md
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/README.md
@@ -1,5 +1,19 @@
# @babel/helper-function-name
-## Usage
+> Helper function to change the property 'name' of every function
-TODO
+See our website [@babel/helper-function-name](https://babeljs.io/docs/en/next/babel-helper-function-name.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/helper-function-name
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-function-name --dev
+```
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
index ecf17ff49d..c6dd4afbf5 100644
--- 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
@@ -1,54 +1,125 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = _default;
-var _helperGetFunctionArity = _interopRequireDefault(require("@babel/helper-get-function-arity"));
+function _helperGetFunctionArity() {
+ const data = _interopRequireDefault(require("@babel/helper-get-function-arity"));
-var _template2 = _interopRequireDefault(require("@babel/template"));
+ _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"));
-var t = _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 }; }
-var buildPropertyMethodAssignmentWrapper = (0, _template2.default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n");
-var buildGeneratorPropertyMethodAssignmentWrapper = (0, _template2.default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n");
-var visitor = {
- "ReferencedIdentifier|BindingIdentifier": function ReferencedIdentifierBindingIdentifier(path, state) {
+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;
- var localDeclar = path.scope.getBindingIdentifier(state.name);
+ 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;
- var build = buildPropertyMethodAssignmentWrapper;
+ if (!t().isFunction(method)) return;
+ let build = buildPropertyMethodAssignmentWrapper;
if (method.generator) {
build = buildGeneratorPropertyMethodAssignmentWrapper;
}
- var _template = build({
+ const template = build({
FUNCTION: method,
FUNCTION_ID: id,
FUNCTION_KEY: scope.generateUidIdentifier(id.name)
}).expression;
- var params = _template.callee.body.body[0].params;
+ const params = template.callee.body.body[0].params;
- for (var i = 0, len = (0, _helperGetFunctionArity.default)(method); i < len; i++) {
+ for (let i = 0, len = (0, _helperGetFunctionArity().default)(method); i < len; i++) {
params.push(scope.generateUidIdentifier("x"));
}
- return _template;
+ return template;
}
}
@@ -57,14 +128,14 @@ function wrap(state, method, id, scope) {
}
function visit(node, name, scope) {
- var state = {
+ const state = {
selfAssignment: false,
selfReference: false,
outerDeclar: scope.getBindingIdentifier(name),
references: [],
name: name
};
- var binding = scope.getOwnBinding(name);
+ const binding = scope.getOwnBinding(name);
if (binding) {
if (binding.kind === "param") {
@@ -77,53 +148,51 @@ function visit(node, name, scope) {
return state;
}
-function _default(_ref, localBinding) {
- var node = _ref.node,
- parent = _ref.parent,
- scope = _ref.scope,
- id = _ref.id;
-
- if (localBinding === void 0) {
- localBinding = false;
- }
-
+function _default({
+ node,
+ parent,
+ scope,
+ id
+}, localBinding = false) {
if (node.id) return;
- if ((t.isObjectProperty(parent) || t.isObjectMethod(parent, {
+ if ((t().isObjectProperty(parent) || t().isObjectMethod(parent, {
kind: "method"
- })) && (!parent.computed || t.isLiteral(parent.key))) {
+ })) && (!parent.computed || t().isLiteral(parent.key))) {
id = parent.key;
- } else if (t.isVariableDeclarator(parent)) {
+ } else if (t().isVariableDeclarator(parent)) {
id = parent.id;
- if (t.isIdentifier(id) && !localBinding) {
- var binding = scope.parent.getBinding(id.name);
+ if (t().isIdentifier(id) && !localBinding) {
+ const binding = scope.parent.getBinding(id.name);
if (binding && binding.constant && scope.getBinding(id.name) === binding) {
- node.id = id;
- node.id[t.NOT_LOCAL_BINDING] = true;
+ node.id = t().cloneNode(id);
+ node.id[t().NOT_LOCAL_BINDING] = true;
return;
}
}
- } else if (t.isAssignmentExpression(parent)) {
+ } else if (t().isAssignmentExpression(parent)) {
id = parent.left;
} else if (!id) {
return;
}
- var name;
+ let name;
- if (id && t.isLiteral(id)) {
- name = id.value;
- } else if (id && t.isIdentifier(id)) {
+ if (id && t().isLiteral(id)) {
+ name = getNameFromLiteralId(id);
+ } else if (id && t().isIdentifier(id)) {
name = id.name;
- } else {
+ }
+
+ if (name === undefined) {
return;
}
- name = t.toBindingIdentifierName(name);
- id = t.identifier(name);
- id[t.NOT_LOCAL_BINDING] = true;
- var state = visit(node, name, scope);
+ 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
index 1a940d0e5f..dfed420aae 100644
--- 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
@@ -1,42 +1,21 @@
{
- "_from": "@babel/helper-function-name@7.0.0-beta.36",
- "_id": "@babel/helper-function-name@7.0.0-beta.36",
- "_inBundle": false,
- "_integrity": "sha512-/SGPOyifPf20iTrMN+WdlY2MbKa7/o4j7B/4IAsdOusASp2icT+Wcdjf4tjJHaXNX8Pe9bpgVxLNxhRvcf8E5w==",
- "_location": "/babel-eslint/@babel/helper-function-name",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "@babel/helper-function-name@7.0.0-beta.36",
- "name": "@babel/helper-function-name",
- "escapedName": "@babel%2fhelper-function-name",
- "scope": "@babel",
- "rawSpec": "7.0.0-beta.36",
- "saveSpec": null,
- "fetchSpec": "7.0.0-beta.36"
- },
- "_requiredBy": [
- "/babel-eslint/@babel/traverse"
- ],
- "_resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.36.tgz",
- "_shasum": "366e3bc35147721b69009f803907c4d53212e88d",
- "_spec": "@babel/helper-function-name@7.0.0-beta.36",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/@babel/traverse",
"bundleDependencies": false,
"dependencies": {
- "@babel/helper-get-function-arity": "7.0.0-beta.36",
- "@babel/template": "7.0.0-beta.36",
- "@babel/types": "7.0.0-beta.36"
+ "@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.0.0-beta.36"
-}
+ "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
new file mode 100644
index 0000000000..620366eb90
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/LICENSE
@@ -0,0 +1,22 @@
+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/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/README.md
index d341c9ce35..1de8084fb1 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/README.md
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/README.md
@@ -1,21 +1,19 @@
# @babel/helper-get-function-arity
-Function that returns the number of arguments that a function takes.
-* Examples of what is considered an argument can be found at [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/length)
+> Helper function to get function arity
-## Usage
+See our website [@babel/helper-get-function-arity](https://babeljs.io/docs/en/next/babel-helper-get-function-arity.html) for more information.
-```javascript
-import getFunctionArity from "@babel/helper-get-function-arity";
+## Install
-function wrap(state, method, id, scope) {
- // ...
- if (!t.isFunction(method)) {
- return false;
- }
+Using npm:
- const argumentsLength = getFunctionArity(method);
+```sh
+npm install --save-dev @babel/helper-get-function-arity
+```
+
+or using yarn:
- // ...
-}
+```sh
+yarn add @babel/helper-get-function-arity --dev
```
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
index a04262cff4..5723401db7 100644
--- 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
@@ -1,19 +1,29 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = _default;
-var t = _interopRequireWildcard(require("@babel/types"));
+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) {
- var params = node.params;
+ const params = node.params;
- for (var i = 0; i < params.length; i++) {
- var param = params[i];
+ for (let i = 0; i < params.length; i++) {
+ const param = params[i];
- if (t.isAssignmentPattern(param) || t.isRestElement(param)) {
+ if (t().isAssignmentPattern(param) || t().isRestElement(param)) {
return i;
}
}
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
index a9b83dbcb5..49d2e854da 100644
--- 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
@@ -1,31 +1,7 @@
{
- "_from": "@babel/helper-get-function-arity@7.0.0-beta.36",
- "_id": "@babel/helper-get-function-arity@7.0.0-beta.36",
- "_inBundle": false,
- "_integrity": "sha512-vPPcx2vsSoDbcyWr9S3nd0FM3B4hEXnt0p1oKpwa08GwK0fSRxa98MyaRGf8suk8frdQlG1P3mDrz5p/Rr3pbA==",
- "_location": "/babel-eslint/@babel/helper-get-function-arity",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "@babel/helper-get-function-arity@7.0.0-beta.36",
- "name": "@babel/helper-get-function-arity",
- "escapedName": "@babel%2fhelper-get-function-arity",
- "scope": "@babel",
- "rawSpec": "7.0.0-beta.36",
- "saveSpec": null,
- "fetchSpec": "7.0.0-beta.36"
- },
- "_requiredBy": [
- "/babel-eslint/@babel/helper-function-name"
- ],
- "_resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.36.tgz",
- "_shasum": "f5383bac9a96b274828b10d98900e84ee43e32b8",
- "_spec": "@babel/helper-get-function-arity@7.0.0-beta.36",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/@babel/helper-function-name",
"bundleDependencies": false,
"dependencies": {
- "@babel/types": "7.0.0-beta.36"
+ "@babel/types": "^7.0.0"
},
"deprecated": false,
"description": "Helper function to get function arity",
@@ -36,5 +12,5 @@
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-helper-get-function-arity"
},
- "version": "7.0.0-beta.36"
-}
+ "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/LICENSE b/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/LICENSE
new file mode 100644
index 0000000000..620366eb90
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/LICENSE
@@ -0,0 +1,22 @@
+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-split-export-declaration/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/README.md
new file mode 100644
index 0000000000..d241fee0f6
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-split-export-declaration
+
+>
+
+See our website [@babel/helper-split-export-declaration](https://babeljs.io/docs/en/next/babel-helper-split-export-declaration.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/helper-split-export-declaration
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-split-export-declaration --dev
+```
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
new file mode 100644
index 0000000000..a04a7e4b92
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/lib/index.js
@@ -0,0 +1,68 @@
+"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.registerBinding(isClassDeclaration ? "let" : "var", 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
new file mode 100644
index 0000000000..a55949061a
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/package.json
@@ -0,0 +1,16 @@
+{
+ "bundleDependencies": false,
+ "dependencies": {
+ "@babel/types": "^7.0.0"
+ },
+ "deprecated": false,
+ "description": ">",
+ "license": "MIT",
+ "main": "lib/index.js",
+ "name": "@babel/helper-split-export-declaration",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-split-export-declaration"
+ },
+ "version": "7.0.0"
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/highlight/LICENSE b/tools/node_modules/babel-eslint/node_modules/@babel/highlight/LICENSE
new file mode 100644
index 0000000000..620366eb90
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/highlight/LICENSE
@@ -0,0 +1,22 @@
+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/highlight/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/highlight/README.md
new file mode 100644
index 0000000000..72dae60945
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/highlight/README.md
@@ -0,0 +1,19 @@
+# @babel/highlight
+
+> Syntax highlight JavaScript strings for output in terminals.
+
+See our website [@babel/highlight](https://babeljs.io/docs/en/next/babel-highlight.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/highlight
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/highlight --dev
+```
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
new file mode 100644
index 0000000000..6ac5b4a350
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/highlight/lib/index.js
@@ -0,0 +1,129 @@
+"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
new file mode 100644
index 0000000000..ff84c66ec2
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/highlight/package.json
@@ -0,0 +1,26 @@
+{
+ "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"
+ },
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "main": "lib/index.js",
+ "name": "@babel/highlight",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel/tree/master/packages/babel-highlight"
+ },
+ "version": "7.0.0"
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/parser/CHANGELOG.md b/tools/node_modules/babel-eslint/node_modules/@babel/parser/CHANGELOG.md
new file mode 100644
index 0000000000..cc96c3f7d1
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/parser/CHANGELOG.md
@@ -0,0 +1,1073 @@
+# Changelog
+
+> **Tags:**
+> - :boom: [Breaking Change]
+> - :eyeglasses: [Spec Compliancy]
+> - :rocket: [New Feature]
+> - :bug: [Bug Fix]
+> - :memo: [Documentation]
+> - :house: [Internal]
+> - :nail_care: [Polish]
+
+> Semver Policy: https://github.com/babel/babel/tree/master/packages/babel-parser#semver
+
+_Note: Gaps between patch versions are faulty, broken or test releases._
+
+See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) for the pre-6.8.0 version Changelog.
+
+## 6.17.1 (2017-05-10)
+
+### :bug: Bug Fix
+ * Fix typo in flow spread operator error (Brian Ng)
+ * Fixed invalid number literal parsing ([#473](https://github.com/babel/babylon/pull/473)) (Alex Kuzmenko)
+ * Fix number parser ([#433](https://github.com/babel/babylon/pull/433)) (Alex Kuzmenko)
+ * Ensure non pattern shorthand props are checked for reserved words ([#479](https://github.com/babel/babylon/pull/479)) (Brian Ng)
+ * Remove jsx context when parsing arrow functions ([#475](https://github.com/babel/babylon/pull/475)) (Brian Ng)
+ * Allow super in class properties ([#499](https://github.com/babel/babylon/pull/499)) (Brian Ng)
+ * Allow flow class field to be named constructor ([#510](https://github.com/babel/babylon/pull/510)) (Brian Ng)
+
+## 6.17.0 (2017-04-20)
+
+### :bug: Bug Fix
+ * Cherry-pick #418 to 6.x ([#476](https://github.com/babel/babylon/pull/476)) (Sebastian McKenzie)
+ * Add support for invalid escapes in tagged templates ([#274](https://github.com/babel/babylon/pull/274)) (Kevin Gibbons)
+ * Throw error if new.target is used outside of a function ([#402](https://github.com/babel/babylon/pull/402)) (Brian Ng)
+ * Fix parsing of class properties ([#351](https://github.com/babel/babylon/pull/351)) (Kevin Gibbons)
+ * Fix parsing yield with dynamicImport ([#383](https://github.com/babel/babylon/pull/383)) (Brian Ng)
+ * Ensure consistent start args for parseParenItem ([#386](https://github.com/babel/babylon/pull/386)) (Brian Ng)
+
+## 7.0.0-beta.8 (2017-04-04)
+
+### New Feature
+* Add support for flow type spread (#418) (Conrad Buck)
+* Allow statics in flow interfaces (#427) (Brian Ng)
+
+### Bug Fix
+* Fix predicate attachment to match flow parser (#428) (Brian Ng)
+* Add extra.raw back to JSXText and JSXAttribute (#344) (Alex Rattray)
+* Fix rest parameters with array and objects (#424) (Brian Ng)
+* Fix number parser (#433) (Alex Kuzmenko)
+
+### Docs
+* Fix CONTRIBUTING.md [skip ci] (#432) (Alex Kuzmenko)
+
+### Internal
+* Use babel-register script when running babel smoke tests (#442) (Brian Ng)
+
+## 7.0.0-beta.7 (2017-03-22)
+
+### Spec Compliancy
+* Remove babylon plugin for template revision since it's stage-4 (#426) (Henry Zhu)
+
+### Bug Fix
+
+* Fix push-pop logic in flow (#405) (Daniel Tschinder)
+
+## 7.0.0-beta.6 (2017-03-21)
+
+### New Feature
+* Add support for invalid escapes in tagged templates (#274) (Kevin Gibbons)
+
+### Polish
+* Improves error message when super is called outside of constructor (#408) (Arshabh Kumar Agarwal)
+
+### Docs
+
+* [7.0] Moved value field in spec from ObjectMember to ObjectProperty as ObjectMethod's don't have it (#415) [skip ci] (James Browning)
+
+## 7.0.0-beta.5 (2017-03-21)
+
+### Bug Fix
+* Throw error if new.target is used outside of a function (#402) (Brian Ng)
+* Fix parsing of class properties (#351) (Kevin Gibbons)
+
+### Other
+ * Test runner: Detect extra property in 'actual' but not in 'expected'. (#407) (Andy)
+ * Optimize travis builds (#419) (Daniel Tschinder)
+ * Update codecov to 2.0 (#412) (Daniel Tschinder)
+ * Fix spec for ClassMethod: It doesn't have a function, it *is* a function. (#406) [skip ci] (Andy)
+ * Changed Non-existent RestPattern to RestElement which is what is actually parsed (#409) [skip ci] (James Browning)
+ * Upgrade flow to 0.41 (Daniel Tschinder)
+ * Fix watch command (#403) (Brian Ng)
+ * Update yarn lock (Daniel Tschinder)
+ * Fix watch command (#403) (Brian Ng)
+ * chore(package): update flow-bin to version 0.41.0 (#395) (greenkeeper[bot])
+ * Add estree test for correct order of directives (Daniel Tschinder)
+ * Add DoExpression to spec (#364) (Alex Kuzmenko)
+ * Mention cloning of repository in CONTRIBUTING.md (#391) [skip ci] (Sumedh Nimkarde)
+ * Explain how to run only one test (#389) [skip ci] (Aaron Ang)
+
+ ## 7.0.0-beta.4 (2017-03-01)
+
+* Don't consume async when checking for async func decl (#377) (Brian Ng)
+* add `ranges` option [skip ci] (Henry Zhu)
+* Don't parse class properties without initializers when classProperties is disabled and Flow is enabled (#300) (Andrew Levine)
+
+## 7.0.0-beta.3 (2017-02-28)
+
+- [7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement (#384)
+- Merge changes from 6.x
+
+## 7.0.0-beta.2 (2017-02-20)
+
+- estree: correctly change literals in all cases (#368) (Daniel Tschinder)
+
+## 7.0.0-beta.1 (2017-02-20)
+
+- Fix negative number literal typeannotations (#366) (Daniel Tschinder)
+- Update contributing with more test info [skip ci] (#355) (Brian Ng)
+
+## 7.0.0-beta.0 (2017-02-15)
+
+- Reintroduce Variance node (#333) (Daniel Tschinder)
+- Rename NumericLiteralTypeAnnotation to NumberLiteralTypeAnnotation (#332) (Charles Pick)
+- [7.0] Remove ForAwaitStatement, add await flag to ForOfStatement (#349) (Brandon Dail)
+- chore(package): update ava to version 0.18.0 (#345) (greenkeeper[bot])
+- chore(package): update babel-plugin-istanbul to version 4.0.0 (#350) (greenkeeper[bot])
+- Change location of ObjectTypeIndexer to match flow (#228) (Daniel Tschinder)
+- Rename flow AST Type ExistentialTypeParam to ExistsTypeAnnotation (#322) (Toru Kobayashi)
+- Revert "Temporary rollback for erroring on trailing comma with spread (#154)" (#290) (Daniel Tschinder)
+- Remove classConstructorCall plugin (#291) (Brian Ng)
+- Update yarn.lock (Daniel Tschinder)
+- Update cross-env to 3.x (Daniel Tschinder)
+- [7.0] Remove node 0.10, 0.12 and 5 from Travis (#284) (Sergey Rubanov)
+- Remove `String.fromCodePoint` shim (#279) (Mathias Bynens)
+
+## 6.16.1 (2017-02-23)
+
+### :bug: Regression
+
+- Revert "Fix export default async function to be FunctionDeclaration" ([#375](https://github.com/babel/babylon/pull/375))
+
+Need to modify Babel for this AST node change, so moving to 7.0.
+
+- Revert "Don't parse class properties without initializers when classProperties plugin is disabled, and Flow is enabled" ([#376](https://github.com/babel/babylon/pull/376))
+
+[react-native](https://github.com/facebook/react-native/issues/12542) broke with this so we reverted.
+
+## 6.16.0 (2017-02-23)
+
+### :rocket: New Feature
+
+***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder)
+
+We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/)
+
+We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc.
+
+To enable `estree` mode simply add the plugin in the config:
+```json
+{
+ "plugins": [ "estree" ]
+}
+```
+
+If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned.
+
+Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew)
+
+Babylon exports a new function to parse a single expression
+
+```js
+import { parseExpression } from 'babylon';
+
+const ast = parseExpression('x || y && z', options);
+```
+
+The returned AST will only consist of the expression. The options are the same as for `parse()`
+
+Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu)
+
+A new option was added to babylon allowing to change the intial linenumber for the first line which is usually `1`.
+Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ...
+
+Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris)
+
+Added support for function predicates which flow introduced in version 0.33.0
+
+```js
+declare function is_number(x: mixed): boolean %checks(typeof x === "number");
+```
+
+Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder)
+
+Added support for imports within module declarations which flow introduced in version 0.37.0
+
+```js
+declare module "C" {
+ import type { DT } from "D";
+ declare export type CT = { D: DT };
+}
+```
+
+### :eyeglasses: Spec Compliancy
+
+Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons)
+
+This example now correctly throws an error when there is a semicolon after the decorator:
+
+```js
+class A {
+@a;
+foo(){}
+}
+```
+
+Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder)
+
+Using keywords in imports is not allowed anymore:
+
+```js
+import { default } from "foo";
+import { a as debugger } from "foo";
+```
+
+Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder)
+
+In flow it is now forbidden to overwrite the primitve types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration.
+
+Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder)
+
+The following code now correctly throws an error
+
+```js
+import type { type a } from "foo";
+```
+
+Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine)
+
+Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour.
+
+If you enable the flow plugin you can only define the type of the class properties, but not initialize them.
+
+Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder)
+
+Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`.
+
+```js
+export default async function bar() {};
+```
+
+### :nail_care: Polish
+
+Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng)
+
+### :bug: Bug Fix
+
+Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder)
+
+Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng)
+
+ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder)
+
+Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder)
+
+Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder)
+
+Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder)
+
+Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng)
+
+Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper)
+
+
+### :house: Internal
+
+Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray)
+
+Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray)
+
+Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder)
+
+chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot])
+
+Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder)
+
+Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot])
+
+Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot])
+
+devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo)
+
+Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder)
+
+Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder)
+
+### :memo: Documentation
+
+Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng)
+
+Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu)
+
+Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro)
+
+AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens)
+
+## 6.15.0 (2017-01-10)
+
+### :eyeglasses: Spec Compliancy
+
+Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison)
+
+This change implements flows new shorthand import syntax
+and where previously you had to write this code:
+
+```js
+import {someValue} from "blah";
+import type {someType} from "blah";
+import typeof {someOtherValue} from "blah";
+```
+
+you can now write it like this:
+
+```js
+import {
+ someValue,
+ type someType,
+ typeof someOtherValue,
+} from "blah";
+```
+
+For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request.
+
+flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin)
+
+This change now allows a leading pipe everywhere types can be used:
+```js
+var f = (x): | 1 | 2 => 1;
+```
+
+Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo)
+
+Previously babylon parsed the following exports, although they are not valid:
+```js
+export typeof foo;
+export new Foo();
+export function() {};
+export for (;;);
+export while(foo);
+```
+
+### :bug: Bug Fix
+
+Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin)
+
+This fixes parsing of this case:
+
+```js
+const map = {
+ [age <= 17] : 'Too young'
+};
+```
+
+Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long)
+
+The following case produced an invalid AST
+```js
+<div>{/* foo */}</div>
+```
+
+Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy)
+
+When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST.
+
+Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant)
+
+Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray)
+
+### :house: Internal
+
+User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder)
+
+Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo)
+
+Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine)
+
+Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder)
+
+Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine)
+
+Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU)
+
+Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot])
+
+chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot])
+
+chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot])
+
+## 6.14.1 (2016-11-17)
+
+### :bug: Bug Fix
+
+Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder)
+
+```js
+{
+ "plugins": ["*"]
+}
+```
+
+Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer.
+
+## 6.14.0 (2016-11-16)
+
+### :eyeglasses: Spec Compliancy
+
+Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo)
+
+[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words)
+
+Babylon will throw for more reserved words such as `enum` or `await` (in strict mode).
+
+```
+class enum {} // throws
+class await {} // throws in strict mode (module)
+```
+
+Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi)
+
+So where you used to have to write
+
+```js
+type A = (x: string, y: boolean) => number;
+type B = (z: string) => number;
+type C = { [key: string]: number };
+```
+
+you can now write (with flow 0.34.0)
+
+```js
+type A = (string, boolean) => number;
+type B = string => number;
+type C = { [string]: number };
+```
+
+Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner)
+
+Supports these form now of specifying array types:
+
+```js
+var a: number[][][][];
+var b: string[][];
+```
+
+### :bug: Bug Fix
+
+Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223)) (Daniel Tschinder)
+
+```
+declare module "foo" { declare module.exports: number }
+declare module "foo" { declare module.exports: number; } // also allowed now
+```
+
+### :house: Internal
+
+ * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman)
+ * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger)
+ * Add node 7 (Daniel Tschinder)
+ * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper)
+
+## v6.13.1 (2016-10-26)
+
+### :nail_care: Polish
+
+- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML))
+
+```js
+const babylon = require('babylon');
+const ast = babylon.parse('var foo = "lol";');
+```
+
+With that test case, there was a ~95ms savings by removing the need for node to build/traverse the dependency graph.
+
+**Without bundling**
+![image](https://cloud.githubusercontent.com/assets/5233399/19420264/3133497e-93ad-11e6-9a6a-2da59c4f5c13.png)
+
+**With bundling**
+![image](https://cloud.githubusercontent.com/assets/5233399/19420267/388f556e-93ad-11e6-813e-7c5c396be322.png)
+
+- add clean command [skip ci] ([#201](https://github.com/babel/babylon/pull/201)) (Henry Zhu)
+- add ForAwaitStatement (async generator already added) [skip ci] ([#196](https://github.com/babel/babylon/pull/196)) (Henry Zhu)
+
+## v6.13.0 (2016-10-21)
+
+### :eyeglasses: Spec Compliancy
+
+Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman)
+
+> See https://flowtype.org/docs/variance.html for more information
+
+```js
+type T = { +p: T };
+interface T { -p: T };
+declare class T { +[k:K]: V };
+class T { -[k:K]: V };
+class C2 { +p: T = e };
+```
+
+Raise error on duplicate definition of __proto__ ([#183](https://github.com/babel/babylon/pull/183)) (Moti Zilberman)
+
+```js
+({ __proto__: 1, __proto__: 2 }) // Throws an error now
+```
+
+### :bug: Bug Fix
+
+Flow: Allow class properties to be named `static` ([#184](https://github.com/babel/babylon/pull/184)) (Moti Zilberman)
+
+```js
+declare class A {
+ static: T;
+}
+```
+
+Allow "async" as identifier for object literal property shorthand ([#187](https://github.com/babel/babylon/pull/187)) (Andrew Levine)
+
+```js
+var foo = { async, bar };
+```
+
+### :nail_care: Polish
+
+Fix flowtype and add inType to state ([#189](https://github.com/babel/babylon/pull/189)) (Daniel Tschinder)
+
+> This improves the performance slightly (because of hidden classes)
+
+### :house: Internal
+
+Fix .gitattributes line ending setting ([#191](https://github.com/babel/babylon/pull/191)) (Moti Zilberman)
+
+Increase test coverage ([#175](https://github.com/babel/babylon/pull/175) (Moti Zilberman)
+
+Readd missin .eslinignore for IDEs (Daniel Tschinder)
+
+Error on missing expected.json fixture in CI ([#188](https://github.com/babel/babylon/pull/188)) (Moti Zilberman)
+
+Add .gitattributes and .editorconfig for LF line endings ([#179](https://github.com/babel/babylon/pull/179)) (Moti Zilberman)
+
+Fixes two tests that are failing after the merge of #172 ([#177](https://github.com/babel/babylon/pull/177)) (Moti Zilberman)
+
+## v6.12.0 (2016-10-14)
+
+### :eyeglasses: Spec Compliancy
+
+Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler)
+
+#### Dynamic Import
+
+- Proposal Repo: https://github.com/domenic/proposal-dynamic-import
+- Championed by [@domenic](https://github.com/domenic)
+- stage-2
+- [sept-28 tc39 notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#113a-import)
+
+> This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript
+
+```js
+import(`./section-modules/${link.dataset.entryModule}.js`)
+.then(module => {
+ module.loadPageInto(main);
+})
+```
+
+Add EmptyTypeAnnotation ([#171](https://github.com/babel/babylon/pull/171)) (Sam Goldman)
+
+#### EmptyTypeAnnotation
+
+Just wasn't covered before.
+
+```js
+type T = empty;
+```
+
+### :bug: Bug Fix
+
+Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels)
+
+```js
+// was failing due to sparse array
+export const { foo: [ ,, qux7 ] } = bar;
+```
+
+Allow keyword in Flow object declaration property names with type parameters ([#146](https://github.com/babel/babylon/pull/146)) (Dan Harper)
+
+```js
+declare class X {
+ foobar<T>(): void;
+ static foobar<T>(): void;
+}
+```
+
+Allow keyword in object/class property names with Flow type parameters ([#145](https://github.com/babel/babylon/pull/145)) (Dan Harper)
+
+```js
+class Foo {
+ delete<T>(item: T): T {
+ return item;
+ }
+}
+```
+
+Allow typeAnnotations for yield expressions ([#174](https://github.com/babel/babylon/pull/174))) (Daniel Tschinder)
+
+```js
+function *foo() {
+ const x = (yield 5: any);
+}
+```
+
+### :nail_care: Polish
+
+Annotate more errors with expected token ([#172](https://github.com/babel/babylon/pull/172))) (Moti Zilberman)
+
+```js
+// Unexpected token, expected ; (1:6)
+{ set 1 }
+```
+
+### :house: Internal
+
+Remove kcheck ([#173](https://github.com/babel/babylon/pull/173))) (Daniel Tschinder)
+
+Also run flow, linting, babel tests on seperate instances (add back node 0.10)
+
+## v6.11.6 (2016-10-12)
+
+### :bug: Bug Fix/Regression
+
+Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels)
+
+```js
+// was failing with `Cannot read property 'type' of null` because of null identifiers
+export const { foo: [ ,, qux7 ] } = bar;
+```
+
+## v6.11.5 (2016-10-12)
+
+### :eyeglasses: Spec Compliancy
+
+Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo)
+
+```js
+// `foo` has already been exported. Exported identifiers must be unique. (2:20)
+export function foo() {};
+export const { a: [{foo}] } = bar;
+```
+
+Fix: Check for duplicate named exports in exported rest elements/properties ([#164](https://github.com/babel/babylon/pull/164)) (Kai Cataldo)
+
+```js
+// `foo` has already been exported. Exported identifiers must be unique. (2:22)
+export const foo = 1;
+export const [bar, ...foo] = baz;
+```
+
+### :bug: Bug Fix
+
+Fix: Allow identifier `async` for default param in arrow expression ([#165](https://github.com/babel/babylon/pull/165)) (Kai Cataldo)
+
+```js
+// this is ok now
+const test = ({async = true}) => {};
+```
+
+### :nail_care: Polish
+
+Babylon will now print out the token it's expecting if there's a `SyntaxError` ([#150](https://github.com/babel/babylon/pull/150)) (Daniel Tschinder)
+
+```bash
+# So in the case of a missing ending curly (`}`)
+Module build failed: SyntaxError: Unexpected token, expected } (30:0)
+ 28 | }
+ 29 |
+> 30 |
+ | ^
+```
+
+## v6.11.4 (2016-10-03)
+
+Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu)
+
+## v6.11.3 (2016-10-01)
+
+### :eyeglasses: Spec Compliancy
+
+Add static errors for object rest (#149) ([@danez](https://github.com/danez))
+
+> https://github.com/sebmarkbage/ecmascript-rest-spread
+
+Object rest copies the *rest* of properties from the right hand side `obj` starting from the left to right.
+
+```js
+let { x, y, ...z } = { x: 1, y: 2, z: 3 };
+// x = 1
+// y = 2
+// z = { z: 3 }
+```
+
+#### New Syntax Errors:
+
+**SyntaxError**: The rest element has to be the last element when destructuring (1:10)
+```bash
+> 1 | let { ...x, y, z } = { x: 1, y: 2, z: 3};
+ | ^
+# Previous behavior:
+# x = { x: 1, y: 2, z: 3 }
+# y = 2
+# z = 3
+```
+
+Before, this was just a more verbose way of shallow copying `obj` since it doesn't actually do what you think.
+
+**SyntaxError**: Cannot have multiple rest elements when destructuring (1:13)
+
+```bash
+> 1 | let { x, ...y, ...z } = { x: 1, y: 2, z: 3};
+ | ^
+# Previous behavior:
+# x = 1
+# y = { y: 2, z: 3 }
+# z = { y: 2, z: 3 }
+```
+
+Before y and z would just be the same value anyway so there is no reason to need to have both.
+
+**SyntaxError**: A trailing comma is not permitted after the rest element (1:16)
+
+```js
+let { x, y, ...z, } = obj;
+```
+
+The rationale for this is that the use case for trailing comma is that you can add something at the end without affecting the line above. Since a RestProperty always has to be the last property it doesn't make sense.
+
+---
+
+get / set are valid property names in default assignment (#142) ([@jezell](https://github.com/jezell))
+
+```js
+// valid
+function something({ set = null, get = null }) {}
+```
+
+## v6.11.2 (2016-09-23)
+
+### Bug Fix
+
+- [#139](https://github.com/babel/babylon/issues/139) Don't do the duplicate check if not an identifier (#140) @hzoo
+
+```js
+// regression with duplicate export check
+SyntaxError: ./typography.js: `undefined` has already been exported. Exported identifiers must be unique. (22:13)
+ 20 |
+ 21 | export const { rhythm } = typography;
+> 22 | export const { TypographyStyle } = typography
+```
+
+Bail out for now, and make a change to account for destructuring in the next release.
+
+## 6.11.1 (2016-09-22)
+
+### Bug Fix
+- [#137](https://github.com/babel/babylon/pull/137) - Fix a regression with duplicate exports - it was erroring on all keys in `Object.prototype`. @danez
+
+```javascript
+export toString from './toString';
+```
+
+```bash
+`toString` has already been exported. Exported identifiers must be unique. (1:7)
+> 1 | export toString from './toString';
+ | ^
+ 2 |
+```
+
+## 6.11.0 (2016-09-22)
+
+### Spec Compliancy (will break CI)
+
+- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo
+
+```js
+// Only one default export allowed per module. (2:9)
+export default function() {};
+export { foo as default };
+
+// Only one default export allowed per module. (2:0)
+export default {};
+export default function() {};
+
+// `Foo` has already been exported. Exported identifiers must be unique. (2:0)
+export { Foo };
+export class Foo {};
+```
+
+### New Feature (Syntax)
+
+- Add support for computed class property names ([#121](https://github.com/babel/babylon/pull/121)) @motiz88
+
+```js
+// AST
+interface ClassProperty <: Node {
+ type: "ClassProperty";
+ key: Identifier;
+ value: Expression;
+ computed: boolean; // added
+}
+```
+
+```js
+// with "plugins": ["classProperties"]
+class Foo {
+ [x]
+ ['y']
+}
+
+class Bar {
+ [p]
+ [m] () {}
+}
+ ```
+
+### Bug Fix
+
+- Fix `static` property falling through in the declare class Flow AST ([#135](https://github.com/babel/babylon/pull/135)) @danharper
+
+```js
+declare class X {
+ a: number;
+ static b: number; // static
+ c: number; // this was being marked as static in the AST as well
+}
+```
+
+### Polish
+
+- Rephrase "assigning/binding to rvalue" errors to include context ([#119](https://github.com/babel/babylon/pull/119)) @motiz88
+
+```js
+// Used to error with:
+// SyntaxError: Assigning to rvalue (1:0)
+
+// Now:
+// Invalid left-hand side in assignment expression (1:0)
+3 = 4
+
+// Invalid left-hand side in for-in statement (1:5)
+for (+i in {});
+```
+
+### Internal
+
+- Fix call to `this.parseMaybeAssign` with correct arguments ([#133](https://github.com/babel/babylon/pull/133)) @danez
+- Add semver note to changelog ([#131](https://github.com/babel/babylon/pull/131)) @hzoo
+
+## 6.10.0 (2016-09-19)
+
+> We plan to include some spec compliancy bugs in patch versions. An example was the multiple default exports issue.
+
+### Spec Compliancy
+
+* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu)
+
+> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors
+
+More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists)
+
+For example:
+
+```js
+// this errors because it uses destructuring and default parameters
+// in a function with a "use strict" directive
+function a([ option1, option2 ] = []) {
+ "use strict";
+}
+ ```
+
+The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to.
+
+### New Feature
+
+* Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer)
+
+Added to flow in https://github.com/facebook/flow/commit/c710c40aa2a115435098d6c0dfeaadb023cd39b8
+
+Looks like:
+
+```js
+var a : {| x: number, y: string |} = { x: 0, y: 'foo' };
+```
+
+### Bug Fixes
+
+* Include `typeParameter` location in `ArrowFunctionExpression` ([#126](https://github.com/babel/babylon/pull/126)) (Daniel Tschinder)
+* Error on invalid flow type annotation with default assignment ([#122](https://github.com/babel/babylon/pull/122)) (Dan Harper)
+* Fix Flow return types on arrow functions ([#124](https://github.com/babel/babylon/pull/124)) (Dan Harper)
+
+### Misc
+
+* Add tests for export extensions ([#127](https://github.com/babel/babylon/pull/127)) (Daniel Tschinder)
+* Fix Contributing guidelines [skip ci] (Daniel Tschinder)
+
+## 6.9.2 (2016-09-09)
+
+The only change is to remove the `babel-runtime` dependency by compiling with Babel's ES2015 loose mode. So using babylon standalone should be smaller.
+
+## 6.9.1 (2016-08-23)
+
+This release contains mainly small bugfixes but also updates babylons default mode to es2017. The features for `exponentiationOperator`, `asyncFunctions` and `trailingFunctionCommas` which previously needed to be activated via plugin are now enabled by default and the plugins are now no-ops.
+
+### Bug Fixes
+
+- Fix issues with default object params in async functions ([#96](https://github.com/babel/babylon/pull/96)) @danez
+- Fix issues with flow-types and async function ([#95](https://github.com/babel/babylon/pull/95)) @danez
+- Fix arrow functions with destructuring, types & default value ([#94](https://github.com/babel/babylon/pull/94)) @danharper
+- Fix declare class with qualified type identifier ([#97](https://github.com/babel/babylon/pull/97)) @danez
+- Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas plugins and enable them by default ([#98](https://github.com/babel/babylon/pull/98)) @danez
+
+## 6.9.0 (2016-08-16)
+
+### New syntax support
+
+- Add JSX spread children ([#42](https://github.com/babel/babylon/pull/42)) @calebmer
+
+(Be aware that React is not going to support this syntax)
+
+```js
+<div>
+ {...todos.map(todo => <Todo key={todo.id} todo={todo}/>)}
+</div>
+```
+
+- Add support for declare module.exports ([#72](https://github.com/babel/babylon/pull/72)) @danez
+
+```js
+declare module "foo" {
+ declare module.exports: {}
+}
+```
+
+### New Features
+
+- If supplied, attach filename property to comment node loc. ([#80](https://github.com/babel/babylon/pull/80)) @divmain
+- Add identifier name to node loc field ([#90](https://github.com/babel/babylon/pull/90)) @kittens
+
+### Bug Fixes
+
+- Fix exponential operator to behave according to spec ([#75](https://github.com/babel/babylon/pull/75)) @danez
+- Fix lookahead to not add comments to arrays which are not cloned ([#76](https://github.com/babel/babylon/pull/76)) @danez
+- Fix accidental fall-through in Flow type parsing. ([#82](https://github.com/babel/babylon/pull/82)) @xiemaisi
+- Only allow declares inside declare module ([#73](https://github.com/babel/babylon/pull/73)) @danez
+- Small fix for parsing type parameter declarations ([#83](https://github.com/babel/babylon/pull/83)) @gabelevi
+- Fix arrow param locations with flow types ([#57](https://github.com/babel/babylon/pull/57)) @danez
+- Fixes SyntaxError position with flow optional type ([#65](https://github.com/babel/babylon/pull/65)) @danez
+
+### Internal
+
+- Add codecoverage to tests @danez
+- Fix tests to not save expected output if we expect the test to fail @danez
+- Make a shallow clone of babel for testing @danez
+- chore(package): update cross-env to version 2.0.0 ([#77](https://github.com/babel/babylon/pull/77)) @greenkeeperio-bot
+- chore(package): update ava to version 0.16.0 ([#86](https://github.com/babel/babylon/pull/86)) @greenkeeperio-bot
+- chore(package): update babel-plugin-istanbul to version 2.0.0 ([#89](https://github.com/babel/babylon/pull/89)) @greenkeeperio-bot
+- chore(package): update nyc to version 8.0.0 ([#88](https://github.com/babel/babylon/pull/88)) @greenkeeperio-bot
+
+## 6.8.4 (2016-07-06)
+
+### Bug Fixes
+
+- Fix the location of params, when flow and default value used ([#68](https://github.com/babel/babylon/pull/68)) @danez
+
+## 6.8.3 (2016-07-02)
+
+### Bug Fixes
+
+- Fix performance regression introduced in 6.8.2 with conditionals ([#63](https://github.com/babel/babylon/pull/63)) @danez
+
+## 6.8.2 (2016-06-24)
+
+### Bug Fixes
+
+- Fix parse error with yielding jsx elements in generators `function* it() { yield <a></a>; }` ([#31](https://github.com/babel/babylon/pull/31)) @eldereal
+- When cloning nodes do not clone its comments ([#24](https://github.com/babel/babylon/pull/24)) @danez
+- Fix parse errors when using arrow functions with an spread element and return type `(...props): void => {}` ([#10](https://github.com/babel/babylon/pull/10)) @danez
+- Fix leading comments added from previous node ([#23](https://github.com/babel/babylon/pull/23)) @danez
+- Fix parse errors with flow's optional arguments `(arg?) => {}` ([#19](https://github.com/babel/babylon/pull/19)) @danez
+- Support negative numeric type literals @kittens
+- Remove line terminator restriction after await keyword @kittens
+- Remove grouped type arrow restriction as it seems flow no longer has it @kittens
+- Fix parse error with generic methods that have the name `get` or `set` `class foo { get() {} }` ([#55](https://github.com/babel/babylon/pull/55)) @vkurchatkin
+- Fix parse error with arrow functions that have flow type parameter declarations `<T>(x: T): T => x;` ([#54](https://github.com/babel/babylon/pull/54)) @gabelevi
+
+### Documentation
+
+- Document AST differences from ESTree ([#41](https://github.com/babel/babylon/pull/41)) @nene
+- Move ast spec from babel/babel ([#46](https://github.com/babel/babylon/pull/46)) @hzoo
+
+### Internal
+
+- Enable skipped tests ([#16](https://github.com/babel/babylon/pull/16)) @danez
+- Add script to test latest version of babylon with babel ([#21](https://github.com/babel/babylon/pull/21)) @danez
+- Upgrade test runner ava @kittens
+- Add missing generate-identifier-regex script @kittens
+- Rename parser context types @kittens
+- Add node v6 to travis testing @hzoo
+- Update to Unicode v9 ([#45](https://github.com/babel/babylon/pull/45)) @mathiasbynens
+
+## 6.8.1 (2016-06-06)
+
+### New Feature
+
+- Parse type parameter declarations with defaults like `type Foo<T = string> = T`
+
+### Bug Fixes
+- Type parameter declarations need 1 or more type parameters.
+- The existential type `*` is not a valid type parameter.
+- The existential type `*` is a primary type
+
+### Spec Compliancy
+- The param list for type parameter declarations now consists of `TypeParameter` nodes
+- New `TypeParameter` AST Node (replaces using the `Identifier` node before)
+
+```
+interface TypeParameter <: Node {
+ bound: TypeAnnotation;
+ default: TypeAnnotation;
+ name: string;
+ variance: "plus" | "minus";
+}
+```
+
+## 6.8.0 (2016-05-02)
+
+#### New Feature
+
+##### Parse Method Parameter Decorators ([#12](https://github.com/babel/babylon/pull/12))
+
+> [Method Parameter Decorators](https://goo.gl/8MmCMG) is now a TC39 [stage 0 proposal](https://github.com/tc39/ecma262/blob/master/stage0.md).
+
+Examples:
+
+```js
+class Foo {
+ constructor(@foo() x, @bar({ a: 123 }) @baz() y) {}
+}
+
+export default function func(@foo() x, @bar({ a: 123 }) @baz() y) {}
+
+var obj = {
+ method(@foo() x, @bar({ a: 123 }) @baz() y) {}
+};
+```
+
+##### Parse for-await statements (w/ `asyncGenerators` plugin) ([#17](https://github.com/babel/babylon/pull/17))
+
+There is also a new node type, `ForAwaitStatement`.
+
+> [Async generators and for-await](https://github.com/tc39/proposal-async-iteration) are now a [stage 2 proposal](https://github.com/tc39/ecma262#current-proposals).
+
+Example:
+
+```js
+async function f() {
+ for await (let x of y);
+}
+```
diff --git a/tools/node_modules/babel-eslint/node_modules/babylon/LICENSE b/tools/node_modules/babel-eslint/node_modules/@babel/parser/LICENSE
index d4c7fc5838..d4c7fc5838 100644
--- a/tools/node_modules/babel-eslint/node_modules/babylon/LICENSE
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/parser/LICENSE
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
new file mode 100644
index 0000000000..65092a0534
--- /dev/null
+++ b/tools/node_modules/babel-eslint/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/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/babylon/bin/babylon.js b/tools/node_modules/babel-eslint/node_modules/@babel/parser/bin/babel-parser.js
index 440eef35ff..58f00b845c 100755
--- a/tools/node_modules/babel-eslint/node_modules/babylon/bin/babylon.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/parser/bin/babel-parser.js
@@ -1,7 +1,7 @@
#!/usr/bin/env node
/* eslint no-var: 0 */
-var babylon = require("..");
+var parser = require("..");
var fs = require("fs");
var filename = process.argv[2];
@@ -11,6 +11,6 @@ if (!filename) {
}
var file = fs.readFileSync(filename, "utf8");
-var ast = babylon.parse(file);
+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
new file mode 100644
index 0000000000..af6952e5d8
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/parser/lib/index.js
@@ -0,0 +1,10706 @@
+'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 === 0 ? 0 : conf.binop || null;
+ this.updateContext = null;
+ }
+
+}
+
+function KeywordTokenType(keyword, options = {}) {
+ return new TokenType(keyword, Object.assign({}, options, {
+ keyword
+ }));
+}
+
+function BinopTokenType(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: BinopTokenType("|>", 0),
+ nullishCoalescing: BinopTokenType("??", 1),
+ logicalOR: BinopTokenType("||", 1),
+ logicalAND: BinopTokenType("&&", 2),
+ bitwiseOR: BinopTokenType("|", 3),
+ bitwiseXOR: BinopTokenType("^", 4),
+ bitwiseAND: BinopTokenType("&", 5),
+ equality: BinopTokenType("==/!=", 6),
+ relational: BinopTokenType("</>", 7),
+ bitShift: BinopTokenType("<</>>", 8),
+ plusMin: new TokenType("+/-", {
+ beforeExpr,
+ binop: 9,
+ prefix,
+ startsExpr
+ }),
+ modulo: BinopTokenType("%", 10),
+ star: BinopTokenType("*", 10),
+ slash: BinopTokenType("/", 10),
+ exponent: new TokenType("**", {
+ beforeExpr,
+ binop: 11,
+ rightAssociative: true
+ })
+};
+
+function makeKeywordProps(name, conf) {
+ return {
+ value: KeywordTokenType(name, conf),
+ enumerable: true
+ };
+}
+
+const keywords = Object.create(null, {
+ break: makeKeywordProps("break"),
+ case: makeKeywordProps("case", {
+ beforeExpr
+ }),
+ catch: makeKeywordProps("catch"),
+ continue: makeKeywordProps("continue"),
+ debugger: makeKeywordProps("debugger"),
+ default: makeKeywordProps("default", {
+ beforeExpr
+ }),
+ do: makeKeywordProps("do", {
+ isLoop,
+ beforeExpr
+ }),
+ else: makeKeywordProps("else", {
+ beforeExpr
+ }),
+ finally: makeKeywordProps("finally"),
+ for: makeKeywordProps("for", {
+ isLoop
+ }),
+ function: makeKeywordProps("function", {
+ startsExpr
+ }),
+ if: makeKeywordProps("if"),
+ return: makeKeywordProps("return", {
+ beforeExpr
+ }),
+ switch: makeKeywordProps("switch"),
+ throw: makeKeywordProps("throw", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ }),
+ try: makeKeywordProps("try"),
+ var: makeKeywordProps("var"),
+ const: makeKeywordProps("const"),
+ while: makeKeywordProps("while", {
+ isLoop
+ }),
+ with: makeKeywordProps("with"),
+ new: makeKeywordProps("new", {
+ beforeExpr,
+ startsExpr
+ }),
+ this: makeKeywordProps("this", {
+ startsExpr
+ }),
+ super: makeKeywordProps("super", {
+ startsExpr
+ }),
+ class: makeKeywordProps("class", {
+ startsExpr
+ }),
+ extends: makeKeywordProps("extends", {
+ beforeExpr
+ }),
+ export: makeKeywordProps("export"),
+ import: makeKeywordProps("import", {
+ startsExpr
+ }),
+ null: makeKeywordProps("null", {
+ startsExpr
+ }),
+ true: makeKeywordProps("true", {
+ startsExpr
+ }),
+ false: makeKeywordProps("false", {
+ startsExpr
+ }),
+ in: makeKeywordProps("in", {
+ beforeExpr,
+ binop: 7
+ }),
+ instanceof: makeKeywordProps("instanceof", {
+ beforeExpr,
+ binop: 7
+ }),
+ typeof: makeKeywordProps("typeof", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ }),
+ void: makeKeywordProps("void", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ }),
+ delete: makeKeywordProps("delete", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ })
+});
+Object.keys(keywords).forEach(name => {
+ types["_" + name] = keywords[name];
+});
+
+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, isBinding, checkClashes, contextDescription) {
+ switch (expr.type) {
+ case "ObjectPattern":
+ expr.properties.forEach(prop => {
+ this.checkLVal(prop.type === "Property" ? prop.value : prop, isBinding, checkClashes, "object destructuring pattern");
+ });
+ break;
+
+ default:
+ super.checkLVal(expr, isBinding, checkClashes, contextDescription);
+ }
+ }
+
+ checkPropClash(prop, propHash) {
+ if (prop.computed || !isSimpleProperty(prop)) 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;
+ }
+ }
+
+ 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) {
+ this.parseMethod(method, isGenerator, isAsync, isConstructor, "MethodDefinition");
+
+ 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) {
+ super.parseFunctionBody(node, allowExpression);
+ node.expression = node.body.type !== "BlockStatement";
+ }
+
+ parseMethod(node, isGenerator, isAsync, isConstructor, type) {
+ let funcNode = this.startNode();
+ funcNode.kind = node.kind;
+ funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, "FunctionExpression");
+ delete funcNode.kind;
+ node.value = funcNode;
+ 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.state.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.state.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);
+}
+const keywords$1 = new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "while", "with", "null", "true", "false", "instanceof", "typeof", "void", "delete", "new", "in", "this", "const", "class", "extends", "export", "import", "super"]);
+function isKeyword(word) {
+ return keywords$1.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\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-\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-\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-\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-\ua7b9\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-\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";
+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-\u0eb9\u0ebb\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\u1cf2-\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, 190, 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, 54, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 26, 230, 43, 117, 63, 32, 0, 257, 0, 11, 39, 8, 0, 22, 0, 12, 39, 3, 3, 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, 68, 12, 0, 67, 12, 65, 1, 31, 6129, 15, 754, 9486, 286, 82, 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, 4149, 196, 60, 67, 1213, 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, 280, 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, 1016, 45, 17, 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, 2214, 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";
+ }
+
+ addComment(comment) {
+ if (this.flowPragma === undefined) {
+ const matches = FLOW_PRAGMA_REGEX.exec(comment.value);
+
+ if (!matches) {
+ this.flowPragma = null;
+ } 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.finishNode(id, id.type);
+ 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.isContextual("module")) {
+ if (this.lookahead().type === types.dot) {
+ return this.flowParseDeclareModuleExports(node);
+ } else {
+ if (insideModule) {
+ this.unexpected(null, "`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.next();
+
+ 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)) {
+ const lookahead = this.lookahead();
+
+ if (lookahead.value !== "type" && lookahead.value !== "typeof") {
+ this.unexpected(null, "Imports within a `declare module` body must always be `import type` or `import typeof`");
+ }
+
+ this.next();
+ 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.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.expectContextual("module");
+ this.expect(types.dot);
+ this.expectContextual("exports");
+ node.typeAnnotation = this.flowParseTypeAnnotation();
+ this.semicolon();
+ return this.finishNode(node, "DeclareModuleExports");
+ }
+
+ flowParseDeclareTypeAlias(node) {
+ this.next();
+ this.flowParseTypeAlias(node);
+ return this.finishNode(node, "DeclareTypeAlias");
+ }
+
+ flowParseDeclareOpaqueType(node) {
+ this.next();
+ this.flowParseOpaqueType(node, true);
+ return this.finishNode(node, "DeclareOpaqueType");
+ }
+
+ 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();
+
+ 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);
+
+ 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(allowDefault = true, requireDefault = false) {
+ if (!allowDefault && requireDefault) {
+ throw new Error("Cannot disallow a default value (`allowDefault`) while also requiring it (`requireDefault`).");
+ }
+
+ 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)) {
+ if (allowDefault) {
+ this.eat(types.eq);
+ node.default = this.flowParseType();
+ } else {
+ this.unexpected();
+ }
+ } 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(allowDefault = true) {
+ 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(allowDefault, 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(false);
+ }
+
+ 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.state.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:
+ return this.flowParseTupleType();
+
+ case types.relational:
+ if (this.state.value === "<") {
+ node.typeParameters = this.flowParseTypeParameterDeclaration(false);
+ 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)) {
+ this.unexpected(null, `Unexpected token, expected "number"`);
+ }
+
+ return this.parseLiteral(-this.state.value, "NumberLiteralTypeAnnotation", node.start, node.loc.start);
+ }
+
+ this.unexpected();
+
+ case types.num:
+ return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
+
+ 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.finishNode(ident, ident.type);
+ }
+
+ return ident;
+ }
+
+ typeCastToParameter(node) {
+ node.expression.typeAnnotation = node.typeAnnotation;
+ return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end);
+ }
+
+ 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) {
+ if (allowExpressionBody) {
+ return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true));
+ }
+
+ return super.parseFunctionBody(node, false);
+ }
+
+ parseFunctionBodyAndFinish(node, type, allowExpressionBody) {
+ if (!allowExpressionBody && 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, allowExpressionBody);
+ }
+
+ 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");
+ super.checkFunctionNameAndParams(node, true);
+ } 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;
+ }
+
+ 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.state.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, isBinding, checkClashes, contextDescription) {
+ if (expr.type !== "TypeCastExpression") {
+ return super.checkLVal(expr, isBinding, 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) {
+ if (method.variance) {
+ this.unexpected(method.variance.start);
+ }
+
+ delete method.variance;
+
+ if (this.isRelational("<")) {
+ method.typeParameters = this.flowParseTypeParameterDeclaration(false);
+ }
+
+ super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor);
+ }
+
+ 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(false);
+ 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.finishNode(param, param.type);
+ 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, true, 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, true, undefined, "import specifier");
+ node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
+ }
+
+ parseFunctionParams(node) {
+ const kind = node.kind;
+
+ if (kind !== "get" && kind !== "set" && this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration(false);
+ }
+
+ super.parseFunctionParams(node);
+ }
+
+ parseVarId(decl, kind) {
+ super.parseVarId(decl, kind);
+
+ if (this.match(types.colon)) {
+ decl.id.typeAnnotation = this.flowParseTypeAnnotation();
+ this.finishNode(decl.id, decl.id.type);
+ }
+ }
+
+ 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);
+ }
+ }
+
+ checkFunctionNameAndParams(node, isArrowFunction) {
+ if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
+ return;
+ }
+
+ return super.checkFunctionNameAndParams(node, 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) {
+ 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);
+ }
+
+ 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.state.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.state.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.state.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.state.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) {
+ shiftToFirstNonWhiteSpace++;
+ }
+
+ const ch2 = this.state.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);
+ const ch3 = this.state.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);
+
+ if (ch2 === 58 && ch3 === 58) {
+ return shiftToFirstNonWhiteSpace + 2;
+ }
+
+ if (this.state.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.state.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.state.length) {
+ this.raise(this.state.start, "Unterminated JSX contents");
+ }
+
+ const ch = this.state.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.state.input.slice(chunkStart, this.state.pos);
+ return this.finishToken(types.jsxText, out);
+
+ case 38:
+ out += this.state.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadEntity();
+ chunkStart = this.state.pos;
+ break;
+
+ default:
+ if (isNewLine(ch)) {
+ out += this.state.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadNewLine(true);
+ chunkStart = this.state.pos;
+ } else {
+ ++this.state.pos;
+ }
+
+ }
+ }
+ }
+
+ jsxReadNewLine(normalizeCRLF) {
+ const ch = this.state.input.charCodeAt(this.state.pos);
+ let out;
+ ++this.state.pos;
+
+ if (ch === 13 && this.state.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.state.length) {
+ this.raise(this.state.start, "Unterminated string constant");
+ }
+
+ const ch = this.state.input.charCodeAt(this.state.pos);
+ if (ch === quote) break;
+
+ if (ch === 38) {
+ out += this.state.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadEntity();
+ chunkStart = this.state.pos;
+ } else if (isNewLine(ch)) {
+ out += this.state.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadNewLine(false);
+ chunkStart = this.state.pos;
+ } else {
+ ++this.state.pos;
+ }
+ }
+
+ out += this.state.input.slice(chunkStart, this.state.pos++);
+ return this.finishToken(types.string, out);
+ }
+
+ jsxReadEntity() {
+ let str = "";
+ let count = 0;
+ let entity;
+ let ch = this.state.input[this.state.pos];
+ const startPos = ++this.state.pos;
+
+ while (this.state.pos < this.state.length && count++ < 10) {
+ ch = this.state.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.state.input.charCodeAt(++this.state.pos);
+ } while (isIdentifierChar(ch) || ch === 45);
+
+ return this.finishToken(types.jsxName, this.state.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.jsxParseExpressionContainer();
+
+ 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() {
+ const node = this.startNode();
+ this.expect(types.braceL);
+ this.expect(types.ellipsis);
+ node.expression = this.parseExpression();
+ this.expect(types.braceR);
+ return this.finishNode(node, "JSXSpreadChild");
+ }
+
+ jsxParseExpressionContainer() {
+ const node = this.startNode();
+ this.next();
+
+ 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:
+ if (this.lookahead().type === types.ellipsis) {
+ children.push(this.jsxParseSpreadChild());
+ } else {
+ children.push(this.jsxParseExpressionContainer());
+ }
+
+ 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.state.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.state.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);
+ }
+ }
+
+});
+
+const defaultOptions = {
+ sourceType: "script",
+ sourceFilename: undefined,
+ startLine: 1,
+ allowAwaitOutsideFunction: false,
+ allowReturnOutsideFunction: false,
+ allowImportExportEverywhere: false,
+ allowSuperOutsideMethod: false,
+ plugins: [],
+ strictMode: null,
+ ranges: false,
+ tokens: false
+};
+function getOptions(opts) {
+ const options = {};
+
+ for (const key in defaultOptions) {
+ 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 {
+ raise(pos, message, {
+ missingPluginNames,
+ code
+ } = {}) {
+ const loc = getLineInfo(this.state.input, 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.inFunction = false;
+ this.inParameters = false;
+ this.maybeInArrowParameters = false;
+ this.inGenerator = false;
+ this.inMethod = false;
+ this.inAsync = 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.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, input) {
+ this.strict = options.strictMode === false ? false : options.sourceType === "module";
+ this.input = input;
+ this.length = input.length;
+ 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 || key === "context") && 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, input);
+ 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.state.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.state.length) {
+ this.finishToken(types.eof);
+ return;
+ }
+
+ if (curContext.override) {
+ curContext.override(this);
+ } else {
+ this.getTokenFromCode(this.state.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.isLookahead) {
+ 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.state.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.state.input)) && match.index < this.state.pos) {
+ ++this.state.curLine;
+ this.state.lineStart = match.index + match[0].length;
+ }
+
+ this.pushComment(true, this.state.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.state.input.charCodeAt(this.state.pos += startSkip);
+
+ if (this.state.pos < this.state.length) {
+ while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.state.length) {
+ ch = this.state.input.charCodeAt(this.state.pos);
+ }
+ }
+
+ this.pushComment(false, this.state.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition());
+ }
+
+ skipSpace() {
+ loop: while (this.state.pos < this.state.length) {
+ const ch = this.state.input.charCodeAt(this.state.pos);
+
+ switch (ch) {
+ case 32:
+ case 160:
+ case 9:
+ ++this.state.pos;
+ break;
+
+ case 13:
+ if (this.state.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.state.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;
+ this.updateContext(prevType);
+ }
+
+ readToken_numberSign() {
+ if (this.state.pos === 0 && this.readToken_interpreter()) {
+ return;
+ }
+
+ const nextPos = this.state.pos + 1;
+ const next = this.state.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.state.input.charCodeAt(this.state.pos + 1);
+
+ if (next >= 48 && next <= 57) {
+ this.readNumber(true);
+ return;
+ }
+
+ const next2 = this.state.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.state.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.state.length < 2) return false;
+ const start = this.state.pos;
+ this.state.pos += 1;
+ let ch = this.state.input.charCodeAt(this.state.pos);
+ if (ch !== 33) return false;
+
+ while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.state.length) {
+ ch = this.state.input.charCodeAt(this.state.pos);
+ }
+
+ const value = this.state.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.state.input.charCodeAt(this.state.pos + 1);
+ const exprAllowed = this.state.exprAllowed;
+
+ if (code === 42 && next === 42) {
+ width++;
+ next = this.state.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.state.input.charCodeAt(this.state.pos + 1);
+
+ if (next === code) {
+ if (this.state.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.state.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.state.input.charCodeAt(this.state.pos + 1);
+
+ if (next === code) {
+ if (next === 45 && !this.inModule && this.state.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.state.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.state.input.charCodeAt(this.state.pos + 1);
+ let size = 1;
+
+ if (next === code) {
+ size = code === 62 && this.state.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2;
+
+ if (this.state.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.state.input.charCodeAt(this.state.pos + 2) === 45 && this.state.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.state.input.charCodeAt(this.state.pos + 1);
+
+ if (next === 61) {
+ this.finishOp(types.equality, this.state.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.state.input.charCodeAt(this.state.pos + 1);
+ const next2 = this.state.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.state.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.state.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.state.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.state.length) {
+ this.raise(start, "Unterminated regular expression");
+ }
+
+ const ch = this.state.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.state.input.slice(start, this.state.pos);
+ ++this.state.pos;
+ let mods = "";
+
+ while (this.state.pos < this.state.length) {
+ const char = this.state.input[this.state.pos];
+ const charCode = this.state.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.state.input.charCodeAt(this.state.pos);
+ let val;
+
+ if (this.hasPlugin("numericSeparator")) {
+ const prev = this.state.input.charCodeAt(this.state.pos - 1);
+ const next = this.state.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.state.input.charCodeAt(this.state.pos) === 110) {
+ ++this.state.pos;
+ isBigInt = true;
+ }
+ }
+
+ if (isIdentifierStart(this.state.input.codePointAt(this.state.pos))) {
+ this.raise(this.state.pos, "Identifier directly after number");
+ }
+
+ if (isBigInt) {
+ const str = this.state.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.state.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.state.input.slice(start, this.state.pos))) {
+ octal = false;
+ }
+ }
+
+ let next = this.state.input.charCodeAt(this.state.pos);
+
+ if (next === 46 && !octal) {
+ ++this.state.pos;
+ this.readInt(10);
+ isFloat = true;
+ next = this.state.input.charCodeAt(this.state.pos);
+ }
+
+ if ((next === 69 || next === 101) && !octal) {
+ next = this.state.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.state.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.state.input.codePointAt(this.state.pos))) {
+ this.raise(this.state.pos, "Identifier directly after number");
+ }
+
+ const str = this.state.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.state.input.charCodeAt(this.state.pos);
+ let code;
+
+ if (ch === 123) {
+ const codePos = ++this.state.pos;
+ code = this.readHexChar(this.state.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.state.length) {
+ this.raise(this.state.start, "Unterminated string constant");
+ }
+
+ const ch = this.state.input.charCodeAt(this.state.pos);
+ if (ch === quote) break;
+
+ if (ch === 92) {
+ out += this.state.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.state.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.state.length) {
+ this.raise(this.state.start, "Unterminated template");
+ }
+
+ const ch = this.state.input.charCodeAt(this.state.pos);
+
+ if (ch === 96 || ch === 36 && this.state.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.state.input.slice(chunkStart, this.state.pos);
+ this.finishToken(types.template, containsInvalid ? null : out);
+ return;
+ }
+
+ if (ch === 92) {
+ out += this.state.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.state.input.slice(chunkStart, this.state.pos);
+ ++this.state.pos;
+
+ switch (ch) {
+ case 13:
+ if (this.state.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.state.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.state.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.state.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);
+ }
+
+ if (octal > 0) {
+ 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;
+ }
+ }
+
+ this.state.pos += octalStr.length - 1;
+ 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.state.length) {
+ const ch = this.state.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.state.input.slice(chunkStart, this.state.pos);
+ const escStart = this.state.pos;
+ const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar;
+
+ if (this.state.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.state.input.slice(chunkStart, this.state.pos);
+ }
+
+ isIterator(word) {
+ return word === "@@iterator" || word === "@@asyncIterator";
+ }
+
+ readWord() {
+ const word = this.readWord1();
+ const type = keywords[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.state.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;
+ }
+ }
+
+}
+
+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.state.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);
+ }
+
+ 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");
+ }
+ }
+
+}
+
+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;
+ }
+
+ 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 "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, "property");
+ } 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, "element");
+ }
+ }
+ }
+
+ 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");
+ }
+
+ parseRest() {
+ const node = this.startNode();
+ this.next();
+ node.argument = this.parseBindingAtom();
+ return this.finishNode(node, "RestElement");
+ }
+
+ parseBindingAtom() {
+ switch (this.state.type) {
+ case types.name:
+ return this.parseIdentifier();
+
+ 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);
+
+ default:
+ throw this.unexpected();
+ }
+ }
+
+ 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.parseRest()));
+ this.checkCommaAfterRest(close, this.state.inFunction && this.state.inParameters ? "parameter" : "element");
+ 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, isBinding, checkClashes, contextDescription) {
+ switch (expr.type) {
+ case "Identifier":
+ if (this.state.strict && isStrictBindReservedWord(expr.name, this.inModule)) {
+ this.raise(expr.start, `${isBinding ? "Binding" : "Assigning to"} '${expr.name}' in strict mode`);
+ }
+
+ if (checkClashes) {
+ const key = `_${expr.name}`;
+
+ if (checkClashes[key]) {
+ this.raise(expr.start, "Argument name clash in strict mode");
+ } else {
+ checkClashes[key] = true;
+ }
+ }
+
+ break;
+
+ case "MemberExpression":
+ if (isBinding) 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, isBinding, 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, isBinding, checkClashes, "array destructuring pattern");
+ }
+ }
+
+ break;
+
+ case "AssignmentPattern":
+ this.checkLVal(expr.left, isBinding, checkClashes, "assignment pattern");
+ break;
+
+ case "RestElement":
+ this.checkLVal(expr.argument, isBinding, checkClashes, "rest element");
+ break;
+
+ default:
+ {
+ const message = (isBinding ? "Binding invalid" : "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(close, kind) {
+ if (this.match(types.comma)) {
+ if (this.lookahead().type === close) {
+ this.raiseCommaAfterRest(this.state.start, kind);
+ } else {
+ this.raiseRestNotLast(this.state.start, kind);
+ }
+ }
+ }
+
+ checkCommaAfterRestFromSpread(kind) {
+ if (this.state.commaAfterSpreadAt > -1) {
+ this.raiseCommaAfterRest(this.state.commaAfterSpreadAt, kind);
+ }
+ }
+
+ raiseCommaAfterRest(pos, kind) {
+ this.raise(pos, `A trailing comma is not permitted after the rest ${kind}`);
+ }
+
+ raiseRestNotLast(pos, kind) {
+ this.raise(pos, `The rest ${kind} must be the last ${kind}`);
+ }
+
+}
+
+class ExpressionParser extends LValParser {
+ checkPropClash(prop, propHash) {
+ if (prop.computed || prop.kind) 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.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.state.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");
+ let patternErrorMsg;
+ let elementName;
+
+ if (left.type === "ObjectPattern") {
+ patternErrorMsg = "`({a}) = 0` use `({a} = 0)`";
+ elementName = "property";
+ } else if (left.type === "ArrayPattern") {
+ patternErrorMsg = "`([a]) = 0` use `([a] = 0)`";
+ elementName = "element";
+ }
+
+ if (patternErrorMsg && left.extra && left.extra.parenthesized) {
+ this.raise(left.start, `You're trying to assign to a parenthesized expression, eg. instead of ${patternErrorMsg}`);
+ }
+
+ if (elementName) this.checkCommaAfterRestFromSpread(elementName);
+ 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 node = this.startNodeAt(leftStartPos, leftStartLoc);
+ const operator = this.state.value;
+ node.left = left;
+ node.operator = operator;
+
+ if (operator === "**" && left.type === "UnaryExpression" && !(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.state.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) {
+ switch (op) {
+ case types.pipeline:
+ if (this.getPluginOption("pipelineOperator", "proposal") === "smart") {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ return this.withTopicPermittingContext(() => {
+ return this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(op, prec, noIn), startPos, startLoc);
+ });
+ }
+
+ 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.state.inAsync || !this.state.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 state = {
+ optionalChainMember: false,
+ stop: false
+ };
+
+ do {
+ base = this.parseSubscript(base, startPos, startLoc, noCalls, state);
+ } while (!state.stop);
+
+ return base;
+ }
+
+ parseSubscript(base, startPos, startLoc, noCalls, state) {
+ 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)) {
+ const possibleAsync = this.atPossibleAsync(base);
+ node.callee = base;
+ node.arguments = this.parseCallExpressionArguments(types.parenR, possibleAsync);
+ 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;
+ const possibleAsync = this.atPossibleAsync(base);
+ 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, possibleAsync, base.type === "Import");
+
+ if (!state.optionalChainMember) {
+ this.finishCallExpression(node);
+ } else {
+ this.finishOptionalCallExpression(node);
+ }
+
+ if (possibleAsync && this.shouldParseAsyncArrow()) {
+ state.stop = true;
+ this.checkCommaAfterRestFromSpread("parameter");
+ 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 !this.state.containsEsc && this.state.potentialArrowAt === base.start && base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon();
+ }
+
+ 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) {
+ const elts = [];
+ let innerParenStart;
+ let first = true;
+
+ 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));
+ }
+
+ if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) {
+ this.unexpected();
+ }
+
+ return elts;
+ }
+
+ shouldParseAsyncArrow() {
+ return this.match(types.arrow);
+ }
+
+ 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.state.inMethod && !this.state.inClassProperty && !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.match(types.bracketL) && !this.match(types.dot)) {
+ this.unexpected();
+ }
+
+ if (this.match(types.parenL) && this.state.inMethod !== "constructor" && !this.options.allowSuperOutsideMethod) {
+ this.raise(node.start, "super() is only valid inside a class constructor. " + "Make sure the method name is spelled exactly as 'constructor'.");
+ }
+
+ return this.finishNode(node, "Super");
+
+ case types._import:
+ if (this.lookahead().type === types.dot) {
+ return this.parseImportMetaProperty();
+ }
+
+ this.expectPlugin("dynamicImport");
+ node = this.startNode();
+ this.next();
+
+ 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, false, false, true);
+ } else if (canBeArrow && id.name === "async" && this.match(types.name) && !this.canInsertSemicolon()) {
+ const oldInAsync = this.state.inAsync;
+ this.state.inAsync = true;
+ const params = [this.parseIdentifier()];
+ this.expect(types.arrow);
+ this.parseArrowExpression(node, params, true);
+ this.state.inAsync = oldInAsync;
+ 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 oldInFunction = this.state.inFunction;
+ const oldLabels = this.state.labels;
+ this.state.labels = [];
+ this.state.inFunction = false;
+ node.body = this.parseBlock(false);
+ this.state.inFunction = oldInFunction;
+ 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:
+ node = this.startNode();
+ this.next();
+ node.elements = this.parseExprList(types.bracketR, true, refShorthandDefaultPos);
+
+ if (!this.state.maybeInArrowParameters) {
+ this.toReferencedList(node.elements);
+ }
+
+ return this.finishNode(node, "ArrayExpression");
+
+ case types.braceL:
+ return this.parseObj(false, refShorthandDefaultPos);
+
+ 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();
+ const columnHashEnd = this.state.end;
+ this.next();
+ const columnIdentifierStart = this.state.start;
+ const spacesBetweenHashAndIdentifier = columnIdentifierStart - columnHashEnd;
+
+ if (spacesBetweenHashAndIdentifier != 0) {
+ this.raise(columnIdentifierStart, "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.state.inGenerator && this.eat(types.dot)) {
+ return this.parseMetaProperty(node, meta, "sent");
+ }
+
+ return this.parseFunction(node, false);
+ }
+
+ 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() {
+ const node = this.startNode();
+ const id = this.parseIdentifier(true);
+ this.expect(types.dot);
+
+ if (id.name === "import") {
+ 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.state.input.slice(startPos, this.state.end));
+ node.value = value;
+ this.next();
+ return this.finishNode(node, type);
+ }
+
+ parseParenExpression() {
+ this.expect(types.parenL);
+ const val = this.parseExpression();
+ this.expect(types.parenR);
+ return val;
+ }
+
+ 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;
+ this.state.maybeInArrowParameters = true;
+ this.state.yieldPos = 0;
+ this.state.awaitPos = 0;
+ 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.parseRest(), spreadNodeStartPos, spreadNodeStartLoc));
+ this.checkCommaAfterRest(types.parenR, "parameter");
+ 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;
+ 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];
+ }
+
+ this.addExtra(val, "parenthesized", true);
+ this.addExtra(val, "parenStart", startPos);
+ return val;
+ }
+
+ 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.state.inFunction && !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.state.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) {
+ let decorators = [];
+ 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;
+ }
+
+ 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());
+ }
+ }
+ }
+
+ let prop = this.startNode(),
+ isGenerator = false,
+ isAsync = false,
+ startPos,
+ startLoc;
+
+ if (decorators.length) {
+ prop.decorators = decorators;
+ decorators = [];
+ }
+
+ if (this.match(types.ellipsis)) {
+ prop = this.parseSpread(isPattern ? {
+ start: 0
+ } : undefined);
+ node.properties.push(prop);
+
+ if (isPattern) {
+ this.toAssignable(prop, true, "object pattern");
+ this.checkCommaAfterRest(types.braceR, "property");
+ this.expect(types.braceR);
+ break;
+ }
+
+ continue;
+ }
+
+ 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;
+
+ if (!isPattern && this.isContextual("async")) {
+ if (isGenerator) this.unexpected();
+ const asyncId = this.parseIdentifier();
+
+ if (this.match(types.colon) || this.match(types.parenL) || this.match(types.braceR) || this.match(types.eq) || this.match(types.comma)) {
+ prop.key = asyncId;
+ prop.computed = false;
+ } else {
+ isAsync = true;
+ isGenerator = this.eat(types.star);
+ this.parsePropertyName(prop);
+ }
+ } else {
+ this.parsePropertyName(prop);
+ }
+
+ this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc);
+ this.checkPropClash(prop, propHash);
+
+ if (prop.shorthand) {
+ this.addExtra(prop, "shorthand", true);
+ }
+
+ node.properties.push(prop);
+ }
+
+ if (decorators.length) {
+ this.raise(this.state.start, "You have trailing decorators with no property");
+ }
+
+ return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
+ }
+
+ 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);
+ }
+
+ checkGetterSetterParams(method) {
+ const paramCount = method.kind === "get" ? 0 : 1;
+ 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[0].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, "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, "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, type) {
+ const oldInFunc = this.state.inFunction;
+ const oldInMethod = this.state.inMethod;
+ const oldInAsync = this.state.inAsync;
+ const oldInGenerator = this.state.inGenerator;
+ const oldYieldPos = this.state.yieldPos;
+ const oldAwaitPos = this.state.awaitPos;
+ this.state.inFunction = true;
+ this.state.inMethod = node.kind || true;
+ this.state.inAsync = isAsync;
+ this.state.inGenerator = isGenerator;
+ this.state.yieldPos = 0;
+ this.state.awaitPos = 0;
+ this.initFunction(node, isAsync);
+ node.generator = !!isGenerator;
+ const allowModifiers = isConstructor;
+ this.parseFunctionParams(node, allowModifiers);
+ this.checkYieldAwaitInDefaultParams();
+ this.parseFunctionBodyAndFinish(node, type);
+ this.state.inFunction = oldInFunc;
+ this.state.inMethod = oldInMethod;
+ this.state.inAsync = oldInAsync;
+ this.state.inGenerator = oldInGenerator;
+ this.state.yieldPos = oldYieldPos;
+ this.state.awaitPos = oldAwaitPos;
+ return node;
+ }
+
+ parseArrowExpression(node, params, isAsync) {
+ this.initFunction(node, isAsync);
+ const oldInFunc = this.state.inFunction;
+ const oldInAsync = this.state.inAsync;
+ const oldInGenerator = this.state.inGenerator;
+ const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
+ const oldYieldPos = this.state.yieldPos;
+ const oldAwaitPos = this.state.awaitPos;
+ this.state.inFunction = true;
+ this.state.inAsync = isAsync;
+ this.state.inGenerator = false;
+ this.state.maybeInArrowParameters = false;
+ this.state.yieldPos = 0;
+ this.state.awaitPos = 0;
+ if (params) this.setArrowFunctionParameters(node, params);
+ this.parseFunctionBody(node, true);
+ this.state.inAsync = oldInAsync;
+ this.state.inGenerator = oldInGenerator;
+ this.state.inFunction = oldInFunc;
+ 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, allowExpressionBody) {
+ this.parseFunctionBody(node, allowExpressionBody);
+ this.finishNode(node, type);
+ }
+
+ parseFunctionBody(node, allowExpression) {
+ const isExpression = allowExpression && !this.match(types.braceL);
+ const oldInParameters = this.state.inParameters;
+ this.state.inParameters = false;
+
+ if (isExpression) {
+ node.body = this.parseMaybeAssign();
+ } else {
+ const oldInFunc = this.state.inFunction;
+ const oldLabels = this.state.labels;
+ this.state.inFunction = true;
+ this.state.labels = [];
+ node.body = this.parseBlock(true);
+ this.state.inFunction = oldInFunc;
+ this.state.labels = oldLabels;
+ }
+
+ this.checkFunctionNameAndParams(node, allowExpression);
+ this.state.inParameters = oldInParameters;
+ }
+
+ checkFunctionNameAndParams(node, isArrowFunction) {
+ const isStrict = this.isStrictBody(node);
+ const checkLVal = this.state.strict || isStrict || isArrowFunction;
+ const oldStrict = this.state.strict;
+ if (isStrict) this.state.strict = isStrict;
+
+ if (checkLVal) {
+ const nameHash = Object.create(null);
+
+ if (node.id) {
+ this.checkLVal(node.id, true, undefined, "function name");
+ }
+
+ for (let _i3 = 0, _node$params = node.params; _i3 < _node$params.length; _i3++) {
+ const param = _node$params[_i3];
+
+ if (isStrict && param.type !== "Identifier") {
+ this.raise(param.start, "Non-simple parameter in strict mode");
+ }
+
+ this.checkLVal(param, true, nameHash, "function parameter list");
+ }
+ }
+
+ this.state.strict = oldStrict;
+ }
+
+ 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) {
+ 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 {
+ 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.state.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) {
+ const state = this.state;
+
+ if (state.inGenerator && word === "yield") {
+ this.raise(startLoc, "Can not use 'yield' as identifier inside a generator");
+ }
+
+ if (state.inAsync && word === "await") {
+ this.raise(startLoc, "Can not use 'await' as identifier inside an async function");
+ }
+
+ if (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 = !state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord;
+
+ if (reservedTest(word, this.inModule)) {
+ if (!state.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.");
+ }
+
+ 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;
+ }
+ }
+
+ 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;
+ }
+
+}
+
+const empty = [];
+const loopLabel = {
+ kind: "loop"
+};
+const switchLabel = {
+ kind: "switch"
+};
+class StatementParser extends ExpressionParser {
+ parseTopLevel(file, program) {
+ program.sourceType = this.options.sourceType;
+ program.interpreter = this.parseInterpreterDirective();
+ this.parseBlockBody(program, true, true, types.eof);
+ 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.state.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.state.input);
+ const next = this.state.pos + skip[0].length;
+ const nextCh = this.state.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.state.input.charCodeAt(pos))) {
+ ++pos;
+ }
+
+ const ident = this.state.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 && (this.state.strict || context !== "if" && context !== "label")) {
+ this.raise(this.state.start, "Function declaration not allowed in this context");
+ }
+
+ const result = this.parseFunctionStatement(node);
+
+ if (context && result.generator) {
+ this.unexpected(node.start);
+ }
+
+ return result;
+ }
+
+ 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();
+ 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;
+ }
+
+ case types.name:
+ if (this.isContextual("async")) {
+ const state = this.state.clone();
+ this.next();
+
+ if (this.match(types._function) && !this.canInsertSemicolon()) {
+ if (context) {
+ this.raise(this.state.lastTokStart, "Function declaration not allowed in this context");
+ }
+
+ this.next();
+ return this.parseFunction(node, true, false, true);
+ } else {
+ this.state = state;
+ }
+ }
+
+ }
+
+ 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.parseMaybeAssign();
+ }
+
+ 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 if (!this.match(types.name)) {
+ this.unexpected();
+ } else {
+ node.label = this.parseIdentifier();
+ this.semicolon();
+ }
+
+ 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);
+ }
+
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
+ }
+
+ parseDebuggerStatement(node) {
+ this.next();
+ this.semicolon();
+ return this.finishNode(node, "DebuggerStatement");
+ }
+
+ 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.parseParenExpression();
+ this.eat(types.semi);
+ return this.finishNode(node, "DoWhileStatement");
+ }
+
+ parseForStatement(node) {
+ this.next();
+ this.state.labels.push(loopLabel);
+ let awaitAt = -1;
+
+ if ((this.state.inAsync || !this.state.inFunction && this.options.allowAwaitOutsideFunction) && this.eatContextual("await")) {
+ awaitAt = this.state.lastTokStart;
+ }
+
+ 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")) {
+ if (init.declarations.length === 1) {
+ const declaration = init.declarations[0];
+ const isForInInitializer = kind === "var" && declaration.init && declaration.id.type != "ObjectPattern" && declaration.id.type != "ArrayPattern" && !this.isContextual("of");
+
+ if (this.state.strict && isForInInitializer) {
+ this.raise(this.state.start, "for-in initializer in strict mode");
+ } else if (isForInInitializer || !declaration.init) {
+ 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) {
+ this.next();
+ return this.parseFunction(node, true);
+ }
+
+ parseIfStatement(node) {
+ this.next();
+ node.test = this.parseParenExpression();
+ node.consequent = this.parseStatement("if");
+ node.alternate = this.eat(types._else) ? this.parseStatement("if") : null;
+ return this.finishNode(node, "IfStatement");
+ }
+
+ parseReturnStatement(node) {
+ if (!this.state.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.parseParenExpression();
+ const cases = node.cases = [];
+ this.expect(types.braceL);
+ this.state.labels.push(switchLabel);
+ 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();
+ }
+ }
+ }
+
+ 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.state.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 clashes = Object.create(null);
+ this.checkLVal(clause.param, true, clashes, "catch clause");
+ this.expect(types.parenR);
+ } else {
+ clause.param = null;
+ }
+
+ clause.body = this.withTopicForbiddingContext(() => this.parseBlock(false));
+ node.handler = this.finishNode(clause, "CatchClause");
+ }
+
+ node.guardedHandlers = empty;
+ 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.parseParenExpression();
+ 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.parseParenExpression();
+ 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 _i = 0, _this$state$labels = this.state.labels; _i < _this$state$labels.length; _i++) {
+ const label = _this$state$labels[_i];
+
+ 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) {
+ const node = this.startNode();
+ this.expect(types.braceL);
+ this.parseBlockBody(node, allowDirectives, false, types.braceR);
+ 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.state.labels.pop();
+ return this.finishNode(node, "ForStatement");
+ }
+
+ parseForIn(node, init, awaitAt) {
+ const type = this.match(types._in) ? "ForInStatement" : "ForOfStatement";
+
+ if (awaitAt > -1) {
+ this.eatContextual("of");
+ } else {
+ this.next();
+ }
+
+ if (type === "ForOfStatement") {
+ node.await = awaitAt > -1;
+ }
+
+ node.left = init;
+ node.right = this.parseExpression();
+ this.expect(types.parenR);
+ node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
+ this.state.labels.pop();
+ return this.finishNode(node, type);
+ }
+
+ 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) {
+ if ((kind === "const" || kind === "let") && this.isContextual("let")) {
+ this.unexpected(null, "let is disallowed as a lexically bound name");
+ }
+
+ decl.id = this.parseBindingAtom();
+ this.checkLVal(decl.id, true, undefined, "variable declaration");
+ }
+
+ parseFunction(node, isStatement, allowExpressionBody = false, isAsync = false, optionalId = false) {
+ const oldInFunc = this.state.inFunction;
+ const oldInMethod = this.state.inMethod;
+ const oldInAsync = this.state.inAsync;
+ const oldInGenerator = this.state.inGenerator;
+ const oldInClassProperty = this.state.inClassProperty;
+ const oldYieldPos = this.state.yieldPos;
+ const oldAwaitPos = this.state.awaitPos;
+ this.state.inFunction = true;
+ this.state.inMethod = false;
+ this.state.inClassProperty = false;
+ this.state.yieldPos = 0;
+ this.state.awaitPos = 0;
+ this.initFunction(node, isAsync);
+ node.generator = this.eat(types.star);
+
+ if (isStatement && !optionalId && !this.match(types.name)) {
+ this.unexpected();
+ }
+
+ if (!isStatement) {
+ this.state.inAsync = isAsync;
+ this.state.inGenerator = node.generator;
+ }
+
+ if (this.match(types.name)) {
+ node.id = this.parseIdentifier();
+ }
+
+ if (isStatement) {
+ this.state.inAsync = isAsync;
+ this.state.inGenerator = node.generator;
+ }
+
+ this.parseFunctionParams(node);
+ this.withTopicForbiddingContext(() => {
+ this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression", allowExpressionBody);
+ });
+ this.state.inFunction = oldInFunc;
+ this.state.inMethod = oldInMethod;
+ this.state.inAsync = oldInAsync;
+ this.state.inGenerator = oldInGenerator;
+ this.state.inClassProperty = oldInClassProperty;
+ this.state.yieldPos = oldYieldPos;
+ this.state.awaitPos = oldAwaitPos;
+ return node;
+ }
+
+ 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();
+ }
+
+ 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);
+ this.parseClassBody(node);
+ 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(node) {
+ 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);
+
+ 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");
+ }
+
+ node.body = this.finishNode(classBody, "ClassBody");
+ this.state.classLevel--;
+ }
+
+ parseClassMember(classBody, member, state) {
+ 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);
+ 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);
+ }
+
+ 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.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);
+ return;
+ }
+
+ 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);
+
+ 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;
+ }
+
+ this.pushClassMethod(classBody, publicMethod, false, false, isConstructor);
+ } else if (this.isClassProperty()) {
+ if (isPrivate) {
+ this.pushClassPrivateProperty(classBody, privateProp);
+ } else {
+ this.pushClassProperty(classBody, publicProp);
+ }
+ } else if (isSimple && key.name === "async" && !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);
+ }
+ } else if (isSimple && (key.name === "get" || key.name === "set") && !(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);
+ }
+
+ 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) {
+ classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, "ClassMethod"));
+ }
+
+ pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
+ this.expectPlugin("classPrivateMethods", method.key.start);
+ classBody.body.push(this.parseMethod(method, isGenerator, isAsync, false, "ClassPrivateMethod"));
+ }
+
+ parsePostMemberNameModifiers(methodOrProp) {}
+
+ parseAccessModifier() {
+ return undefined;
+ }
+
+ parseClassPrivateProperty(node) {
+ const oldInMethod = this.state.inMethod;
+ this.state.inMethod = false;
+ this.state.inClassProperty = true;
+ node.value = this.eat(types.eq) ? this.parseMaybeAssign() : null;
+ this.semicolon();
+ this.state.inClassProperty = false;
+ this.state.inMethod = oldInMethod;
+ return this.finishNode(node, "ClassPrivateProperty");
+ }
+
+ parseClassProperty(node) {
+ if (!node.typeAnnotation) {
+ this.expectPlugin("classProperties");
+ }
+
+ const oldInMethod = this.state.inMethod;
+ this.state.inMethod = false;
+ this.state.inClassProperty = true;
+
+ 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.state.inMethod = oldInMethod;
+ return this.finishNode(node, "ClassProperty");
+ }
+
+ parseClassId(node, isStatement, optionalId) {
+ if (this.match(types.name)) {
+ node.id = this.parseIdentifier();
+ } 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);
+ 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 {
+ input,
+ pos,
+ length
+ } = this.state;
+ skipWhiteSpace.lastIndex = pos;
+ const skip = skipWhiteSpace.exec(input);
+ if (!skip || !skip.length) return false;
+ const next = pos + skip[0].length;
+ return !lineBreak.test(input.slice(pos, next)) && input.slice(next, next + 8) === "function" && (next + 8 === length || !isIdentifierChar(input.charCodeAt(next + 8)));
+ }
+
+ parseExportDefaultExpression() {
+ const expr = this.startNode();
+ const isAsync = this.isAsyncFunction();
+
+ if (this.eat(types._function) || isAsync) {
+ if (isAsync) {
+ this.eatContextual("async");
+ this.expect(types._function);
+ }
+
+ return this.parseFunction(expr, true, false, isAsync, true);
+ } 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) {
+ if (checkNames) {
+ if (isDefault) {
+ this.checkDuplicateExports(node, "default");
+ } else if (node.specifiers && node.specifiers.length) {
+ for (let _i2 = 0, _node$specifiers = node.specifiers; _i2 < _node$specifiers.length; _i2++) {
+ const specifier = _node$specifiers[_i2];
+ this.checkDuplicateExports(specifier, specifier.exported.name);
+ }
+ } 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 _i3 = 0, _node$declaration$dec = node.declaration.declarations; _i3 < _node$declaration$dec.length; _i3++) {
+ const declaration = _node$declaration$dec[_i3];
+ 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 _i4 = 0, _node$properties = node.properties; _i4 < _node$properties.length; _i4++) {
+ const prop = _node$properties[_i4];
+ this.checkDeclaration(prop);
+ }
+ } else if (node.type === "ArrayPattern") {
+ for (let _i5 = 0, _node$elements = node.elements; _i5 < _node$elements.length; _i5++) {
+ const elem = _node$elements[_i5];
+
+ 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;
+ let needsFrom;
+ 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 isDefault = this.match(types._default);
+ if (isDefault && !needsFrom) needsFrom = true;
+ const node = this.startNode();
+ node.local = this.parseIdentifier(isDefault);
+ node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone();
+ nodes.push(this.finishNode(node, "ExportSpecifier"));
+ }
+
+ if (needsFrom && !this.isContextual("from")) {
+ this.unexpected();
+ }
+
+ 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, true, 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, true, undefined, "import specifier");
+ node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
+ }
+
+}
+
+class Parser extends StatementParser {
+ constructor(options, input) {
+ options = getOptions(options);
+ super(options, input);
+ this.options = options;
+ this.inModule = this.options.sourceType === "module";
+ this.plugins = pluginsMap(this.options.plugins);
+ this.filename = options.sourceFilename;
+ }
+
+ parse() {
+ 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 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 {
+ 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));
+ }
+
+ tsTryParseDelimitedList(kind, parseElement) {
+ return this.tsParseDelimitedListWorker(kind, parseElement, false);
+ }
+
+ 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.parseLiteral(this.state.value, "StringLiteral");
+ 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");
+ }
+
+ 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) {
+ const node = this.startNode();
+
+ if (kind === "TSConstructSignatureDeclaration") {
+ this.expect(types._new);
+ }
+
+ 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.finishNode(id, "Identifier");
+ 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) {
+ this.parsePropertyName(node);
+ 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() {
+ if (this.match(types.parenL) || this.isRelational("<")) {
+ return this.tsParseSignatureMember("TSCallSignatureDeclaration");
+ }
+
+ if (this.match(types._new) && this.tsLookAhead(this.tsIsStartOfConstructSignature.bind(this))) {
+ return this.tsParseSignatureMember("TSConstructSignatureDeclaration");
+ }
+
+ const node = this.startNode();
+ const readonly = !!this.tsParseModifier(["readonly"]);
+ const idx = this.tsTryParseIndexSignature(node);
+
+ if (idx) {
+ if (readonly) node.readonly = true;
+ return idx;
+ }
+
+ return this.tsParsePropertyOrMethodSignature(node, readonly);
+ }
+
+ tsIsStartOfConstructSignature() {
+ this.next();
+ return this.match(types.parenL) || this.isRelational("<");
+ }
+
+ 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(types.bracketR, "type");
+ 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:
+ return this.parseLiteral(this.state.value, "NumericLiteral");
+
+ case types.string:
+ return this.parseLiteral(this.state.value, "StringLiteral");
+
+ case types._true:
+ case types._false:
+ return this.parseBooleanLiteral();
+
+ default:
+ throw this.unexpected();
+ }
+ })();
+
+ 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();
+ this.next();
+
+ if (!this.match(types.num)) {
+ throw this.unexpected();
+ }
+
+ node.literal = this.parseLiteral(-this.state.value, "NumericLiteral", node.start, node.loc.start);
+ 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();
+ }
+
+ 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();
+ return this.finishNode(node, "TSTypeOperator");
+ }
+
+ 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"].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$$1 = [type];
+
+ while (this.eat(operator)) {
+ types$$1.push(parseConstituentType());
+ }
+
+ const node = this.startNodeAtNode(type);
+ node.types = types$$1;
+ 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();
+ this.next();
+ node.typeAnnotation = this.tsInType(() => this.tsParseType());
+ 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();
+ 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();
+ 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.parseLiteral(this.state.value, "StringLiteral") : 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.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.expect(types.braceL);
+ this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, types.braceR);
+ return this.finishNode(node, "TSModuleBlock");
+ }
+
+ tsParseModuleOrNamespaceDeclaration(node) {
+ node.id = this.parseIdentifier();
+
+ if (this.eat(types.dot)) {
+ const inner = this.startNode();
+ this.tsParseModuleOrNamespaceDeclaration(inner);
+ 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.parseLiteral(this.state.value, "StringLiteral");
+ 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;
+ }
+ }
+
+ nodeWithSamePosition(original, type) {
+ const node = this.startNodeAtNode(original);
+ node.type = type;
+ node.end = original.end;
+ node.loc.end = original.loc.end;
+
+ if (original.leadingComments) {
+ node.leadingComments = original.leadingComments;
+ }
+
+ if (original.trailingComments) {
+ node.trailingComments = original.trailingComments;
+ }
+
+ if (original.innerComments) node.innerComments = original.innerComments;
+ return node;
+ }
+
+ 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:
+ this.next();
+ return this.parseFunction(nany, 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) {
+ 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;
+ }
+
+ const oldInAsync = this.state.inAsync;
+ const oldInGenerator = this.state.inGenerator;
+ this.state.inAsync = true;
+ this.state.inGenerator = false;
+ res.id = null;
+ res.generator = false;
+ res.expression = true;
+ res.async = true;
+ this.parseFunctionBody(res, true);
+ this.state.inAsync = oldInAsync;
+ this.state.inGenerator = oldInGenerator;
+ return this.finishNode(res, "ArrowFunctionExpression");
+ }
+
+ 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, allowExpressionBody) {
+ if (!allowExpressionBody && 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, allowExpressionBody);
+ }
+
+ 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.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);
+ }
+
+ 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;
+ 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) {
+ const accessibility = this.parseAccessModifier();
+ if (accessibility) member.accessibility = accessibility;
+ super.parseClassMember(classBody, member, state);
+ }
+
+ parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
+ 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);
+ }
+
+ 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;
+ }
+
+ if (this.match(types.colon)) {
+ const typeCastNode = this.startNodeAt(startPos, startLoc);
+ typeCastNode.expression = node;
+ typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();
+ return this.finishNode(typeCastNode, "TSTypeCastExpression");
+ }
+
+ return this.finishNode(node, node.type);
+ }
+
+ 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) {
+ const typeParameters = this.tsTryParseTypeParameters();
+ if (typeParameters) method.typeParameters = typeParameters;
+ super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor);
+ }
+
+ 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.finishNode(decl.id, decl.id.type);
+ }
+ }
+
+ 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") {
+ 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.unexpected();
+ if (!this.match(types.arrow)) this.unexpected();
+ 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;
+ return this.finishNode(param, param.type);
+ }
+
+ 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, isBinding, checkClashes, contextDescription) {
+ switch (expr.type) {
+ case "TSTypeCastExpression":
+ return;
+
+ case "TSParameterProperty":
+ this.checkLVal(expr.parameter, isBinding, checkClashes, "parameter property");
+ return;
+
+ case "TSAsExpression":
+ case "TSNonNullExpression":
+ case "TSTypeAssertion":
+ this.checkLVal(expr.expression, isBinding, checkClashes, contextDescription);
+ return;
+
+ default:
+ super.checkLVal(expr, isBinding, 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 && expr.type === "TSTypeCastExpression") {
+ exprList[i] = this.typeCastToParameter(expr);
+ }
+ }
+
+ return super.toAssignableList(exprList, isBinding, contextDescription);
+ }
+
+ typeCastToParameter(node) {
+ node.expression.typeAnnotation = node.typeAnnotation;
+ return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end);
+ }
+
+ 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) {
+ const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArguments());
+ if (typeArguments) node.typeParameters = typeArguments;
+ return super.jsxParseOpeningElementAfterName(node);
+ }
+
+});
+
+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"];
+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 mixinPluginNames = ["estree", "jsx", "flow", "typescript"];
+const mixinPlugins = {
+ estree,
+ jsx,
+ flow,
+ typescript
+};
+
+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
new file mode 100644
index 0000000000..34e38f3908
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/parser/package.json
@@ -0,0 +1,48 @@
+{
+ "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.0.0",
+ "@babel/helper-fixtures": "^7.2.0",
+ "charcodes": "0.1.0",
+ "unicode-11.0.0": "^0.7.8"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ },
+ "files": [
+ "bin",
+ "lib",
+ "typings"
+ ],
+ "gitHead": "1f6454cc90fe33e0a32260871212e2f719f35741",
+ "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.3.4"
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/parser/typings/babel-parser.d.ts b/tools/node_modules/babel-eslint/node_modules/@babel/parser/typings/babel-parser.d.ts
new file mode 100644
index 0000000000..b3f745f61a
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/parser/typings/babel-parser.d.ts
@@ -0,0 +1,127 @@
+// Type definitions for @babel/parser
+// Project: https://github.com/babel/babel/tree/master/packages/babel-parser
+// Definitions by: Troy Gerwien <https://github.com/yortus>
+// Marvin Hagemeister <https://github.com/marvinhagemeister>
+// Avi Vahl <https://github.com/AviVahl>
+// TypeScript Version: 2.9
+
+/**
+ * Parse the provided code as an entire ECMAScript program.
+ */
+export function parse(input: string, options?: ParserOptions): import('@babel/types').File;
+
+/**
+ * Parse the provided code as a single expression.
+ */
+export function parseExpression(input: string, options?: ParserOptions): import('@babel/types').Expression;
+
+export interface ParserOptions {
+ /**
+ * By default, import and export declarations can only appear at a program's top level.
+ * Setting this option to true allows them anywhere where a statement is allowed.
+ */
+ allowImportExportEverywhere?: boolean;
+
+ /**
+ * By default, await use is not allowed outside of an async function.
+ * Set this to true to accept such code.
+ */
+ allowAwaitOutsideFunction?: boolean;
+
+ /**
+ * By default, a return statement at the top level raises an error.
+ * Set this to true to accept such code.
+ */
+ allowReturnOutsideFunction?: boolean;
+
+ allowSuperOutsideMethod?: boolean;
+
+ /**
+ * Indicate the mode the code should be parsed in.
+ * Can be one of "script", "module", or "unambiguous". Defaults to "script".
+ * "unambiguous" will make @babel/parser attempt to guess, based on the presence
+ * of ES6 import or export statements.
+ * Files with ES6 imports and exports are considered "module" and are otherwise "script".
+ */
+ sourceType?: 'script' | 'module' | 'unambiguous';
+
+ /**
+ * Correlate output AST nodes with their source filename.
+ * Useful when generating code and source maps from the ASTs of multiple input files.
+ */
+ sourceFilename?: string;
+
+ /**
+ * By default, the first line of code parsed is treated as line 1.
+ * You can provide a line number to alternatively start with.
+ * Useful for integration with other source tools.
+ */
+ startLine?: number;
+
+ /**
+ * Array containing the plugins that you want to enable.
+ */
+ plugins?: ParserPlugin[];
+
+ /**
+ * Should the parser work in strict mode.
+ * Defaults to true if sourceType === 'module'. Otherwise, false.
+ */
+ strictMode?: boolean;
+
+ /**
+ * Adds a ranges property to each node: [node.start, node.end]
+ */
+ ranges?: boolean;
+
+ /**
+ * Adds all parsed tokens to a tokens property on the File node.
+ */
+ tokens?: boolean;
+}
+
+export type ParserPlugin =
+ 'estree' |
+ 'jsx' |
+ 'flow' |
+ 'flowComments' |
+ 'typescript' |
+ 'doExpressions' |
+ 'objectRestSpread' |
+ 'decorators' |
+ 'decorators-legacy' |
+ 'classProperties' |
+ 'classPrivateProperties' |
+ 'classPrivateMethods' |
+ 'exportDefaultFrom' |
+ 'exportNamespaceFrom' |
+ 'asyncGenerators' |
+ 'functionBind' |
+ 'functionSent' |
+ 'dynamicImport' |
+ 'numericSeparator' |
+ 'optionalChaining' |
+ 'importMeta' |
+ 'bigInt' |
+ 'optionalCatchBinding' |
+ 'throwExpressions' |
+ 'pipelineOperator' |
+ 'nullishCoalescingOperator' |
+ ParserPluginWithOptions;
+
+export type ParserPluginWithOptions =
+ ['decorators', DecoratorsPluginOptions] |
+ ['pipelineOperator', PipelineOperatorPluginOptions] |
+ ['flow', FlowPluginOptions];
+
+export interface DecoratorsPluginOptions {
+ decoratorsBeforeExport?: boolean;
+}
+
+export interface PipelineOperatorPluginOptions {
+ proposal: 'minimal' | 'smart';
+}
+
+export interface FlowPluginOptions {
+ all?: boolean;
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/LICENSE b/tools/node_modules/babel-eslint/node_modules/@babel/template/LICENSE
new file mode 100644
index 0000000000..a06ec0e70f
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/template/LICENSE
@@ -0,0 +1,22 @@
+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/template/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/template/README.md
index 0219286c3f..cf8f944396 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/README.md
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/template/README.md
@@ -1,172 +1,19 @@
# @babel/template
-> Generate an AST from a string template or template literal.
+> Generate an AST from a string template.
-In computer science, this is known as an implementation of quasiquotes.
+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
```
-## String Usage
-
-```js
-import template from "@babel/template";
-import generate from "@babel/generator";
-import * as t from "@babel/types";
-
-const buildRequire = template(`
- var IMPORT_NAME = require(SOURCE);
-`);
-
-const ast = buildRequire({
- IMPORT_NAME: t.identifier("myModule"),
- SOURCE: t.stringLiteral("my-module")
-});
-
-console.log(generate(ast).code);
-```
-
-```js
-const myModule = require("my-module");
-```
-
-### `.ast`
-
-If no placeholders are in use and you just want a simple way to parse a
-string into an AST, you can use the `.ast` version of the template.
-
-```js
-const ast = template.ast(`
- var myModule = require("my-module");
-`);
-```
-which will parse and return the AST directly.
-
-
-## Template Literal Usage
-
-```js
-import template from "@babel/template";
-import generate from "@babel/generator";
-import * as t from "@babel/types";
-
-const fn = template`
- var IMPORT_NAME = require('${"my-module"}');
-`);
-
-const ast = fn({
- IMPORT_NAME: t.identifier("myModule");
-});
-
-console.log(generate(ast).code);
-```
-
-Note that placeholders can be passed directly as part of the template literal
-in order to make things as readable as possible, or they can be passed into
-the template function.
-
-### `.ast`
-
-If no placeholders are in use and you just want a simple way to parse a
-string into an AST, you can use the `.ast` version of the template.
-
-```js
-const name = "my-module";
-const mod = "myModule";
+or using yarn:
-const ast = template.ast`
- var ${mod} = require("${name}");
-`;
+```sh
+yarn add @babel/template --dev
```
-which will parse and return the AST directly. Note that unlike the string-based
-version mentioned earlier, since this is a template literal, it is still
-valid to perform replacements using template literal replacements.
-
-
-## AST results
-
-The `@babel/template` API exposes a few flexible APIs to make it as easy as
-possible to create ASTs with an expected structure. Each of these also has
-the `.ast` property mentioned above.
-
-### `template`
-
-`template` returns either a single statement, or an array of
-statements, depending on the parsed result.
-
-### `template.smart`
-
-This is the same as the default `template` API, returning either a single
-node, or an array of nodes, depending on the parsed result.
-
-### `template.statement`
-
-`template.statement("foo;")()` returns a single statement node, and throw
-an exception if the result is anything but a single statement.
-
-### `template.statements`
-
-`template.statements("foo;foo;")()` returns an array of statement nodes.
-
-### `template.expression`
-
-`template.expression("foo")()` returns the expression node.
-
-### `template.program`
-
-`template.program("foo;")()` returns the `Program` node for the template.
-
-
-## API
-
-### `template(code, [opts])`
-
-#### code
-
-Type: `string`
-
-#### options
-
-`@babel/template` accepts all of the options from [babylon](https://github.com/babel/babel/tree/master/packages/babylon), and specifies
-some defaults of its own:
-
-* `allowReturnOutsideFunction` is set to `true` by default.
-* `allowSuperOutsideMethod` is set to `true` by default.
-* `sourceType` is set to `module` by default.
-
-##### placeholderWhitelist
-
-Type: `Set<string>`
-Default: `undefined`
-
-A set of placeholder names to automatically accept. Items in this list do
-not need to match the given placeholder pattern.
-
-##### placeholderPattern
-
-Type: `RegExp | false`
-Default: `/^[_$A-Z0-9]+$/`
-
-A pattern to search for when looking for Identifier and StringLiteral
-nodes that should be considered placeholders.
-'false' will disable placeholder searching entirely, leaving only the
-'placeholderWhitelist' value to find placeholders.
-
-##### preserveComments
-
-Type: `boolean`
-Default: `false`
-
-Set this to `true` to preserve any comments from the `code` parameter.
-
-#### Return value
-
-By default `@babel/template` returns a `function` which is invoked with an
-optional object of replacements. See the usage section for an example.
-
-When using `.ast`, the AST will be returned directly.
-
-[babylon]: https://github.com/babel/babylon#options
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/builder.js b/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/builder.js
index a5d2951d9b..2a0e629726 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/builder.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/builder.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = createTemplateBuilder;
var _options = require("./options");
@@ -11,24 +13,20 @@ var _literal = _interopRequireDefault(require("./literal"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var NO_PLACEHOLDER = (0, _options.validate)({
+const NO_PLACEHOLDER = (0, _options.validate)({
placeholderPattern: false
});
function createTemplateBuilder(formatter, defaultOpts) {
- var templateFnCache = new WeakMap();
- var templateAstCache = new WeakMap();
- var cachedOpts = defaultOpts || (0, _options.validate)(null);
- return Object.assign(function (tpl) {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
+ const templateFnCache = new WeakMap();
+ const templateAstCache = new WeakMap();
+ const cachedOpts = defaultOpts || (0, _options.validate)(null);
+ return Object.assign((tpl, ...args) => {
if (typeof tpl === "string") {
if (args.length > 1) throw new Error("Unexpected extra params.");
return extendedTrace((0, _string.default)(formatter, tpl, (0, _options.merge)(cachedOpts, (0, _options.validate)(args[0]))));
} else if (Array.isArray(tpl)) {
- var builder = templateFnCache.get(tpl);
+ let builder = templateFnCache.get(tpl);
if (!builder) {
builder = (0, _literal.default)(formatter, tpl, cachedOpts);
@@ -41,18 +39,14 @@ function createTemplateBuilder(formatter, defaultOpts) {
return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl)));
}
- throw new Error("Unexpected template param " + typeof tpl);
+ throw new Error(`Unexpected template param ${typeof tpl}`);
}, {
- ast: function ast(tpl) {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
-
+ ast: (tpl, ...args) => {
if (typeof tpl === "string") {
if (args.length > 1) throw new Error("Unexpected extra params.");
return (0, _string.default)(formatter, tpl, (0, _options.merge)((0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])), NO_PLACEHOLDER))();
} else if (Array.isArray(tpl)) {
- var builder = templateAstCache.get(tpl);
+ let builder = templateAstCache.get(tpl);
if (!builder) {
builder = (0, _literal.default)(formatter, tpl, (0, _options.merge)(cachedOpts, NO_PLACEHOLDER));
@@ -62,13 +56,13 @@ function createTemplateBuilder(formatter, defaultOpts) {
return builder(args)();
}
- throw new Error("Unexpected template param " + typeof tpl);
+ throw new Error(`Unexpected template param ${typeof tpl}`);
}
});
}
function extendedTrace(fn) {
- var rootStack = "";
+ let rootStack = "";
try {
throw new Error();
@@ -78,11 +72,11 @@ function extendedTrace(fn) {
}
}
- return function (arg) {
+ return arg => {
try {
return fn(arg);
} catch (err) {
- err.stack += "\n =============\n" + rootStack;
+ err.stack += `\n =============\n${rootStack}`;
throw err;
}
};
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
index cd61283be5..59e0984cba 100644
--- 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
@@ -1,21 +1,21 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.program = exports.expression = exports.statement = exports.statements = exports.smart = void 0;
function makeStatementFormatter(fn) {
return {
- code: function code(str) {
- return "/* @babel/template */;\n" + str;
- },
- validate: function validate() {},
- unwrap: function unwrap(ast) {
+ code: str => `/* @babel/template */;\n${str}`,
+ validate: () => {},
+ unwrap: ast => {
return fn(ast.program.body.slice(1));
}
};
}
-var smart = makeStatementFormatter(function (body) {
+const smart = makeStatementFormatter(body => {
if (body.length > 1) {
return body;
} else {
@@ -23,11 +23,9 @@ var smart = makeStatementFormatter(function (body) {
}
});
exports.smart = smart;
-var statements = makeStatementFormatter(function (body) {
- return body;
-});
+const statements = makeStatementFormatter(body => body);
exports.statements = statements;
-var statement = makeStatementFormatter(function (body) {
+const statement = makeStatementFormatter(body => {
if (body.length === 0) {
throw new Error("Found nothing to return.");
}
@@ -39,35 +37,27 @@ var statement = makeStatementFormatter(function (body) {
return body[0];
});
exports.statement = statement;
-var expression = {
- code: function code(str) {
- return "(\n" + str + "\n)";
- },
- validate: function validate(ast) {
- var program = ast.program;
-
+const expression = {
+ code: str => `(\n${str}\n)`,
+ validate: ({
+ program
+ }) => {
if (program.body.length > 1) {
throw new Error("Found multiple statements but wanted one");
}
- var expression = program.body[0].expression;
+ const expression = program.body[0].expression;
if (expression.start === 0) {
throw new Error("Parse result included parens.");
}
},
- unwrap: function unwrap(ast) {
- return ast.program.body[0].expression;
- }
+ unwrap: ast => ast.program.body[0].expression
};
exports.expression = expression;
-var program = {
- code: function code(str) {
- return str;
- },
- validate: function validate() {},
- unwrap: function unwrap(ast) {
- return ast.program;
- }
+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
index 30ec5c1eeb..7ce85e9f1b 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+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"));
@@ -11,23 +13,23 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
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; } }
-var smart = (0, _builder.default)(formatters.smart);
+const smart = (0, _builder.default)(formatters.smart);
exports.smart = smart;
-var statement = (0, _builder.default)(formatters.statement);
+const statement = (0, _builder.default)(formatters.statement);
exports.statement = statement;
-var statements = (0, _builder.default)(formatters.statements);
+const statements = (0, _builder.default)(formatters.statements);
exports.statements = statements;
-var expression = (0, _builder.default)(formatters.expression);
+const expression = (0, _builder.default)(formatters.expression);
exports.expression = expression;
-var program = (0, _builder.default)(formatters.program);
+const program = (0, _builder.default)(formatters.program);
exports.program = program;
var _default = Object.assign(smart.bind(undefined), {
- smart: smart,
- statement: statement,
- statements: statements,
- expression: expression,
- program: program,
+ smart,
+ statement,
+ statements,
+ expression,
+ program,
ast: smart.ast
});
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
index 4a31fc2480..9d39a7cb86 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = literalTemplate;
var _options = require("./options");
@@ -12,20 +14,20 @@ var _populate = _interopRequireDefault(require("./populate"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function literalTemplate(formatter, tpl, opts) {
- var _buildLiteralData = buildLiteralData(formatter, tpl, opts),
- metadata = _buildLiteralData.metadata,
- names = _buildLiteralData.names;
-
- return function (arg) {
- var defaultReplacements = arg.reduce(function (acc, replacement, i) {
+ const {
+ metadata,
+ names
+ } = buildLiteralData(formatter, tpl, opts);
+ return arg => {
+ const defaultReplacements = arg.reduce((acc, replacement, i) => {
acc[names[i]] = replacement;
return acc;
}, {});
- return function (arg) {
- var replacements = (0, _options.normalizeReplacements)(arg);
+ return arg => {
+ const replacements = (0, _options.normalizeReplacements)(arg);
if (replacements) {
- Object.keys(replacements).forEach(function (key) {
+ Object.keys(replacements).forEach(key => {
if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) {
throw new Error("Unexpected replacement overlap.");
}
@@ -38,14 +40,14 @@ function literalTemplate(formatter, tpl, opts) {
}
function buildLiteralData(formatter, tpl, opts) {
- var names;
- var nameSet;
- var metadata;
- var prefix = "";
+ let names;
+ let nameSet;
+ let metadata;
+ let prefix = "";
do {
prefix += "$";
- var result = buildTemplateCode(tpl, prefix);
+ const result = buildTemplateCode(tpl, prefix);
names = result.names;
nameSet = new Set(names);
metadata = (0, _parse.default)(formatter, formatter.code(result.code), {
@@ -54,28 +56,26 @@ function buildLiteralData(formatter, tpl, opts) {
placeholderPattern: opts.placeholderPattern,
preserveComments: opts.preserveComments
});
- } while (metadata.placeholders.some(function (placeholder) {
- return placeholder.isDuplicate && nameSet.has(placeholder.name);
- }));
+ } while (metadata.placeholders.some(placeholder => placeholder.isDuplicate && nameSet.has(placeholder.name)));
return {
- metadata: metadata,
- names: names
+ metadata,
+ names
};
}
function buildTemplateCode(tpl, prefix) {
- var names = [];
- var code = tpl[0];
+ const names = [];
+ let code = tpl[0];
- for (var i = 1; i < tpl.length; i++) {
- var value = "" + prefix + (i - 1);
+ for (let i = 1; i < tpl.length; i++) {
+ const value = `${prefix}${i - 1}`;
names.push(value);
code += value + tpl[i];
}
return {
- names: names,
- code: code
+ 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
index 01522f28fc..c0208b2296 100644
--- 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
@@ -1,24 +1,25 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.merge = merge;
exports.validate = validate;
exports.normalizeReplacements = normalizeReplacements;
-function _objectWithoutProperties(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]; } 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; }
+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) {
- var _b$placeholderWhiteli = b.placeholderWhitelist,
- placeholderWhitelist = _b$placeholderWhiteli === void 0 ? a.placeholderWhitelist : _b$placeholderWhiteli,
- _b$placeholderPattern = b.placeholderPattern,
- placeholderPattern = _b$placeholderPattern === void 0 ? a.placeholderPattern : _b$placeholderPattern,
- _b$preserveComments = b.preserveComments,
- preserveComments = _b$preserveComments === void 0 ? a.preserveComments : _b$preserveComments;
+ const {
+ placeholderWhitelist = a.placeholderWhitelist,
+ placeholderPattern = a.placeholderPattern,
+ preserveComments = a.preserveComments
+ } = b;
return {
parser: Object.assign({}, a.parser, b.parser),
- placeholderWhitelist: placeholderWhitelist,
- placeholderPattern: placeholderPattern,
- preserveComments: preserveComments
+ placeholderWhitelist,
+ placeholderPattern,
+ preserveComments
};
}
@@ -27,11 +28,13 @@ function validate(opts) {
throw new Error("Unknown template options.");
}
- var _ref = opts || {},
- placeholderWhitelist = _ref.placeholderWhitelist,
- placeholderPattern = _ref.placeholderPattern,
- preserveComments = _ref.preserveComments,
- parser = _objectWithoutProperties(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments"]);
+ const _ref = opts || {},
+ {
+ placeholderWhitelist,
+ placeholderPattern,
+ preserveComments
+ } = _ref,
+ parser = _objectWithoutPropertiesLoose(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments"]);
if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {
throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");
@@ -46,7 +49,7 @@ function validate(opts) {
}
return {
- parser: parser,
+ parser,
placeholderWhitelist: placeholderWhitelist || undefined,
placeholderPattern: placeholderPattern == null ? undefined : placeholderPattern,
preserveComments: preserveComments == null ? false : preserveComments
@@ -55,7 +58,7 @@ function validate(opts) {
function normalizeReplacements(replacements) {
if (Array.isArray(replacements)) {
- return replacements.reduce(function (acc, replacement, i) {
+ return replacements.reduce((acc, replacement, i) => {
acc["$" + i] = replacement;
return acc;
}, {});
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
index 70f31e7322..336edcf661 100644
--- 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
@@ -1,49 +1,76 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = parseAndBuildMetadata;
-var t = _interopRequireWildcard(require("@babel/types"));
+function t() {
+ const data = _interopRequireWildcard(require("@babel/types"));
-var _babylon = require("babylon");
+ t = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _parser() {
+ const data = require("@babel/parser");
+
+ _parser = function () {
+ return data;
+ };
-var _codeFrame = require("@babel/code-frame");
+ 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; } }
-var PATTERN = /^[_$A-Z0-9]+$/;
+const PATTERN = /^[_$A-Z0-9]+$/;
function parseAndBuildMetadata(formatter, code, opts) {
- var ast = parseWithCodeFrame(code, opts.parser);
- var placeholderWhitelist = opts.placeholderWhitelist,
- _opts$placeholderPatt = opts.placeholderPattern,
- placeholderPattern = _opts$placeholderPatt === void 0 ? PATTERN : _opts$placeholderPatt,
- preserveComments = opts.preserveComments;
- t.removePropertiesDeep(ast, {
- preserveComments: preserveComments
+ const ast = parseWithCodeFrame(code, opts.parser);
+ const {
+ placeholderWhitelist,
+ placeholderPattern = PATTERN,
+ preserveComments
+ } = opts;
+ t().removePropertiesDeep(ast, {
+ preserveComments
});
formatter.validate(ast);
- var placeholders = [];
- var placeholderNames = new Set();
- t.traverse(ast, placeholderVisitorHandler, {
- placeholders: placeholders,
- placeholderNames: placeholderNames,
- placeholderWhitelist: placeholderWhitelist,
- placeholderPattern: placeholderPattern
+ const placeholders = [];
+ const placeholderNames = new Set();
+ t().traverse(ast, placeholderVisitorHandler, {
+ placeholders,
+ placeholderNames,
+ placeholderWhitelist,
+ placeholderPattern
});
return {
- ast: ast,
- placeholders: placeholders,
- placeholderNames: placeholderNames
+ ast,
+ placeholders,
+ placeholderNames
};
}
function placeholderVisitorHandler(node, ancestors, state) {
- var name;
+ let name;
- if (t.isIdentifier(node)) {
+ if (t().isIdentifier(node) || t().isJSXIdentifier(node)) {
name = node.name;
- } else if (t.isStringLiteral(node)) {
+ } else if (t().isStringLiteral(node)) {
name = node.value;
} else {
return;
@@ -54,16 +81,17 @@ function placeholderVisitorHandler(node, ancestors, state) {
}
ancestors = ancestors.slice();
- var _ancestors = ancestors[ancestors.length - 1],
- parent = _ancestors.node,
- key = _ancestors.key;
- var type;
+ const {
+ node: parent,
+ key
+ } = ancestors[ancestors.length - 1];
+ let type;
- if (t.isStringLiteral(node)) {
+ if (t().isStringLiteral(node)) {
type = "string";
- } else if (t.isNewExpression(parent) && key === "arguments" || t.isCallExpression(parent) && key === "arguments" || t.isFunction(parent) && key === "params") {
+ } else if (t().isNewExpression(parent) && key === "arguments" || t().isCallExpression(parent) && key === "arguments" || t().isFunction(parent) && key === "params") {
type = "param";
- } else if (t.isExpressionStatement(parent)) {
+ } else if (t().isExpressionStatement(parent)) {
type = "statement";
ancestors = ancestors.slice(0, -1);
} else {
@@ -71,38 +99,38 @@ function placeholderVisitorHandler(node, ancestors, state) {
}
state.placeholders.push({
- name: name,
- type: type,
- resolve: function resolve(ast) {
- return resolveAncestors(ast, ancestors);
- },
+ name,
+ type,
+ resolve: ast => resolveAncestors(ast, ancestors),
isDuplicate: state.placeholderNames.has(name)
});
state.placeholderNames.add(name);
}
function resolveAncestors(ast, ancestors) {
- var parent = ast;
+ let parent = ast;
- for (var i = 0; i < ancestors.length - 1; i++) {
- var _ancestors$i = ancestors[i],
- _key = _ancestors$i.key,
- _index = _ancestors$i.index;
+ for (let i = 0; i < ancestors.length - 1; i++) {
+ const {
+ key,
+ index
+ } = ancestors[i];
- if (_index === undefined) {
- parent = parent[_key];
+ if (index === undefined) {
+ parent = parent[key];
} else {
- parent = parent[_key][_index];
+ parent = parent[key][index];
}
}
- var _ancestors2 = ancestors[ancestors.length - 1],
- key = _ancestors2.key,
- index = _ancestors2.index;
+ const {
+ key,
+ index
+ } = ancestors[ancestors.length - 1];
return {
- parent: parent,
- key: key,
- index: index
+ parent,
+ key,
+ index
};
}
@@ -114,15 +142,15 @@ function parseWithCodeFrame(code, parserOpts) {
}, parserOpts);
try {
- return (0, _babylon.parse)(code, parserOpts);
+ return (0, _parser().parse)(code, parserOpts);
} catch (err) {
- var loc = err.loc;
+ const loc = err.loc;
if (loc) {
- err.loc = null;
- err.message += "\n" + (0, _codeFrame.codeFrameColumns)(code, {
+ err.message += "\n" + (0, _codeFrame().codeFrameColumns)(code, {
start: loc
});
+ err.code = "BABEL_TEMPLATE_PARSE_ERROR";
}
throw err;
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
index 1a358f7ba0..c69f7fdfe2 100644
--- 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
@@ -1,33 +1,47 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = populatePlaceholders;
-var t = _interopRequireWildcard(require("@babel/types"));
+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) {
- var ast = t.cloneDeep(metadata.ast);
+ const ast = t().cloneNode(metadata.ast);
if (replacements) {
- metadata.placeholders.forEach(function (placeholder) {
+ metadata.placeholders.forEach(placeholder => {
if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) {
- throw new Error("No substitution given for \"" + 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(function (key) {
+ Object.keys(replacements).forEach(key => {
if (!metadata.placeholderNames.has(key)) {
- throw new Error("Unknown substitution \"" + key + "\" given");
+ throw new Error(`Unknown substitution "${key}" given`);
}
});
}
- metadata.placeholders.slice().reverse().forEach(function (placeholder) {
+ 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;
+ e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`;
throw e;
}
});
@@ -37,58 +51,57 @@ function populatePlaceholders(metadata, replacements) {
function applyReplacement(placeholder, ast, replacement) {
if (placeholder.isDuplicate) {
if (Array.isArray(replacement)) {
- replacement = replacement.map(function (node) {
- return t.cloneDeep(node);
- });
+ replacement = replacement.map(node => t().cloneNode(node));
} else if (typeof replacement === "object") {
- replacement = t.cloneDeep(replacement);
+ replacement = t().cloneNode(replacement);
}
}
- var _placeholder$resolve = placeholder.resolve(ast),
- parent = _placeholder$resolve.parent,
- key = _placeholder$resolve.key,
- index = _placeholder$resolve.index;
+ const {
+ parent,
+ key,
+ index
+ } = placeholder.resolve(ast);
if (placeholder.type === "string") {
if (typeof replacement === "string") {
- replacement = t.stringLiteral(replacement);
+ replacement = t().stringLiteral(replacement);
}
- if (!replacement || !t.isStringLiteral(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();
+ replacement = t().emptyStatement();
} else if (Array.isArray(replacement)) {
- replacement = t.blockStatement(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);
+ 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);
+ replacement = t().identifier(replacement);
}
- if (!t.isStatement(replacement)) {
- replacement = t.expressionStatement(replacement);
+ if (!t().isStatement(replacement)) {
+ replacement = t().expressionStatement(replacement);
}
}
}
} else if (placeholder.type === "param") {
if (typeof replacement === "string") {
- replacement = t.identifier(replacement);
+ replacement = t().identifier(replacement);
}
if (index === undefined) throw new Error("Assertion failure.");
} else {
if (typeof replacement === "string") {
- replacement = t.identifier(replacement);
+ replacement = t().identifier(replacement);
}
if (Array.isArray(replacement)) {
@@ -97,16 +110,16 @@ function applyReplacement(placeholder, ast, replacement) {
}
if (index === undefined) {
- t.validate(parent, key, replacement);
+ t().validate(parent, key, replacement);
parent[key] = replacement;
} else {
- var items = parent[key].slice();
+ 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.apply(items, [index, 1].concat(replacement));
+ items.splice(index, 1, ...replacement);
} else {
items[index] = replacement;
}
@@ -114,7 +127,7 @@ function applyReplacement(placeholder, ast, replacement) {
items[index] = replacement;
}
- t.validate(parent, key, items);
+ 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-eslint/node_modules/@babel/template/lib/string.js
index 3e8f198d8d..02ad45782e 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/string.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/string.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = stringTemplate;
var _options = require("./options");
@@ -13,9 +15,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
function stringTemplate(formatter, code, opts) {
code = formatter.code(code);
- var metadata;
- return function (arg) {
- var replacements = (0, _options.normalizeReplacements)(arg);
+ let metadata;
+ return arg => {
+ const replacements = (0, _options.normalizeReplacements)(arg);
if (!metadata) metadata = (0, _parse.default)(formatter, code, opts);
return formatter.unwrap((0, _populate.default)(metadata, replacements));
};
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
index e0f4a71a62..6090da2691 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/template/package.json
@@ -1,38 +1,13 @@
{
- "_from": "@babel/template@7.0.0-beta.36",
- "_id": "@babel/template@7.0.0-beta.36",
- "_inBundle": false,
- "_integrity": "sha512-mUBi90WRyZ9iVvlWLEdeo8gn/tROyJdjKNC4W5xJTSZL+9MS89rTJSqiaJKXIkxk/YRDL/g/8snrG/O0xl33uA==",
- "_location": "/babel-eslint/@babel/template",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "@babel/template@7.0.0-beta.36",
- "name": "@babel/template",
- "escapedName": "@babel%2ftemplate",
- "scope": "@babel",
- "rawSpec": "7.0.0-beta.36",
- "saveSpec": null,
- "fetchSpec": "7.0.0-beta.36"
- },
- "_requiredBy": [
- "/babel-eslint/@babel/helper-function-name"
- ],
- "_resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.36.tgz",
- "_shasum": "02e903de5d68bd7899bce3c5b5447e59529abb00",
- "_spec": "@babel/template@7.0.0-beta.36",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/@babel/helper-function-name",
"author": {
"name": "Sebastian McKenzie",
"email": "sebmck@gmail.com"
},
"bundleDependencies": false,
"dependencies": {
- "@babel/code-frame": "7.0.0-beta.36",
- "@babel/types": "7.0.0-beta.36",
- "babylon": "7.0.0-beta.36",
- "lodash": "^4.2.0"
+ "@babel/code-frame": "^7.0.0",
+ "@babel/parser": "^7.2.2",
+ "@babel/types": "^7.2.2"
},
"deprecated": false,
"description": "Generate an AST from a string template.",
@@ -40,9 +15,12 @@
"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.0.0-beta.36"
-}
+ "version": "7.2.2"
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/LICENSE b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/LICENSE
new file mode 100644
index 0000000000..f31575ec77
--- /dev/null
+++ b/tools/node_modules/babel-eslint/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-eslint/node_modules/@babel/traverse/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/README.md
index a25ffe70a5..61dc580065 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/README.md
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/README.md
@@ -1,33 +1,19 @@
# @babel/traverse
-> @babel/traverse maintains the overall tree state, and is responsible for replacing, removing, and adding nodes.
+> 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 @babel/traverse
+npm install --save-dev @babel/traverse
```
-## Usage
-
-We can use it alongside Babylon to traverse and update nodes:
-
-```js
-import * as babylon from "babylon";
-import traverse from "@babel/traverse";
+or using yarn:
-const code = `function square(n) {
- return n * n;
-}`;
-
-const ast = babylon.parse(code);
-
-traverse(ast, {
- enter(path) {
- if (path.isIdentifier({ name: "n" })) {
- path.node.name = "x";
- }
- }
-});
+```sh
+yarn add @babel/traverse --dev
```
-[:book: **Read the full docs here**](https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#babel-traverse)
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/cache.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/cache.js
index f274059252..89f200777b 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/cache.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/cache.js
@@ -1,13 +1,15 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.clear = clear;
exports.clearPath = clearPath;
exports.clearScope = clearScope;
exports.scope = exports.path = void 0;
-var path = new WeakMap();
+let path = new WeakMap();
exports.path = path;
-var scope = new WeakMap();
+let scope = new WeakMap();
exports.scope = scope;
function clear() {
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
index 28e3d17a67..7becbcd257 100644
--- 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
@@ -1,24 +1,30 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = void 0;
-var _path4 = _interopRequireDefault(require("./path"));
+var _path = _interopRequireDefault(require("./path"));
-var t = _interopRequireWildcard(require("@babel/types"));
+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 }; }
-var testing = process.env.NODE_ENV === "test";
+const testing = process.env.NODE_ENV === "test";
-var TraversalContext = function () {
- function TraversalContext(scope, opts, state, parentPath) {
- this.parentPath = void 0;
- this.scope = void 0;
- this.state = void 0;
- this.opts = void 0;
+class TraversalContext {
+ constructor(scope, opts, state, parentPath) {
this.queue = null;
this.parentPath = parentPath;
this.scope = scope;
@@ -26,45 +32,31 @@ var TraversalContext = function () {
this.opts = opts;
}
- var _proto = TraversalContext.prototype;
-
- _proto.shouldVisit = function shouldVisit(node) {
- var opts = this.opts;
+ shouldVisit(node) {
+ const opts = this.opts;
if (opts.enter || opts.exit) return true;
if (opts[node.type]) return true;
- var keys = t.VISITOR_KEYS[node.type];
+ const keys = t().VISITOR_KEYS[node.type];
if (!keys || !keys.length) return false;
- for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
-
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
-
- var _key = _ref;
- if (node[_key]) return true;
+ for (const key of keys) {
+ if (node[key]) return true;
}
return false;
- };
+ }
- _proto.create = function create(node, obj, key, listKey) {
- return _path4.default.get({
+ create(node, obj, key, listKey) {
+ return _path.default.get({
parentPath: this.parentPath,
parent: node,
container: obj,
key: key,
- listKey: listKey
+ listKey
});
- };
+ }
- _proto.maybeQueue = function maybeQueue(path, notPriority) {
+ maybeQueue(path, notPriority) {
if (this.trap) {
throw new Error("Infinite cycle detected");
}
@@ -76,14 +68,14 @@ var TraversalContext = function () {
this.priorityQueue.push(path);
}
}
- };
+ }
- _proto.visitMultiple = function visitMultiple(container, parent, listKey) {
+ visitMultiple(container, parent, listKey) {
if (container.length === 0) return false;
- var queue = [];
+ const queue = [];
- for (var key = 0; key < container.length; key++) {
- var node = container[key];
+ 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));
@@ -91,52 +83,39 @@ var TraversalContext = function () {
}
return this.visitQueue(queue);
- };
+ }
- _proto.visitSingle = function visitSingle(node, key) {
+ visitSingle(node, key) {
if (this.shouldVisit(node[key])) {
return this.visitQueue([this.create(node, node, key)]);
} else {
return false;
}
- };
+ }
- _proto.visitQueue = function visitQueue(queue) {
+ visitQueue(queue) {
this.queue = queue;
this.priorityQueue = [];
- var visited = [];
- var stop = false;
-
- for (var _iterator2 = queue, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
- var _ref2;
-
- if (_isArray2) {
- if (_i2 >= _iterator2.length) break;
- _ref2 = _iterator2[_i2++];
- } else {
- _i2 = _iterator2.next();
- if (_i2.done) break;
- _ref2 = _i2.value;
- }
+ const visited = [];
+ let stop = false;
- var _path2 = _ref2;
+ for (const path of queue) {
+ path.resync();
- _path2.resync();
-
- if (_path2.contexts.length === 0 || _path2.contexts[_path2.contexts.length - 1] !== this) {
- _path2.pushContext(this);
+ if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
+ path.pushContext(this);
}
- if (_path2.key === null) continue;
+ if (path.key === null) continue;
if (testing && queue.length >= 10000) {
this.trap = true;
}
- if (visited.indexOf(_path2.node) >= 0) continue;
- visited.push(_path2.node);
+ if (visited.indexOf(path.node) >= 0) continue;
+ visited.push(path.node);
- if (_path2.visit()) {
+ if (path.visit()) {
stop = true;
break;
}
@@ -149,29 +128,16 @@ var TraversalContext = function () {
}
}
- for (var _iterator3 = queue, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
- var _ref3;
-
- if (_isArray3) {
- if (_i3 >= _iterator3.length) break;
- _ref3 = _iterator3[_i3++];
- } else {
- _i3 = _iterator3.next();
- if (_i3.done) break;
- _ref3 = _i3.value;
- }
-
- var _path3 = _ref3;
-
- _path3.popContext();
+ for (const path of queue) {
+ path.popContext();
}
this.queue = null;
return stop;
- };
+ }
- _proto.visit = function visit(node, key) {
- var nodes = node[key];
+ visit(node, key) {
+ const nodes = node[key];
if (!nodes) return false;
if (Array.isArray(nodes)) {
@@ -179,9 +145,8 @@ var TraversalContext = function () {
} else {
return this.visitSingle(node, key);
}
- };
+ }
- return TraversalContext;
-}();
+}
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-eslint/node_modules/@babel/traverse/lib/hub.js
index d10c2aa86c..fe139d2a8f 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/hub.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/hub.js
@@ -1,10 +1,23 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = void 0;
-var Hub = function Hub(file) {
- this.file = file;
-};
+class Hub {
+ getCode() {}
+
+ getScope() {}
+
+ addHelper() {
+ throw new Error("Helpers are not supported by the default hub.");
+ }
+
+ buildError(node, msg, Error = TypeError) {
+ return new Error(msg);
+ }
+
+}
exports.default = Hub; \ 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
index 5e95ffe5a1..1865e2abc8 100644
--- 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
@@ -1,8 +1,28 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = traverse;
-exports.visitors = exports.Hub = exports.Scope = exports.NodePath = void 0;
+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"));
@@ -10,24 +30,34 @@ var visitors = _interopRequireWildcard(require("./visitors"));
exports.visitors = visitors;
-var _includes = _interopRequireDefault(require("lodash/includes"));
+function _includes() {
+ const data = _interopRequireDefault(require("lodash/includes"));
+
+ _includes = function () {
+ return data;
+ };
+
+ return data;
+}
-var t = _interopRequireWildcard(require("@babel/types"));
+function t() {
+ const data = _interopRequireWildcard(require("@babel/types"));
+
+ t = function () {
+ return data;
+ };
+
+ return data;
+}
var cache = _interopRequireWildcard(require("./cache"));
var _path = _interopRequireDefault(require("./path"));
-exports.NodePath = _path.default;
-
var _scope = _interopRequireDefault(require("./scope"));
-exports.Scope = _scope.default;
-
var _hub = _interopRequireDefault(require("./hub"));
-exports.Hub = _hub.default;
-
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 }; }
@@ -38,7 +68,7 @@ function traverse(parent, opts, scope, state, parentPath) {
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.");
+ 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.");
}
}
@@ -51,39 +81,27 @@ traverse.verify = visitors.verify;
traverse.explode = visitors.explode;
traverse.cheap = function (node, enter) {
- return t.traverseFast(node, enter);
+ return t().traverseFast(node, enter);
};
traverse.node = function (node, opts, scope, state, parentPath, skipKeys) {
- var keys = t.VISITOR_KEYS[node.type];
+ const keys = t().VISITOR_KEYS[node.type];
if (!keys) return;
- var context = new _context.default(scope, opts, state, parentPath);
-
- for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
-
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
+ const context = new _context.default(scope, opts, state, parentPath);
- var _key = _ref;
- if (skipKeys && skipKeys[_key]) continue;
- if (context.visit(node, _key)) return;
+ 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);
+ t().removeProperties(node, opts);
cache.path.delete(node);
};
traverse.removeProperties = function (tree, opts) {
- t.traverseFast(tree, traverse.clearNode, opts);
+ t().traverseFast(tree, traverse.clearNode, opts);
return tree;
};
@@ -95,9 +113,9 @@ function hasBlacklistedType(path, state) {
}
traverse.hasType = function (tree, type, blacklistTypes) {
- if ((0, _includes.default)(blacklistTypes, tree.type)) return false;
+ if ((0, _includes().default)(blacklistTypes, tree.type)) return false;
if (tree.type === type) return true;
- var state = {
+ const state = {
has: false,
type: type
};
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
index 489628f779..60e6a98f0b 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.findParent = findParent;
exports.find = find;
exports.getFunctionParent = getFunctionParent;
@@ -12,7 +14,15 @@ exports.isAncestor = isAncestor;
exports.isDescendant = isDescendant;
exports.inType = inType;
-var t = _interopRequireWildcard(require("@babel/types"));
+function t() {
+ const data = _interopRequireWildcard(require("@babel/types"));
+
+ t = function () {
+ return data;
+ };
+
+ return data;
+}
var _index = _interopRequireDefault(require("./index"));
@@ -21,7 +31,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
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) {
- var path = this;
+ let path = this;
while (path = path.parentPath) {
if (callback(path)) return path;
@@ -31,7 +41,7 @@ function findParent(callback) {
}
function find(callback) {
- var path = this;
+ let path = this;
do {
if (callback(path)) return path;
@@ -41,13 +51,11 @@ function find(callback) {
}
function getFunctionParent() {
- return this.findParent(function (p) {
- return p.isFunction();
- });
+ return this.findParent(p => p.isFunction());
}
function getStatementParent() {
- var path = this;
+ let path = this;
do {
if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
@@ -66,13 +74,11 @@ function getStatementParent() {
function getEarliestCommonAncestorFrom(paths) {
return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) {
- var earliest;
- var keys = t.VISITOR_KEYS[deepest.type];
- var _arr = ancestries;
+ let earliest;
+ const keys = t().VISITOR_KEYS[deepest.type];
- for (var _i = 0; _i < _arr.length; _i++) {
- var ancestry = _arr[_i];
- var path = ancestry[i + 1];
+ for (const ancestry of ancestries) {
+ const path = ancestry[i + 1];
if (!earliest) {
earliest = path;
@@ -86,8 +92,8 @@ function getEarliestCommonAncestorFrom(paths) {
}
}
- var earliestKeyIndex = keys.indexOf(earliest.parentKey);
- var currentKeyIndex = keys.indexOf(path.parentKey);
+ const earliestKeyIndex = keys.indexOf(earliest.parentKey);
+ const currentKeyIndex = keys.indexOf(path.parentKey);
if (earliestKeyIndex > currentKeyIndex) {
earliest = path;
@@ -99,8 +105,6 @@ function getEarliestCommonAncestorFrom(paths) {
}
function getDeepestCommonAncestorFrom(paths, filter) {
- var _this = this;
-
if (!paths.length) {
return this;
}
@@ -109,14 +113,14 @@ function getDeepestCommonAncestorFrom(paths, filter) {
return paths[0];
}
- var minDepth = Infinity;
- var lastCommonIndex, lastCommon;
- var ancestries = paths.map(function (path) {
- var ancestry = [];
+ let minDepth = Infinity;
+ let lastCommonIndex, lastCommon;
+ const ancestries = paths.map(path => {
+ const ancestry = [];
do {
ancestry.unshift(path);
- } while ((path = path.parentPath) && path !== _this);
+ } while ((path = path.parentPath) && path !== this);
if (ancestry.length < minDepth) {
minDepth = ancestry.length;
@@ -124,15 +128,12 @@ function getDeepestCommonAncestorFrom(paths, filter) {
return ancestry;
});
- var first = ancestries[0];
-
- depthLoop: for (var i = 0; i < minDepth; i++) {
- var shouldMatch = first[i];
- var _arr2 = ancestries;
+ const first = ancestries[0];
- for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
- var ancestry = _arr2[_i2];
+ depthLoop: for (let i = 0; i < minDepth; i++) {
+ const shouldMatch = first[i];
+ for (const ancestry of ancestries) {
if (ancestry[i] !== shouldMatch) {
break depthLoop;
}
@@ -154,8 +155,8 @@ function getDeepestCommonAncestorFrom(paths, filter) {
}
function getAncestry() {
- var path = this;
- var paths = [];
+ let path = this;
+ const paths = [];
do {
paths.push(path);
@@ -169,19 +170,14 @@ function isAncestor(maybeDescendant) {
}
function isDescendant(maybeAncestor) {
- return !!this.findParent(function (parent) {
- return parent === maybeAncestor;
- });
+ return !!this.findParent(parent => parent === maybeAncestor);
}
function inType() {
- var path = this;
+ let path = this;
while (path) {
- var _arr3 = arguments;
-
- for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
- var type = _arr3[_i3];
+ for (const type of arguments) {
if (path.node.type === type) return true;
}
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
index 5a1d7e25c0..09ec514b91 100644
--- 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
@@ -1,25 +1,35 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.shareCommentsWithSiblings = shareCommentsWithSiblings;
exports.addComment = addComment;
exports.addComments = addComments;
-var t = _interopRequireWildcard(require("@babel/types"));
+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;
- var node = this.node;
+ const node = this.node;
if (!node) return;
- var trailing = node.trailingComments;
- var leading = node.leadingComments;
+ const trailing = node.trailingComments;
+ const leading = node.leadingComments;
if (!trailing && !leading) return;
- var prev = this.getSibling(this.key - 1);
- var next = this.getSibling(this.key + 1);
- var hasPrev = Boolean(prev.node);
- var hasNext = Boolean(next.node);
+ 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);
@@ -29,9 +39,9 @@ function shareCommentsWithSiblings() {
}
function addComment(type, content, line) {
- t.addComment(this.node, type, content, line);
+ t().addComment(this.node, type, content, line);
}
function addComments(type, comments) {
- t.addComments(this.node, 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
index 8413e8727a..53516aa845 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.call = call;
exports._call = _call;
exports.isBlacklisted = isBlacklisted;
@@ -27,7 +29,7 @@ var _index = _interopRequireDefault(require("../index"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function call(key) {
- var opts = this.opts;
+ const opts = this.opts;
this.debug(key);
if (this.node) {
@@ -44,31 +46,18 @@ function call(key) {
function _call(fns) {
if (!fns) return false;
- for (var _iterator = fns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
-
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
-
- var _fn = _ref;
- if (!_fn) continue;
- var node = this.node;
+ for (const fn of fns) {
+ if (!fn) continue;
+ const node = this.node;
if (!node) return true;
-
- var ret = _fn.call(this.state, this, this.state);
+ 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 an plugin with an async traversay visitors, " + "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.");
+ 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);
+ throw new Error(`Unexpected return value from visitor method ${fn}`);
}
if (this.node !== node) return true;
@@ -79,7 +68,7 @@ function _call(fns) {
}
function isBlacklisted() {
- var blacklist = this.opts.blacklist;
+ const blacklist = this.opts.blacklist;
return blacklist && blacklist.indexOf(this.node.type) > -1;
}
@@ -124,8 +113,8 @@ function stop() {
function setScope() {
if (this.opts && this.opts.noScope) return;
- var path = this.parentPath;
- var target;
+ let path = this.parentPath;
+ let target;
while (path && !target) {
if (path.opts && path.opts.noScope) return;
@@ -174,13 +163,13 @@ function _resyncKey() {
if (this.node === this.container[this.key]) return;
if (Array.isArray(this.container)) {
- for (var i = 0; i < this.container.length; i++) {
+ for (let i = 0; i < this.container.length; i++) {
if (this.container[i] === this.node) {
return this.setKey(i);
}
}
} else {
- for (var key in this.container) {
+ for (const key in this.container) {
if (this.container[key] === this.node) {
return this.setKey(key);
}
@@ -192,7 +181,7 @@ function _resyncKey() {
function _resyncList() {
if (!this.parent || !this.inList) return;
- var newContainer = this.parent[this.listKey];
+ const newContainer = this.parent[this.listKey];
if (this.container === newContainer) return;
this.container = newContainer || null;
}
@@ -233,35 +222,18 @@ function setKey(key) {
this.type = this.node && this.node.type;
}
-function requeue(pathToQueue) {
- if (pathToQueue === void 0) {
- pathToQueue = this;
- }
-
+function requeue(pathToQueue = this) {
if (pathToQueue.removed) return;
- var contexts = this.contexts;
-
- for (var _iterator2 = contexts, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
- var _ref2;
-
- if (_isArray2) {
- if (_i2 >= _iterator2.length) break;
- _ref2 = _iterator2[_i2++];
- } else {
- _i2 = _iterator2.next();
- if (_i2.done) break;
- _ref2 = _i2.value;
- }
-
- var _context = _ref2;
+ const contexts = this.contexts;
- _context.maybeQueue(pathToQueue);
+ for (const context of contexts) {
+ context.maybeQueue(pathToQueue);
}
}
function _getQueueContexts() {
- var path = this;
- var contexts = this.contexts;
+ let path = this;
+ let contexts = this.contexts;
while (!contexts.length) {
path = path.parentPath;
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
index 28b52ebf2f..9faa9053bc 100644
--- 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
@@ -1,23 +1,41 @@
"use strict";
-exports.__esModule = true;
+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"));
+function t() {
+ const data = _interopRequireWildcard(require("@babel/types"));
-var _helperFunctionName = _interopRequireDefault(require("@babel/helper-function-name"));
+ 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() {
- var node = this.node;
- var key;
+ const node = this.node;
+ let key;
if (this.isMemberExpression()) {
key = node.property;
@@ -28,15 +46,15 @@ function toComputedKey() {
}
if (!node.computed) {
- if (t.isIdentifier(key)) key = t.stringLiteral(key.name);
+ if (t().isIdentifier(key)) key = t().stringLiteral(key.name);
}
return key;
}
function ensureBlock() {
- var body = this.get("body");
- var bodyNode = body.node;
+ 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");
@@ -50,10 +68,10 @@ function ensureBlock() {
return bodyNode;
}
- var statements = [];
- var stringPath = "body";
- var key;
- var listKey;
+ const statements = [];
+ let stringPath = "body";
+ let key;
+ let listKey;
if (body.isStatement()) {
listKey = "body";
@@ -64,15 +82,15 @@ function ensureBlock() {
if (this.isFunction()) {
key = "argument";
- statements.push(t.returnStatement(body.node));
+ statements.push(t().returnStatement(body.node));
} else {
key = "expression";
- statements.push(t.expressionStatement(body.node));
+ statements.push(t().expressionStatement(body.node));
}
}
- this.node.body = t.blockStatement(statements);
- var parentPath = this.get(stringPath);
+ 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;
}
@@ -90,117 +108,113 @@ function unwrapFunctionEnvironment() {
hoistFunctionEnvironment(this);
}
-function arrowFunctionToExpression(_temp) {
- var _ref = _temp === void 0 ? {} : _temp,
- _ref$allowInsertArrow = _ref.allowInsertArrow,
- allowInsertArrow = _ref$allowInsertArrow === void 0 ? true : _ref$allowInsertArrow,
- _ref$specCompliant = _ref.specCompliant,
- specCompliant = _ref$specCompliant === void 0 ? false : _ref$specCompliant;
-
+function arrowFunctionToExpression({
+ allowInsertArrow = true,
+ specCompliant = false
+} = {}) {
if (!this.isArrowFunctionExpression()) {
throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");
}
- var thisBinding = hoistFunctionEnvironment(this, specCompliant, allowInsertArrow);
+ const thisBinding = hoistFunctionEnvironment(this, specCompliant, allowInsertArrow);
this.ensureBlock();
this.node.type = "FunctionExpression";
if (specCompliant) {
- var checkBinding = thisBinding ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId");
+ const checkBinding = thisBinding ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId");
if (checkBinding) {
this.parentPath.scope.push({
id: checkBinding,
- init: t.objectExpression([])
+ init: t().objectExpression([])
});
}
- this.get("body").unshiftContainer("body", t.expressionStatement(t.callExpression(this.hub.file.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()]));
+ 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, allowInsertArrow) {
- if (specCompliant === void 0) {
- specCompliant = false;
- }
-
- if (allowInsertArrow === void 0) {
- allowInsertArrow = true;
- }
-
- var thisEnvFn = fnPath.findParent(function (p) {
+function hoistFunctionEnvironment(fnPath, specCompliant = false, allowInsertArrow = true) {
+ const thisEnvFn = fnPath.findParent(p => {
return p.isFunction() && !p.isArrowFunctionExpression() || p.isProgram() || p.isClassProperty({
static: false
});
});
- var inConstructor = thisEnvFn && thisEnvFn.node.kind === "constructor";
+ const inConstructor = thisEnvFn && thisEnvFn.node.kind === "constructor";
if (thisEnvFn.isClassProperty()) {
throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
}
- var _getScopeInformation = getScopeInformation(fnPath),
- thisPaths = _getScopeInformation.thisPaths,
- argumentsPaths = _getScopeInformation.argumentsPaths,
- newTargetPaths = _getScopeInformation.newTargetPaths,
- superProps = _getScopeInformation.superProps,
- superCalls = _getScopeInformation.superCalls;
+ 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");
}
- var allSuperCalls = [];
+ const allSuperCalls = [];
thisEnvFn.traverse({
- Function: function Function(child) {
+ Function(child) {
if (child.isArrowFunctionExpression()) return;
child.skip();
},
- ClassProperty: function ClassProperty(child) {
- if (child.node.static) return;
+
+ ClassProperty(child) {
child.skip();
},
- CallExpression: function CallExpression(child) {
+
+ CallExpression(child) {
if (!child.get("callee").isSuper()) return;
allSuperCalls.push(child);
}
+
});
- var superBinding = getSuperBinding(thisEnvFn);
- allSuperCalls.forEach(function (superCall) {
- return superCall.get("callee").replaceWith(t.identifier(superBinding));
+ const superBinding = getSuperBinding(thisEnvFn);
+ allSuperCalls.forEach(superCall => {
+ const callee = t().identifier(superBinding);
+ callee.loc = superCall.node.callee.loc;
+ superCall.get("callee").replaceWith(callee);
});
}
- var thisBinding;
+ let thisBinding;
if (thisPaths.length > 0 || specCompliant) {
thisBinding = getThisBinding(thisEnvFn, inConstructor);
if (!specCompliant || inConstructor && hasSuperClass(thisEnvFn)) {
- thisPaths.forEach(function (thisChild) {
- thisChild.replaceWith(thisChild.isJSX() ? t.jsxIdentifier(thisBinding) : t.identifier(thisBinding));
+ 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) {
- var argumentsBinding = getBinding(thisEnvFn, "arguments", function () {
- return t.identifier("arguments");
- });
- argumentsPaths.forEach(function (argumentsChild) {
- argumentsChild.replaceWith(t.identifier(argumentsBinding));
+ 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) {
- var newTargetBinding = getBinding(thisEnvFn, "newtarget", function () {
- return t.metaProperty(t.identifier("new"), t.identifier("target"));
- });
- newTargetPaths.forEach(function (argumentsChild) {
- argumentsChild.replaceWith(t.identifier(newTargetBinding));
+ 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);
});
}
@@ -209,43 +223,39 @@ function hoistFunctionEnvironment(fnPath, specCompliant, allowInsertArrow) {
throw superProps[0].buildCodeFrameError("Unable to handle nested super.prop usage");
}
- var flatSuperProps = superProps.reduce(function (acc, superProp) {
- return acc.concat(standardizeSuperProperty(superProp));
- }, []);
- flatSuperProps.forEach(function (superProp) {
- var key = superProp.node.computed ? "" : superProp.get("property").node.name;
+ 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
})) {
- var _superBinding = getSuperPropCallBinding(thisEnvFn, key);
+ const superBinding = getSuperPropCallBinding(thisEnvFn, key);
if (superProp.node.computed) {
- var prop = superProp.get("property").node;
- superProp.replaceWith(t.identifier(_superBinding));
+ const prop = superProp.get("property").node;
+ superProp.replaceWith(t().identifier(superBinding));
superProp.parentPath.node.arguments.unshift(prop);
} else {
- superProp.replaceWith(t.identifier(_superBinding));
+ superProp.replaceWith(t().identifier(superBinding));
}
} else {
- var isAssignment = superProp.parentPath.isAssignmentExpression({
+ const isAssignment = superProp.parentPath.isAssignmentExpression({
left: superProp.node
});
-
- var _superBinding2 = getSuperPropBinding(thisEnvFn, isAssignment, key);
-
- var args = [];
+ const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key);
+ const args = [];
if (superProp.node.computed) {
args.push(superProp.get("property").node);
}
if (isAssignment) {
- var value = superProp.parentPath.node.right;
+ const value = superProp.parentPath.node.right;
args.push(value);
- superProp.parentPath.replaceWith(t.callExpression(t.identifier(_superBinding2), args));
+ superProp.parentPath.replaceWith(t().callExpression(t().identifier(superBinding), args));
} else {
- superProp.replaceWith(t.callExpression(t.identifier(_superBinding2), args));
+ superProp.replaceWith(t().callExpression(t().identifier(superBinding), args));
}
}
});
@@ -256,36 +266,34 @@ function hoistFunctionEnvironment(fnPath, specCompliant, allowInsertArrow) {
function standardizeSuperProperty(superProp) {
if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") {
- var assignmentPath = superProp.parentPath;
- var op = assignmentPath.node.operator.slice(0, -1);
- var value = assignmentPath.node.right;
+ const assignmentPath = superProp.parentPath;
+ const op = assignmentPath.node.operator.slice(0, -1);
+ const value = assignmentPath.node.right;
assignmentPath.node.operator = "=";
if (superProp.node.computed) {
- var 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));
+ 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));
+ 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()) {
- var updateExpr = superProp.parentPath;
-
- var _tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
-
- var computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null;
- var 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)))];
+ 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));
+ parts.push(t().identifier(tmp.name));
}
- updateExpr.replaceWith(t.sequenceExpression(parts));
- var left = updateExpr.get("expressions.0.right");
- var right = updateExpr.get("expressions.1.left");
+ updateExpr.replaceWith(t().sequenceExpression(parts));
+ const left = updateExpr.get("expressions.0.right");
+ const right = updateExpr.get("expressions.1.left");
return [left, right];
}
@@ -297,83 +305,85 @@ function hasSuperClass(thisEnvFn) {
}
function getThisBinding(thisEnvFn, inConstructor) {
- return getBinding(thisEnvFn, "this", function (thisBinding) {
- if (!inConstructor || !hasSuperClass(thisEnvFn)) return t.thisExpression();
- var supers = new WeakSet();
+ return getBinding(thisEnvFn, "this", thisBinding => {
+ if (!inConstructor || !hasSuperClass(thisEnvFn)) return t().thisExpression();
+ const supers = new WeakSet();
thisEnvFn.traverse({
- Function: function Function(child) {
+ Function(child) {
if (child.isArrowFunctionExpression()) return;
child.skip();
},
- ClassProperty: function ClassProperty(child) {
- if (child.node.static) return;
+
+ ClassProperty(child) {
child.skip();
},
- CallExpression: function CallExpression(child) {
+
+ CallExpression(child) {
if (!child.get("callee").isSuper()) return;
if (supers.has(child.node)) return;
supers.add(child.node);
- child.replaceWith(t.assignmentExpression("=", t.identifier(thisBinding), child.node));
+ child.replaceWithMultiple([child.node, t().assignmentExpression("=", t().identifier(thisBinding), t().identifier("this"))]);
}
+
});
});
}
function getSuperBinding(thisEnvFn) {
- return getBinding(thisEnvFn, "supercall", function () {
- var argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
- return t.arrowFunctionExpression([t.restElement(argsBinding)], t.callExpression(t.super(), [t.spreadElement(t.identifier(argsBinding.name))]));
+ 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 || ""), function () {
- var argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
- var argsList = [t.restElement(argsBinding)];
- var fnBody;
+ 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))]);
+ fnBody = t().callExpression(t().memberExpression(t().super(), t().identifier(propName)), [t().spreadElement(t().identifier(argsBinding.name))]);
} else {
- var method = thisEnvFn.scope.generateUidIdentifier("prop");
+ 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))]);
+ fnBody = t().callExpression(t().memberExpression(t().super(), t().identifier(method.name), true), [t().spreadElement(t().identifier(argsBinding.name))]);
}
- return t.arrowFunctionExpression(argsList, fnBody);
+ return t().arrowFunctionExpression(argsList, fnBody);
});
}
function getSuperPropBinding(thisEnvFn, isAssignment, propName) {
- var op = isAssignment ? "set" : "get";
- return getBinding(thisEnvFn, "superprop_" + op + ":" + (propName || ""), function () {
- var argsList = [];
- var fnBody;
+ 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));
+ fnBody = t().memberExpression(t().super(), t().identifier(propName));
} else {
- var method = thisEnvFn.scope.generateUidIdentifier("prop");
+ const method = thisEnvFn.scope.generateUidIdentifier("prop");
argsList.unshift(method);
- fnBody = t.memberExpression(t.super(), t.identifier(method.name), true);
+ fnBody = t().memberExpression(t().super(), t().identifier(method.name), true);
}
if (isAssignment) {
- var valueIdent = thisEnvFn.scope.generateUidIdentifier("value");
+ const valueIdent = thisEnvFn.scope.generateUidIdentifier("value");
argsList.push(valueIdent);
- fnBody = t.assignmentExpression("=", fnBody, t.identifier(valueIdent.name));
+ fnBody = t().assignmentExpression("=", fnBody, t().identifier(valueIdent.name));
}
- return t.arrowFunctionExpression(argsList, fnBody);
+ return t().arrowFunctionExpression(argsList, fnBody);
});
}
function getBinding(thisEnvFn, key, init) {
- var cacheKey = "binding:" + key;
- var data = thisEnvFn.getData(cacheKey);
+ const cacheKey = "binding:" + key;
+ let data = thisEnvFn.getData(cacheKey);
if (!data) {
- var id = thisEnvFn.scope.generateUidIdentifier(key);
+ const id = thisEnvFn.scope.generateUidIdentifier(key);
data = id.name;
thisEnvFn.setData(cacheKey, data);
thisEnvFn.scope.push({
@@ -386,24 +396,26 @@ function getBinding(thisEnvFn, key, init) {
}
function getScopeInformation(fnPath) {
- var thisPaths = [];
- var argumentsPaths = [];
- var newTargetPaths = [];
- var superProps = [];
- var superCalls = [];
+ const thisPaths = [];
+ const argumentsPaths = [];
+ const newTargetPaths = [];
+ const superProps = [];
+ const superCalls = [];
fnPath.traverse({
- ClassProperty: function ClassProperty(child) {
- if (child.node.static) return;
+ ClassProperty(child) {
child.skip();
},
- Function: function Function(child) {
+
+ Function(child) {
if (child.isArrowFunctionExpression()) return;
child.skip();
},
- ThisExpression: function ThisExpression(child) {
+
+ ThisExpression(child) {
thisPaths.push(child);
},
- JSXIdentifier: function JSXIdentifier(child) {
+
+ JSXIdentifier(child) {
if (child.node.name !== "this") return;
if (!child.parentPath.isJSXMemberExpression({
@@ -416,17 +428,21 @@ function getScopeInformation(fnPath) {
thisPaths.push(child);
},
- CallExpression: function CallExpression(child) {
+
+ CallExpression(child) {
if (child.get("callee").isSuper()) superCalls.push(child);
},
- MemberExpression: function MemberExpression(child) {
+
+ MemberExpression(child) {
if (child.get("object").isSuper()) superProps.push(child);
},
- ReferencedIdentifier: function ReferencedIdentifier(child) {
+
+ ReferencedIdentifier(child) {
if (child.node.name !== "arguments") return;
argumentsPaths.push(child);
},
- MetaProperty: function MetaProperty(child) {
+
+ MetaProperty(child) {
if (!child.get("meta").isIdentifier({
name: "new"
})) return;
@@ -435,12 +451,13 @@ function getScopeInformation(fnPath) {
})) return;
newTargetPaths.push(child);
}
+
});
return {
- thisPaths: thisPaths,
- argumentsPaths: argumentsPaths,
- newTargetPaths: newTargetPaths,
- superProps: superProps,
- superCalls: superCalls
+ 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
index ed62dfbc87..61c0a550b1 100644
--- 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
@@ -1,13 +1,15 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.evaluateTruthy = evaluateTruthy;
exports.evaluate = evaluate;
-var VALID_CALLEES = ["String", "Number", "Math"];
-var INVALID_METHODS = ["random"];
+const VALID_CALLEES = ["String", "Number", "Math"];
+const INVALID_METHODS = ["random"];
function evaluateTruthy() {
- var res = this.evaluate();
+ const res = this.evaluate();
if (res.confident) return !!res.value;
}
@@ -18,11 +20,15 @@ function deopt(path, state) {
}
function evaluateCached(path, state) {
- var node = path.node;
- var seen = state.seen;
+ const {
+ node
+ } = path;
+ const {
+ seen
+ } = state;
if (seen.has(node)) {
- var existing = seen.get(node);
+ const existing = seen.get(node);
if (existing.resolved) {
return existing.value;
@@ -31,12 +37,12 @@ function evaluateCached(path, state) {
return;
}
} else {
- var item = {
+ const item = {
resolved: false
};
seen.set(node, item);
- var val = _evaluate(path, state);
+ const val = _evaluate(path, state);
if (state.confident) {
item.resolved = true;
@@ -49,10 +55,12 @@ function evaluateCached(path, state) {
function _evaluate(path, state) {
if (!state.confident) return;
- var node = path.node;
+ const {
+ node
+ } = path;
if (path.isSequenceExpression()) {
- var exprs = path.get("expressions");
+ const exprs = path.get("expressions");
return evaluateCached(exprs[exprs.length - 1], state);
}
@@ -69,9 +77,13 @@ function _evaluate(path, state) {
}
if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) {
- var object = path.get("tag.object");
- var name = object.node.name;
- var property = path.get("tag.property");
+ 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);
@@ -79,7 +91,7 @@ function _evaluate(path, state) {
}
if (path.isConditionalExpression()) {
- var testResult = evaluateCached(path.get("test"), state);
+ const testResult = evaluateCached(path.get("test"), state);
if (!state.confident) return;
if (testResult) {
@@ -96,22 +108,21 @@ function _evaluate(path, state) {
if (path.isMemberExpression() && !path.parentPath.isCallExpression({
callee: node
})) {
- var _property = path.get("property");
-
- var _object = path.get("object");
+ const property = path.get("property");
+ const object = path.get("object");
- if (_object.isLiteral() && _property.isIdentifier()) {
- var value = _object.node.value;
- var type = typeof value;
+ if (object.isLiteral() && property.isIdentifier()) {
+ const value = object.node.value;
+ const type = typeof value;
if (type === "number" || type === "string") {
- return value[_property.node.name];
+ return value[property.node.name];
}
}
}
if (path.isReferencedIdentifier()) {
- var binding = path.scope.getBinding(node.name);
+ const binding = path.scope.getBinding(node.name);
if (binding && binding.constantViolations.length > 0) {
return deopt(binding.path, state);
@@ -132,7 +143,7 @@ function _evaluate(path, state) {
return binding ? deopt(binding.path, state) : NaN;
}
- var resolved = path.resolve();
+ const resolved = path.resolve();
if (resolved === path) {
return deopt(path, state);
@@ -149,13 +160,13 @@ function _evaluate(path, state) {
return undefined;
}
- var argument = path.get("argument");
+ const argument = path.get("argument");
if (node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
return "function";
}
- var arg = evaluateCached(argument, state);
+ const arg = evaluateCached(argument, state);
if (!state.confident) return;
switch (node.operator) {
@@ -177,29 +188,16 @@ function _evaluate(path, state) {
}
if (path.isArrayExpression()) {
- var arr = [];
- var elems = path.get("elements");
-
- for (var _iterator = elems, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
-
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
-
- var _elem = _ref;
+ const arr = [];
+ const elems = path.get("elements");
- var elemValue = _elem.evaluate();
+ for (const elem of elems) {
+ const elemValue = elem.evaluate();
if (elemValue.confident) {
arr.push(elemValue.value);
} else {
- return deopt(_elem, state);
+ return deopt(elem, state);
}
}
@@ -207,32 +205,18 @@ function _evaluate(path, state) {
}
if (path.isObjectExpression()) {
- var obj = {};
- var props = path.get("properties");
+ const obj = {};
+ const props = path.get("properties");
- for (var _iterator2 = props, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
- var _ref2;
-
- if (_isArray2) {
- if (_i2 >= _iterator2.length) break;
- _ref2 = _iterator2[_i2++];
- } else {
- _i2 = _iterator2.next();
- if (_i2.done) break;
- _ref2 = _i2.value;
+ for (const prop of props) {
+ if (prop.isObjectMethod() || prop.isSpreadElement()) {
+ return deopt(prop, state);
}
- var _prop = _ref2;
-
- if (_prop.isObjectMethod() || _prop.isSpreadElement()) {
- return deopt(_prop, state);
- }
+ const keyPath = prop.get("key");
+ let key = keyPath;
- var keyPath = _prop.get("key");
-
- var key = keyPath;
-
- if (_prop.node.computed) {
+ if (prop.node.computed) {
key = key.evaluate();
if (!key.confident) {
@@ -246,155 +230,140 @@ function _evaluate(path, state) {
key = key.node.value;
}
- var valuePath = _prop.get("value");
-
- var _value2 = valuePath.evaluate();
+ const valuePath = prop.get("value");
+ let value = valuePath.evaluate();
- if (!_value2.confident) {
+ if (!value.confident) {
return deopt(valuePath, state);
}
- _value2 = _value2.value;
- obj[key] = _value2;
+ value = value.value;
+ obj[key] = value;
}
return obj;
}
if (path.isLogicalExpression()) {
- var wasConfident = state.confident;
- var left = evaluateCached(path.get("left"), state);
- var leftConfident = state.confident;
+ const wasConfident = state.confident;
+ const left = evaluateCached(path.get("left"), state);
+ const leftConfident = state.confident;
state.confident = wasConfident;
- var right = evaluateCached(path.get("right"), state);
- var rightConfident = state.confident;
- state.confident = leftConfident && rightConfident;
+ const right = evaluateCached(path.get("right"), state);
+ const rightConfident = state.confident;
switch (node.operator) {
case "||":
- if (left && leftConfident) {
- state.confident = true;
- return left;
- }
-
+ state.confident = leftConfident && (!!left || rightConfident);
if (!state.confident) return;
return left || right;
case "&&":
- if (!left && leftConfident || !right && rightConfident) {
- state.confident = true;
- }
-
+ state.confident = leftConfident && (!left || rightConfident);
if (!state.confident) return;
return left && right;
}
}
if (path.isBinaryExpression()) {
- var _left = evaluateCached(path.get("left"), state);
-
+ const left = evaluateCached(path.get("left"), state);
if (!state.confident) return;
-
- var _right = evaluateCached(path.get("right"), state);
-
+ const right = evaluateCached(path.get("right"), state);
if (!state.confident) return;
switch (node.operator) {
case "-":
- return _left - _right;
+ return left - right;
case "+":
- return _left + _right;
+ return left + right;
case "/":
- return _left / _right;
+ return left / right;
case "*":
- return _left * _right;
+ return left * right;
case "%":
- return _left % _right;
+ return left % right;
case "**":
- return Math.pow(_left, _right);
+ return Math.pow(left, right);
case "<":
- return _left < _right;
+ return left < right;
case ">":
- return _left > _right;
+ return left > right;
case "<=":
- return _left <= _right;
+ return left <= right;
case ">=":
- return _left >= _right;
+ return left >= right;
case "==":
- return _left == _right;
+ return left == right;
case "!=":
- return _left != _right;
+ return left != right;
case "===":
- return _left === _right;
+ return left === right;
case "!==":
- return _left !== _right;
+ return left !== right;
case "|":
- return _left | _right;
+ return left | right;
case "&":
- return _left & _right;
+ return left & right;
case "^":
- return _left ^ _right;
+ return left ^ right;
case "<<":
- return _left << _right;
+ return left << right;
case ">>":
- return _left >> _right;
+ return left >> right;
case ">>>":
- return _left >>> _right;
+ return left >>> right;
}
}
if (path.isCallExpression()) {
- var callee = path.get("callee");
- var context;
- var func;
+ 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()) {
- var _object2 = callee.get("object");
+ const object = callee.get("object");
+ const property = callee.get("property");
- var _property2 = callee.get("property");
-
- if (_object2.isIdentifier() && _property2.isIdentifier() && VALID_CALLEES.indexOf(_object2.node.name) >= 0 && INVALID_METHODS.indexOf(_property2.node.name) < 0) {
- context = global[_object2.node.name];
- func = context[_property2.node.name];
+ 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 (_object2.isLiteral() && _property2.isIdentifier()) {
- var _type = typeof _object2.node.value;
+ if (object.isLiteral() && property.isIdentifier()) {
+ const type = typeof object.node.value;
- if (_type === "string" || _type === "number") {
- context = _object2.node.value;
- func = context[_property2.node.name];
+ if (type === "string" || type === "number") {
+ context = object.node.value;
+ func = context[property.node.name];
}
}
}
if (func) {
- var args = path.get("arguments").map(function (arg) {
- return evaluateCached(arg, state);
- });
+ const args = path.get("arguments").map(arg => evaluateCached(arg, state));
if (!state.confident) return;
return func.apply(context, args);
}
@@ -403,31 +372,15 @@ function _evaluate(path, state) {
deopt(path, state);
}
-function evaluateQuasis(path, quasis, state, raw) {
- if (raw === void 0) {
- raw = false;
- }
-
- var str = "";
- var i = 0;
- var exprs = path.get("expressions");
-
- for (var _iterator3 = quasis, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
- var _ref3;
-
- if (_isArray3) {
- if (_i3 >= _iterator3.length) break;
- _ref3 = _iterator3[_i3++];
- } else {
- _i3 = _iterator3.next();
- if (_i3.done) break;
- _ref3 = _i3.value;
- }
+function evaluateQuasis(path, quasis, state, raw = false) {
+ let str = "";
+ let i = 0;
+ const exprs = path.get("expressions");
- var _elem2 = _ref3;
+ for (const elem of quasis) {
if (!state.confident) break;
- str += raw ? _elem2.value.raw : _elem2.value.cooked;
- var expr = exprs[i++];
+ str += raw ? elem.value.raw : elem.value.cooked;
+ const expr = exprs[i++];
if (expr) str += String(evaluateCached(expr, state));
}
@@ -436,12 +389,12 @@ function evaluateQuasis(path, quasis, state, raw) {
}
function evaluate() {
- var state = {
+ const state = {
confident: true,
deoptPath: null,
seen: new Map()
};
- var value = evaluateCached(this, state);
+ let value = evaluateCached(this, state);
if (!state.confident) value = undefined;
return {
confident: state.confident,
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
index da8010d797..42b3fc6959 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.getOpposite = getOpposite;
exports.getCompletionRecords = getCompletionRecords;
exports.getSibling = getSibling;
@@ -18,7 +20,15 @@ exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths;
var _index = _interopRequireDefault(require("./index"));
-var t = _interopRequireWildcard(require("@babel/types"));
+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; } }
@@ -38,7 +48,7 @@ function addCompletionRecords(path, paths) {
}
function getCompletionRecords() {
- var paths = [];
+ let paths = [];
if (this.isIfStatement()) {
paths = addCompletionRecords(this.get("consequent"), paths);
@@ -81,9 +91,9 @@ function getNextSibling() {
}
function getAllNextSiblings() {
- var _key = this.key;
- var sibling = this.getSibling(++_key);
- var siblings = [];
+ let _key = this.key;
+ let sibling = this.getSibling(++_key);
+ const siblings = [];
while (sibling.node) {
siblings.push(sibling);
@@ -94,9 +104,9 @@ function getAllNextSiblings() {
}
function getAllPrevSiblings() {
- var _key = this.key;
- var sibling = this.getSibling(--_key);
- var siblings = [];
+ let _key = this.key;
+ let sibling = this.getSibling(--_key);
+ const siblings = [];
while (sibling.node) {
siblings.push(sibling);
@@ -108,7 +118,7 @@ function getAllPrevSiblings() {
function get(key, context) {
if (context === true) context = this.context;
- var parts = key.split(".");
+ const parts = key.split(".");
if (parts.length === 1) {
return this._getKey(key, context);
@@ -118,16 +128,14 @@ function get(key, context) {
}
function _getKey(key, context) {
- var _this = this;
-
- var node = this.node;
- var container = node[key];
+ const node = this.node;
+ const container = node[key];
if (Array.isArray(container)) {
- return container.map(function (_, i) {
+ return container.map((_, i) => {
return _index.default.get({
listKey: key,
- parentPath: _this,
+ parentPath: this,
parent: node,
container: container,
key: i
@@ -144,12 +152,9 @@ function _getKey(key, context) {
}
function _getPattern(parts, context) {
- var path = this;
- var _arr = parts;
-
- for (var _i = 0; _i < _arr.length; _i++) {
- var part = _arr[_i];
+ let path = this;
+ for (const part of parts) {
if (part === ".") {
path = path.parentPath;
} else {
@@ -165,35 +170,27 @@ function _getPattern(parts, context) {
}
function getBindingIdentifiers(duplicates) {
- return t.getBindingIdentifiers(this.node, duplicates);
+ return t().getBindingIdentifiers(this.node, duplicates);
}
function getOuterBindingIdentifiers(duplicates) {
- return t.getOuterBindingIdentifiers(this.node, duplicates);
+ return t().getOuterBindingIdentifiers(this.node, duplicates);
}
-function getBindingIdentifierPaths(duplicates, outerOnly) {
- if (duplicates === void 0) {
- duplicates = false;
- }
-
- if (outerOnly === void 0) {
- outerOnly = false;
- }
-
- var path = this;
- var search = [].concat(path);
- var ids = Object.create(null);
+function getBindingIdentifierPaths(duplicates = false, outerOnly = false) {
+ const path = this;
+ let search = [].concat(path);
+ const ids = Object.create(null);
while (search.length) {
- var id = search.shift();
+ const id = search.shift();
if (!id) continue;
if (!id.node) continue;
- var keys = t.getBindingIdentifiers.keys[id.node.type];
+ const keys = t().getBindingIdentifiers.keys[id.node.type];
if (id.isIdentifier()) {
if (duplicates) {
- var _ids = ids[id.node.name] = ids[id.node.name] || [];
+ const _ids = ids[id.node.name] = ids[id.node.name] || [];
_ids.push(id);
} else {
@@ -204,7 +201,7 @@ function getBindingIdentifierPaths(duplicates, outerOnly) {
}
if (id.isExportDeclaration()) {
- var declaration = id.get("declaration");
+ const declaration = id.get("declaration");
if (declaration.isDeclaration()) {
search.push(declaration);
@@ -225,9 +222,9 @@ function getBindingIdentifierPaths(duplicates, outerOnly) {
}
if (keys) {
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- var child = id.get(key);
+ 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);
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
index 716eae7ebf..840d71802f 100644
--- 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
@@ -1,22 +1,48 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = void 0;
var virtualTypes = _interopRequireWildcard(require("./lib/virtual-types"));
-var _debug2 = _interopRequireDefault(require("debug"));
+function _debug() {
+ const data = _interopRequireDefault(require("debug"));
-var _invariant = _interopRequireDefault(require("invariant"));
+ _debug = function () {
+ return data;
+ };
+
+ return data;
+}
var _index = _interopRequireDefault(require("../index"));
var _scope = _interopRequireDefault(require("../scope"));
-var t = _interopRequireWildcard(require("@babel/types"));
+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"));
@@ -43,31 +69,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
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; } }
-var _debug = (0, _debug2.default)("babel");
-
-var NodePath = function () {
- function NodePath(hub, parent) {
- this.parent = void 0;
- this.hub = void 0;
- this.contexts = void 0;
- this.data = void 0;
- this.shouldSkip = void 0;
- this.shouldStop = void 0;
- this.removed = void 0;
- this.state = void 0;
- this.opts = void 0;
- this.skipKeys = void 0;
- this.parentPath = void 0;
- this.context = void 0;
- this.container = void 0;
- this.listKey = void 0;
- this.inList = void 0;
- this.parentKey = void 0;
- this.key = void 0;
- this.node = void 0;
- this.scope = void 0;
- this.type = void 0;
- this.typeAnnotation = void 0;
+const debug = (0, _debug().default)("babel");
+
+class NodePath {
+ constructor(hub, parent) {
this.parent = parent;
this.hub = hub;
this.contexts = [];
@@ -91,30 +96,33 @@ var NodePath = function () {
this.typeAnnotation = null;
}
- NodePath.get = function get(_ref) {
- var hub = _ref.hub,
- parentPath = _ref.parentPath,
- parent = _ref.parent,
- container = _ref.container,
- listKey = _ref.listKey,
- key = _ref.key;
-
+ static get({
+ hub,
+ parentPath,
+ parent,
+ container,
+ listKey,
+ key
+ }) {
if (!hub && parentPath) {
hub = parentPath.hub;
}
- (0, _invariant.default)(parent, "To get a node path the parent needs to exist");
- var targetNode = container[key];
- var paths = _cache.path.get(parent) || [];
+ 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);
}
- var path;
+ let path;
- for (var i = 0; i < paths.length; i++) {
- var pathCheck = paths[i];
+ for (let i = 0; i < paths.length; i++) {
+ const pathCheck = paths[i];
if (pathCheck.node === targetNode) {
path = pathCheck;
@@ -129,100 +137,83 @@ var NodePath = function () {
path.setup(parentPath, container, listKey, key);
return path;
- };
-
- var _proto = NodePath.prototype;
+ }
- _proto.getScope = function getScope(scope) {
+ getScope(scope) {
return this.isScope() ? new _scope.default(this) : scope;
- };
+ }
- _proto.setData = function setData(key, val) {
+ setData(key, val) {
return this.data[key] = val;
- };
+ }
- _proto.getData = function getData(key, def) {
- var val = this.data[key];
+ getData(key, def) {
+ let val = this.data[key];
if (!val && def) val = this.data[key] = def;
return val;
- };
-
- _proto.buildCodeFrameError = function buildCodeFrameError(msg, Error) {
- if (Error === void 0) {
- Error = SyntaxError;
- }
+ }
- return this.hub.file.buildCodeFrameError(this.node, msg, Error);
- };
+ buildCodeFrameError(msg, Error = SyntaxError) {
+ return this.hub.buildError(this.node, msg, Error);
+ }
- _proto.traverse = function traverse(visitor, state) {
+ traverse(visitor, state) {
(0, _index.default)(this.node, visitor, this.scope, state, this);
- };
+ }
- _proto.set = function set(key, node) {
- t.validate(this.node, key, node);
+ set(key, node) {
+ t().validate(this.node, key, node);
this.node[key] = node;
- };
+ }
- _proto.getPathLocation = function getPathLocation() {
- var parts = [];
- var path = this;
+ getPathLocation() {
+ const parts = [];
+ let path = this;
do {
- var key = path.key;
- if (path.inList) key = path.listKey + "[" + key + "]";
+ let key = path.key;
+ if (path.inList) key = `${path.listKey}[${key}]`;
parts.unshift(key);
} while (path = path.parentPath);
return parts.join(".");
- };
+ }
- _proto.debug = function debug(message) {
- if (!_debug.enabled) return;
+ debug(message) {
+ if (!debug.enabled) return;
+ debug(`${this.getPathLocation()} ${this.type}: ${message}`);
+ }
- _debug(this.getPathLocation() + " " + this.type + ": " + message);
- };
+ toString() {
+ return (0, _generator().default)(this.node).code;
+ }
- return NodePath;
-}();
+}
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);
-var _loop = function _loop(type) {
- var typeKey = "is" + type;
+for (const type of t().TYPES) {
+ const typeKey = `is${type}`;
+ const fn = t()[typeKey];
NodePath.prototype[typeKey] = function (opts) {
- return t[typeKey](this.node, opts);
+ return fn(this.node, opts);
};
- NodePath.prototype["assert" + type] = function (opts) {
- if (!this[typeKey](opts)) {
- throw new TypeError("Expected node path of type " + type);
+ NodePath.prototype[`assert${type}`] = function (opts) {
+ if (!fn(this.node, opts)) {
+ throw new TypeError(`Expected node path of type ${type}`);
}
};
-};
-
-var _arr = t.TYPES;
-
-for (var _i = 0; _i < _arr.length; _i++) {
- var type = _arr[_i];
-
- _loop(type);
}
-var _loop2 = function _loop2(type) {
- if (type[0] === "_") return "continue";
- if (t.TYPES.indexOf(type) < 0) t.TYPES.push(type);
- var virtualType = virtualTypes[type];
+for (const type in 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) {
+ NodePath.prototype[`is${type}`] = function (opts) {
return virtualType.checkPath(this, opts);
};
-};
-
-for (var type in virtualTypes) {
- var _ret = _loop2(type);
-
- if (_ret === "continue") continue;
} \ 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
index 30d125c20c..80a77d08ae 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.getTypeAnnotation = getTypeAnnotation;
exports._getTypeAnnotation = _getTypeAnnotation;
exports.isBaseType = isBaseType;
@@ -10,34 +12,42 @@ exports.isGenericType = isGenericType;
var inferers = _interopRequireWildcard(require("./inferers"));
-var t = _interopRequireWildcard(require("@babel/types"));
+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;
- var type = this._getTypeAnnotation() || t.anyTypeAnnotation();
- if (t.isTypeAnnotation(type)) type = type.typeAnnotation;
+ let type = this._getTypeAnnotation() || t().anyTypeAnnotation();
+ if (t().isTypeAnnotation(type)) type = type.typeAnnotation;
return this.typeAnnotation = type;
}
function _getTypeAnnotation() {
- var node = this.node;
+ const node = this.node;
if (!node) {
if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
- var declar = this.parentPath.parentPath;
- var declarParent = declar.parentPath;
+ const declar = this.parentPath.parentPath;
+ const declarParent = declar.parentPath;
if (declar.key === "left" && declarParent.isForInStatement()) {
- return t.stringTypeAnnotation();
+ return t().stringTypeAnnotation();
}
if (declar.key === "left" && declarParent.isForOfStatement()) {
- return t.anyTypeAnnotation();
+ return t().anyTypeAnnotation();
}
- return t.voidTypeAnnotation();
+ return t().voidTypeAnnotation();
} else {
return;
}
@@ -47,7 +57,7 @@ function _getTypeAnnotation() {
return node.typeAnnotation;
}
- var inferer = inferers[node.type];
+ let inferer = inferers[node.type];
if (inferer) {
return inferer.call(this, node);
@@ -66,39 +76,35 @@ function isBaseType(baseName, soft) {
function _isBaseType(baseName, type, soft) {
if (baseName === "string") {
- return t.isStringTypeAnnotation(type);
+ return t().isStringTypeAnnotation(type);
} else if (baseName === "number") {
- return t.isNumberTypeAnnotation(type);
+ return t().isNumberTypeAnnotation(type);
} else if (baseName === "boolean") {
- return t.isBooleanTypeAnnotation(type);
+ return t().isBooleanTypeAnnotation(type);
} else if (baseName === "any") {
- return t.isAnyTypeAnnotation(type);
+ return t().isAnyTypeAnnotation(type);
} else if (baseName === "mixed") {
- return t.isMixedTypeAnnotation(type);
+ return t().isMixedTypeAnnotation(type);
} else if (baseName === "empty") {
- return t.isEmptyTypeAnnotation(type);
+ return t().isEmptyTypeAnnotation(type);
} else if (baseName === "void") {
- return t.isVoidTypeAnnotation(type);
+ return t().isVoidTypeAnnotation(type);
} else {
if (soft) {
return false;
} else {
- throw new Error("Unknown base type " + baseName);
+ throw new Error(`Unknown base type ${baseName}`);
}
}
}
function couldBeBaseType(name) {
- var type = this.getTypeAnnotation();
- if (t.isAnyTypeAnnotation(type)) return true;
-
- if (t.isUnionTypeAnnotation(type)) {
- var _arr = type.types;
-
- for (var _i = 0; _i < _arr.length; _i++) {
- var type2 = _arr[_i];
+ const type = this.getTypeAnnotation();
+ if (t().isAnyTypeAnnotation(type)) return true;
- if (t.isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) {
+ if (t().isUnionTypeAnnotation(type)) {
+ for (const type2 of type.types) {
+ if (t().isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) {
return true;
}
}
@@ -110,17 +116,17 @@ function couldBeBaseType(name) {
}
function baseTypeStrictlyMatches(right) {
- var left = this.getTypeAnnotation();
+ const left = this.getTypeAnnotation();
right = right.getTypeAnnotation();
- if (!t.isAnyTypeAnnotation(left) && t.isFlowBaseAnnotation(left)) {
+ if (!t().isAnyTypeAnnotation(left) && t().isFlowBaseAnnotation(left)) {
return right.type === left.type;
}
}
function isGenericType(genericName) {
- var type = this.getTypeAnnotation();
- return t.isGenericTypeAnnotation(type) && t.isIdentifier(type.id, {
+ 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
index 219c32f893..35601aba7d 100644
--- 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
@@ -1,15 +1,25 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = _default;
-var t = _interopRequireWildcard(require("@babel/types"));
+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;
- var binding = this.scope.getBinding(node.name);
+ const binding = this.scope.getBinding(node.name);
if (binding) {
if (binding.identifier.typeAnnotation) {
@@ -20,48 +30,44 @@ function _default(node) {
}
if (node.name === "undefined") {
- return t.voidTypeAnnotation();
+ return t().voidTypeAnnotation();
} else if (node.name === "NaN" || node.name === "Infinity") {
- return t.numberTypeAnnotation();
+ return t().numberTypeAnnotation();
} else if (node.name === "arguments") {}
}
function getTypeAnnotationBindingConstantViolations(binding, path, name) {
- var types = [];
- var functionConstantViolations = [];
- var constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
- var testType = getConditionalAnnotation(binding, path, name);
+ const types = [];
+ const functionConstantViolations = [];
+ let constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
+ const testType = getConditionalAnnotation(binding, path, name);
if (testType) {
- var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
- constantViolations = constantViolations.filter(function (path) {
- return testConstantViolations.indexOf(path) < 0;
- });
+ 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);
- var _arr = constantViolations;
- for (var _i = 0; _i < _arr.length; _i++) {
- var violation = _arr[_i];
+ for (const violation of constantViolations) {
types.push(violation.getTypeAnnotation());
}
}
if (types.length) {
- return t.createUnionTypeAnnotation(types);
+ return t().createUnionTypeAnnotation(types);
}
}
function getConstantViolationsBefore(binding, path, functions) {
- var violations = binding.constantViolations.slice();
+ const violations = binding.constantViolations.slice();
violations.unshift(binding.path);
- return violations.filter(function (violation) {
+ return violations.filter(violation => {
violation = violation.resolve();
- var status = violation._guessExecutionStatusRelativeTo(path);
+ const status = violation._guessExecutionStatusRelativeTo(path);
if (functions && status === "function") functions.push(violation);
return status === "before";
@@ -69,17 +75,17 @@ function getConstantViolationsBefore(binding, path, functions) {
}
function inferAnnotationFromBinaryExpression(name, path) {
- var operator = path.node.operator;
- var right = path.get("right").resolve();
- var left = path.get("left").resolve();
- var target;
+ const operator = path.node.operator;
+ const right = path.get("right").resolve();
+ const left = path.get("left").resolve();
+ let target;
if (left.isIdentifier({
- name: name
+ name
})) {
target = right;
} else if (right.isIdentifier({
- name: name
+ name
})) {
target = left;
}
@@ -89,16 +95,16 @@ function inferAnnotationFromBinaryExpression(name, path) {
return target.getTypeAnnotation();
}
- if (t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
- return t.numberTypeAnnotation();
+ if (t().BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
+ return t().numberTypeAnnotation();
}
return;
}
if (operator !== "===" && operator !== "==") return;
- var typeofPath;
- var typePath;
+ let typeofPath;
+ let typePath;
if (left.isUnaryExpression({
operator: "typeof"
@@ -114,17 +120,17 @@ function inferAnnotationFromBinaryExpression(name, path) {
if (!typeofPath) return;
if (!typeofPath.get("argument").isIdentifier({
- name: name
+ name
})) return;
typePath = typePath.resolve();
if (!typePath.isLiteral()) return;
- var typeValue = typePath.node.value;
+ const typeValue = typePath.node.value;
if (typeof typeValue !== "string") return;
- return t.createTypeAnnotationBasedOnTypeof(typeValue);
+ return t().createTypeAnnotationBasedOnTypeof(typeValue);
}
function getParentConditionalPath(binding, path, name) {
- var parentPath;
+ let parentPath;
while (parentPath = path.parentPath) {
if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
@@ -144,30 +150,30 @@ function getParentConditionalPath(binding, path, name) {
}
function getConditionalAnnotation(binding, path, name) {
- var ifStatement = getParentConditionalPath(binding, path, name);
+ const ifStatement = getParentConditionalPath(binding, path, name);
if (!ifStatement) return;
- var test = ifStatement.get("test");
- var paths = [test];
- var types = [];
+ const test = ifStatement.get("test");
+ const paths = [test];
+ const types = [];
- for (var i = 0; i < paths.length; i++) {
- var _path = paths[i];
+ 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"));
+ if (path.isLogicalExpression()) {
+ if (path.node.operator === "&&") {
+ paths.push(path.get("left"));
+ paths.push(path.get("right"));
}
- } else if (_path.isBinaryExpression()) {
- var type = inferAnnotationFromBinaryExpression(name, _path);
+ } else if (path.isBinaryExpression()) {
+ const type = inferAnnotationFromBinaryExpression(name, path);
if (type) types.push(type);
}
}
if (types.length) {
return {
- typeAnnotation: t.createUnionTypeAnnotation(types),
- ifStatement: ifStatement
+ typeAnnotation: t().createUnionTypeAnnotation(types),
+ ifStatement
};
}
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
index d31295b940..58023a1c48 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.VariableDeclarator = VariableDeclarator;
exports.TypeCastExpression = TypeCastExpression;
exports.NewExpression = NewExpression;
@@ -23,23 +25,34 @@ exports.RestElement = RestElement;
exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = Func;
exports.CallExpression = CallExpression;
exports.TaggedTemplateExpression = TaggedTemplateExpression;
-exports.Identifier = void 0;
+Object.defineProperty(exports, "Identifier", {
+ enumerable: true,
+ get: function () {
+ return _infererReference.default;
+ }
+});
-var t = _interopRequireWildcard(require("@babel/types"));
+function t() {
+ const data = _interopRequireWildcard(require("@babel/types"));
-var _infererReference = _interopRequireDefault(require("./inferer-reference"));
+ t = function () {
+ return data;
+ };
-exports.Identifier = _infererReference.default;
+ 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() {
- var id = this.get("id");
+ const id = this.get("id");
if (!id.isIdentifier()) return;
- var init = this.get("init");
- var type = init.getTypeAnnotation();
+ const init = this.get("init");
+ let type = init.getTypeAnnotation();
if (type && type.type === "AnyTypeAnnotation") {
if (init.isCallExpression() && init.get("callee").isIdentifier({
@@ -60,55 +73,55 @@ TypeCastExpression.validParent = true;
function NewExpression(node) {
if (this.get("callee").isIdentifier()) {
- return t.genericTypeAnnotation(node.callee);
+ return t().genericTypeAnnotation(node.callee);
}
}
function TemplateLiteral() {
- return t.stringTypeAnnotation();
+ return t().stringTypeAnnotation();
}
function UnaryExpression(node) {
- var operator = node.operator;
+ 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();
+ 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) {
- var operator = node.operator;
+ 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();
+ 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 === "+") {
- var right = this.get("right");
- var left = this.get("left");
+ const right = this.get("right");
+ const left = this.get("left");
if (left.isBaseType("number") && right.isBaseType("number")) {
- return t.numberTypeAnnotation();
+ return t().numberTypeAnnotation();
} else if (left.isBaseType("string") || right.isBaseType("string")) {
- return t.stringTypeAnnotation();
+ return t().stringTypeAnnotation();
}
- return t.unionTypeAnnotation([t.stringTypeAnnotation(), t.numberTypeAnnotation()]);
+ return t().unionTypeAnnotation([t().stringTypeAnnotation(), t().numberTypeAnnotation()]);
}
}
function LogicalExpression() {
- return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()]);
+ return t().createUnionTypeAnnotation([this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()]);
}
function ConditionalExpression() {
- return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()]);
+ return t().createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()]);
}
function SequenceExpression() {
@@ -120,39 +133,39 @@ function AssignmentExpression() {
}
function UpdateExpression(node) {
- var operator = node.operator;
+ const operator = node.operator;
if (operator === "++" || operator === "--") {
- return t.numberTypeAnnotation();
+ return t().numberTypeAnnotation();
}
}
function StringLiteral() {
- return t.stringTypeAnnotation();
+ return t().stringTypeAnnotation();
}
function NumericLiteral() {
- return t.numberTypeAnnotation();
+ return t().numberTypeAnnotation();
}
function BooleanLiteral() {
- return t.booleanTypeAnnotation();
+ return t().booleanTypeAnnotation();
}
function NullLiteral() {
- return t.nullLiteralTypeAnnotation();
+ return t().nullLiteralTypeAnnotation();
}
function RegExpLiteral() {
- return t.genericTypeAnnotation(t.identifier("RegExp"));
+ return t().genericTypeAnnotation(t().identifier("RegExp"));
}
function ObjectExpression() {
- return t.genericTypeAnnotation(t.identifier("Object"));
+ return t().genericTypeAnnotation(t().identifier("Object"));
}
function ArrayExpression() {
- return t.genericTypeAnnotation(t.identifier("Array"));
+ return t().genericTypeAnnotation(t().identifier("Array"));
}
function RestElement() {
@@ -162,23 +175,25 @@ function RestElement() {
RestElement.validParent = true;
function Func() {
- return t.genericTypeAnnotation(t.identifier("Function"));
+ return t().genericTypeAnnotation(t().identifier("Function"));
}
-var isArrayFrom = t.buildMatchMemberExpression("Array.from");
-var isObjectKeys = t.buildMatchMemberExpression("Object.keys");
-var isObjectValues = t.buildMatchMemberExpression("Object.values");
-var isObjectEntries = t.buildMatchMemberExpression("Object.entries");
+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() {
- var callee = this.node.callee;
+ const {
+ callee
+ } = this.node;
if (isObjectKeys(callee)) {
- return t.arrayTypeAnnotation(t.stringTypeAnnotation());
+ return t().arrayTypeAnnotation(t().stringTypeAnnotation());
} else if (isArrayFrom(callee) || isObjectValues(callee)) {
- return t.arrayTypeAnnotation(t.anyTypeAnnotation());
+ return t().arrayTypeAnnotation(t().anyTypeAnnotation());
} else if (isObjectEntries(callee)) {
- return t.arrayTypeAnnotation(t.tupleTypeAnnotation([t.stringTypeAnnotation(), t.anyTypeAnnotation()]));
+ return t().arrayTypeAnnotation(t().tupleTypeAnnotation([t().stringTypeAnnotation(), t().anyTypeAnnotation()]));
}
return resolveCall(this.get("callee"));
@@ -194,9 +209,9 @@ function resolveCall(callee) {
if (callee.isFunction()) {
if (callee.is("async")) {
if (callee.is("generator")) {
- return t.genericTypeAnnotation(t.identifier("AsyncIterator"));
+ return t().genericTypeAnnotation(t().identifier("AsyncIterator"));
} else {
- return t.genericTypeAnnotation(t.identifier("Promise"));
+ return t().genericTypeAnnotation(t().identifier("Promise"));
}
} else {
if (callee.node.returnType) {
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
index 2ee6fb91a6..3eab2763b8 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.matchesPattern = matchesPattern;
exports.has = has;
exports.isStatic = isStatic;
@@ -19,22 +21,39 @@ exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatu
exports.resolve = resolve;
exports._resolve = _resolve;
exports.isConstantExpression = isConstantExpression;
+exports.isInStrictMode = isInStrictMode;
exports.is = void 0;
-var _includes = _interopRequireDefault(require("lodash/includes"));
+function _includes() {
+ const data = _interopRequireDefault(require("lodash/includes"));
-var t = _interopRequireWildcard(require("@babel/types"));
+ _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);
+ return t().matchesPattern(this.node, pattern, allowPartial);
}
function has(key) {
- var val = this.node && this.node[key];
+ const val = this.node && this.node[key];
if (val && Array.isArray(val)) {
return !!val.length;
@@ -47,7 +66,7 @@ function isStatic() {
return this.scope.isStatic(this.node);
}
-var is = has;
+const is = has;
exports.is = is;
function isnt(key) {
@@ -59,7 +78,7 @@ function equals(key, value) {
}
function isNodeType(type) {
- return t.isType(this.type, type);
+ return t().isType(this.type, type);
}
function canHaveVariableDeclarationOrExpression() {
@@ -72,20 +91,20 @@ function canSwapBetweenExpressionAndStatement(replacement) {
}
if (this.isExpression()) {
- return t.isBlockStatement(replacement);
+ return t().isBlockStatement(replacement);
} else if (this.isBlockStatement()) {
- return t.isExpression(replacement);
+ return t().isExpression(replacement);
}
return false;
}
function isCompletionRecord(allowInsideFunction) {
- var path = this;
- var first = true;
+ let path = this;
+ let first = true;
do {
- var container = path.container;
+ const container = path.container;
if (path.isFunction() && !first) {
return !!allowInsideFunction;
@@ -102,19 +121,19 @@ function isCompletionRecord(allowInsideFunction) {
}
function isStatementOrBlock() {
- if (this.parentPath.isLabeledStatement() || t.isBlockStatement(this.container)) {
+ if (this.parentPath.isLabeledStatement() || t().isBlockStatement(this.container)) {
return false;
} else {
- return (0, _includes.default)(t.STATEMENT_OR_BLOCK_KEYS, this.key);
+ return (0, _includes().default)(t().STATEMENT_OR_BLOCK_KEYS, this.key);
}
}
function referencesImport(moduleSource, importName) {
if (!this.isReferencedIdentifier()) return false;
- var binding = this.scope.getBinding(this.node.name);
+ const binding = this.scope.getBinding(this.node.name);
if (!binding || binding.kind !== "module") return false;
- var path = binding.path;
- var parent = path.parentPath;
+ const path = binding.path;
+ const parent = path.parentPath;
if (!parent.isImportDeclaration()) return false;
if (parent.node.source.value === moduleSource) {
@@ -139,13 +158,14 @@ function referencesImport(moduleSource, importName) {
}
function getSource() {
- var node = this.node;
+ const node = this.node;
if (node.end) {
- return this.hub.file.code.slice(node.start, node.end);
- } else {
- return "";
+ const code = this.hub.getCode();
+ if (code) return code.slice(node.start, node.end);
}
+
+ return "";
}
function willIMaybeExecuteBefore(target) {
@@ -153,11 +173,11 @@ function willIMaybeExecuteBefore(target) {
}
function _guessExecutionStatusRelativeTo(target) {
- var targetFuncParent = target.scope.getFunctionParent() || target.scope.getProgramParent();
- var selfFuncParent = this.scope.getFunctionParent() || target.scope.getProgramParent();
+ const targetFuncParent = target.scope.getFunctionParent() || target.scope.getProgramParent();
+ const selfFuncParent = this.scope.getFunctionParent() || target.scope.getProgramParent();
if (targetFuncParent.node !== selfFuncParent.node) {
- var status = this._guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent);
+ const status = this._guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent);
if (status) {
return status;
@@ -166,15 +186,15 @@ function _guessExecutionStatusRelativeTo(target) {
}
}
- var targetPaths = target.getAncestry();
+ const targetPaths = target.getAncestry();
if (targetPaths.indexOf(this) >= 0) return "after";
- var selfPaths = this.getAncestry();
- var commonPath;
- var targetIndex;
- var selfIndex;
+ const selfPaths = this.getAncestry();
+ let commonPath;
+ let targetIndex;
+ let selfIndex;
for (selfIndex = 0; selfIndex < selfPaths.length; selfIndex++) {
- var selfPath = selfPaths[selfIndex];
+ const selfPath = selfPaths[selfIndex];
targetIndex = targetPaths.indexOf(selfPath);
if (targetIndex >= 0) {
@@ -187,8 +207,8 @@ function _guessExecutionStatusRelativeTo(target) {
return "before";
}
- var targetRelationship = targetPaths[targetIndex - 1];
- var selfRelationship = selfPaths[selfIndex - 1];
+ const targetRelationship = targetPaths[targetIndex - 1];
+ const selfRelationship = selfPaths[selfIndex - 1];
if (!targetRelationship || !selfRelationship) {
return "before";
@@ -198,59 +218,32 @@ function _guessExecutionStatusRelativeTo(target) {
return targetRelationship.key > selfRelationship.key ? "before" : "after";
}
- var keys = t.VISITOR_KEYS[commonPath.type];
- var targetKeyPosition = keys.indexOf(targetRelationship.key);
- var selfKeyPosition = keys.indexOf(selfRelationship.key);
+ 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) {
- var targetFuncPath = targetFuncParent.path;
+ const targetFuncPath = targetFuncParent.path;
if (!targetFuncPath.isFunctionDeclaration()) return;
- var binding = targetFuncPath.scope.getBinding(targetFuncPath.node.id.name);
+ const binding = targetFuncPath.scope.getBinding(targetFuncPath.node.id.name);
if (!binding.references) return "before";
- var referencePaths = binding.referencePaths;
+ const referencePaths = binding.referencePaths;
- for (var _iterator = referencePaths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
-
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
-
- var _path2 = _ref;
-
- if (_path2.key !== "callee" || !_path2.parentPath.isCallExpression()) {
+ for (const path of referencePaths) {
+ if (path.key !== "callee" || !path.parentPath.isCallExpression()) {
return;
}
}
- var allStatus;
-
- for (var _iterator2 = referencePaths, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
- var _ref2;
-
- if (_isArray2) {
- if (_i2 >= _iterator2.length) break;
- _ref2 = _iterator2[_i2++];
- } else {
- _i2 = _iterator2.next();
- if (_i2.done) break;
- _ref2 = _i2.value;
- }
+ let allStatus;
- var _path3 = _ref2;
- var childOfFunction = !!_path3.find(function (path) {
- return path.node === targetFuncPath.node;
- });
+ for (const path of referencePaths) {
+ const childOfFunction = !!path.find(path => path.node === targetFuncPath.node);
if (childOfFunction) continue;
- var status = this._guessExecutionStatusRelativeTo(_path3);
+ const status = this._guessExecutionStatusRelativeTo(path);
if (allStatus) {
if (allStatus !== status) return;
@@ -276,35 +269,31 @@ function _resolve(dangerous, resolved) {
return this.get("init").resolve(dangerous, resolved);
} else {}
} else if (this.isReferencedIdentifier()) {
- var binding = this.scope.getBinding(this.node.name);
+ const binding = this.scope.getBinding(this.node.name);
if (!binding) return;
if (!binding.constant) return;
if (binding.kind === "module") return;
if (binding.path !== this) {
- var ret = binding.path.resolve(dangerous, resolved);
- if (this.find(function (parent) {
- return parent.node === ret.node;
- })) return;
+ 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()) {
- var targetKey = this.toComputedKey();
- if (!t.isLiteral(targetKey)) return;
- var targetName = targetKey.value;
- var target = this.get("object").resolve(dangerous, resolved);
+ const targetKey = this.toComputedKey();
+ if (!t().isLiteral(targetKey)) return;
+ const targetName = targetKey.value;
+ const target = this.get("object").resolve(dangerous, resolved);
if (target.isObjectExpression()) {
- var props = target.get("properties");
- var _arr = props;
+ const props = target.get("properties");
- for (var _i3 = 0; _i3 < _arr.length; _i3++) {
- var prop = _arr[_i3];
+ for (const prop of props) {
if (!prop.isProperty()) continue;
- var key = prop.get("key");
- var match = prop.isnt("computed") && key.isIdentifier({
+ const key = prop.get("key");
+ let match = prop.isnt("computed") && key.isIdentifier({
name: targetName
});
match = match || key.isLiteral({
@@ -313,8 +302,8 @@ function _resolve(dangerous, resolved) {
if (match) return prop.get("value").resolve(dangerous, resolved);
}
} else if (target.isArrayExpression() && !isNaN(+targetName)) {
- var elems = target.get("elements");
- var elem = elems[targetName];
+ const elems = target.get("elements");
+ const elem = elems[targetName];
if (elem) return elem.resolve(dangerous, resolved);
}
}
@@ -322,13 +311,9 @@ function _resolve(dangerous, resolved) {
function isConstantExpression() {
if (this.isIdentifier()) {
- var binding = this.scope.getBinding(this.node.name);
-
- if (!binding) {
- return false;
- }
-
- return binding.constant && binding.path.get("init").isConstantExpression();
+ const binding = this.scope.getBinding(this.node.name);
+ if (!binding) return false;
+ return binding.constant;
}
if (this.isLiteral()) {
@@ -337,9 +322,7 @@ function isConstantExpression() {
}
if (this.isTemplateLiteral()) {
- return this.get("expressions").every(function (expression) {
- return expression.isConstantExpression();
- });
+ return this.get("expressions").every(expression => expression.isConstantExpression());
}
return true;
@@ -358,4 +341,31 @@ function 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
index ffec4e6403..a14921c464 100644
--- 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
@@ -1,20 +1,30 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = void 0;
-var t = _interopRequireWildcard(require("@babel/types"));
+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; } }
-var referenceVisitor = {
- ReferencedIdentifier: function ReferencedIdentifier(path, state) {
- if (path.isJSXIdentifier() && t.react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
+const referenceVisitor = {
+ ReferencedIdentifier(path, state) {
+ if (path.isJSXIdentifier() && t().react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
return;
}
if (path.node.name === "this") {
- var scope = path.scope;
+ let scope = path.scope;
do {
if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
@@ -25,15 +35,16 @@ var referenceVisitor = {
if (scope) state.breakOnScopePaths.push(scope.path);
}
- var binding = path.scope.getBinding(path.node.name);
+ 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;
}
+
};
-var PathHoister = function () {
- function PathHoister(path, scope) {
+class PathHoister {
+ constructor(path, scope) {
this.breakOnScopePaths = [];
this.bindings = {};
this.scopes = [];
@@ -42,11 +53,9 @@ var PathHoister = function () {
this.attachAfter = false;
}
- var _proto = PathHoister.prototype;
-
- _proto.isCompatibleScope = function isCompatibleScope(scope) {
- for (var key in this.bindings) {
- var binding = this.bindings[key];
+ isCompatibleScope(scope) {
+ for (const key in this.bindings) {
+ const binding = this.bindings[key];
if (!scope.bindingIdentifierEquals(key, binding.identifier)) {
return false;
@@ -54,10 +63,10 @@ var PathHoister = function () {
}
return true;
- };
+ }
- _proto.getCompatibleScopes = function getCompatibleScopes() {
- var scope = this.path.scope;
+ getCompatibleScopes() {
+ let scope = this.path.scope;
do {
if (this.isCompatibleScope(scope)) {
@@ -70,37 +79,34 @@ var PathHoister = function () {
break;
}
} while (scope = scope.parent);
- };
+ }
- _proto.getAttachmentPath = function getAttachmentPath() {
- var path = this._getAttachmentPath();
+ getAttachmentPath() {
+ let path = this._getAttachmentPath();
if (!path) return;
- var targetScope = path.scope;
+ let targetScope = path.scope;
if (targetScope.path === path) {
targetScope = path.scope.parent;
}
if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
- for (var name in this.bindings) {
+ for (const name in this.bindings) {
if (!targetScope.hasOwnBinding(name)) continue;
- var binding = this.bindings[name];
+ const binding = this.bindings[name];
if (binding.kind === "param" || binding.path.parentKey === "params") {
continue;
}
- var bindingParentPath = this.getAttachmentParentForPath(binding.path);
+ const bindingParentPath = this.getAttachmentParentForPath(binding.path);
if (bindingParentPath.key >= path.key) {
this.attachAfter = true;
path = binding.path;
- var _arr = binding.constantViolations;
-
- for (var _i = 0; _i < _arr.length; _i++) {
- var violationPath = _arr[_i];
+ for (const violationPath of binding.constantViolations) {
if (this.getAttachmentParentForPath(violationPath).key > path.key) {
path = violationPath;
}
@@ -110,19 +116,19 @@ var PathHoister = function () {
}
return path;
- };
+ }
- _proto._getAttachmentPath = function _getAttachmentPath() {
- var scopes = this.scopes;
- var scope = scopes.pop();
+ _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;
- var bodies = scope.path.get("body").get("body");
+ const bodies = scope.path.get("body").get("body");
- for (var i = 0; i < bodies.length; i++) {
+ for (let i = 0; i < bodies.length; i++) {
if (bodies[i].node._blockHoist) continue;
return bodies[i];
}
@@ -132,51 +138,51 @@ var PathHoister = function () {
} else if (scope.path.isProgram()) {
return this.getNextScopeAttachmentParent();
}
- };
+ }
- _proto.getNextScopeAttachmentParent = function getNextScopeAttachmentParent() {
- var scope = this.scopes.pop();
+ getNextScopeAttachmentParent() {
+ const scope = this.scopes.pop();
if (scope) return this.getAttachmentParentForPath(scope.path);
- };
+ }
- _proto.getAttachmentParentForPath = function getAttachmentParentForPath(path) {
+ getAttachmentParentForPath(path) {
do {
if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
return path;
}
} while (path = path.parentPath);
- };
+ }
- _proto.hasOwnParamBindings = function hasOwnParamBindings(scope) {
- for (var name in this.bindings) {
+ hasOwnParamBindings(scope) {
+ for (const name in this.bindings) {
if (!scope.hasOwnBinding(name)) continue;
- var binding = this.bindings[name];
+ const binding = this.bindings[name];
if (binding.kind === "param" && binding.constant) return true;
}
return false;
- };
+ }
- _proto.run = function run() {
+ run() {
this.path.traverse(referenceVisitor, this);
this.getCompatibleScopes();
- var attachTo = this.getAttachmentPath();
+ const attachTo = this.getAttachmentPath();
if (!attachTo) return;
if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return;
- var uid = attachTo.scope.generateUidIdentifier("ref");
- var declarator = t.variableDeclarator(uid, this.path.node);
- var insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
- attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t.variableDeclaration("var", [declarator])]);
- var parent = this.path.parentPath;
+ 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);
+ uid = t().JSXExpressionContainer(uid);
}
- this.path.replaceWith(uid);
- };
+ this.path.replaceWith(t().cloneNode(uid));
+ return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init");
+ }
- return PathHoister;
-}();
+}
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-eslint/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js
index 79d5682f45..23ec8fe6d7 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js
@@ -1,9 +1,11 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.hooks = void 0;
-var hooks = [function (self, parent) {
- var removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement();
+const hooks = [function (self, parent) {
+ const removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement();
if (removeParent) {
parent.remove();
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
index 4320201b9c..af321caa83 100644
--- 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
@@ -1,60 +1,79 @@
"use strict";
-exports.__esModule = true;
+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 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; } }
-var ReferencedIdentifier = {
+const ReferencedIdentifier = {
types: ["Identifier", "JSXIdentifier"],
- checkPath: function checkPath(_ref, opts) {
- var node = _ref.node,
- parent = _ref.parent;
- if (!t.isIdentifier(node, opts) && !t.isJSXMemberExpression(parent, opts)) {
- if (t.isJSXIdentifier(node, opts)) {
- if (t.react.isCompatTag(node.name)) return false;
+ checkPath({
+ node,
+ parent
+ }, opts) {
+ 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);
+ return t().isReferenced(node, parent);
}
+
};
exports.ReferencedIdentifier = ReferencedIdentifier;
-var ReferencedMemberExpression = {
+const ReferencedMemberExpression = {
types: ["MemberExpression"],
- checkPath: function checkPath(_ref2) {
- var node = _ref2.node,
- parent = _ref2.parent;
- return t.isMemberExpression(node) && t.isReferenced(node, parent);
+
+ checkPath({
+ node,
+ parent
+ }) {
+ return t().isMemberExpression(node) && t().isReferenced(node, parent);
}
+
};
exports.ReferencedMemberExpression = ReferencedMemberExpression;
-var BindingIdentifier = {
+const BindingIdentifier = {
types: ["Identifier"],
- checkPath: function checkPath(_ref3) {
- var node = _ref3.node,
- parent = _ref3.parent;
- return t.isIdentifier(node) && t.isBinding(node, parent);
+
+ checkPath({
+ node,
+ parent
+ }) {
+ return t().isIdentifier(node) && t().isBinding(node, parent);
}
+
};
exports.BindingIdentifier = BindingIdentifier;
-var Statement = {
+const Statement = {
types: ["Statement"],
- checkPath: function checkPath(_ref4) {
- var node = _ref4.node,
- parent = _ref4.parent;
- if (t.isStatement(node)) {
- if (t.isVariableDeclaration(node)) {
- if (t.isForXStatement(parent, {
+ checkPath({
+ node,
+ parent
+ }) {
+ if (t().isStatement(node)) {
+ if (t().isVariableDeclaration(node)) {
+ if (t().isForXStatement(parent, {
left: node
})) return false;
- if (t.isForStatement(parent, {
+ if (t().isForStatement(parent, {
init: node
})) return false;
}
@@ -64,109 +83,130 @@ var Statement = {
return false;
}
}
+
};
exports.Statement = Statement;
-var Expression = {
+const Expression = {
types: ["Expression"],
- checkPath: function checkPath(path) {
+
+ checkPath(path) {
if (path.isIdentifier()) {
return path.isReferencedIdentifier();
} else {
- return t.isExpression(path.node);
+ return t().isExpression(path.node);
}
}
+
};
exports.Expression = Expression;
-var Scope = {
+const Scope = {
types: ["Scopable"],
- checkPath: function checkPath(path) {
- return t.isScope(path.node, path.parent);
+
+ checkPath(path) {
+ return t().isScope(path.node, path.parent);
}
+
};
exports.Scope = Scope;
-var Referenced = {
- checkPath: function checkPath(path) {
- return t.isReferenced(path.node, path.parent);
+const Referenced = {
+ checkPath(path) {
+ return t().isReferenced(path.node, path.parent);
}
+
};
exports.Referenced = Referenced;
-var BlockScoped = {
- checkPath: function checkPath(path) {
- return t.isBlockScoped(path.node);
+const BlockScoped = {
+ checkPath(path) {
+ return t().isBlockScoped(path.node);
}
+
};
exports.BlockScoped = BlockScoped;
-var Var = {
+const Var = {
types: ["VariableDeclaration"],
- checkPath: function checkPath(path) {
- return t.isVar(path.node);
+
+ checkPath(path) {
+ return t().isVar(path.node);
}
+
};
exports.Var = Var;
-var User = {
- checkPath: function checkPath(path) {
+const User = {
+ checkPath(path) {
return path.node && !!path.node.loc;
}
+
};
exports.User = User;
-var Generated = {
- checkPath: function checkPath(path) {
+const Generated = {
+ checkPath(path) {
return !path.isUser();
}
+
};
exports.Generated = Generated;
-var Pure = {
- checkPath: function checkPath(path, opts) {
+const Pure = {
+ checkPath(path, opts) {
return path.scope.isPure(path.node, opts);
}
+
};
exports.Pure = Pure;
-var Flow = {
+const Flow = {
types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"],
- checkPath: function checkPath(_ref5) {
- var node = _ref5.node;
- if (t.isFlow(node)) {
+ checkPath({
+ node
+ }) {
+ if (t().isFlow(node)) {
return true;
- } else if (t.isImportDeclaration(node)) {
+ } else if (t().isImportDeclaration(node)) {
return node.importKind === "type" || node.importKind === "typeof";
- } else if (t.isExportDeclaration(node)) {
+ } else if (t().isExportDeclaration(node)) {
return node.exportKind === "type";
- } else if (t.isImportSpecifier(node)) {
+ } else if (t().isImportSpecifier(node)) {
return node.importKind === "type" || node.importKind === "typeof";
} else {
return false;
}
}
+
};
exports.Flow = Flow;
-var RestProperty = {
+const RestProperty = {
types: ["RestElement"],
- checkPath: function checkPath(path) {
+
+ checkPath(path) {
return path.parentPath && path.parentPath.isObjectPattern();
}
+
};
exports.RestProperty = RestProperty;
-var SpreadProperty = {
+const SpreadProperty = {
types: ["RestElement"],
- checkPath: function checkPath(path) {
+
+ checkPath(path) {
return path.parentPath && path.parentPath.isObjectExpression();
}
+
};
exports.SpreadProperty = SpreadProperty;
-var ExistentialTypeParam = {
+const ExistentialTypeParam = {
types: ["ExistsTypeAnnotation"]
};
exports.ExistentialTypeParam = ExistentialTypeParam;
-var NumericLiteralTypeAnnotation = {
+const NumericLiteralTypeAnnotation = {
types: ["NumberLiteralTypeAnnotation"]
};
exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation;
-var ForAwaitStatement = {
+const ForAwaitStatement = {
types: ["ForOfStatement"],
- checkPath: function checkPath(_ref6) {
- var node = _ref6.node;
+
+ 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
index 5f09e17c6b..b522de8c75 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.insertBefore = insertBefore;
exports._containerInsert = _containerInsert;
exports._containerInsertBefore = _containerInsertBefore;
@@ -18,7 +20,15 @@ var _hoister = _interopRequireDefault(require("./lib/hoister"));
var _index = _interopRequireDefault(require("./index"));
-var t = _interopRequireWildcard(require("@babel/types"));
+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; } }
@@ -28,17 +38,20 @@ function insertBefore(nodes) {
this._assertUnremoved();
nodes = this._verifyNodeList(nodes);
+ const {
+ parentPath
+ } = this;
- if (this.parentPath.isExpressionStatement() || this.parentPath.isLabeledStatement() || this.parentPath.isExportDeclaration()) {
- return this.parentPath.insertBefore(nodes);
- } else if (this.isNodeType("Expression") && this.listKey !== "params" && this.listKey !== "arguments" || this.parentPath.isForStatement() && this.key === "init") {
+ if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
+ return parentPath.insertBefore(nodes);
+ } else if (this.isNodeType("Expression") && this.listKey !== "params" && this.listKey !== "arguments" || 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()) {
- var shouldInsertCurrentNode = this.node && (!this.isExpressionStatement() || this.node.expression != null);
- this.replaceWith(t.blockStatement(shouldInsertCurrentNode ? [this.node] : []));
+ 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?");
@@ -46,16 +59,13 @@ function insertBefore(nodes) {
}
function _containerInsert(from, nodes) {
- var _container;
-
this.updateSiblingKeys(from, nodes.length);
- var paths = [];
+ const paths = [];
+ this.container.splice(from, 0, ...nodes);
- (_container = this.container).splice.apply(_container, [from, 0].concat(nodes));
-
- for (var i = 0; i < nodes.length; i++) {
- var to = from + i;
- var path = this.getSibling("" + to);
+ 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) {
@@ -63,30 +73,14 @@ function _containerInsert(from, nodes) {
}
}
- var contexts = this._getQueueContexts();
-
- for (var _i = 0; _i < paths.length; _i++) {
- var _path = paths[_i];
-
- _path.setScope();
-
- _path.debug("Inserted.");
+ const contexts = this._getQueueContexts();
- for (var _iterator = contexts, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
+ for (const path of paths) {
+ path.setScope();
+ path.debug("Inserted.");
- if (_isArray) {
- if (_i2 >= _iterator.length) break;
- _ref = _iterator[_i2++];
- } else {
- _i2 = _iterator.next();
- if (_i2.done) break;
- _ref = _i2.value;
- }
-
- var _context = _ref;
-
- _context.maybeQueue(_path, true);
+ for (const context of contexts) {
+ context.maybeQueue(path, true);
}
}
@@ -105,22 +99,38 @@ function insertAfter(nodes) {
this._assertUnremoved();
nodes = this._verifyNodeList(nodes);
-
- if (this.parentPath.isExpressionStatement() || this.parentPath.isLabeledStatement() || this.parentPath.isExportDeclaration()) {
- return this.parentPath.insertAfter(nodes);
- } else if (this.isNodeType("Expression") || this.parentPath.isForStatement() && this.key === "init") {
+ 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) {
- var temp = this.scope.generateDeclaredUidIdentifier();
- nodes.unshift(t.expressionStatement(t.assignmentExpression("=", temp, this.node)));
- nodes.push(t.expressionStatement(temp));
+ 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()) {
- var shouldInsertCurrentNode = this.node && (!this.isExpressionStatement() || this.node.expression != null);
- this.replaceWith(t.blockStatement(shouldInsertCurrentNode ? [this.node] : []));
+ 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?");
@@ -130,10 +140,10 @@ function insertAfter(nodes) {
function updateSiblingKeys(fromIndex, incrementBy) {
if (!this.parent) return;
- var paths = _cache.path.get(this.parent);
+ const paths = _cache.path.get(this.parent);
- for (var i = 0; i < paths.length; i++) {
- var path = paths[i];
+ for (let i = 0; i < paths.length; i++) {
+ const path = paths[i];
if (path.key >= fromIndex) {
path.key += incrementBy;
@@ -150,9 +160,9 @@ function _verifyNodeList(nodes) {
nodes = [nodes];
}
- for (var i = 0; i < nodes.length; i++) {
- var node = nodes[i];
- var msg = void 0;
+ for (let i = 0; i < nodes.length; i++) {
+ const node = nodes[i];
+ let msg;
if (!node) {
msg = "has falsy node";
@@ -165,8 +175,8 @@ function _verifyNodeList(nodes) {
}
if (msg) {
- var type = Array.isArray(node) ? "array" : typeof node;
- throw new Error("Node list " + msg + " with the index of " + i + " and type of " + type);
+ const type = Array.isArray(node) ? "array" : typeof node;
+ throw new Error(`Node list ${msg} with the index of ${i} and type of ${type}`);
}
}
@@ -178,11 +188,11 @@ function unshiftContainer(listKey, nodes) {
nodes = this._verifyNodeList(nodes);
- var path = _index.default.get({
+ const path = _index.default.get({
parentPath: this,
parent: this.node,
container: this.node[listKey],
- listKey: listKey,
+ listKey,
key: 0
});
@@ -193,24 +203,20 @@ function pushContainer(listKey, nodes) {
this._assertUnremoved();
nodes = this._verifyNodeList(nodes);
- var container = this.node[listKey];
+ const container = this.node[listKey];
- var path = _index.default.get({
+ const path = _index.default.get({
parentPath: this,
parent: this.node,
container: container,
- listKey: listKey,
+ listKey,
key: container.length
});
return path.replaceWithMultiple(nodes);
}
-function hoist(scope) {
- if (scope === void 0) {
- scope = this.scope;
- }
-
- var hoister = new _hoister.default(this, scope);
+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
index cca923f662..d509a6de9a 100644
--- 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
@@ -1,7 +1,10 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.remove = remove;
+exports._removeFromScope = _removeFromScope;
exports._callRemovalHooks = _callRemovalHooks;
exports._remove = _remove;
exports._markRemoved = _markRemoved;
@@ -14,6 +17,8 @@ function remove() {
this.resync();
+ this._removeFromScope();
+
if (this._callRemovalHooks()) {
this._markRemoved();
@@ -27,11 +32,13 @@ function remove() {
this._markRemoved();
}
-function _callRemovalHooks() {
- var _arr = _removalHooks.hooks;
+function _removeFromScope() {
+ const bindings = this.getBindingIdentifiers();
+ Object.keys(bindings).forEach(name => this.scope.removeBinding(name));
+}
- for (var _i = 0; _i < _arr.length; _i++) {
- var fn = _arr[_i];
+function _callRemovalHooks() {
+ for (const fn of _removalHooks.hooks) {
if (fn(this, this.parentPath)) return true;
}
}
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
index 01558373bd..373861f6c4 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.replaceWithMultiple = replaceWithMultiple;
exports.replaceWithSourceString = replaceWithSourceString;
exports.replaceWith = replaceWith;
@@ -8,56 +10,79 @@ exports._replaceWith = _replaceWith;
exports.replaceExpressionWithStatements = replaceExpressionWithStatements;
exports.replaceInline = replaceInline;
-var _codeFrame = require("@babel/code-frame");
+function _codeFrame() {
+ const data = require("@babel/code-frame");
+
+ _codeFrame = function () {
+ return data;
+ };
+
+ return data;
+}
var _index = _interopRequireDefault(require("../index"));
var _index2 = _interopRequireDefault(require("./index"));
-var _babylon = require("babylon");
+function _parser() {
+ const data = require("@babel/parser");
+
+ _parser = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function t() {
+ const data = _interopRequireWildcard(require("@babel/types"));
-var t = _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 }; }
-var hoistVariablesVisitor = {
- Function: function Function(path) {
+const hoistVariablesVisitor = {
+ Function(path) {
path.skip();
},
- VariableDeclaration: function VariableDeclaration(path) {
+
+ VariableDeclaration(path) {
if (path.node.kind !== "var") return;
- var bindings = path.getBindingIdentifiers();
+ const bindings = path.getBindingIdentifiers();
- for (var key in bindings) {
+ for (const key in bindings) {
path.scope.push({
id: bindings[key]
});
}
- var exprs = [];
- var _arr = path.node.declarations;
-
- for (var _i = 0; _i < _arr.length; _i++) {
- var declar = _arr[_i];
+ const exprs = [];
+ for (const declar of path.node.declarations) {
if (declar.init) {
- exprs.push(t.expressionStatement(t.assignmentExpression("=", declar.id, 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);
+ t().inheritLeadingComments(nodes[0], this.node);
+ t().inheritTrailingComments(nodes[nodes.length - 1], this.node);
this.node = this.container[this.key] = null;
- var paths = this.insertAfter(nodes);
+ const paths = this.insertAfter(nodes);
if (this.node) {
this.requeue();
@@ -72,19 +97,19 @@ function replaceWithSourceString(replacement) {
this.resync();
try {
- replacement = "(" + replacement + ")";
- replacement = (0, _babylon.parse)(replacement);
+ replacement = `(${replacement})`;
+ replacement = (0, _parser().parse)(replacement);
} catch (err) {
- var loc = err.loc;
+ const loc = err.loc;
if (loc) {
- err.loc = null;
- err.message += " - make sure this is an expression.\n" + (0, _codeFrame.codeFrameColumns)(replacement, {
+ 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;
@@ -116,7 +141,7 @@ function replaceWith(replacement) {
return [this];
}
- if (this.isProgram() && !t.isProgram(replacement)) {
+ if (this.isProgram() && !t().isProgram(replacement)) {
throw new Error("You can only replace a Program root node with another Program node");
}
@@ -128,26 +153,26 @@ function replaceWith(replacement) {
throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");
}
- var nodePath = "";
+ let nodePath = "";
- if (this.isNodeType("Statement") && t.isExpression(replacement)) {
+ if (this.isNodeType("Statement") && t().isExpression(replacement)) {
if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) {
- replacement = t.expressionStatement(replacement);
+ replacement = t().expressionStatement(replacement);
nodePath = "expression";
}
}
- if (this.isNodeType("Expression") && t.isStatement(replacement)) {
+ if (this.isNodeType("Expression") && t().isStatement(replacement)) {
if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
return this.replaceExpressionWithStatements([replacement]);
}
}
- var oldNode = this.node;
+ const oldNode = this.node;
if (oldNode) {
- t.inheritsComments(replacement, oldNode);
- t.removeComments(oldNode);
+ t().inheritsComments(replacement, oldNode);
+ t().removeComments(oldNode);
}
this._replaceWith(replacement);
@@ -164,69 +189,51 @@ function _replaceWith(node) {
}
if (this.inList) {
- t.validate(this.parent, this.key, [node]);
+ t().validate(this.parent, this.key, [node]);
} else {
- t.validate(this.parent, this.key, node);
+ t().validate(this.parent, this.key, node);
}
- this.debug("Replace with " + (node && node.type));
+ this.debug(`Replace with ${node && node.type}`);
this.node = this.container[this.key] = node;
}
function replaceExpressionWithStatements(nodes) {
this.resync();
- var toSequenceExpression = t.toSequenceExpression(nodes, this.scope);
+ const toSequenceExpression = t().toSequenceExpression(nodes, this.scope);
if (toSequenceExpression) {
return this.replaceWith(toSequenceExpression)[0].get("expressions");
}
- var container = t.arrowFunctionExpression([], t.blockStatement(nodes));
- this.replaceWith(t.callExpression(container, []));
+ const container = t().arrowFunctionExpression([], t().blockStatement(nodes));
+ this.replaceWith(t().callExpression(container, []));
this.traverse(hoistVariablesVisitor);
- var completionRecords = this.get("callee").getCompletionRecords();
-
- for (var _iterator = completionRecords, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
-
- if (_isArray) {
- if (_i2 >= _iterator.length) break;
- _ref = _iterator[_i2++];
- } else {
- _i2 = _iterator.next();
- if (_i2.done) break;
- _ref = _i2.value;
- }
-
- var _path = _ref;
- if (!_path.isExpressionStatement()) continue;
+ const completionRecords = this.get("callee").getCompletionRecords();
- var loop = _path.findParent(function (path) {
- return path.isLoop();
- });
+ for (const path of completionRecords) {
+ if (!path.isExpressionStatement()) continue;
+ const loop = path.findParent(path => path.isLoop());
if (loop) {
- var uid = loop.getData("expressionReplacementReturnUid");
+ let uid = loop.getData("expressionReplacementReturnUid");
if (!uid) {
- var _callee = this.get("callee");
-
- uid = _callee.scope.generateDeclaredUidIdentifier("ret");
-
- _callee.get("body").pushContainer("body", t.returnStatement(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);
+ uid = t().identifier(uid.name);
}
- _path.get("expression").replaceWith(t.assignmentExpression("=", uid, _path.node.expression));
+ path.get("expression").replaceWith(t().assignmentExpression("=", t().cloneNode(uid), path.node.expression));
} else {
- _path.replaceWith(t.returnStatement(_path.node.expression));
+ path.replaceWith(t().returnStatement(path.node.expression));
}
}
- var callee = this.get("callee");
+ const callee = this.get("callee");
callee.arrowFunctionToExpression();
return callee.get("body.body");
}
@@ -238,7 +245,7 @@ function replaceInline(nodes) {
if (Array.isArray(this.container)) {
nodes = this._verifyNodeList(nodes);
- var paths = this._containerInsertAfter(nodes);
+ const paths = this._containerInsertAfter(nodes);
this.remove();
return paths;
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
index 7f8c3a2f85..d19f1168d7 100644
--- 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
@@ -1,22 +1,17 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = void 0;
-var Binding = function () {
- function Binding(_ref) {
- var identifier = _ref.identifier,
- scope = _ref.scope,
- path = _ref.path,
- kind = _ref.kind;
- this.constantViolations = void 0;
- this.constant = void 0;
- this.referencePaths = void 0;
- this.referenced = void 0;
- this.references = void 0;
- this.hasDeoptedValue = void 0;
- this.hasValue = void 0;
- this.value = void 0;
+class Binding {
+ constructor({
+ identifier,
+ scope,
+ path,
+ kind
+ }) {
this.identifier = identifier;
this.scope = scope;
this.path = path;
@@ -29,26 +24,24 @@ var Binding = function () {
this.clearValue();
}
- var _proto = Binding.prototype;
-
- _proto.deoptValue = function deoptValue() {
+ deoptValue() {
this.clearValue();
this.hasDeoptedValue = true;
- };
+ }
- _proto.setValue = function setValue(value) {
+ setValue(value) {
if (this.hasDeoptedValue) return;
this.hasValue = true;
this.value = value;
- };
+ }
- _proto.clearValue = function clearValue() {
+ clearValue() {
this.hasDeoptedValue = false;
this.hasValue = false;
this.value = null;
- };
+ }
- _proto.reassign = function reassign(path) {
+ reassign(path) {
this.constant = false;
if (this.constantViolations.indexOf(path) !== -1) {
@@ -56,9 +49,9 @@ var Binding = function () {
}
this.constantViolations.push(path);
- };
+ }
- _proto.reference = function reference(path) {
+ reference(path) {
if (this.referencePaths.indexOf(path) !== -1) {
return;
}
@@ -66,14 +59,13 @@ var Binding = function () {
this.referenced = true;
this.references++;
this.referencePaths.push(path);
- };
+ }
- _proto.dereference = function dereference() {
+ dereference() {
this.references--;
this.referenced = !!this.references;
- };
+ }
- return Binding;
-}();
+}
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
index 70b656b7ab..9d24068b98 100644
--- 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
@@ -1,23 +1,65 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = void 0;
-var _includes = _interopRequireDefault(require("lodash/includes"));
+function _includes() {
+ const data = _interopRequireDefault(require("lodash/includes"));
-var _repeat = _interopRequireDefault(require("lodash/repeat"));
+ _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"));
-var _defaults = _interopRequireDefault(require("lodash/defaults"));
+function _defaults() {
+ const data = _interopRequireDefault(require("lodash/defaults"));
+
+ _defaults = function () {
+ return data;
+ };
+
+ return data;
+}
-var _binding2 = _interopRequireDefault(require("./binding"));
+var _binding = _interopRequireDefault(require("./binding"));
-var _globals = _interopRequireDefault(require("globals"));
+function _globals() {
+ const data = _interopRequireDefault(require("globals"));
-var t = _interopRequireWildcard(require("@babel/types"));
+ _globals = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function t() {
+ const data = _interopRequireWildcard(require("@babel/types"));
+
+ t = function () {
+ return data;
+ };
+
+ return data;
+}
var _cache = require("../cache");
@@ -25,152 +67,155 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
-
function gatherNodeParts(node, parts) {
- if (t.isModuleDeclaration(node)) {
+ if (t().isModuleDeclaration(node)) {
if (node.source) {
gatherNodeParts(node.source, parts);
} else if (node.specifiers && node.specifiers.length) {
- var _arr = node.specifiers;
-
- for (var _i = 0; _i < _arr.length; _i++) {
- var specifier = _arr[_i];
+ for (const specifier of node.specifiers) {
gatherNodeParts(specifier, parts);
}
} else if (node.declaration) {
gatherNodeParts(node.declaration, parts);
}
- } else if (t.isModuleSpecifier(node)) {
+ } else if (t().isModuleSpecifier(node)) {
gatherNodeParts(node.local, parts);
- } else if (t.isMemberExpression(node)) {
+ } else if (t().isMemberExpression(node)) {
gatherNodeParts(node.object, parts);
gatherNodeParts(node.property, parts);
- } else if (t.isIdentifier(node)) {
+ } else if (t().isIdentifier(node)) {
parts.push(node.name);
- } else if (t.isLiteral(node)) {
+ } else if (t().isLiteral(node)) {
parts.push(node.value);
- } else if (t.isCallExpression(node)) {
+ } else if (t().isCallExpression(node)) {
gatherNodeParts(node.callee, parts);
- } else if (t.isObjectExpression(node) || t.isObjectPattern(node)) {
- var _arr2 = node.properties;
-
- for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
- var prop = _arr2[_i2];
+ } 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");
}
}
-var collectorVisitor = {
- For: function For(path) {
- var _arr3 = t.FOR_INIT_KEYS;
-
- for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
- var key = _arr3[_i3];
- var declar = path.get(key);
+const collectorVisitor = {
+ For(path) {
+ for (const key of t().FOR_INIT_KEYS) {
+ const declar = path.get(key);
if (declar.isVar()) {
- var parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent();
+ const parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent();
parentScope.registerBinding("var", declar);
}
}
},
- Declaration: function Declaration(path) {
+
+ Declaration(path) {
if (path.isBlockScoped()) return;
if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) {
return;
}
- var parent = path.scope.getFunctionParent() || path.scope.getProgramParent();
+ const parent = path.scope.getFunctionParent() || path.scope.getProgramParent();
parent.registerDeclaration(path);
},
- ReferencedIdentifier: function ReferencedIdentifier(path, state) {
+
+ ReferencedIdentifier(path, state) {
state.references.push(path);
},
- ForXStatement: function ForXStatement(path, state) {
- var left = path.get("left");
+
+ ForXStatement(path, state) {
+ const left = path.get("left");
if (left.isPattern() || left.isIdentifier()) {
state.constantViolations.push(path);
}
},
+
ExportDeclaration: {
- exit: function exit(path) {
- var node = path.node,
- scope = path.scope;
- var declar = node.declaration;
-
- if (t.isClassDeclaration(declar) || t.isFunctionDeclaration(declar)) {
- var _id = declar.id;
- if (!_id) return;
- var binding = scope.getBinding(_id.name);
+ 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)) {
- var _arr4 = declar.declarations;
-
- for (var _i4 = 0; _i4 < _arr4.length; _i4++) {
- var decl = _arr4[_i4];
- var ids = t.getBindingIdentifiers(decl);
-
- for (var name in ids) {
- var _binding = scope.getBinding(name);
+ } else if (t().isVariableDeclaration(declar)) {
+ for (const decl of declar.declarations) {
+ const ids = t().getBindingIdentifiers(decl);
- if (_binding) _binding.reference(path);
+ for (const name in ids) {
+ const binding = scope.getBinding(name);
+ if (binding) binding.reference(path);
}
}
}
}
+
},
- LabeledStatement: function LabeledStatement(path) {
+
+ LabeledStatement(path) {
path.scope.getProgramParent().addGlobal(path.node);
path.scope.getBlockParent().registerDeclaration(path);
},
- AssignmentExpression: function AssignmentExpression(path, state) {
+
+ AssignmentExpression(path, state) {
state.assignments.push(path);
},
- UpdateExpression: function UpdateExpression(path, state) {
+
+ UpdateExpression(path, state) {
state.constantViolations.push(path);
},
- UnaryExpression: function UnaryExpression(path, state) {
+
+ UnaryExpression(path, state) {
if (path.node.operator === "delete") {
state.constantViolations.push(path);
}
},
- BlockScoped: function BlockScoped(path) {
- var scope = path.scope;
+
+ BlockScoped(path) {
+ let scope = path.scope;
if (scope.path === path) scope = scope.parent;
scope.getBlockParent().registerDeclaration(path);
},
- ClassDeclaration: function ClassDeclaration(path) {
- var id = path.node.id;
+
+ ClassDeclaration(path) {
+ const id = path.node.id;
if (!id) return;
- var name = id.name;
+ const name = id.name;
path.scope.bindings[name] = path.scope.getBinding(name);
},
- Block: function Block(path) {
- var paths = path.get("body");
- var _arr5 = paths;
- for (var _i5 = 0; _i5 < _arr5.length; _i5++) {
- var bodyPath = _arr5[_i5];
+ Block(path) {
+ const paths = path.get("body");
+ for (const bodyPath of paths) {
if (bodyPath.isFunctionDeclaration()) {
path.scope.getBlockParent().registerDeclaration(bodyPath);
}
}
}
+
};
-var uid = 0;
+let uid = 0;
-var Scope = function () {
- function Scope(path) {
- var node = path.node;
+class Scope {
+ constructor(path) {
+ const {
+ node
+ } = path;
- var cached = _cache.scope.get(node);
+ const cached = _cache.scope.get(node);
if (cached && cached.path === path) {
return cached;
@@ -184,83 +229,86 @@ var Scope = function () {
this.labels = new Map();
}
- var _proto = Scope.prototype;
+ get parent() {
+ const parent = this.path.findParent(p => p.isScope());
+ return parent && parent.scope;
+ }
- _proto.traverse = function traverse(node, opts, state) {
- (0, _index.default)(node, opts, this, state, this.path);
- };
+ get parentBlock() {
+ return this.path.parent;
+ }
- _proto.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier(name) {
- if (name === void 0) {
- name = "temp";
- }
+ get hub() {
+ return this.path.hub;
+ }
+
+ traverse(node, opts, state) {
+ (0, _index.default)(node, opts, this, state, this.path);
+ }
- var id = this.generateUidIdentifier(name);
+ generateDeclaredUidIdentifier(name) {
+ const id = this.generateUidIdentifier(name);
this.push({
- id: id
+ id
});
- return id;
- };
-
- _proto.generateUidIdentifier = function generateUidIdentifier(name) {
- if (name === void 0) {
- name = "temp";
- }
-
- return t.identifier(this.generateUid(name));
- };
+ return t().cloneNode(id);
+ }
- _proto.generateUid = function generateUid(name) {
- if (name === void 0) {
- name = "temp";
- }
+ generateUidIdentifier(name) {
+ return t().identifier(this.generateUid(name));
+ }
- name = t.toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, "");
- var uid;
- var i = 0;
+ 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));
- var program = this.getProgramParent();
+ const program = this.getProgramParent();
program.references[uid] = true;
program.uids[uid] = true;
return uid;
- };
+ }
- _proto._generateUid = function _generateUid(name, i) {
- var id = name;
+ _generateUid(name, i) {
+ let id = name;
if (i > 1) id += i;
- return "_" + id;
- };
+ return `_${id}`;
+ }
- _proto.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(parent, defaultName) {
- var node = parent;
+ generateUidBasedOnNode(parent, defaultName) {
+ let node = parent;
- if (t.isAssignmentExpression(parent)) {
+ if (t().isAssignmentExpression(parent)) {
node = parent.left;
- } else if (t.isVariableDeclarator(parent)) {
+ } else if (t().isVariableDeclarator(parent)) {
node = parent.id;
- } else if (t.isObjectProperty(node) || t.isObjectMethod(node)) {
+ } else if (t().isObjectProperty(node) || t().isObjectMethod(node)) {
node = node.key;
}
- var parts = [];
+ const parts = [];
gatherNodeParts(node, parts);
- var id = parts.join("$");
+ let id = parts.join("$");
id = id.replace(/^_/, "") || defaultName || "ref";
- return this.generateUidIdentifier(id.slice(0, 20));
- };
+ return this.generateUid(id.slice(0, 20));
+ }
+
+ generateUidIdentifierBasedOnNode(parent, defaultName) {
+ return t().identifier(this.generateUidBasedOnNode(parent, defaultName));
+ }
- _proto.isStatic = function isStatic(node) {
- if (t.isThisExpression(node) || t.isSuper(node)) {
+ isStatic(node) {
+ if (t().isThisExpression(node) || t().isSuper(node)) {
return true;
}
- if (t.isIdentifier(node)) {
- var binding = this.getBinding(node.name);
+ if (t().isIdentifier(node)) {
+ const binding = this.getBinding(node.name);
if (binding) {
return binding.constant;
@@ -270,58 +318,61 @@ var Scope = function () {
}
return false;
- };
+ }
- _proto.maybeGenerateMemoised = function maybeGenerateMemoised(node, dontPush) {
+ maybeGenerateMemoised(node, dontPush) {
if (this.isStatic(node)) {
return null;
} else {
- var _id2 = this.generateUidIdentifierBasedOnNode(node);
+ const id = this.generateUidIdentifierBasedOnNode(node);
+
+ if (!dontPush) {
+ this.push({
+ id
+ });
+ return t().cloneNode(id);
+ }
- if (!dontPush) this.push({
- id: _id2
- });
- return _id2;
+ return id;
}
- };
+ }
- _proto.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind, name, id) {
+ checkBlockScopedCollisions(local, kind, name, id) {
if (kind === "param") return;
if (local.kind === "local") return;
- if (kind === "hoisted" && local.kind === "let") return;
- var duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const");
+ 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.file.buildCodeFrameError(id, "Duplicate declaration \"" + name + "\"", TypeError);
+ throw this.hub.buildError(id, `Duplicate declaration "${name}"`, TypeError);
}
- };
+ }
- _proto.rename = function rename(oldName, newName, block) {
- var binding = this.getBinding(oldName);
+ 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);
}
- };
+ }
- _proto._renameFromMap = function _renameFromMap(map, oldName, newName, value) {
+ _renameFromMap(map, oldName, newName, value) {
if (map[oldName]) {
map[newName] = value;
map[oldName] = null;
}
- };
+ }
- _proto.dump = function dump() {
- var sep = (0, _repeat.default)("-", 60);
+ dump() {
+ const sep = (0, _repeat().default)("-", 60);
console.log(sep);
- var scope = this;
+ let scope = this;
do {
console.log("#", scope.block.type);
- for (var name in scope.bindings) {
- var binding = scope.bindings[name];
+ for (const name in scope.bindings) {
+ const binding = scope.bindings[name];
console.log(" -", name, {
constant: binding.constant,
references: binding.references,
@@ -332,149 +383,124 @@ var Scope = function () {
} while (scope = scope.parent);
console.log(sep);
- };
-
- _proto.toArray = function toArray(node, i) {
- var file = this.hub.file;
+ }
- if (t.isIdentifier(node)) {
- var binding = this.getBinding(node.name);
+ 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)) {
+ if (t().isArrayExpression(node)) {
return node;
}
- if (t.isIdentifier(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]);
+ return t().callExpression(t().memberExpression(t().memberExpression(t().memberExpression(t().identifier("Array"), t().identifier("prototype")), t().identifier("slice")), t().identifier("call")), [node]);
}
- var helperName = "toArray";
- var args = [node];
+ let helperName;
+ const args = [node];
if (i === true) {
helperName = "toConsumableArray";
} else if (i) {
- args.push(t.numericLiteral(i));
+ args.push(t().numericLiteral(i));
helperName = "slicedToArray";
+ } else {
+ helperName = "toArray";
}
- return t.callExpression(file.addHelper(helperName), args);
- };
+ return t().callExpression(this.hub.addHelper(helperName), args);
+ }
- _proto.hasLabel = function hasLabel(name) {
+ hasLabel(name) {
return !!this.getLabel(name);
- };
+ }
- _proto.getLabel = function getLabel(name) {
+ getLabel(name) {
return this.labels.get(name);
- };
+ }
- _proto.registerLabel = function registerLabel(path) {
+ registerLabel(path) {
this.labels.set(path.node.label.name, path);
- };
-
- _proto.registerDeclaration = function registerDeclaration(path) {
- if (path.isFlow()) return;
+ }
+ registerDeclaration(path) {
if (path.isLabeledStatement()) {
this.registerLabel(path);
} else if (path.isFunctionDeclaration()) {
this.registerBinding("hoisted", path.get("id"), path);
} else if (path.isVariableDeclaration()) {
- var declarations = path.get("declarations");
- var _arr6 = declarations;
+ const declarations = path.get("declarations");
- for (var _i6 = 0; _i6 < _arr6.length; _i6++) {
- var declar = _arr6[_i6];
+ for (const declar of declarations) {
this.registerBinding(path.node.kind, declar);
}
} else if (path.isClassDeclaration()) {
this.registerBinding("let", path);
} else if (path.isImportDeclaration()) {
- var specifiers = path.get("specifiers");
- var _arr7 = specifiers;
+ const specifiers = path.get("specifiers");
- for (var _i7 = 0; _i7 < _arr7.length; _i7++) {
- var specifier = _arr7[_i7];
+ for (const specifier of specifiers) {
this.registerBinding("module", specifier);
}
} else if (path.isExportDeclaration()) {
- var _declar = path.get("declaration");
+ const declar = path.get("declaration");
- if (_declar.isClassDeclaration() || _declar.isFunctionDeclaration() || _declar.isVariableDeclaration()) {
- this.registerDeclaration(_declar);
+ if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) {
+ this.registerDeclaration(declar);
}
} else {
this.registerBinding("unknown", path);
}
- };
+ }
- _proto.buildUndefinedNode = function buildUndefinedNode() {
+ buildUndefinedNode() {
if (this.hasBinding("undefined")) {
- return t.unaryExpression("void", t.numericLiteral(0), true);
+ return t().unaryExpression("void", t().numericLiteral(0), true);
} else {
- return t.identifier("undefined");
+ return t().identifier("undefined");
}
- };
+ }
- _proto.registerConstantViolation = function registerConstantViolation(path) {
- var ids = path.getBindingIdentifiers();
+ registerConstantViolation(path) {
+ const ids = path.getBindingIdentifiers();
- for (var name in ids) {
- var binding = this.getBinding(name);
+ for (const name in ids) {
+ const binding = this.getBinding(name);
if (binding) binding.reassign(path);
}
- };
-
- _proto.registerBinding = function registerBinding(kind, path, bindingPath) {
- if (bindingPath === void 0) {
- bindingPath = path;
- }
+ }
+ registerBinding(kind, path, bindingPath = path) {
if (!kind) throw new ReferenceError("no `kind`");
if (path.isVariableDeclaration()) {
- var declarators = path.get("declarations");
-
- for (var _iterator = declarators, _isArray = Array.isArray(_iterator), _i8 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
+ const declarators = path.get("declarations");
- if (_isArray) {
- if (_i8 >= _iterator.length) break;
- _ref = _iterator[_i8++];
- } else {
- _i8 = _iterator.next();
- if (_i8.done) break;
- _ref = _i8.value;
- }
-
- var _declar2 = _ref;
- this.registerBinding(kind, _declar2);
+ for (const declar of declarators) {
+ this.registerBinding(kind, declar);
}
return;
}
- var parent = this.getProgramParent();
- var ids = path.getBindingIdentifiers(true);
-
- for (var name in ids) {
- var _arr8 = ids[name];
+ const parent = this.getProgramParent();
+ const ids = path.getBindingIdentifiers(true);
- for (var _i9 = 0; _i9 < _arr8.length; _i9++) {
- var _id3 = _arr8[_i9];
- var local = this.getOwnBinding(name);
+ for (const name in ids) {
+ for (const id of ids[name]) {
+ const local = this.getOwnBinding(name);
if (local) {
- if (local.identifier === _id3) continue;
- this.checkBlockScopedCollisions(local, kind, name, _id3);
+ if (local.identifier === id) continue;
+ this.checkBlockScopedCollisions(local, kind, name, id);
}
parent.references[name] = true;
@@ -482,8 +508,8 @@ var Scope = function () {
if (local) {
this.registerConstantViolation(bindingPath);
} else {
- this.bindings[name] = new _binding2.default({
- identifier: _id3,
+ this.bindings[name] = new _binding.default({
+ identifier: id,
scope: this,
path: bindingPath,
kind: kind
@@ -491,145 +517,124 @@ var Scope = function () {
}
}
}
- };
+ }
- _proto.addGlobal = function addGlobal(node) {
+ addGlobal(node) {
this.globals[node.name] = node;
- };
+ }
- _proto.hasUid = function hasUid(name) {
- var scope = this;
+ hasUid(name) {
+ let scope = this;
do {
if (scope.uids[name]) return true;
} while (scope = scope.parent);
return false;
- };
+ }
- _proto.hasGlobal = function hasGlobal(name) {
- var scope = this;
+ hasGlobal(name) {
+ let scope = this;
do {
if (scope.globals[name]) return true;
} while (scope = scope.parent);
return false;
- };
+ }
- _proto.hasReference = function hasReference(name) {
- var scope = this;
+ hasReference(name) {
+ let scope = this;
do {
if (scope.references[name]) return true;
} while (scope = scope.parent);
return false;
- };
+ }
- _proto.isPure = function isPure(node, constantsOnly) {
- if (t.isIdentifier(node)) {
- var binding = this.getBinding(node.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)) {
+ } 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 (var _iterator2 = node.body, _isArray2 = Array.isArray(_iterator2), _i10 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
- var _ref2;
-
- if (_isArray2) {
- if (_i10 >= _iterator2.length) break;
- _ref2 = _iterator2[_i10++];
- } else {
- _i10 = _iterator2.next();
- if (_i10.done) break;
- _ref2 = _i10.value;
- }
-
- var _method = _ref2;
- if (!this.isPure(_method, constantsOnly)) return false;
+ } 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)) {
+ } else if (t().isBinary(node)) {
return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);
- } else if (t.isArrayExpression(node)) {
- var _arr9 = node.elements;
-
- for (var _i11 = 0; _i11 < _arr9.length; _i11++) {
- var elem = _arr9[_i11];
+ } 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)) {
- var _arr10 = node.properties;
-
- for (var _i12 = 0; _i12 < _arr10.length; _i12++) {
- var prop = _arr10[_i12];
+ } 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)) {
+ } 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.isClassProperty(node) || t.isObjectProperty(node)) {
+ } 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)) {
+ } 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)) {
- var _arr11 = node.expressions;
-
- for (var _i13 = 0; _i13 < _arr11.length; _i13++) {
- var expression = _arr11[_i13];
+ } 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);
+ return t().isPureish(node);
}
- };
+ }
- _proto.setData = function setData(key, val) {
+ setData(key, val) {
return this.data[key] = val;
- };
+ }
- _proto.getData = function getData(key) {
- var scope = this;
+ getData(key) {
+ let scope = this;
do {
- var data = scope.data[key];
+ const data = scope.data[key];
if (data != null) return data;
} while (scope = scope.parent);
- };
+ }
- _proto.removeData = function removeData(key) {
- var scope = this;
+ removeData(key) {
+ let scope = this;
do {
- var data = scope.data[key];
+ const data = scope.data[key];
if (data != null) scope.data[key] = null;
} while (scope = scope.parent);
- };
+ }
- _proto.init = function init() {
+ init() {
if (!this.references) this.crawl();
- };
+ }
- _proto.crawl = function crawl() {
- var path = this.path;
+ crawl() {
+ const path = this.path;
this.references = Object.create(null);
this.bindings = Object.create(null);
this.globals = Object.create(null);
@@ -637,44 +642,29 @@ var Scope = function () {
this.data = Object.create(null);
if (path.isLoop()) {
- var _arr12 = t.FOR_INIT_KEYS;
-
- for (var _i14 = 0; _i14 < _arr12.length; _i14++) {
- var key = _arr12[_i14];
- var node = path.get(key);
+ 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]) {
+ 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]) {
+ if (!path.get("id").node[t().NOT_LOCAL_BINDING]) {
this.registerBinding("local", path);
}
}
if (path.isFunction()) {
- var params = path.get("params");
-
- for (var _iterator3 = params, _isArray3 = Array.isArray(_iterator3), _i15 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
- var _ref3;
-
- if (_isArray3) {
- if (_i15 >= _iterator3.length) break;
- _ref3 = _iterator3[_i15++];
- } else {
- _i15 = _iterator3.next();
- if (_i15.done) break;
- _ref3 = _i15.value;
- }
+ const params = path.get("params");
- var _param = _ref3;
- this.registerBinding("param", _param);
+ for (const param of params) {
+ this.registerBinding("param", param);
}
}
@@ -682,9 +672,9 @@ var Scope = function () {
this.registerBinding("let", path);
}
- var parent = this.getProgramParent();
+ const parent = this.getProgramParent();
if (parent.crawling) return;
- var state = {
+ const state = {
references: [],
constantViolations: [],
assignments: []
@@ -693,76 +683,36 @@ var Scope = function () {
path.traverse(collectorVisitor, state);
this.crawling = false;
- for (var _iterator4 = state.assignments, _isArray4 = Array.isArray(_iterator4), _i16 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
- var _ref4;
-
- if (_isArray4) {
- if (_i16 >= _iterator4.length) break;
- _ref4 = _iterator4[_i16++];
- } else {
- _i16 = _iterator4.next();
- if (_i16.done) break;
- _ref4 = _i16.value;
- }
-
- var _path3 = _ref4;
-
- var ids = _path3.getBindingIdentifiers();
+ for (const path of state.assignments) {
+ const ids = path.getBindingIdentifiers();
+ let programParent;
- var programParent = void 0;
-
- for (var name in ids) {
- if (_path3.scope.getBinding(name)) continue;
- programParent = programParent || _path3.scope.getProgramParent();
+ for (const name in ids) {
+ if (path.scope.getBinding(name)) continue;
+ programParent = programParent || path.scope.getProgramParent();
programParent.addGlobal(ids[name]);
}
- _path3.scope.registerConstantViolation(_path3);
+ path.scope.registerConstantViolation(path);
}
- for (var _iterator5 = state.references, _isArray5 = Array.isArray(_iterator5), _i17 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
- var _ref5;
-
- if (_isArray5) {
- if (_i17 >= _iterator5.length) break;
- _ref5 = _iterator5[_i17++];
- } else {
- _i17 = _iterator5.next();
- if (_i17.done) break;
- _ref5 = _i17.value;
- }
-
- var _ref7 = _ref5;
-
- var binding = _ref7.scope.getBinding(_ref7.node.name);
+ for (const ref of state.references) {
+ const binding = ref.scope.getBinding(ref.node.name);
if (binding) {
- binding.reference(_ref7);
+ binding.reference(ref);
} else {
- _ref7.scope.getProgramParent().addGlobal(_ref7.node);
+ ref.scope.getProgramParent().addGlobal(ref.node);
}
}
- for (var _iterator6 = state.constantViolations, _isArray6 = Array.isArray(_iterator6), _i18 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {
- var _ref6;
-
- if (_isArray6) {
- if (_i18 >= _iterator6.length) break;
- _ref6 = _iterator6[_i18++];
- } else {
- _i18 = _iterator6.next();
- if (_i18.done) break;
- _ref6 = _i18.value;
- }
-
- var _path4 = _ref6;
-
- _path4.scope.registerConstantViolation(_path4);
+ for (const path of state.constantViolations) {
+ path.scope.registerConstantViolation(path);
}
- };
+ }
- _proto.push = function push(opts) {
- var path = this.path;
+ push(opts) {
+ let path = this.path;
if (!path.isBlockStatement() && !path.isProgram()) {
path = this.getBlockParent().path;
@@ -777,29 +727,26 @@ var Scope = function () {
path = path.get("body");
}
- var unique = opts.unique;
- var kind = opts.kind || "var";
- var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
- var dataKey = "declaration:" + kind + ":" + blockHoist;
- var declarPath = !unique && path.getData(dataKey);
+ 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) {
- var declar = t.variableDeclaration(kind, []);
+ const declar = t().variableDeclaration(kind, []);
declar._blockHoist = blockHoist;
-
- var _path$unshiftContaine = path.unshiftContainer("body", [declar]);
-
- declarPath = _path$unshiftContaine[0];
+ [declarPath] = path.unshiftContainer("body", [declar]);
if (!unique) path.setData(dataKey, declarPath);
}
- var declarator = t.variableDeclarator(opts.id, opts.init);
+ const declarator = t().variableDeclarator(opts.id, opts.init);
declarPath.node.declarations.push(declarator);
this.registerBinding(kind, declarPath.get("declarations").pop());
- };
+ }
- _proto.getProgramParent = function getProgramParent() {
- var scope = this;
+ getProgramParent() {
+ let scope = this;
do {
if (scope.path.isProgram()) {
@@ -808,10 +755,10 @@ var Scope = function () {
} while (scope = scope.parent);
throw new Error("Couldn't find a Program");
- };
+ }
- _proto.getFunctionParent = function getFunctionParent() {
- var scope = this;
+ getFunctionParent() {
+ let scope = this;
do {
if (scope.path.isFunctionParent()) {
@@ -820,10 +767,10 @@ var Scope = function () {
} while (scope = scope.parent);
return null;
- };
+ }
- _proto.getBlockParent = function getBlockParent() {
- var scope = this;
+ getBlockParent() {
+ let scope = this;
do {
if (scope.path.isBlockParent()) {
@@ -832,31 +779,29 @@ var Scope = function () {
} while (scope = scope.parent);
throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
- };
+ }
- _proto.getAllBindings = function getAllBindings() {
- var ids = Object.create(null);
- var scope = this;
+ getAllBindings() {
+ const ids = Object.create(null);
+ let scope = this;
do {
- (0, _defaults.default)(ids, scope.bindings);
+ (0, _defaults().default)(ids, scope.bindings);
scope = scope.parent;
} while (scope);
return ids;
- };
+ }
- _proto.getAllBindingsOfKind = function getAllBindingsOfKind() {
- var ids = Object.create(null);
- var _arr13 = arguments;
+ getAllBindingsOfKind() {
+ const ids = Object.create(null);
- for (var _i19 = 0; _i19 < _arr13.length; _i19++) {
- var kind = _arr13[_i19];
- var scope = this;
+ for (const kind of arguments) {
+ let scope = this;
do {
- for (var name in scope.bindings) {
- var binding = scope.bindings[name];
+ for (const name in scope.bindings) {
+ const binding = scope.bindings[name];
if (binding.kind === kind) ids[name] = binding;
}
@@ -865,106 +810,85 @@ var Scope = function () {
}
return ids;
- };
+ }
- _proto.bindingIdentifierEquals = function bindingIdentifierEquals(name, node) {
+ bindingIdentifierEquals(name, node) {
return this.getBindingIdentifier(name) === node;
- };
+ }
- _proto.getBinding = function getBinding(name) {
- var scope = this;
+ getBinding(name) {
+ let scope = this;
do {
- var binding = scope.getOwnBinding(name);
+ const binding = scope.getOwnBinding(name);
if (binding) return binding;
} while (scope = scope.parent);
- };
+ }
- _proto.getOwnBinding = function getOwnBinding(name) {
+ getOwnBinding(name) {
return this.bindings[name];
- };
+ }
- _proto.getBindingIdentifier = function getBindingIdentifier(name) {
- var info = this.getBinding(name);
+ getBindingIdentifier(name) {
+ const info = this.getBinding(name);
return info && info.identifier;
- };
+ }
- _proto.getOwnBindingIdentifier = function getOwnBindingIdentifier(name) {
- var binding = this.bindings[name];
+ getOwnBindingIdentifier(name) {
+ const binding = this.bindings[name];
return binding && binding.identifier;
- };
+ }
- _proto.hasOwnBinding = function hasOwnBinding(name) {
+ hasOwnBinding(name) {
return !!this.getOwnBinding(name);
- };
+ }
- _proto.hasBinding = function hasBinding(name, noGlobals) {
+ 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;
+ if (!noGlobals && (0, _includes().default)(Scope.globals, name)) return true;
+ if (!noGlobals && (0, _includes().default)(Scope.contextVariables, name)) return true;
return false;
- };
+ }
- _proto.parentHasBinding = function parentHasBinding(name, noGlobals) {
+ parentHasBinding(name, noGlobals) {
return this.parent && this.parent.hasBinding(name, noGlobals);
- };
+ }
- _proto.moveBindingTo = function moveBindingTo(name, scope) {
- var info = this.getBinding(name);
+ moveBindingTo(name, scope) {
+ const info = this.getBinding(name);
if (info) {
info.scope.removeOwnBinding(name);
info.scope = scope;
scope.bindings[name] = info;
}
- };
+ }
- _proto.removeOwnBinding = function removeOwnBinding(name) {
+ removeOwnBinding(name) {
delete this.bindings[name];
- };
+ }
- _proto.removeBinding = function removeBinding(name) {
- var info = this.getBinding(name);
+ removeBinding(name) {
+ const info = this.getBinding(name);
if (info) {
info.scope.removeOwnBinding(name);
}
- var scope = this;
+ let scope = this;
do {
if (scope.uids[name]) {
scope.uids[name] = false;
}
} while (scope = scope.parent);
- };
-
- _createClass(Scope, [{
- key: "parent",
- get: function get() {
- var parent = this.path.findParent(function (p) {
- return p.isScope();
- });
- return parent && parent.scope;
- }
- }, {
- key: "parentBlock",
- get: function get() {
- return this.path.parent;
- }
- }, {
- key: "hub",
- get: function get() {
- return this.path.hub;
- }
- }]);
+ }
- return Scope;
-}();
+}
exports.default = Scope;
-Scope.globals = Object.keys(_globals.default.builtin);
+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
index 4d5816663d..b7a10ec69c 100644
--- 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
@@ -1,112 +1,120 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = void 0;
var _binding = _interopRequireDefault(require("../binding"));
-var t = _interopRequireWildcard(require("@babel/types"));
+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 }; }
-var renameVisitor = {
- ReferencedIdentifier: function ReferencedIdentifier(_ref, state) {
- var node = _ref.node;
-
+const renameVisitor = {
+ ReferencedIdentifier({
+ node
+ }, state) {
if (node.name === state.oldName) {
node.name = state.newName;
}
},
- Scope: function Scope(path, state) {
+
+ Scope(path, state) {
if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
path.skip();
}
},
- "AssignmentExpression|Declaration": function AssignmentExpressionDeclaration(path, state) {
- var ids = path.getOuterBindingIdentifiers();
- for (var name in ids) {
+ "AssignmentExpression|Declaration"(path, state) {
+ const ids = path.getOuterBindingIdentifiers();
+
+ for (const name in ids) {
if (name === state.oldName) ids[name].name = state.newName;
}
}
+
};
-var Renamer = function () {
- function Renamer(binding, oldName, newName) {
- this.oldName = void 0;
- this.newName = void 0;
- this.binding = void 0;
+class Renamer {
+ constructor(binding, oldName, newName) {
this.newName = newName;
this.oldName = oldName;
this.binding = binding;
}
- var _proto = Renamer.prototype;
+ maybeConvertFromExportDeclaration(parentDeclar) {
+ const maybeExportDeclar = parentDeclar.parentPath;
- _proto.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) {
- var exportDeclar = parentDeclar.parentPath.isExportDeclaration() && parentDeclar.parentPath;
- if (!exportDeclar) return;
- var isDefault = exportDeclar.isExportDefaultDeclaration();
-
- if (isDefault && (parentDeclar.isFunctionDeclaration() || parentDeclar.isClassDeclaration()) && !parentDeclar.node.id) {
- parentDeclar.node.id = parentDeclar.scope.generateUidIdentifier("default");
+ if (!maybeExportDeclar.isExportDeclaration()) {
+ return;
}
- var bindingIdentifiers = parentDeclar.getOuterBindingIdentifiers();
- var specifiers = [];
-
- for (var name in bindingIdentifiers) {
- var localName = name === this.oldName ? this.newName : name;
- var exportedName = isDefault ? "default" : name;
- specifiers.push(t.exportSpecifier(t.identifier(localName), t.identifier(exportedName)));
+ if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) {
+ return;
}
- if (specifiers.length) {
- var aliasDeclar = t.exportNamedDeclaration(null, specifiers);
-
- if (parentDeclar.isFunctionDeclaration()) {
- aliasDeclar._blockHoist = 3;
- }
-
- exportDeclar.insertAfter(aliasDeclar);
- exportDeclar.replaceWith(parentDeclar.node);
- }
- };
+ (0, _helperSplitExportDeclaration().default)(maybeExportDeclar);
+ }
- _proto.maybeConvertFromClassFunctionDeclaration = function maybeConvertFromClassFunctionDeclaration(path) {
+ maybeConvertFromClassFunctionDeclaration(path) {
return;
if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return;
if (this.binding.kind !== "hoisted") return;
- path.node.id = t.identifier(this.oldName);
+ 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))]));
- };
+ path.replaceWith(t().variableDeclaration("let", [t().variableDeclarator(t().identifier(this.newName), t().toExpression(path.node))]));
+ }
- _proto.maybeConvertFromClassFunctionExpression = function maybeConvertFromClassFunctionExpression(path) {
+ maybeConvertFromClassFunctionExpression(path) {
return;
if (!path.isFunctionExpression() && !path.isClassExpression()) return;
if (this.binding.kind !== "local") return;
- path.node.id = t.identifier(this.oldName);
+ path.node.id = t().identifier(this.oldName);
this.binding.scope.parent.push({
- id: t.identifier(this.newName)
+ id: t().identifier(this.newName)
});
- path.replaceWith(t.assignmentExpression("=", t.identifier(this.newName), path.node));
- };
+ path.replaceWith(t().assignmentExpression("=", t().identifier(this.newName), path.node));
+ }
- _proto.rename = function rename(block) {
- var binding = this.binding,
- oldName = this.oldName,
- newName = this.newName;
- var scope = binding.scope,
- path = binding.path;
- var parentDeclar = path.find(function (path) {
- return path.isDeclaration() || path.isFunctionExpression();
- });
+ rename(block) {
+ const {
+ binding,
+ oldName,
+ newName
+ } = this;
+ const {
+ scope,
+ path
+ } = binding;
+ const parentDeclar = path.find(path => path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression());
if (parentDeclar) {
- this.maybeConvertFromExportDeclaration(parentDeclar);
+ const bindingIds = parentDeclar.getOuterBindingIdentifiers();
+
+ if (bindingIds[oldName] === binding.identifier) {
+ this.maybeConvertFromExportDeclaration(parentDeclar);
+ }
}
scope.traverse(block || scope.block, renameVisitor, this);
@@ -123,9 +131,8 @@ var Renamer = function () {
this.maybeConvertFromClassFunctionDeclaration(parentDeclar);
this.maybeConvertFromClassFunctionExpression(parentDeclar);
}
- };
+ }
- return Renamer;
-}();
+}
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
index ae53c474bb..963c5da73a 100644
--- 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
@@ -1,15 +1,33 @@
"use strict";
-exports.__esModule = true;
+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 t() {
+ const data = _interopRequireWildcard(require("@babel/types"));
-var _clone = _interopRequireDefault(require("lodash/clone"));
+ 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 }; }
@@ -19,27 +37,15 @@ function explode(visitor) {
if (visitor._exploded) return visitor;
visitor._exploded = true;
- for (var nodeType in visitor) {
+ for (const nodeType in visitor) {
if (shouldIgnoreKey(nodeType)) continue;
- var parts = nodeType.split("|");
+ const parts = nodeType.split("|");
if (parts.length === 1) continue;
- var fns = visitor[nodeType];
+ const fns = visitor[nodeType];
delete visitor[nodeType];
- for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
-
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
-
- var _part = _ref;
- visitor[_part] = fns;
+ for (const part of parts) {
+ visitor[part] = fns;
}
}
@@ -48,78 +54,59 @@ function explode(visitor) {
ensureEntranceObjects(visitor);
ensureCallbackArrays(visitor);
- var _arr = Object.keys(visitor);
-
- for (var _i2 = 0; _i2 < _arr.length; _i2++) {
- var _nodeType = _arr[_i2];
- if (shouldIgnoreKey(_nodeType)) continue;
- var wrapper = virtualTypes[_nodeType];
+ for (const nodeType of Object.keys(visitor)) {
+ if (shouldIgnoreKey(nodeType)) continue;
+ const wrapper = virtualTypes[nodeType];
if (!wrapper) continue;
- var _fns = visitor[_nodeType];
+ const fns = visitor[nodeType];
- for (var type in _fns) {
- _fns[type] = wrapCheck(wrapper, _fns[type]);
+ for (const type in fns) {
+ fns[type] = wrapCheck(wrapper, fns[type]);
}
- delete visitor[_nodeType];
+ delete visitor[nodeType];
if (wrapper.types) {
- var _arr2 = wrapper.types;
-
- for (var _i4 = 0; _i4 < _arr2.length; _i4++) {
- var _type = _arr2[_i4];
-
- if (visitor[_type]) {
- mergePair(visitor[_type], _fns);
+ for (const type of wrapper.types) {
+ if (visitor[type]) {
+ mergePair(visitor[type], fns);
} else {
- visitor[_type] = _fns;
+ visitor[type] = fns;
}
}
} else {
- mergePair(visitor, _fns);
+ mergePair(visitor, fns);
}
}
- for (var _nodeType2 in visitor) {
- if (shouldIgnoreKey(_nodeType2)) continue;
- var _fns2 = visitor[_nodeType2];
- var aliases = t.FLIPPED_ALIAS_KEYS[_nodeType2];
- var deprecratedKey = t.DEPRECATED_KEYS[_nodeType2];
+ for (const nodeType in 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 " + _nodeType2 + " but it has been renamed to " + deprecratedKey);
+ console.trace(`Visitor defined for ${nodeType} but it has been renamed to ${deprecratedKey}`);
aliases = [deprecratedKey];
}
if (!aliases) continue;
- delete visitor[_nodeType2];
-
- for (var _iterator2 = aliases, _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
- var _ref2;
-
- if (_isArray2) {
- if (_i3 >= _iterator2.length) break;
- _ref2 = _iterator2[_i3++];
- } else {
- _i3 = _iterator2.next();
- if (_i3.done) break;
- _ref2 = _i3.value;
- }
+ delete visitor[nodeType];
- var _alias = _ref2;
- var existing = visitor[_alias];
+ for (const alias of aliases) {
+ const existing = visitor[alias];
if (existing) {
- mergePair(existing, _fns2);
+ mergePair(existing, fns);
} else {
- visitor[_alias] = (0, _clone.default)(_fns2);
+ visitor[alias] = (0, _clone().default)(fns);
}
}
}
- for (var _nodeType3 in visitor) {
- if (shouldIgnoreKey(_nodeType3)) continue;
- ensureCallbackArrays(visitor[_nodeType3]);
+ for (const nodeType in visitor) {
+ if (shouldIgnoreKey(nodeType)) continue;
+ ensureCallbackArrays(visitor[nodeType]);
}
return visitor;
@@ -132,25 +119,25 @@ function verify(visitor) {
throw new Error("You passed `traverse()` a function when it expected a visitor object, " + "are you sure you didn't mean `{ enter: Function }`?");
}
- for (var nodeType in visitor) {
+ for (const nodeType in 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");
+ 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`);
}
- var visitors = visitor[nodeType];
+ const visitors = visitor[nodeType];
if (typeof visitors === "object") {
- for (var visitorKey in visitors) {
+ for (const visitorKey in visitors) {
if (visitorKey === "enter" || visitorKey === "exit") {
- validateVisitorMethods(nodeType + "." + visitorKey, visitors[visitorKey]);
+ 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));
+ throw new Error("You passed `traverse()` a visitor object with the property " + `${nodeType} that has the invalid property ${visitorKey}`);
}
}
}
@@ -160,48 +147,31 @@ function verify(visitor) {
}
function validateVisitorMethods(path, val) {
- var fns = [].concat(val);
-
- for (var _iterator3 = fns, _isArray3 = Array.isArray(_iterator3), _i5 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
- var _ref3;
+ const fns = [].concat(val);
- if (_isArray3) {
- if (_i5 >= _iterator3.length) break;
- _ref3 = _iterator3[_i5++];
- } else {
- _i5 = _iterator3.next();
- if (_i5.done) break;
- _ref3 = _i5.value;
- }
-
- var _fn = _ref3;
-
- if (typeof _fn !== "function") {
- throw new TypeError("Non-function found defined in " + path + " with type " + typeof _fn);
+ 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) {
- if (states === void 0) {
- states = [];
- }
-
- var rootVisitor = {};
+function merge(visitors, states = [], wrapper) {
+ const rootVisitor = {};
- for (var i = 0; i < visitors.length; i++) {
- var visitor = visitors[i];
- var state = states[i];
+ for (let i = 0; i < visitors.length; i++) {
+ const visitor = visitors[i];
+ const state = states[i];
explode(visitor);
- for (var type in visitor) {
- var visitorType = visitor[type];
+ for (const type in visitor) {
+ let visitorType = visitor[type];
if (state || wrapper) {
visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper);
}
- var nodeVisitor = rootVisitor[type] = rootVisitor[type] || {};
+ const nodeVisitor = rootVisitor[type] = rootVisitor[type] || {};
mergePair(nodeVisitor, visitorType);
}
}
@@ -210,16 +180,16 @@ function merge(visitors, states, wrapper) {
}
function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
- var newVisitor = {};
+ const newVisitor = {};
- var _loop = function _loop(key) {
- var fns = oldVisitor[key];
- if (!Array.isArray(fns)) return "continue";
+ for (const key in oldVisitor) {
+ let fns = oldVisitor[key];
+ if (!Array.isArray(fns)) continue;
fns = fns.map(function (fn) {
- var newFn = fn;
+ let newFn = fn;
if (state) {
- newFn = function newFn(path) {
+ newFn = function (path) {
return fn.call(state, path, state);
};
}
@@ -231,21 +201,15 @@ function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
return newFn;
});
newVisitor[key] = fns;
- };
-
- for (var key in oldVisitor) {
- var _ret = _loop(key);
-
- if (_ret === "continue") continue;
}
return newVisitor;
}
function ensureEntranceObjects(obj) {
- for (var key in obj) {
+ for (const key in obj) {
if (shouldIgnoreKey(key)) continue;
- var fns = obj[key];
+ const fns = obj[key];
if (typeof fns === "function") {
obj[key] = {
@@ -261,15 +225,13 @@ function ensureCallbackArrays(obj) {
}
function wrapCheck(wrapper, fn) {
- var newFn = function newFn(path) {
+ const newFn = function (path) {
if (wrapper.checkPath(path)) {
return fn.apply(this, arguments);
}
};
- newFn.toString = function () {
- return fn.toString();
- };
+ newFn.toString = () => fn.toString();
return newFn;
}
@@ -286,7 +248,7 @@ function shouldIgnoreKey(key) {
}
function mergePair(dest, src) {
- for (var key in src) {
+ for (const key in 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
index 7ef7d42c27..bea5eb0a91 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/package.json
@@ -1,56 +1,36 @@
{
- "_from": "@babel/traverse@7.0.0-beta.36",
- "_id": "@babel/traverse@7.0.0-beta.36",
- "_inBundle": false,
- "_integrity": "sha512-OTUb6iSKVR/98dGThRJ1BiyfwbuX10BVnkz89IpaerjTPRhDfMBfLsqmzxz5MiywUOW4M0Clta0o7rSxkfcuzw==",
- "_location": "/babel-eslint/@babel/traverse",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "@babel/traverse@7.0.0-beta.36",
- "name": "@babel/traverse",
- "escapedName": "@babel%2ftraverse",
- "scope": "@babel",
- "rawSpec": "7.0.0-beta.36",
- "saveSpec": null,
- "fetchSpec": "7.0.0-beta.36"
- },
- "_requiredBy": [
- "/babel-eslint"
- ],
- "_resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.36.tgz",
- "_shasum": "1dc6f8750e89b6b979de5fe44aa993b1a2192261",
- "_spec": "@babel/traverse@7.0.0-beta.36",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint",
"author": {
"name": "Sebastian McKenzie",
"email": "sebmck@gmail.com"
},
"bundleDependencies": false,
"dependencies": {
- "@babel/code-frame": "7.0.0-beta.36",
- "@babel/helper-function-name": "7.0.0-beta.36",
- "@babel/types": "7.0.0-beta.36",
- "babylon": "7.0.0-beta.36",
- "debug": "^3.0.1",
+ "@babel/code-frame": "^7.0.0",
+ "@babel/generator": "^7.3.4",
+ "@babel/helper-function-name": "^7.1.0",
+ "@babel/helper-split-export-declaration": "^7.0.0",
+ "@babel/parser": "^7.3.4",
+ "@babel/types": "^7.3.4",
+ "debug": "^4.1.0",
"globals": "^11.1.0",
- "invariant": "^2.2.0",
- "lodash": "^4.2.0"
+ "lodash": "^4.17.11"
},
"deprecated": false,
"description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes",
"devDependencies": {
- "@babel/generator": "7.0.0-beta.36",
- "@babel/helper-plugin-test-runner": "7.0.0-beta.36"
+ "@babel/helper-plugin-test-runner": "^7.0.0"
},
+ "gitHead": "1f6454cc90fe33e0a32260871212e2f719f35741",
"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.0.0-beta.36"
-}
+ "version": "7.3.4"
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/LICENSE b/tools/node_modules/babel-eslint/node_modules/@babel/types/LICENSE
new file mode 100644
index 0000000000..f31575ec77
--- /dev/null
+++ b/tools/node_modules/babel-eslint/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-eslint/node_modules/@babel/types/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/types/README.md
index 5e8d650c86..8d33374d3b 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/README.md
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/README.md
@@ -1,2835 +1,19 @@
# @babel/types
-> This module contains methods for building ASTs manually and for checking the types of AST nodes.
+> 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
```
-## API
-
-<!-- begin generated section -->
-
-### anyTypeAnnotation
-```javascript
-t.anyTypeAnnotation()
-```
-
-See also `t.isAnyTypeAnnotation(node, opts)` and `t.assertAnyTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`, `FlowBaseAnnotation`
-
-
----
-
-### arrayExpression
-```javascript
-t.arrayExpression(elements)
-```
-
-See also `t.isArrayExpression(node, opts)` and `t.assertArrayExpression(node, opts)`.
-
-Aliases: `Expression`
-
- - `elements`: `Array<null | Expression | SpreadElement>` (default: `[]`)
-
----
-
-### arrayPattern
-```javascript
-t.arrayPattern(elements)
-```
-
-See also `t.isArrayPattern(node, opts)` and `t.assertArrayPattern(node, opts)`.
-
-Aliases: `Pattern`, `PatternLike`, `LVal`
-
- - `elements`: `Array<PatternLike>` (required)
- - `decorators`: `Array<Decorator>` (default: `null`)
- - `typeAnnotation`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`)
-
----
-
-### arrayTypeAnnotation
-```javascript
-t.arrayTypeAnnotation(elementType)
-```
-
-See also `t.isArrayTypeAnnotation(node, opts)` and `t.assertArrayTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`
-
- - `elementType` (required)
-
----
-
-### arrowFunctionExpression
-```javascript
-t.arrowFunctionExpression(params, body, async)
-```
-
-See also `t.isArrowFunctionExpression(node, opts)` and `t.assertArrowFunctionExpression(node, opts)`.
-
-Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`, `Pureish`
-
- - `params`: `Array<LVal>` (required)
- - `body`: `BlockStatement | Expression` (required)
- - `async`: `boolean` (default: `false`)
- - `expression`: `boolean` (default: `null`)
- - `generator`: `boolean` (default: `false`)
- - `returnType`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`)
- - `typeParameters`: `TypeParameterDeclaration | TSTypeParameterDeclaration | Noop` (default: `null`)
-
----
-
-### assignmentExpression
-```javascript
-t.assignmentExpression(operator, left, right)
-```
-
-See also `t.isAssignmentExpression(node, opts)` and `t.assertAssignmentExpression(node, opts)`.
-
-Aliases: `Expression`
-
- - `operator`: `string` (required)
- - `left`: `LVal` (required)
- - `right`: `Expression` (required)
-
----
-
-### assignmentPattern
-```javascript
-t.assignmentPattern(left, right)
-```
-
-See also `t.isAssignmentPattern(node, opts)` and `t.assertAssignmentPattern(node, opts)`.
-
-Aliases: `Pattern`, `PatternLike`, `LVal`
-
- - `left`: `Identifier | ObjectPattern | ArrayPattern` (required)
- - `right`: `Expression` (required)
- - `decorators`: `Array<Decorator>` (default: `null`)
- - `typeAnnotation`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`)
-
----
-
-### awaitExpression
-```javascript
-t.awaitExpression(argument)
-```
-
-See also `t.isAwaitExpression(node, opts)` and `t.assertAwaitExpression(node, opts)`.
-
-Aliases: `Expression`, `Terminatorless`
-
- - `argument`: `Expression` (required)
-
----
-
-### binaryExpression
-```javascript
-t.binaryExpression(operator, left, right)
-```
-
-See also `t.isBinaryExpression(node, opts)` and `t.assertBinaryExpression(node, opts)`.
-
-Aliases: `Binary`, `Expression`
-
- - `operator`: `'+' | '-' | '/' | '%' | '*' | '**' | '&' | '|' | '>>' | '>>>' | '<<' | '^' | '==' | '===' | '!=' | '!==' | 'in' | 'instanceof' | '>' | '<' | '>=' | '<='` (required)
- - `left`: `Expression` (required)
- - `right`: `Expression` (required)
-
----
-
-### bindExpression
-```javascript
-t.bindExpression(object, callee)
-```
-
-See also `t.isBindExpression(node, opts)` and `t.assertBindExpression(node, opts)`.
-
-Aliases: `Expression`
-
- - `object` (required)
- - `callee` (required)
-
----
-
-### blockStatement
-```javascript
-t.blockStatement(body, directives)
-```
-
-See also `t.isBlockStatement(node, opts)` and `t.assertBlockStatement(node, opts)`.
-
-Aliases: `Scopable`, `BlockParent`, `Block`, `Statement`
-
- - `body`: `Array<Statement>` (required)
- - `directives`: `Array<Directive>` (default: `[]`)
-
----
-
-### booleanLiteral
-```javascript
-t.booleanLiteral(value)
-```
-
-See also `t.isBooleanLiteral(node, opts)` and `t.assertBooleanLiteral(node, opts)`.
-
-Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
-
- - `value`: `boolean` (required)
-
----
-
-### booleanLiteralTypeAnnotation
-```javascript
-t.booleanLiteralTypeAnnotation()
-```
-
-See also `t.isBooleanLiteralTypeAnnotation(node, opts)` and `t.assertBooleanLiteralTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`
-
-
----
-
-### booleanTypeAnnotation
-```javascript
-t.booleanTypeAnnotation()
-```
-
-See also `t.isBooleanTypeAnnotation(node, opts)` and `t.assertBooleanTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`, `FlowBaseAnnotation`
-
-
----
-
-### breakStatement
-```javascript
-t.breakStatement(label)
-```
-
-See also `t.isBreakStatement(node, opts)` and `t.assertBreakStatement(node, opts)`.
-
-Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
-
- - `label`: `Identifier` (default: `null`)
-
----
-
-### callExpression
-```javascript
-t.callExpression(callee, arguments)
-```
-
-See also `t.isCallExpression(node, opts)` and `t.assertCallExpression(node, opts)`.
-
-Aliases: `Expression`
-
- - `callee`: `Expression` (required)
- - `arguments`: `Array<Expression | SpreadElement | JSXNamespacedName>` (required)
- - `optional`: `true | false` (default: `null`)
- - `typeParameters`: `TypeParameterInstantiation | TSTypeParameterInstantiation` (default: `null`)
-
----
-
-### catchClause
-```javascript
-t.catchClause(param, body)
-```
-
-See also `t.isCatchClause(node, opts)` and `t.assertCatchClause(node, opts)`.
-
-Aliases: `Scopable`, `BlockParent`
-
- - `param`: `Identifier` (default: `null`)
- - `body`: `BlockStatement` (required)
-
----
-
-### classBody
-```javascript
-t.classBody(body)
-```
-
-See also `t.isClassBody(node, opts)` and `t.assertClassBody(node, opts)`.
-
- - `body`: `Array<ClassMethod | ClassProperty | TSDeclareMethod | TSIndexSignature>` (required)
-
----
-
-### classDeclaration
-```javascript
-t.classDeclaration(id, superClass, body, decorators)
-```
-
-See also `t.isClassDeclaration(node, opts)` and `t.assertClassDeclaration(node, opts)`.
-
-Aliases: `Scopable`, `Class`, `Statement`, `Declaration`, `Pureish`
-
- - `id`: `Identifier` (default: `null`)
- - `superClass`: `Expression` (default: `null`)
- - `body`: `ClassBody` (required)
- - `decorators`: `Array<Decorator>` (default: `null`)
- - `abstract`: `boolean` (default: `null`)
- - `declare`: `boolean` (default: `null`)
- - `implements`: `Array<TSExpressionWithTypeArguments | FlowClassImplements>` (default: `null`)
- - `mixins` (default: `null`)
- - `superTypeParameters`: `TypeParameterInstantiation | TSTypeParameterInstantiation` (default: `null`)
- - `typeParameters`: `TypeParameterDeclaration | TSTypeParameterDeclaration | Noop` (default: `null`)
-
----
-
-### classExpression
-```javascript
-t.classExpression(id, superClass, body, decorators)
-```
-
-See also `t.isClassExpression(node, opts)` and `t.assertClassExpression(node, opts)`.
-
-Aliases: `Scopable`, `Class`, `Expression`, `Pureish`
-
- - `id`: `Identifier` (default: `null`)
- - `superClass`: `Expression` (default: `null`)
- - `body`: `ClassBody` (required)
- - `decorators`: `Array<Decorator>` (default: `null`)
- - `implements`: `Array<TSExpressionWithTypeArguments | FlowClassImplements>` (default: `null`)
- - `mixins` (default: `null`)
- - `superTypeParameters`: `TypeParameterInstantiation | TSTypeParameterInstantiation` (default: `null`)
- - `typeParameters`: `TypeParameterDeclaration | TSTypeParameterDeclaration | Noop` (default: `null`)
-
----
-
-### classImplements
-```javascript
-t.classImplements(id, typeParameters)
-```
-
-See also `t.isClassImplements(node, opts)` and `t.assertClassImplements(node, opts)`.
-
-Aliases: `Flow`
-
- - `id` (required)
- - `typeParameters` (required)
-
----
-
-### classMethod
-```javascript
-t.classMethod(kind, key, params, body, computed, static)
-```
-
-See also `t.isClassMethod(node, opts)` and `t.assertClassMethod(node, opts)`.
-
-Aliases: `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method`
-
- - `kind`: `"get" | "set" | "method" | "constructor"` (default: `'method'`)
- - `key`: if computed then `Expression` else `Identifier | Literal` (required)
- - `params`: `Array<LVal>` (required)
- - `body`: `BlockStatement` (required)
- - `computed`: `boolean` (default: `false`)
- - `static`: `boolean` (default: `null`)
- - `abstract`: `boolean` (default: `null`)
- - `access`: `"public" | "private" | "protected"` (default: `null`)
- - `accessibility`: `"public" | "private" | "protected"` (default: `null`)
- - `async`: `boolean` (default: `false`)
- - `decorators`: `Array<Decorator>` (default: `null`)
- - `generator`: `boolean` (default: `false`)
- - `optional`: `boolean` (default: `null`)
- - `returnType`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`)
- - `typeParameters`: `TypeParameterDeclaration | TSTypeParameterDeclaration | Noop` (default: `null`)
-
----
-
-### classProperty
-```javascript
-t.classProperty(key, value, typeAnnotation, decorators, computed)
-```
-
-See also `t.isClassProperty(node, opts)` and `t.assertClassProperty(node, opts)`.
-
-Aliases: `Property`
-
- - `key` (required)
- - `value`: `Expression` (default: `null`)
- - `typeAnnotation`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`)
- - `decorators`: `Array<Decorator>` (default: `null`)
- - `computed`: `boolean` (default: `false`)
- - `abstract`: `boolean` (default: `null`)
- - `accessibility`: `"public" | "private" | "protected"` (default: `null`)
- - `optional`: `boolean` (default: `null`)
- - `readonly`: `boolean` (default: `null`)
- - `static`: `boolean` (default: `null`)
-
----
-
-### conditionalExpression
-```javascript
-t.conditionalExpression(test, consequent, alternate)
-```
-
-See also `t.isConditionalExpression(node, opts)` and `t.assertConditionalExpression(node, opts)`.
-
-Aliases: `Expression`, `Conditional`
-
- - `test`: `Expression` (required)
- - `consequent`: `Expression` (required)
- - `alternate`: `Expression` (required)
-
----
-
-### continueStatement
-```javascript
-t.continueStatement(label)
-```
-
-See also `t.isContinueStatement(node, opts)` and `t.assertContinueStatement(node, opts)`.
-
-Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
-
- - `label`: `Identifier` (default: `null`)
-
----
-
-### debuggerStatement
-```javascript
-t.debuggerStatement()
-```
-
-See also `t.isDebuggerStatement(node, opts)` and `t.assertDebuggerStatement(node, opts)`.
-
-Aliases: `Statement`
-
-
----
-
-### declareClass
-```javascript
-t.declareClass(id, typeParameters, extends, body)
-```
-
-See also `t.isDeclareClass(node, opts)` and `t.assertDeclareClass(node, opts)`.
-
-Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
-
- - `id` (required)
- - `typeParameters` (required)
- - `extends` (required)
- - `body` (required)
-
----
-
-### declareExportAllDeclaration
-```javascript
-t.declareExportAllDeclaration(source)
-```
-
-See also `t.isDeclareExportAllDeclaration(node, opts)` and `t.assertDeclareExportAllDeclaration(node, opts)`.
-
-Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
-
- - `source` (required)
-
----
-
-### declareExportDeclaration
-```javascript
-t.declareExportDeclaration(declaration, specifiers, source)
-```
-
-See also `t.isDeclareExportDeclaration(node, opts)` and `t.assertDeclareExportDeclaration(node, opts)`.
-
-Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
-
- - `declaration` (required)
- - `specifiers` (required)
- - `source` (required)
-
----
-
-### declareFunction
-```javascript
-t.declareFunction(id)
-```
-
-See also `t.isDeclareFunction(node, opts)` and `t.assertDeclareFunction(node, opts)`.
-
-Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
-
- - `id` (required)
-
----
-
-### declareInterface
-```javascript
-t.declareInterface(id, typeParameters, extends, body)
-```
-
-See also `t.isDeclareInterface(node, opts)` and `t.assertDeclareInterface(node, opts)`.
-
-Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
-
- - `id` (required)
- - `typeParameters` (required)
- - `extends` (required)
- - `body` (required)
-
----
-
-### declareModule
-```javascript
-t.declareModule(id, body)
-```
-
-See also `t.isDeclareModule(node, opts)` and `t.assertDeclareModule(node, opts)`.
-
-Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
-
- - `id` (required)
- - `body` (required)
-
----
-
-### declareModuleExports
-```javascript
-t.declareModuleExports(typeAnnotation)
-```
-
-See also `t.isDeclareModuleExports(node, opts)` and `t.assertDeclareModuleExports(node, opts)`.
-
-Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
-
- - `typeAnnotation` (required)
-
----
-
-### declareOpaqueType
-```javascript
-t.declareOpaqueType(id, typeParameters, supertype)
-```
-
-See also `t.isDeclareOpaqueType(node, opts)` and `t.assertDeclareOpaqueType(node, opts)`.
-
-Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
-
- - `id` (required)
- - `typeParameters` (required)
- - `supertype` (required)
-
----
-
-### declareTypeAlias
-```javascript
-t.declareTypeAlias(id, typeParameters, right)
-```
-
-See also `t.isDeclareTypeAlias(node, opts)` and `t.assertDeclareTypeAlias(node, opts)`.
-
-Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
-
- - `id` (required)
- - `typeParameters` (required)
- - `right` (required)
-
----
-
-### declareVariable
-```javascript
-t.declareVariable(id)
-```
-
-See also `t.isDeclareVariable(node, opts)` and `t.assertDeclareVariable(node, opts)`.
-
-Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
-
- - `id` (required)
-
----
-
-### declaredPredicate
-```javascript
-t.declaredPredicate(value)
-```
-
-See also `t.isDeclaredPredicate(node, opts)` and `t.assertDeclaredPredicate(node, opts)`.
-
-Aliases: `Flow`, `FlowPredicate`
-
- - `value` (required)
-
----
-
-### decorator
-```javascript
-t.decorator(expression)
-```
-
-See also `t.isDecorator(node, opts)` and `t.assertDecorator(node, opts)`.
-
- - `expression`: `Expression` (required)
-
----
-
-### directive
-```javascript
-t.directive(value)
-```
-
-See also `t.isDirective(node, opts)` and `t.assertDirective(node, opts)`.
-
- - `value`: `DirectiveLiteral` (required)
-
----
-
-### directiveLiteral
-```javascript
-t.directiveLiteral(value)
-```
-
-See also `t.isDirectiveLiteral(node, opts)` and `t.assertDirectiveLiteral(node, opts)`.
-
- - `value`: `string` (required)
-
----
-
-### doExpression
-```javascript
-t.doExpression(body)
-```
-
-See also `t.isDoExpression(node, opts)` and `t.assertDoExpression(node, opts)`.
-
-Aliases: `Expression`
-
- - `body`: `BlockStatement` (required)
-
----
-
-### doWhileStatement
-```javascript
-t.doWhileStatement(test, body)
-```
-
-See also `t.isDoWhileStatement(node, opts)` and `t.assertDoWhileStatement(node, opts)`.
-
-Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable`
-
- - `test`: `Expression` (required)
- - `body`: `Statement` (required)
-
----
-
-### emptyStatement
-```javascript
-t.emptyStatement()
-```
-
-See also `t.isEmptyStatement(node, opts)` and `t.assertEmptyStatement(node, opts)`.
-
-Aliases: `Statement`
-
-
----
-
-### emptyTypeAnnotation
-```javascript
-t.emptyTypeAnnotation()
-```
-
-See also `t.isEmptyTypeAnnotation(node, opts)` and `t.assertEmptyTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`, `FlowBaseAnnotation`
-
-
----
-
-### existsTypeAnnotation
-```javascript
-t.existsTypeAnnotation()
-```
-
-See also `t.isExistsTypeAnnotation(node, opts)` and `t.assertExistsTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`
-
-
----
-
-### exportAllDeclaration
-```javascript
-t.exportAllDeclaration(source)
-```
-
-See also `t.isExportAllDeclaration(node, opts)` and `t.assertExportAllDeclaration(node, opts)`.
-
-Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration`
-
- - `source`: `StringLiteral` (required)
-
----
-
-### exportDefaultDeclaration
-```javascript
-t.exportDefaultDeclaration(declaration)
-```
-
-See also `t.isExportDefaultDeclaration(node, opts)` and `t.assertExportDefaultDeclaration(node, opts)`.
-
-Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration`
-
- - `declaration`: `FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression` (required)
-
----
-
-### exportDefaultSpecifier
-```javascript
-t.exportDefaultSpecifier(exported)
-```
-
-See also `t.isExportDefaultSpecifier(node, opts)` and `t.assertExportDefaultSpecifier(node, opts)`.
-
-Aliases: `ModuleSpecifier`
-
- - `exported`: `Identifier` (required)
-
----
-
-### exportNamedDeclaration
-```javascript
-t.exportNamedDeclaration(declaration, specifiers, source)
-```
-
-See also `t.isExportNamedDeclaration(node, opts)` and `t.assertExportNamedDeclaration(node, opts)`.
-
-Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration`
-
- - `declaration`: `Declaration` (default: `null`)
- - `specifiers`: `Array<ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier>` (required)
- - `source`: `StringLiteral` (default: `null`)
-
----
-
-### exportNamespaceSpecifier
-```javascript
-t.exportNamespaceSpecifier(exported)
-```
-
-See also `t.isExportNamespaceSpecifier(node, opts)` and `t.assertExportNamespaceSpecifier(node, opts)`.
-
-Aliases: `ModuleSpecifier`
-
- - `exported`: `Identifier` (required)
-
----
-
-### exportSpecifier
-```javascript
-t.exportSpecifier(local, exported)
-```
-
-See also `t.isExportSpecifier(node, opts)` and `t.assertExportSpecifier(node, opts)`.
-
-Aliases: `ModuleSpecifier`
-
- - `local`: `Identifier` (required)
- - `exported`: `Identifier` (required)
-
----
-
-### expressionStatement
-```javascript
-t.expressionStatement(expression)
-```
-
-See also `t.isExpressionStatement(node, opts)` and `t.assertExpressionStatement(node, opts)`.
-
-Aliases: `Statement`, `ExpressionWrapper`
-
- - `expression`: `Expression` (required)
-
----
-
-### file
-```javascript
-t.file(program, comments, tokens)
-```
-
-See also `t.isFile(node, opts)` and `t.assertFile(node, opts)`.
-
- - `program`: `Program` (required)
- - `comments` (required)
- - `tokens` (required)
-
----
-
-### forInStatement
-```javascript
-t.forInStatement(left, right, body)
-```
-
-See also `t.isForInStatement(node, opts)` and `t.assertForInStatement(node, opts)`.
-
-Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement`
-
- - `left`: `VariableDeclaration | LVal` (required)
- - `right`: `Expression` (required)
- - `body`: `Statement` (required)
-
----
-
-### forOfStatement
-```javascript
-t.forOfStatement(left, right, body)
-```
-
-See also `t.isForOfStatement(node, opts)` and `t.assertForOfStatement(node, opts)`.
-
-Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement`
-
- - `left`: `VariableDeclaration | LVal` (required)
- - `right`: `Expression` (required)
- - `body`: `Statement` (required)
- - `await`: `boolean` (default: `false`)
-
----
-
-### forStatement
-```javascript
-t.forStatement(init, test, update, body)
-```
-
-See also `t.isForStatement(node, opts)` and `t.assertForStatement(node, opts)`.
-
-Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`
-
- - `init`: `VariableDeclaration | Expression` (default: `null`)
- - `test`: `Expression` (default: `null`)
- - `update`: `Expression` (default: `null`)
- - `body`: `Statement` (required)
-
----
-
-### functionDeclaration
-```javascript
-t.functionDeclaration(id, params, body, generator, async)
-```
-
-See also `t.isFunctionDeclaration(node, opts)` and `t.assertFunctionDeclaration(node, opts)`.
-
-Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Statement`, `Pureish`, `Declaration`
-
- - `id`: `Identifier` (default: `null`)
- - `params`: `Array<LVal>` (required)
- - `body`: `BlockStatement` (required)
- - `generator`: `boolean` (default: `false`)
- - `async`: `boolean` (default: `false`)
- - `declare`: `boolean` (default: `null`)
- - `returnType`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`)
- - `typeParameters`: `TypeParameterDeclaration | TSTypeParameterDeclaration | Noop` (default: `null`)
-
----
-
-### functionExpression
-```javascript
-t.functionExpression(id, params, body, generator, async)
-```
-
-See also `t.isFunctionExpression(node, opts)` and `t.assertFunctionExpression(node, opts)`.
-
-Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`, `Pureish`
-
- - `id`: `Identifier` (default: `null`)
- - `params`: `Array<LVal>` (required)
- - `body`: `BlockStatement` (required)
- - `generator`: `boolean` (default: `false`)
- - `async`: `boolean` (default: `false`)
- - `returnType`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`)
- - `typeParameters`: `TypeParameterDeclaration | TSTypeParameterDeclaration | Noop` (default: `null`)
-
----
-
-### functionTypeAnnotation
-```javascript
-t.functionTypeAnnotation(typeParameters, params, rest, returnType)
-```
-
-See also `t.isFunctionTypeAnnotation(node, opts)` and `t.assertFunctionTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`
-
- - `typeParameters` (required)
- - `params` (required)
- - `rest` (required)
- - `returnType` (required)
-
----
-
-### functionTypeParam
-```javascript
-t.functionTypeParam(name, typeAnnotation)
-```
-
-See also `t.isFunctionTypeParam(node, opts)` and `t.assertFunctionTypeParam(node, opts)`.
-
-Aliases: `Flow`
-
- - `name` (required)
- - `typeAnnotation` (required)
-
----
-
-### genericTypeAnnotation
-```javascript
-t.genericTypeAnnotation(id, typeParameters)
-```
-
-See also `t.isGenericTypeAnnotation(node, opts)` and `t.assertGenericTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`
-
- - `id` (required)
- - `typeParameters` (required)
-
----
-
-### identifier
-```javascript
-t.identifier(name)
-```
-
-See also `t.isIdentifier(node, opts)` and `t.assertIdentifier(node, opts)`.
-
-Aliases: `Expression`, `PatternLike`, `LVal`, `TSEntityName`
-
- - `name`: `string` (required)
- - `decorators`: `Array<Decorator>` (default: `null`)
- - `optional`: `boolean` (default: `null`)
- - `typeAnnotation`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`)
-
----
-
-### ifStatement
-```javascript
-t.ifStatement(test, consequent, alternate)
-```
-
-See also `t.isIfStatement(node, opts)` and `t.assertIfStatement(node, opts)`.
-
-Aliases: `Statement`, `Conditional`
-
- - `test`: `Expression` (required)
- - `consequent`: `Statement` (required)
- - `alternate`: `Statement` (default: `null`)
-
----
-
-### import
-```javascript
-t.import()
-```
-
-See also `t.isImport(node, opts)` and `t.assertImport(node, opts)`.
-
-Aliases: `Expression`
-
-
----
-
-### importDeclaration
-```javascript
-t.importDeclaration(specifiers, source)
-```
-
-See also `t.isImportDeclaration(node, opts)` and `t.assertImportDeclaration(node, opts)`.
-
-Aliases: `Statement`, `Declaration`, `ModuleDeclaration`
-
- - `specifiers`: `Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>` (required)
- - `source`: `StringLiteral` (required)
-
----
-
-### importDefaultSpecifier
-```javascript
-t.importDefaultSpecifier(local)
-```
-
-See also `t.isImportDefaultSpecifier(node, opts)` and `t.assertImportDefaultSpecifier(node, opts)`.
-
-Aliases: `ModuleSpecifier`
-
- - `local`: `Identifier` (required)
-
----
-
-### importNamespaceSpecifier
-```javascript
-t.importNamespaceSpecifier(local)
-```
-
-See also `t.isImportNamespaceSpecifier(node, opts)` and `t.assertImportNamespaceSpecifier(node, opts)`.
-
-Aliases: `ModuleSpecifier`
-
- - `local`: `Identifier` (required)
-
----
-
-### importSpecifier
-```javascript
-t.importSpecifier(local, imported)
-```
-
-See also `t.isImportSpecifier(node, opts)` and `t.assertImportSpecifier(node, opts)`.
-
-Aliases: `ModuleSpecifier`
-
- - `local`: `Identifier` (required)
- - `imported`: `Identifier` (required)
- - `importKind`: `null | 'type' | 'typeof'` (default: `null`)
-
----
-
-### inferredPredicate
-```javascript
-t.inferredPredicate()
-```
-
-See also `t.isInferredPredicate(node, opts)` and `t.assertInferredPredicate(node, opts)`.
-
-Aliases: `Flow`, `FlowPredicate`
-
-
----
-
-### interfaceDeclaration
-```javascript
-t.interfaceDeclaration(id, typeParameters, extends, body)
-```
-
-See also `t.isInterfaceDeclaration(node, opts)` and `t.assertInterfaceDeclaration(node, opts)`.
-
-Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
-
- - `id` (required)
- - `typeParameters` (required)
- - `extends` (required)
- - `body` (required)
-
----
-
-### interfaceExtends
-```javascript
-t.interfaceExtends(id, typeParameters)
-```
-
-See also `t.isInterfaceExtends(node, opts)` and `t.assertInterfaceExtends(node, opts)`.
-
-Aliases: `Flow`
-
- - `id` (required)
- - `typeParameters` (required)
-
----
-
-### intersectionTypeAnnotation
-```javascript
-t.intersectionTypeAnnotation(types)
-```
-
-See also `t.isIntersectionTypeAnnotation(node, opts)` and `t.assertIntersectionTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`
-
- - `types` (required)
-
----
-
-### jSXAttribute
-```javascript
-t.jSXAttribute(name, value)
-```
-
-See also `t.isJSXAttribute(node, opts)` and `t.assertJSXAttribute(node, opts)`.
-
-Aliases: `JSX`, `Immutable`
-
- - `name`: `JSXIdentifier | JSXNamespacedName` (required)
- - `value`: `JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer` (default: `null`)
-
----
-
-### jSXClosingElement
-```javascript
-t.jSXClosingElement(name)
-```
-
-See also `t.isJSXClosingElement(node, opts)` and `t.assertJSXClosingElement(node, opts)`.
-
-Aliases: `JSX`, `Immutable`
-
- - `name`: `JSXIdentifier | JSXMemberExpression` (required)
-
----
-
-### jSXClosingFragment
-```javascript
-t.jSXClosingFragment()
-```
-
-See also `t.isJSXClosingFragment(node, opts)` and `t.assertJSXClosingFragment(node, opts)`.
-
-Aliases: `JSX`, `Immutable`
-
-
----
-
-### jSXElement
-```javascript
-t.jSXElement(openingElement, closingElement, children, selfClosing)
-```
-
-See also `t.isJSXElement(node, opts)` and `t.assertJSXElement(node, opts)`.
-
-Aliases: `JSX`, `Immutable`, `Expression`
-
- - `openingElement`: `JSXOpeningElement` (required)
- - `closingElement`: `JSXClosingElement` (default: `null`)
- - `children`: `Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>` (required)
- - `selfClosing` (required)
-
----
-
-### jSXEmptyExpression
-```javascript
-t.jSXEmptyExpression()
-```
-
-See also `t.isJSXEmptyExpression(node, opts)` and `t.assertJSXEmptyExpression(node, opts)`.
-
-Aliases: `JSX`
-
-
----
-
-### jSXExpressionContainer
-```javascript
-t.jSXExpressionContainer(expression)
-```
-
-See also `t.isJSXExpressionContainer(node, opts)` and `t.assertJSXExpressionContainer(node, opts)`.
-
-Aliases: `JSX`, `Immutable`
-
- - `expression`: `Expression` (required)
-
----
-
-### jSXFragment
-```javascript
-t.jSXFragment(openingFragment, closingFragment, children)
-```
-
-See also `t.isJSXFragment(node, opts)` and `t.assertJSXFragment(node, opts)`.
-
-Aliases: `JSX`, `Immutable`, `Expression`
-
- - `openingFragment`: `JSXOpeningFragment` (required)
- - `closingFragment`: `JSXClosingFragment` (required)
- - `children`: `Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>` (required)
-
----
-
-### jSXIdentifier
-```javascript
-t.jSXIdentifier(name)
-```
-
-See also `t.isJSXIdentifier(node, opts)` and `t.assertJSXIdentifier(node, opts)`.
-
-Aliases: `JSX`
-
- - `name`: `string` (required)
-
----
-
-### jSXMemberExpression
-```javascript
-t.jSXMemberExpression(object, property)
-```
-
-See also `t.isJSXMemberExpression(node, opts)` and `t.assertJSXMemberExpression(node, opts)`.
-
-Aliases: `JSX`
-
- - `object`: `JSXMemberExpression | JSXIdentifier` (required)
- - `property`: `JSXIdentifier` (required)
-
----
-
-### jSXNamespacedName
-```javascript
-t.jSXNamespacedName(namespace, name)
-```
-
-See also `t.isJSXNamespacedName(node, opts)` and `t.assertJSXNamespacedName(node, opts)`.
-
-Aliases: `JSX`
-
- - `namespace`: `JSXIdentifier` (required)
- - `name`: `JSXIdentifier` (required)
-
----
-
-### jSXOpeningElement
-```javascript
-t.jSXOpeningElement(name, attributes, selfClosing)
-```
-
-See also `t.isJSXOpeningElement(node, opts)` and `t.assertJSXOpeningElement(node, opts)`.
-
-Aliases: `JSX`, `Immutable`
-
- - `name`: `JSXIdentifier | JSXMemberExpression` (required)
- - `attributes`: `Array<JSXAttribute | JSXSpreadAttribute>` (required)
- - `selfClosing`: `boolean` (default: `false`)
-
----
-
-### jSXOpeningFragment
-```javascript
-t.jSXOpeningFragment()
-```
-
-See also `t.isJSXOpeningFragment(node, opts)` and `t.assertJSXOpeningFragment(node, opts)`.
-
-Aliases: `JSX`, `Immutable`
-
-
----
-
-### jSXSpreadAttribute
-```javascript
-t.jSXSpreadAttribute(argument)
-```
-
-See also `t.isJSXSpreadAttribute(node, opts)` and `t.assertJSXSpreadAttribute(node, opts)`.
-
-Aliases: `JSX`
-
- - `argument`: `Expression` (required)
-
----
-
-### jSXSpreadChild
-```javascript
-t.jSXSpreadChild(expression)
-```
-
-See also `t.isJSXSpreadChild(node, opts)` and `t.assertJSXSpreadChild(node, opts)`.
-
-Aliases: `JSX`, `Immutable`
-
- - `expression`: `Expression` (required)
-
----
-
-### jSXText
-```javascript
-t.jSXText(value)
-```
-
-See also `t.isJSXText(node, opts)` and `t.assertJSXText(node, opts)`.
-
-Aliases: `JSX`, `Immutable`
-
- - `value`: `string` (required)
-
----
-
-### labeledStatement
-```javascript
-t.labeledStatement(label, body)
-```
-
-See also `t.isLabeledStatement(node, opts)` and `t.assertLabeledStatement(node, opts)`.
-
-Aliases: `Statement`
-
- - `label`: `Identifier` (required)
- - `body`: `Statement` (required)
-
----
-
-### logicalExpression
-```javascript
-t.logicalExpression(operator, left, right)
-```
-
-See also `t.isLogicalExpression(node, opts)` and `t.assertLogicalExpression(node, opts)`.
-
-Aliases: `Binary`, `Expression`
-
- - `operator`: `'||' | '&&' | '??'` (required)
- - `left`: `Expression` (required)
- - `right`: `Expression` (required)
-
----
-
-### memberExpression
-```javascript
-t.memberExpression(object, property, computed, optional)
-```
-
-See also `t.isMemberExpression(node, opts)` and `t.assertMemberExpression(node, opts)`.
-
-Aliases: `Expression`, `LVal`
-
- - `object`: `Expression` (required)
- - `property`: if computed then `Expression` else `Identifier` (required)
- - `computed`: `boolean` (default: `false`)
- - `optional`: `true | false` (default: `null`)
-
----
-
-### metaProperty
-```javascript
-t.metaProperty(meta, property)
-```
-
-See also `t.isMetaProperty(node, opts)` and `t.assertMetaProperty(node, opts)`.
-
-Aliases: `Expression`
-
- - `meta`: `Identifier` (required)
- - `property`: `Identifier` (required)
-
----
-
-### mixedTypeAnnotation
-```javascript
-t.mixedTypeAnnotation()
-```
-
-See also `t.isMixedTypeAnnotation(node, opts)` and `t.assertMixedTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`, `FlowBaseAnnotation`
-
-
----
-
-### newExpression
-```javascript
-t.newExpression(callee, arguments)
-```
-
-See also `t.isNewExpression(node, opts)` and `t.assertNewExpression(node, opts)`.
-
-Aliases: `Expression`
-
- - `callee`: `Expression` (required)
- - `arguments`: `Array<Expression | SpreadElement | JSXNamespacedName>` (required)
- - `optional`: `true | false` (default: `null`)
- - `typeParameters`: `TypeParameterInstantiation | TSTypeParameterInstantiation` (default: `null`)
-
----
-
-### noop
-```javascript
-t.noop()
-```
-
-See also `t.isNoop(node, opts)` and `t.assertNoop(node, opts)`.
-
-
----
-
-### nullLiteral
-```javascript
-t.nullLiteral()
-```
-
-See also `t.isNullLiteral(node, opts)` and `t.assertNullLiteral(node, opts)`.
-
-Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
-
-
----
-
-### nullLiteralTypeAnnotation
-```javascript
-t.nullLiteralTypeAnnotation()
-```
-
-See also `t.isNullLiteralTypeAnnotation(node, opts)` and `t.assertNullLiteralTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`, `FlowBaseAnnotation`
-
-
----
-
-### nullableTypeAnnotation
-```javascript
-t.nullableTypeAnnotation(typeAnnotation)
-```
-
-See also `t.isNullableTypeAnnotation(node, opts)` and `t.assertNullableTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`
-
- - `typeAnnotation` (required)
-
----
-
-### numberLiteralTypeAnnotation
-```javascript
-t.numberLiteralTypeAnnotation()
-```
-
-See also `t.isNumberLiteralTypeAnnotation(node, opts)` and `t.assertNumberLiteralTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`
-
-
----
-
-### numberTypeAnnotation
-```javascript
-t.numberTypeAnnotation()
-```
-
-See also `t.isNumberTypeAnnotation(node, opts)` and `t.assertNumberTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`, `FlowBaseAnnotation`
-
-
----
-
-### numericLiteral
-```javascript
-t.numericLiteral(value)
-```
-
-See also `t.isNumericLiteral(node, opts)` and `t.assertNumericLiteral(node, opts)`.
-
-Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
-
- - `value`: `number` (required)
-
----
-
-### objectExpression
-```javascript
-t.objectExpression(properties)
-```
-
-See also `t.isObjectExpression(node, opts)` and `t.assertObjectExpression(node, opts)`.
+or using yarn:
-Aliases: `Expression`
-
- - `properties`: `Array<ObjectMethod | ObjectProperty | SpreadElement>` (required)
-
----
-
-### objectMethod
-```javascript
-t.objectMethod(kind, key, params, body, computed)
-```
-
-See also `t.isObjectMethod(node, opts)` and `t.assertObjectMethod(node, opts)`.
-
-Aliases: `UserWhitespacable`, `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method`, `ObjectMember`
-
- - `kind`: `"method" | "get" | "set"` (default: `'method'`)
- - `key`: if computed then `Expression` else `Identifier | Literal` (required)
- - `params`: `Array<LVal>` (required)
- - `body`: `BlockStatement` (required)
- - `computed`: `boolean` (default: `false`)
- - `async`: `boolean` (default: `false`)
- - `decorators`: `Array<Decorator>` (default: `null`)
- - `generator`: `boolean` (default: `false`)
- - `returnType`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`)
- - `typeParameters`: `TypeParameterDeclaration | TSTypeParameterDeclaration | Noop` (default: `null`)
-
----
-
-### objectPattern
-```javascript
-t.objectPattern(properties)
-```
-
-See also `t.isObjectPattern(node, opts)` and `t.assertObjectPattern(node, opts)`.
-
-Aliases: `Pattern`, `PatternLike`, `LVal`
-
- - `properties`: `Array<RestElement | ObjectProperty>` (required)
- - `decorators`: `Array<Decorator>` (default: `null`)
- - `typeAnnotation`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`)
-
----
-
-### objectProperty
-```javascript
-t.objectProperty(key, value, computed, shorthand, decorators)
-```
-
-See also `t.isObjectProperty(node, opts)` and `t.assertObjectProperty(node, opts)`.
-
-Aliases: `UserWhitespacable`, `Property`, `ObjectMember`
-
- - `key`: if computed then `Expression` else `Identifier | Literal` (required)
- - `value`: `Expression | PatternLike` (required)
- - `computed`: `boolean` (default: `false`)
- - `shorthand`: `boolean` (default: `false`)
- - `decorators`: `Array<Decorator>` (default: `null`)
-
----
-
-### objectTypeAnnotation
-```javascript
-t.objectTypeAnnotation(properties, indexers, callProperties)
-```
-
-See also `t.isObjectTypeAnnotation(node, opts)` and `t.assertObjectTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`
-
- - `properties` (required)
- - `indexers` (required)
- - `callProperties` (required)
-
----
-
-### objectTypeCallProperty
-```javascript
-t.objectTypeCallProperty(value)
-```
-
-See also `t.isObjectTypeCallProperty(node, opts)` and `t.assertObjectTypeCallProperty(node, opts)`.
-
-Aliases: `Flow`, `UserWhitespacable`
-
- - `value` (required)
-
----
-
-### objectTypeIndexer
-```javascript
-t.objectTypeIndexer(id, key, value)
-```
-
-See also `t.isObjectTypeIndexer(node, opts)` and `t.assertObjectTypeIndexer(node, opts)`.
-
-Aliases: `Flow`, `UserWhitespacable`
-
- - `id` (required)
- - `key` (required)
- - `value` (required)
-
----
-
-### objectTypeProperty
-```javascript
-t.objectTypeProperty(key, value)
-```
-
-See also `t.isObjectTypeProperty(node, opts)` and `t.assertObjectTypeProperty(node, opts)`.
-
-Aliases: `Flow`, `UserWhitespacable`
-
- - `key` (required)
- - `value` (required)
-
----
-
-### objectTypeSpreadProperty
-```javascript
-t.objectTypeSpreadProperty(argument)
-```
-
-See also `t.isObjectTypeSpreadProperty(node, opts)` and `t.assertObjectTypeSpreadProperty(node, opts)`.
-
-Aliases: `Flow`, `UserWhitespacable`
-
- - `argument` (required)
-
----
-
-### opaqueType
-```javascript
-t.opaqueType(id, typeParameters, supertype, impltype)
-```
-
-See also `t.isOpaqueType(node, opts)` and `t.assertOpaqueType(node, opts)`.
-
-Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
-
- - `id` (required)
- - `typeParameters` (required)
- - `supertype` (required)
- - `impltype` (required)
-
----
-
-### parenthesizedExpression
-```javascript
-t.parenthesizedExpression(expression)
-```
-
-See also `t.isParenthesizedExpression(node, opts)` and `t.assertParenthesizedExpression(node, opts)`.
-
-Aliases: `Expression`, `ExpressionWrapper`
-
- - `expression`: `Expression` (required)
-
----
-
-### program
-```javascript
-t.program(body, directives, sourceType)
-```
-
-See also `t.isProgram(node, opts)` and `t.assertProgram(node, opts)`.
-
-Aliases: `Scopable`, `BlockParent`, `Block`
-
- - `body`: `Array<Statement>` (required)
- - `directives`: `Array<Directive>` (default: `[]`)
- - `sourceType`: `'script' | 'module'` (default: `'script'`)
- - `sourceFile`: `string` (default: `null`)
-
----
-
-### qualifiedTypeIdentifier
-```javascript
-t.qualifiedTypeIdentifier(id, qualification)
-```
-
-See also `t.isQualifiedTypeIdentifier(node, opts)` and `t.assertQualifiedTypeIdentifier(node, opts)`.
-
-Aliases: `Flow`
-
- - `id` (required)
- - `qualification` (required)
-
----
-
-### regExpLiteral
-```javascript
-t.regExpLiteral(pattern, flags)
-```
-
-See also `t.isRegExpLiteral(node, opts)` and `t.assertRegExpLiteral(node, opts)`.
-
-Aliases: `Expression`, `Literal`
-
- - `pattern`: `string` (required)
- - `flags`: `string` (default: `''`)
-
----
-
-### restElement
-```javascript
-t.restElement(argument)
-```
-
-See also `t.isRestElement(node, opts)` and `t.assertRestElement(node, opts)`.
-
-Aliases: `LVal`, `PatternLike`
-
- - `argument`: `LVal` (required)
- - `decorators`: `Array<Decorator>` (default: `null`)
- - `typeAnnotation`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`)
-
----
-
-### returnStatement
-```javascript
-t.returnStatement(argument)
-```
-
-See also `t.isReturnStatement(node, opts)` and `t.assertReturnStatement(node, opts)`.
-
-Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
-
- - `argument`: `Expression` (default: `null`)
-
----
-
-### sequenceExpression
-```javascript
-t.sequenceExpression(expressions)
-```
-
-See also `t.isSequenceExpression(node, opts)` and `t.assertSequenceExpression(node, opts)`.
-
-Aliases: `Expression`
-
- - `expressions`: `Array<Expression>` (required)
-
----
-
-### spreadElement
-```javascript
-t.spreadElement(argument)
-```
-
-See also `t.isSpreadElement(node, opts)` and `t.assertSpreadElement(node, opts)`.
-
-Aliases: `UnaryLike`
-
- - `argument`: `Expression` (required)
-
----
-
-### stringLiteral
-```javascript
-t.stringLiteral(value)
-```
-
-See also `t.isStringLiteral(node, opts)` and `t.assertStringLiteral(node, opts)`.
-
-Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
-
- - `value`: `string` (required)
-
----
-
-### stringLiteralTypeAnnotation
-```javascript
-t.stringLiteralTypeAnnotation()
-```
-
-See also `t.isStringLiteralTypeAnnotation(node, opts)` and `t.assertStringLiteralTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`
-
-
----
-
-### stringTypeAnnotation
-```javascript
-t.stringTypeAnnotation()
-```
-
-See also `t.isStringTypeAnnotation(node, opts)` and `t.assertStringTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`, `FlowBaseAnnotation`
-
-
----
-
-### super
-```javascript
-t.super()
-```
-
-See also `t.isSuper(node, opts)` and `t.assertSuper(node, opts)`.
-
-Aliases: `Expression`
-
-
----
-
-### switchCase
-```javascript
-t.switchCase(test, consequent)
-```
-
-See also `t.isSwitchCase(node, opts)` and `t.assertSwitchCase(node, opts)`.
-
- - `test`: `Expression` (default: `null`)
- - `consequent`: `Array<Statement>` (required)
-
----
-
-### switchStatement
-```javascript
-t.switchStatement(discriminant, cases)
-```
-
-See also `t.isSwitchStatement(node, opts)` and `t.assertSwitchStatement(node, opts)`.
-
-Aliases: `Statement`, `BlockParent`, `Scopable`
-
- - `discriminant`: `Expression` (required)
- - `cases`: `Array<SwitchCase>` (required)
-
----
-
-### tSAnyKeyword
-```javascript
-t.tSAnyKeyword()
-```
-
-See also `t.isTSAnyKeyword(node, opts)` and `t.assertTSAnyKeyword(node, opts)`.
-
-Aliases: `TSType`
-
-
----
-
-### tSArrayType
-```javascript
-t.tSArrayType(elementType)
-```
-
-See also `t.isTSArrayType(node, opts)` and `t.assertTSArrayType(node, opts)`.
-
-Aliases: `TSType`
-
- - `elementType`: `TSType` (required)
-
----
-
-### tSAsExpression
-```javascript
-t.tSAsExpression(expression, typeAnnotation)
-```
-
-See also `t.isTSAsExpression(node, opts)` and `t.assertTSAsExpression(node, opts)`.
-
-Aliases: `Expression`
-
- - `expression`: `Expression` (required)
- - `typeAnnotation`: `TSType` (required)
-
----
-
-### tSBooleanKeyword
-```javascript
-t.tSBooleanKeyword()
-```
-
-See also `t.isTSBooleanKeyword(node, opts)` and `t.assertTSBooleanKeyword(node, opts)`.
-
-Aliases: `TSType`
-
-
----
-
-### tSCallSignatureDeclaration
-```javascript
-t.tSCallSignatureDeclaration(typeParameters, parameters, typeAnnotation)
-```
-
-See also `t.isTSCallSignatureDeclaration(node, opts)` and `t.assertTSCallSignatureDeclaration(node, opts)`.
-
-Aliases: `TSTypeElement`
-
- - `typeParameters`: `TSTypeParameterDeclaration` (default: `null`)
- - `parameters`: `Array<Identifier | RestElement>` (default: `null`)
- - `typeAnnotation`: `TSTypeAnnotation` (default: `null`)
-
----
-
-### tSConstructSignatureDeclaration
-```javascript
-t.tSConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation)
-```
-
-See also `t.isTSConstructSignatureDeclaration(node, opts)` and `t.assertTSConstructSignatureDeclaration(node, opts)`.
-
-Aliases: `TSTypeElement`
-
- - `typeParameters`: `TSTypeParameterDeclaration` (default: `null`)
- - `parameters`: `Array<Identifier | RestElement>` (default: `null`)
- - `typeAnnotation`: `TSTypeAnnotation` (default: `null`)
-
----
-
-### tSConstructorType
-```javascript
-t.tSConstructorType(typeParameters, typeAnnotation)
-```
-
-See also `t.isTSConstructorType(node, opts)` and `t.assertTSConstructorType(node, opts)`.
-
-Aliases: `TSType`
-
- - `typeParameters`: `TSTypeParameterDeclaration` (default: `null`)
- - `typeAnnotation`: `TSTypeAnnotation` (default: `null`)
- - `parameters`: `Array<Identifier | RestElement>` (default: `null`)
-
----
-
-### tSDeclareFunction
-```javascript
-t.tSDeclareFunction(id, typeParameters, params, returnType)
-```
-
-See also `t.isTSDeclareFunction(node, opts)` and `t.assertTSDeclareFunction(node, opts)`.
-
-Aliases: `Statement`, `Declaration`
-
- - `id`: `Identifier` (default: `null`)
- - `typeParameters`: `TSTypeParameterDeclaration | Noop` (default: `null`)
- - `params`: `Array<LVal>` (required)
- - `returnType`: `TSTypeAnnotation | Noop` (default: `null`)
- - `async`: `boolean` (default: `false`)
- - `declare`: `boolean` (default: `null`)
- - `generator`: `boolean` (default: `false`)
-
----
-
-### tSDeclareMethod
-```javascript
-t.tSDeclareMethod(decorators, key, typeParameters, params, returnType)
-```
-
-See also `t.isTSDeclareMethod(node, opts)` and `t.assertTSDeclareMethod(node, opts)`.
-
- - `decorators`: `Array<Decorator>` (default: `null`)
- - `key` (required)
- - `typeParameters`: `TSTypeParameterDeclaration | Noop` (default: `null`)
- - `params`: `Array<LVal>` (required)
- - `returnType`: `TSTypeAnnotation | Noop` (default: `null`)
- - `abstract`: `boolean` (default: `null`)
- - `access`: `"public" | "private" | "protected"` (default: `null`)
- - `accessibility`: `"public" | "private" | "protected"` (default: `null`)
- - `async`: `boolean` (default: `false`)
- - `computed`: `boolean` (default: `false`)
- - `generator`: `boolean` (default: `false`)
- - `kind`: `"get" | "set" | "method" | "constructor"` (default: `'method'`)
- - `optional`: `boolean` (default: `null`)
- - `static`: `boolean` (default: `null`)
-
----
-
-### tSEnumDeclaration
-```javascript
-t.tSEnumDeclaration(id, members)
-```
-
-See also `t.isTSEnumDeclaration(node, opts)` and `t.assertTSEnumDeclaration(node, opts)`.
-
-Aliases: `Statement`, `Declaration`
-
- - `id`: `Identifier` (required)
- - `members`: `Array<TSEnumMember>` (required)
- - `const`: `boolean` (default: `null`)
- - `declare`: `boolean` (default: `null`)
- - `initializer`: `Expression` (default: `null`)
-
----
-
-### tSEnumMember
-```javascript
-t.tSEnumMember(id, initializer)
-```
-
-See also `t.isTSEnumMember(node, opts)` and `t.assertTSEnumMember(node, opts)`.
-
- - `id`: `Identifier | StringLiteral` (required)
- - `initializer`: `Expression` (default: `null`)
-
----
-
-### tSExportAssignment
-```javascript
-t.tSExportAssignment(expression)
-```
-
-See also `t.isTSExportAssignment(node, opts)` and `t.assertTSExportAssignment(node, opts)`.
-
-Aliases: `Statement`
-
- - `expression`: `Expression` (required)
-
----
-
-### tSExpressionWithTypeArguments
-```javascript
-t.tSExpressionWithTypeArguments(expression, typeParameters)
-```
-
-See also `t.isTSExpressionWithTypeArguments(node, opts)` and `t.assertTSExpressionWithTypeArguments(node, opts)`.
-
-Aliases: `TSType`
-
- - `expression`: `TSEntityName` (required)
- - `typeParameters`: `TSTypeParameterInstantiation` (default: `null`)
-
----
-
-### tSExternalModuleReference
-```javascript
-t.tSExternalModuleReference(expression)
-```
-
-See also `t.isTSExternalModuleReference(node, opts)` and `t.assertTSExternalModuleReference(node, opts)`.
-
- - `expression`: `StringLiteral` (required)
-
----
-
-### tSFunctionType
-```javascript
-t.tSFunctionType(typeParameters, typeAnnotation)
-```
-
-See also `t.isTSFunctionType(node, opts)` and `t.assertTSFunctionType(node, opts)`.
-
-Aliases: `TSType`
-
- - `typeParameters`: `TSTypeParameterDeclaration` (default: `null`)
- - `typeAnnotation`: `TSTypeAnnotation` (default: `null`)
- - `parameters`: `Array<Identifier | RestElement>` (default: `null`)
-
----
-
-### tSImportEqualsDeclaration
-```javascript
-t.tSImportEqualsDeclaration(id, moduleReference)
-```
-
-See also `t.isTSImportEqualsDeclaration(node, opts)` and `t.assertTSImportEqualsDeclaration(node, opts)`.
-
-Aliases: `Statement`
-
- - `id`: `Identifier` (required)
- - `moduleReference`: `TSEntityName | TSExternalModuleReference` (required)
- - `isExport`: `boolean` (default: `null`)
-
----
-
-### tSIndexSignature
-```javascript
-t.tSIndexSignature(parameters, typeAnnotation)
-```
-
-See also `t.isTSIndexSignature(node, opts)` and `t.assertTSIndexSignature(node, opts)`.
-
-Aliases: `TSTypeElement`
-
- - `parameters`: `Array<Identifier>` (required)
- - `typeAnnotation`: `TSTypeAnnotation` (default: `null`)
- - `readonly`: `boolean` (default: `null`)
-
----
-
-### tSIndexedAccessType
-```javascript
-t.tSIndexedAccessType(objectType, indexType)
-```
-
-See also `t.isTSIndexedAccessType(node, opts)` and `t.assertTSIndexedAccessType(node, opts)`.
-
-Aliases: `TSType`
-
- - `objectType`: `TSType` (required)
- - `indexType`: `TSType` (required)
-
----
-
-### tSInterfaceBody
-```javascript
-t.tSInterfaceBody(body)
-```
-
-See also `t.isTSInterfaceBody(node, opts)` and `t.assertTSInterfaceBody(node, opts)`.
-
- - `body`: `Array<TSTypeElement>` (required)
-
----
-
-### tSInterfaceDeclaration
-```javascript
-t.tSInterfaceDeclaration(id, typeParameters, extends, body)
-```
-
-See also `t.isTSInterfaceDeclaration(node, opts)` and `t.assertTSInterfaceDeclaration(node, opts)`.
-
-Aliases: `Statement`, `Declaration`
-
- - `id`: `Identifier` (required)
- - `typeParameters`: `TSTypeParameterDeclaration` (default: `null`)
- - `extends`: `Array<TSExpressionWithTypeArguments>` (default: `null`)
- - `body`: `TSInterfaceBody` (required)
- - `declare`: `boolean` (default: `null`)
-
----
-
-### tSIntersectionType
-```javascript
-t.tSIntersectionType(types)
-```
-
-See also `t.isTSIntersectionType(node, opts)` and `t.assertTSIntersectionType(node, opts)`.
-
-Aliases: `TSType`
-
- - `types`: `Array<TSType>` (required)
-
----
-
-### tSLiteralType
-```javascript
-t.tSLiteralType(literal)
-```
-
-See also `t.isTSLiteralType(node, opts)` and `t.assertTSLiteralType(node, opts)`.
-
-Aliases: `TSType`
-
- - `literal`: `NumericLiteral | StringLiteral | BooleanLiteral` (required)
-
----
-
-### tSMappedType
-```javascript
-t.tSMappedType(typeParameter, typeAnnotation)
-```
-
-See also `t.isTSMappedType(node, opts)` and `t.assertTSMappedType(node, opts)`.
-
-Aliases: `TSType`
-
- - `typeParameter`: `TSTypeParameter` (required)
- - `typeAnnotation`: `TSType` (default: `null`)
- - `optional`: `boolean` (default: `null`)
- - `readonly`: `boolean` (default: `null`)
-
----
-
-### tSMethodSignature
-```javascript
-t.tSMethodSignature(key, typeParameters, parameters, typeAnnotation)
-```
-
-See also `t.isTSMethodSignature(node, opts)` and `t.assertTSMethodSignature(node, opts)`.
-
-Aliases: `TSTypeElement`
-
- - `key`: `Expression` (required)
- - `typeParameters`: `TSTypeParameterDeclaration` (default: `null`)
- - `parameters`: `Array<Identifier | RestElement>` (default: `null`)
- - `typeAnnotation`: `TSTypeAnnotation` (default: `null`)
- - `computed`: `boolean` (default: `null`)
- - `optional`: `boolean` (default: `null`)
-
----
-
-### tSModuleBlock
-```javascript
-t.tSModuleBlock(body)
-```
-
-See also `t.isTSModuleBlock(node, opts)` and `t.assertTSModuleBlock(node, opts)`.
-
- - `body`: `Array<Statement>` (required)
-
----
-
-### tSModuleDeclaration
-```javascript
-t.tSModuleDeclaration(id, body)
-```
-
-See also `t.isTSModuleDeclaration(node, opts)` and `t.assertTSModuleDeclaration(node, opts)`.
-
-Aliases: `Statement`, `Declaration`
-
- - `id`: `Identifier | StringLiteral` (required)
- - `body`: `TSModuleBlock | TSModuleDeclaration` (required)
- - `declare`: `boolean` (default: `null`)
- - `global`: `boolean` (default: `null`)
-
----
-
-### tSNamespaceExportDeclaration
-```javascript
-t.tSNamespaceExportDeclaration(id)
-```
-
-See also `t.isTSNamespaceExportDeclaration(node, opts)` and `t.assertTSNamespaceExportDeclaration(node, opts)`.
-
-Aliases: `Statement`
-
- - `id`: `Identifier` (required)
-
----
-
-### tSNeverKeyword
-```javascript
-t.tSNeverKeyword()
-```
-
-See also `t.isTSNeverKeyword(node, opts)` and `t.assertTSNeverKeyword(node, opts)`.
-
-Aliases: `TSType`
-
-
----
-
-### tSNonNullExpression
-```javascript
-t.tSNonNullExpression(expression)
-```
-
-See also `t.isTSNonNullExpression(node, opts)` and `t.assertTSNonNullExpression(node, opts)`.
-
-Aliases: `Expression`
-
- - `expression`: `Expression` (required)
-
----
-
-### tSNullKeyword
-```javascript
-t.tSNullKeyword()
-```
-
-See also `t.isTSNullKeyword(node, opts)` and `t.assertTSNullKeyword(node, opts)`.
-
-Aliases: `TSType`
-
-
----
-
-### tSNumberKeyword
-```javascript
-t.tSNumberKeyword()
-```
-
-See also `t.isTSNumberKeyword(node, opts)` and `t.assertTSNumberKeyword(node, opts)`.
-
-Aliases: `TSType`
-
-
----
-
-### tSObjectKeyword
-```javascript
-t.tSObjectKeyword()
-```
-
-See also `t.isTSObjectKeyword(node, opts)` and `t.assertTSObjectKeyword(node, opts)`.
-
-Aliases: `TSType`
-
-
----
-
-### tSParameterProperty
-```javascript
-t.tSParameterProperty(parameter)
-```
-
-See also `t.isTSParameterProperty(node, opts)` and `t.assertTSParameterProperty(node, opts)`.
-
-Aliases: `LVal`
-
- - `parameter`: `Identifier | AssignmentPattern` (required)
- - `accessibility`: `'public' | 'private' | 'protected'` (default: `null`)
- - `readonly`: `boolean` (default: `null`)
-
----
-
-### tSParenthesizedType
-```javascript
-t.tSParenthesizedType(typeAnnotation)
-```
-
-See also `t.isTSParenthesizedType(node, opts)` and `t.assertTSParenthesizedType(node, opts)`.
-
-Aliases: `TSType`
-
- - `typeAnnotation`: `TSType` (required)
-
----
-
-### tSPropertySignature
-```javascript
-t.tSPropertySignature(key, typeAnnotation, initializer)
-```
-
-See also `t.isTSPropertySignature(node, opts)` and `t.assertTSPropertySignature(node, opts)`.
-
-Aliases: `TSTypeElement`
-
- - `key`: `Expression` (required)
- - `typeAnnotation`: `TSTypeAnnotation` (default: `null`)
- - `initializer`: `Expression` (default: `null`)
- - `computed`: `boolean` (default: `null`)
- - `optional`: `boolean` (default: `null`)
- - `readonly`: `boolean` (default: `null`)
-
----
-
-### tSQualifiedName
-```javascript
-t.tSQualifiedName(left, right)
-```
-
-See also `t.isTSQualifiedName(node, opts)` and `t.assertTSQualifiedName(node, opts)`.
-
-Aliases: `TSEntityName`
-
- - `left`: `TSEntityName` (required)
- - `right`: `Identifier` (required)
-
----
-
-### tSStringKeyword
-```javascript
-t.tSStringKeyword()
-```
-
-See also `t.isTSStringKeyword(node, opts)` and `t.assertTSStringKeyword(node, opts)`.
-
-Aliases: `TSType`
-
-
----
-
-### tSSymbolKeyword
-```javascript
-t.tSSymbolKeyword()
-```
-
-See also `t.isTSSymbolKeyword(node, opts)` and `t.assertTSSymbolKeyword(node, opts)`.
-
-Aliases: `TSType`
-
-
----
-
-### tSThisType
-```javascript
-t.tSThisType()
-```
-
-See also `t.isTSThisType(node, opts)` and `t.assertTSThisType(node, opts)`.
-
-Aliases: `TSType`
-
-
----
-
-### tSTupleType
-```javascript
-t.tSTupleType(elementTypes)
-```
-
-See also `t.isTSTupleType(node, opts)` and `t.assertTSTupleType(node, opts)`.
-
-Aliases: `TSType`
-
- - `elementTypes`: `Array<TSType>` (required)
-
----
-
-### tSTypeAliasDeclaration
-```javascript
-t.tSTypeAliasDeclaration(id, typeParameters, typeAnnotation)
-```
-
-See also `t.isTSTypeAliasDeclaration(node, opts)` and `t.assertTSTypeAliasDeclaration(node, opts)`.
-
-Aliases: `Statement`, `Declaration`
-
- - `id`: `Identifier` (required)
- - `typeParameters`: `TSTypeParameterDeclaration` (default: `null`)
- - `typeAnnotation`: `TSType` (required)
- - `declare`: `boolean` (default: `null`)
-
----
-
-### tSTypeAnnotation
-```javascript
-t.tSTypeAnnotation(typeAnnotation)
-```
-
-See also `t.isTSTypeAnnotation(node, opts)` and `t.assertTSTypeAnnotation(node, opts)`.
-
- - `typeAnnotation`: `TSType` (required)
-
----
-
-### tSTypeAssertion
-```javascript
-t.tSTypeAssertion(typeAnnotation, expression)
-```
-
-See also `t.isTSTypeAssertion(node, opts)` and `t.assertTSTypeAssertion(node, opts)`.
-
-Aliases: `Expression`
-
- - `typeAnnotation`: `TSType` (required)
- - `expression`: `Expression` (required)
-
----
-
-### tSTypeLiteral
-```javascript
-t.tSTypeLiteral(members)
-```
-
-See also `t.isTSTypeLiteral(node, opts)` and `t.assertTSTypeLiteral(node, opts)`.
-
-Aliases: `TSType`
-
- - `members`: `Array<TSTypeElement>` (required)
-
----
-
-### tSTypeOperator
-```javascript
-t.tSTypeOperator(typeAnnotation)
-```
-
-See also `t.isTSTypeOperator(node, opts)` and `t.assertTSTypeOperator(node, opts)`.
-
-Aliases: `TSType`
-
- - `typeAnnotation`: `TSType` (required)
- - `operator`: `string` (default: `null`)
-
----
-
-### tSTypeParameter
-```javascript
-t.tSTypeParameter(constraint, default)
-```
-
-See also `t.isTSTypeParameter(node, opts)` and `t.assertTSTypeParameter(node, opts)`.
-
- - `constraint`: `TSType` (default: `null`)
- - `default`: `TSType` (default: `null`)
- - `name`: `string` (default: `null`)
-
----
-
-### tSTypeParameterDeclaration
-```javascript
-t.tSTypeParameterDeclaration(params)
-```
-
-See also `t.isTSTypeParameterDeclaration(node, opts)` and `t.assertTSTypeParameterDeclaration(node, opts)`.
-
- - `params`: `Array<TSTypeParameter>` (required)
-
----
-
-### tSTypeParameterInstantiation
-```javascript
-t.tSTypeParameterInstantiation(params)
-```
-
-See also `t.isTSTypeParameterInstantiation(node, opts)` and `t.assertTSTypeParameterInstantiation(node, opts)`.
-
- - `params`: `Array<TSType>` (required)
-
----
-
-### tSTypePredicate
-```javascript
-t.tSTypePredicate(parameterName, typeAnnotation)
-```
-
-See also `t.isTSTypePredicate(node, opts)` and `t.assertTSTypePredicate(node, opts)`.
-
-Aliases: `TSType`
-
- - `parameterName`: `Identifier | TSThisType` (required)
- - `typeAnnotation`: `TSTypeAnnotation` (required)
-
----
-
-### tSTypeQuery
-```javascript
-t.tSTypeQuery(exprName)
-```
-
-See also `t.isTSTypeQuery(node, opts)` and `t.assertTSTypeQuery(node, opts)`.
-
-Aliases: `TSType`
-
- - `exprName`: `TSEntityName` (required)
-
----
-
-### tSTypeReference
-```javascript
-t.tSTypeReference(typeName, typeParameters)
-```
-
-See also `t.isTSTypeReference(node, opts)` and `t.assertTSTypeReference(node, opts)`.
-
-Aliases: `TSType`
-
- - `typeName`: `TSEntityName` (required)
- - `typeParameters`: `TSTypeParameterInstantiation` (default: `null`)
-
----
-
-### tSUndefinedKeyword
-```javascript
-t.tSUndefinedKeyword()
-```
-
-See also `t.isTSUndefinedKeyword(node, opts)` and `t.assertTSUndefinedKeyword(node, opts)`.
-
-Aliases: `TSType`
-
-
----
-
-### tSUnionType
-```javascript
-t.tSUnionType(types)
-```
-
-See also `t.isTSUnionType(node, opts)` and `t.assertTSUnionType(node, opts)`.
-
-Aliases: `TSType`
-
- - `types`: `Array<TSType>` (required)
-
----
-
-### tSVoidKeyword
-```javascript
-t.tSVoidKeyword()
-```
-
-See also `t.isTSVoidKeyword(node, opts)` and `t.assertTSVoidKeyword(node, opts)`.
-
-Aliases: `TSType`
-
-
----
-
-### taggedTemplateExpression
-```javascript
-t.taggedTemplateExpression(tag, quasi)
-```
-
-See also `t.isTaggedTemplateExpression(node, opts)` and `t.assertTaggedTemplateExpression(node, opts)`.
-
-Aliases: `Expression`
-
- - `tag`: `Expression` (required)
- - `quasi`: `TemplateLiteral` (required)
-
----
-
-### templateElement
-```javascript
-t.templateElement(value, tail)
-```
-
-See also `t.isTemplateElement(node, opts)` and `t.assertTemplateElement(node, opts)`.
-
- - `value` (required)
- - `tail`: `boolean` (default: `false`)
-
----
-
-### templateLiteral
-```javascript
-t.templateLiteral(quasis, expressions)
-```
-
-See also `t.isTemplateLiteral(node, opts)` and `t.assertTemplateLiteral(node, opts)`.
-
-Aliases: `Expression`, `Literal`
-
- - `quasis`: `Array<TemplateElement>` (required)
- - `expressions`: `Array<Expression>` (required)
-
----
-
-### thisExpression
-```javascript
-t.thisExpression()
-```
-
-See also `t.isThisExpression(node, opts)` and `t.assertThisExpression(node, opts)`.
-
-Aliases: `Expression`
-
-
----
-
-### thisTypeAnnotation
-```javascript
-t.thisTypeAnnotation()
-```
-
-See also `t.isThisTypeAnnotation(node, opts)` and `t.assertThisTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`, `FlowBaseAnnotation`
-
-
----
-
-### throwStatement
-```javascript
-t.throwStatement(argument)
-```
-
-See also `t.isThrowStatement(node, opts)` and `t.assertThrowStatement(node, opts)`.
-
-Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
-
- - `argument`: `Expression` (required)
-
----
-
-### tryStatement
-```javascript
-t.tryStatement(block, handler, finalizer)
-```
-
-See also `t.isTryStatement(node, opts)` and `t.assertTryStatement(node, opts)`.
-
-Aliases: `Statement`
-
- - `block`: `BlockStatement` (required)
- - `handler`: `CatchClause` (default: `null`)
- - `finalizer`: `BlockStatement` (default: `null`)
-
----
-
-### tupleTypeAnnotation
-```javascript
-t.tupleTypeAnnotation(types)
-```
-
-See also `t.isTupleTypeAnnotation(node, opts)` and `t.assertTupleTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`
-
- - `types` (required)
-
----
-
-### typeAlias
-```javascript
-t.typeAlias(id, typeParameters, right)
-```
-
-See also `t.isTypeAlias(node, opts)` and `t.assertTypeAlias(node, opts)`.
-
-Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
-
- - `id` (required)
- - `typeParameters` (required)
- - `right` (required)
-
----
-
-### typeAnnotation
-```javascript
-t.typeAnnotation(typeAnnotation)
-```
-
-See also `t.isTypeAnnotation(node, opts)` and `t.assertTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`
-
- - `typeAnnotation`: `Flow` (required)
-
----
-
-### typeCastExpression
-```javascript
-t.typeCastExpression(expression, typeAnnotation)
-```
-
-See also `t.isTypeCastExpression(node, opts)` and `t.assertTypeCastExpression(node, opts)`.
-
-Aliases: `Flow`, `ExpressionWrapper`, `Expression`
-
- - `expression` (required)
- - `typeAnnotation` (required)
-
----
-
-### typeParameter
-```javascript
-t.typeParameter(bound, default)
-```
-
-See also `t.isTypeParameter(node, opts)` and `t.assertTypeParameter(node, opts)`.
-
-Aliases: `Flow`
-
- - `bound`: `TypeAnnotation` (default: `null`)
- - `default`: `Flow` (default: `null`)
- - `name`: `string` (default: `null`)
-
----
-
-### typeParameterDeclaration
-```javascript
-t.typeParameterDeclaration(params)
-```
-
-See also `t.isTypeParameterDeclaration(node, opts)` and `t.assertTypeParameterDeclaration(node, opts)`.
-
-Aliases: `Flow`
-
- - `params`: `Array<TypeParameter>` (required)
-
----
-
-### typeParameterInstantiation
-```javascript
-t.typeParameterInstantiation(params)
-```
-
-See also `t.isTypeParameterInstantiation(node, opts)` and `t.assertTypeParameterInstantiation(node, opts)`.
-
-Aliases: `Flow`
-
- - `params`: `Array<Flow>` (required)
-
----
-
-### typeofTypeAnnotation
-```javascript
-t.typeofTypeAnnotation(argument)
-```
-
-See also `t.isTypeofTypeAnnotation(node, opts)` and `t.assertTypeofTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`
-
- - `argument` (required)
-
----
-
-### unaryExpression
-```javascript
-t.unaryExpression(operator, argument, prefix)
-```
-
-See also `t.isUnaryExpression(node, opts)` and `t.assertUnaryExpression(node, opts)`.
-
-Aliases: `UnaryLike`, `Expression`
-
- - `operator`: `'void' | 'throw' | 'delete' | '!' | '+' | '-' | '~' | 'typeof'` (required)
- - `argument`: `Expression` (required)
- - `prefix`: `boolean` (default: `true`)
-
----
-
-### unionTypeAnnotation
-```javascript
-t.unionTypeAnnotation(types)
-```
-
-See also `t.isUnionTypeAnnotation(node, opts)` and `t.assertUnionTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`
-
- - `types` (required)
-
----
-
-### updateExpression
-```javascript
-t.updateExpression(operator, argument, prefix)
-```
-
-See also `t.isUpdateExpression(node, opts)` and `t.assertUpdateExpression(node, opts)`.
-
-Aliases: `Expression`
-
- - `operator`: `'++' | '--'` (required)
- - `argument`: `Expression` (required)
- - `prefix`: `boolean` (default: `false`)
-
----
-
-### variableDeclaration
-```javascript
-t.variableDeclaration(kind, declarations)
-```
-
-See also `t.isVariableDeclaration(node, opts)` and `t.assertVariableDeclaration(node, opts)`.
-
-Aliases: `Statement`, `Declaration`
-
- - `kind`: `"var" | "let" | "const"` (required)
- - `declarations`: `Array<VariableDeclarator>` (required)
- - `declare`: `boolean` (default: `null`)
-
----
-
-### variableDeclarator
-```javascript
-t.variableDeclarator(id, init)
-```
-
-See also `t.isVariableDeclarator(node, opts)` and `t.assertVariableDeclarator(node, opts)`.
-
- - `id`: `LVal` (required)
- - `init`: `Expression` (default: `null`)
-
----
-
-### voidTypeAnnotation
-```javascript
-t.voidTypeAnnotation()
-```
-
-See also `t.isVoidTypeAnnotation(node, opts)` and `t.assertVoidTypeAnnotation(node, opts)`.
-
-Aliases: `Flow`, `FlowBaseAnnotation`
-
-
----
-
-### whileStatement
-```javascript
-t.whileStatement(test, body)
-```
-
-See also `t.isWhileStatement(node, opts)` and `t.assertWhileStatement(node, opts)`.
-
-Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable`
-
- - `test`: `Expression` (required)
- - `body`: `BlockStatement | Statement` (required)
-
----
-
-### withStatement
-```javascript
-t.withStatement(object, body)
-```
-
-See also `t.isWithStatement(node, opts)` and `t.assertWithStatement(node, opts)`.
-
-Aliases: `Statement`
-
- - `object`: `Expression` (required)
- - `body`: `BlockStatement | Statement` (required)
-
----
-
-### yieldExpression
-```javascript
-t.yieldExpression(argument, delegate)
+```sh
+yarn add @babel/types --dev
```
-
-See also `t.isYieldExpression(node, opts)` and `t.assertYieldExpression(node, opts)`.
-
-Aliases: `Expression`, `Terminatorless`
-
- - `argument`: `Expression` (default: `null`)
- - `delegate`: `boolean` (default: `false`)
-
----
-
-
-<!-- end generated section -->
-
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
index 783ee0dbcc..194ec71681 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = assertNode;
var _isNode = _interopRequireDefault(require("../validators/isNode"));
@@ -9,7 +11,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
function assertNode(node) {
if (!(0, _isNode.default)(node)) {
- var type = node && node.type || JSON.stringify(node);
- throw new TypeError("Not a valid node of type \"" + type + "\"");
+ 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
index 8c2b91eed3..5b5659a155 100644
--- 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
@@ -1,9 +1,12 @@
"use strict";
-exports.__esModule = true;
+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;
@@ -98,6 +101,7 @@ exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
exports.assertInferredPredicate = assertInferredPredicate;
exports.assertInterfaceExtends = assertInterfaceExtends;
exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
+exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
@@ -105,6 +109,7 @@ exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
+exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
exports.assertObjectTypeProperty = assertObjectTypeProperty;
@@ -123,6 +128,7 @@ exports.assertTypeParameter = assertTypeParameter;
exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
+exports.assertVariance = assertVariance;
exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
exports.assertJSXAttribute = assertJSXAttribute;
exports.assertJSXClosingElement = assertJSXClosingElement;
@@ -144,11 +150,20 @@ exports.assertParenthesizedExpression = assertParenthesizedExpression;
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;
@@ -159,6 +174,7 @@ exports.assertTSPropertySignature = assertTSPropertySignature;
exports.assertTSMethodSignature = assertTSMethodSignature;
exports.assertTSIndexSignature = assertTSIndexSignature;
exports.assertTSAnyKeyword = assertTSAnyKeyword;
+exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
exports.assertTSNumberKeyword = assertTSNumberKeyword;
exports.assertTSObjectKeyword = assertTSObjectKeyword;
exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
@@ -177,8 +193,12 @@ 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;
@@ -194,6 +214,7 @@ exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
exports.assertTSEnumMember = assertTSEnumMember;
exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
exports.assertTSModuleBlock = assertTSModuleBlock;
+exports.assertTSImportType = assertTSImportType;
exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
exports.assertTSNonNullExpression = assertTSNonNullExpression;
@@ -237,10 +258,12 @@ 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;
@@ -254,1943 +277,1059 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
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 + "\".");
+ throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
}
}
-function assertArrayExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertArrayExpression(node, opts = {}) {
assert("ArrayExpression", node, opts);
}
-function assertAssignmentExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertAssignmentExpression(node, opts = {}) {
assert("AssignmentExpression", node, opts);
}
-function assertBinaryExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertBinaryExpression(node, opts = {}) {
assert("BinaryExpression", node, opts);
}
-function assertDirective(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertInterpreterDirective(node, opts = {}) {
+ assert("InterpreterDirective", node, opts);
+}
+function assertDirective(node, opts = {}) {
assert("Directive", node, opts);
}
-function assertDirectiveLiteral(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDirectiveLiteral(node, opts = {}) {
assert("DirectiveLiteral", node, opts);
}
-function assertBlockStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertBlockStatement(node, opts = {}) {
assert("BlockStatement", node, opts);
}
-function assertBreakStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertBreakStatement(node, opts = {}) {
assert("BreakStatement", node, opts);
}
-function assertCallExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertCallExpression(node, opts = {}) {
assert("CallExpression", node, opts);
}
-function assertCatchClause(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertCatchClause(node, opts = {}) {
assert("CatchClause", node, opts);
}
-function assertConditionalExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertConditionalExpression(node, opts = {}) {
assert("ConditionalExpression", node, opts);
}
-function assertContinueStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertContinueStatement(node, opts = {}) {
assert("ContinueStatement", node, opts);
}
-function assertDebuggerStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDebuggerStatement(node, opts = {}) {
assert("DebuggerStatement", node, opts);
}
-function assertDoWhileStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDoWhileStatement(node, opts = {}) {
assert("DoWhileStatement", node, opts);
}
-function assertEmptyStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertEmptyStatement(node, opts = {}) {
assert("EmptyStatement", node, opts);
}
-function assertExpressionStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertExpressionStatement(node, opts = {}) {
assert("ExpressionStatement", node, opts);
}
-function assertFile(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertFile(node, opts = {}) {
assert("File", node, opts);
}
-function assertForInStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertForInStatement(node, opts = {}) {
assert("ForInStatement", node, opts);
}
-function assertForStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertForStatement(node, opts = {}) {
assert("ForStatement", node, opts);
}
-function assertFunctionDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertFunctionDeclaration(node, opts = {}) {
assert("FunctionDeclaration", node, opts);
}
-function assertFunctionExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertFunctionExpression(node, opts = {}) {
assert("FunctionExpression", node, opts);
}
-function assertIdentifier(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertIdentifier(node, opts = {}) {
assert("Identifier", node, opts);
}
-function assertIfStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertIfStatement(node, opts = {}) {
assert("IfStatement", node, opts);
}
-function assertLabeledStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertLabeledStatement(node, opts = {}) {
assert("LabeledStatement", node, opts);
}
-function assertStringLiteral(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertStringLiteral(node, opts = {}) {
assert("StringLiteral", node, opts);
}
-function assertNumericLiteral(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertNumericLiteral(node, opts = {}) {
assert("NumericLiteral", node, opts);
}
-function assertNullLiteral(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertNullLiteral(node, opts = {}) {
assert("NullLiteral", node, opts);
}
-function assertBooleanLiteral(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertBooleanLiteral(node, opts = {}) {
assert("BooleanLiteral", node, opts);
}
-function assertRegExpLiteral(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertRegExpLiteral(node, opts = {}) {
assert("RegExpLiteral", node, opts);
}
-function assertLogicalExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertLogicalExpression(node, opts = {}) {
assert("LogicalExpression", node, opts);
}
-function assertMemberExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertMemberExpression(node, opts = {}) {
assert("MemberExpression", node, opts);
}
-function assertNewExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertNewExpression(node, opts = {}) {
assert("NewExpression", node, opts);
}
-function assertProgram(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertProgram(node, opts = {}) {
assert("Program", node, opts);
}
-function assertObjectExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertObjectExpression(node, opts = {}) {
assert("ObjectExpression", node, opts);
}
-function assertObjectMethod(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertObjectMethod(node, opts = {}) {
assert("ObjectMethod", node, opts);
}
-function assertObjectProperty(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertObjectProperty(node, opts = {}) {
assert("ObjectProperty", node, opts);
}
-function assertRestElement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertRestElement(node, opts = {}) {
assert("RestElement", node, opts);
}
-function assertReturnStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertReturnStatement(node, opts = {}) {
assert("ReturnStatement", node, opts);
}
-function assertSequenceExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertSequenceExpression(node, opts = {}) {
assert("SequenceExpression", node, opts);
}
-function assertSwitchCase(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertSwitchCase(node, opts = {}) {
assert("SwitchCase", node, opts);
}
-function assertSwitchStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertSwitchStatement(node, opts = {}) {
assert("SwitchStatement", node, opts);
}
-function assertThisExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertThisExpression(node, opts = {}) {
assert("ThisExpression", node, opts);
}
-function assertThrowStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertThrowStatement(node, opts = {}) {
assert("ThrowStatement", node, opts);
}
-function assertTryStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTryStatement(node, opts = {}) {
assert("TryStatement", node, opts);
}
-function assertUnaryExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertUnaryExpression(node, opts = {}) {
assert("UnaryExpression", node, opts);
}
-function assertUpdateExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertUpdateExpression(node, opts = {}) {
assert("UpdateExpression", node, opts);
}
-function assertVariableDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertVariableDeclaration(node, opts = {}) {
assert("VariableDeclaration", node, opts);
}
-function assertVariableDeclarator(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertVariableDeclarator(node, opts = {}) {
assert("VariableDeclarator", node, opts);
}
-function assertWhileStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertWhileStatement(node, opts = {}) {
assert("WhileStatement", node, opts);
}
-function assertWithStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertWithStatement(node, opts = {}) {
assert("WithStatement", node, opts);
}
-function assertAssignmentPattern(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertAssignmentPattern(node, opts = {}) {
assert("AssignmentPattern", node, opts);
}
-function assertArrayPattern(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertArrayPattern(node, opts = {}) {
assert("ArrayPattern", node, opts);
}
-function assertArrowFunctionExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertArrowFunctionExpression(node, opts = {}) {
assert("ArrowFunctionExpression", node, opts);
}
-function assertClassBody(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertClassBody(node, opts = {}) {
assert("ClassBody", node, opts);
}
-function assertClassDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertClassDeclaration(node, opts = {}) {
assert("ClassDeclaration", node, opts);
}
-function assertClassExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertClassExpression(node, opts = {}) {
assert("ClassExpression", node, opts);
}
-function assertExportAllDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertExportAllDeclaration(node, opts = {}) {
assert("ExportAllDeclaration", node, opts);
}
-function assertExportDefaultDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertExportDefaultDeclaration(node, opts = {}) {
assert("ExportDefaultDeclaration", node, opts);
}
-function assertExportNamedDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertExportNamedDeclaration(node, opts = {}) {
assert("ExportNamedDeclaration", node, opts);
}
-function assertExportSpecifier(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertExportSpecifier(node, opts = {}) {
assert("ExportSpecifier", node, opts);
}
-function assertForOfStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertForOfStatement(node, opts = {}) {
assert("ForOfStatement", node, opts);
}
-function assertImportDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertImportDeclaration(node, opts = {}) {
assert("ImportDeclaration", node, opts);
}
-function assertImportDefaultSpecifier(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertImportDefaultSpecifier(node, opts = {}) {
assert("ImportDefaultSpecifier", node, opts);
}
-function assertImportNamespaceSpecifier(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertImportNamespaceSpecifier(node, opts = {}) {
assert("ImportNamespaceSpecifier", node, opts);
}
-function assertImportSpecifier(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertImportSpecifier(node, opts = {}) {
assert("ImportSpecifier", node, opts);
}
-function assertMetaProperty(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertMetaProperty(node, opts = {}) {
assert("MetaProperty", node, opts);
}
-function assertClassMethod(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertClassMethod(node, opts = {}) {
assert("ClassMethod", node, opts);
}
-function assertObjectPattern(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertObjectPattern(node, opts = {}) {
assert("ObjectPattern", node, opts);
}
-function assertSpreadElement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertSpreadElement(node, opts = {}) {
assert("SpreadElement", node, opts);
}
-function assertSuper(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertSuper(node, opts = {}) {
assert("Super", node, opts);
}
-function assertTaggedTemplateExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTaggedTemplateExpression(node, opts = {}) {
assert("TaggedTemplateExpression", node, opts);
}
-function assertTemplateElement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTemplateElement(node, opts = {}) {
assert("TemplateElement", node, opts);
}
-function assertTemplateLiteral(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTemplateLiteral(node, opts = {}) {
assert("TemplateLiteral", node, opts);
}
-function assertYieldExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertYieldExpression(node, opts = {}) {
assert("YieldExpression", node, opts);
}
-function assertAnyTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertAnyTypeAnnotation(node, opts = {}) {
assert("AnyTypeAnnotation", node, opts);
}
-function assertArrayTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertArrayTypeAnnotation(node, opts = {}) {
assert("ArrayTypeAnnotation", node, opts);
}
-function assertBooleanTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertBooleanTypeAnnotation(node, opts = {}) {
assert("BooleanTypeAnnotation", node, opts);
}
-function assertBooleanLiteralTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertBooleanLiteralTypeAnnotation(node, opts = {}) {
assert("BooleanLiteralTypeAnnotation", node, opts);
}
-function assertNullLiteralTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertNullLiteralTypeAnnotation(node, opts = {}) {
assert("NullLiteralTypeAnnotation", node, opts);
}
-function assertClassImplements(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertClassImplements(node, opts = {}) {
assert("ClassImplements", node, opts);
}
-function assertDeclareClass(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDeclareClass(node, opts = {}) {
assert("DeclareClass", node, opts);
}
-function assertDeclareFunction(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDeclareFunction(node, opts = {}) {
assert("DeclareFunction", node, opts);
}
-function assertDeclareInterface(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDeclareInterface(node, opts = {}) {
assert("DeclareInterface", node, opts);
}
-function assertDeclareModule(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDeclareModule(node, opts = {}) {
assert("DeclareModule", node, opts);
}
-function assertDeclareModuleExports(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDeclareModuleExports(node, opts = {}) {
assert("DeclareModuleExports", node, opts);
}
-function assertDeclareTypeAlias(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDeclareTypeAlias(node, opts = {}) {
assert("DeclareTypeAlias", node, opts);
}
-function assertDeclareOpaqueType(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDeclareOpaqueType(node, opts = {}) {
assert("DeclareOpaqueType", node, opts);
}
-function assertDeclareVariable(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDeclareVariable(node, opts = {}) {
assert("DeclareVariable", node, opts);
}
-function assertDeclareExportDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDeclareExportDeclaration(node, opts = {}) {
assert("DeclareExportDeclaration", node, opts);
}
-function assertDeclareExportAllDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDeclareExportAllDeclaration(node, opts = {}) {
assert("DeclareExportAllDeclaration", node, opts);
}
-function assertDeclaredPredicate(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDeclaredPredicate(node, opts = {}) {
assert("DeclaredPredicate", node, opts);
}
-function assertExistsTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertExistsTypeAnnotation(node, opts = {}) {
assert("ExistsTypeAnnotation", node, opts);
}
-function assertFunctionTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertFunctionTypeAnnotation(node, opts = {}) {
assert("FunctionTypeAnnotation", node, opts);
}
-function assertFunctionTypeParam(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertFunctionTypeParam(node, opts = {}) {
assert("FunctionTypeParam", node, opts);
}
-function assertGenericTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertGenericTypeAnnotation(node, opts = {}) {
assert("GenericTypeAnnotation", node, opts);
}
-function assertInferredPredicate(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertInferredPredicate(node, opts = {}) {
assert("InferredPredicate", node, opts);
}
-function assertInterfaceExtends(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertInterfaceExtends(node, opts = {}) {
assert("InterfaceExtends", node, opts);
}
-function assertInterfaceDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertInterfaceDeclaration(node, opts = {}) {
assert("InterfaceDeclaration", node, opts);
}
-function assertIntersectionTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertInterfaceTypeAnnotation(node, opts = {}) {
+ assert("InterfaceTypeAnnotation", node, opts);
+}
+function assertIntersectionTypeAnnotation(node, opts = {}) {
assert("IntersectionTypeAnnotation", node, opts);
}
-function assertMixedTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertMixedTypeAnnotation(node, opts = {}) {
assert("MixedTypeAnnotation", node, opts);
}
-function assertEmptyTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertEmptyTypeAnnotation(node, opts = {}) {
assert("EmptyTypeAnnotation", node, opts);
}
-function assertNullableTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertNullableTypeAnnotation(node, opts = {}) {
assert("NullableTypeAnnotation", node, opts);
}
-function assertNumberLiteralTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertNumberLiteralTypeAnnotation(node, opts = {}) {
assert("NumberLiteralTypeAnnotation", node, opts);
}
-function assertNumberTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertNumberTypeAnnotation(node, opts = {}) {
assert("NumberTypeAnnotation", node, opts);
}
-function assertObjectTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertObjectTypeAnnotation(node, opts = {}) {
assert("ObjectTypeAnnotation", node, opts);
}
-function assertObjectTypeCallProperty(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertObjectTypeInternalSlot(node, opts = {}) {
+ assert("ObjectTypeInternalSlot", node, opts);
+}
+function assertObjectTypeCallProperty(node, opts = {}) {
assert("ObjectTypeCallProperty", node, opts);
}
-function assertObjectTypeIndexer(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertObjectTypeIndexer(node, opts = {}) {
assert("ObjectTypeIndexer", node, opts);
}
-function assertObjectTypeProperty(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertObjectTypeProperty(node, opts = {}) {
assert("ObjectTypeProperty", node, opts);
}
-function assertObjectTypeSpreadProperty(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertObjectTypeSpreadProperty(node, opts = {}) {
assert("ObjectTypeSpreadProperty", node, opts);
}
-function assertOpaqueType(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertOpaqueType(node, opts = {}) {
assert("OpaqueType", node, opts);
}
-function assertQualifiedTypeIdentifier(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertQualifiedTypeIdentifier(node, opts = {}) {
assert("QualifiedTypeIdentifier", node, opts);
}
-function assertStringLiteralTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertStringLiteralTypeAnnotation(node, opts = {}) {
assert("StringLiteralTypeAnnotation", node, opts);
}
-function assertStringTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertStringTypeAnnotation(node, opts = {}) {
assert("StringTypeAnnotation", node, opts);
}
-function assertThisTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertThisTypeAnnotation(node, opts = {}) {
assert("ThisTypeAnnotation", node, opts);
}
-function assertTupleTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTupleTypeAnnotation(node, opts = {}) {
assert("TupleTypeAnnotation", node, opts);
}
-function assertTypeofTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTypeofTypeAnnotation(node, opts = {}) {
assert("TypeofTypeAnnotation", node, opts);
}
-function assertTypeAlias(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTypeAlias(node, opts = {}) {
assert("TypeAlias", node, opts);
}
-function assertTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTypeAnnotation(node, opts = {}) {
assert("TypeAnnotation", node, opts);
}
-function assertTypeCastExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTypeCastExpression(node, opts = {}) {
assert("TypeCastExpression", node, opts);
}
-function assertTypeParameter(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTypeParameter(node, opts = {}) {
assert("TypeParameter", node, opts);
}
-function assertTypeParameterDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTypeParameterDeclaration(node, opts = {}) {
assert("TypeParameterDeclaration", node, opts);
}
-function assertTypeParameterInstantiation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTypeParameterInstantiation(node, opts = {}) {
assert("TypeParameterInstantiation", node, opts);
}
-function assertUnionTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertUnionTypeAnnotation(node, opts = {}) {
assert("UnionTypeAnnotation", node, opts);
}
-function assertVoidTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertVariance(node, opts = {}) {
+ assert("Variance", node, opts);
+}
+function assertVoidTypeAnnotation(node, opts = {}) {
assert("VoidTypeAnnotation", node, opts);
}
-function assertJSXAttribute(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXAttribute(node, opts = {}) {
assert("JSXAttribute", node, opts);
}
-function assertJSXClosingElement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXClosingElement(node, opts = {}) {
assert("JSXClosingElement", node, opts);
}
-function assertJSXElement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXElement(node, opts = {}) {
assert("JSXElement", node, opts);
}
-function assertJSXEmptyExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXEmptyExpression(node, opts = {}) {
assert("JSXEmptyExpression", node, opts);
}
-function assertJSXExpressionContainer(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXExpressionContainer(node, opts = {}) {
assert("JSXExpressionContainer", node, opts);
}
-function assertJSXSpreadChild(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXSpreadChild(node, opts = {}) {
assert("JSXSpreadChild", node, opts);
}
-function assertJSXIdentifier(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXIdentifier(node, opts = {}) {
assert("JSXIdentifier", node, opts);
}
-function assertJSXMemberExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXMemberExpression(node, opts = {}) {
assert("JSXMemberExpression", node, opts);
}
-function assertJSXNamespacedName(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXNamespacedName(node, opts = {}) {
assert("JSXNamespacedName", node, opts);
}
-function assertJSXOpeningElement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXOpeningElement(node, opts = {}) {
assert("JSXOpeningElement", node, opts);
}
-function assertJSXSpreadAttribute(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXSpreadAttribute(node, opts = {}) {
assert("JSXSpreadAttribute", node, opts);
}
-function assertJSXText(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXText(node, opts = {}) {
assert("JSXText", node, opts);
}
-function assertJSXFragment(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXFragment(node, opts = {}) {
assert("JSXFragment", node, opts);
}
-function assertJSXOpeningFragment(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXOpeningFragment(node, opts = {}) {
assert("JSXOpeningFragment", node, opts);
}
-function assertJSXClosingFragment(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSXClosingFragment(node, opts = {}) {
assert("JSXClosingFragment", node, opts);
}
-function assertNoop(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertNoop(node, opts = {}) {
assert("Noop", node, opts);
}
-function assertParenthesizedExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertParenthesizedExpression(node, opts = {}) {
assert("ParenthesizedExpression", node, opts);
}
-function assertAwaitExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertAwaitExpression(node, opts = {}) {
assert("AwaitExpression", node, opts);
}
-function assertBindExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertBindExpression(node, opts = {}) {
assert("BindExpression", node, opts);
}
-function assertClassProperty(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertClassProperty(node, opts = {}) {
assert("ClassProperty", node, opts);
}
-function assertImport(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertOptionalMemberExpression(node, opts = {}) {
+ assert("OptionalMemberExpression", node, opts);
+}
- assert("Import", node, opts);
+function assertPipelineTopicExpression(node, opts = {}) {
+ assert("PipelineTopicExpression", node, opts);
}
-function assertDecorator(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertPipelineBareFunction(node, opts = {}) {
+ assert("PipelineBareFunction", node, opts);
+}
- assert("Decorator", node, opts);
+function assertPipelinePrimaryTopicReference(node, opts = {}) {
+ assert("PipelinePrimaryTopicReference", node, opts);
}
-function assertDoExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertOptionalCallExpression(node, opts = {}) {
+ assert("OptionalCallExpression", node, opts);
+}
- assert("DoExpression", node, opts);
+function assertClassPrivateProperty(node, opts = {}) {
+ assert("ClassPrivateProperty", node, opts);
}
-function assertExportDefaultSpecifier(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertClassPrivateMethod(node, opts = {}) {
+ assert("ClassPrivateMethod", node, opts);
+}
- assert("ExportDefaultSpecifier", node, opts);
+function assertImport(node, opts = {}) {
+ assert("Import", node, opts);
}
-function assertExportNamespaceSpecifier(node, opts) {
- if (opts === void 0) {
- 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 assertTSParameterProperty(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertPrivateName(node, opts = {}) {
+ assert("PrivateName", node, opts);
+}
- assert("TSParameterProperty", node, opts);
+function assertBigIntLiteral(node, opts = {}) {
+ assert("BigIntLiteral", node, opts);
}
-function assertTSDeclareFunction(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertTSParameterProperty(node, opts = {}) {
+ assert("TSParameterProperty", node, opts);
+}
+function assertTSDeclareFunction(node, opts = {}) {
assert("TSDeclareFunction", node, opts);
}
-function assertTSDeclareMethod(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSDeclareMethod(node, opts = {}) {
assert("TSDeclareMethod", node, opts);
}
-function assertTSQualifiedName(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSQualifiedName(node, opts = {}) {
assert("TSQualifiedName", node, opts);
}
-function assertTSCallSignatureDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSCallSignatureDeclaration(node, opts = {}) {
assert("TSCallSignatureDeclaration", node, opts);
}
-function assertTSConstructSignatureDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSConstructSignatureDeclaration(node, opts = {}) {
assert("TSConstructSignatureDeclaration", node, opts);
}
-function assertTSPropertySignature(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSPropertySignature(node, opts = {}) {
assert("TSPropertySignature", node, opts);
}
-function assertTSMethodSignature(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSMethodSignature(node, opts = {}) {
assert("TSMethodSignature", node, opts);
}
-function assertTSIndexSignature(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSIndexSignature(node, opts = {}) {
assert("TSIndexSignature", node, opts);
}
-function assertTSAnyKeyword(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSAnyKeyword(node, opts = {}) {
assert("TSAnyKeyword", node, opts);
}
-function assertTSNumberKeyword(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertTSUnknownKeyword(node, opts = {}) {
+ assert("TSUnknownKeyword", node, opts);
+}
+function assertTSNumberKeyword(node, opts = {}) {
assert("TSNumberKeyword", node, opts);
}
-function assertTSObjectKeyword(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSObjectKeyword(node, opts = {}) {
assert("TSObjectKeyword", node, opts);
}
-function assertTSBooleanKeyword(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSBooleanKeyword(node, opts = {}) {
assert("TSBooleanKeyword", node, opts);
}
-function assertTSStringKeyword(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSStringKeyword(node, opts = {}) {
assert("TSStringKeyword", node, opts);
}
-function assertTSSymbolKeyword(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSSymbolKeyword(node, opts = {}) {
assert("TSSymbolKeyword", node, opts);
}
-function assertTSVoidKeyword(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSVoidKeyword(node, opts = {}) {
assert("TSVoidKeyword", node, opts);
}
-function assertTSUndefinedKeyword(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSUndefinedKeyword(node, opts = {}) {
assert("TSUndefinedKeyword", node, opts);
}
-function assertTSNullKeyword(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSNullKeyword(node, opts = {}) {
assert("TSNullKeyword", node, opts);
}
-function assertTSNeverKeyword(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSNeverKeyword(node, opts = {}) {
assert("TSNeverKeyword", node, opts);
}
-function assertTSThisType(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSThisType(node, opts = {}) {
assert("TSThisType", node, opts);
}
-function assertTSFunctionType(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSFunctionType(node, opts = {}) {
assert("TSFunctionType", node, opts);
}
-function assertTSConstructorType(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSConstructorType(node, opts = {}) {
assert("TSConstructorType", node, opts);
}
-function assertTSTypeReference(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSTypeReference(node, opts = {}) {
assert("TSTypeReference", node, opts);
}
-function assertTSTypePredicate(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSTypePredicate(node, opts = {}) {
assert("TSTypePredicate", node, opts);
}
-function assertTSTypeQuery(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSTypeQuery(node, opts = {}) {
assert("TSTypeQuery", node, opts);
}
-function assertTSTypeLiteral(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSTypeLiteral(node, opts = {}) {
assert("TSTypeLiteral", node, opts);
}
-function assertTSArrayType(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSArrayType(node, opts = {}) {
assert("TSArrayType", node, opts);
}
-function assertTSTupleType(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSTupleType(node, opts = {}) {
assert("TSTupleType", node, opts);
}
-function assertTSUnionType(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertTSOptionalType(node, opts = {}) {
+ assert("TSOptionalType", node, opts);
+}
- assert("TSUnionType", node, opts);
+function assertTSRestType(node, opts = {}) {
+ assert("TSRestType", node, opts);
}
-function assertTSIntersectionType(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertTSUnionType(node, opts = {}) {
+ assert("TSUnionType", node, opts);
+}
+function assertTSIntersectionType(node, opts = {}) {
assert("TSIntersectionType", node, opts);
}
-function assertTSParenthesizedType(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertTSConditionalType(node, opts = {}) {
+ assert("TSConditionalType", node, opts);
+}
- assert("TSParenthesizedType", node, opts);
+function assertTSInferType(node, opts = {}) {
+ assert("TSInferType", node, opts);
}
-function assertTSTypeOperator(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertTSParenthesizedType(node, opts = {}) {
+ assert("TSParenthesizedType", node, opts);
+}
+function assertTSTypeOperator(node, opts = {}) {
assert("TSTypeOperator", node, opts);
}
-function assertTSIndexedAccessType(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSIndexedAccessType(node, opts = {}) {
assert("TSIndexedAccessType", node, opts);
}
-function assertTSMappedType(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSMappedType(node, opts = {}) {
assert("TSMappedType", node, opts);
}
-function assertTSLiteralType(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSLiteralType(node, opts = {}) {
assert("TSLiteralType", node, opts);
}
-function assertTSExpressionWithTypeArguments(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSExpressionWithTypeArguments(node, opts = {}) {
assert("TSExpressionWithTypeArguments", node, opts);
}
-function assertTSInterfaceDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSInterfaceDeclaration(node, opts = {}) {
assert("TSInterfaceDeclaration", node, opts);
}
-function assertTSInterfaceBody(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSInterfaceBody(node, opts = {}) {
assert("TSInterfaceBody", node, opts);
}
-function assertTSTypeAliasDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSTypeAliasDeclaration(node, opts = {}) {
assert("TSTypeAliasDeclaration", node, opts);
}
-function assertTSAsExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSAsExpression(node, opts = {}) {
assert("TSAsExpression", node, opts);
}
-function assertTSTypeAssertion(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSTypeAssertion(node, opts = {}) {
assert("TSTypeAssertion", node, opts);
}
-function assertTSEnumDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSEnumDeclaration(node, opts = {}) {
assert("TSEnumDeclaration", node, opts);
}
-function assertTSEnumMember(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSEnumMember(node, opts = {}) {
assert("TSEnumMember", node, opts);
}
-function assertTSModuleDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSModuleDeclaration(node, opts = {}) {
assert("TSModuleDeclaration", node, opts);
}
-function assertTSModuleBlock(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSModuleBlock(node, opts = {}) {
assert("TSModuleBlock", node, opts);
}
-function assertTSImportEqualsDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertTSImportType(node, opts = {}) {
+ assert("TSImportType", node, opts);
+}
+function assertTSImportEqualsDeclaration(node, opts = {}) {
assert("TSImportEqualsDeclaration", node, opts);
}
-function assertTSExternalModuleReference(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSExternalModuleReference(node, opts = {}) {
assert("TSExternalModuleReference", node, opts);
}
-function assertTSNonNullExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSNonNullExpression(node, opts = {}) {
assert("TSNonNullExpression", node, opts);
}
-function assertTSExportAssignment(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSExportAssignment(node, opts = {}) {
assert("TSExportAssignment", node, opts);
}
-function assertTSNamespaceExportDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSNamespaceExportDeclaration(node, opts = {}) {
assert("TSNamespaceExportDeclaration", node, opts);
}
-function assertTSTypeAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSTypeAnnotation(node, opts = {}) {
assert("TSTypeAnnotation", node, opts);
}
-function assertTSTypeParameterInstantiation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSTypeParameterInstantiation(node, opts = {}) {
assert("TSTypeParameterInstantiation", node, opts);
}
-function assertTSTypeParameterDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSTypeParameterDeclaration(node, opts = {}) {
assert("TSTypeParameterDeclaration", node, opts);
}
-function assertTSTypeParameter(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSTypeParameter(node, opts = {}) {
assert("TSTypeParameter", node, opts);
}
-function assertExpression(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertExpression(node, opts = {}) {
assert("Expression", node, opts);
}
-function assertBinary(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertBinary(node, opts = {}) {
assert("Binary", node, opts);
}
-function assertScopable(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertScopable(node, opts = {}) {
assert("Scopable", node, opts);
}
-function assertBlockParent(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertBlockParent(node, opts = {}) {
assert("BlockParent", node, opts);
}
-function assertBlock(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertBlock(node, opts = {}) {
assert("Block", node, opts);
}
-function assertStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertStatement(node, opts = {}) {
assert("Statement", node, opts);
}
-function assertTerminatorless(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTerminatorless(node, opts = {}) {
assert("Terminatorless", node, opts);
}
-function assertCompletionStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertCompletionStatement(node, opts = {}) {
assert("CompletionStatement", node, opts);
}
-function assertConditional(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertConditional(node, opts = {}) {
assert("Conditional", node, opts);
}
-function assertLoop(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertLoop(node, opts = {}) {
assert("Loop", node, opts);
}
-function assertWhile(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertWhile(node, opts = {}) {
assert("While", node, opts);
}
-function assertExpressionWrapper(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertExpressionWrapper(node, opts = {}) {
assert("ExpressionWrapper", node, opts);
}
-function assertFor(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertFor(node, opts = {}) {
assert("For", node, opts);
}
-function assertForXStatement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertForXStatement(node, opts = {}) {
assert("ForXStatement", node, opts);
}
-function assertFunction(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertFunction(node, opts = {}) {
assert("Function", node, opts);
}
-function assertFunctionParent(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertFunctionParent(node, opts = {}) {
assert("FunctionParent", node, opts);
}
-function assertPureish(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertPureish(node, opts = {}) {
assert("Pureish", node, opts);
}
-function assertDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertDeclaration(node, opts = {}) {
assert("Declaration", node, opts);
}
-function assertPatternLike(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertPatternLike(node, opts = {}) {
assert("PatternLike", node, opts);
}
-function assertLVal(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertLVal(node, opts = {}) {
assert("LVal", node, opts);
}
-function assertTSEntityName(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSEntityName(node, opts = {}) {
assert("TSEntityName", node, opts);
}
-function assertLiteral(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertLiteral(node, opts = {}) {
assert("Literal", node, opts);
}
-function assertImmutable(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertImmutable(node, opts = {}) {
assert("Immutable", node, opts);
}
-function assertUserWhitespacable(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertUserWhitespacable(node, opts = {}) {
assert("UserWhitespacable", node, opts);
}
-function assertMethod(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertMethod(node, opts = {}) {
assert("Method", node, opts);
}
-function assertObjectMember(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertObjectMember(node, opts = {}) {
assert("ObjectMember", node, opts);
}
-function assertProperty(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertProperty(node, opts = {}) {
assert("Property", node, opts);
}
-function assertUnaryLike(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertUnaryLike(node, opts = {}) {
assert("UnaryLike", node, opts);
}
-function assertPattern(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertPattern(node, opts = {}) {
assert("Pattern", node, opts);
}
-function assertClass(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertClass(node, opts = {}) {
assert("Class", node, opts);
}
-function assertModuleDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertModuleDeclaration(node, opts = {}) {
assert("ModuleDeclaration", node, opts);
}
-function assertExportDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertExportDeclaration(node, opts = {}) {
assert("ExportDeclaration", node, opts);
}
-function assertModuleSpecifier(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertModuleSpecifier(node, opts = {}) {
assert("ModuleSpecifier", node, opts);
}
-function assertFlow(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertFlow(node, opts = {}) {
assert("Flow", node, opts);
}
-function assertFlowBaseAnnotation(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertFlowType(node, opts = {}) {
+ assert("FlowType", node, opts);
+}
+function assertFlowBaseAnnotation(node, opts = {}) {
assert("FlowBaseAnnotation", node, opts);
}
-function assertFlowDeclaration(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertFlowDeclaration(node, opts = {}) {
assert("FlowDeclaration", node, opts);
}
-function assertFlowPredicate(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertFlowPredicate(node, opts = {}) {
assert("FlowPredicate", node, opts);
}
-function assertJSX(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertJSX(node, opts = {}) {
assert("JSX", node, opts);
}
-function assertTSTypeElement(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
+function assertPrivate(node, opts = {}) {
+ assert("Private", node, opts);
+}
+function assertTSTypeElement(node, opts = {}) {
assert("TSTypeElement", node, opts);
}
-function assertTSType(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
+function assertTSType(node, opts = {}) {
assert("TSType", node, opts);
}
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
index 4adf87032d..50d1b2a95f 100644
--- 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
@@ -1,9 +1,19 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = builder;
-var _clone = _interopRequireDefault(require("lodash/clone"));
+function _clone() {
+ const data = _interopRequireDefault(require("lodash/clone"));
+
+ _clone = function () {
+ return data;
+ };
+
+ return data;
+}
var _definitions = require("../definitions");
@@ -11,32 +21,28 @@ var _validate = _interopRequireDefault(require("../validators/validate"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function builder(type) {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- var keys = _definitions.BUILDER_KEYS[type];
- var countArgs = args.length;
+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);
+ throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys.length}`);
}
- var node = {
- type: type
+ const node = {
+ type
};
- var i = 0;
- keys.forEach(function (key) {
- var field = _definitions.NODE_FIELDS[type][key];
- var arg;
+ 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);
+ if (arg === undefined) arg = (0, _clone().default)(field.default);
node[key] = arg;
i++;
});
- for (var key in node) {
+ for (const key in node) {
(0, _validate.default)(node, key, node[key]);
}
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
index bff3b99b3f..4724335f2a 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = createTypeAnnotationBasedOnTypeof;
var _generated = require("../generated");
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
index 932e459729..df76b0107f 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = createUnionTypeAnnotation;
var _generated = require("../generated");
@@ -10,7 +12,7 @@ var _removeTypeDuplicates = _interopRequireDefault(require("../../modifications/
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function createUnionTypeAnnotation(types) {
- var flattened = (0, _removeTypeDuplicates.default)(types);
+ const flattened = (0, _removeTypeDuplicates.default)(types);
if (flattened.length === 1) {
return flattened[0];
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
index 632b628f8d..e77a2dd345 100644
--- 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
@@ -1,9 +1,12 @@
"use strict";
-exports.__esModule = true;
+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;
@@ -98,6 +101,7 @@ exports.genericTypeAnnotation = exports.GenericTypeAnnotation = GenericTypeAnnot
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;
@@ -105,6 +109,7 @@ exports.nullableTypeAnnotation = exports.NullableTypeAnnotation = NullableTypeAn
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;
@@ -123,6 +128,7 @@ 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;
@@ -144,11 +150,20 @@ exports.parenthesizedExpression = exports.ParenthesizedExpression = Parenthesize
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;
@@ -159,6 +174,7 @@ exports.tSPropertySignature = exports.tsPropertySignature = exports.TSPropertySi
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;
@@ -177,8 +193,12 @@ 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;
@@ -194,6 +214,7 @@ exports.tSEnumDeclaration = exports.tsEnumDeclaration = exports.TSEnumDeclaratio
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;
@@ -212,1658 +233,906 @@ var _builder = _interopRequireDefault(require("../builder"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function ArrayExpression() {
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- return _builder.default.apply(void 0, ["ArrayExpression"].concat(args));
+function ArrayExpression(...args) {
+ return (0, _builder.default)("ArrayExpression", ...args);
}
-function AssignmentExpression() {
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
- args[_key2] = arguments[_key2];
- }
-
- return _builder.default.apply(void 0, ["AssignmentExpression"].concat(args));
+function AssignmentExpression(...args) {
+ return (0, _builder.default)("AssignmentExpression", ...args);
}
-function BinaryExpression() {
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
- args[_key3] = arguments[_key3];
- }
-
- return _builder.default.apply(void 0, ["BinaryExpression"].concat(args));
+function BinaryExpression(...args) {
+ return (0, _builder.default)("BinaryExpression", ...args);
}
-function Directive() {
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
- args[_key4] = arguments[_key4];
- }
-
- return _builder.default.apply(void 0, ["Directive"].concat(args));
+function InterpreterDirective(...args) {
+ return (0, _builder.default)("InterpreterDirective", ...args);
}
-function DirectiveLiteral() {
- for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
- args[_key5] = arguments[_key5];
- }
-
- return _builder.default.apply(void 0, ["DirectiveLiteral"].concat(args));
+function Directive(...args) {
+ return (0, _builder.default)("Directive", ...args);
}
-function BlockStatement() {
- for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
- args[_key6] = arguments[_key6];
- }
-
- return _builder.default.apply(void 0, ["BlockStatement"].concat(args));
+function DirectiveLiteral(...args) {
+ return (0, _builder.default)("DirectiveLiteral", ...args);
}
-function BreakStatement() {
- for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
- args[_key7] = arguments[_key7];
- }
-
- return _builder.default.apply(void 0, ["BreakStatement"].concat(args));
+function BlockStatement(...args) {
+ return (0, _builder.default)("BlockStatement", ...args);
}
-function CallExpression() {
- for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
- args[_key8] = arguments[_key8];
- }
-
- return _builder.default.apply(void 0, ["CallExpression"].concat(args));
+function BreakStatement(...args) {
+ return (0, _builder.default)("BreakStatement", ...args);
}
-function CatchClause() {
- for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
- args[_key9] = arguments[_key9];
- }
-
- return _builder.default.apply(void 0, ["CatchClause"].concat(args));
+function CallExpression(...args) {
+ return (0, _builder.default)("CallExpression", ...args);
}
-function ConditionalExpression() {
- for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
- args[_key10] = arguments[_key10];
- }
-
- return _builder.default.apply(void 0, ["ConditionalExpression"].concat(args));
+function CatchClause(...args) {
+ return (0, _builder.default)("CatchClause", ...args);
}
-function ContinueStatement() {
- for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
- args[_key11] = arguments[_key11];
- }
-
- return _builder.default.apply(void 0, ["ContinueStatement"].concat(args));
+function ConditionalExpression(...args) {
+ return (0, _builder.default)("ConditionalExpression", ...args);
}
-function DebuggerStatement() {
- for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
- args[_key12] = arguments[_key12];
- }
-
- return _builder.default.apply(void 0, ["DebuggerStatement"].concat(args));
+function ContinueStatement(...args) {
+ return (0, _builder.default)("ContinueStatement", ...args);
}
-function DoWhileStatement() {
- for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
- args[_key13] = arguments[_key13];
- }
-
- return _builder.default.apply(void 0, ["DoWhileStatement"].concat(args));
+function DebuggerStatement(...args) {
+ return (0, _builder.default)("DebuggerStatement", ...args);
}
-function EmptyStatement() {
- for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
- args[_key14] = arguments[_key14];
- }
-
- return _builder.default.apply(void 0, ["EmptyStatement"].concat(args));
+function DoWhileStatement(...args) {
+ return (0, _builder.default)("DoWhileStatement", ...args);
}
-function ExpressionStatement() {
- for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
- args[_key15] = arguments[_key15];
- }
-
- return _builder.default.apply(void 0, ["ExpressionStatement"].concat(args));
+function EmptyStatement(...args) {
+ return (0, _builder.default)("EmptyStatement", ...args);
}
-function File() {
- for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {
- args[_key16] = arguments[_key16];
- }
-
- return _builder.default.apply(void 0, ["File"].concat(args));
+function ExpressionStatement(...args) {
+ return (0, _builder.default)("ExpressionStatement", ...args);
}
-function ForInStatement() {
- for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) {
- args[_key17] = arguments[_key17];
- }
-
- return _builder.default.apply(void 0, ["ForInStatement"].concat(args));
+function File(...args) {
+ return (0, _builder.default)("File", ...args);
}
-function ForStatement() {
- for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) {
- args[_key18] = arguments[_key18];
- }
-
- return _builder.default.apply(void 0, ["ForStatement"].concat(args));
+function ForInStatement(...args) {
+ return (0, _builder.default)("ForInStatement", ...args);
}
-function FunctionDeclaration() {
- for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) {
- args[_key19] = arguments[_key19];
- }
-
- return _builder.default.apply(void 0, ["FunctionDeclaration"].concat(args));
+function ForStatement(...args) {
+ return (0, _builder.default)("ForStatement", ...args);
}
-function FunctionExpression() {
- for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) {
- args[_key20] = arguments[_key20];
- }
-
- return _builder.default.apply(void 0, ["FunctionExpression"].concat(args));
+function FunctionDeclaration(...args) {
+ return (0, _builder.default)("FunctionDeclaration", ...args);
}
-function Identifier() {
- for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) {
- args[_key21] = arguments[_key21];
- }
-
- return _builder.default.apply(void 0, ["Identifier"].concat(args));
+function FunctionExpression(...args) {
+ return (0, _builder.default)("FunctionExpression", ...args);
}
-function IfStatement() {
- for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) {
- args[_key22] = arguments[_key22];
- }
-
- return _builder.default.apply(void 0, ["IfStatement"].concat(args));
+function Identifier(...args) {
+ return (0, _builder.default)("Identifier", ...args);
}
-function LabeledStatement() {
- for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) {
- args[_key23] = arguments[_key23];
- }
-
- return _builder.default.apply(void 0, ["LabeledStatement"].concat(args));
+function IfStatement(...args) {
+ return (0, _builder.default)("IfStatement", ...args);
}
-function StringLiteral() {
- for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) {
- args[_key24] = arguments[_key24];
- }
-
- return _builder.default.apply(void 0, ["StringLiteral"].concat(args));
+function LabeledStatement(...args) {
+ return (0, _builder.default)("LabeledStatement", ...args);
}
-function NumericLiteral() {
- for (var _len25 = arguments.length, args = new Array(_len25), _key25 = 0; _key25 < _len25; _key25++) {
- args[_key25] = arguments[_key25];
- }
-
- return _builder.default.apply(void 0, ["NumericLiteral"].concat(args));
+function StringLiteral(...args) {
+ return (0, _builder.default)("StringLiteral", ...args);
}
-function NullLiteral() {
- for (var _len26 = arguments.length, args = new Array(_len26), _key26 = 0; _key26 < _len26; _key26++) {
- args[_key26] = arguments[_key26];
- }
-
- return _builder.default.apply(void 0, ["NullLiteral"].concat(args));
+function NumericLiteral(...args) {
+ return (0, _builder.default)("NumericLiteral", ...args);
}
-function BooleanLiteral() {
- for (var _len27 = arguments.length, args = new Array(_len27), _key27 = 0; _key27 < _len27; _key27++) {
- args[_key27] = arguments[_key27];
- }
-
- return _builder.default.apply(void 0, ["BooleanLiteral"].concat(args));
+function NullLiteral(...args) {
+ return (0, _builder.default)("NullLiteral", ...args);
}
-function RegExpLiteral() {
- for (var _len28 = arguments.length, args = new Array(_len28), _key28 = 0; _key28 < _len28; _key28++) {
- args[_key28] = arguments[_key28];
- }
-
- return _builder.default.apply(void 0, ["RegExpLiteral"].concat(args));
+function BooleanLiteral(...args) {
+ return (0, _builder.default)("BooleanLiteral", ...args);
}
-function LogicalExpression() {
- for (var _len29 = arguments.length, args = new Array(_len29), _key29 = 0; _key29 < _len29; _key29++) {
- args[_key29] = arguments[_key29];
- }
-
- return _builder.default.apply(void 0, ["LogicalExpression"].concat(args));
+function RegExpLiteral(...args) {
+ return (0, _builder.default)("RegExpLiteral", ...args);
}
-function MemberExpression() {
- for (var _len30 = arguments.length, args = new Array(_len30), _key30 = 0; _key30 < _len30; _key30++) {
- args[_key30] = arguments[_key30];
- }
-
- return _builder.default.apply(void 0, ["MemberExpression"].concat(args));
+function LogicalExpression(...args) {
+ return (0, _builder.default)("LogicalExpression", ...args);
}
-function NewExpression() {
- for (var _len31 = arguments.length, args = new Array(_len31), _key31 = 0; _key31 < _len31; _key31++) {
- args[_key31] = arguments[_key31];
- }
-
- return _builder.default.apply(void 0, ["NewExpression"].concat(args));
+function MemberExpression(...args) {
+ return (0, _builder.default)("MemberExpression", ...args);
}
-function Program() {
- for (var _len32 = arguments.length, args = new Array(_len32), _key32 = 0; _key32 < _len32; _key32++) {
- args[_key32] = arguments[_key32];
- }
-
- return _builder.default.apply(void 0, ["Program"].concat(args));
+function NewExpression(...args) {
+ return (0, _builder.default)("NewExpression", ...args);
}
-function ObjectExpression() {
- for (var _len33 = arguments.length, args = new Array(_len33), _key33 = 0; _key33 < _len33; _key33++) {
- args[_key33] = arguments[_key33];
- }
-
- return _builder.default.apply(void 0, ["ObjectExpression"].concat(args));
+function Program(...args) {
+ return (0, _builder.default)("Program", ...args);
}
-function ObjectMethod() {
- for (var _len34 = arguments.length, args = new Array(_len34), _key34 = 0; _key34 < _len34; _key34++) {
- args[_key34] = arguments[_key34];
- }
-
- return _builder.default.apply(void 0, ["ObjectMethod"].concat(args));
+function ObjectExpression(...args) {
+ return (0, _builder.default)("ObjectExpression", ...args);
}
-function ObjectProperty() {
- for (var _len35 = arguments.length, args = new Array(_len35), _key35 = 0; _key35 < _len35; _key35++) {
- args[_key35] = arguments[_key35];
- }
-
- return _builder.default.apply(void 0, ["ObjectProperty"].concat(args));
+function ObjectMethod(...args) {
+ return (0, _builder.default)("ObjectMethod", ...args);
}
-function RestElement() {
- for (var _len36 = arguments.length, args = new Array(_len36), _key36 = 0; _key36 < _len36; _key36++) {
- args[_key36] = arguments[_key36];
- }
-
- return _builder.default.apply(void 0, ["RestElement"].concat(args));
+function ObjectProperty(...args) {
+ return (0, _builder.default)("ObjectProperty", ...args);
}
-function ReturnStatement() {
- for (var _len37 = arguments.length, args = new Array(_len37), _key37 = 0; _key37 < _len37; _key37++) {
- args[_key37] = arguments[_key37];
- }
-
- return _builder.default.apply(void 0, ["ReturnStatement"].concat(args));
+function RestElement(...args) {
+ return (0, _builder.default)("RestElement", ...args);
}
-function SequenceExpression() {
- for (var _len38 = arguments.length, args = new Array(_len38), _key38 = 0; _key38 < _len38; _key38++) {
- args[_key38] = arguments[_key38];
- }
-
- return _builder.default.apply(void 0, ["SequenceExpression"].concat(args));
+function ReturnStatement(...args) {
+ return (0, _builder.default)("ReturnStatement", ...args);
}
-function SwitchCase() {
- for (var _len39 = arguments.length, args = new Array(_len39), _key39 = 0; _key39 < _len39; _key39++) {
- args[_key39] = arguments[_key39];
- }
-
- return _builder.default.apply(void 0, ["SwitchCase"].concat(args));
+function SequenceExpression(...args) {
+ return (0, _builder.default)("SequenceExpression", ...args);
}
-function SwitchStatement() {
- for (var _len40 = arguments.length, args = new Array(_len40), _key40 = 0; _key40 < _len40; _key40++) {
- args[_key40] = arguments[_key40];
- }
-
- return _builder.default.apply(void 0, ["SwitchStatement"].concat(args));
+function SwitchCase(...args) {
+ return (0, _builder.default)("SwitchCase", ...args);
}
-function ThisExpression() {
- for (var _len41 = arguments.length, args = new Array(_len41), _key41 = 0; _key41 < _len41; _key41++) {
- args[_key41] = arguments[_key41];
- }
-
- return _builder.default.apply(void 0, ["ThisExpression"].concat(args));
+function SwitchStatement(...args) {
+ return (0, _builder.default)("SwitchStatement", ...args);
}
-function ThrowStatement() {
- for (var _len42 = arguments.length, args = new Array(_len42), _key42 = 0; _key42 < _len42; _key42++) {
- args[_key42] = arguments[_key42];
- }
-
- return _builder.default.apply(void 0, ["ThrowStatement"].concat(args));
+function ThisExpression(...args) {
+ return (0, _builder.default)("ThisExpression", ...args);
}
-function TryStatement() {
- for (var _len43 = arguments.length, args = new Array(_len43), _key43 = 0; _key43 < _len43; _key43++) {
- args[_key43] = arguments[_key43];
- }
-
- return _builder.default.apply(void 0, ["TryStatement"].concat(args));
+function ThrowStatement(...args) {
+ return (0, _builder.default)("ThrowStatement", ...args);
}
-function UnaryExpression() {
- for (var _len44 = arguments.length, args = new Array(_len44), _key44 = 0; _key44 < _len44; _key44++) {
- args[_key44] = arguments[_key44];
- }
-
- return _builder.default.apply(void 0, ["UnaryExpression"].concat(args));
+function TryStatement(...args) {
+ return (0, _builder.default)("TryStatement", ...args);
}
-function UpdateExpression() {
- for (var _len45 = arguments.length, args = new Array(_len45), _key45 = 0; _key45 < _len45; _key45++) {
- args[_key45] = arguments[_key45];
- }
-
- return _builder.default.apply(void 0, ["UpdateExpression"].concat(args));
+function UnaryExpression(...args) {
+ return (0, _builder.default)("UnaryExpression", ...args);
}
-function VariableDeclaration() {
- for (var _len46 = arguments.length, args = new Array(_len46), _key46 = 0; _key46 < _len46; _key46++) {
- args[_key46] = arguments[_key46];
- }
-
- return _builder.default.apply(void 0, ["VariableDeclaration"].concat(args));
+function UpdateExpression(...args) {
+ return (0, _builder.default)("UpdateExpression", ...args);
}
-function VariableDeclarator() {
- for (var _len47 = arguments.length, args = new Array(_len47), _key47 = 0; _key47 < _len47; _key47++) {
- args[_key47] = arguments[_key47];
- }
-
- return _builder.default.apply(void 0, ["VariableDeclarator"].concat(args));
+function VariableDeclaration(...args) {
+ return (0, _builder.default)("VariableDeclaration", ...args);
}
-function WhileStatement() {
- for (var _len48 = arguments.length, args = new Array(_len48), _key48 = 0; _key48 < _len48; _key48++) {
- args[_key48] = arguments[_key48];
- }
-
- return _builder.default.apply(void 0, ["WhileStatement"].concat(args));
+function VariableDeclarator(...args) {
+ return (0, _builder.default)("VariableDeclarator", ...args);
}
-function WithStatement() {
- for (var _len49 = arguments.length, args = new Array(_len49), _key49 = 0; _key49 < _len49; _key49++) {
- args[_key49] = arguments[_key49];
- }
-
- return _builder.default.apply(void 0, ["WithStatement"].concat(args));
+function WhileStatement(...args) {
+ return (0, _builder.default)("WhileStatement", ...args);
}
-function AssignmentPattern() {
- for (var _len50 = arguments.length, args = new Array(_len50), _key50 = 0; _key50 < _len50; _key50++) {
- args[_key50] = arguments[_key50];
- }
-
- return _builder.default.apply(void 0, ["AssignmentPattern"].concat(args));
+function WithStatement(...args) {
+ return (0, _builder.default)("WithStatement", ...args);
}
-function ArrayPattern() {
- for (var _len51 = arguments.length, args = new Array(_len51), _key51 = 0; _key51 < _len51; _key51++) {
- args[_key51] = arguments[_key51];
- }
-
- return _builder.default.apply(void 0, ["ArrayPattern"].concat(args));
+function AssignmentPattern(...args) {
+ return (0, _builder.default)("AssignmentPattern", ...args);
}
-function ArrowFunctionExpression() {
- for (var _len52 = arguments.length, args = new Array(_len52), _key52 = 0; _key52 < _len52; _key52++) {
- args[_key52] = arguments[_key52];
- }
-
- return _builder.default.apply(void 0, ["ArrowFunctionExpression"].concat(args));
+function ArrayPattern(...args) {
+ return (0, _builder.default)("ArrayPattern", ...args);
}
-function ClassBody() {
- for (var _len53 = arguments.length, args = new Array(_len53), _key53 = 0; _key53 < _len53; _key53++) {
- args[_key53] = arguments[_key53];
- }
-
- return _builder.default.apply(void 0, ["ClassBody"].concat(args));
+function ArrowFunctionExpression(...args) {
+ return (0, _builder.default)("ArrowFunctionExpression", ...args);
}
-function ClassDeclaration() {
- for (var _len54 = arguments.length, args = new Array(_len54), _key54 = 0; _key54 < _len54; _key54++) {
- args[_key54] = arguments[_key54];
- }
-
- return _builder.default.apply(void 0, ["ClassDeclaration"].concat(args));
+function ClassBody(...args) {
+ return (0, _builder.default)("ClassBody", ...args);
}
-function ClassExpression() {
- for (var _len55 = arguments.length, args = new Array(_len55), _key55 = 0; _key55 < _len55; _key55++) {
- args[_key55] = arguments[_key55];
- }
-
- return _builder.default.apply(void 0, ["ClassExpression"].concat(args));
+function ClassDeclaration(...args) {
+ return (0, _builder.default)("ClassDeclaration", ...args);
}
-function ExportAllDeclaration() {
- for (var _len56 = arguments.length, args = new Array(_len56), _key56 = 0; _key56 < _len56; _key56++) {
- args[_key56] = arguments[_key56];
- }
-
- return _builder.default.apply(void 0, ["ExportAllDeclaration"].concat(args));
+function ClassExpression(...args) {
+ return (0, _builder.default)("ClassExpression", ...args);
}
-function ExportDefaultDeclaration() {
- for (var _len57 = arguments.length, args = new Array(_len57), _key57 = 0; _key57 < _len57; _key57++) {
- args[_key57] = arguments[_key57];
- }
-
- return _builder.default.apply(void 0, ["ExportDefaultDeclaration"].concat(args));
+function ExportAllDeclaration(...args) {
+ return (0, _builder.default)("ExportAllDeclaration", ...args);
}
-function ExportNamedDeclaration() {
- for (var _len58 = arguments.length, args = new Array(_len58), _key58 = 0; _key58 < _len58; _key58++) {
- args[_key58] = arguments[_key58];
- }
-
- return _builder.default.apply(void 0, ["ExportNamedDeclaration"].concat(args));
+function ExportDefaultDeclaration(...args) {
+ return (0, _builder.default)("ExportDefaultDeclaration", ...args);
}
-function ExportSpecifier() {
- for (var _len59 = arguments.length, args = new Array(_len59), _key59 = 0; _key59 < _len59; _key59++) {
- args[_key59] = arguments[_key59];
- }
-
- return _builder.default.apply(void 0, ["ExportSpecifier"].concat(args));
+function ExportNamedDeclaration(...args) {
+ return (0, _builder.default)("ExportNamedDeclaration", ...args);
}
-function ForOfStatement() {
- for (var _len60 = arguments.length, args = new Array(_len60), _key60 = 0; _key60 < _len60; _key60++) {
- args[_key60] = arguments[_key60];
- }
-
- return _builder.default.apply(void 0, ["ForOfStatement"].concat(args));
+function ExportSpecifier(...args) {
+ return (0, _builder.default)("ExportSpecifier", ...args);
}
-function ImportDeclaration() {
- for (var _len61 = arguments.length, args = new Array(_len61), _key61 = 0; _key61 < _len61; _key61++) {
- args[_key61] = arguments[_key61];
- }
-
- return _builder.default.apply(void 0, ["ImportDeclaration"].concat(args));
+function ForOfStatement(...args) {
+ return (0, _builder.default)("ForOfStatement", ...args);
}
-function ImportDefaultSpecifier() {
- for (var _len62 = arguments.length, args = new Array(_len62), _key62 = 0; _key62 < _len62; _key62++) {
- args[_key62] = arguments[_key62];
- }
-
- return _builder.default.apply(void 0, ["ImportDefaultSpecifier"].concat(args));
+function ImportDeclaration(...args) {
+ return (0, _builder.default)("ImportDeclaration", ...args);
}
-function ImportNamespaceSpecifier() {
- for (var _len63 = arguments.length, args = new Array(_len63), _key63 = 0; _key63 < _len63; _key63++) {
- args[_key63] = arguments[_key63];
- }
-
- return _builder.default.apply(void 0, ["ImportNamespaceSpecifier"].concat(args));
+function ImportDefaultSpecifier(...args) {
+ return (0, _builder.default)("ImportDefaultSpecifier", ...args);
}
-function ImportSpecifier() {
- for (var _len64 = arguments.length, args = new Array(_len64), _key64 = 0; _key64 < _len64; _key64++) {
- args[_key64] = arguments[_key64];
- }
-
- return _builder.default.apply(void 0, ["ImportSpecifier"].concat(args));
+function ImportNamespaceSpecifier(...args) {
+ return (0, _builder.default)("ImportNamespaceSpecifier", ...args);
}
-function MetaProperty() {
- for (var _len65 = arguments.length, args = new Array(_len65), _key65 = 0; _key65 < _len65; _key65++) {
- args[_key65] = arguments[_key65];
- }
-
- return _builder.default.apply(void 0, ["MetaProperty"].concat(args));
+function ImportSpecifier(...args) {
+ return (0, _builder.default)("ImportSpecifier", ...args);
}
-function ClassMethod() {
- for (var _len66 = arguments.length, args = new Array(_len66), _key66 = 0; _key66 < _len66; _key66++) {
- args[_key66] = arguments[_key66];
- }
-
- return _builder.default.apply(void 0, ["ClassMethod"].concat(args));
+function MetaProperty(...args) {
+ return (0, _builder.default)("MetaProperty", ...args);
}
-function ObjectPattern() {
- for (var _len67 = arguments.length, args = new Array(_len67), _key67 = 0; _key67 < _len67; _key67++) {
- args[_key67] = arguments[_key67];
- }
-
- return _builder.default.apply(void 0, ["ObjectPattern"].concat(args));
+function ClassMethod(...args) {
+ return (0, _builder.default)("ClassMethod", ...args);
}
-function SpreadElement() {
- for (var _len68 = arguments.length, args = new Array(_len68), _key68 = 0; _key68 < _len68; _key68++) {
- args[_key68] = arguments[_key68];
- }
-
- return _builder.default.apply(void 0, ["SpreadElement"].concat(args));
+function ObjectPattern(...args) {
+ return (0, _builder.default)("ObjectPattern", ...args);
}
-function Super() {
- for (var _len69 = arguments.length, args = new Array(_len69), _key69 = 0; _key69 < _len69; _key69++) {
- args[_key69] = arguments[_key69];
- }
-
- return _builder.default.apply(void 0, ["Super"].concat(args));
+function SpreadElement(...args) {
+ return (0, _builder.default)("SpreadElement", ...args);
}
-function TaggedTemplateExpression() {
- for (var _len70 = arguments.length, args = new Array(_len70), _key70 = 0; _key70 < _len70; _key70++) {
- args[_key70] = arguments[_key70];
- }
-
- return _builder.default.apply(void 0, ["TaggedTemplateExpression"].concat(args));
+function Super(...args) {
+ return (0, _builder.default)("Super", ...args);
}
-function TemplateElement() {
- for (var _len71 = arguments.length, args = new Array(_len71), _key71 = 0; _key71 < _len71; _key71++) {
- args[_key71] = arguments[_key71];
- }
-
- return _builder.default.apply(void 0, ["TemplateElement"].concat(args));
+function TaggedTemplateExpression(...args) {
+ return (0, _builder.default)("TaggedTemplateExpression", ...args);
}
-function TemplateLiteral() {
- for (var _len72 = arguments.length, args = new Array(_len72), _key72 = 0; _key72 < _len72; _key72++) {
- args[_key72] = arguments[_key72];
- }
-
- return _builder.default.apply(void 0, ["TemplateLiteral"].concat(args));
+function TemplateElement(...args) {
+ return (0, _builder.default)("TemplateElement", ...args);
}
-function YieldExpression() {
- for (var _len73 = arguments.length, args = new Array(_len73), _key73 = 0; _key73 < _len73; _key73++) {
- args[_key73] = arguments[_key73];
- }
-
- return _builder.default.apply(void 0, ["YieldExpression"].concat(args));
+function TemplateLiteral(...args) {
+ return (0, _builder.default)("TemplateLiteral", ...args);
}
-function AnyTypeAnnotation() {
- for (var _len74 = arguments.length, args = new Array(_len74), _key74 = 0; _key74 < _len74; _key74++) {
- args[_key74] = arguments[_key74];
- }
-
- return _builder.default.apply(void 0, ["AnyTypeAnnotation"].concat(args));
+function YieldExpression(...args) {
+ return (0, _builder.default)("YieldExpression", ...args);
}
-function ArrayTypeAnnotation() {
- for (var _len75 = arguments.length, args = new Array(_len75), _key75 = 0; _key75 < _len75; _key75++) {
- args[_key75] = arguments[_key75];
- }
-
- return _builder.default.apply(void 0, ["ArrayTypeAnnotation"].concat(args));
+function AnyTypeAnnotation(...args) {
+ return (0, _builder.default)("AnyTypeAnnotation", ...args);
}
-function BooleanTypeAnnotation() {
- for (var _len76 = arguments.length, args = new Array(_len76), _key76 = 0; _key76 < _len76; _key76++) {
- args[_key76] = arguments[_key76];
- }
-
- return _builder.default.apply(void 0, ["BooleanTypeAnnotation"].concat(args));
+function ArrayTypeAnnotation(...args) {
+ return (0, _builder.default)("ArrayTypeAnnotation", ...args);
}
-function BooleanLiteralTypeAnnotation() {
- for (var _len77 = arguments.length, args = new Array(_len77), _key77 = 0; _key77 < _len77; _key77++) {
- args[_key77] = arguments[_key77];
- }
-
- return _builder.default.apply(void 0, ["BooleanLiteralTypeAnnotation"].concat(args));
+function BooleanTypeAnnotation(...args) {
+ return (0, _builder.default)("BooleanTypeAnnotation", ...args);
}
-function NullLiteralTypeAnnotation() {
- for (var _len78 = arguments.length, args = new Array(_len78), _key78 = 0; _key78 < _len78; _key78++) {
- args[_key78] = arguments[_key78];
- }
-
- return _builder.default.apply(void 0, ["NullLiteralTypeAnnotation"].concat(args));
+function BooleanLiteralTypeAnnotation(...args) {
+ return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...args);
}
-function ClassImplements() {
- for (var _len79 = arguments.length, args = new Array(_len79), _key79 = 0; _key79 < _len79; _key79++) {
- args[_key79] = arguments[_key79];
- }
-
- return _builder.default.apply(void 0, ["ClassImplements"].concat(args));
+function NullLiteralTypeAnnotation(...args) {
+ return (0, _builder.default)("NullLiteralTypeAnnotation", ...args);
}
-function DeclareClass() {
- for (var _len80 = arguments.length, args = new Array(_len80), _key80 = 0; _key80 < _len80; _key80++) {
- args[_key80] = arguments[_key80];
- }
-
- return _builder.default.apply(void 0, ["DeclareClass"].concat(args));
+function ClassImplements(...args) {
+ return (0, _builder.default)("ClassImplements", ...args);
}
-function DeclareFunction() {
- for (var _len81 = arguments.length, args = new Array(_len81), _key81 = 0; _key81 < _len81; _key81++) {
- args[_key81] = arguments[_key81];
- }
-
- return _builder.default.apply(void 0, ["DeclareFunction"].concat(args));
+function DeclareClass(...args) {
+ return (0, _builder.default)("DeclareClass", ...args);
}
-function DeclareInterface() {
- for (var _len82 = arguments.length, args = new Array(_len82), _key82 = 0; _key82 < _len82; _key82++) {
- args[_key82] = arguments[_key82];
- }
-
- return _builder.default.apply(void 0, ["DeclareInterface"].concat(args));
+function DeclareFunction(...args) {
+ return (0, _builder.default)("DeclareFunction", ...args);
}
-function DeclareModule() {
- for (var _len83 = arguments.length, args = new Array(_len83), _key83 = 0; _key83 < _len83; _key83++) {
- args[_key83] = arguments[_key83];
- }
-
- return _builder.default.apply(void 0, ["DeclareModule"].concat(args));
+function DeclareInterface(...args) {
+ return (0, _builder.default)("DeclareInterface", ...args);
}
-function DeclareModuleExports() {
- for (var _len84 = arguments.length, args = new Array(_len84), _key84 = 0; _key84 < _len84; _key84++) {
- args[_key84] = arguments[_key84];
- }
-
- return _builder.default.apply(void 0, ["DeclareModuleExports"].concat(args));
+function DeclareModule(...args) {
+ return (0, _builder.default)("DeclareModule", ...args);
}
-function DeclareTypeAlias() {
- for (var _len85 = arguments.length, args = new Array(_len85), _key85 = 0; _key85 < _len85; _key85++) {
- args[_key85] = arguments[_key85];
- }
-
- return _builder.default.apply(void 0, ["DeclareTypeAlias"].concat(args));
+function DeclareModuleExports(...args) {
+ return (0, _builder.default)("DeclareModuleExports", ...args);
}
-function DeclareOpaqueType() {
- for (var _len86 = arguments.length, args = new Array(_len86), _key86 = 0; _key86 < _len86; _key86++) {
- args[_key86] = arguments[_key86];
- }
-
- return _builder.default.apply(void 0, ["DeclareOpaqueType"].concat(args));
+function DeclareTypeAlias(...args) {
+ return (0, _builder.default)("DeclareTypeAlias", ...args);
}
-function DeclareVariable() {
- for (var _len87 = arguments.length, args = new Array(_len87), _key87 = 0; _key87 < _len87; _key87++) {
- args[_key87] = arguments[_key87];
- }
-
- return _builder.default.apply(void 0, ["DeclareVariable"].concat(args));
+function DeclareOpaqueType(...args) {
+ return (0, _builder.default)("DeclareOpaqueType", ...args);
}
-function DeclareExportDeclaration() {
- for (var _len88 = arguments.length, args = new Array(_len88), _key88 = 0; _key88 < _len88; _key88++) {
- args[_key88] = arguments[_key88];
- }
-
- return _builder.default.apply(void 0, ["DeclareExportDeclaration"].concat(args));
+function DeclareVariable(...args) {
+ return (0, _builder.default)("DeclareVariable", ...args);
}
-function DeclareExportAllDeclaration() {
- for (var _len89 = arguments.length, args = new Array(_len89), _key89 = 0; _key89 < _len89; _key89++) {
- args[_key89] = arguments[_key89];
- }
-
- return _builder.default.apply(void 0, ["DeclareExportAllDeclaration"].concat(args));
+function DeclareExportDeclaration(...args) {
+ return (0, _builder.default)("DeclareExportDeclaration", ...args);
}
-function DeclaredPredicate() {
- for (var _len90 = arguments.length, args = new Array(_len90), _key90 = 0; _key90 < _len90; _key90++) {
- args[_key90] = arguments[_key90];
- }
-
- return _builder.default.apply(void 0, ["DeclaredPredicate"].concat(args));
+function DeclareExportAllDeclaration(...args) {
+ return (0, _builder.default)("DeclareExportAllDeclaration", ...args);
}
-function ExistsTypeAnnotation() {
- for (var _len91 = arguments.length, args = new Array(_len91), _key91 = 0; _key91 < _len91; _key91++) {
- args[_key91] = arguments[_key91];
- }
-
- return _builder.default.apply(void 0, ["ExistsTypeAnnotation"].concat(args));
+function DeclaredPredicate(...args) {
+ return (0, _builder.default)("DeclaredPredicate", ...args);
}
-function FunctionTypeAnnotation() {
- for (var _len92 = arguments.length, args = new Array(_len92), _key92 = 0; _key92 < _len92; _key92++) {
- args[_key92] = arguments[_key92];
- }
-
- return _builder.default.apply(void 0, ["FunctionTypeAnnotation"].concat(args));
+function ExistsTypeAnnotation(...args) {
+ return (0, _builder.default)("ExistsTypeAnnotation", ...args);
}
-function FunctionTypeParam() {
- for (var _len93 = arguments.length, args = new Array(_len93), _key93 = 0; _key93 < _len93; _key93++) {
- args[_key93] = arguments[_key93];
- }
-
- return _builder.default.apply(void 0, ["FunctionTypeParam"].concat(args));
+function FunctionTypeAnnotation(...args) {
+ return (0, _builder.default)("FunctionTypeAnnotation", ...args);
}
-function GenericTypeAnnotation() {
- for (var _len94 = arguments.length, args = new Array(_len94), _key94 = 0; _key94 < _len94; _key94++) {
- args[_key94] = arguments[_key94];
- }
-
- return _builder.default.apply(void 0, ["GenericTypeAnnotation"].concat(args));
+function FunctionTypeParam(...args) {
+ return (0, _builder.default)("FunctionTypeParam", ...args);
}
-function InferredPredicate() {
- for (var _len95 = arguments.length, args = new Array(_len95), _key95 = 0; _key95 < _len95; _key95++) {
- args[_key95] = arguments[_key95];
- }
-
- return _builder.default.apply(void 0, ["InferredPredicate"].concat(args));
+function GenericTypeAnnotation(...args) {
+ return (0, _builder.default)("GenericTypeAnnotation", ...args);
}
-function InterfaceExtends() {
- for (var _len96 = arguments.length, args = new Array(_len96), _key96 = 0; _key96 < _len96; _key96++) {
- args[_key96] = arguments[_key96];
- }
-
- return _builder.default.apply(void 0, ["InterfaceExtends"].concat(args));
+function InferredPredicate(...args) {
+ return (0, _builder.default)("InferredPredicate", ...args);
}
-function InterfaceDeclaration() {
- for (var _len97 = arguments.length, args = new Array(_len97), _key97 = 0; _key97 < _len97; _key97++) {
- args[_key97] = arguments[_key97];
- }
-
- return _builder.default.apply(void 0, ["InterfaceDeclaration"].concat(args));
+function InterfaceExtends(...args) {
+ return (0, _builder.default)("InterfaceExtends", ...args);
}
-function IntersectionTypeAnnotation() {
- for (var _len98 = arguments.length, args = new Array(_len98), _key98 = 0; _key98 < _len98; _key98++) {
- args[_key98] = arguments[_key98];
- }
-
- return _builder.default.apply(void 0, ["IntersectionTypeAnnotation"].concat(args));
+function InterfaceDeclaration(...args) {
+ return (0, _builder.default)("InterfaceDeclaration", ...args);
}
-function MixedTypeAnnotation() {
- for (var _len99 = arguments.length, args = new Array(_len99), _key99 = 0; _key99 < _len99; _key99++) {
- args[_key99] = arguments[_key99];
- }
-
- return _builder.default.apply(void 0, ["MixedTypeAnnotation"].concat(args));
+function InterfaceTypeAnnotation(...args) {
+ return (0, _builder.default)("InterfaceTypeAnnotation", ...args);
}
-function EmptyTypeAnnotation() {
- for (var _len100 = arguments.length, args = new Array(_len100), _key100 = 0; _key100 < _len100; _key100++) {
- args[_key100] = arguments[_key100];
- }
-
- return _builder.default.apply(void 0, ["EmptyTypeAnnotation"].concat(args));
+function IntersectionTypeAnnotation(...args) {
+ return (0, _builder.default)("IntersectionTypeAnnotation", ...args);
}
-function NullableTypeAnnotation() {
- for (var _len101 = arguments.length, args = new Array(_len101), _key101 = 0; _key101 < _len101; _key101++) {
- args[_key101] = arguments[_key101];
- }
-
- return _builder.default.apply(void 0, ["NullableTypeAnnotation"].concat(args));
+function MixedTypeAnnotation(...args) {
+ return (0, _builder.default)("MixedTypeAnnotation", ...args);
}
-function NumberLiteralTypeAnnotation() {
- for (var _len102 = arguments.length, args = new Array(_len102), _key102 = 0; _key102 < _len102; _key102++) {
- args[_key102] = arguments[_key102];
- }
-
- return _builder.default.apply(void 0, ["NumberLiteralTypeAnnotation"].concat(args));
+function EmptyTypeAnnotation(...args) {
+ return (0, _builder.default)("EmptyTypeAnnotation", ...args);
}
-function NumberTypeAnnotation() {
- for (var _len103 = arguments.length, args = new Array(_len103), _key103 = 0; _key103 < _len103; _key103++) {
- args[_key103] = arguments[_key103];
- }
-
- return _builder.default.apply(void 0, ["NumberTypeAnnotation"].concat(args));
+function NullableTypeAnnotation(...args) {
+ return (0, _builder.default)("NullableTypeAnnotation", ...args);
}
-function ObjectTypeAnnotation() {
- for (var _len104 = arguments.length, args = new Array(_len104), _key104 = 0; _key104 < _len104; _key104++) {
- args[_key104] = arguments[_key104];
- }
-
- return _builder.default.apply(void 0, ["ObjectTypeAnnotation"].concat(args));
+function NumberLiteralTypeAnnotation(...args) {
+ return (0, _builder.default)("NumberLiteralTypeAnnotation", ...args);
}
-function ObjectTypeCallProperty() {
- for (var _len105 = arguments.length, args = new Array(_len105), _key105 = 0; _key105 < _len105; _key105++) {
- args[_key105] = arguments[_key105];
- }
-
- return _builder.default.apply(void 0, ["ObjectTypeCallProperty"].concat(args));
+function NumberTypeAnnotation(...args) {
+ return (0, _builder.default)("NumberTypeAnnotation", ...args);
}
-function ObjectTypeIndexer() {
- for (var _len106 = arguments.length, args = new Array(_len106), _key106 = 0; _key106 < _len106; _key106++) {
- args[_key106] = arguments[_key106];
- }
-
- return _builder.default.apply(void 0, ["ObjectTypeIndexer"].concat(args));
+function ObjectTypeAnnotation(...args) {
+ return (0, _builder.default)("ObjectTypeAnnotation", ...args);
}
-function ObjectTypeProperty() {
- for (var _len107 = arguments.length, args = new Array(_len107), _key107 = 0; _key107 < _len107; _key107++) {
- args[_key107] = arguments[_key107];
- }
-
- return _builder.default.apply(void 0, ["ObjectTypeProperty"].concat(args));
+function ObjectTypeInternalSlot(...args) {
+ return (0, _builder.default)("ObjectTypeInternalSlot", ...args);
}
-function ObjectTypeSpreadProperty() {
- for (var _len108 = arguments.length, args = new Array(_len108), _key108 = 0; _key108 < _len108; _key108++) {
- args[_key108] = arguments[_key108];
- }
-
- return _builder.default.apply(void 0, ["ObjectTypeSpreadProperty"].concat(args));
+function ObjectTypeCallProperty(...args) {
+ return (0, _builder.default)("ObjectTypeCallProperty", ...args);
}
-function OpaqueType() {
- for (var _len109 = arguments.length, args = new Array(_len109), _key109 = 0; _key109 < _len109; _key109++) {
- args[_key109] = arguments[_key109];
- }
-
- return _builder.default.apply(void 0, ["OpaqueType"].concat(args));
+function ObjectTypeIndexer(...args) {
+ return (0, _builder.default)("ObjectTypeIndexer", ...args);
}
-function QualifiedTypeIdentifier() {
- for (var _len110 = arguments.length, args = new Array(_len110), _key110 = 0; _key110 < _len110; _key110++) {
- args[_key110] = arguments[_key110];
- }
-
- return _builder.default.apply(void 0, ["QualifiedTypeIdentifier"].concat(args));
+function ObjectTypeProperty(...args) {
+ return (0, _builder.default)("ObjectTypeProperty", ...args);
}
-function StringLiteralTypeAnnotation() {
- for (var _len111 = arguments.length, args = new Array(_len111), _key111 = 0; _key111 < _len111; _key111++) {
- args[_key111] = arguments[_key111];
- }
-
- return _builder.default.apply(void 0, ["StringLiteralTypeAnnotation"].concat(args));
+function ObjectTypeSpreadProperty(...args) {
+ return (0, _builder.default)("ObjectTypeSpreadProperty", ...args);
}
-function StringTypeAnnotation() {
- for (var _len112 = arguments.length, args = new Array(_len112), _key112 = 0; _key112 < _len112; _key112++) {
- args[_key112] = arguments[_key112];
- }
-
- return _builder.default.apply(void 0, ["StringTypeAnnotation"].concat(args));
+function OpaqueType(...args) {
+ return (0, _builder.default)("OpaqueType", ...args);
}
-function ThisTypeAnnotation() {
- for (var _len113 = arguments.length, args = new Array(_len113), _key113 = 0; _key113 < _len113; _key113++) {
- args[_key113] = arguments[_key113];
- }
-
- return _builder.default.apply(void 0, ["ThisTypeAnnotation"].concat(args));
+function QualifiedTypeIdentifier(...args) {
+ return (0, _builder.default)("QualifiedTypeIdentifier", ...args);
}
-function TupleTypeAnnotation() {
- for (var _len114 = arguments.length, args = new Array(_len114), _key114 = 0; _key114 < _len114; _key114++) {
- args[_key114] = arguments[_key114];
- }
-
- return _builder.default.apply(void 0, ["TupleTypeAnnotation"].concat(args));
+function StringLiteralTypeAnnotation(...args) {
+ return (0, _builder.default)("StringLiteralTypeAnnotation", ...args);
}
-function TypeofTypeAnnotation() {
- for (var _len115 = arguments.length, args = new Array(_len115), _key115 = 0; _key115 < _len115; _key115++) {
- args[_key115] = arguments[_key115];
- }
-
- return _builder.default.apply(void 0, ["TypeofTypeAnnotation"].concat(args));
+function StringTypeAnnotation(...args) {
+ return (0, _builder.default)("StringTypeAnnotation", ...args);
}
-function TypeAlias() {
- for (var _len116 = arguments.length, args = new Array(_len116), _key116 = 0; _key116 < _len116; _key116++) {
- args[_key116] = arguments[_key116];
- }
-
- return _builder.default.apply(void 0, ["TypeAlias"].concat(args));
+function ThisTypeAnnotation(...args) {
+ return (0, _builder.default)("ThisTypeAnnotation", ...args);
}
-function TypeAnnotation() {
- for (var _len117 = arguments.length, args = new Array(_len117), _key117 = 0; _key117 < _len117; _key117++) {
- args[_key117] = arguments[_key117];
- }
-
- return _builder.default.apply(void 0, ["TypeAnnotation"].concat(args));
+function TupleTypeAnnotation(...args) {
+ return (0, _builder.default)("TupleTypeAnnotation", ...args);
}
-function TypeCastExpression() {
- for (var _len118 = arguments.length, args = new Array(_len118), _key118 = 0; _key118 < _len118; _key118++) {
- args[_key118] = arguments[_key118];
- }
-
- return _builder.default.apply(void 0, ["TypeCastExpression"].concat(args));
+function TypeofTypeAnnotation(...args) {
+ return (0, _builder.default)("TypeofTypeAnnotation", ...args);
}
-function TypeParameter() {
- for (var _len119 = arguments.length, args = new Array(_len119), _key119 = 0; _key119 < _len119; _key119++) {
- args[_key119] = arguments[_key119];
- }
-
- return _builder.default.apply(void 0, ["TypeParameter"].concat(args));
+function TypeAlias(...args) {
+ return (0, _builder.default)("TypeAlias", ...args);
}
-function TypeParameterDeclaration() {
- for (var _len120 = arguments.length, args = new Array(_len120), _key120 = 0; _key120 < _len120; _key120++) {
- args[_key120] = arguments[_key120];
- }
-
- return _builder.default.apply(void 0, ["TypeParameterDeclaration"].concat(args));
+function TypeAnnotation(...args) {
+ return (0, _builder.default)("TypeAnnotation", ...args);
}
-function TypeParameterInstantiation() {
- for (var _len121 = arguments.length, args = new Array(_len121), _key121 = 0; _key121 < _len121; _key121++) {
- args[_key121] = arguments[_key121];
- }
-
- return _builder.default.apply(void 0, ["TypeParameterInstantiation"].concat(args));
+function TypeCastExpression(...args) {
+ return (0, _builder.default)("TypeCastExpression", ...args);
}
-function UnionTypeAnnotation() {
- for (var _len122 = arguments.length, args = new Array(_len122), _key122 = 0; _key122 < _len122; _key122++) {
- args[_key122] = arguments[_key122];
- }
-
- return _builder.default.apply(void 0, ["UnionTypeAnnotation"].concat(args));
+function TypeParameter(...args) {
+ return (0, _builder.default)("TypeParameter", ...args);
}
-function VoidTypeAnnotation() {
- for (var _len123 = arguments.length, args = new Array(_len123), _key123 = 0; _key123 < _len123; _key123++) {
- args[_key123] = arguments[_key123];
- }
-
- return _builder.default.apply(void 0, ["VoidTypeAnnotation"].concat(args));
+function TypeParameterDeclaration(...args) {
+ return (0, _builder.default)("TypeParameterDeclaration", ...args);
}
-function JSXAttribute() {
- for (var _len124 = arguments.length, args = new Array(_len124), _key124 = 0; _key124 < _len124; _key124++) {
- args[_key124] = arguments[_key124];
- }
-
- return _builder.default.apply(void 0, ["JSXAttribute"].concat(args));
+function TypeParameterInstantiation(...args) {
+ return (0, _builder.default)("TypeParameterInstantiation", ...args);
}
-function JSXClosingElement() {
- for (var _len125 = arguments.length, args = new Array(_len125), _key125 = 0; _key125 < _len125; _key125++) {
- args[_key125] = arguments[_key125];
- }
-
- return _builder.default.apply(void 0, ["JSXClosingElement"].concat(args));
+function UnionTypeAnnotation(...args) {
+ return (0, _builder.default)("UnionTypeAnnotation", ...args);
}
-function JSXElement() {
- for (var _len126 = arguments.length, args = new Array(_len126), _key126 = 0; _key126 < _len126; _key126++) {
- args[_key126] = arguments[_key126];
- }
-
- return _builder.default.apply(void 0, ["JSXElement"].concat(args));
+function Variance(...args) {
+ return (0, _builder.default)("Variance", ...args);
}
-function JSXEmptyExpression() {
- for (var _len127 = arguments.length, args = new Array(_len127), _key127 = 0; _key127 < _len127; _key127++) {
- args[_key127] = arguments[_key127];
- }
-
- return _builder.default.apply(void 0, ["JSXEmptyExpression"].concat(args));
+function VoidTypeAnnotation(...args) {
+ return (0, _builder.default)("VoidTypeAnnotation", ...args);
}
-function JSXExpressionContainer() {
- for (var _len128 = arguments.length, args = new Array(_len128), _key128 = 0; _key128 < _len128; _key128++) {
- args[_key128] = arguments[_key128];
- }
-
- return _builder.default.apply(void 0, ["JSXExpressionContainer"].concat(args));
+function JSXAttribute(...args) {
+ return (0, _builder.default)("JSXAttribute", ...args);
}
-function JSXSpreadChild() {
- for (var _len129 = arguments.length, args = new Array(_len129), _key129 = 0; _key129 < _len129; _key129++) {
- args[_key129] = arguments[_key129];
- }
-
- return _builder.default.apply(void 0, ["JSXSpreadChild"].concat(args));
+function JSXClosingElement(...args) {
+ return (0, _builder.default)("JSXClosingElement", ...args);
}
-function JSXIdentifier() {
- for (var _len130 = arguments.length, args = new Array(_len130), _key130 = 0; _key130 < _len130; _key130++) {
- args[_key130] = arguments[_key130];
- }
-
- return _builder.default.apply(void 0, ["JSXIdentifier"].concat(args));
+function JSXElement(...args) {
+ return (0, _builder.default)("JSXElement", ...args);
}
-function JSXMemberExpression() {
- for (var _len131 = arguments.length, args = new Array(_len131), _key131 = 0; _key131 < _len131; _key131++) {
- args[_key131] = arguments[_key131];
- }
-
- return _builder.default.apply(void 0, ["JSXMemberExpression"].concat(args));
+function JSXEmptyExpression(...args) {
+ return (0, _builder.default)("JSXEmptyExpression", ...args);
}
-function JSXNamespacedName() {
- for (var _len132 = arguments.length, args = new Array(_len132), _key132 = 0; _key132 < _len132; _key132++) {
- args[_key132] = arguments[_key132];
- }
-
- return _builder.default.apply(void 0, ["JSXNamespacedName"].concat(args));
+function JSXExpressionContainer(...args) {
+ return (0, _builder.default)("JSXExpressionContainer", ...args);
}
-function JSXOpeningElement() {
- for (var _len133 = arguments.length, args = new Array(_len133), _key133 = 0; _key133 < _len133; _key133++) {
- args[_key133] = arguments[_key133];
- }
-
- return _builder.default.apply(void 0, ["JSXOpeningElement"].concat(args));
+function JSXSpreadChild(...args) {
+ return (0, _builder.default)("JSXSpreadChild", ...args);
}
-function JSXSpreadAttribute() {
- for (var _len134 = arguments.length, args = new Array(_len134), _key134 = 0; _key134 < _len134; _key134++) {
- args[_key134] = arguments[_key134];
- }
-
- return _builder.default.apply(void 0, ["JSXSpreadAttribute"].concat(args));
+function JSXIdentifier(...args) {
+ return (0, _builder.default)("JSXIdentifier", ...args);
}
-function JSXText() {
- for (var _len135 = arguments.length, args = new Array(_len135), _key135 = 0; _key135 < _len135; _key135++) {
- args[_key135] = arguments[_key135];
- }
-
- return _builder.default.apply(void 0, ["JSXText"].concat(args));
+function JSXMemberExpression(...args) {
+ return (0, _builder.default)("JSXMemberExpression", ...args);
}
-function JSXFragment() {
- for (var _len136 = arguments.length, args = new Array(_len136), _key136 = 0; _key136 < _len136; _key136++) {
- args[_key136] = arguments[_key136];
- }
-
- return _builder.default.apply(void 0, ["JSXFragment"].concat(args));
+function JSXNamespacedName(...args) {
+ return (0, _builder.default)("JSXNamespacedName", ...args);
}
-function JSXOpeningFragment() {
- for (var _len137 = arguments.length, args = new Array(_len137), _key137 = 0; _key137 < _len137; _key137++) {
- args[_key137] = arguments[_key137];
- }
-
- return _builder.default.apply(void 0, ["JSXOpeningFragment"].concat(args));
+function JSXOpeningElement(...args) {
+ return (0, _builder.default)("JSXOpeningElement", ...args);
}
-function JSXClosingFragment() {
- for (var _len138 = arguments.length, args = new Array(_len138), _key138 = 0; _key138 < _len138; _key138++) {
- args[_key138] = arguments[_key138];
- }
-
- return _builder.default.apply(void 0, ["JSXClosingFragment"].concat(args));
+function JSXSpreadAttribute(...args) {
+ return (0, _builder.default)("JSXSpreadAttribute", ...args);
}
-function Noop() {
- for (var _len139 = arguments.length, args = new Array(_len139), _key139 = 0; _key139 < _len139; _key139++) {
- args[_key139] = arguments[_key139];
- }
-
- return _builder.default.apply(void 0, ["Noop"].concat(args));
+function JSXText(...args) {
+ return (0, _builder.default)("JSXText", ...args);
}
-function ParenthesizedExpression() {
- for (var _len140 = arguments.length, args = new Array(_len140), _key140 = 0; _key140 < _len140; _key140++) {
- args[_key140] = arguments[_key140];
- }
-
- return _builder.default.apply(void 0, ["ParenthesizedExpression"].concat(args));
+function JSXFragment(...args) {
+ return (0, _builder.default)("JSXFragment", ...args);
}
-function AwaitExpression() {
- for (var _len141 = arguments.length, args = new Array(_len141), _key141 = 0; _key141 < _len141; _key141++) {
- args[_key141] = arguments[_key141];
- }
-
- return _builder.default.apply(void 0, ["AwaitExpression"].concat(args));
+function JSXOpeningFragment(...args) {
+ return (0, _builder.default)("JSXOpeningFragment", ...args);
}
-function BindExpression() {
- for (var _len142 = arguments.length, args = new Array(_len142), _key142 = 0; _key142 < _len142; _key142++) {
- args[_key142] = arguments[_key142];
- }
-
- return _builder.default.apply(void 0, ["BindExpression"].concat(args));
+function JSXClosingFragment(...args) {
+ return (0, _builder.default)("JSXClosingFragment", ...args);
}
-function ClassProperty() {
- for (var _len143 = arguments.length, args = new Array(_len143), _key143 = 0; _key143 < _len143; _key143++) {
- args[_key143] = arguments[_key143];
- }
-
- return _builder.default.apply(void 0, ["ClassProperty"].concat(args));
+function Noop(...args) {
+ return (0, _builder.default)("Noop", ...args);
}
-function Import() {
- for (var _len144 = arguments.length, args = new Array(_len144), _key144 = 0; _key144 < _len144; _key144++) {
- args[_key144] = arguments[_key144];
- }
-
- return _builder.default.apply(void 0, ["Import"].concat(args));
+function ParenthesizedExpression(...args) {
+ return (0, _builder.default)("ParenthesizedExpression", ...args);
}
-function Decorator() {
- for (var _len145 = arguments.length, args = new Array(_len145), _key145 = 0; _key145 < _len145; _key145++) {
- args[_key145] = arguments[_key145];
- }
-
- return _builder.default.apply(void 0, ["Decorator"].concat(args));
+function AwaitExpression(...args) {
+ return (0, _builder.default)("AwaitExpression", ...args);
}
-function DoExpression() {
- for (var _len146 = arguments.length, args = new Array(_len146), _key146 = 0; _key146 < _len146; _key146++) {
- args[_key146] = arguments[_key146];
- }
-
- return _builder.default.apply(void 0, ["DoExpression"].concat(args));
+function BindExpression(...args) {
+ return (0, _builder.default)("BindExpression", ...args);
}
-function ExportDefaultSpecifier() {
- for (var _len147 = arguments.length, args = new Array(_len147), _key147 = 0; _key147 < _len147; _key147++) {
- args[_key147] = arguments[_key147];
- }
-
- return _builder.default.apply(void 0, ["ExportDefaultSpecifier"].concat(args));
+function ClassProperty(...args) {
+ return (0, _builder.default)("ClassProperty", ...args);
}
-function ExportNamespaceSpecifier() {
- for (var _len148 = arguments.length, args = new Array(_len148), _key148 = 0; _key148 < _len148; _key148++) {
- args[_key148] = arguments[_key148];
- }
-
- return _builder.default.apply(void 0, ["ExportNamespaceSpecifier"].concat(args));
+function OptionalMemberExpression(...args) {
+ return (0, _builder.default)("OptionalMemberExpression", ...args);
}
-function TSParameterProperty() {
- for (var _len149 = arguments.length, args = new Array(_len149), _key149 = 0; _key149 < _len149; _key149++) {
- args[_key149] = arguments[_key149];
- }
-
- return _builder.default.apply(void 0, ["TSParameterProperty"].concat(args));
+function PipelineTopicExpression(...args) {
+ return (0, _builder.default)("PipelineTopicExpression", ...args);
}
-function TSDeclareFunction() {
- for (var _len150 = arguments.length, args = new Array(_len150), _key150 = 0; _key150 < _len150; _key150++) {
- args[_key150] = arguments[_key150];
- }
-
- return _builder.default.apply(void 0, ["TSDeclareFunction"].concat(args));
+function PipelineBareFunction(...args) {
+ return (0, _builder.default)("PipelineBareFunction", ...args);
}
-function TSDeclareMethod() {
- for (var _len151 = arguments.length, args = new Array(_len151), _key151 = 0; _key151 < _len151; _key151++) {
- args[_key151] = arguments[_key151];
- }
-
- return _builder.default.apply(void 0, ["TSDeclareMethod"].concat(args));
+function PipelinePrimaryTopicReference(...args) {
+ return (0, _builder.default)("PipelinePrimaryTopicReference", ...args);
}
-function TSQualifiedName() {
- for (var _len152 = arguments.length, args = new Array(_len152), _key152 = 0; _key152 < _len152; _key152++) {
- args[_key152] = arguments[_key152];
- }
-
- return _builder.default.apply(void 0, ["TSQualifiedName"].concat(args));
+function OptionalCallExpression(...args) {
+ return (0, _builder.default)("OptionalCallExpression", ...args);
}
-function TSCallSignatureDeclaration() {
- for (var _len153 = arguments.length, args = new Array(_len153), _key153 = 0; _key153 < _len153; _key153++) {
- args[_key153] = arguments[_key153];
- }
-
- return _builder.default.apply(void 0, ["TSCallSignatureDeclaration"].concat(args));
+function ClassPrivateProperty(...args) {
+ return (0, _builder.default)("ClassPrivateProperty", ...args);
}
-function TSConstructSignatureDeclaration() {
- for (var _len154 = arguments.length, args = new Array(_len154), _key154 = 0; _key154 < _len154; _key154++) {
- args[_key154] = arguments[_key154];
- }
-
- return _builder.default.apply(void 0, ["TSConstructSignatureDeclaration"].concat(args));
+function ClassPrivateMethod(...args) {
+ return (0, _builder.default)("ClassPrivateMethod", ...args);
}
-function TSPropertySignature() {
- for (var _len155 = arguments.length, args = new Array(_len155), _key155 = 0; _key155 < _len155; _key155++) {
- args[_key155] = arguments[_key155];
- }
-
- return _builder.default.apply(void 0, ["TSPropertySignature"].concat(args));
+function Import(...args) {
+ return (0, _builder.default)("Import", ...args);
}
-function TSMethodSignature() {
- for (var _len156 = arguments.length, args = new Array(_len156), _key156 = 0; _key156 < _len156; _key156++) {
- args[_key156] = arguments[_key156];
- }
-
- return _builder.default.apply(void 0, ["TSMethodSignature"].concat(args));
+function Decorator(...args) {
+ return (0, _builder.default)("Decorator", ...args);
}
-function TSIndexSignature() {
- for (var _len157 = arguments.length, args = new Array(_len157), _key157 = 0; _key157 < _len157; _key157++) {
- args[_key157] = arguments[_key157];
- }
-
- return _builder.default.apply(void 0, ["TSIndexSignature"].concat(args));
+function DoExpression(...args) {
+ return (0, _builder.default)("DoExpression", ...args);
}
-function TSAnyKeyword() {
- for (var _len158 = arguments.length, args = new Array(_len158), _key158 = 0; _key158 < _len158; _key158++) {
- args[_key158] = arguments[_key158];
- }
-
- return _builder.default.apply(void 0, ["TSAnyKeyword"].concat(args));
+function ExportDefaultSpecifier(...args) {
+ return (0, _builder.default)("ExportDefaultSpecifier", ...args);
}
-function TSNumberKeyword() {
- for (var _len159 = arguments.length, args = new Array(_len159), _key159 = 0; _key159 < _len159; _key159++) {
- args[_key159] = arguments[_key159];
- }
-
- return _builder.default.apply(void 0, ["TSNumberKeyword"].concat(args));
+function ExportNamespaceSpecifier(...args) {
+ return (0, _builder.default)("ExportNamespaceSpecifier", ...args);
}
-function TSObjectKeyword() {
- for (var _len160 = arguments.length, args = new Array(_len160), _key160 = 0; _key160 < _len160; _key160++) {
- args[_key160] = arguments[_key160];
- }
-
- return _builder.default.apply(void 0, ["TSObjectKeyword"].concat(args));
+function PrivateName(...args) {
+ return (0, _builder.default)("PrivateName", ...args);
}
-function TSBooleanKeyword() {
- for (var _len161 = arguments.length, args = new Array(_len161), _key161 = 0; _key161 < _len161; _key161++) {
- args[_key161] = arguments[_key161];
- }
-
- return _builder.default.apply(void 0, ["TSBooleanKeyword"].concat(args));
+function BigIntLiteral(...args) {
+ return (0, _builder.default)("BigIntLiteral", ...args);
}
-function TSStringKeyword() {
- for (var _len162 = arguments.length, args = new Array(_len162), _key162 = 0; _key162 < _len162; _key162++) {
- args[_key162] = arguments[_key162];
- }
-
- return _builder.default.apply(void 0, ["TSStringKeyword"].concat(args));
+function TSParameterProperty(...args) {
+ return (0, _builder.default)("TSParameterProperty", ...args);
}
-function TSSymbolKeyword() {
- for (var _len163 = arguments.length, args = new Array(_len163), _key163 = 0; _key163 < _len163; _key163++) {
- args[_key163] = arguments[_key163];
- }
-
- return _builder.default.apply(void 0, ["TSSymbolKeyword"].concat(args));
+function TSDeclareFunction(...args) {
+ return (0, _builder.default)("TSDeclareFunction", ...args);
}
-function TSVoidKeyword() {
- for (var _len164 = arguments.length, args = new Array(_len164), _key164 = 0; _key164 < _len164; _key164++) {
- args[_key164] = arguments[_key164];
- }
-
- return _builder.default.apply(void 0, ["TSVoidKeyword"].concat(args));
+function TSDeclareMethod(...args) {
+ return (0, _builder.default)("TSDeclareMethod", ...args);
}
-function TSUndefinedKeyword() {
- for (var _len165 = arguments.length, args = new Array(_len165), _key165 = 0; _key165 < _len165; _key165++) {
- args[_key165] = arguments[_key165];
- }
-
- return _builder.default.apply(void 0, ["TSUndefinedKeyword"].concat(args));
+function TSQualifiedName(...args) {
+ return (0, _builder.default)("TSQualifiedName", ...args);
}
-function TSNullKeyword() {
- for (var _len166 = arguments.length, args = new Array(_len166), _key166 = 0; _key166 < _len166; _key166++) {
- args[_key166] = arguments[_key166];
- }
-
- return _builder.default.apply(void 0, ["TSNullKeyword"].concat(args));
+function TSCallSignatureDeclaration(...args) {
+ return (0, _builder.default)("TSCallSignatureDeclaration", ...args);
}
-function TSNeverKeyword() {
- for (var _len167 = arguments.length, args = new Array(_len167), _key167 = 0; _key167 < _len167; _key167++) {
- args[_key167] = arguments[_key167];
- }
-
- return _builder.default.apply(void 0, ["TSNeverKeyword"].concat(args));
+function TSConstructSignatureDeclaration(...args) {
+ return (0, _builder.default)("TSConstructSignatureDeclaration", ...args);
}
-function TSThisType() {
- for (var _len168 = arguments.length, args = new Array(_len168), _key168 = 0; _key168 < _len168; _key168++) {
- args[_key168] = arguments[_key168];
- }
-
- return _builder.default.apply(void 0, ["TSThisType"].concat(args));
+function TSPropertySignature(...args) {
+ return (0, _builder.default)("TSPropertySignature", ...args);
}
-function TSFunctionType() {
- for (var _len169 = arguments.length, args = new Array(_len169), _key169 = 0; _key169 < _len169; _key169++) {
- args[_key169] = arguments[_key169];
- }
-
- return _builder.default.apply(void 0, ["TSFunctionType"].concat(args));
+function TSMethodSignature(...args) {
+ return (0, _builder.default)("TSMethodSignature", ...args);
}
-function TSConstructorType() {
- for (var _len170 = arguments.length, args = new Array(_len170), _key170 = 0; _key170 < _len170; _key170++) {
- args[_key170] = arguments[_key170];
- }
-
- return _builder.default.apply(void 0, ["TSConstructorType"].concat(args));
+function TSIndexSignature(...args) {
+ return (0, _builder.default)("TSIndexSignature", ...args);
}
-function TSTypeReference() {
- for (var _len171 = arguments.length, args = new Array(_len171), _key171 = 0; _key171 < _len171; _key171++) {
- args[_key171] = arguments[_key171];
- }
-
- return _builder.default.apply(void 0, ["TSTypeReference"].concat(args));
+function TSAnyKeyword(...args) {
+ return (0, _builder.default)("TSAnyKeyword", ...args);
}
-function TSTypePredicate() {
- for (var _len172 = arguments.length, args = new Array(_len172), _key172 = 0; _key172 < _len172; _key172++) {
- args[_key172] = arguments[_key172];
- }
-
- return _builder.default.apply(void 0, ["TSTypePredicate"].concat(args));
+function TSUnknownKeyword(...args) {
+ return (0, _builder.default)("TSUnknownKeyword", ...args);
}
-function TSTypeQuery() {
- for (var _len173 = arguments.length, args = new Array(_len173), _key173 = 0; _key173 < _len173; _key173++) {
- args[_key173] = arguments[_key173];
- }
-
- return _builder.default.apply(void 0, ["TSTypeQuery"].concat(args));
+function TSNumberKeyword(...args) {
+ return (0, _builder.default)("TSNumberKeyword", ...args);
}
-function TSTypeLiteral() {
- for (var _len174 = arguments.length, args = new Array(_len174), _key174 = 0; _key174 < _len174; _key174++) {
- args[_key174] = arguments[_key174];
- }
-
- return _builder.default.apply(void 0, ["TSTypeLiteral"].concat(args));
+function TSObjectKeyword(...args) {
+ return (0, _builder.default)("TSObjectKeyword", ...args);
}
-function TSArrayType() {
- for (var _len175 = arguments.length, args = new Array(_len175), _key175 = 0; _key175 < _len175; _key175++) {
- args[_key175] = arguments[_key175];
- }
-
- return _builder.default.apply(void 0, ["TSArrayType"].concat(args));
+function TSBooleanKeyword(...args) {
+ return (0, _builder.default)("TSBooleanKeyword", ...args);
}
-function TSTupleType() {
- for (var _len176 = arguments.length, args = new Array(_len176), _key176 = 0; _key176 < _len176; _key176++) {
- args[_key176] = arguments[_key176];
- }
-
- return _builder.default.apply(void 0, ["TSTupleType"].concat(args));
+function TSStringKeyword(...args) {
+ return (0, _builder.default)("TSStringKeyword", ...args);
}
-function TSUnionType() {
- for (var _len177 = arguments.length, args = new Array(_len177), _key177 = 0; _key177 < _len177; _key177++) {
- args[_key177] = arguments[_key177];
- }
-
- return _builder.default.apply(void 0, ["TSUnionType"].concat(args));
+function TSSymbolKeyword(...args) {
+ return (0, _builder.default)("TSSymbolKeyword", ...args);
}
-function TSIntersectionType() {
- for (var _len178 = arguments.length, args = new Array(_len178), _key178 = 0; _key178 < _len178; _key178++) {
- args[_key178] = arguments[_key178];
- }
-
- return _builder.default.apply(void 0, ["TSIntersectionType"].concat(args));
+function TSVoidKeyword(...args) {
+ return (0, _builder.default)("TSVoidKeyword", ...args);
}
-function TSParenthesizedType() {
- for (var _len179 = arguments.length, args = new Array(_len179), _key179 = 0; _key179 < _len179; _key179++) {
- args[_key179] = arguments[_key179];
- }
-
- return _builder.default.apply(void 0, ["TSParenthesizedType"].concat(args));
+function TSUndefinedKeyword(...args) {
+ return (0, _builder.default)("TSUndefinedKeyword", ...args);
}
-function TSTypeOperator() {
- for (var _len180 = arguments.length, args = new Array(_len180), _key180 = 0; _key180 < _len180; _key180++) {
- args[_key180] = arguments[_key180];
- }
-
- return _builder.default.apply(void 0, ["TSTypeOperator"].concat(args));
+function TSNullKeyword(...args) {
+ return (0, _builder.default)("TSNullKeyword", ...args);
}
-function TSIndexedAccessType() {
- for (var _len181 = arguments.length, args = new Array(_len181), _key181 = 0; _key181 < _len181; _key181++) {
- args[_key181] = arguments[_key181];
- }
-
- return _builder.default.apply(void 0, ["TSIndexedAccessType"].concat(args));
+function TSNeverKeyword(...args) {
+ return (0, _builder.default)("TSNeverKeyword", ...args);
}
-function TSMappedType() {
- for (var _len182 = arguments.length, args = new Array(_len182), _key182 = 0; _key182 < _len182; _key182++) {
- args[_key182] = arguments[_key182];
- }
-
- return _builder.default.apply(void 0, ["TSMappedType"].concat(args));
+function TSThisType(...args) {
+ return (0, _builder.default)("TSThisType", ...args);
}
-function TSLiteralType() {
- for (var _len183 = arguments.length, args = new Array(_len183), _key183 = 0; _key183 < _len183; _key183++) {
- args[_key183] = arguments[_key183];
- }
-
- return _builder.default.apply(void 0, ["TSLiteralType"].concat(args));
+function TSFunctionType(...args) {
+ return (0, _builder.default)("TSFunctionType", ...args);
}
-function TSExpressionWithTypeArguments() {
- for (var _len184 = arguments.length, args = new Array(_len184), _key184 = 0; _key184 < _len184; _key184++) {
- args[_key184] = arguments[_key184];
- }
+function TSConstructorType(...args) {
+ return (0, _builder.default)("TSConstructorType", ...args);
+}
- return _builder.default.apply(void 0, ["TSExpressionWithTypeArguments"].concat(args));
+function TSTypeReference(...args) {
+ return (0, _builder.default)("TSTypeReference", ...args);
}
-function TSInterfaceDeclaration() {
- for (var _len185 = arguments.length, args = new Array(_len185), _key185 = 0; _key185 < _len185; _key185++) {
- args[_key185] = arguments[_key185];
- }
+function TSTypePredicate(...args) {
+ return (0, _builder.default)("TSTypePredicate", ...args);
+}
- return _builder.default.apply(void 0, ["TSInterfaceDeclaration"].concat(args));
+function TSTypeQuery(...args) {
+ return (0, _builder.default)("TSTypeQuery", ...args);
}
-function TSInterfaceBody() {
- for (var _len186 = arguments.length, args = new Array(_len186), _key186 = 0; _key186 < _len186; _key186++) {
- args[_key186] = arguments[_key186];
- }
+function TSTypeLiteral(...args) {
+ return (0, _builder.default)("TSTypeLiteral", ...args);
+}
- return _builder.default.apply(void 0, ["TSInterfaceBody"].concat(args));
+function TSArrayType(...args) {
+ return (0, _builder.default)("TSArrayType", ...args);
}
-function TSTypeAliasDeclaration() {
- for (var _len187 = arguments.length, args = new Array(_len187), _key187 = 0; _key187 < _len187; _key187++) {
- args[_key187] = arguments[_key187];
- }
+function TSTupleType(...args) {
+ return (0, _builder.default)("TSTupleType", ...args);
+}
- return _builder.default.apply(void 0, ["TSTypeAliasDeclaration"].concat(args));
+function TSOptionalType(...args) {
+ return (0, _builder.default)("TSOptionalType", ...args);
}
-function TSAsExpression() {
- for (var _len188 = arguments.length, args = new Array(_len188), _key188 = 0; _key188 < _len188; _key188++) {
- args[_key188] = arguments[_key188];
- }
+function TSRestType(...args) {
+ return (0, _builder.default)("TSRestType", ...args);
+}
- return _builder.default.apply(void 0, ["TSAsExpression"].concat(args));
+function TSUnionType(...args) {
+ return (0, _builder.default)("TSUnionType", ...args);
}
-function TSTypeAssertion() {
- for (var _len189 = arguments.length, args = new Array(_len189), _key189 = 0; _key189 < _len189; _key189++) {
- args[_key189] = arguments[_key189];
- }
+function TSIntersectionType(...args) {
+ return (0, _builder.default)("TSIntersectionType", ...args);
+}
- return _builder.default.apply(void 0, ["TSTypeAssertion"].concat(args));
+function TSConditionalType(...args) {
+ return (0, _builder.default)("TSConditionalType", ...args);
}
-function TSEnumDeclaration() {
- for (var _len190 = arguments.length, args = new Array(_len190), _key190 = 0; _key190 < _len190; _key190++) {
- args[_key190] = arguments[_key190];
- }
+function TSInferType(...args) {
+ return (0, _builder.default)("TSInferType", ...args);
+}
- return _builder.default.apply(void 0, ["TSEnumDeclaration"].concat(args));
+function TSParenthesizedType(...args) {
+ return (0, _builder.default)("TSParenthesizedType", ...args);
}
-function TSEnumMember() {
- for (var _len191 = arguments.length, args = new Array(_len191), _key191 = 0; _key191 < _len191; _key191++) {
- args[_key191] = arguments[_key191];
- }
+function TSTypeOperator(...args) {
+ return (0, _builder.default)("TSTypeOperator", ...args);
+}
- return _builder.default.apply(void 0, ["TSEnumMember"].concat(args));
+function TSIndexedAccessType(...args) {
+ return (0, _builder.default)("TSIndexedAccessType", ...args);
}
-function TSModuleDeclaration() {
- for (var _len192 = arguments.length, args = new Array(_len192), _key192 = 0; _key192 < _len192; _key192++) {
- args[_key192] = arguments[_key192];
- }
+function TSMappedType(...args) {
+ return (0, _builder.default)("TSMappedType", ...args);
+}
- return _builder.default.apply(void 0, ["TSModuleDeclaration"].concat(args));
+function TSLiteralType(...args) {
+ return (0, _builder.default)("TSLiteralType", ...args);
}
-function TSModuleBlock() {
- for (var _len193 = arguments.length, args = new Array(_len193), _key193 = 0; _key193 < _len193; _key193++) {
- args[_key193] = arguments[_key193];
- }
+function TSExpressionWithTypeArguments(...args) {
+ return (0, _builder.default)("TSExpressionWithTypeArguments", ...args);
+}
- return _builder.default.apply(void 0, ["TSModuleBlock"].concat(args));
+function TSInterfaceDeclaration(...args) {
+ return (0, _builder.default)("TSInterfaceDeclaration", ...args);
}
-function TSImportEqualsDeclaration() {
- for (var _len194 = arguments.length, args = new Array(_len194), _key194 = 0; _key194 < _len194; _key194++) {
- args[_key194] = arguments[_key194];
- }
+function TSInterfaceBody(...args) {
+ return (0, _builder.default)("TSInterfaceBody", ...args);
+}
- return _builder.default.apply(void 0, ["TSImportEqualsDeclaration"].concat(args));
+function TSTypeAliasDeclaration(...args) {
+ return (0, _builder.default)("TSTypeAliasDeclaration", ...args);
}
-function TSExternalModuleReference() {
- for (var _len195 = arguments.length, args = new Array(_len195), _key195 = 0; _key195 < _len195; _key195++) {
- args[_key195] = arguments[_key195];
- }
+function TSAsExpression(...args) {
+ return (0, _builder.default)("TSAsExpression", ...args);
+}
- return _builder.default.apply(void 0, ["TSExternalModuleReference"].concat(args));
+function TSTypeAssertion(...args) {
+ return (0, _builder.default)("TSTypeAssertion", ...args);
}
-function TSNonNullExpression() {
- for (var _len196 = arguments.length, args = new Array(_len196), _key196 = 0; _key196 < _len196; _key196++) {
- args[_key196] = arguments[_key196];
- }
+function TSEnumDeclaration(...args) {
+ return (0, _builder.default)("TSEnumDeclaration", ...args);
+}
- return _builder.default.apply(void 0, ["TSNonNullExpression"].concat(args));
+function TSEnumMember(...args) {
+ return (0, _builder.default)("TSEnumMember", ...args);
}
-function TSExportAssignment() {
- for (var _len197 = arguments.length, args = new Array(_len197), _key197 = 0; _key197 < _len197; _key197++) {
- args[_key197] = arguments[_key197];
- }
+function TSModuleDeclaration(...args) {
+ return (0, _builder.default)("TSModuleDeclaration", ...args);
+}
- return _builder.default.apply(void 0, ["TSExportAssignment"].concat(args));
+function TSModuleBlock(...args) {
+ return (0, _builder.default)("TSModuleBlock", ...args);
}
-function TSNamespaceExportDeclaration() {
- for (var _len198 = arguments.length, args = new Array(_len198), _key198 = 0; _key198 < _len198; _key198++) {
- args[_key198] = arguments[_key198];
- }
+function TSImportType(...args) {
+ return (0, _builder.default)("TSImportType", ...args);
+}
- return _builder.default.apply(void 0, ["TSNamespaceExportDeclaration"].concat(args));
+function TSImportEqualsDeclaration(...args) {
+ return (0, _builder.default)("TSImportEqualsDeclaration", ...args);
}
-function TSTypeAnnotation() {
- for (var _len199 = arguments.length, args = new Array(_len199), _key199 = 0; _key199 < _len199; _key199++) {
- args[_key199] = arguments[_key199];
- }
+function TSExternalModuleReference(...args) {
+ return (0, _builder.default)("TSExternalModuleReference", ...args);
+}
- return _builder.default.apply(void 0, ["TSTypeAnnotation"].concat(args));
+function TSNonNullExpression(...args) {
+ return (0, _builder.default)("TSNonNullExpression", ...args);
}
-function TSTypeParameterInstantiation() {
- for (var _len200 = arguments.length, args = new Array(_len200), _key200 = 0; _key200 < _len200; _key200++) {
- args[_key200] = arguments[_key200];
- }
+function TSExportAssignment(...args) {
+ return (0, _builder.default)("TSExportAssignment", ...args);
+}
- return _builder.default.apply(void 0, ["TSTypeParameterInstantiation"].concat(args));
+function TSNamespaceExportDeclaration(...args) {
+ return (0, _builder.default)("TSNamespaceExportDeclaration", ...args);
}
-function TSTypeParameterDeclaration() {
- for (var _len201 = arguments.length, args = new Array(_len201), _key201 = 0; _key201 < _len201; _key201++) {
- args[_key201] = arguments[_key201];
- }
+function TSTypeAnnotation(...args) {
+ return (0, _builder.default)("TSTypeAnnotation", ...args);
+}
- return _builder.default.apply(void 0, ["TSTypeParameterDeclaration"].concat(args));
+function TSTypeParameterInstantiation(...args) {
+ return (0, _builder.default)("TSTypeParameterInstantiation", ...args);
}
-function TSTypeParameter() {
- for (var _len202 = arguments.length, args = new Array(_len202), _key202 = 0; _key202 < _len202; _key202++) {
- args[_key202] = arguments[_key202];
- }
+function TSTypeParameterDeclaration(...args) {
+ return (0, _builder.default)("TSTypeParameterDeclaration", ...args);
+}
- return _builder.default.apply(void 0, ["TSTypeParameter"].concat(args));
+function TSTypeParameter(...args) {
+ return (0, _builder.default)("TSTypeParameter", ...args);
}
-function NumberLiteral() {
+function NumberLiteral(...args) {
console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
-
- for (var _len203 = arguments.length, args = new Array(_len203), _key203 = 0; _key203 < _len203; _key203++) {
- args[_key203] = arguments[_key203];
- }
-
- return NumberLiteral.apply(void 0, ["NumberLiteral"].concat(args));
+ return NumberLiteral("NumberLiteral", ...args);
}
-function RegexLiteral() {
+function RegexLiteral(...args) {
console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
-
- for (var _len204 = arguments.length, args = new Array(_len204), _key204 = 0; _key204 < _len204; _key204++) {
- args[_key204] = arguments[_key204];
- }
-
- return RegexLiteral.apply(void 0, ["RegexLiteral"].concat(args));
+ return RegexLiteral("RegexLiteral", ...args);
}
-function RestProperty() {
+function RestProperty(...args) {
console.trace("The node type RestProperty has been renamed to RestElement");
-
- for (var _len205 = arguments.length, args = new Array(_len205), _key205 = 0; _key205 < _len205; _key205++) {
- args[_key205] = arguments[_key205];
- }
-
- return RestProperty.apply(void 0, ["RestProperty"].concat(args));
+ return RestProperty("RestProperty", ...args);
}
-function SpreadProperty() {
+function SpreadProperty(...args) {
console.trace("The node type SpreadProperty has been renamed to SpreadElement");
-
- for (var _len206 = arguments.length, args = new Array(_len206), _key206 = 0; _key206 < _len206; _key206++) {
- args[_key206] = arguments[_key206];
- }
-
- return SpreadProperty.apply(void 0, ["SpreadProperty"].concat(args));
+ return SpreadProperty("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-eslint/node_modules/@babel/types/lib/builders/react/buildChildren.js
index 26c3068fd3..91e7cbd9ca 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/react/buildChildren.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/react/buildChildren.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = buildChildren;
var _generated = require("../../validators/generated");
@@ -10,10 +12,10 @@ var _cleanJSXElementLiteralChild = _interopRequireDefault(require("../../utils/r
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function buildChildren(node) {
- var elements = [];
+ const elements = [];
- for (var i = 0; i < node.children.length; i++) {
- var child = node.children[i];
+ for (let i = 0; i < node.children.length; i++) {
+ let child = node.children[i];
if ((0, _generated.isJSXText)(child)) {
(0, _cleanJSXElementLiteralChild.default)(child, elements);
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/clone.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/clone.js
index 2677f9023a..9595f6e25c 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/clone.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/clone.js
@@ -1,14 +1,14 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = clone;
+var _cloneNode = _interopRequireDefault(require("./cloneNode"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
function clone(node) {
- if (!node) return node;
- var newNode = {};
- Object.keys(node).forEach(function (key) {
- if (key[0] === "_") return;
- newNode[key] = node[key];
- });
- return newNode;
+ return (0, _cloneNode.default)(node, false);
} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneDeep.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneDeep.js
index 4212edd2bc..eb29c53622 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneDeep.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneDeep.js
@@ -1,24 +1,14 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = cloneDeep;
-function cloneDeep(node) {
- if (!node) return node;
- var newNode = {};
- Object.keys(node).forEach(function (key) {
- if (key[0] === "_") return;
- var val = node[key];
+var _cloneNode = _interopRequireDefault(require("./cloneNode"));
- if (val) {
- if (val.type) {
- val = cloneDeep(val);
- } else if (Array.isArray(val)) {
- val = val.map(cloneDeep);
- }
- }
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- newNode[key] = val;
- });
- return newNode;
+function cloneDeep(node) {
+ return (0, _cloneNode.default)(node);
} \ 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
new file mode 100644
index 0000000000..bcccddcf47
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneNode.js
@@ -0,0 +1,78 @@
+"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.innerCmments;
+ }
+
+ 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
index a322142942..5622af7b02 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = cloneWithoutLoc;
var _clone = _interopRequireDefault(require("./clone"));
@@ -8,7 +10,7 @@ var _clone = _interopRequireDefault(require("./clone"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function cloneWithoutLoc(node) {
- var newNode = (0, _clone.default)(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/comments/addComment.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComment.js
index bbe3c96954..ff586514e7 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComment.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComment.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = addComment;
var _addComments = _interopRequireDefault(require("./addComments"));
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComments.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComments.js
index 1f7c52931d..f3a61df713 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComments.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComments.js
@@ -1,11 +1,13 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = addComments;
function addComments(node, type, comments) {
if (!comments || !node) return node;
- var key = type + "Comments";
+ const key = `${type}Comments`;
if (node[key]) {
if (type === "leading") {
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritInnerComments.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritInnerComments.js
index 02f1ad5092..fbe59dec62 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritInnerComments.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritInnerComments.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = inheritInnerComments;
var _inherit = _interopRequireDefault(require("../utils/inherit"));
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritLeadingComments.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
index f5c213be1f..ccb02ec55b 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = inheritLeadingComments;
var _inherit = _interopRequireDefault(require("../utils/inherit"));
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritTrailingComments.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
index 81d60f7414..bce1e2d9ac 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = inheritTrailingComments;
var _inherit = _interopRequireDefault(require("../utils/inherit"));
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritsComments.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritsComments.js
index f0446776df..fd942d86cd 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritsComments.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritsComments.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = inheritsComments;
var _inheritTrailingComments = _interopRequireDefault(require("./inheritTrailingComments"));
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/removeComments.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/removeComments.js
index 30319b1c9c..fe34f1a890 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/removeComments.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/removeComments.js
@@ -1,12 +1,14 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = removeComments;
var _constants = require("../constants");
function removeComments(node) {
- _constants.COMMENT_KEYS.forEach(function (key) {
+ _constants.COMMENT_KEYS.forEach(key => {
node[key] = null;
});
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
index 20f182ed1d..6072495e20 100644
--- 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
@@ -1,87 +1,93 @@
"use strict";
-exports.__esModule = true;
-exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.JSX_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_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;
+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");
-var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
+const EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
-var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
+const BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
exports.BINARY_TYPES = BINARY_TYPES;
-var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
+const SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
-var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
+const BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
-var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
+const BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
exports.BLOCK_TYPES = BLOCK_TYPES;
-var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
+const STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
exports.STATEMENT_TYPES = STATEMENT_TYPES;
-var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
+const TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
-var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
+const COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
-var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
+const CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
-var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
+const LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
exports.LOOP_TYPES = LOOP_TYPES;
-var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
+const WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
exports.WHILE_TYPES = WHILE_TYPES;
-var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
+const EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
-var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
+const FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
exports.FOR_TYPES = FOR_TYPES;
-var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
+const FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
-var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
+const FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
exports.FUNCTION_TYPES = FUNCTION_TYPES;
-var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
+const FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
-var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
+const PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
exports.PUREISH_TYPES = PUREISH_TYPES;
-var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
+const DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
exports.DECLARATION_TYPES = DECLARATION_TYPES;
-var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
+const PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
-var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
+const LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
exports.LVAL_TYPES = LVAL_TYPES;
-var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
+const TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
-var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
+const LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
exports.LITERAL_TYPES = LITERAL_TYPES;
-var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
+const IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
-var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
+const USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
-var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
+const METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
exports.METHOD_TYPES = METHOD_TYPES;
-var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
+const OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
-var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
+const PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
exports.PROPERTY_TYPES = PROPERTY_TYPES;
-var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
+const UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
-var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
+const PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
exports.PATTERN_TYPES = PATTERN_TYPES;
-var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
+const CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
exports.CLASS_TYPES = CLASS_TYPES;
-var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
+const MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
-var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
+const EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
-var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
+const MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
-var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
+const FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
exports.FLOW_TYPES = FLOW_TYPES;
-var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
+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;
-var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
+const FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
-var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
+const FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
-var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
+const JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
exports.JSX_TYPES = JSX_TYPES;
-var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
+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;
-var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
+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
index f8eb31b9ee..a60b106fda 100644
--- 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
@@ -1,45 +1,47 @@
"use strict";
-exports.__esModule = true;
+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;
-var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
+const STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
-var FLATTENABLE_KEYS = ["body", "expressions"];
+const FLATTENABLE_KEYS = ["body", "expressions"];
exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
-var FOR_INIT_KEYS = ["left", "init"];
+const FOR_INIT_KEYS = ["left", "init"];
exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
-var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
+const COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
exports.COMMENT_KEYS = COMMENT_KEYS;
-var LOGICAL_OPERATORS = ["||", "&&", "??"];
+const LOGICAL_OPERATORS = ["||", "&&", "??"];
exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
-var UPDATE_OPERATORS = ["++", "--"];
+const UPDATE_OPERATORS = ["++", "--"];
exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
-var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
+const BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
-var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
+const EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
-var COMPARISON_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS.concat(["in", "instanceof"]);
+const COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
-var BOOLEAN_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS.concat(BOOLEAN_NUMBER_BINARY_OPERATORS);
+const BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
-var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
+const NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
-var BINARY_OPERATORS = ["+"].concat(NUMBER_BINARY_OPERATORS, BOOLEAN_BINARY_OPERATORS);
+const BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
exports.BINARY_OPERATORS = BINARY_OPERATORS;
-var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
+const BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
-var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
+const NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
-var STRING_UNARY_OPERATORS = ["typeof"];
+const STRING_UNARY_OPERATORS = ["typeof"];
exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
-var UNARY_OPERATORS = ["void", "throw"].concat(BOOLEAN_UNARY_OPERATORS, NUMBER_UNARY_OPERATORS, STRING_UNARY_OPERATORS);
+const UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
exports.UNARY_OPERATORS = UNARY_OPERATORS;
-var INHERIT_KEYS = {
+const INHERIT_KEYS = {
optional: ["typeAnnotation", "typeParameters", "returnType"],
force: ["start", "loc", "end"]
};
exports.INHERIT_KEYS = INHERIT_KEYS;
-var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
+const BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
-var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
+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-eslint/node_modules/@babel/types/lib/converters/ensureBlock.js
index da69103d9e..2836b36578 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/ensureBlock.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/ensureBlock.js
@@ -1,16 +1,14 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = ensureBlock;
var _toBlock = _interopRequireDefault(require("./toBlock"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function ensureBlock(node, key) {
- if (key === void 0) {
- key = "body";
- }
-
+function ensureBlock(node, key = "body") {
return node[key] = (0, _toBlock.default)(node[key], node);
} \ 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
index 0e07cbe18f..2d05485b80 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = gatherSequenceExpressions;
var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers"));
@@ -9,43 +11,31 @@ 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) {
- var exprs = [];
- var ensureLastUndefined = true;
-
- for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
-
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
+ const exprs = [];
+ let ensureLastUndefined = true;
- var _node = _ref;
+ 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;
- var _arr = _node.declarations;
+ 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 (var _i2 = 0; _i2 < _arr.length; _i2++) {
- var declar = _arr[_i2];
- var bindings = (0, _getBindingIdentifiers.default)(declar);
+ for (const declar of node.declarations) {
+ const bindings = (0, _getBindingIdentifiers.default)(declar);
- for (var key in bindings) {
+ for (const key in bindings) {
declars.push({
- kind: _node.kind,
- id: bindings[key]
+ kind: node.kind,
+ id: (0, _cloneNode.default)(bindings[key])
});
}
@@ -55,16 +45,16 @@ function gatherSequenceExpressions(nodes, scope, declars) {
}
ensureLastUndefined = true;
- } else if ((0, _generated.isIfStatement)(_node)) {
- var consequent = _node.consequent ? gatherSequenceExpressions([_node.consequent], scope, declars) : scope.buildUndefinedNode();
- var alternate = _node.alternate ? gatherSequenceExpressions([_node.alternate], scope, declars) : scope.buildUndefinedNode();
+ } 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)) {
- var body = gatherSequenceExpressions(_node.body, scope, declars);
+ 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)) {
+ } else if ((0, _generated.isEmptyStatement)(node)) {
ensureLastUndefined = true;
} else {
return;
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
index 3bda98aa83..b9d165b6fd 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = toBindingIdentifierName;
var _toIdentifier = _interopRequireDefault(require("./toIdentifier"));
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBlock.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBlock.js
index 542ff55210..19886833fa 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBlock.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBlock.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = toBlock;
var _generated = require("../validators/generated");
@@ -12,7 +14,7 @@ function toBlock(node, parent) {
return node;
}
- var blockNodes = [];
+ let blockNodes = [];
if ((0, _generated.isEmptyStatement)(node)) {
blockNodes = [];
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toComputedKey.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toComputedKey.js
index 71bd8e4a66..31e6770f6f 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toComputedKey.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toComputedKey.js
@@ -1,17 +1,15 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = toComputedKey;
var _generated = require("../validators/generated");
var _generated2 = require("../builders/generated");
-function toComputedKey(node, key) {
- if (key === void 0) {
- key = node.key || node.property;
- }
-
+function toComputedKey(node, key = node.key || node.property) {
if (!node.computed && (0, _generated.isIdentifier)(key)) key = (0, _generated2.stringLiteral)(key.name);
return key;
} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toExpression.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toExpression.js
index dfb5bb87b8..6e58b0de4d 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toExpression.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toExpression.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = toExpression;
var _generated = require("../validators/generated");
@@ -21,7 +23,7 @@ function toExpression(node) {
}
if (!(0, _generated.isExpression)(node)) {
- throw new Error("cannot turn " + node.type + " to an expression");
+ throw new Error(`cannot turn ${node.type} to an expression`);
}
return node;
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toIdentifier.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toIdentifier.js
index d929872af5..e55db41fc4 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toIdentifier.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toIdentifier.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = toIdentifier;
var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier"));
@@ -16,7 +18,7 @@ function toIdentifier(name) {
});
if (!(0, _isValidIdentifier.default)(name)) {
- name = "_" + name;
+ name = `_${name}`;
}
return name || "_";
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toKeyAlias.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toKeyAlias.js
index 88aa30ed97..c48fd0e7f3 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toKeyAlias.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toKeyAlias.js
@@ -1,22 +1,20 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = toKeyAlias;
var _generated = require("../validators/generated");
-var _cloneDeep = _interopRequireDefault(require("../clone/cloneDeep"));
+var _cloneNode = _interopRequireDefault(require("../clone/cloneNode"));
var _removePropertiesDeep = _interopRequireDefault(require("../modifications/removePropertiesDeep"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function toKeyAlias(node, key) {
- if (key === void 0) {
- key = node.key;
- }
-
- var alias;
+function toKeyAlias(node, key = node.key) {
+ let alias;
if (node.kind === "method") {
return toKeyAlias.increment() + "";
@@ -25,15 +23,15 @@ function toKeyAlias(node, key) {
} else if ((0, _generated.isStringLiteral)(key)) {
alias = JSON.stringify(key.value);
} else {
- alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneDeep.default)(key)));
+ alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
}
if (node.computed) {
- alias = "[" + alias + "]";
+ alias = `[${alias}]`;
}
if (node.static) {
- alias = "static:" + alias;
+ alias = `static:${alias}`;
}
return alias;
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
index c5488ef9d5..2e221db4e0 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = toSequenceExpression;
var _gatherSequenceExpressions = _interopRequireDefault(require("./gatherSequenceExpressions"));
@@ -9,12 +11,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
function toSequenceExpression(nodes, scope) {
if (!nodes || !nodes.length) return;
- var declars = [];
- var result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
+ const declars = [];
+ const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
if (!result) return;
- for (var _i = 0; _i < declars.length; _i++) {
- var declar = declars[_i];
+ for (const declar of declars) {
scope.push(declar);
}
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toStatement.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toStatement.js
index 8fa5a97e20..69b22ae09c 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toStatement.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toStatement.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = toStatement;
var _generated = require("../validators/generated");
@@ -12,8 +14,8 @@ function toStatement(node, ignore) {
return node;
}
- var mustHaveId = false;
- var newType;
+ let mustHaveId = false;
+ let newType;
if ((0, _generated.isClass)(node)) {
mustHaveId = true;
@@ -33,7 +35,7 @@ function toStatement(node, ignore) {
if (ignore) {
return false;
} else {
- throw new Error("cannot turn " + node.type + " to a statement");
+ throw new Error(`cannot turn ${node.type} to a statement`);
}
}
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
index d8f82ffd05..a7456ebfb0 100644
--- 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
@@ -1,11 +1,29 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = valueToNode;
-var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject"));
+function _isPlainObject() {
+ const data = _interopRequireDefault(require("lodash/isPlainObject"));
-var _isRegExp = _interopRequireDefault(require("lodash/isRegExp"));
+ _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"));
@@ -31,12 +49,32 @@ function valueToNode(value) {
}
if (typeof value === "number") {
- return (0, _generated.numericLiteral)(value);
+ 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)) {
- var pattern = value.source;
- var flags = value.toString().match(/\/([a-z]+|)$/)[1];
+ if ((0, _isRegExp().default)(value)) {
+ const pattern = value.source;
+ const flags = value.toString().match(/\/([a-z]+|)$/)[1];
return (0, _generated.regExpLiteral)(pattern, flags);
}
@@ -44,11 +82,11 @@ function valueToNode(value) {
return (0, _generated.arrayExpression)(value.map(valueToNode));
}
- if ((0, _isPlainObject.default)(value)) {
- var props = [];
+ if ((0, _isPlainObject().default)(value)) {
+ const props = [];
- for (var key in value) {
- var nodeKey = void 0;
+ for (const key in value) {
+ let nodeKey;
if ((0, _isValidIdentifier.default)(key)) {
nodeKey = (0, _generated.identifier)(key);
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
index d8abe51f15..b2bcbd9c2f 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier"));
@@ -43,7 +45,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
builder: ["operator", "left", "right"],
fields: {
operator: {
- validate: _utils.assertOneOf.apply(void 0, _constants.BINARY_OPERATORS)
+ validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
},
left: {
validate: (0, _utils.assertNodeType)("Expression")
@@ -55,6 +57,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
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: {
@@ -96,7 +106,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
aliases: ["Statement", "Terminatorless", "CompletionStatement"]
});
(0, _utils.default)("CallExpression", {
- visitor: ["callee", "arguments", "typeParameters"],
+ visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
builder: ["callee", "arguments"],
aliases: ["Expression"],
fields: {
@@ -110,8 +120,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
validate: (0, _utils.assertOneOf)(true, false),
optional: true
},
+ typeArguments: {
+ validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
+ optional: true
+ },
typeParameters: {
- validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
+ validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
optional: true
}
}
@@ -226,9 +240,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
}
}
});
-var functionCommon = {
+const functionCommon = {
params: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("LVal")))
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
},
generator: {
default: false,
@@ -240,7 +254,7 @@ var functionCommon = {
}
};
exports.functionCommon = functionCommon;
-var functionTypeAnnotationCommon = {
+const functionTypeAnnotationCommon = {
returnType: {
validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
optional: true
@@ -251,7 +265,7 @@ var functionTypeAnnotationCommon = {
}
};
exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
-var functionDeclarationCommon = Object.assign({}, functionCommon, {
+const functionDeclarationCommon = Object.assign({}, functionCommon, {
declare: {
validate: (0, _utils.assertValueType)("boolean"),
optional: true
@@ -285,7 +299,7 @@ exports.functionDeclarationCommon = functionDeclarationCommon;
}
})
});
-var patternLikeCommon = {
+const patternLikeCommon = {
typeAnnotation: {
validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
optional: true
@@ -297,13 +311,13 @@ var patternLikeCommon = {
exports.patternLikeCommon = patternLikeCommon;
(0, _utils.default)("Identifier", {
builder: ["name"],
- visitor: ["typeAnnotation"],
+ visitor: ["typeAnnotation", "decorators"],
aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
fields: Object.assign({}, patternLikeCommon, {
name: {
- validate: function validate(node, key, val) {
+ validate: (0, _utils.chain)(function (node, key, val) {
if (!(0, _isValidIdentifier.default)(val)) {}
- }
+ }, (0, _utils.assertValueType)("string"))
},
optional: {
validate: (0, _utils.assertValueType)("boolean"),
@@ -390,7 +404,7 @@ exports.patternLikeCommon = patternLikeCommon;
aliases: ["Binary", "Expression"],
fields: {
operator: {
- validate: _utils.assertOneOf.apply(void 0, _constants.LOGICAL_OPERATORS)
+ validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
},
left: {
validate: (0, _utils.assertNodeType)("Expression")
@@ -410,10 +424,10 @@ exports.patternLikeCommon = patternLikeCommon;
},
property: {
validate: function () {
- var normal = (0, _utils.assertNodeType)("Identifier");
- var computed = (0, _utils.assertNodeType)("Expression");
+ const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
+ const computed = (0, _utils.assertNodeType)("Expression");
return function (node, key, val) {
- var validator = node.computed ? computed : normal;
+ const validator = node.computed ? computed : normal;
validator(node, key, val);
};
}()
@@ -432,7 +446,7 @@ exports.patternLikeCommon = patternLikeCommon;
});
(0, _utils.default)("Program", {
visitor: ["directives", "body"],
- builder: ["body", "directives", "sourceType"],
+ builder: ["body", "directives", "sourceType", "interpreter"],
fields: {
sourceFile: {
validate: (0, _utils.assertValueType)("string")
@@ -441,6 +455,11 @@ exports.patternLikeCommon = patternLikeCommon;
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: []
@@ -473,10 +492,10 @@ exports.patternLikeCommon = patternLikeCommon;
},
key: {
validate: function () {
- var normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
- var computed = (0, _utils.assertNodeType)("Expression");
+ const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
+ const computed = (0, _utils.assertNodeType)("Expression");
return function (node, key, val) {
- var validator = node.computed ? computed : normal;
+ const validator = node.computed ? computed : normal;
validator(node, key, val);
};
}()
@@ -500,10 +519,10 @@ exports.patternLikeCommon = patternLikeCommon;
},
key: {
validate: function () {
- var normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
- var computed = (0, _utils.assertNodeType)("Expression");
+ const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
+ const computed = (0, _utils.assertNodeType)("Expression");
return function (node, key, val) {
- var validator = node.computed ? computed : normal;
+ const validator = node.computed ? computed : normal;
validator(node, key, val);
};
}()
@@ -616,7 +635,7 @@ exports.patternLikeCommon = patternLikeCommon;
validate: (0, _utils.assertNodeType)("Expression")
},
operator: {
- validate: _utils.assertOneOf.apply(void 0, _constants.UNARY_OPERATORS)
+ validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
}
},
visitor: ["argument"],
@@ -632,7 +651,7 @@ exports.patternLikeCommon = patternLikeCommon;
validate: (0, _utils.assertNodeType)("Expression")
},
operator: {
- validate: _utils.assertOneOf.apply(void 0, _constants.UPDATE_OPERATORS)
+ validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
}
},
visitor: ["argument"],
@@ -661,6 +680,10 @@ exports.patternLikeCommon = patternLikeCommon;
id: {
validate: (0, _utils.assertNodeType)("LVal")
},
+ definite: {
+ optional: true,
+ validate: (0, _utils.assertValueType)("boolean")
+ },
init: {
optional: true,
validate: (0, _utils.assertNodeType)("Expression")
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
index 62e2b4b0c2..b4ce6fa04d 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = void 0;
var _utils = _interopRequireWildcard(require("./utils"));
@@ -10,7 +12,7 @@ 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"],
+ visitor: ["left", "right", "decorators"],
builder: ["left", "right"],
aliases: ["Pattern", "PatternLike", "LVal"],
fields: Object.assign({}, _core.patternLikeCommon, {
@@ -55,11 +57,11 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
visitor: ["body"],
fields: {
body: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassProperty", "TSDeclareMethod", "TSIndexSignature")))
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
}
}
});
-var classCommon = {
+const classCommon = {
typeParameters: {
validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
optional: true
@@ -76,7 +78,7 @@ var classCommon = {
optional: true
},
implements: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "FlowClassImplements"))),
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
optional: true
}
};
@@ -199,6 +201,10 @@ var classCommon = {
},
source: {
validate: (0, _utils.assertNodeType)("StringLiteral")
+ },
+ importKind: {
+ validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
+ optional: true
}
}
});
@@ -231,7 +237,8 @@ var classCommon = {
validate: (0, _utils.assertNodeType)("Identifier")
},
importKind: {
- validate: (0, _utils.assertOneOf)(null, "type", "typeof")
+ validate: (0, _utils.assertOneOf)("type", "typeof"),
+ optional: true
}
}
});
@@ -247,7 +254,7 @@ var classCommon = {
}
}
});
-var classMethodOrPropertyCommon = {
+const classMethodOrPropertyCommon = {
abstract: {
validate: (0, _utils.assertValueType)("boolean"),
optional: true
@@ -269,18 +276,18 @@ var classMethodOrPropertyCommon = {
optional: true
},
key: {
- validate: function () {
- var normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
- var computed = (0, _utils.assertNodeType)("Expression");
+ validate: (0, _utils.chain)(function () {
+ const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
+ const computed = (0, _utils.assertNodeType)("Expression");
return function (node, key, val) {
- var validator = node.computed ? computed : normal;
+ const validator = node.computed ? computed : normal;
validator(node, key, val);
};
- }()
+ }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
}
};
exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
-var classMethodOrDeclareMethodCommon = Object.assign({}, _core.functionCommon, 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"
@@ -306,7 +313,7 @@ exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
})
});
(0, _utils.default)("ObjectPattern", {
- visitor: ["properties", "typeAnnotation"],
+ visitor: ["properties", "typeAnnotation", "decorators"],
builder: ["properties"],
aliases: ["Pattern", "PatternLike", "LVal"],
fields: Object.assign({}, _core.patternLikeCommon, {
@@ -337,6 +344,10 @@ exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
},
quasi: {
validate: (0, _utils.assertNodeType)("TemplateLiteral")
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
+ optional: true
}
}
});
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
index 968f3009d8..e31b9fb7b9 100644
--- 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
@@ -30,6 +30,10 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
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
@@ -44,6 +48,104 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
}
})
});
+(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"]
});
@@ -81,4 +183,22 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
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
index db54ee1a95..6969237dfa 100644
--- 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
@@ -4,260 +4,383 @@ 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", "FlowBaseAnnotation"],
- fields: {}
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
});
(0, _utils.default)("ArrayTypeAnnotation", {
visitor: ["elementType"],
- aliases: ["Flow"],
- fields: {}
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ elementType: (0, _utils.validateType)("FlowType")
+ }
});
(0, _utils.default)("BooleanTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"],
- fields: {}
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
});
(0, _utils.default)("BooleanLiteralTypeAnnotation", {
- aliases: ["Flow"],
- fields: {}
+ builder: ["value"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
+ }
});
(0, _utils.default)("NullLiteralTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"],
- fields: {}
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
});
(0, _utils.default)("ClassImplements", {
visitor: ["id", "typeParameters"],
aliases: ["Flow"],
- fields: {}
-});
-(0, _utils.default)("DeclareClass", {
- visitor: ["id", "typeParameters", "extends", "body"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {}
+ 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: {}
-});
-(0, _utils.default)("DeclareInterface", {
- visitor: ["id", "typeParameters", "extends", "body"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {}
+ 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: {}
+ 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: {}
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
+ }
});
(0, _utils.default)("DeclareTypeAlias", {
visitor: ["id", "typeParameters", "right"],
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {}
+ 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: {}
+ 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: {}
+ fields: {
+ id: (0, _utils.validateType)("Identifier")
+ }
});
(0, _utils.default)("DeclareExportDeclaration", {
visitor: ["declaration", "specifiers", "source"],
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {}
+ 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: {}
+ 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: {}
+ fields: {
+ value: (0, _utils.validateType)("Flow")
+ }
});
(0, _utils.default)("ExistsTypeAnnotation", {
- aliases: ["Flow"]
+ aliases: ["Flow", "FlowType"]
});
(0, _utils.default)("FunctionTypeAnnotation", {
visitor: ["typeParameters", "params", "rest", "returnType"],
- aliases: ["Flow"],
- fields: {}
+ 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: {}
+ 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"],
- fields: {}
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
+ }
});
(0, _utils.default)("InferredPredicate", {
- aliases: ["Flow", "FlowPredicate"],
- fields: {}
+ aliases: ["Flow", "FlowPredicate"]
});
(0, _utils.default)("InterfaceExtends", {
visitor: ["id", "typeParameters"],
aliases: ["Flow"],
- fields: {}
+ fields: {
+ id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
+ }
});
-(0, _utils.default)("InterfaceDeclaration", {
- visitor: ["id", "typeParameters", "extends", "body"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {}
+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"],
- fields: {}
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
+ }
});
(0, _utils.default)("MixedTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"]
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
});
(0, _utils.default)("EmptyTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"]
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
});
(0, _utils.default)("NullableTypeAnnotation", {
visitor: ["typeAnnotation"],
- aliases: ["Flow"],
- fields: {}
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("FlowType")
+ }
});
(0, _utils.default)("NumberLiteralTypeAnnotation", {
- aliases: ["Flow"],
- fields: {}
+ builder: ["value"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
+ }
});
(0, _utils.default)("NumberTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"],
- fields: {}
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
});
(0, _utils.default)("ObjectTypeAnnotation", {
- visitor: ["properties", "indexers", "callProperties"],
- aliases: ["Flow"],
- fields: {}
+ 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: {}
+ fields: {
+ value: (0, _utils.validateType)("FlowType"),
+ static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
+ }
});
(0, _utils.default)("ObjectTypeIndexer", {
- visitor: ["id", "key", "value"],
+ visitor: ["id", "key", "value", "variance"],
aliases: ["Flow", "UserWhitespacable"],
- fields: {}
+ 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"],
+ visitor: ["key", "value", "variance"],
aliases: ["Flow", "UserWhitespacable"],
- fields: {}
+ 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: {}
+ fields: {
+ argument: (0, _utils.validateType)("FlowType")
+ }
});
(0, _utils.default)("OpaqueType", {
visitor: ["id", "typeParameters", "supertype", "impltype"],
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {}
+ 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: {}
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
+ }
});
(0, _utils.default)("StringLiteralTypeAnnotation", {
- aliases: ["Flow"],
- fields: {}
+ builder: ["value"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
+ }
});
(0, _utils.default)("StringTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"],
- fields: {}
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
});
(0, _utils.default)("ThisTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"],
- fields: {}
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
});
(0, _utils.default)("TupleTypeAnnotation", {
visitor: ["types"],
- aliases: ["Flow"],
- fields: {}
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
+ }
});
(0, _utils.default)("TypeofTypeAnnotation", {
visitor: ["argument"],
- aliases: ["Flow"],
- fields: {}
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ argument: (0, _utils.validateType)("FlowType")
+ }
});
(0, _utils.default)("TypeAlias", {
visitor: ["id", "typeParameters", "right"],
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {}
+ 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: {
- validate: (0, _utils.assertNodeType)("Flow")
- }
+ typeAnnotation: (0, _utils.validateType)("FlowType")
}
});
(0, _utils.default)("TypeCastExpression", {
visitor: ["expression", "typeAnnotation"],
aliases: ["Flow", "ExpressionWrapper", "Expression"],
- fields: {}
+ fields: {
+ expression: (0, _utils.validateType)("Expression"),
+ typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
+ }
});
(0, _utils.default)("TypeParameter", {
aliases: ["Flow"],
- visitor: ["bound", "default"],
+ visitor: ["bound", "default", "variance"],
fields: {
- name: {
- validate: (0, _utils.assertValueType)("string")
- },
- bound: {
- validate: (0, _utils.assertNodeType)("TypeAnnotation"),
- optional: true
- },
- default: {
- validate: (0, _utils.assertNodeType)("Flow"),
- optional: true
- }
+ 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: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TypeParameter")))
- }
+ params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
}
});
(0, _utils.default)("TypeParameterInstantiation", {
aliases: ["Flow"],
visitor: ["params"],
fields: {
- params: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Flow")))
- }
+ 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"],
- fields: {}
+ builder: ["kind"],
+ fields: {
+ kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
+ }
});
(0, _utils.default)("VoidTypeAnnotation", {
- aliases: ["Flow", "FlowBaseAnnotation"],
- fields: {}
+ 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
index a0bbfb8467..ddb9e5101f 100644
--- 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
@@ -1,9 +1,55 @@
"use strict";
-exports.__esModule = true;
+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;
+ }
+});
exports.TYPES = void 0;
-var _toFastProperties = _interopRequireDefault(require("to-fast-properties"));
+function _toFastProperties() {
+ const data = _interopRequireDefault(require("to-fast-properties"));
+
+ _toFastProperties = function () {
+ return data;
+ };
+
+ return data;
+}
require("./core");
@@ -21,20 +67,13 @@ require("./typescript");
var _utils = require("./utils");
-exports.VISITOR_KEYS = _utils.VISITOR_KEYS;
-exports.ALIAS_KEYS = _utils.ALIAS_KEYS;
-exports.FLIPPED_ALIAS_KEYS = _utils.FLIPPED_ALIAS_KEYS;
-exports.NODE_FIELDS = _utils.NODE_FIELDS;
-exports.BUILDER_KEYS = _utils.BUILDER_KEYS;
-exports.DEPRECATED_KEYS = _utils.DEPRECATED_KEYS;
-
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);
-var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
+(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);
+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
index 0ed8978b12..60d37e98ca 100644
--- 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
@@ -51,7 +51,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
aliases: ["JSX", "Immutable"],
fields: {
expression: {
- validate: (0, _utils.assertNodeType)("Expression")
+ validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
}
}
});
@@ -111,6 +111,10 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
},
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
}
}
});
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
index 90dca181f2..0e5f905512 100644
--- 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
@@ -8,49 +8,8 @@ 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; } }
-var bool = (0, _utils.assertValueType)("boolean");
-
-function validate(validate) {
- return {
- validate: validate
- };
-}
-
-function typeIs(typeName) {
- return typeof typeName === "string" ? (0, _utils.assertNodeType)(typeName) : _utils.assertNodeType.apply(void 0, typeName);
-}
-
-function validateType(name) {
- return validate(typeIs(name));
-}
-
-function validateOptional(validate) {
- return {
- validate: validate,
- optional: true
- };
-}
-
-function validateOptionalType(typeName) {
- return {
- validate: typeIs(typeName),
- optional: true
- };
-}
-
-function arrayOf(elementType) {
- return (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(elementType));
-}
-
-function arrayOfType(nodeTypeName) {
- return arrayOf(typeIs(nodeTypeName));
-}
-
-function validateArrayOfType(nodeTypeName) {
- return validate(arrayOfType(nodeTypeName));
-}
-
-var tSFunctionTypeAnnotationCommon = {
+const bool = (0, _utils.assertValueType)("boolean");
+const tSFunctionTypeAnnotationCommon = {
returnType: {
validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
optional: true
@@ -90,34 +49,34 @@ var tSFunctionTypeAnnotationCommon = {
aliases: ["TSEntityName"],
visitor: ["left", "right"],
fields: {
- left: validateType("TSEntityName"),
- right: validateType("Identifier")
+ left: (0, _utils.validateType)("TSEntityName"),
+ right: (0, _utils.validateType)("Identifier")
}
});
-var signatureDeclarationCommon = {
- typeParameters: validateOptionalType("TSTypeParameterDeclaration"),
- parameters: validateArrayOfType(["Identifier", "RestElement"]),
- typeAnnotation: validateOptionalType("TSTypeAnnotation")
+const signatureDeclarationCommon = {
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
+ parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
+ typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
};
-var callConstructSignatureDeclaration = {
+const callConstructSignatureDeclaration = {
aliases: ["TSTypeElement"],
visitor: ["typeParameters", "parameters", "typeAnnotation"],
fields: signatureDeclarationCommon
};
(0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
(0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
-var namedTypeElementCommon = {
- key: validateType("Expression"),
- computed: validate(bool),
- optional: validateOptional(bool)
+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: validateOptional(bool),
- typeAnnotation: validateOptionalType("TSTypeAnnotation"),
- initializer: validateOptionalType("Expression")
+ readonly: (0, _utils.validateOptional)(bool),
+ typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
+ initializer: (0, _utils.validateOptionalType)("Expression")
})
});
(0, _utils.default)("TSMethodSignature", {
@@ -129,15 +88,14 @@ var namedTypeElementCommon = {
aliases: ["TSTypeElement"],
visitor: ["parameters", "typeAnnotation"],
fields: {
- readonly: validateOptional(bool),
- parameters: validateArrayOfType("Identifier"),
- typeAnnotation: validateOptionalType("TSTypeAnnotation")
+ readonly: (0, _utils.validateOptional)(bool),
+ parameters: (0, _utils.validateArrayOfType)("Identifier"),
+ typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
}
});
-var tsKeywordTypes = ["TSAnyKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSBooleanKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSVoidKeyword", "TSUndefinedKeyword", "TSNullKeyword", "TSNeverKeyword"];
+const tsKeywordTypes = ["TSAnyKeyword", "TSUnknownKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSBooleanKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSVoidKeyword", "TSUndefinedKeyword", "TSNullKeyword", "TSNeverKeyword"];
-for (var _i = 0; _i < tsKeywordTypes.length; _i++) {
- var type = tsKeywordTypes[_i];
+for (const type of tsKeywordTypes) {
(0, _utils.default)(type, {
aliases: ["TSType"],
visitor: [],
@@ -150,7 +108,7 @@ for (var _i = 0; _i < tsKeywordTypes.length; _i++) {
visitor: [],
fields: {}
});
-var fnOrCtr = {
+const fnOrCtr = {
aliases: ["TSType"],
visitor: ["typeParameters", "typeAnnotation"],
fields: signatureDeclarationCommon
@@ -161,214 +119,254 @@ var fnOrCtr = {
aliases: ["TSType"],
visitor: ["typeName", "typeParameters"],
fields: {
- typeName: validateType("TSEntityName"),
- typeParameters: validateOptionalType("TSTypeParameterInstantiation")
+ typeName: (0, _utils.validateType)("TSEntityName"),
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
}
});
(0, _utils.default)("TSTypePredicate", {
aliases: ["TSType"],
visitor: ["parameterName", "typeAnnotation"],
fields: {
- parameterName: validateType(["Identifier", "TSThisType"]),
- typeAnnotation: validateType("TSTypeAnnotation")
+ parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
+ typeAnnotation: (0, _utils.validateType)("TSTypeAnnotation")
}
});
(0, _utils.default)("TSTypeQuery", {
aliases: ["TSType"],
visitor: ["exprName"],
fields: {
- exprName: validateType("TSEntityName")
+ exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
}
});
(0, _utils.default)("TSTypeLiteral", {
aliases: ["TSType"],
visitor: ["members"],
fields: {
- members: validateArrayOfType("TSTypeElement")
+ members: (0, _utils.validateArrayOfType)("TSTypeElement")
}
});
(0, _utils.default)("TSArrayType", {
aliases: ["TSType"],
visitor: ["elementType"],
fields: {
- elementType: validateType("TSType")
+ elementType: (0, _utils.validateType)("TSType")
}
});
(0, _utils.default)("TSTupleType", {
aliases: ["TSType"],
visitor: ["elementTypes"],
fields: {
- elementTypes: validateArrayOfType("TSType")
+ elementTypes: (0, _utils.validateArrayOfType)("TSType")
}
});
-var unionOrIntersection = {
+(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: validateArrayOfType("TSType")
+ 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: validateType("TSType")
+ typeAnnotation: (0, _utils.validateType)("TSType")
}
});
(0, _utils.default)("TSTypeOperator", {
aliases: ["TSType"],
visitor: ["typeAnnotation"],
fields: {
- operator: validate((0, _utils.assertValueType)("string")),
- typeAnnotation: validateType("TSType")
+ operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
+ typeAnnotation: (0, _utils.validateType)("TSType")
}
});
(0, _utils.default)("TSIndexedAccessType", {
aliases: ["TSType"],
visitor: ["objectType", "indexType"],
fields: {
- objectType: validateType("TSType"),
- indexType: validateType("TSType")
+ objectType: (0, _utils.validateType)("TSType"),
+ indexType: (0, _utils.validateType)("TSType")
}
});
(0, _utils.default)("TSMappedType", {
aliases: ["TSType"],
visitor: ["typeParameter", "typeAnnotation"],
fields: {
- readonly: validateOptional(bool),
- typeParameter: validateType("TSTypeParameter"),
- optional: validateOptional(bool),
- typeAnnotation: validateOptionalType("TSType")
+ 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: validateType(["NumericLiteral", "StringLiteral", "BooleanLiteral"])
+ literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral"])
}
});
(0, _utils.default)("TSExpressionWithTypeArguments", {
aliases: ["TSType"],
visitor: ["expression", "typeParameters"],
fields: {
- expression: validateType("TSEntityName"),
- typeParameters: validateOptionalType("TSTypeParameterInstantiation")
+ expression: (0, _utils.validateType)("TSEntityName"),
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
}
});
(0, _utils.default)("TSInterfaceDeclaration", {
aliases: ["Statement", "Declaration"],
visitor: ["id", "typeParameters", "extends", "body"],
fields: {
- declare: validateOptional(bool),
- id: validateType("Identifier"),
- typeParameters: validateOptionalType("TSTypeParameterDeclaration"),
- extends: validateOptional(arrayOfType("TSExpressionWithTypeArguments")),
- body: validateType("TSInterfaceBody")
+ 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: validateArrayOfType("TSTypeElement")
+ body: (0, _utils.validateArrayOfType)("TSTypeElement")
}
});
(0, _utils.default)("TSTypeAliasDeclaration", {
aliases: ["Statement", "Declaration"],
visitor: ["id", "typeParameters", "typeAnnotation"],
fields: {
- declare: validateOptional(bool),
- id: validateType("Identifier"),
- typeParameters: validateOptionalType("TSTypeParameterDeclaration"),
- typeAnnotation: validateType("TSType")
+ 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: validateType("Expression"),
- typeAnnotation: validateType("TSType")
+ expression: (0, _utils.validateType)("Expression"),
+ typeAnnotation: (0, _utils.validateType)("TSType")
}
});
(0, _utils.default)("TSTypeAssertion", {
aliases: ["Expression"],
visitor: ["typeAnnotation", "expression"],
fields: {
- typeAnnotation: validateType("TSType"),
- expression: validateType("Expression")
+ typeAnnotation: (0, _utils.validateType)("TSType"),
+ expression: (0, _utils.validateType)("Expression")
}
});
(0, _utils.default)("TSEnumDeclaration", {
aliases: ["Statement", "Declaration"],
visitor: ["id", "members"],
fields: {
- declare: validateOptional(bool),
- const: validateOptional(bool),
- id: validateType("Identifier"),
- members: validateArrayOfType("TSEnumMember"),
- initializer: validateOptionalType("Expression")
+ 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: validateType(["Identifier", "StringLiteral"]),
- initializer: validateOptionalType("Expression")
+ id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
+ initializer: (0, _utils.validateOptionalType)("Expression")
}
});
(0, _utils.default)("TSModuleDeclaration", {
aliases: ["Statement", "Declaration"],
visitor: ["id", "body"],
fields: {
- declare: validateOptional(bool),
- global: validateOptional(bool),
- id: validateType(["Identifier", "StringLiteral"]),
- body: validateType(["TSModuleBlock", "TSModuleDeclaration"])
+ 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", {
visitor: ["body"],
fields: {
- body: validateArrayOfType("Statement")
+ 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: validate(bool),
- id: validateType("Identifier"),
- moduleReference: validateType(["TSEntityName", "TSExternalModuleReference"])
+ isExport: (0, _utils.validate)(bool),
+ id: (0, _utils.validateType)("Identifier"),
+ moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
}
});
(0, _utils.default)("TSExternalModuleReference", {
visitor: ["expression"],
fields: {
- expression: validateType("StringLiteral")
+ expression: (0, _utils.validateType)("StringLiteral")
}
});
(0, _utils.default)("TSNonNullExpression", {
aliases: ["Expression"],
visitor: ["expression"],
fields: {
- expression: validateType("Expression")
+ expression: (0, _utils.validateType)("Expression")
}
});
(0, _utils.default)("TSExportAssignment", {
aliases: ["Statement"],
visitor: ["expression"],
fields: {
- expression: validateType("Expression")
+ expression: (0, _utils.validateType)("Expression")
}
});
(0, _utils.default)("TSNamespaceExportDeclaration", {
aliases: ["Statement"],
visitor: ["id"],
fields: {
- id: validateType("Identifier")
+ id: (0, _utils.validateType)("Identifier")
}
});
(0, _utils.default)("TSTypeAnnotation", {
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
index 6d323768ce..c8fee08c52 100644
--- 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
@@ -1,6 +1,16 @@
"use strict";
-exports.__esModule = true;
+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;
@@ -14,17 +24,17 @@ var _is = _interopRequireDefault(require("../validators/is"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var VISITOR_KEYS = {};
+const VISITOR_KEYS = {};
exports.VISITOR_KEYS = VISITOR_KEYS;
-var ALIAS_KEYS = {};
+const ALIAS_KEYS = {};
exports.ALIAS_KEYS = ALIAS_KEYS;
-var FLIPPED_ALIAS_KEYS = {};
+const FLIPPED_ALIAS_KEYS = {};
exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
-var NODE_FIELDS = {};
+const NODE_FIELDS = {};
exports.NODE_FIELDS = NODE_FIELDS;
-var BUILDER_KEYS = {};
+const BUILDER_KEYS = {};
exports.BUILDER_KEYS = BUILDER_KEYS;
-var DEPRECATED_KEYS = {};
+const DEPRECATED_KEYS = {};
exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
function getType(val) {
@@ -39,12 +49,52 @@ function getType(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 (var i = 0; i < val.length; i++) {
- callback(node, key + "[" + i + "]", val[i]);
+ for (let i = 0; i < val.length; i++) {
+ callback(node, `${key}[${i}]`, val[i]);
}
}
@@ -52,14 +102,10 @@ function assertEach(callback) {
return validator;
}
-function assertOneOf() {
- for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
- values[_key] = arguments[_key];
- }
-
+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));
+ throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
}
}
@@ -67,17 +113,11 @@ function assertOneOf() {
return validate;
}
-function assertNodeType() {
- for (var _len2 = arguments.length, types = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
- types[_key2] = arguments[_key2];
- }
-
+function assertNodeType(...types) {
function validate(node, key, val) {
- var valid = false;
-
- for (var _i = 0; _i < types.length; _i++) {
- var type = types[_i];
+ let valid = false;
+ for (const type of types) {
if ((0, _is.default)(type, val)) {
valid = true;
break;
@@ -85,7 +125,7 @@ function assertNodeType() {
}
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)));
+ 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)}`);
}
}
@@ -93,17 +133,11 @@ function assertNodeType() {
return validate;
}
-function assertNodeOrValueType() {
- for (var _len3 = arguments.length, types = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
- types[_key3] = arguments[_key3];
- }
-
+function assertNodeOrValueType(...types) {
function validate(node, key, val) {
- var valid = false;
-
- for (var _i2 = 0; _i2 < types.length; _i2++) {
- var type = types[_i2];
+ let valid = false;
+ for (const type of types) {
if (getType(val) === type || (0, _is.default)(type, val)) {
valid = true;
break;
@@ -111,7 +145,7 @@ function assertNodeOrValueType() {
}
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)));
+ 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)}`);
}
}
@@ -121,10 +155,10 @@ function assertNodeOrValueType() {
function assertValueType(type) {
function validate(node, key, val) {
- var valid = getType(val) === type;
+ const valid = getType(val) === type;
if (!valid) {
- throw new TypeError("Property " + key + " expected type of " + type + " but got " + getType(val));
+ throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
}
}
@@ -132,15 +166,10 @@ function assertValueType(type) {
return validate;
}
-function chain() {
- for (var _len4 = arguments.length, fns = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
- fns[_key4] = arguments[_key4];
- }
-
- function validate() {
- for (var _i3 = 0; _i3 < fns.length; _i3++) {
- var fn = fns[_i3];
- fn.apply(void 0, arguments);
+function chain(...fns) {
+ function validate(...args) {
+ for (const fn of fns) {
+ fn(...args);
}
}
@@ -148,32 +177,25 @@ function chain() {
return validate;
}
-function defineType(type, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
- var inherits = opts.inherits && store[opts.inherits] || {};
- var fields = opts.fields || inherits.fields || {};
- var visitor = opts.visitor || inherits.visitor || [];
- var aliases = opts.aliases || inherits.aliases || [];
- var builder = opts.builder || inherits.builder || opts.visitor || [];
+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;
}
- var _arr = visitor.concat(builder);
-
- for (var _i4 = 0; _i4 < _arr.length; _i4++) {
- var key = _arr[_i4];
+ for (const key of visitor.concat(builder)) {
fields[key] = fields[key] || {};
}
- for (var _key5 in fields) {
- var field = fields[_key5];
+ for (const key in fields) {
+ const field = fields[key];
- if (builder.indexOf(_key5) === -1) {
+ if (builder.indexOf(key) === -1) {
field.optional = true;
}
@@ -188,11 +210,11 @@ function defineType(type, opts) {
BUILDER_KEYS[type] = opts.builder = builder;
NODE_FIELDS[type] = opts.fields = fields;
ALIAS_KEYS[type] = opts.aliases = aliases;
- aliases.forEach(function (alias) {
+ aliases.forEach(alias => {
FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
FLIPPED_ALIAS_KEYS[alias].push(type);
});
store[type] = opts;
}
-var store = {}; \ No newline at end of file
+const store = {}; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.d.ts b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.d.ts
new file mode 100644
index 0000000000..753269b836
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.d.ts
@@ -0,0 +1,2058 @@
+// 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 = AnyTypeAnnotation | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | Binary | BinaryExpression | BindExpression | Block | BlockParent | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | Class | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | CompletionStatement | Conditional | ConditionalExpression | ContinueStatement | DebuggerStatement | Declaration | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | ExistsTypeAnnotation | ExportAllDeclaration | ExportDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | Expression | ExpressionStatement | ExpressionWrapper | File | Flow | FlowBaseAnnotation | FlowDeclaration | FlowPredicate | FlowType | For | ForInStatement | ForOfStatement | ForStatement | ForXStatement | Function | FunctionDeclaration | FunctionExpression | FunctionParent | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Immutable | Import | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | InferredPredicate | InterfaceDeclaration | InterfaceExtends | InterfaceTypeAnnotation | InterpreterDirective | IntersectionTypeAnnotation | JSX | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LVal | LabeledStatement | Literal | LogicalExpression | Loop | MemberExpression | MetaProperty | Method | MixedTypeAnnotation | ModuleDeclaration | ModuleSpecifier | NewExpression | Noop | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMember | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | Pattern | PatternLike | PipelineBareFunction | PipelinePrimaryTopicReference | PipelineTopicExpression | Private | PrivateName | Program | Property | Pureish | QualifiedTypeIdentifier | RegExpLiteral | RegexLiteral | RestElement | RestProperty | ReturnStatement | Scopable | SequenceExpression | SpreadElement | SpreadProperty | Statement | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | TSAnyKeyword | TSArrayType | TSAsExpression | TSBooleanKeyword | TSCallSignatureDeclaration | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEntityName | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInterfaceBody | TSInterfaceDeclaration | TSIntersectionType | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSRestType | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeElement | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | Terminatorless | ThisExpression | ThisTypeAnnotation | ThrowStatement | TryStatement | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeofTypeAnnotation | UnaryExpression | UnaryLike | UnionTypeAnnotation | UpdateExpression | UserWhitespacable | VariableDeclaration | VariableDeclarator | Variance | VoidTypeAnnotation | While | WhileStatement | WithStatement | YieldExpression;
+
+export interface ArrayExpression extends BaseNode {
+ type: "ArrayExpression";
+ elements: Array<null | Expression | SpreadElement>;
+}
+
+export interface AssignmentExpression extends BaseNode {
+ type: "AssignmentExpression";
+ operator: string;
+ left: LVal;
+ right: Expression;
+}
+
+export interface BinaryExpression extends BaseNode {
+ type: "BinaryExpression";
+ operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=";
+ left: Expression;
+ right: Expression;
+}
+
+export interface InterpreterDirective extends BaseNode {
+ type: "InterpreterDirective";
+ value: string;
+}
+
+export interface Directive extends BaseNode {
+ type: "Directive";
+ value: DirectiveLiteral;
+}
+
+export interface DirectiveLiteral extends BaseNode {
+ type: "DirectiveLiteral";
+ value: string;
+}
+
+export interface BlockStatement extends BaseNode {
+ type: "BlockStatement";
+ body: Array<Statement>;
+ directives: Array<Directive>;
+}
+
+export interface BreakStatement extends BaseNode {
+ type: "BreakStatement";
+ label: Identifier | null;
+}
+
+export interface CallExpression extends BaseNode {
+ type: "CallExpression";
+ callee: Expression;
+ arguments: Array<Expression | SpreadElement | JSXNamespacedName>;
+ optional: true | false | null;
+ typeArguments: TypeParameterInstantiation | null;
+ typeParameters: TSTypeParameterInstantiation | null;
+}
+
+export interface CatchClause extends BaseNode {
+ type: "CatchClause";
+ param: Identifier | null;
+ body: BlockStatement;
+}
+
+export interface ConditionalExpression extends BaseNode {
+ type: "ConditionalExpression";
+ test: Expression;
+ consequent: Expression;
+ alternate: Expression;
+}
+
+export interface ContinueStatement extends BaseNode {
+ type: "ContinueStatement";
+ label: Identifier | null;
+}
+
+export interface DebuggerStatement extends BaseNode {
+ type: "DebuggerStatement";
+}
+
+export interface DoWhileStatement extends BaseNode {
+ type: "DoWhileStatement";
+ test: Expression;
+ body: Statement;
+}
+
+export interface EmptyStatement extends BaseNode {
+ type: "EmptyStatement";
+}
+
+export interface ExpressionStatement extends BaseNode {
+ type: "ExpressionStatement";
+ expression: Expression;
+}
+
+export interface File extends BaseNode {
+ type: "File";
+ program: Program;
+ comments: any;
+ tokens: any;
+}
+
+export interface ForInStatement extends BaseNode {
+ type: "ForInStatement";
+ left: VariableDeclaration | LVal;
+ right: Expression;
+ body: Statement;
+}
+
+export interface ForStatement extends BaseNode {
+ type: "ForStatement";
+ init: VariableDeclaration | Expression | null;
+ test: Expression | null;
+ update: Expression | null;
+ body: Statement;
+}
+
+export interface FunctionDeclaration extends BaseNode {
+ type: "FunctionDeclaration";
+ id: Identifier | null;
+ params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
+ body: BlockStatement;
+ generator: boolean;
+ async: boolean;
+ declare: boolean | null;
+ returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface FunctionExpression extends BaseNode {
+ type: "FunctionExpression";
+ id: Identifier | null;
+ params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
+ body: BlockStatement;
+ generator: boolean;
+ async: boolean;
+ returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface Identifier extends BaseNode {
+ type: "Identifier";
+ name: string;
+ decorators: Array<Decorator> | null;
+ optional: boolean | null;
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+
+export interface IfStatement extends BaseNode {
+ type: "IfStatement";
+ test: Expression;
+ consequent: Statement;
+ alternate: Statement | null;
+}
+
+export interface LabeledStatement extends BaseNode {
+ type: "LabeledStatement";
+ label: Identifier;
+ body: Statement;
+}
+
+export interface StringLiteral extends BaseNode {
+ type: "StringLiteral";
+ value: string;
+}
+
+export interface NumericLiteral extends BaseNode {
+ type: "NumericLiteral";
+ value: number;
+}
+
+export interface NullLiteral extends BaseNode {
+ type: "NullLiteral";
+}
+
+export interface BooleanLiteral extends BaseNode {
+ type: "BooleanLiteral";
+ value: boolean;
+}
+
+export interface RegExpLiteral extends BaseNode {
+ type: "RegExpLiteral";
+ pattern: string;
+ flags: string;
+}
+
+export interface LogicalExpression extends BaseNode {
+ type: "LogicalExpression";
+ operator: "||" | "&&" | "??";
+ left: Expression;
+ right: Expression;
+}
+
+export interface MemberExpression extends BaseNode {
+ type: "MemberExpression";
+ object: Expression;
+ property: any;
+ computed: boolean;
+ optional: true | false | null;
+}
+
+export interface NewExpression extends BaseNode {
+ type: "NewExpression";
+ callee: Expression;
+ arguments: Array<Expression | SpreadElement | JSXNamespacedName>;
+ optional: true | false | null;
+ typeArguments: TypeParameterInstantiation | null;
+ typeParameters: TSTypeParameterInstantiation | null;
+}
+
+export interface Program extends BaseNode {
+ type: "Program";
+ body: Array<Statement>;
+ directives: Array<Directive>;
+ sourceType: "script" | "module";
+ interpreter: InterpreterDirective | null;
+ sourceFile: string | null;
+}
+
+export interface ObjectExpression extends BaseNode {
+ type: "ObjectExpression";
+ properties: Array<ObjectMethod | ObjectProperty | SpreadElement>;
+}
+
+export interface ObjectMethod extends BaseNode {
+ type: "ObjectMethod";
+ kind: "method" | "get" | "set";
+ key: any;
+ params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
+ body: BlockStatement;
+ computed: boolean;
+ async: boolean;
+ decorators: Array<Decorator> | null;
+ generator: boolean;
+ returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface ObjectProperty extends BaseNode {
+ type: "ObjectProperty";
+ key: any;
+ value: Expression | PatternLike;
+ computed: boolean;
+ shorthand: boolean;
+ decorators: Array<Decorator> | null;
+}
+
+export interface RestElement extends BaseNode {
+ type: "RestElement";
+ argument: LVal;
+ decorators: Array<Decorator> | null;
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+
+export interface ReturnStatement extends BaseNode {
+ type: "ReturnStatement";
+ argument: Expression | null;
+}
+
+export interface SequenceExpression extends BaseNode {
+ type: "SequenceExpression";
+ expressions: Array<Expression>;
+}
+
+export interface SwitchCase extends BaseNode {
+ type: "SwitchCase";
+ test: Expression | null;
+ consequent: Array<Statement>;
+}
+
+export interface SwitchStatement extends BaseNode {
+ type: "SwitchStatement";
+ discriminant: Expression;
+ cases: Array<SwitchCase>;
+}
+
+export interface ThisExpression extends BaseNode {
+ type: "ThisExpression";
+}
+
+export interface ThrowStatement extends BaseNode {
+ type: "ThrowStatement";
+ argument: Expression;
+}
+
+export interface TryStatement extends BaseNode {
+ type: "TryStatement";
+ block: BlockStatement;
+ handler: CatchClause | null;
+ finalizer: BlockStatement | null;
+}
+
+export interface UnaryExpression extends BaseNode {
+ type: "UnaryExpression";
+ operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof";
+ argument: Expression;
+ prefix: boolean;
+}
+
+export interface UpdateExpression extends BaseNode {
+ type: "UpdateExpression";
+ operator: "++" | "--";
+ argument: Expression;
+ prefix: boolean;
+}
+
+export interface VariableDeclaration extends BaseNode {
+ type: "VariableDeclaration";
+ kind: "var" | "let" | "const";
+ declarations: Array<VariableDeclarator>;
+ declare: boolean | null;
+}
+
+export interface VariableDeclarator extends BaseNode {
+ type: "VariableDeclarator";
+ id: LVal;
+ init: Expression | null;
+ definite: boolean | null;
+}
+
+export interface WhileStatement extends BaseNode {
+ type: "WhileStatement";
+ test: Expression;
+ body: BlockStatement | Statement;
+}
+
+export interface WithStatement extends BaseNode {
+ type: "WithStatement";
+ object: Expression;
+ body: BlockStatement | Statement;
+}
+
+export interface AssignmentPattern extends BaseNode {
+ type: "AssignmentPattern";
+ left: Identifier | ObjectPattern | ArrayPattern;
+ right: Expression;
+ decorators: Array<Decorator> | null;
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+
+export interface ArrayPattern extends BaseNode {
+ type: "ArrayPattern";
+ elements: Array<PatternLike>;
+ decorators: Array<Decorator> | null;
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+
+export interface ArrowFunctionExpression extends BaseNode {
+ type: "ArrowFunctionExpression";
+ params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
+ body: BlockStatement | Expression;
+ async: boolean;
+ expression: boolean | null;
+ generator: boolean;
+ returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface ClassBody extends BaseNode {
+ type: "ClassBody";
+ body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | TSDeclareMethod | TSIndexSignature>;
+}
+
+export interface ClassDeclaration extends BaseNode {
+ type: "ClassDeclaration";
+ id: Identifier | null;
+ superClass: Expression | null;
+ body: ClassBody;
+ decorators: Array<Decorator> | null;
+ abstract: boolean | null;
+ declare: boolean | null;
+ implements: Array<TSExpressionWithTypeArguments | ClassImplements> | null;
+ mixins: any | null;
+ superTypeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface ClassExpression extends BaseNode {
+ type: "ClassExpression";
+ id: Identifier | null;
+ superClass: Expression | null;
+ body: ClassBody;
+ decorators: Array<Decorator> | null;
+ implements: Array<TSExpressionWithTypeArguments | ClassImplements> | null;
+ mixins: any | null;
+ superTypeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface ExportAllDeclaration extends BaseNode {
+ type: "ExportAllDeclaration";
+ source: StringLiteral;
+}
+
+export interface ExportDefaultDeclaration extends BaseNode {
+ type: "ExportDefaultDeclaration";
+ declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression;
+}
+
+export interface ExportNamedDeclaration extends BaseNode {
+ type: "ExportNamedDeclaration";
+ declaration: Declaration | null;
+ specifiers: Array<ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier>;
+ source: StringLiteral | null;
+}
+
+export interface ExportSpecifier extends BaseNode {
+ type: "ExportSpecifier";
+ local: Identifier;
+ exported: Identifier;
+}
+
+export interface ForOfStatement extends BaseNode {
+ type: "ForOfStatement";
+ left: VariableDeclaration | LVal;
+ right: Expression;
+ body: Statement;
+ await: boolean;
+}
+
+export interface ImportDeclaration extends BaseNode {
+ type: "ImportDeclaration";
+ specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
+ source: StringLiteral;
+ importKind: "type" | "typeof" | "value" | null;
+}
+
+export interface ImportDefaultSpecifier extends BaseNode {
+ type: "ImportDefaultSpecifier";
+ local: Identifier;
+}
+
+export interface ImportNamespaceSpecifier extends BaseNode {
+ type: "ImportNamespaceSpecifier";
+ local: Identifier;
+}
+
+export interface ImportSpecifier extends BaseNode {
+ type: "ImportSpecifier";
+ local: Identifier;
+ imported: Identifier;
+ importKind: "type" | "typeof" | null;
+}
+
+export interface MetaProperty extends BaseNode {
+ type: "MetaProperty";
+ meta: Identifier;
+ property: Identifier;
+}
+
+export interface ClassMethod extends BaseNode {
+ type: "ClassMethod";
+ kind: "get" | "set" | "method" | "constructor";
+ key: Identifier | StringLiteral | NumericLiteral | Expression;
+ params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
+ body: BlockStatement;
+ computed: boolean;
+ static: boolean | null;
+ abstract: boolean | null;
+ access: "public" | "private" | "protected" | null;
+ accessibility: "public" | "private" | "protected" | null;
+ async: boolean;
+ decorators: Array<Decorator> | null;
+ generator: boolean;
+ optional: boolean | null;
+ returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface ObjectPattern extends BaseNode {
+ type: "ObjectPattern";
+ properties: Array<RestElement | ObjectProperty>;
+ decorators: Array<Decorator> | null;
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+
+export interface SpreadElement extends BaseNode {
+ type: "SpreadElement";
+ argument: Expression;
+}
+
+export interface Super extends BaseNode {
+ type: "Super";
+}
+
+export interface TaggedTemplateExpression extends BaseNode {
+ type: "TaggedTemplateExpression";
+ tag: Expression;
+ quasi: TemplateLiteral;
+ typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
+}
+
+export interface TemplateElement extends BaseNode {
+ type: "TemplateElement";
+ value: any;
+ tail: boolean;
+}
+
+export interface TemplateLiteral extends BaseNode {
+ type: "TemplateLiteral";
+ quasis: Array<TemplateElement>;
+ expressions: Array<Expression>;
+}
+
+export interface YieldExpression extends BaseNode {
+ type: "YieldExpression";
+ argument: Expression | null;
+ delegate: boolean;
+}
+
+export interface AnyTypeAnnotation extends BaseNode {
+ type: "AnyTypeAnnotation";
+}
+
+export interface ArrayTypeAnnotation extends BaseNode {
+ type: "ArrayTypeAnnotation";
+ elementType: FlowType;
+}
+
+export interface BooleanTypeAnnotation extends BaseNode {
+ type: "BooleanTypeAnnotation";
+}
+
+export interface BooleanLiteralTypeAnnotation extends BaseNode {
+ type: "BooleanLiteralTypeAnnotation";
+ value: boolean;
+}
+
+export interface NullLiteralTypeAnnotation extends BaseNode {
+ type: "NullLiteralTypeAnnotation";
+}
+
+export interface ClassImplements extends BaseNode {
+ type: "ClassImplements";
+ id: Identifier;
+ typeParameters: TypeParameterInstantiation | null;
+}
+
+export interface DeclareClass extends BaseNode {
+ type: "DeclareClass";
+ id: Identifier;
+ typeParameters: TypeParameterDeclaration | null;
+ extends: Array<InterfaceExtends> | null;
+ body: ObjectTypeAnnotation;
+ implements: Array<ClassImplements> | null;
+ mixins: Array<InterfaceExtends> | null;
+}
+
+export interface DeclareFunction extends BaseNode {
+ type: "DeclareFunction";
+ id: Identifier;
+ predicate: DeclaredPredicate | null;
+}
+
+export interface DeclareInterface extends BaseNode {
+ type: "DeclareInterface";
+ id: Identifier;
+ typeParameters: TypeParameterDeclaration | null;
+ extends: Array<InterfaceExtends> | null;
+ body: ObjectTypeAnnotation;
+ implements: Array<ClassImplements> | null;
+ mixins: Array<InterfaceExtends> | null;
+}
+
+export interface DeclareModule extends BaseNode {
+ type: "DeclareModule";
+ id: Identifier | StringLiteral;
+ body: BlockStatement;
+ kind: "CommonJS" | "ES" | null;
+}
+
+export interface DeclareModuleExports extends BaseNode {
+ type: "DeclareModuleExports";
+ typeAnnotation: TypeAnnotation;
+}
+
+export interface DeclareTypeAlias extends BaseNode {
+ type: "DeclareTypeAlias";
+ id: Identifier;
+ typeParameters: TypeParameterDeclaration | null;
+ right: FlowType;
+}
+
+export interface DeclareOpaqueType extends BaseNode {
+ type: "DeclareOpaqueType";
+ id: Identifier;
+ typeParameters: TypeParameterDeclaration | null;
+ supertype: FlowType | null;
+}
+
+export interface DeclareVariable extends BaseNode {
+ type: "DeclareVariable";
+ id: Identifier;
+}
+
+export interface DeclareExportDeclaration extends BaseNode {
+ type: "DeclareExportDeclaration";
+ declaration: Flow | null;
+ specifiers: Array<ExportSpecifier | ExportNamespaceSpecifier> | null;
+ source: StringLiteral | null;
+ default: boolean | null;
+}
+
+export interface DeclareExportAllDeclaration extends BaseNode {
+ type: "DeclareExportAllDeclaration";
+ source: StringLiteral;
+ exportKind: ["type","value"] | null;
+}
+
+export interface DeclaredPredicate extends BaseNode {
+ type: "DeclaredPredicate";
+ value: Flow;
+}
+
+export interface ExistsTypeAnnotation extends BaseNode {
+ type: "ExistsTypeAnnotation";
+}
+
+export interface FunctionTypeAnnotation extends BaseNode {
+ type: "FunctionTypeAnnotation";
+ typeParameters: TypeParameterDeclaration | null;
+ params: Array<FunctionTypeParam>;
+ rest: FunctionTypeParam | null;
+ returnType: FlowType;
+}
+
+export interface FunctionTypeParam extends BaseNode {
+ type: "FunctionTypeParam";
+ name: Identifier | null;
+ typeAnnotation: FlowType;
+ optional: boolean | null;
+}
+
+export interface GenericTypeAnnotation extends BaseNode {
+ type: "GenericTypeAnnotation";
+ id: Identifier | QualifiedTypeIdentifier;
+ typeParameters: TypeParameterInstantiation | null;
+}
+
+export interface InferredPredicate extends BaseNode {
+ type: "InferredPredicate";
+}
+
+export interface InterfaceExtends extends BaseNode {
+ type: "InterfaceExtends";
+ id: Identifier | QualifiedTypeIdentifier;
+ typeParameters: TypeParameterInstantiation | null;
+}
+
+export interface InterfaceDeclaration extends BaseNode {
+ type: "InterfaceDeclaration";
+ id: Identifier;
+ typeParameters: TypeParameterDeclaration | null;
+ extends: Array<InterfaceExtends> | null;
+ body: ObjectTypeAnnotation;
+ implements: Array<ClassImplements> | null;
+ mixins: Array<InterfaceExtends> | null;
+}
+
+export interface InterfaceTypeAnnotation extends BaseNode {
+ type: "InterfaceTypeAnnotation";
+ extends: Array<InterfaceExtends> | null;
+ body: ObjectTypeAnnotation;
+}
+
+export interface IntersectionTypeAnnotation extends BaseNode {
+ type: "IntersectionTypeAnnotation";
+ types: Array<FlowType>;
+}
+
+export interface MixedTypeAnnotation extends BaseNode {
+ type: "MixedTypeAnnotation";
+}
+
+export interface EmptyTypeAnnotation extends BaseNode {
+ type: "EmptyTypeAnnotation";
+}
+
+export interface NullableTypeAnnotation extends BaseNode {
+ type: "NullableTypeAnnotation";
+ typeAnnotation: FlowType;
+}
+
+export interface NumberLiteralTypeAnnotation extends BaseNode {
+ type: "NumberLiteralTypeAnnotation";
+ value: number;
+}
+
+export interface NumberTypeAnnotation extends BaseNode {
+ type: "NumberTypeAnnotation";
+}
+
+export interface ObjectTypeAnnotation extends BaseNode {
+ type: "ObjectTypeAnnotation";
+ properties: Array<ObjectTypeProperty | ObjectTypeSpreadProperty>;
+ indexers: Array<ObjectTypeIndexer> | null;
+ callProperties: Array<ObjectTypeCallProperty> | null;
+ internalSlots: Array<ObjectTypeInternalSlot> | null;
+ exact: boolean;
+ inexact: boolean | null;
+}
+
+export interface ObjectTypeInternalSlot extends BaseNode {
+ type: "ObjectTypeInternalSlot";
+ id: Identifier;
+ value: FlowType;
+ optional: boolean;
+ static: boolean;
+ method: boolean;
+}
+
+export interface ObjectTypeCallProperty extends BaseNode {
+ type: "ObjectTypeCallProperty";
+ value: FlowType;
+ static: boolean | null;
+}
+
+export interface ObjectTypeIndexer extends BaseNode {
+ type: "ObjectTypeIndexer";
+ id: Identifier | null;
+ key: FlowType;
+ value: FlowType;
+ variance: Variance | null;
+ static: boolean | null;
+}
+
+export interface ObjectTypeProperty extends BaseNode {
+ type: "ObjectTypeProperty";
+ key: Identifier | StringLiteral;
+ value: FlowType;
+ variance: Variance | null;
+ kind: "init" | "get" | "set" | null;
+ optional: boolean | null;
+ proto: boolean | null;
+ static: boolean | null;
+}
+
+export interface ObjectTypeSpreadProperty extends BaseNode {
+ type: "ObjectTypeSpreadProperty";
+ argument: FlowType;
+}
+
+export interface OpaqueType extends BaseNode {
+ type: "OpaqueType";
+ id: Identifier;
+ typeParameters: TypeParameterDeclaration | null;
+ supertype: FlowType | null;
+ impltype: FlowType;
+}
+
+export interface QualifiedTypeIdentifier extends BaseNode {
+ type: "QualifiedTypeIdentifier";
+ id: Identifier;
+ qualification: Identifier | QualifiedTypeIdentifier;
+}
+
+export interface StringLiteralTypeAnnotation extends BaseNode {
+ type: "StringLiteralTypeAnnotation";
+ value: string;
+}
+
+export interface StringTypeAnnotation extends BaseNode {
+ type: "StringTypeAnnotation";
+}
+
+export interface ThisTypeAnnotation extends BaseNode {
+ type: "ThisTypeAnnotation";
+}
+
+export interface TupleTypeAnnotation extends BaseNode {
+ type: "TupleTypeAnnotation";
+ types: Array<FlowType>;
+}
+
+export interface TypeofTypeAnnotation extends BaseNode {
+ type: "TypeofTypeAnnotation";
+ argument: FlowType;
+}
+
+export interface TypeAlias extends BaseNode {
+ type: "TypeAlias";
+ id: Identifier;
+ typeParameters: TypeParameterDeclaration | null;
+ right: FlowType;
+}
+
+export interface TypeAnnotation extends BaseNode {
+ type: "TypeAnnotation";
+ typeAnnotation: FlowType;
+}
+
+export interface TypeCastExpression extends BaseNode {
+ type: "TypeCastExpression";
+ expression: Expression;
+ typeAnnotation: TypeAnnotation;
+}
+
+export interface TypeParameter extends BaseNode {
+ type: "TypeParameter";
+ bound: TypeAnnotation | null;
+ default: FlowType | null;
+ variance: Variance | null;
+ name: string | null;
+}
+
+export interface TypeParameterDeclaration extends BaseNode {
+ type: "TypeParameterDeclaration";
+ params: Array<TypeParameter>;
+}
+
+export interface TypeParameterInstantiation extends BaseNode {
+ type: "TypeParameterInstantiation";
+ params: Array<FlowType>;
+}
+
+export interface UnionTypeAnnotation extends BaseNode {
+ type: "UnionTypeAnnotation";
+ types: Array<FlowType>;
+}
+
+export interface Variance extends BaseNode {
+ type: "Variance";
+ kind: "minus" | "plus";
+}
+
+export interface VoidTypeAnnotation extends BaseNode {
+ type: "VoidTypeAnnotation";
+}
+
+export interface JSXAttribute extends BaseNode {
+ type: "JSXAttribute";
+ name: JSXIdentifier | JSXNamespacedName;
+ value: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null;
+}
+
+export interface JSXClosingElement extends BaseNode {
+ type: "JSXClosingElement";
+ name: JSXIdentifier | JSXMemberExpression;
+}
+
+export interface JSXElement extends BaseNode {
+ type: "JSXElement";
+ openingElement: JSXOpeningElement;
+ closingElement: JSXClosingElement | null;
+ children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>;
+ selfClosing: any;
+}
+
+export interface JSXEmptyExpression extends BaseNode {
+ type: "JSXEmptyExpression";
+}
+
+export interface JSXExpressionContainer extends BaseNode {
+ type: "JSXExpressionContainer";
+ expression: Expression | JSXEmptyExpression;
+}
+
+export interface JSXSpreadChild extends BaseNode {
+ type: "JSXSpreadChild";
+ expression: Expression;
+}
+
+export interface JSXIdentifier extends BaseNode {
+ type: "JSXIdentifier";
+ name: string;
+}
+
+export interface JSXMemberExpression extends BaseNode {
+ type: "JSXMemberExpression";
+ object: JSXMemberExpression | JSXIdentifier;
+ property: JSXIdentifier;
+}
+
+export interface JSXNamespacedName extends BaseNode {
+ type: "JSXNamespacedName";
+ namespace: JSXIdentifier;
+ name: JSXIdentifier;
+}
+
+export interface JSXOpeningElement extends BaseNode {
+ type: "JSXOpeningElement";
+ name: JSXIdentifier | JSXMemberExpression;
+ attributes: Array<JSXAttribute | JSXSpreadAttribute>;
+ selfClosing: boolean;
+ typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
+}
+
+export interface JSXSpreadAttribute extends BaseNode {
+ type: "JSXSpreadAttribute";
+ argument: Expression;
+}
+
+export interface JSXText extends BaseNode {
+ type: "JSXText";
+ value: string;
+}
+
+export interface JSXFragment extends BaseNode {
+ type: "JSXFragment";
+ openingFragment: JSXOpeningFragment;
+ closingFragment: JSXClosingFragment;
+ children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>;
+}
+
+export interface JSXOpeningFragment extends BaseNode {
+ type: "JSXOpeningFragment";
+}
+
+export interface JSXClosingFragment extends BaseNode {
+ type: "JSXClosingFragment";
+}
+
+export interface Noop extends BaseNode {
+ type: "Noop";
+}
+
+export interface ParenthesizedExpression extends BaseNode {
+ type: "ParenthesizedExpression";
+ expression: Expression;
+}
+
+export interface AwaitExpression extends BaseNode {
+ type: "AwaitExpression";
+ argument: Expression;
+}
+
+export interface BindExpression extends BaseNode {
+ type: "BindExpression";
+ object: any;
+ callee: any;
+}
+
+export interface ClassProperty extends BaseNode {
+ type: "ClassProperty";
+ key: Identifier | StringLiteral | NumericLiteral | Expression;
+ value: Expression | null;
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ decorators: Array<Decorator> | null;
+ computed: boolean;
+ abstract: boolean | null;
+ accessibility: "public" | "private" | "protected" | null;
+ definite: boolean | null;
+ optional: boolean | null;
+ readonly: boolean | null;
+ static: boolean | null;
+}
+
+export interface OptionalMemberExpression extends BaseNode {
+ type: "OptionalMemberExpression";
+ object: Expression;
+ property: any;
+ computed: boolean;
+ optional: boolean;
+}
+
+export interface PipelineTopicExpression extends BaseNode {
+ type: "PipelineTopicExpression";
+ expression: Expression;
+}
+
+export interface PipelineBareFunction extends BaseNode {
+ type: "PipelineBareFunction";
+ callee: Expression;
+}
+
+export interface PipelinePrimaryTopicReference extends BaseNode {
+ type: "PipelinePrimaryTopicReference";
+}
+
+export interface OptionalCallExpression extends BaseNode {
+ type: "OptionalCallExpression";
+ callee: Expression;
+ arguments: Array<Expression | SpreadElement | JSXNamespacedName>;
+ optional: boolean;
+ typeArguments: TypeParameterInstantiation | null;
+ typeParameters: TSTypeParameterInstantiation | null;
+}
+
+export interface ClassPrivateProperty extends BaseNode {
+ type: "ClassPrivateProperty";
+ key: PrivateName;
+ value: Expression | null;
+}
+
+export interface ClassPrivateMethod extends BaseNode {
+ type: "ClassPrivateMethod";
+ kind: "get" | "set" | "method" | "constructor";
+ key: PrivateName;
+ params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
+ body: BlockStatement;
+ static: boolean | null;
+ abstract: boolean | null;
+ access: "public" | "private" | "protected" | null;
+ accessibility: "public" | "private" | "protected" | null;
+ async: boolean;
+ computed: boolean;
+ decorators: Array<Decorator> | null;
+ generator: boolean;
+ optional: boolean | null;
+ returnType: any | null;
+ typeParameters: any | null;
+}
+
+export interface Import extends BaseNode {
+ type: "Import";
+}
+
+export interface Decorator extends BaseNode {
+ type: "Decorator";
+ expression: Expression;
+}
+
+export interface DoExpression extends BaseNode {
+ type: "DoExpression";
+ body: BlockStatement;
+}
+
+export interface ExportDefaultSpecifier extends BaseNode {
+ type: "ExportDefaultSpecifier";
+ exported: Identifier;
+}
+
+export interface ExportNamespaceSpecifier extends BaseNode {
+ type: "ExportNamespaceSpecifier";
+ exported: Identifier;
+}
+
+export interface PrivateName extends BaseNode {
+ type: "PrivateName";
+ id: Identifier;
+}
+
+export interface BigIntLiteral extends BaseNode {
+ type: "BigIntLiteral";
+ value: string;
+}
+
+export interface TSParameterProperty extends BaseNode {
+ type: "TSParameterProperty";
+ parameter: Identifier | AssignmentPattern;
+ accessibility: "public" | "private" | "protected" | null;
+ readonly: boolean | null;
+}
+
+export interface TSDeclareFunction extends BaseNode {
+ type: "TSDeclareFunction";
+ id: Identifier | null;
+ typeParameters: TSTypeParameterDeclaration | Noop | null;
+ params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
+ returnType: TSTypeAnnotation | Noop | null;
+ async: boolean;
+ declare: boolean | null;
+ generator: boolean;
+}
+
+export interface TSDeclareMethod extends BaseNode {
+ type: "TSDeclareMethod";
+ decorators: Array<Decorator> | null;
+ key: Identifier | StringLiteral | NumericLiteral | Expression;
+ typeParameters: TSTypeParameterDeclaration | Noop | null;
+ params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
+ returnType: TSTypeAnnotation | Noop | null;
+ abstract: boolean | null;
+ access: "public" | "private" | "protected" | null;
+ accessibility: "public" | "private" | "protected" | null;
+ async: boolean;
+ computed: boolean;
+ generator: boolean;
+ kind: "get" | "set" | "method" | "constructor";
+ optional: boolean | null;
+ static: boolean | null;
+}
+
+export interface TSQualifiedName extends BaseNode {
+ type: "TSQualifiedName";
+ left: TSEntityName;
+ right: Identifier;
+}
+
+export interface TSCallSignatureDeclaration extends BaseNode {
+ type: "TSCallSignatureDeclaration";
+ typeParameters: TSTypeParameterDeclaration | null;
+ parameters: Array<Identifier | RestElement> | null;
+ typeAnnotation: TSTypeAnnotation | null;
+}
+
+export interface TSConstructSignatureDeclaration extends BaseNode {
+ type: "TSConstructSignatureDeclaration";
+ typeParameters: TSTypeParameterDeclaration | null;
+ parameters: Array<Identifier | RestElement> | null;
+ typeAnnotation: TSTypeAnnotation | null;
+}
+
+export interface TSPropertySignature extends BaseNode {
+ type: "TSPropertySignature";
+ key: Expression;
+ typeAnnotation: TSTypeAnnotation | null;
+ initializer: Expression | null;
+ computed: boolean | null;
+ optional: boolean | null;
+ readonly: boolean | null;
+}
+
+export interface TSMethodSignature extends BaseNode {
+ type: "TSMethodSignature";
+ key: Expression;
+ typeParameters: TSTypeParameterDeclaration | null;
+ parameters: Array<Identifier | RestElement> | null;
+ typeAnnotation: TSTypeAnnotation | null;
+ computed: boolean | null;
+ optional: boolean | null;
+}
+
+export interface TSIndexSignature extends BaseNode {
+ type: "TSIndexSignature";
+ parameters: Array<Identifier>;
+ typeAnnotation: TSTypeAnnotation | null;
+ readonly: boolean | null;
+}
+
+export interface TSAnyKeyword extends BaseNode {
+ type: "TSAnyKeyword";
+}
+
+export interface TSUnknownKeyword extends BaseNode {
+ type: "TSUnknownKeyword";
+}
+
+export interface TSNumberKeyword extends BaseNode {
+ type: "TSNumberKeyword";
+}
+
+export interface TSObjectKeyword extends BaseNode {
+ type: "TSObjectKeyword";
+}
+
+export interface TSBooleanKeyword extends BaseNode {
+ type: "TSBooleanKeyword";
+}
+
+export interface TSStringKeyword extends BaseNode {
+ type: "TSStringKeyword";
+}
+
+export interface TSSymbolKeyword extends BaseNode {
+ type: "TSSymbolKeyword";
+}
+
+export interface TSVoidKeyword extends BaseNode {
+ type: "TSVoidKeyword";
+}
+
+export interface TSUndefinedKeyword extends BaseNode {
+ type: "TSUndefinedKeyword";
+}
+
+export interface TSNullKeyword extends BaseNode {
+ type: "TSNullKeyword";
+}
+
+export interface TSNeverKeyword extends BaseNode {
+ type: "TSNeverKeyword";
+}
+
+export interface TSThisType extends BaseNode {
+ type: "TSThisType";
+}
+
+export interface TSFunctionType extends BaseNode {
+ type: "TSFunctionType";
+ typeParameters: TSTypeParameterDeclaration | null;
+ typeAnnotation: TSTypeAnnotation | null;
+ parameters: Array<Identifier | RestElement> | null;
+}
+
+export interface TSConstructorType extends BaseNode {
+ type: "TSConstructorType";
+ typeParameters: TSTypeParameterDeclaration | null;
+ typeAnnotation: TSTypeAnnotation | null;
+ parameters: Array<Identifier | RestElement> | null;
+}
+
+export interface TSTypeReference extends BaseNode {
+ type: "TSTypeReference";
+ typeName: TSEntityName;
+ typeParameters: TSTypeParameterInstantiation | null;
+}
+
+export interface TSTypePredicate extends BaseNode {
+ type: "TSTypePredicate";
+ parameterName: Identifier | TSThisType;
+ typeAnnotation: TSTypeAnnotation;
+}
+
+export interface TSTypeQuery extends BaseNode {
+ type: "TSTypeQuery";
+ exprName: TSEntityName | TSImportType;
+}
+
+export interface TSTypeLiteral extends BaseNode {
+ type: "TSTypeLiteral";
+ members: Array<TSTypeElement>;
+}
+
+export interface TSArrayType extends BaseNode {
+ type: "TSArrayType";
+ elementType: TSType;
+}
+
+export interface TSTupleType extends BaseNode {
+ type: "TSTupleType";
+ elementTypes: Array<TSType>;
+}
+
+export interface TSOptionalType extends BaseNode {
+ type: "TSOptionalType";
+ typeAnnotation: TSType;
+}
+
+export interface TSRestType extends BaseNode {
+ type: "TSRestType";
+ typeAnnotation: TSType;
+}
+
+export interface TSUnionType extends BaseNode {
+ type: "TSUnionType";
+ types: Array<TSType>;
+}
+
+export interface TSIntersectionType extends BaseNode {
+ type: "TSIntersectionType";
+ types: Array<TSType>;
+}
+
+export interface TSConditionalType extends BaseNode {
+ type: "TSConditionalType";
+ checkType: TSType;
+ extendsType: TSType;
+ trueType: TSType;
+ falseType: TSType;
+}
+
+export interface TSInferType extends BaseNode {
+ type: "TSInferType";
+ typeParameter: TSTypeParameter;
+}
+
+export interface TSParenthesizedType extends BaseNode {
+ type: "TSParenthesizedType";
+ typeAnnotation: TSType;
+}
+
+export interface TSTypeOperator extends BaseNode {
+ type: "TSTypeOperator";
+ typeAnnotation: TSType;
+ operator: string | null;
+}
+
+export interface TSIndexedAccessType extends BaseNode {
+ type: "TSIndexedAccessType";
+ objectType: TSType;
+ indexType: TSType;
+}
+
+export interface TSMappedType extends BaseNode {
+ type: "TSMappedType";
+ typeParameter: TSTypeParameter;
+ typeAnnotation: TSType | null;
+ optional: boolean | null;
+ readonly: boolean | null;
+}
+
+export interface TSLiteralType extends BaseNode {
+ type: "TSLiteralType";
+ literal: NumericLiteral | StringLiteral | BooleanLiteral;
+}
+
+export interface TSExpressionWithTypeArguments extends BaseNode {
+ type: "TSExpressionWithTypeArguments";
+ expression: TSEntityName;
+ typeParameters: TSTypeParameterInstantiation | null;
+}
+
+export interface TSInterfaceDeclaration extends BaseNode {
+ type: "TSInterfaceDeclaration";
+ id: Identifier;
+ typeParameters: TSTypeParameterDeclaration | null;
+ extends: Array<TSExpressionWithTypeArguments> | null;
+ body: TSInterfaceBody;
+ declare: boolean | null;
+}
+
+export interface TSInterfaceBody extends BaseNode {
+ type: "TSInterfaceBody";
+ body: Array<TSTypeElement>;
+}
+
+export interface TSTypeAliasDeclaration extends BaseNode {
+ type: "TSTypeAliasDeclaration";
+ id: Identifier;
+ typeParameters: TSTypeParameterDeclaration | null;
+ typeAnnotation: TSType;
+ declare: boolean | null;
+}
+
+export interface TSAsExpression extends BaseNode {
+ type: "TSAsExpression";
+ expression: Expression;
+ typeAnnotation: TSType;
+}
+
+export interface TSTypeAssertion extends BaseNode {
+ type: "TSTypeAssertion";
+ typeAnnotation: TSType;
+ expression: Expression;
+}
+
+export interface TSEnumDeclaration extends BaseNode {
+ type: "TSEnumDeclaration";
+ id: Identifier;
+ members: Array<TSEnumMember>;
+ const: boolean | null;
+ declare: boolean | null;
+ initializer: Expression | null;
+}
+
+export interface TSEnumMember extends BaseNode {
+ type: "TSEnumMember";
+ id: Identifier | StringLiteral;
+ initializer: Expression | null;
+}
+
+export interface TSModuleDeclaration extends BaseNode {
+ type: "TSModuleDeclaration";
+ id: Identifier | StringLiteral;
+ body: TSModuleBlock | TSModuleDeclaration;
+ declare: boolean | null;
+ global: boolean | null;
+}
+
+export interface TSModuleBlock extends BaseNode {
+ type: "TSModuleBlock";
+ body: Array<Statement>;
+}
+
+export interface TSImportType extends BaseNode {
+ type: "TSImportType";
+ argument: StringLiteral;
+ qualifier: TSEntityName | null;
+ typeParameters: TSTypeParameterInstantiation | null;
+}
+
+export interface TSImportEqualsDeclaration extends BaseNode {
+ type: "TSImportEqualsDeclaration";
+ id: Identifier;
+ moduleReference: TSEntityName | TSExternalModuleReference;
+ isExport: boolean | null;
+}
+
+export interface TSExternalModuleReference extends BaseNode {
+ type: "TSExternalModuleReference";
+ expression: StringLiteral;
+}
+
+export interface TSNonNullExpression extends BaseNode {
+ type: "TSNonNullExpression";
+ expression: Expression;
+}
+
+export interface TSExportAssignment extends BaseNode {
+ type: "TSExportAssignment";
+ expression: Expression;
+}
+
+export interface TSNamespaceExportDeclaration extends BaseNode {
+ type: "TSNamespaceExportDeclaration";
+ id: Identifier;
+}
+
+export interface TSTypeAnnotation extends BaseNode {
+ type: "TSTypeAnnotation";
+ typeAnnotation: TSType;
+}
+
+export interface TSTypeParameterInstantiation extends BaseNode {
+ type: "TSTypeParameterInstantiation";
+ params: Array<TSType>;
+}
+
+export interface TSTypeParameterDeclaration extends BaseNode {
+ type: "TSTypeParameterDeclaration";
+ params: Array<TSTypeParameter>;
+}
+
+export interface TSTypeParameter extends BaseNode {
+ type: "TSTypeParameter";
+ constraint: TSType | null;
+ default: TSType | null;
+ name: string | null;
+}
+
+/**
+ * @deprecated Use `NumericLiteral`
+ */
+export type NumberLiteral = NumericLiteral;
+
+/**
+ * @deprecated Use `RegExpLiteral`
+ */
+export type RegexLiteral = RegExpLiteral;
+
+/**
+ * @deprecated Use `RestElement`
+ */
+export type RestProperty = RestElement;
+
+/**
+ * @deprecated Use `SpreadElement`
+ */
+export type SpreadProperty = SpreadElement;
+
+export type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | TypeCastExpression | JSXElement | JSXFragment | ParenthesizedExpression | AwaitExpression | BindExpression | OptionalMemberExpression | PipelinePrimaryTopicReference | OptionalCallExpression | Import | DoExpression | BigIntLiteral | TSAsExpression | TSTypeAssertion | TSNonNullExpression;
+export type Binary = BinaryExpression | LogicalExpression;
+export type Scopable = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassDeclaration | ClassExpression | ForOfStatement | ClassMethod | ClassPrivateMethod;
+export type BlockParent = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ForOfStatement | ClassMethod | ClassPrivateMethod;
+export type Block = BlockStatement | Program;
+export type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForStatement | FunctionDeclaration | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ForOfStatement | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration | TSExportAssignment | TSNamespaceExportDeclaration;
+export type Terminatorless = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement | YieldExpression | AwaitExpression;
+export type CompletionStatement = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement;
+export type Conditional = ConditionalExpression | IfStatement;
+export type Loop = DoWhileStatement | ForInStatement | ForStatement | WhileStatement | ForOfStatement;
+export type While = DoWhileStatement | WhileStatement;
+export type ExpressionWrapper = ExpressionStatement | TypeCastExpression | ParenthesizedExpression;
+export type For = ForInStatement | ForStatement | ForOfStatement;
+export type ForXStatement = ForInStatement | ForOfStatement;
+export type Function = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod;
+export type FunctionParent = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod;
+export type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | ArrowFunctionExpression | ClassDeclaration | ClassExpression | BigIntLiteral;
+export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration;
+export type PatternLike = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern;
+export type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty;
+export type TSEntityName = Identifier | TSQualifiedName;
+export type Literal = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | TemplateLiteral | BigIntLiteral;
+export type Immutable = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXSpreadChild | JSXOpeningElement | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment | BigIntLiteral;
+export type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty;
+export type Method = ObjectMethod | ClassMethod | ClassPrivateMethod;
+export type ObjectMember = ObjectMethod | ObjectProperty;
+export type Property = ObjectProperty | ClassProperty | ClassPrivateProperty;
+export type UnaryLike = UnaryExpression | SpreadElement;
+export type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern;
+export type Class = ClassDeclaration | ClassExpression;
+export type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration;
+export type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration;
+export type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier;
+export type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | DeclaredPredicate | ExistsTypeAnnotation | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InferredPredicate | InterfaceExtends | InterfaceDeclaration | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | QualifiedTypeIdentifier | StringLiteralTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | UnionTypeAnnotation | Variance | VoidTypeAnnotation;
+export type FlowType = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation;
+export type FlowBaseAnnotation = AnyTypeAnnotation | BooleanTypeAnnotation | NullLiteralTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NumberTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | VoidTypeAnnotation;
+export type FlowDeclaration = DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias;
+export type FlowPredicate = DeclaredPredicate | InferredPredicate;
+export type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXSpreadChild | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment;
+export type Private = ClassPrivateProperty | ClassPrivateMethod | PrivateName;
+export type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature;
+export type TSType = TSAnyKeyword | TSUnknownKeyword | TSNumberKeyword | TSObjectKeyword | TSBooleanKeyword | TSStringKeyword | TSSymbolKeyword | TSVoidKeyword | TSUndefinedKeyword | TSNullKeyword | TSNeverKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSImportType;
+
+export interface Aliases {
+ Expression: Expression;
+ Binary: Binary;
+ Scopable: Scopable;
+ BlockParent: BlockParent;
+ Block: Block;
+ Statement: Statement;
+ Terminatorless: Terminatorless;
+ CompletionStatement: CompletionStatement;
+ Conditional: Conditional;
+ Loop: Loop;
+ While: While;
+ ExpressionWrapper: ExpressionWrapper;
+ For: For;
+ ForXStatement: ForXStatement;
+ Function: Function;
+ FunctionParent: FunctionParent;
+ Pureish: Pureish;
+ Declaration: Declaration;
+ PatternLike: PatternLike;
+ LVal: LVal;
+ TSEntityName: TSEntityName;
+ Literal: Literal;
+ Immutable: Immutable;
+ UserWhitespacable: UserWhitespacable;
+ Method: Method;
+ ObjectMember: ObjectMember;
+ Property: Property;
+ UnaryLike: UnaryLike;
+ Pattern: Pattern;
+ Class: Class;
+ ModuleDeclaration: ModuleDeclaration;
+ ExportDeclaration: ExportDeclaration;
+ ModuleSpecifier: ModuleSpecifier;
+ Flow: Flow;
+ FlowType: FlowType;
+ FlowBaseAnnotation: FlowBaseAnnotation;
+ FlowDeclaration: FlowDeclaration;
+ FlowPredicate: FlowPredicate;
+ JSX: JSX;
+ Private: Private;
+ TSTypeElement: TSTypeElement;
+ TSType: TSType;
+}
+
+export function arrayExpression(elements?: Array<null | Expression | SpreadElement>): ArrayExpression;
+export function assignmentExpression(operator: string, left: LVal, right: Expression): AssignmentExpression;
+export function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: Expression, right: Expression): BinaryExpression;
+export function interpreterDirective(value: string): InterpreterDirective;
+export function directive(value: DirectiveLiteral): Directive;
+export function directiveLiteral(value: string): DirectiveLiteral;
+export function blockStatement(body: Array<Statement>, directives?: Array<Directive>): BlockStatement;
+export function breakStatement(label?: Identifier | null): BreakStatement;
+export function callExpression(callee: Expression, _arguments: Array<Expression | SpreadElement | JSXNamespacedName>, optional?: true | false | null, typeArguments?: TypeParameterInstantiation | null, typeParameters?: TSTypeParameterInstantiation | null): CallExpression;
+export function catchClause(param: Identifier | null | undefined, body: BlockStatement): CatchClause;
+export function conditionalExpression(test: Expression, consequent: Expression, alternate: Expression): ConditionalExpression;
+export function continueStatement(label?: Identifier | null): ContinueStatement;
+export function debuggerStatement(): DebuggerStatement;
+export function doWhileStatement(test: Expression, body: Statement): DoWhileStatement;
+export function emptyStatement(): EmptyStatement;
+export function expressionStatement(expression: Expression): ExpressionStatement;
+export function file(program: Program, comments: any, tokens: any): File;
+export function forInStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement): ForInStatement;
+export function forStatement(init: VariableDeclaration | Expression | null | undefined, test: Expression | null | undefined, update: Expression | null | undefined, body: Statement): ForStatement;
+export function functionDeclaration(id: Identifier | null | undefined, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, generator?: boolean, async?: boolean, declare?: boolean | null, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): FunctionDeclaration;
+export function functionExpression(id: Identifier | null | undefined, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, generator?: boolean, async?: boolean, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): FunctionExpression;
+export function identifier(name: string, decorators?: Array<Decorator> | null, optional?: boolean | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): Identifier;
+export function ifStatement(test: Expression, consequent: Statement, alternate?: Statement | null): IfStatement;
+export function labeledStatement(label: Identifier, body: Statement): LabeledStatement;
+export function stringLiteral(value: string): StringLiteral;
+export function numericLiteral(value: number): NumericLiteral;
+export function nullLiteral(): NullLiteral;
+export function booleanLiteral(value: boolean): BooleanLiteral;
+export function regExpLiteral(pattern: string, flags?: string): RegExpLiteral;
+export function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression;
+export function memberExpression(object: Expression, property: any, computed?: boolean, optional?: true | false | null): MemberExpression;
+export function newExpression(callee: Expression, _arguments: Array<Expression | SpreadElement | JSXNamespacedName>, optional?: true | false | null, typeArguments?: TypeParameterInstantiation | null, typeParameters?: TSTypeParameterInstantiation | null): NewExpression;
+export function program(body: Array<Statement>, directives?: Array<Directive>, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null, sourceFile?: string | null): Program;
+export function objectExpression(properties: Array<ObjectMethod | ObjectProperty | SpreadElement>): ObjectExpression;
+export function objectMethod(kind: "method" | "get" | "set" | undefined, key: any, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, computed?: boolean, async?: boolean, decorators?: Array<Decorator> | null, generator?: boolean, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ObjectMethod;
+export function objectProperty(key: any, value: Expression | PatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array<Decorator> | null): ObjectProperty;
+export function restElement(argument: LVal, decorators?: Array<Decorator> | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): RestElement;
+export function returnStatement(argument?: Expression | null): ReturnStatement;
+export function sequenceExpression(expressions: Array<Expression>): SequenceExpression;
+export function switchCase(test: Expression | null | undefined, consequent: Array<Statement>): SwitchCase;
+export function switchStatement(discriminant: Expression, cases: Array<SwitchCase>): SwitchStatement;
+export function thisExpression(): ThisExpression;
+export function throwStatement(argument: Expression): ThrowStatement;
+export function tryStatement(block: BlockStatement, handler?: CatchClause | null, finalizer?: BlockStatement | null): TryStatement;
+export function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: Expression, prefix?: boolean): UnaryExpression;
+export function updateExpression(operator: "++" | "--", argument: Expression, prefix?: boolean): UpdateExpression;
+export function variableDeclaration(kind: "var" | "let" | "const", declarations: Array<VariableDeclarator>, declare?: boolean | null): VariableDeclaration;
+export function variableDeclarator(id: LVal, init?: Expression | null, definite?: boolean | null): VariableDeclarator;
+export function whileStatement(test: Expression, body: BlockStatement | Statement): WhileStatement;
+export function withStatement(object: Expression, body: BlockStatement | Statement): WithStatement;
+export function assignmentPattern(left: Identifier | ObjectPattern | ArrayPattern, right: Expression, decorators?: Array<Decorator> | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): AssignmentPattern;
+export function arrayPattern(elements: Array<PatternLike>, decorators?: Array<Decorator> | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): ArrayPattern;
+export function arrowFunctionExpression(params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement | Expression, async?: boolean, expression?: boolean | null, generator?: boolean, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ArrowFunctionExpression;
+export function classBody(body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | TSDeclareMethod | TSIndexSignature>): ClassBody;
+export function classDeclaration(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array<Decorator> | null, abstract?: boolean | null, declare?: boolean | null, _implements?: Array<TSExpressionWithTypeArguments | ClassImplements> | null, mixins?: any | null, superTypeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ClassDeclaration;
+export function classExpression(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array<Decorator> | null, _implements?: Array<TSExpressionWithTypeArguments | ClassImplements> | null, mixins?: any | null, superTypeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ClassExpression;
+export function exportAllDeclaration(source: StringLiteral): ExportAllDeclaration;
+export function exportDefaultDeclaration(declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression): ExportDefaultDeclaration;
+export function exportNamedDeclaration(declaration: Declaration | null | undefined, specifiers: Array<ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier>, source?: StringLiteral | null): ExportNamedDeclaration;
+export function exportSpecifier(local: Identifier, exported: Identifier): ExportSpecifier;
+export function forOfStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement, _await?: boolean): ForOfStatement;
+export function importDeclaration(specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>, source: StringLiteral, importKind?: "type" | "typeof" | "value" | null): ImportDeclaration;
+export function importDefaultSpecifier(local: Identifier): ImportDefaultSpecifier;
+export function importNamespaceSpecifier(local: Identifier): ImportNamespaceSpecifier;
+export function importSpecifier(local: Identifier, imported: Identifier, importKind?: "type" | "typeof" | null): ImportSpecifier;
+export function metaProperty(meta: Identifier, property: Identifier): MetaProperty;
+export function classMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, computed?: boolean, _static?: boolean | null, abstract?: boolean | null, access?: "public" | "private" | "protected" | null, accessibility?: "public" | "private" | "protected" | null, async?: boolean, decorators?: Array<Decorator> | null, generator?: boolean, optional?: boolean | null, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ClassMethod;
+export function objectPattern(properties: Array<RestElement | ObjectProperty>, decorators?: Array<Decorator> | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): ObjectPattern;
+export function spreadElement(argument: Expression): SpreadElement;
+export function taggedTemplateExpression(tag: Expression, quasi: TemplateLiteral, typeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null): TaggedTemplateExpression;
+export function templateElement(value: any, tail?: boolean): TemplateElement;
+export function templateLiteral(quasis: Array<TemplateElement>, expressions: Array<Expression>): TemplateLiteral;
+export function yieldExpression(argument?: Expression | null, delegate?: boolean): YieldExpression;
+export function anyTypeAnnotation(): AnyTypeAnnotation;
+export function arrayTypeAnnotation(elementType: FlowType): ArrayTypeAnnotation;
+export function booleanTypeAnnotation(): BooleanTypeAnnotation;
+export function booleanLiteralTypeAnnotation(value: boolean): BooleanLiteralTypeAnnotation;
+export function nullLiteralTypeAnnotation(): NullLiteralTypeAnnotation;
+export function classImplements(id: Identifier, typeParameters?: TypeParameterInstantiation | null): ClassImplements;
+export function declareClass(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation, _implements?: Array<ClassImplements> | null, mixins?: Array<InterfaceExtends> | null): DeclareClass;
+export function declareFunction(id: Identifier, predicate?: DeclaredPredicate | null): DeclareFunction;
+export function declareInterface(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation, _implements?: Array<ClassImplements> | null, mixins?: Array<InterfaceExtends> | null): DeclareInterface;
+export function declareModule(id: Identifier | StringLiteral, body: BlockStatement, kind?: "CommonJS" | "ES" | null): DeclareModule;
+export function declareModuleExports(typeAnnotation: TypeAnnotation): DeclareModuleExports;
+export function declareTypeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): DeclareTypeAlias;
+export function declareOpaqueType(id: Identifier, typeParameters?: TypeParameterDeclaration | null, supertype?: FlowType | null): DeclareOpaqueType;
+export function declareVariable(id: Identifier): DeclareVariable;
+export function declareExportDeclaration(declaration?: Flow | null, specifiers?: Array<ExportSpecifier | ExportNamespaceSpecifier> | null, source?: StringLiteral | null, _default?: boolean | null): DeclareExportDeclaration;
+export function declareExportAllDeclaration(source: StringLiteral, exportKind?: ["type","value"] | null): DeclareExportAllDeclaration;
+export function declaredPredicate(value: Flow): DeclaredPredicate;
+export function existsTypeAnnotation(): ExistsTypeAnnotation;
+export function functionTypeAnnotation(typeParameters: TypeParameterDeclaration | null | undefined, params: Array<FunctionTypeParam>, rest: FunctionTypeParam | null | undefined, returnType: FlowType): FunctionTypeAnnotation;
+export function functionTypeParam(name: Identifier | null | undefined, typeAnnotation: FlowType, optional?: boolean | null): FunctionTypeParam;
+export function genericTypeAnnotation(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): GenericTypeAnnotation;
+export function inferredPredicate(): InferredPredicate;
+export function interfaceExtends(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): InterfaceExtends;
+export function interfaceDeclaration(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation, _implements?: Array<ClassImplements> | null, mixins?: Array<InterfaceExtends> | null): InterfaceDeclaration;
+export function interfaceTypeAnnotation(_extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): InterfaceTypeAnnotation;
+export function intersectionTypeAnnotation(types: Array<FlowType>): IntersectionTypeAnnotation;
+export function mixedTypeAnnotation(): MixedTypeAnnotation;
+export function emptyTypeAnnotation(): EmptyTypeAnnotation;
+export function nullableTypeAnnotation(typeAnnotation: FlowType): NullableTypeAnnotation;
+export function numberLiteralTypeAnnotation(value: number): NumberLiteralTypeAnnotation;
+export function numberTypeAnnotation(): NumberTypeAnnotation;
+export function objectTypeAnnotation(properties: Array<ObjectTypeProperty | ObjectTypeSpreadProperty>, indexers?: Array<ObjectTypeIndexer> | null, callProperties?: Array<ObjectTypeCallProperty> | null, internalSlots?: Array<ObjectTypeInternalSlot> | null, exact?: boolean, inexact?: boolean | null): ObjectTypeAnnotation;
+export function objectTypeInternalSlot(id: Identifier, value: FlowType, optional: boolean, _static: boolean, method: boolean): ObjectTypeInternalSlot;
+export function objectTypeCallProperty(value: FlowType, _static?: boolean | null): ObjectTypeCallProperty;
+export function objectTypeIndexer(id: Identifier | null | undefined, key: FlowType, value: FlowType, variance?: Variance | null, _static?: boolean | null): ObjectTypeIndexer;
+export function objectTypeProperty(key: Identifier | StringLiteral, value: FlowType, variance?: Variance | null, kind?: "init" | "get" | "set" | null, optional?: boolean | null, proto?: boolean | null, _static?: boolean | null): ObjectTypeProperty;
+export function objectTypeSpreadProperty(argument: FlowType): ObjectTypeSpreadProperty;
+export function opaqueType(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, supertype: FlowType | null | undefined, impltype: FlowType): OpaqueType;
+export function qualifiedTypeIdentifier(id: Identifier, qualification: Identifier | QualifiedTypeIdentifier): QualifiedTypeIdentifier;
+export function stringLiteralTypeAnnotation(value: string): StringLiteralTypeAnnotation;
+export function stringTypeAnnotation(): StringTypeAnnotation;
+export function thisTypeAnnotation(): ThisTypeAnnotation;
+export function tupleTypeAnnotation(types: Array<FlowType>): TupleTypeAnnotation;
+export function typeofTypeAnnotation(argument: FlowType): TypeofTypeAnnotation;
+export function typeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): TypeAlias;
+export function typeAnnotation(typeAnnotation: FlowType): TypeAnnotation;
+export function typeCastExpression(expression: Expression, typeAnnotation: TypeAnnotation): TypeCastExpression;
+export function typeParameter(bound?: TypeAnnotation | null, _default?: FlowType | null, variance?: Variance | null, name?: string | null): TypeParameter;
+export function typeParameterDeclaration(params: Array<TypeParameter>): TypeParameterDeclaration;
+export function typeParameterInstantiation(params: Array<FlowType>): TypeParameterInstantiation;
+export function unionTypeAnnotation(types: Array<FlowType>): UnionTypeAnnotation;
+export function variance(kind: "minus" | "plus"): Variance;
+export function voidTypeAnnotation(): VoidTypeAnnotation;
+export function jsxAttribute(name: JSXIdentifier | JSXNamespacedName, value?: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null): JSXAttribute;
+export function jsxClosingElement(name: JSXIdentifier | JSXMemberExpression): JSXClosingElement;
+export function jsxElement(openingElement: JSXOpeningElement, closingElement: JSXClosingElement | null | undefined, children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>, selfClosing: any): JSXElement;
+export function jsxEmptyExpression(): JSXEmptyExpression;
+export function jsxExpressionContainer(expression: Expression | JSXEmptyExpression): JSXExpressionContainer;
+export function jsxSpreadChild(expression: Expression): JSXSpreadChild;
+export function jsxIdentifier(name: string): JSXIdentifier;
+export function jsxMemberExpression(object: JSXMemberExpression | JSXIdentifier, property: JSXIdentifier): JSXMemberExpression;
+export function jsxNamespacedName(namespace: JSXIdentifier, name: JSXIdentifier): JSXNamespacedName;
+export function jsxOpeningElement(name: JSXIdentifier | JSXMemberExpression, attributes: Array<JSXAttribute | JSXSpreadAttribute>, selfClosing?: boolean, typeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null): JSXOpeningElement;
+export function jsxSpreadAttribute(argument: Expression): JSXSpreadAttribute;
+export function jsxText(value: string): JSXText;
+export function jsxFragment(openingFragment: JSXOpeningFragment, closingFragment: JSXClosingFragment, children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>): JSXFragment;
+export function jsxOpeningFragment(): JSXOpeningFragment;
+export function jsxClosingFragment(): JSXClosingFragment;
+export function noop(): Noop;
+export function parenthesizedExpression(expression: Expression): ParenthesizedExpression;
+export function awaitExpression(argument: Expression): AwaitExpression;
+export function bindExpression(object: any, callee: any): BindExpression;
+export function classProperty(key: Identifier | StringLiteral | NumericLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, abstract?: boolean | null, accessibility?: "public" | "private" | "protected" | null, definite?: boolean | null, optional?: boolean | null, readonly?: boolean | null, _static?: boolean | null): ClassProperty;
+export function optionalMemberExpression(object: Expression, property: any, computed: boolean | undefined, optional: boolean): OptionalMemberExpression;
+export function pipelineTopicExpression(expression: Expression): PipelineTopicExpression;
+export function pipelineBareFunction(callee: Expression): PipelineBareFunction;
+export function pipelinePrimaryTopicReference(): PipelinePrimaryTopicReference;
+export function optionalCallExpression(callee: Expression, _arguments: Array<Expression | SpreadElement | JSXNamespacedName>, optional: boolean, typeArguments?: TypeParameterInstantiation | null, typeParameters?: TSTypeParameterInstantiation | null): OptionalCallExpression;
+export function classPrivateProperty(key: PrivateName, value?: Expression | null): ClassPrivateProperty;
+export function classPrivateMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: PrivateName, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, _static?: boolean | null, abstract?: boolean | null, access?: "public" | "private" | "protected" | null, accessibility?: "public" | "private" | "protected" | null, async?: boolean, computed?: boolean, decorators?: Array<Decorator> | null, generator?: boolean, optional?: boolean | null, returnType?: any | null, typeParameters?: any | null): ClassPrivateMethod;
+export function decorator(expression: Expression): Decorator;
+export function doExpression(body: BlockStatement): DoExpression;
+export function exportDefaultSpecifier(exported: Identifier): ExportDefaultSpecifier;
+export function exportNamespaceSpecifier(exported: Identifier): ExportNamespaceSpecifier;
+export function privateName(id: Identifier): PrivateName;
+export function bigIntLiteral(value: string): BigIntLiteral;
+export function tsParameterProperty(parameter: Identifier | AssignmentPattern, accessibility?: "public" | "private" | "protected" | null, readonly?: boolean | null): TSParameterProperty;
+export function tsDeclareFunction(id: Identifier | null | undefined, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, returnType?: TSTypeAnnotation | Noop | null, async?: boolean, declare?: boolean | null, generator?: boolean): TSDeclareFunction;
+export function tsDeclareMethod(decorators: Array<Decorator> | null | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, returnType?: TSTypeAnnotation | Noop | null, abstract?: boolean | null, access?: "public" | "private" | "protected" | null, accessibility?: "public" | "private" | "protected" | null, async?: boolean, computed?: boolean, generator?: boolean, kind?: "get" | "set" | "method" | "constructor", optional?: boolean | null, _static?: boolean | null): TSDeclareMethod;
+export function tsQualifiedName(left: TSEntityName, right: Identifier): TSQualifiedName;
+export function tsCallSignatureDeclaration(typeParameters?: TSTypeParameterDeclaration | null, parameters?: Array<Identifier | RestElement> | null, typeAnnotation?: TSTypeAnnotation | null): TSCallSignatureDeclaration;
+export function tsConstructSignatureDeclaration(typeParameters?: TSTypeParameterDeclaration | null, parameters?: Array<Identifier | RestElement> | null, typeAnnotation?: TSTypeAnnotation | null): TSConstructSignatureDeclaration;
+export function tsPropertySignature(key: Expression, typeAnnotation?: TSTypeAnnotation | null, initializer?: Expression | null, computed?: boolean | null, optional?: boolean | null, readonly?: boolean | null): TSPropertySignature;
+export function tsMethodSignature(key: Expression, typeParameters?: TSTypeParameterDeclaration | null, parameters?: Array<Identifier | RestElement> | null, typeAnnotation?: TSTypeAnnotation | null, computed?: boolean | null, optional?: boolean | null): TSMethodSignature;
+export function tsIndexSignature(parameters: Array<Identifier>, typeAnnotation?: TSTypeAnnotation | null, readonly?: boolean | null): TSIndexSignature;
+export function tsAnyKeyword(): TSAnyKeyword;
+export function tsUnknownKeyword(): TSUnknownKeyword;
+export function tsNumberKeyword(): TSNumberKeyword;
+export function tsObjectKeyword(): TSObjectKeyword;
+export function tsBooleanKeyword(): TSBooleanKeyword;
+export function tsStringKeyword(): TSStringKeyword;
+export function tsSymbolKeyword(): TSSymbolKeyword;
+export function tsVoidKeyword(): TSVoidKeyword;
+export function tsUndefinedKeyword(): TSUndefinedKeyword;
+export function tsNullKeyword(): TSNullKeyword;
+export function tsNeverKeyword(): TSNeverKeyword;
+export function tsThisType(): TSThisType;
+export function tsFunctionType(typeParameters?: TSTypeParameterDeclaration | null, typeAnnotation?: TSTypeAnnotation | null, parameters?: Array<Identifier | RestElement> | null): TSFunctionType;
+export function tsConstructorType(typeParameters?: TSTypeParameterDeclaration | null, typeAnnotation?: TSTypeAnnotation | null, parameters?: Array<Identifier | RestElement> | null): TSConstructorType;
+export function tsTypeReference(typeName: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSTypeReference;
+export function tsTypePredicate(parameterName: Identifier | TSThisType, typeAnnotation: TSTypeAnnotation): TSTypePredicate;
+export function tsTypeQuery(exprName: TSEntityName | TSImportType): TSTypeQuery;
+export function tsTypeLiteral(members: Array<TSTypeElement>): TSTypeLiteral;
+export function tsArrayType(elementType: TSType): TSArrayType;
+export function tsTupleType(elementTypes: Array<TSType>): TSTupleType;
+export function tsOptionalType(typeAnnotation: TSType): TSOptionalType;
+export function tsRestType(typeAnnotation: TSType): TSRestType;
+export function tsUnionType(types: Array<TSType>): TSUnionType;
+export function tsIntersectionType(types: Array<TSType>): TSIntersectionType;
+export function tsConditionalType(checkType: TSType, extendsType: TSType, trueType: TSType, falseType: TSType): TSConditionalType;
+export function tsInferType(typeParameter: TSTypeParameter): TSInferType;
+export function tsParenthesizedType(typeAnnotation: TSType): TSParenthesizedType;
+export function tsTypeOperator(typeAnnotation: TSType, operator?: string | null): TSTypeOperator;
+export function tsIndexedAccessType(objectType: TSType, indexType: TSType): TSIndexedAccessType;
+export function tsMappedType(typeParameter: TSTypeParameter, typeAnnotation?: TSType | null, optional?: boolean | null, readonly?: boolean | null): TSMappedType;
+export function tsLiteralType(literal: NumericLiteral | StringLiteral | BooleanLiteral): TSLiteralType;
+export function tsExpressionWithTypeArguments(expression: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSExpressionWithTypeArguments;
+export function tsInterfaceDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, _extends: Array<TSExpressionWithTypeArguments> | null | undefined, body: TSInterfaceBody, declare?: boolean | null): TSInterfaceDeclaration;
+export function tsInterfaceBody(body: Array<TSTypeElement>): TSInterfaceBody;
+export function tsTypeAliasDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, typeAnnotation: TSType, declare?: boolean | null): TSTypeAliasDeclaration;
+export function tsAsExpression(expression: Expression, typeAnnotation: TSType): TSAsExpression;
+export function tsTypeAssertion(typeAnnotation: TSType, expression: Expression): TSTypeAssertion;
+export function tsEnumDeclaration(id: Identifier, members: Array<TSEnumMember>, _const?: boolean | null, declare?: boolean | null, initializer?: Expression | null): TSEnumDeclaration;
+export function tsEnumMember(id: Identifier | StringLiteral, initializer?: Expression | null): TSEnumMember;
+export function tsModuleDeclaration(id: Identifier | StringLiteral, body: TSModuleBlock | TSModuleDeclaration, declare?: boolean | null, global?: boolean | null): TSModuleDeclaration;
+export function tsModuleBlock(body: Array<Statement>): TSModuleBlock;
+export function tsImportType(argument: StringLiteral, qualifier?: TSEntityName | null, typeParameters?: TSTypeParameterInstantiation | null): TSImportType;
+export function tsImportEqualsDeclaration(id: Identifier, moduleReference: TSEntityName | TSExternalModuleReference, isExport?: boolean | null): TSImportEqualsDeclaration;
+export function tsExternalModuleReference(expression: StringLiteral): TSExternalModuleReference;
+export function tsNonNullExpression(expression: Expression): TSNonNullExpression;
+export function tsExportAssignment(expression: Expression): TSExportAssignment;
+export function tsNamespaceExportDeclaration(id: Identifier): TSNamespaceExportDeclaration;
+export function tsTypeAnnotation(typeAnnotation: TSType): TSTypeAnnotation;
+export function tsTypeParameterInstantiation(params: Array<TSType>): TSTypeParameterInstantiation;
+export function tsTypeParameterDeclaration(params: Array<TSTypeParameter>): TSTypeParameterDeclaration;
+export function tsTypeParameter(constraint?: TSType | null, _default?: TSType | null, name?: string | null): TSTypeParameter;
+export function isAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is AnyTypeAnnotation;
+export function isArrayExpression(node: object | null | undefined, opts?: object | null): node is ArrayExpression;
+export function isArrayPattern(node: object | null | undefined, opts?: object | null): node is ArrayPattern;
+export function isArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ArrayTypeAnnotation;
+export function isArrowFunctionExpression(node: object | null | undefined, opts?: object | null): node is ArrowFunctionExpression;
+export function isAssignmentExpression(node: object | null | undefined, opts?: object | null): node is AssignmentExpression;
+export function isAssignmentPattern(node: object | null | undefined, opts?: object | null): node is AssignmentPattern;
+export function isAwaitExpression(node: object | null | undefined, opts?: object | null): node is AwaitExpression;
+export function isBigIntLiteral(node: object | null | undefined, opts?: object | null): node is BigIntLiteral;
+export function isBinary(node: object | null | undefined, opts?: object | null): node is Binary;
+export function isBinaryExpression(node: object | null | undefined, opts?: object | null): node is BinaryExpression;
+export function isBindExpression(node: object | null | undefined, opts?: object | null): node is BindExpression;
+export function isBlock(node: object | null | undefined, opts?: object | null): node is Block;
+export function isBlockParent(node: object | null | undefined, opts?: object | null): node is BlockParent;
+export function isBlockStatement(node: object | null | undefined, opts?: object | null): node is BlockStatement;
+export function isBooleanLiteral(node: object | null | undefined, opts?: object | null): node is BooleanLiteral;
+export function isBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanLiteralTypeAnnotation;
+export function isBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanTypeAnnotation;
+export function isBreakStatement(node: object | null | undefined, opts?: object | null): node is BreakStatement;
+export function isCallExpression(node: object | null | undefined, opts?: object | null): node is CallExpression;
+export function isCatchClause(node: object | null | undefined, opts?: object | null): node is CatchClause;
+export function isClass(node: object | null | undefined, opts?: object | null): node is Class;
+export function isClassBody(node: object | null | undefined, opts?: object | null): node is ClassBody;
+export function isClassDeclaration(node: object | null | undefined, opts?: object | null): node is ClassDeclaration;
+export function isClassExpression(node: object | null | undefined, opts?: object | null): node is ClassExpression;
+export function isClassImplements(node: object | null | undefined, opts?: object | null): node is ClassImplements;
+export function isClassMethod(node: object | null | undefined, opts?: object | null): node is ClassMethod;
+export function isClassPrivateMethod(node: object | null | undefined, opts?: object | null): node is ClassPrivateMethod;
+export function isClassPrivateProperty(node: object | null | undefined, opts?: object | null): node is ClassPrivateProperty;
+export function isClassProperty(node: object | null | undefined, opts?: object | null): node is ClassProperty;
+export function isCompletionStatement(node: object | null | undefined, opts?: object | null): node is CompletionStatement;
+export function isConditional(node: object | null | undefined, opts?: object | null): node is Conditional;
+export function isConditionalExpression(node: object | null | undefined, opts?: object | null): node is ConditionalExpression;
+export function isContinueStatement(node: object | null | undefined, opts?: object | null): node is ContinueStatement;
+export function isDebuggerStatement(node: object | null | undefined, opts?: object | null): node is DebuggerStatement;
+export function isDeclaration(node: object | null | undefined, opts?: object | null): node is Declaration;
+export function isDeclareClass(node: object | null | undefined, opts?: object | null): node is DeclareClass;
+export function isDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportAllDeclaration;
+export function isDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportDeclaration;
+export function isDeclareFunction(node: object | null | undefined, opts?: object | null): node is DeclareFunction;
+export function isDeclareInterface(node: object | null | undefined, opts?: object | null): node is DeclareInterface;
+export function isDeclareModule(node: object | null | undefined, opts?: object | null): node is DeclareModule;
+export function isDeclareModuleExports(node: object | null | undefined, opts?: object | null): node is DeclareModuleExports;
+export function isDeclareOpaqueType(node: object | null | undefined, opts?: object | null): node is DeclareOpaqueType;
+export function isDeclareTypeAlias(node: object | null | undefined, opts?: object | null): node is DeclareTypeAlias;
+export function isDeclareVariable(node: object | null | undefined, opts?: object | null): node is DeclareVariable;
+export function isDeclaredPredicate(node: object | null | undefined, opts?: object | null): node is DeclaredPredicate;
+export function isDecorator(node: object | null | undefined, opts?: object | null): node is Decorator;
+export function isDirective(node: object | null | undefined, opts?: object | null): node is Directive;
+export function isDirectiveLiteral(node: object | null | undefined, opts?: object | null): node is DirectiveLiteral;
+export function isDoExpression(node: object | null | undefined, opts?: object | null): node is DoExpression;
+export function isDoWhileStatement(node: object | null | undefined, opts?: object | null): node is DoWhileStatement;
+export function isEmptyStatement(node: object | null | undefined, opts?: object | null): node is EmptyStatement;
+export function isEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is EmptyTypeAnnotation;
+export function isExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ExistsTypeAnnotation;
+export function isExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is ExportAllDeclaration;
+export function isExportDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDeclaration;
+export function isExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDefaultDeclaration;
+export function isExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ExportDefaultSpecifier;
+export function isExportNamedDeclaration(node: object | null | undefined, opts?: object | null): node is ExportNamedDeclaration;
+export function isExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ExportNamespaceSpecifier;
+export function isExportSpecifier(node: object | null | undefined, opts?: object | null): node is ExportSpecifier;
+export function isExpression(node: object | null | undefined, opts?: object | null): node is Expression;
+export function isExpressionStatement(node: object | null | undefined, opts?: object | null): node is ExpressionStatement;
+export function isExpressionWrapper(node: object | null | undefined, opts?: object | null): node is ExpressionWrapper;
+export function isFile(node: object | null | undefined, opts?: object | null): node is File;
+export function isFlow(node: object | null | undefined, opts?: object | null): node is Flow;
+export function isFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): node is FlowBaseAnnotation;
+export function isFlowDeclaration(node: object | null | undefined, opts?: object | null): node is FlowDeclaration;
+export function isFlowPredicate(node: object | null | undefined, opts?: object | null): node is FlowPredicate;
+export function isFlowType(node: object | null | undefined, opts?: object | null): node is FlowType;
+export function isFor(node: object | null | undefined, opts?: object | null): node is For;
+export function isForInStatement(node: object | null | undefined, opts?: object | null): node is ForInStatement;
+export function isForOfStatement(node: object | null | undefined, opts?: object | null): node is ForOfStatement;
+export function isForStatement(node: object | null | undefined, opts?: object | null): node is ForStatement;
+export function isForXStatement(node: object | null | undefined, opts?: object | null): node is ForXStatement;
+export function isFunction(node: object | null | undefined, opts?: object | null): node is Function;
+export function isFunctionDeclaration(node: object | null | undefined, opts?: object | null): node is FunctionDeclaration;
+export function isFunctionExpression(node: object | null | undefined, opts?: object | null): node is FunctionExpression;
+export function isFunctionParent(node: object | null | undefined, opts?: object | null): node is FunctionParent;
+export function isFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is FunctionTypeAnnotation;
+export function isFunctionTypeParam(node: object | null | undefined, opts?: object | null): node is FunctionTypeParam;
+export function isGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): node is GenericTypeAnnotation;
+export function isIdentifier(node: object | null | undefined, opts?: object | null): node is Identifier;
+export function isIfStatement(node: object | null | undefined, opts?: object | null): node is IfStatement;
+export function isImmutable(node: object | null | undefined, opts?: object | null): node is Immutable;
+export function isImport(node: object | null | undefined, opts?: object | null): node is Import;
+export function isImportDeclaration(node: object | null | undefined, opts?: object | null): node is ImportDeclaration;
+export function isImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ImportDefaultSpecifier;
+export function isImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ImportNamespaceSpecifier;
+export function isImportSpecifier(node: object | null | undefined, opts?: object | null): node is ImportSpecifier;
+export function isInferredPredicate(node: object | null | undefined, opts?: object | null): node is InferredPredicate;
+export function isInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is InterfaceDeclaration;
+export function isInterfaceExtends(node: object | null | undefined, opts?: object | null): node is InterfaceExtends;
+export function isInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): node is InterfaceTypeAnnotation;
+export function isInterpreterDirective(node: object | null | undefined, opts?: object | null): node is InterpreterDirective;
+export function isIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is IntersectionTypeAnnotation;
+export function isJSX(node: object | null | undefined, opts?: object | null): node is JSX;
+export function isJSXAttribute(node: object | null | undefined, opts?: object | null): node is JSXAttribute;
+export function isJSXClosingElement(node: object | null | undefined, opts?: object | null): node is JSXClosingElement;
+export function isJSXClosingFragment(node: object | null | undefined, opts?: object | null): node is JSXClosingFragment;
+export function isJSXElement(node: object | null | undefined, opts?: object | null): node is JSXElement;
+export function isJSXEmptyExpression(node: object | null | undefined, opts?: object | null): node is JSXEmptyExpression;
+export function isJSXExpressionContainer(node: object | null | undefined, opts?: object | null): node is JSXExpressionContainer;
+export function isJSXFragment(node: object | null | undefined, opts?: object | null): node is JSXFragment;
+export function isJSXIdentifier(node: object | null | undefined, opts?: object | null): node is JSXIdentifier;
+export function isJSXMemberExpression(node: object | null | undefined, opts?: object | null): node is JSXMemberExpression;
+export function isJSXNamespacedName(node: object | null | undefined, opts?: object | null): node is JSXNamespacedName;
+export function isJSXOpeningElement(node: object | null | undefined, opts?: object | null): node is JSXOpeningElement;
+export function isJSXOpeningFragment(node: object | null | undefined, opts?: object | null): node is JSXOpeningFragment;
+export function isJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): node is JSXSpreadAttribute;
+export function isJSXSpreadChild(node: object | null | undefined, opts?: object | null): node is JSXSpreadChild;
+export function isJSXText(node: object | null | undefined, opts?: object | null): node is JSXText;
+export function isLVal(node: object | null | undefined, opts?: object | null): node is LVal;
+export function isLabeledStatement(node: object | null | undefined, opts?: object | null): node is LabeledStatement;
+export function isLiteral(node: object | null | undefined, opts?: object | null): node is Literal;
+export function isLogicalExpression(node: object | null | undefined, opts?: object | null): node is LogicalExpression;
+export function isLoop(node: object | null | undefined, opts?: object | null): node is Loop;
+export function isMemberExpression(node: object | null | undefined, opts?: object | null): node is MemberExpression;
+export function isMetaProperty(node: object | null | undefined, opts?: object | null): node is MetaProperty;
+export function isMethod(node: object | null | undefined, opts?: object | null): node is Method;
+export function isMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): node is MixedTypeAnnotation;
+export function isModuleDeclaration(node: object | null | undefined, opts?: object | null): node is ModuleDeclaration;
+export function isModuleSpecifier(node: object | null | undefined, opts?: object | null): node is ModuleSpecifier;
+export function isNewExpression(node: object | null | undefined, opts?: object | null): node is NewExpression;
+export function isNoop(node: object | null | undefined, opts?: object | null): node is Noop;
+export function isNullLiteral(node: object | null | undefined, opts?: object | null): node is NullLiteral;
+export function isNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullLiteralTypeAnnotation;
+export function isNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullableTypeAnnotation;
+export function isNumberLiteral(node: object | null | undefined, opts?: object | null): boolean;
+export function isNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberLiteralTypeAnnotation;
+export function isNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberTypeAnnotation;
+export function isNumericLiteral(node: object | null | undefined, opts?: object | null): node is NumericLiteral;
+export function isObjectExpression(node: object | null | undefined, opts?: object | null): node is ObjectExpression;
+export function isObjectMember(node: object | null | undefined, opts?: object | null): node is ObjectMember;
+export function isObjectMethod(node: object | null | undefined, opts?: object | null): node is ObjectMethod;
+export function isObjectPattern(node: object | null | undefined, opts?: object | null): node is ObjectPattern;
+export function isObjectProperty(node: object | null | undefined, opts?: object | null): node is ObjectProperty;
+export function isObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ObjectTypeAnnotation;
+export function isObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeCallProperty;
+export function isObjectTypeIndexer(node: object | null | undefined, opts?: object | null): node is ObjectTypeIndexer;
+export function isObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): node is ObjectTypeInternalSlot;
+export function isObjectTypeProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeProperty;
+export function isObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeSpreadProperty;
+export function isOpaqueType(node: object | null | undefined, opts?: object | null): node is OpaqueType;
+export function isOptionalCallExpression(node: object | null | undefined, opts?: object | null): node is OptionalCallExpression;
+export function isOptionalMemberExpression(node: object | null | undefined, opts?: object | null): node is OptionalMemberExpression;
+export function isParenthesizedExpression(node: object | null | undefined, opts?: object | null): node is ParenthesizedExpression;
+export function isPattern(node: object | null | undefined, opts?: object | null): node is Pattern;
+export function isPatternLike(node: object | null | undefined, opts?: object | null): node is PatternLike;
+export function isPipelineBareFunction(node: object | null | undefined, opts?: object | null): node is PipelineBareFunction;
+export function isPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): node is PipelinePrimaryTopicReference;
+export function isPipelineTopicExpression(node: object | null | undefined, opts?: object | null): node is PipelineTopicExpression;
+export function isPrivate(node: object | null | undefined, opts?: object | null): node is Private;
+export function isPrivateName(node: object | null | undefined, opts?: object | null): node is PrivateName;
+export function isProgram(node: object | null | undefined, opts?: object | null): node is Program;
+export function isProperty(node: object | null | undefined, opts?: object | null): node is Property;
+export function isPureish(node: object | null | undefined, opts?: object | null): node is Pureish;
+export function isQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): node is QualifiedTypeIdentifier;
+export function isRegExpLiteral(node: object | null | undefined, opts?: object | null): node is RegExpLiteral;
+export function isRegexLiteral(node: object | null | undefined, opts?: object | null): boolean;
+export function isRestElement(node: object | null | undefined, opts?: object | null): node is RestElement;
+export function isRestProperty(node: object | null | undefined, opts?: object | null): boolean;
+export function isReturnStatement(node: object | null | undefined, opts?: object | null): node is ReturnStatement;
+export function isScopable(node: object | null | undefined, opts?: object | null): node is Scopable;
+export function isSequenceExpression(node: object | null | undefined, opts?: object | null): node is SequenceExpression;
+export function isSpreadElement(node: object | null | undefined, opts?: object | null): node is SpreadElement;
+export function isSpreadProperty(node: object | null | undefined, opts?: object | null): boolean;
+export function isStatement(node: object | null | undefined, opts?: object | null): node is Statement;
+export function isStringLiteral(node: object | null | undefined, opts?: object | null): node is StringLiteral;
+export function isStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringLiteralTypeAnnotation;
+export function isStringTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringTypeAnnotation;
+export function isSuper(node: object | null | undefined, opts?: object | null): node is Super;
+export function isSwitchCase(node: object | null | undefined, opts?: object | null): node is SwitchCase;
+export function isSwitchStatement(node: object | null | undefined, opts?: object | null): node is SwitchStatement;
+export function isTSAnyKeyword(node: object | null | undefined, opts?: object | null): node is TSAnyKeyword;
+export function isTSArrayType(node: object | null | undefined, opts?: object | null): node is TSArrayType;
+export function isTSAsExpression(node: object | null | undefined, opts?: object | null): node is TSAsExpression;
+export function isTSBooleanKeyword(node: object | null | undefined, opts?: object | null): node is TSBooleanKeyword;
+export function isTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSCallSignatureDeclaration;
+export function isTSConditionalType(node: object | null | undefined, opts?: object | null): node is TSConditionalType;
+export function isTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSConstructSignatureDeclaration;
+export function isTSConstructorType(node: object | null | undefined, opts?: object | null): node is TSConstructorType;
+export function isTSDeclareFunction(node: object | null | undefined, opts?: object | null): node is TSDeclareFunction;
+export function isTSDeclareMethod(node: object | null | undefined, opts?: object | null): node is TSDeclareMethod;
+export function isTSEntityName(node: object | null | undefined, opts?: object | null): node is TSEntityName;
+export function isTSEnumDeclaration(node: object | null | undefined, opts?: object | null): node is TSEnumDeclaration;
+export function isTSEnumMember(node: object | null | undefined, opts?: object | null): node is TSEnumMember;
+export function isTSExportAssignment(node: object | null | undefined, opts?: object | null): node is TSExportAssignment;
+export function isTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): node is TSExpressionWithTypeArguments;
+export function isTSExternalModuleReference(node: object | null | undefined, opts?: object | null): node is TSExternalModuleReference;
+export function isTSFunctionType(node: object | null | undefined, opts?: object | null): node is TSFunctionType;
+export function isTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): node is TSImportEqualsDeclaration;
+export function isTSImportType(node: object | null | undefined, opts?: object | null): node is TSImportType;
+export function isTSIndexSignature(node: object | null | undefined, opts?: object | null): node is TSIndexSignature;
+export function isTSIndexedAccessType(node: object | null | undefined, opts?: object | null): node is TSIndexedAccessType;
+export function isTSInferType(node: object | null | undefined, opts?: object | null): node is TSInferType;
+export function isTSInterfaceBody(node: object | null | undefined, opts?: object | null): node is TSInterfaceBody;
+export function isTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is TSInterfaceDeclaration;
+export function isTSIntersectionType(node: object | null | undefined, opts?: object | null): node is TSIntersectionType;
+export function isTSLiteralType(node: object | null | undefined, opts?: object | null): node is TSLiteralType;
+export function isTSMappedType(node: object | null | undefined, opts?: object | null): node is TSMappedType;
+export function isTSMethodSignature(node: object | null | undefined, opts?: object | null): node is TSMethodSignature;
+export function isTSModuleBlock(node: object | null | undefined, opts?: object | null): node is TSModuleBlock;
+export function isTSModuleDeclaration(node: object | null | undefined, opts?: object | null): node is TSModuleDeclaration;
+export function isTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): node is TSNamespaceExportDeclaration;
+export function isTSNeverKeyword(node: object | null | undefined, opts?: object | null): node is TSNeverKeyword;
+export function isTSNonNullExpression(node: object | null | undefined, opts?: object | null): node is TSNonNullExpression;
+export function isTSNullKeyword(node: object | null | undefined, opts?: object | null): node is TSNullKeyword;
+export function isTSNumberKeyword(node: object | null | undefined, opts?: object | null): node is TSNumberKeyword;
+export function isTSObjectKeyword(node: object | null | undefined, opts?: object | null): node is TSObjectKeyword;
+export function isTSOptionalType(node: object | null | undefined, opts?: object | null): node is TSOptionalType;
+export function isTSParameterProperty(node: object | null | undefined, opts?: object | null): node is TSParameterProperty;
+export function isTSParenthesizedType(node: object | null | undefined, opts?: object | null): node is TSParenthesizedType;
+export function isTSPropertySignature(node: object | null | undefined, opts?: object | null): node is TSPropertySignature;
+export function isTSQualifiedName(node: object | null | undefined, opts?: object | null): node is TSQualifiedName;
+export function isTSRestType(node: object | null | undefined, opts?: object | null): node is TSRestType;
+export function isTSStringKeyword(node: object | null | undefined, opts?: object | null): node is TSStringKeyword;
+export function isTSSymbolKeyword(node: object | null | undefined, opts?: object | null): node is TSSymbolKeyword;
+export function isTSThisType(node: object | null | undefined, opts?: object | null): node is TSThisType;
+export function isTSTupleType(node: object | null | undefined, opts?: object | null): node is TSTupleType;
+export function isTSType(node: object | null | undefined, opts?: object | null): node is TSType;
+export function isTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeAliasDeclaration;
+export function isTSTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TSTypeAnnotation;
+export function isTSTypeAssertion(node: object | null | undefined, opts?: object | null): node is TSTypeAssertion;
+export function isTSTypeElement(node: object | null | undefined, opts?: object | null): node is TSTypeElement;
+export function isTSTypeLiteral(node: object | null | undefined, opts?: object | null): node is TSTypeLiteral;
+export function isTSTypeOperator(node: object | null | undefined, opts?: object | null): node is TSTypeOperator;
+export function isTSTypeParameter(node: object | null | undefined, opts?: object | null): node is TSTypeParameter;
+export function isTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeParameterDeclaration;
+export function isTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TSTypeParameterInstantiation;
+export function isTSTypePredicate(node: object | null | undefined, opts?: object | null): node is TSTypePredicate;
+export function isTSTypeQuery(node: object | null | undefined, opts?: object | null): node is TSTypeQuery;
+export function isTSTypeReference(node: object | null | undefined, opts?: object | null): node is TSTypeReference;
+export function isTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): node is TSUndefinedKeyword;
+export function isTSUnionType(node: object | null | undefined, opts?: object | null): node is TSUnionType;
+export function isTSUnknownKeyword(node: object | null | undefined, opts?: object | null): node is TSUnknownKeyword;
+export function isTSVoidKeyword(node: object | null | undefined, opts?: object | null): node is TSVoidKeyword;
+export function isTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): node is TaggedTemplateExpression;
+export function isTemplateElement(node: object | null | undefined, opts?: object | null): node is TemplateElement;
+export function isTemplateLiteral(node: object | null | undefined, opts?: object | null): node is TemplateLiteral;
+export function isTerminatorless(node: object | null | undefined, opts?: object | null): node is Terminatorless;
+export function isThisExpression(node: object | null | undefined, opts?: object | null): node is ThisExpression;
+export function isThisTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ThisTypeAnnotation;
+export function isThrowStatement(node: object | null | undefined, opts?: object | null): node is ThrowStatement;
+export function isTryStatement(node: object | null | undefined, opts?: object | null): node is TryStatement;
+export function isTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TupleTypeAnnotation;
+export function isTypeAlias(node: object | null | undefined, opts?: object | null): node is TypeAlias;
+export function isTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeAnnotation;
+export function isTypeCastExpression(node: object | null | undefined, opts?: object | null): node is TypeCastExpression;
+export function isTypeParameter(node: object | null | undefined, opts?: object | null): node is TypeParameter;
+export function isTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TypeParameterDeclaration;
+export function isTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TypeParameterInstantiation;
+export function isTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeofTypeAnnotation;
+export function isUnaryExpression(node: object | null | undefined, opts?: object | null): node is UnaryExpression;
+export function isUnaryLike(node: object | null | undefined, opts?: object | null): node is UnaryLike;
+export function isUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is UnionTypeAnnotation;
+export function isUpdateExpression(node: object | null | undefined, opts?: object | null): node is UpdateExpression;
+export function isUserWhitespacable(node: object | null | undefined, opts?: object | null): node is UserWhitespacable;
+export function isVariableDeclaration(node: object | null | undefined, opts?: object | null): node is VariableDeclaration;
+export function isVariableDeclarator(node: object | null | undefined, opts?: object | null): node is VariableDeclarator;
+export function isVariance(node: object | null | undefined, opts?: object | null): node is Variance;
+export function isVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): node is VoidTypeAnnotation;
+export function isWhile(node: object | null | undefined, opts?: object | null): node is While;
+export function isWhileStatement(node: object | null | undefined, opts?: object | null): node is WhileStatement;
+export function isWithStatement(node: object | null | undefined, opts?: object | null): node is WithStatement;
+export function isYieldExpression(node: object | null | undefined, opts?: object | null): node is YieldExpression;
+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>,
+};
+export function traverse<T>(n: Node, h: TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;
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
index dc6952d706..8d9df04d7b 100644
--- 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
@@ -1,10 +1,14 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
var _exportNames = {
+ react: true,
assertNode: true,
createTypeAnnotationBasedOnTypeof: true,
createUnionTypeAnnotation: true,
+ cloneNode: true,
clone: true,
cloneDeep: true,
cloneWithoutLoc: true,
@@ -52,10 +56,321 @@ var _exportNames = {
isVar: true,
matchesPattern: true,
validate: true,
- buildMatchMemberExpression: true,
- react: true
+ buildMatchMemberExpression: true
};
-exports.react = exports.buildMatchMemberExpression = exports.validate = exports.matchesPattern = exports.isVar = exports.isValidIdentifier = exports.isValidES3Identifier = exports.isType = exports.isSpecifierDefault = exports.isScope = exports.isReferenced = exports.isNodesEquivalent = exports.isNode = exports.isLet = exports.isImmutable = exports.isBlockScoped = exports.isBinding = exports.is = exports.shallowEqual = exports.traverseFast = exports.traverse = exports.getOuterBindingIdentifiers = exports.getBindingIdentifiers = exports.removeTypeDuplicates = exports.removePropertiesDeep = exports.removeProperties = exports.prependToMemberExpression = exports.inherits = exports.appendToMemberExpression = exports.valueToNode = exports.toStatement = exports.toSequenceExpression = exports.toKeyAlias = exports.toIdentifier = exports.toExpression = exports.toComputedKey = exports.toBlock = exports.toBindingIdentifierName = exports.ensureBlock = exports.removeComments = exports.inheritTrailingComments = exports.inheritsComments = exports.inheritLeadingComments = exports.inheritInnerComments = exports.addComments = exports.addComment = exports.cloneWithoutLoc = exports.cloneDeep = exports.clone = exports.createUnionTypeAnnotation = exports.createTypeAnnotationBasedOnTypeof = exports.assertNode = void 0;
+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, "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"));
@@ -65,78 +380,69 @@ var _buildChildren = _interopRequireDefault(require("./builders/react/buildChild
var _assertNode = _interopRequireDefault(require("./asserts/assertNode"));
-exports.assertNode = _assertNode.default;
-
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;
- exports[key] = _generated[key];
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _generated[key];
+ }
+ });
});
var _createTypeAnnotationBasedOnTypeof = _interopRequireDefault(require("./builders/flow/createTypeAnnotationBasedOnTypeof"));
-exports.createTypeAnnotationBasedOnTypeof = _createTypeAnnotationBasedOnTypeof.default;
-
var _createUnionTypeAnnotation = _interopRequireDefault(require("./builders/flow/createUnionTypeAnnotation"));
-exports.createUnionTypeAnnotation = _createUnionTypeAnnotation.default;
-
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;
- exports[key] = _generated2[key];
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _generated2[key];
+ }
+ });
});
-var _clone = _interopRequireDefault(require("./clone/clone"));
+var _cloneNode = _interopRequireDefault(require("./clone/cloneNode"));
-exports.clone = _clone.default;
+var _clone = _interopRequireDefault(require("./clone/clone"));
var _cloneDeep = _interopRequireDefault(require("./clone/cloneDeep"));
-exports.cloneDeep = _cloneDeep.default;
-
var _cloneWithoutLoc = _interopRequireDefault(require("./clone/cloneWithoutLoc"));
-exports.cloneWithoutLoc = _cloneWithoutLoc.default;
-
var _addComment = _interopRequireDefault(require("./comments/addComment"));
-exports.addComment = _addComment.default;
-
var _addComments = _interopRequireDefault(require("./comments/addComments"));
-exports.addComments = _addComments.default;
-
var _inheritInnerComments = _interopRequireDefault(require("./comments/inheritInnerComments"));
-exports.inheritInnerComments = _inheritInnerComments.default;
-
var _inheritLeadingComments = _interopRequireDefault(require("./comments/inheritLeadingComments"));
-exports.inheritLeadingComments = _inheritLeadingComments.default;
-
var _inheritsComments = _interopRequireDefault(require("./comments/inheritsComments"));
-exports.inheritsComments = _inheritsComments.default;
-
var _inheritTrailingComments = _interopRequireDefault(require("./comments/inheritTrailingComments"));
-exports.inheritTrailingComments = _inheritTrailingComments.default;
-
var _removeComments = _interopRequireDefault(require("./comments/removeComments"));
-exports.removeComments = _removeComments.default;
-
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;
- exports[key] = _generated3[key];
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _generated3[key];
+ }
+ });
});
var _constants = require("./constants");
@@ -144,180 +450,119 @@ var _constants = require("./constants");
Object.keys(_constants).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
- exports[key] = _constants[key];
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _constants[key];
+ }
+ });
});
var _ensureBlock = _interopRequireDefault(require("./converters/ensureBlock"));
-exports.ensureBlock = _ensureBlock.default;
-
var _toBindingIdentifierName = _interopRequireDefault(require("./converters/toBindingIdentifierName"));
-exports.toBindingIdentifierName = _toBindingIdentifierName.default;
-
var _toBlock = _interopRequireDefault(require("./converters/toBlock"));
-exports.toBlock = _toBlock.default;
-
var _toComputedKey = _interopRequireDefault(require("./converters/toComputedKey"));
-exports.toComputedKey = _toComputedKey.default;
-
var _toExpression = _interopRequireDefault(require("./converters/toExpression"));
-exports.toExpression = _toExpression.default;
-
var _toIdentifier = _interopRequireDefault(require("./converters/toIdentifier"));
-exports.toIdentifier = _toIdentifier.default;
-
var _toKeyAlias = _interopRequireDefault(require("./converters/toKeyAlias"));
-exports.toKeyAlias = _toKeyAlias.default;
-
var _toSequenceExpression = _interopRequireDefault(require("./converters/toSequenceExpression"));
-exports.toSequenceExpression = _toSequenceExpression.default;
-
var _toStatement = _interopRequireDefault(require("./converters/toStatement"));
-exports.toStatement = _toStatement.default;
-
var _valueToNode = _interopRequireDefault(require("./converters/valueToNode"));
-exports.valueToNode = _valueToNode.default;
-
var _definitions = require("./definitions");
Object.keys(_definitions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
- exports[key] = _definitions[key];
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _definitions[key];
+ }
+ });
});
var _appendToMemberExpression = _interopRequireDefault(require("./modifications/appendToMemberExpression"));
-exports.appendToMemberExpression = _appendToMemberExpression.default;
-
var _inherits = _interopRequireDefault(require("./modifications/inherits"));
-exports.inherits = _inherits.default;
-
var _prependToMemberExpression = _interopRequireDefault(require("./modifications/prependToMemberExpression"));
-exports.prependToMemberExpression = _prependToMemberExpression.default;
-
var _removeProperties = _interopRequireDefault(require("./modifications/removeProperties"));
-exports.removeProperties = _removeProperties.default;
-
var _removePropertiesDeep = _interopRequireDefault(require("./modifications/removePropertiesDeep"));
-exports.removePropertiesDeep = _removePropertiesDeep.default;
-
var _removeTypeDuplicates = _interopRequireDefault(require("./modifications/flow/removeTypeDuplicates"));
-exports.removeTypeDuplicates = _removeTypeDuplicates.default;
-
var _getBindingIdentifiers = _interopRequireDefault(require("./retrievers/getBindingIdentifiers"));
-exports.getBindingIdentifiers = _getBindingIdentifiers.default;
-
var _getOuterBindingIdentifiers = _interopRequireDefault(require("./retrievers/getOuterBindingIdentifiers"));
-exports.getOuterBindingIdentifiers = _getOuterBindingIdentifiers.default;
-
var _traverse = _interopRequireDefault(require("./traverse/traverse"));
-exports.traverse = _traverse.default;
-
var _traverseFast = _interopRequireDefault(require("./traverse/traverseFast"));
-exports.traverseFast = _traverseFast.default;
-
var _shallowEqual = _interopRequireDefault(require("./utils/shallowEqual"));
-exports.shallowEqual = _shallowEqual.default;
-
var _is = _interopRequireDefault(require("./validators/is"));
-exports.is = _is.default;
-
var _isBinding = _interopRequireDefault(require("./validators/isBinding"));
-exports.isBinding = _isBinding.default;
-
var _isBlockScoped = _interopRequireDefault(require("./validators/isBlockScoped"));
-exports.isBlockScoped = _isBlockScoped.default;
-
var _isImmutable = _interopRequireDefault(require("./validators/isImmutable"));
-exports.isImmutable = _isImmutable.default;
-
var _isLet = _interopRequireDefault(require("./validators/isLet"));
-exports.isLet = _isLet.default;
-
var _isNode = _interopRequireDefault(require("./validators/isNode"));
-exports.isNode = _isNode.default;
-
var _isNodesEquivalent = _interopRequireDefault(require("./validators/isNodesEquivalent"));
-exports.isNodesEquivalent = _isNodesEquivalent.default;
-
var _isReferenced = _interopRequireDefault(require("./validators/isReferenced"));
-exports.isReferenced = _isReferenced.default;
-
var _isScope = _interopRequireDefault(require("./validators/isScope"));
-exports.isScope = _isScope.default;
-
var _isSpecifierDefault = _interopRequireDefault(require("./validators/isSpecifierDefault"));
-exports.isSpecifierDefault = _isSpecifierDefault.default;
-
var _isType = _interopRequireDefault(require("./validators/isType"));
-exports.isType = _isType.default;
-
var _isValidES3Identifier = _interopRequireDefault(require("./validators/isValidES3Identifier"));
-exports.isValidES3Identifier = _isValidES3Identifier.default;
-
var _isValidIdentifier = _interopRequireDefault(require("./validators/isValidIdentifier"));
-exports.isValidIdentifier = _isValidIdentifier.default;
-
var _isVar = _interopRequireDefault(require("./validators/isVar"));
-exports.isVar = _isVar.default;
-
var _matchesPattern = _interopRequireDefault(require("./validators/matchesPattern"));
-exports.matchesPattern = _matchesPattern.default;
-
var _validate = _interopRequireDefault(require("./validators/validate"));
-exports.validate = _validate.default;
-
var _buildMatchMemberExpression = _interopRequireDefault(require("./validators/buildMatchMemberExpression"));
-exports.buildMatchMemberExpression = _buildMatchMemberExpression.default;
-
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;
- exports[key] = _generated4[key];
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _generated4[key];
+ }
+ });
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var react = {
+const react = {
isReactComponent: _isReactComponent.default,
isCompatTag: _isCompatTag.default,
buildChildren: _buildChildren.default
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
new file mode 100644
index 0000000000..f3e3e39df9
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js.flow
@@ -0,0 +1,1960 @@
+// 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>;
+ 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>;
+ 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 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;
+ 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;
+}
+
+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: any;
+ 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 BabelNodeParenthesizedExpression extends BabelNode {
+ type: "ParenthesizedExpression";
+ expression: BabelNodeExpression;
+}
+
+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;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+ parameters?: Array<BabelNodeIdentifier | BabelNodeRestElement>;
+}
+
+declare class BabelNodeTSConstructorType extends BabelNode {
+ type: "TSConstructorType";
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+ parameters?: Array<BabelNodeIdentifier | BabelNodeRestElement>;
+}
+
+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 | BabelNodeThisExpression | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeMetaProperty | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeTypeCastExpression | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeParenthesizedExpression | 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;
+type BabelNodeBlockParent = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod;
+type BabelNodeBlock = BabelNodeBlockStatement | BabelNodeProgram;
+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 | BabelNodeTypeCastExpression | BabelNodeParenthesizedExpression;
+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>, 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>, 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 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, 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): 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: any, 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 parenthesizedExpression(expression: BabelNodeExpression): BabelNodeParenthesizedExpression;
+ 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, typeAnnotation?: BabelNodeTSTypeAnnotation, parameters?: Array<BabelNodeIdentifier | BabelNodeRestElement>): BabelNodeTSFunctionType;
+ declare function tsConstructorType(typeParameters?: BabelNodeTSTypeParameterDeclaration, typeAnnotation?: BabelNodeTSTypeAnnotation, parameters?: Array<BabelNodeIdentifier | BabelNodeRestElement>): 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 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 isParenthesizedExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeParenthesizedExpression)
+ 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/modifications/appendToMemberExpression.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
index f9d971c623..6a0ac93c5c 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
@@ -1,15 +1,13 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = appendToMemberExpression;
var _generated = require("../builders/generated");
-function appendToMemberExpression(member, append, computed) {
- if (computed === void 0) {
- computed = false;
- }
-
+function appendToMemberExpression(member, append, computed = false) {
member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
member.property = append;
member.computed = !!computed;
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
index c0f402088c..089179e257 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
@@ -1,18 +1,20 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = removeTypeDuplicates;
var _generated = require("../../validators/generated");
function removeTypeDuplicates(nodes) {
- var generics = {};
- var bases = {};
- var typeGroups = [];
- var types = [];
+ const generics = {};
+ const bases = {};
+ const typeGroups = [];
+ const types = [];
- for (var i = 0; i < nodes.length; i++) {
- var node = nodes[i];
+ for (let i = 0; i < nodes.length; i++) {
+ const node = nodes[i];
if (!node) continue;
if (types.indexOf(node) >= 0) {
@@ -38,10 +40,10 @@ function removeTypeDuplicates(nodes) {
}
if ((0, _generated.isGenericTypeAnnotation)(node)) {
- var name = node.id.name;
+ const name = node.id.name;
if (generics[name]) {
- var existing = generics[name];
+ let existing = generics[name];
if (existing.typeParameters) {
if (node.typeParameters) {
@@ -60,12 +62,12 @@ function removeTypeDuplicates(nodes) {
types.push(node);
}
- for (var type in bases) {
+ for (const type in bases) {
types.push(bases[type]);
}
- for (var _name in generics) {
- types.push(generics[_name]);
+ for (const name in generics) {
+ types.push(generics[name]);
}
return types;
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/inherits.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/inherits.js
index 195f714cf3..452811d376 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/inherits.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/inherits.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = inherits;
var _constants = require("../constants");
@@ -11,25 +13,19 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
function inherits(child, parent) {
if (!child || !parent) return child;
- var _arr = _constants.INHERIT_KEYS.optional;
-
- for (var _i = 0; _i < _arr.length; _i++) {
- var key = _arr[_i];
+ for (const key of _constants.INHERIT_KEYS.optional) {
if (child[key] == null) {
child[key] = parent[key];
}
}
- for (var _key in parent) {
- if (_key[0] === "_" && _key !== "__clone") child[_key] = parent[_key];
+ for (const key in parent) {
+ if (key[0] === "_" && key !== "__clone") child[key] = parent[key];
}
- var _arr2 = _constants.INHERIT_KEYS.force;
-
- for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
- var _key2 = _arr2[_i2];
- child[_key2] = parent[_key2];
+ for (const key of _constants.INHERIT_KEYS.force) {
+ child[key] = parent[key];
}
(0, _inheritsComments.default)(child, parent);
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
index 9b0f8aef69..ee6de0ec33 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = prependToMemberExpression;
var _generated = require("../builders/generated");
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removeProperties.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removeProperties.js
index 0f3a5c31b8..9135981688 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removeProperties.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removeProperties.js
@@ -1,56 +1,30 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = removeProperties;
var _constants = require("../constants");
-var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
+const CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
-var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
+const CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
-function removeProperties(node, opts) {
- if (opts === void 0) {
- opts = {};
- }
-
- var map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
-
- for (var _iterator = map, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
+function removeProperties(node, opts = {}) {
+ const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
-
- var _key2 = _ref;
- if (node[_key2] != null) node[_key2] = undefined;
+ for (const key of map) {
+ if (node[key] != null) node[key] = undefined;
}
- for (var _key in node) {
- if (_key[0] === "_" && node[_key] != null) node[_key] = undefined;
+ for (const key in node) {
+ if (key[0] === "_" && node[key] != null) node[key] = undefined;
}
- var symbols = Object.getOwnPropertySymbols(node);
-
- for (var _iterator2 = symbols, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
- var _ref2;
-
- if (_isArray2) {
- if (_i2 >= _iterator2.length) break;
- _ref2 = _iterator2[_i2++];
- } else {
- _i2 = _iterator2.next();
- if (_i2.done) break;
- _ref2 = _i2.value;
- }
+ const symbols = Object.getOwnPropertySymbols(node);
- var _sym = _ref2;
- node[_sym] = null;
+ for (const sym of symbols) {
+ node[sym] = null;
}
} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
index 7845346968..d11a84a832 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = removePropertiesDeep;
var _traverseFast = _interopRequireDefault(require("../traverse/traverseFast"));
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
index 689b15e6a4..189f4b8eb3 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
@@ -1,22 +1,24 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = getBindingIdentifiers;
var _generated = require("../validators/generated");
function getBindingIdentifiers(node, duplicates, outerOnly) {
- var search = [].concat(node);
- var ids = Object.create(null);
+ let search = [].concat(node);
+ const ids = Object.create(null);
while (search.length) {
- var id = search.shift();
+ const id = search.shift();
if (!id) continue;
- var keys = getBindingIdentifiers.keys[id.type];
+ const keys = getBindingIdentifiers.keys[id.type];
if ((0, _generated.isIdentifier)(id)) {
if (duplicates) {
- var _ids = ids[id.name] = ids[id.name] || [];
+ const _ids = ids[id.name] = ids[id.name] || [];
_ids.push(id);
} else {
@@ -46,8 +48,8 @@ function getBindingIdentifiers(node, duplicates, outerOnly) {
}
if (keys) {
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
+ for (let i = 0; i < keys.length; i++) {
+ const key = keys[i];
if (id[key]) {
search = search.concat(id[key]);
@@ -64,6 +66,9 @@ getBindingIdentifiers.keys = {
DeclareFunction: ["id"],
DeclareModule: ["id"],
DeclareVariable: ["id"],
+ DeclareInterface: ["id"],
+ DeclareTypeAlias: ["id"],
+ DeclareOpaqueType: ["id"],
InterfaceDeclaration: ["id"],
TypeAlias: ["id"],
OpaqueType: ["id"],
@@ -80,6 +85,9 @@ getBindingIdentifiers.keys = {
ExportDefaultSpecifier: ["exported"],
FunctionDeclaration: ["id", "params"],
FunctionExpression: ["id", "params"],
+ ArrowFunctionExpression: ["params"],
+ ObjectMethod: ["params"],
+ ClassMethod: ["params"],
ForInStatement: ["left"],
ForOfStatement: ["left"],
ClassDeclaration: ["id"],
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
index 367f2d87a5..8e1e3cb200 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = getOuterBindingIdentifiers;
var _getBindingIdentifiers = _interopRequireDefault(require("./getBindingIdentifiers"));
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverse.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverse.js
index b51ed99de0..775aed1eed 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverse.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverse.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = traverse;
var _definitions = require("../definitions");
@@ -12,39 +14,28 @@ function traverse(node, handlers, state) {
};
}
- var _ref = handlers,
- enter = _ref.enter,
- exit = _ref.exit;
+ const {
+ enter,
+ exit
+ } = handlers;
traverseSimpleImpl(node, enter, exit, state, []);
}
function traverseSimpleImpl(node, enter, exit, state, ancestors) {
- var keys = _definitions.VISITOR_KEYS[node.type];
+ const keys = _definitions.VISITOR_KEYS[node.type];
if (!keys) return;
if (enter) enter(node, ancestors, state);
- for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref2;
-
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref2 = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref2 = _i.value;
- }
-
- var _key2 = _ref2;
- var subNode = node[_key2];
+ for (const key of keys) {
+ const subNode = node[key];
if (Array.isArray(subNode)) {
- for (var i = 0; i < subNode.length; i++) {
- var child = subNode[i];
+ for (let i = 0; i < subNode.length; i++) {
+ const child = subNode[i];
if (!child) continue;
ancestors.push({
- node: node,
- key: _key2,
+ node,
+ key,
index: i
});
traverseSimpleImpl(child, enter, exit, state, ancestors);
@@ -52,8 +43,8 @@ function traverseSimpleImpl(node, enter, exit, state, ancestors) {
}
} else if (subNode) {
ancestors.push({
- node: node,
- key: _key2
+ node,
+ key
});
traverseSimpleImpl(subNode, enter, exit, state, ancestors);
ancestors.pop();
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverseFast.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverseFast.js
index 1ccd727f36..f038dd835e 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverseFast.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverseFast.js
@@ -1,47 +1,25 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = traverseFast;
var _definitions = require("../definitions");
function traverseFast(node, enter, opts) {
if (!node) return;
- var keys = _definitions.VISITOR_KEYS[node.type];
+ const keys = _definitions.VISITOR_KEYS[node.type];
if (!keys) return;
opts = opts || {};
enter(node, opts);
- for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
-
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
-
- var _key = _ref;
- var subNode = node[_key];
+ for (const key of keys) {
+ const subNode = node[key];
if (Array.isArray(subNode)) {
- for (var _iterator2 = subNode, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
- var _ref2;
-
- if (_isArray2) {
- if (_i2 >= _iterator2.length) break;
- _ref2 = _iterator2[_i2++];
- } else {
- _i2 = _iterator2.next();
- if (_i2.done) break;
- _ref2 = _i2.value;
- }
-
- var _node2 = _ref2;
- traverseFast(_node2, enter, opts);
+ for (const node of subNode) {
+ traverseFast(node, enter, opts);
}
} else {
traverseFast(subNode, enter, opts);
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
index 6c57f50d23..46b32efe8a 100644
--- 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
@@ -1,14 +1,24 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = inherit;
-var _uniq = _interopRequireDefault(require("lodash/uniq"));
+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));
+ 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/utils/react/cleanJSXElementLiteralChild.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
index 84de7435c9..f0ca13369b 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
@@ -1,28 +1,30 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = cleanJSXElementLiteralChild;
var _generated = require("../../builders/generated");
function cleanJSXElementLiteralChild(child, args) {
- var lines = child.value.split(/\r\n|\n|\r/);
- var lastNonEmptyLine = 0;
+ const lines = child.value.split(/\r\n|\n|\r/);
+ let lastNonEmptyLine = 0;
- for (var i = 0; i < lines.length; i++) {
+ for (let i = 0; i < lines.length; i++) {
if (lines[i].match(/[^ \t]/)) {
lastNonEmptyLine = i;
}
}
- var str = "";
+ let str = "";
- for (var _i = 0; _i < lines.length; _i++) {
- var line = lines[_i];
- var isFirstLine = _i === 0;
- var isLastLine = _i === lines.length - 1;
- var isLastNonEmptyLine = _i === lastNonEmptyLine;
- var trimmedLine = line.replace(/\t/g, " ");
+ for (let i = 0; i < lines.length; i++) {
+ const line = lines[i];
+ const isFirstLine = i === 0;
+ const isLastLine = i === lines.length - 1;
+ const isLastNonEmptyLine = i === lastNonEmptyLine;
+ let trimmedLine = line.replace(/\t/g, " ");
if (!isFirstLine) {
trimmedLine = trimmedLine.replace(/^[ ]+/, "");
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/shallowEqual.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/shallowEqual.js
index 8969d543a8..fae259e4fc 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/shallowEqual.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/shallowEqual.js
@@ -1,15 +1,14 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = shallowEqual;
function shallowEqual(actual, expected) {
- var keys = Object.keys(expected);
- var _arr = keys;
-
- for (var _i = 0; _i < _arr.length; _i++) {
- var key = _arr[_i];
+ const keys = Object.keys(expected);
+ for (const key of keys) {
if (actual[key] !== expected[key]) {
return false;
}
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
index 5c5d242d19..0faa29c5d6 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = buildMatchMemberExpression;
var _matchesPattern = _interopRequireDefault(require("./matchesPattern"));
@@ -8,8 +10,6 @@ var _matchesPattern = _interopRequireDefault(require("./matchesPattern"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function buildMatchMemberExpression(match, allowPartial) {
- var parts = match.split(".");
- return function (member) {
- return (0, _matchesPattern.default)(member, parts, allowPartial);
- };
+ const parts = match.split(".");
+ return member => (0, _matchesPattern.default)(member, parts, allowPartial);
} \ 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
index 684966d41d..93edeab2de 100644
--- 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
@@ -1,9 +1,12 @@
"use strict";
-exports.__esModule = true;
+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;
@@ -98,6 +101,7 @@ exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
exports.isInferredPredicate = isInferredPredicate;
exports.isInterfaceExtends = isInterfaceExtends;
exports.isInterfaceDeclaration = isInterfaceDeclaration;
+exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
@@ -105,6 +109,7 @@ exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
+exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
exports.isObjectTypeIndexer = isObjectTypeIndexer;
exports.isObjectTypeProperty = isObjectTypeProperty;
@@ -123,6 +128,7 @@ exports.isTypeParameter = isTypeParameter;
exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
+exports.isVariance = isVariance;
exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
exports.isJSXAttribute = isJSXAttribute;
exports.isJSXClosingElement = isJSXClosingElement;
@@ -144,11 +150,20 @@ exports.isParenthesizedExpression = isParenthesizedExpression;
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;
@@ -159,6 +174,7 @@ exports.isTSPropertySignature = isTSPropertySignature;
exports.isTSMethodSignature = isTSMethodSignature;
exports.isTSIndexSignature = isTSIndexSignature;
exports.isTSAnyKeyword = isTSAnyKeyword;
+exports.isTSUnknownKeyword = isTSUnknownKeyword;
exports.isTSNumberKeyword = isTSNumberKeyword;
exports.isTSObjectKeyword = isTSObjectKeyword;
exports.isTSBooleanKeyword = isTSBooleanKeyword;
@@ -177,8 +193,12 @@ 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;
@@ -194,6 +214,7 @@ exports.isTSEnumDeclaration = isTSEnumDeclaration;
exports.isTSEnumMember = isTSEnumMember;
exports.isTSModuleDeclaration = isTSModuleDeclaration;
exports.isTSModuleBlock = isTSModuleBlock;
+exports.isTSImportType = isTSImportType;
exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
exports.isTSExternalModuleReference = isTSExternalModuleReference;
exports.isTSNonNullExpression = isTSNonNullExpression;
@@ -237,10 +258,12 @@ 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;
@@ -248,994 +271,4015 @@ exports.isRegexLiteral = isRegexLiteral;
exports.isRestProperty = isRestProperty;
exports.isSpreadProperty = isSpreadProperty;
-var _is = _interopRequireDefault(require("../is"));
+var _shallowEqual = _interopRequireDefault(require("../../utils/shallowEqual"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function isArrayExpression(node, opts) {
- return (0, _is.default)("ArrayExpression", 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) {
- return (0, _is.default)("AssignmentExpression", 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) {
- return (0, _is.default)("BinaryExpression", 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) {
- return (0, _is.default)("Directive", 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) {
- return (0, _is.default)("DirectiveLiteral", 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) {
- return (0, _is.default)("BlockStatement", 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) {
- return (0, _is.default)("BreakStatement", 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) {
- return (0, _is.default)("CallExpression", 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) {
- return (0, _is.default)("CatchClause", 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) {
- return (0, _is.default)("ConditionalExpression", 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) {
- return (0, _is.default)("ContinueStatement", 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) {
- return (0, _is.default)("DebuggerStatement", 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) {
- return (0, _is.default)("DoWhileStatement", 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) {
- return (0, _is.default)("EmptyStatement", 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) {
- return (0, _is.default)("ExpressionStatement", 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) {
- return (0, _is.default)("File", 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) {
- return (0, _is.default)("ForInStatement", 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) {
- return (0, _is.default)("ForStatement", 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) {
- return (0, _is.default)("FunctionDeclaration", 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) {
- return (0, _is.default)("FunctionExpression", 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) {
- return (0, _is.default)("Identifier", 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) {
- return (0, _is.default)("IfStatement", 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) {
- return (0, _is.default)("LabeledStatement", 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) {
- return (0, _is.default)("StringLiteral", 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) {
- return (0, _is.default)("NumericLiteral", 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) {
- return (0, _is.default)("NullLiteral", 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) {
- return (0, _is.default)("BooleanLiteral", 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) {
- return (0, _is.default)("RegExpLiteral", 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) {
- return (0, _is.default)("LogicalExpression", 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) {
- return (0, _is.default)("MemberExpression", 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) {
- return (0, _is.default)("NewExpression", 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) {
- return (0, _is.default)("Program", 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) {
- return (0, _is.default)("ObjectExpression", 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) {
- return (0, _is.default)("ObjectMethod", 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) {
- return (0, _is.default)("ObjectProperty", 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) {
- return (0, _is.default)("RestElement", 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) {
- return (0, _is.default)("ReturnStatement", 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) {
- return (0, _is.default)("SequenceExpression", 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 isSwitchCase(node, opts) {
- return (0, _is.default)("SwitchCase", 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) {
- return (0, _is.default)("SwitchStatement", 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) {
- return (0, _is.default)("ThisExpression", 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) {
- return (0, _is.default)("ThrowStatement", 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) {
- return (0, _is.default)("TryStatement", 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) {
- return (0, _is.default)("UnaryExpression", 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) {
- return (0, _is.default)("UpdateExpression", 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) {
- return (0, _is.default)("VariableDeclaration", 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) {
- return (0, _is.default)("VariableDeclarator", 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) {
- return (0, _is.default)("WhileStatement", 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) {
- return (0, _is.default)("WithStatement", 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) {
- return (0, _is.default)("AssignmentPattern", 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) {
- return (0, _is.default)("ArrayPattern", 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) {
- return (0, _is.default)("ArrowFunctionExpression", 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) {
- return (0, _is.default)("ClassBody", 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) {
- return (0, _is.default)("ClassDeclaration", 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) {
- return (0, _is.default)("ClassExpression", 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) {
- return (0, _is.default)("ExportAllDeclaration", 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) {
- return (0, _is.default)("ExportDefaultDeclaration", 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) {
- return (0, _is.default)("ExportNamedDeclaration", 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) {
- return (0, _is.default)("ExportSpecifier", 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) {
- return (0, _is.default)("ForOfStatement", 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) {
- return (0, _is.default)("ImportDeclaration", 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) {
- return (0, _is.default)("ImportDefaultSpecifier", 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) {
- return (0, _is.default)("ImportNamespaceSpecifier", 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) {
- return (0, _is.default)("ImportSpecifier", 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) {
- return (0, _is.default)("MetaProperty", 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) {
- return (0, _is.default)("ClassMethod", 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) {
- return (0, _is.default)("ObjectPattern", 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) {
- return (0, _is.default)("SpreadElement", 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) {
- return (0, _is.default)("Super", 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) {
- return (0, _is.default)("TaggedTemplateExpression", 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) {
- return (0, _is.default)("TemplateElement", 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) {
- return (0, _is.default)("TemplateLiteral", 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) {
- return (0, _is.default)("YieldExpression", 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) {
- return (0, _is.default)("AnyTypeAnnotation", 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) {
- return (0, _is.default)("ArrayTypeAnnotation", 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) {
- return (0, _is.default)("BooleanTypeAnnotation", 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) {
- return (0, _is.default)("BooleanLiteralTypeAnnotation", 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) {
- return (0, _is.default)("NullLiteralTypeAnnotation", 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) {
- return (0, _is.default)("ClassImplements", 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) {
- return (0, _is.default)("DeclareClass", 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) {
- return (0, _is.default)("DeclareFunction", 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) {
- return (0, _is.default)("DeclareInterface", 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) {
- return (0, _is.default)("DeclareModule", 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) {
- return (0, _is.default)("DeclareModuleExports", 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) {
- return (0, _is.default)("DeclareTypeAlias", 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) {
- return (0, _is.default)("DeclareOpaqueType", 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) {
- return (0, _is.default)("DeclareVariable", 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) {
- return (0, _is.default)("DeclareExportDeclaration", 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) {
- return (0, _is.default)("DeclareExportAllDeclaration", 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) {
- return (0, _is.default)("DeclaredPredicate", 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) {
- return (0, _is.default)("ExistsTypeAnnotation", 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) {
- return (0, _is.default)("FunctionTypeAnnotation", 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) {
- return (0, _is.default)("FunctionTypeParam", 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) {
- return (0, _is.default)("GenericTypeAnnotation", 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) {
- return (0, _is.default)("InferredPredicate", 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) {
- return (0, _is.default)("InterfaceExtends", 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) {
- return (0, _is.default)("InterfaceDeclaration", 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) {
- return (0, _is.default)("IntersectionTypeAnnotation", 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) {
- return (0, _is.default)("MixedTypeAnnotation", 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) {
- return (0, _is.default)("EmptyTypeAnnotation", 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) {
- return (0, _is.default)("NullableTypeAnnotation", 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) {
- return (0, _is.default)("NumberLiteralTypeAnnotation", 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) {
- return (0, _is.default)("NumberTypeAnnotation", 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) {
- return (0, _is.default)("ObjectTypeAnnotation", 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) {
- return (0, _is.default)("ObjectTypeCallProperty", 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) {
- return (0, _is.default)("ObjectTypeIndexer", 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) {
- return (0, _is.default)("ObjectTypeProperty", 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) {
- return (0, _is.default)("ObjectTypeSpreadProperty", 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) {
- return (0, _is.default)("OpaqueType", 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) {
- return (0, _is.default)("QualifiedTypeIdentifier", 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) {
- return (0, _is.default)("StringLiteralTypeAnnotation", 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) {
- return (0, _is.default)("StringTypeAnnotation", 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) {
- return (0, _is.default)("ThisTypeAnnotation", 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) {
- return (0, _is.default)("TupleTypeAnnotation", 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) {
- return (0, _is.default)("TypeofTypeAnnotation", 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) {
- return (0, _is.default)("TypeAlias", 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) {
- return (0, _is.default)("TypeAnnotation", 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) {
- return (0, _is.default)("TypeCastExpression", 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) {
- return (0, _is.default)("TypeParameter", 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) {
- return (0, _is.default)("TypeParameterDeclaration", 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) {
- return (0, _is.default)("TypeParameterInstantiation", 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) {
- return (0, _is.default)("UnionTypeAnnotation", 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) {
- return (0, _is.default)("VoidTypeAnnotation", 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) {
- return (0, _is.default)("JSXAttribute", 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) {
- return (0, _is.default)("JSXClosingElement", 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) {
- return (0, _is.default)("JSXElement", 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) {
- return (0, _is.default)("JSXEmptyExpression", 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) {
- return (0, _is.default)("JSXExpressionContainer", 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) {
- return (0, _is.default)("JSXSpreadChild", 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) {
- return (0, _is.default)("JSXIdentifier", 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) {
- return (0, _is.default)("JSXMemberExpression", 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) {
- return (0, _is.default)("JSXNamespacedName", 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) {
- return (0, _is.default)("JSXOpeningElement", 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) {
- return (0, _is.default)("JSXSpreadAttribute", 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) {
- return (0, _is.default)("JSXText", 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) {
- return (0, _is.default)("JSXFragment", 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) {
- return (0, _is.default)("JSXOpeningFragment", 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) {
- return (0, _is.default)("JSXClosingFragment", 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) {
- return (0, _is.default)("Noop", 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 isParenthesizedExpression(node, opts) {
- return (0, _is.default)("ParenthesizedExpression", 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 isAwaitExpression(node, opts) {
- return (0, _is.default)("AwaitExpression", 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) {
- return (0, _is.default)("BindExpression", 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) {
- return (0, _is.default)("ClassProperty", 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) {
- return (0, _is.default)("Import", 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) {
- return (0, _is.default)("Decorator", 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) {
- return (0, _is.default)("DoExpression", 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) {
- return (0, _is.default)("ExportDefaultSpecifier", 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) {
- return (0, _is.default)("ExportNamespaceSpecifier", 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) {
- return (0, _is.default)("TSParameterProperty", 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) {
- return (0, _is.default)("TSDeclareFunction", 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) {
- return (0, _is.default)("TSDeclareMethod", 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) {
- return (0, _is.default)("TSQualifiedName", 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) {
- return (0, _is.default)("TSCallSignatureDeclaration", 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) {
- return (0, _is.default)("TSConstructSignatureDeclaration", 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) {
- return (0, _is.default)("TSPropertySignature", 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) {
- return (0, _is.default)("TSMethodSignature", 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) {
- return (0, _is.default)("TSIndexSignature", 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) {
- return (0, _is.default)("TSAnyKeyword", 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) {
- return (0, _is.default)("TSNumberKeyword", 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) {
- return (0, _is.default)("TSObjectKeyword", 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) {
- return (0, _is.default)("TSBooleanKeyword", 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) {
- return (0, _is.default)("TSStringKeyword", 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) {
- return (0, _is.default)("TSSymbolKeyword", 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) {
- return (0, _is.default)("TSVoidKeyword", 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) {
- return (0, _is.default)("TSUndefinedKeyword", 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) {
- return (0, _is.default)("TSNullKeyword", 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) {
- return (0, _is.default)("TSNeverKeyword", 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) {
- return (0, _is.default)("TSThisType", 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) {
- return (0, _is.default)("TSFunctionType", 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) {
- return (0, _is.default)("TSConstructorType", 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) {
- return (0, _is.default)("TSTypeReference", 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) {
- return (0, _is.default)("TSTypePredicate", 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) {
- return (0, _is.default)("TSTypeQuery", 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) {
- return (0, _is.default)("TSTypeLiteral", 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) {
- return (0, _is.default)("TSArrayType", 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) {
- return (0, _is.default)("TSTupleType", 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) {
- return (0, _is.default)("TSUnionType", 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) {
- return (0, _is.default)("TSIntersectionType", 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) {
- return (0, _is.default)("TSParenthesizedType", 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) {
- return (0, _is.default)("TSTypeOperator", 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) {
- return (0, _is.default)("TSIndexedAccessType", 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) {
- return (0, _is.default)("TSMappedType", 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) {
- return (0, _is.default)("TSLiteralType", 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) {
- return (0, _is.default)("TSExpressionWithTypeArguments", 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) {
- return (0, _is.default)("TSInterfaceDeclaration", 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) {
- return (0, _is.default)("TSInterfaceBody", 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) {
- return (0, _is.default)("TSTypeAliasDeclaration", 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) {
- return (0, _is.default)("TSAsExpression", 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) {
- return (0, _is.default)("TSTypeAssertion", 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) {
- return (0, _is.default)("TSEnumDeclaration", 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) {
- return (0, _is.default)("TSEnumMember", 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) {
- return (0, _is.default)("TSModuleDeclaration", 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) {
- return (0, _is.default)("TSModuleBlock", 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) {
- return (0, _is.default)("TSImportEqualsDeclaration", 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) {
- return (0, _is.default)("TSExternalModuleReference", 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) {
- return (0, _is.default)("TSNonNullExpression", 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) {
- return (0, _is.default)("TSExportAssignment", 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) {
- return (0, _is.default)("TSNamespaceExportDeclaration", 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) {
- return (0, _is.default)("TSTypeAnnotation", 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) {
- return (0, _is.default)("TSTypeParameterInstantiation", 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) {
- return (0, _is.default)("TSTypeParameterDeclaration", 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) {
- return (0, _is.default)("TSTypeParameter", 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) {
- return (0, _is.default)("Expression", 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 || "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 || "ParenthesizedExpression" === nodeType || "AwaitExpression" === nodeType || "BindExpression" === nodeType || "OptionalMemberExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "OptionalCallExpression" === nodeType || "Import" === nodeType || "DoExpression" === nodeType || "BigIntLiteral" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
}
function isBinary(node, opts) {
- return (0, _is.default)("Binary", 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) {
- return (0, _is.default)("Scopable", 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) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
}
function isBlockParent(node, opts) {
- return (0, _is.default)("BlockParent", 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) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
}
function isBlock(node, opts) {
- return (0, _is.default)("Block", node, opts);
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Block" || "BlockStatement" === nodeType || "Program" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
}
function isStatement(node, opts) {
- return (0, _is.default)("Statement", 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) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
}
function isTerminatorless(node, opts) {
- return (0, _is.default)("Terminatorless", 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) {
- return (0, _is.default)("CompletionStatement", 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) {
- return (0, _is.default)("Conditional", 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) {
- return (0, _is.default)("Loop", 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) {
- return (0, _is.default)("While", 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) {
- return (0, _is.default)("ExpressionWrapper", node, opts);
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExpressionWrapper" || "ExpressionStatement" === nodeType || "TypeCastExpression" === nodeType || "ParenthesizedExpression" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
}
function isFor(node, opts) {
- return (0, _is.default)("For", 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) {
- return (0, _is.default)("ForXStatement", 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) {
- return (0, _is.default)("Function", 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) {
- return (0, _is.default)("FunctionParent", 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) {
- return (0, _is.default)("Pureish", 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) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
}
function isDeclaration(node, opts) {
- return (0, _is.default)("Declaration", 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) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
}
function isPatternLike(node, opts) {
- return (0, _is.default)("PatternLike", node, opts);
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "PatternLike" || "Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
}
function isLVal(node, opts) {
- return (0, _is.default)("LVal", 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) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
}
function isTSEntityName(node, opts) {
- return (0, _is.default)("TSEntityName", node, opts);
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSEntityName" || "Identifier" === nodeType || "TSQualifiedName" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
}
function isLiteral(node, opts) {
- return (0, _is.default)("Literal", 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) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
}
function isImmutable(node, opts) {
- return (0, _is.default)("Immutable", 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) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
}
function isUserWhitespacable(node, opts) {
- return (0, _is.default)("UserWhitespacable", 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) {
- return (0, _is.default)("Method", 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) {
- return (0, _is.default)("ObjectMember", 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) {
- return (0, _is.default)("Property", 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) {
- return (0, _is.default)("UnaryLike", 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) {
- return (0, _is.default)("Pattern", node, opts);
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Pattern" || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
}
function isClass(node, opts) {
- return (0, _is.default)("Class", 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) {
- return (0, _is.default)("ModuleDeclaration", 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) {
- return (0, _is.default)("ExportDeclaration", 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) {
- return (0, _is.default)("ModuleSpecifier", 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) {
- return (0, _is.default)("Flow", 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) {
- return (0, _is.default)("FlowBaseAnnotation", 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) {
- return (0, _is.default)("FlowDeclaration", 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) {
- return (0, _is.default)("FlowPredicate", 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) {
- return (0, _is.default)("JSX", 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) {
- return (0, _is.default)("TSTypeElement", 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) {
- return (0, _is.default)("TSType", 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");
- return (0, _is.default)("NumberLiteral", node, opts);
+ 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");
- return (0, _is.default)("RegexLiteral", node, opts);
+ 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");
- return (0, _is.default)("RestProperty", node, opts);
+ 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");
- return (0, _is.default)("SpreadProperty", node, opts);
+ 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-eslint/node_modules/@babel/types/lib/validators/is.js
index c1e50d857b..5aa809d25e 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/is.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/is.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = is;
var _shallowEqual = _interopRequireDefault(require("../utils/shallowEqual"));
@@ -11,7 +13,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
function is(type, node, opts) {
if (!node) return false;
- var matches = (0, _isType.default)(node.type, type);
+ const matches = (0, _isType.default)(node.type, type);
if (!matches) return false;
if (typeof opts === "undefined") {
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBinding.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBinding.js
index 3644879cdd..24d781bf04 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBinding.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBinding.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = isBinding;
var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers"));
@@ -8,12 +10,12 @@ var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBi
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function isBinding(node, parent) {
- var keys = _getBindingIdentifiers.default.keys[parent.type];
+ const keys = _getBindingIdentifiers.default.keys[parent.type];
if (keys) {
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- var val = parent[key];
+ for (let i = 0; i < keys.length; i++) {
+ const key = keys[i];
+ const val = parent[key];
if (Array.isArray(val)) {
if (val.indexOf(node) >= 0) return true;
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBlockScoped.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBlockScoped.js
index da5c53fce4..7e6549e03b 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBlockScoped.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBlockScoped.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = isBlockScoped;
var _generated = require("./generated");
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isImmutable.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isImmutable.js
index 2ea002713e..b00b23d4ce 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isImmutable.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isImmutable.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = isImmutable;
var _isType = _interopRequireDefault(require("./isType"));
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isLet.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isLet.js
index a3a6169a03..93d7562808 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isLet.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isLet.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = isLet;
var _generated = require("./generated");
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isNode.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isNode.js
index 641cb9c52b..e88a47aac4 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isNode.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isNode.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = isNode;
var _definitions = require("../definitions");
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
index 549c0b470f..01c5c1848a 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = isNodesEquivalent;
var _definitions = require("../definitions");
@@ -14,11 +16,10 @@ function isNodesEquivalent(a, b) {
return false;
}
- var fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
-
- for (var _i = 0; _i < fields.length; _i++) {
- var field = fields[_i];
+ 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;
}
@@ -32,7 +33,7 @@ function isNodesEquivalent(a, b) {
return false;
}
- for (var i = 0; i < a[field].length; i++) {
+ for (let i = 0; i < a[field].length; i++) {
if (!isNodesEquivalent(a[field][i], b[field][i])) {
return false;
}
@@ -41,6 +42,16 @@ function isNodesEquivalent(a, b) {
continue;
}
+ if (typeof a[field] === "object" && (!visitorKeys || !visitorKeys.includes(field))) {
+ for (const key in a[field]) {
+ if (a[field][key] !== b[field][key]) {
+ return false;
+ }
+ }
+
+ continue;
+ }
+
if (!isNodesEquivalent(a[field], b[field])) {
return false;
}
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
index 5bb68b4ad4..26c047efb4 100644
--- 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
@@ -1,98 +1,94 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = isReferenced;
function isReferenced(node, parent) {
switch (parent.type) {
- case "BindExpression":
- return parent.object === node || parent.callee === node;
-
case "MemberExpression":
case "JSXMemberExpression":
- if (parent.property === node && parent.computed) {
- return true;
- } else if (parent.object === node) {
- return true;
- } else {
- return false;
+ case "OptionalMemberExpression":
+ if (parent.property === node) {
+ return !!parent.computed;
}
- case "MetaProperty":
- return false;
-
- case "ObjectProperty":
- if (parent.key === node) {
- return parent.computed;
- }
+ return parent.object === node;
case "VariableDeclarator":
- return parent.id !== node;
+ return parent.init === node;
case "ArrowFunctionExpression":
- case "FunctionDeclaration":
- case "FunctionExpression":
- var _arr = parent.params;
-
- for (var _i = 0; _i < _arr.length; _i++) {
- var param = _arr[_i];
- if (param === node) return false;
- }
-
- return parent.id !== node;
+ return parent.body === node;
case "ExportSpecifier":
if (parent.source) {
return false;
- } else {
- return parent.local === node;
}
- case "ExportNamespaceSpecifier":
- case "ExportDefaultSpecifier":
- return false;
-
- case "JSXAttribute":
- return parent.name !== node;
+ return parent.local === node;
+ case "ObjectProperty":
case "ClassProperty":
+ case "ClassPrivateProperty":
+ case "ClassMethod":
+ case "ClassPrivateMethod":
+ case "ObjectMethod":
if (parent.key === node) {
- return parent.computed;
- } else {
- return parent.value === node;
+ return !!parent.computed;
}
- case "ImportDefaultSpecifier":
- case "ImportNamespaceSpecifier":
- case "ImportSpecifier":
- return false;
+ return parent.value === node;
case "ClassDeclaration":
case "ClassExpression":
- return parent.id !== node;
+ return parent.superClass === node;
- case "ClassMethod":
- case "ObjectMethod":
- return parent.key === node && parent.computed;
+ case "AssignmentExpression":
+ return parent.right === node;
+
+ case "AssignmentPattern":
+ return parent.right === node;
case "LabeledStatement":
return false;
case "CatchClause":
- return parent.param !== node;
+ return false;
case "RestElement":
return false;
- case "AssignmentExpression":
- return parent.right === node;
+ case "BreakStatement":
+ case "ContinueStatement":
+ return false;
- case "AssignmentPattern":
- return parent.right === node;
+ 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;
}
return true;
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
index 91928ca59e..c808631faf 100644
--- 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
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = isScope;
var _generated = require("./generated");
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isSpecifierDefault.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
index 936d58e9e5..25431cc273 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = isSpecifierDefault;
var _generated = require("./generated");
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isType.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isType.js
index 04410ca5d0..59d31dfbbf 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isType.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isType.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = isType;
var _definitions = require("../definitions");
@@ -8,25 +10,13 @@ var _definitions = require("../definitions");
function isType(nodeType, targetType) {
if (nodeType === targetType) return true;
if (_definitions.ALIAS_KEYS[targetType]) return false;
- var aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
+ const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
if (aliases) {
if (aliases[0] === nodeType) return true;
- for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
-
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
-
- var _alias = _ref;
- if (nodeType === _alias) return true;
+ for (const alias of aliases) {
+ if (nodeType === alias) return true;
}
}
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidES3Identifier.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
index ce98b3819c..8455cab269 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
@@ -1,13 +1,15 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = isValidES3Identifier;
var _isValidIdentifier = _interopRequireDefault(require("./isValidIdentifier"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var RESERVED_WORDS_ES3_ONLY = new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]);
+const RESERVED_WORDS_ES3_ONLY = new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]);
function isValidES3Identifier(name) {
return (0, _isValidIdentifier.default)(name) && !RESERVED_WORDS_ES3_ONLY.has(name);
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
index 981ae2a647..8c54b7ac86 100644
--- 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
@@ -1,18 +1,28 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = isValidIdentifier;
-var _esutils = _interopRequireDefault(require("esutils"));
+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)) {
+ 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);
+ 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/isVar.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isVar.js
index df6b20731c..a34801d18f 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isVar.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isVar.js
@@ -1,6 +1,8 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = isVar;
var _generated = require("./generated");
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/matchesPattern.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/matchesPattern.js
index b2cf579423..538e011f4c 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/matchesPattern.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/matchesPattern.js
@@ -1,15 +1,17 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = matchesPattern;
var _generated = require("./generated");
function matchesPattern(member, match, allowPartial) {
if (!(0, _generated.isMemberExpression)(member)) return false;
- var parts = Array.isArray(match) ? match : match.split(".");
- var nodes = [];
- var node;
+ const parts = Array.isArray(match) ? match : match.split(".");
+ const nodes = [];
+ let node;
for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
nodes.push(node.property);
@@ -19,14 +21,14 @@ function matchesPattern(member, match, allowPartial) {
if (nodes.length < parts.length) return false;
if (!allowPartial && nodes.length > parts.length) return false;
- for (var i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
- var _node = nodes[j];
- var value = void 0;
+ for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
+ const node = nodes[j];
+ let value;
- if ((0, _generated.isIdentifier)(_node)) {
- value = _node.name;
- } else if ((0, _generated.isStringLiteral)(_node)) {
- value = _node.value;
+ if ((0, _generated.isIdentifier)(node)) {
+ value = node.name;
+ } else if ((0, _generated.isStringLiteral)(node)) {
+ value = node.value;
} else {
return false;
}
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isCompatTag.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isCompatTag.js
index f5dc829a9b..57761c2b1b 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isCompatTag.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isCompatTag.js
@@ -1,8 +1,10 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = isCompatTag;
function isCompatTag(tagName) {
- return !!tagName && /^[a-z]|-/.test(tagName);
+ return !!tagName && /^[a-z]/.test(tagName);
} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isReactComponent.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isReactComponent.js
index af7abc2b07..33b30d71e9 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isReactComponent.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isReactComponent.js
@@ -1,12 +1,14 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = void 0;
var _buildMatchMemberExpression = _interopRequireDefault(require("../buildMatchMemberExpression"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
+const isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
var _default = isReactComponent;
exports.default = _default; \ 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
index ab96408b3a..1fe1c1c9b8 100644
--- 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
@@ -1,15 +1,17 @@
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.default = validate;
var _definitions = require("../definitions");
function validate(node, key, val) {
if (!node) return;
- var fields = _definitions.NODE_FIELDS[node.type];
+ const fields = _definitions.NODE_FIELDS[node.type];
if (!fields) return;
- var field = fields[key];
+ const field = fields[key];
if (!field || !field.validate) return;
if (field.optional && val == null) return;
field.validate(node, key, val);
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
index af3128ee9f..b365bb91f1 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/package.json
@@ -1,32 +1,4 @@
{
- "_from": "@babel/types@7.0.0-beta.36",
- "_id": "@babel/types@7.0.0-beta.36",
- "_inBundle": false,
- "_integrity": "sha512-PyAORDO9um9tfnrddXgmWN9e6Sq9qxraQIt5ynqBOSXKA5qvK1kUr+Q3nSzKFdzorsiK+oqcUnAFvEoKxv9D+Q==",
- "_location": "/babel-eslint/@babel/types",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "@babel/types@7.0.0-beta.36",
- "name": "@babel/types",
- "escapedName": "@babel%2ftypes",
- "scope": "@babel",
- "rawSpec": "7.0.0-beta.36",
- "saveSpec": null,
- "fetchSpec": "7.0.0-beta.36"
- },
- "_requiredBy": [
- "/babel-eslint",
- "/babel-eslint/@babel/helper-function-name",
- "/babel-eslint/@babel/helper-get-function-arity",
- "/babel-eslint/@babel/template",
- "/babel-eslint/@babel/traverse"
- ],
- "_resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.36.tgz",
- "_shasum": "64f2004353de42adb72f9ebb4665fc35b5499d23",
- "_spec": "@babel/types@7.0.0-beta.36",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint",
"author": {
"name": "Sebastian McKenzie",
"email": "sebmck@gmail.com"
@@ -34,15 +6,16 @@
"bundleDependencies": false,
"dependencies": {
"esutils": "^2.0.2",
- "lodash": "^4.2.0",
+ "lodash": "^4.17.11",
"to-fast-properties": "^2.0.0"
},
"deprecated": false,
"description": "Babel Types is a Lodash-esque utility library for AST nodes",
"devDependencies": {
- "@babel/generator": "7.0.0-beta.36",
- "babylon": "7.0.0-beta.36"
+ "@babel/generator": "^7.3.4",
+ "@babel/parser": "^7.3.4"
},
+ "gitHead": "1f6454cc90fe33e0a32260871212e2f719f35741",
"homepage": "https://babeljs.io/",
"license": "MIT",
"main": "lib/index.js",
@@ -51,5 +24,6 @@
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-types"
},
- "version": "7.0.0-beta.36"
-}
+ "types": "lib/index.d.ts",
+ "version": "7.3.4"
+} \ 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-eslint/node_modules/@babel/types/scripts/generateTypeHelpers.js
index e122145c3c..794b214adf 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generateTypeHelpers.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generateTypeHelpers.js
@@ -1,6 +1,7 @@
"use strict";
const fs = require("fs");
const path = require("path");
+const chalk = require("chalk");
const generateBuilders = require("./generators/generateBuilders");
const generateValidators = require("./generators/generateValidators");
const generateAsserts = require("./generators/generateAsserts");
@@ -26,6 +27,13 @@ function writeFile(content, location) {
console.log("Generating @babel/types dynamic functions");
writeFile(generateBuilders(), "builders/generated/index.js");
+console.log(` ${chalk.green("✔")} Generated builders`);
+
writeFile(generateValidators(), "validators/generated/index.js");
+console.log(` ${chalk.green("✔")} Generated validators`);
+
writeFile(generateAsserts(), "asserts/generated/index.js");
+console.log(` ${chalk.green("✔")} Generated asserts`);
+
writeFile(generateConstants(), "constants/generated/index.js");
+console.log(` ${chalk.green("✔")} Generated constants`);
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
new file mode 100644
index 0000000000..3bbb523624
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/docs.js
@@ -0,0 +1,117 @@
+"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
new file mode 100644
index 0000000000..daab2411d7
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/flow.js
@@ -0,0 +1,153 @@
+"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/generateValidators.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateValidators.js
index b523d6adc8..1e1ed321be 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateValidators.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateValidators.js
@@ -1,9 +1,31 @@
"use strict";
const definitions = require("../../lib/definitions");
-function addIsHelper(type) {
- return `export function is${type}(node: Object, opts?: Object): boolean {
- return is("${type}", node, opts) }
+function addIsHelper(type, aliasKeys, deprecated) {
+ const targetType = JSON.stringify(type);
+ let aliasSource = "";
+ if (aliasKeys) {
+ aliasSource =
+ " || " +
+ aliasKeys.map(JSON.stringify).join(" === nodeType || ") +
+ " === nodeType";
+ }
+
+ return `export function is${type}(node: ?Object, opts?: Object): boolean {
+ ${deprecated || ""}
+ if (!node) return false;
+
+ const nodeType = node.type;
+ if (nodeType === ${targetType}${aliasSource}) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return shallowEqual(node, opts);
+ }
+ }
+
+ return false;
+ }
`;
}
@@ -13,22 +35,20 @@ module.exports = function generateValidators() {
* This file is auto-generated! Do not modify it directly.
* To re-generate run 'make build'
*/
-import is from "../is";\n\n`;
+import shallowEqual from "../../utils/shallowEqual";\n\n`;
Object.keys(definitions.VISITOR_KEYS).forEach(type => {
output += addIsHelper(type);
});
Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => {
- output += addIsHelper(type);
+ output += addIsHelper(type, definitions.FLIPPED_ALIAS_KEYS[type]);
});
Object.keys(definitions.DEPRECATED_KEYS).forEach(type => {
const newType = definitions.DEPRECATED_KEYS[type];
- output += `export function is${type}(node: Object, opts: Object): boolean {
- console.trace("The node type ${type} has been renamed to ${newType}");
- return is("${type}", node, opts);
-}\n`;
+ const deprecated = `console.trace("The node type ${type} has been renamed to ${newType}");`;
+ output += addIsHelper(type, null, deprecated);
});
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
new file mode 100644
index 0000000000..b6019ec373
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/typescript.js
@@ -0,0 +1,200 @@
+"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/formatCode.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/formatCode.js
index 9d279e6e49..1ed327bd82 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/formatCode.js
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/formatCode.js
@@ -4,6 +4,8 @@ const prettier = require("prettier");
module.exports = function formatCode(code, filename) {
filename = filename || __filename;
const prettierConfig = prettier.resolveConfig.sync(filename);
+ prettierConfig.filepath = filename;
+ prettierConfig.parser = "babylon";
return prettier.format(code, prettierConfig);
};
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/stringifyValidator.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/stringifyValidator.js
new file mode 100644
index 0000000000..ff33e8e25a
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/stringifyValidator.js
@@ -0,0 +1,43 @@
+module.exports = function stringifyValidator(validator, nodePrefix) {
+ if (validator === undefined) {
+ return "any";
+ }
+
+ if (validator.each) {
+ return `Array<${stringifyValidator(validator.each, nodePrefix)}>`;
+ }
+
+ if (validator.chainOf) {
+ return stringifyValidator(validator.chainOf[1], nodePrefix);
+ }
+
+ if (validator.oneOf) {
+ return validator.oneOf.map(JSON.stringify).join(" | ");
+ }
+
+ if (validator.oneOfNodeTypes) {
+ return validator.oneOfNodeTypes.map(_ => nodePrefix + _).join(" | ");
+ }
+
+ if (validator.oneOfNodeOrValueTypes) {
+ return validator.oneOfNodeOrValueTypes
+ .map(_ => {
+ return isValueType(_) ? _ : nodePrefix + _;
+ })
+ .join(" | ");
+ }
+
+ if (validator.type) {
+ return validator.type;
+ }
+
+ return ["any"];
+};
+
+/**
+ * Heuristic to decide whether or not the given type is a value type (eg. "null")
+ * or a Node type (eg. "Expression").
+ */
+function isValueType(type) {
+ return type.charAt(0).toLowerCase() === type.charAt(0);
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/toFunctionName.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/toFunctionName.js
new file mode 100644
index 0000000000..627c9a7d8f
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/toFunctionName.js
@@ -0,0 +1,4 @@
+module.exports = function toFunctionName(typeName) {
+ const _ = typeName.replace(/^TS/, "ts").replace(/^JSX/, "jsx");
+ return _.slice(0, 1).toLowerCase() + _.slice(1);
+};
diff --git a/tools/node_modules/babel-eslint/node_modules/ansi-styles/index.js b/tools/node_modules/babel-eslint/node_modules/ansi-styles/index.js
index 3d3baa66d7..90a871c4d7 100644
--- a/tools/node_modules/babel-eslint/node_modules/ansi-styles/index.js
+++ b/tools/node_modules/babel-eslint/node_modules/ansi-styles/index.js
@@ -102,30 +102,43 @@ function assembleStyles() {
});
}
+ const ansi2ansi = n => n;
const rgb2rgb = (r, g, b) => [r, g, b];
styles.color.close = '\u001B[39m';
styles.bgColor.close = '\u001B[49m';
- styles.color.ansi = {};
- styles.color.ansi256 = {};
+ styles.color.ansi = {
+ ansi: wrapAnsi16(ansi2ansi, 0)
+ };
+ styles.color.ansi256 = {
+ ansi256: wrapAnsi256(ansi2ansi, 0)
+ };
styles.color.ansi16m = {
rgb: wrapAnsi16m(rgb2rgb, 0)
};
- styles.bgColor.ansi = {};
- styles.bgColor.ansi256 = {};
+ styles.bgColor.ansi = {
+ ansi: wrapAnsi16(ansi2ansi, 10)
+ };
+ styles.bgColor.ansi256 = {
+ ansi256: wrapAnsi256(ansi2ansi, 10)
+ };
styles.bgColor.ansi16m = {
rgb: wrapAnsi16m(rgb2rgb, 10)
};
- for (const key of Object.keys(colorConvert)) {
+ for (let key of Object.keys(colorConvert)) {
if (typeof colorConvert[key] !== 'object') {
continue;
}
const suite = colorConvert[key];
+ if (key === 'ansi16') {
+ key = 'ansi';
+ }
+
if ('ansi16' in suite) {
styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
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
index 6e9e19423b..5663ace24b 100644
--- a/tools/node_modules/babel-eslint/node_modules/ansi-styles/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/ansi-styles/package.json
@@ -1,27 +1,4 @@
{
- "_from": "ansi-styles@^3.1.0",
- "_id": "ansi-styles@3.2.0",
- "_inBundle": false,
- "_integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==",
- "_location": "/babel-eslint/ansi-styles",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "ansi-styles@^3.1.0",
- "name": "ansi-styles",
- "escapedName": "ansi-styles",
- "rawSpec": "^3.1.0",
- "saveSpec": null,
- "fetchSpec": "^3.1.0"
- },
- "_requiredBy": [
- "/babel-eslint/chalk"
- ],
- "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz",
- "_shasum": "c159b8d5be0f9e5a6f346dab94f16ce022161b88",
- "_spec": "ansi-styles@^3.1.0",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/chalk",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -42,6 +19,7 @@
"devDependencies": {
"ava": "*",
"babel-polyfill": "^6.23.0",
+ "svg-term-cli": "^2.1.1",
"xo": "*"
},
"engines": {
@@ -80,7 +58,8 @@
"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.0"
-}
+ "version": "3.2.1"
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/ansi-styles/readme.md b/tools/node_modules/babel-eslint/node_modules/ansi-styles/readme.md
index dce368742b..3158e2df59 100644
--- a/tools/node_modules/babel-eslint/node_modules/ansi-styles/readme.md
+++ b/tools/node_modules/babel-eslint/node_modules/ansi-styles/readme.md
@@ -4,7 +4,7 @@
You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
-![](screenshot.png)
+<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900">
## Install
diff --git a/tools/node_modules/babel-eslint/node_modules/babylon/README.md b/tools/node_modules/babel-eslint/node_modules/babylon/README.md
deleted file mode 100644
index 78dd00be33..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/babylon/README.md
+++ /dev/null
@@ -1,163 +0,0 @@
-<p align="center">
- <img alt="babylon" src="https://raw.githubusercontent.com/babel/logo/master/babylon.png" width="700">
-</p>
-
-<p align="center">
- Babylon is a JavaScript parser used in <a href="https://github.com/babel/babel">Babel</a>.
-</p>
-
- - The latest ECMAScript version enabled by default (ES2017).
- - Comment attachment.
- - Support for JSX, Flow, Typescript.
- - Support for experimental language proposals (accepting PRs for anything at least [stage-0](https://github.com/tc39/proposals/blob/master/stage-0-proposals.md)).
-
-## Credits
-
-Heavily based on [acorn](https://github.com/marijnh/acorn) and [acorn-jsx](https://github.com/RReverser/acorn-jsx),
-thanks to the awesome work of [@RReverser](https://github.com/RReverser) and [@marijnh](https://github.com/marijnh).
-
-## API
-
-### `babylon.parse(code, [options])`
-
-### `babylon.parseExpression(code, [options])`
-
-`parse()` parses the provided `code` as an entire ECMAScript program, while
-`parseExpression()` tries to parse a single Expression with performance in
-mind. When in doubt, use `.parse()`.
-
-### Options
-
-- **allowImportExportEverywhere**: By default, `import` and `export`
- declarations can only appear at a program's top level. Setting this
- option to `true` allows them anywhere where a statement is allowed.
-
-- **allowReturnOutsideFunction**: By default, a return statement at
- the top level raises an error. Set this to `true` to accept such
- code.
-
-- **allowSuperOutsideMethod**: TODO
-
-- **sourceType**: Indicate the mode the code should be parsed in. Can be
- one of `"script"`, `"module"`, or `"unambiguous"`. Defaults to `"script"`. `"unambiguous"` will make Babylon attempt to _guess_, based on the presence of ES6 `import` or `export` statements. Files with ES6 `import`s and `export`s are considered `"module"` and are otherwise `"script"`.
-
-- **sourceFilename**: Correlate output AST nodes with their source filename. Useful when generating code and source maps from the ASTs of multiple input files.
-
-- **startLine**: By default, the first line of code parsed is treated as line 1. You can provide a line number to alternatively start with. Useful for integration with other source tools.
-
-- **plugins**: Array containing the plugins that you want to enable.
-
-- **strictMode**: TODO
-
-- **ranges**: Adds a `ranges` property to each node: `[node.start, node.end]`
-
-- **tokens**: Adds all parsed tokens to a `tokens` property on the `File` node
-
-### Output
-
-Babylon generates AST according to [Babel AST format][].
-It is based on [ESTree spec][] with the following deviations:
-
-> There is now an `estree` plugin which reverts these deviations
-
-- [Literal][] token is replaced with [StringLiteral][], [NumericLiteral][], [BooleanLiteral][], [NullLiteral][], [RegExpLiteral][]
-- [Property][] token is replaced with [ObjectProperty][] and [ObjectMethod][]
-- [MethodDefinition][] is replaced with [ClassMethod][]
-- [Program][] and [BlockStatement][] contain additional `directives` field with [Directive][] and [DirectiveLiteral][]
-- [ClassMethod][], [ObjectProperty][], and [ObjectMethod][] value property's properties in [FunctionExpression][] is coerced/brought into the main method node.
-
-AST for JSX code is based on [Facebook JSX AST][] with the addition of one node type:
-
-- `JSXText`
-
-[Babel AST format]: https://github.com/babel/babylon/blob/master/ast/spec.md
-[ESTree spec]: https://github.com/estree/estree
-
-[Literal]: https://github.com/estree/estree/blob/master/es5.md#literal
-[Property]: https://github.com/estree/estree/blob/master/es5.md#property
-[MethodDefinition]: https://github.com/estree/estree/blob/master/es2015.md#methoddefinition
-
-[StringLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#stringliteral
-[NumericLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#numericliteral
-[BooleanLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#booleanliteral
-[NullLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#nullliteral
-[RegExpLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#regexpliteral
-[ObjectProperty]: https://github.com/babel/babylon/blob/master/ast/spec.md#objectproperty
-[ObjectMethod]: https://github.com/babel/babylon/blob/master/ast/spec.md#objectmethod
-[ClassMethod]: https://github.com/babel/babylon/blob/master/ast/spec.md#classmethod
-[Program]: https://github.com/babel/babylon/blob/master/ast/spec.md#programs
-[BlockStatement]: https://github.com/babel/babylon/blob/master/ast/spec.md#blockstatement
-[Directive]: https://github.com/babel/babylon/blob/master/ast/spec.md#directive
-[DirectiveLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#directiveliteral
-[FunctionExpression]: https://github.com/babel/babylon/blob/master/ast/spec.md#functionexpression
-
-[Facebook JSX AST]: https://github.com/facebook/jsx/blob/master/AST.md
-
-### Semver
-
-Babylon follows semver in most situations. The only thing to note is that some spec-compliancy bug fixes may be released under patch versions.
-
-For example: We push a fix to early error on something like [#107](https://github.com/babel/babylon/pull/107) - multiple default exports per file. That would be considered a bug fix even though it would cause a build to fail.
-
-### Example
-
-```javascript
-require("babylon").parse("code", {
- // parse in strict mode and allow module declarations
- sourceType: "module",
-
- plugins: [
- // enable jsx and flow syntax
- "jsx",
- "flow"
- ]
-});
-```
-
-### Plugins
-
-| Name | Code Example |
-|------|--------------|
-| `estree` ([repo](https://github.com/estree/estree)) | n/a |
-| `jsx` ([repo](https://facebook.github.io/jsx/)) | `<a attr="b">{s}</a>` |
-| `flow` ([repo](https://github.com/facebook/flow)) | `var a: string = "";` |
-| `typescript` ([repo](https://github.com/Microsoft/TypeScript)) | `var a: string = "";` |
-| `doExpressions` | `var a = do { if (true) { 'hi'; } };` |
-| `objectRestSpread` ([proposal](https://github.com/tc39/proposal-object-rest-spread)) | `var a = { b, ...c };` |
-| `decorators` (Stage 1) and `decorators2` (Stage 2 [proposal](https://github.com/tc39/proposal-decorators)) | `@a class A {}` |
-| `classProperties` ([proposal](https://github.com/tc39/proposal-class-public-fields)) | `class A { b = 1; }` |
-| `classPrivateProperties` ([proposal](https://github.com/tc39/proposal-private-fields)) | `class A { #b = 1; }` |
-| `classPrivateMethods` ([proposal](https://github.com/tc39/proposal-private-methods)) | `class A { #c() {} }` |
-| `exportExtensions` ([proposal 1](https://github.com/leebyron/ecmascript-export-default-from)), ([proposal 2](https://github.com/leebyron/ecmascript-export-ns-from)) | Proposal 1: `export v from "mod"` Proposal 2: `export * as ns from "mod"` |
-| `asyncGenerators` ([proposal](https://github.com/tc39/proposal-async-iteration)) | `async function*() {}`, `for await (let a of b) {}` |
-| `functionBind` ([proposal](https://github.com/zenparsing/es-function-bind)) | `a::b`, `::console.log` |
-| `functionSent` | `function.sent` |
-| `dynamicImport` ([proposal](https://github.com/tc39/proposal-dynamic-import)) | `import('./guy').then(a)` |
-| `numericSeparator` ([proposal](https://github.com/samuelgoto/proposal-numeric-separator)) | `1_000_000` |
-| `optionalChaining` ([proposal](https://github.com/tc39/proposal-optional-chaining)) | `a?.b` |
-| `importMeta` ([proposal](https://github.com/tc39/proposal-import-meta)) | `import.meta.url` |
-| `bigInt` ([proposal](https://github.com/tc39/proposal-bigint)) | `100n` |
-| `optionalCatchBinding` ([proposal](https://github.com/babel/proposals/issues/7)) | `try {throw 0;} catch{do();}` |
-| `throwExpressions` ([proposal](https://github.com/babel/proposals/issues/23)) | `() => throw new Error("")` |
-| `pipelineOperator` ([proposal](https://github.com/babel/proposals/issues/29)) | `a \|> b` |
-| `nullishCoalescingOperator` ([proposal](https://github.com/babel/proposals/issues/14)) | `a ?? b` |
-
-### FAQ
-
-#### Will Babylon support a plugin system?
-
-Previous issues: [babel/babel#1351](https://github.com/babel/babel/issues/1351), [#500](https://github.com/babel/babylon/issues/500).
-
-We currently aren't willing to commit to supporting the API for plugins or the resulting ecosystem (there is already enough work maintaining Babel's own plugin system). It's not clear how to make that API effective, and it would limit out ability to refactor and optimize the codebase.
-
-Our current recommendation for those that want to create their own custom syntax is for users to fork Babylon.
-
-To consume your custom parser, you can add to your `.babelrc` via its npm package name or require it if using JavaScript,
-
-```json
-{
- "parserOpts": {
- "parser": "custom-fork-of-babylon-on-npm-here"
- }
-}
-```
diff --git a/tools/node_modules/babel-eslint/node_modules/babylon/lib/index.js b/tools/node_modules/babel-eslint/node_modules/babylon/lib/index.js
deleted file mode 100644
index 901202fd4d..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/babylon/lib/index.js
+++ /dev/null
@@ -1,10635 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-function _inheritsLoose(subClass, superClass) {
- subClass.prototype = Object.create(superClass.prototype);
- subClass.prototype.constructor = subClass;
- subClass.__proto__ = superClass;
-}
-
-// A second optional argument can be given to further configure
-// the parser process. These options are recognized:
-var defaultOptions = {
- // Source type ("script" or "module") for different semantics
- sourceType: "script",
- // Source filename.
- sourceFilename: undefined,
- // Line from which to start counting source. Useful for
- // integration with other tools.
- startLine: 1,
- // When enabled, a return at the top level is not considered an
- // error.
- allowReturnOutsideFunction: false,
- // When enabled, import/export statements are not constrained to
- // appearing at the top of the program.
- allowImportExportEverywhere: false,
- // TODO
- allowSuperOutsideMethod: false,
- // An array of plugins to enable
- plugins: [],
- // TODO
- strictMode: null,
- // Nodes have their start and end characters offsets recorded in
- // `start` and `end` properties (directly on the node, rather than
- // the `loc` object, which holds line/column data. To also add a
- // [semi-standardized][range] `range` property holding a `[start,
- // end]` array with the same numbers, set the `ranges` option to
- // `true`.
- //
- // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
- ranges: false,
- // Adds all parsed tokens to a `tokens` property on the `File` node
- tokens: false
-}; // Interpret and default an options object
-
-function getOptions(opts) {
- var options = {};
-
- for (var key in defaultOptions) {
- options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key];
- }
-
- return options;
-}
-
-// ## Token types
-// The assignment of fine-grained, information-carrying type objects
-// allows the tokenizer to store the information it has about a
-// token in a way that is very cheap for the parser to look up.
-// All token type variables start with an underscore, to make them
-// easy to recognize.
-// The `beforeExpr` property is used to disambiguate between regular
-// expressions and divisions. It is set on all token types that can
-// be followed by an expression (thus, a slash after them would be a
-// regular expression).
-//
-// `isLoop` marks a keyword as starting a loop, which is important
-// to know when parsing a label, in order to allow or disallow
-// continue jumps to that label.
-var beforeExpr = true;
-var startsExpr = true;
-var isLoop = true;
-var isAssign = true;
-var prefix = true;
-var postfix = true;
-var TokenType = function TokenType(label, conf) {
- if (conf === void 0) {
- conf = {};
- }
-
- this.label = label;
- this.keyword = conf.keyword;
- this.beforeExpr = !!conf.beforeExpr;
- this.startsExpr = !!conf.startsExpr;
- this.rightAssociative = !!conf.rightAssociative;
- this.isLoop = !!conf.isLoop;
- this.isAssign = !!conf.isAssign;
- this.prefix = !!conf.prefix;
- this.postfix = !!conf.postfix;
- this.binop = conf.binop === 0 ? 0 : conf.binop || null;
- this.updateContext = null;
-};
-
-var KeywordTokenType =
-/*#__PURE__*/
-function (_TokenType) {
- _inheritsLoose(KeywordTokenType, _TokenType);
-
- function KeywordTokenType(name, options) {
- if (options === void 0) {
- options = {};
- }
-
- options.keyword = name;
- return _TokenType.call(this, name, options) || this;
- }
-
- return KeywordTokenType;
-}(TokenType);
-
-var BinopTokenType =
-/*#__PURE__*/
-function (_TokenType2) {
- _inheritsLoose(BinopTokenType, _TokenType2);
-
- function BinopTokenType(name, prec) {
- return _TokenType2.call(this, name, {
- beforeExpr,
- binop: prec
- }) || this;
- }
-
- return BinopTokenType;
-}(TokenType);
-var 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"),
- // Punctuation token types.
- 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("#"),
- // Operators. These carry several kinds of properties to help the
- // parser use them properly (the presence of these properties is
- // what categorizes them as operators).
- //
- // `binop`, when present, specifies that this operator is a binary
- // operator, and will refer to its precedence.
- //
- // `prefix` and `postfix` mark the operator as a prefix or postfix
- // unary operator.
- //
- // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
- // binary operators with a very low precedence, that should result
- // in AssignmentExpression nodes.
- eq: new TokenType("=", {
- beforeExpr,
- 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: new BinopTokenType("|>", 0),
- nullishCoalescing: new BinopTokenType("??", 1),
- logicalOR: new BinopTokenType("||", 1),
- logicalAND: new BinopTokenType("&&", 2),
- bitwiseOR: new BinopTokenType("|", 3),
- bitwiseXOR: new BinopTokenType("^", 4),
- bitwiseAND: new BinopTokenType("&", 5),
- equality: new BinopTokenType("==/!=", 6),
- relational: new BinopTokenType("</>", 7),
- bitShift: new BinopTokenType("<</>>", 8),
- plusMin: new TokenType("+/-", {
- beforeExpr,
- binop: 9,
- prefix,
- startsExpr
- }),
- modulo: new BinopTokenType("%", 10),
- star: new BinopTokenType("*", 10),
- slash: new BinopTokenType("/", 10),
- exponent: new TokenType("**", {
- beforeExpr,
- binop: 11,
- rightAssociative: true
- })
-};
-var keywords = {
- break: new KeywordTokenType("break"),
- case: new KeywordTokenType("case", {
- beforeExpr
- }),
- catch: new KeywordTokenType("catch"),
- continue: new KeywordTokenType("continue"),
- debugger: new KeywordTokenType("debugger"),
- default: new KeywordTokenType("default", {
- beforeExpr
- }),
- do: new KeywordTokenType("do", {
- isLoop,
- beforeExpr
- }),
- else: new KeywordTokenType("else", {
- beforeExpr
- }),
- finally: new KeywordTokenType("finally"),
- for: new KeywordTokenType("for", {
- isLoop
- }),
- function: new KeywordTokenType("function", {
- startsExpr
- }),
- if: new KeywordTokenType("if"),
- return: new KeywordTokenType("return", {
- beforeExpr
- }),
- switch: new KeywordTokenType("switch"),
- throw: new KeywordTokenType("throw", {
- beforeExpr,
- prefix,
- startsExpr
- }),
- try: new KeywordTokenType("try"),
- var: new KeywordTokenType("var"),
- let: new KeywordTokenType("let"),
- const: new KeywordTokenType("const"),
- while: new KeywordTokenType("while", {
- isLoop
- }),
- with: new KeywordTokenType("with"),
- new: new KeywordTokenType("new", {
- beforeExpr,
- startsExpr
- }),
- this: new KeywordTokenType("this", {
- startsExpr
- }),
- super: new KeywordTokenType("super", {
- startsExpr
- }),
- class: new KeywordTokenType("class"),
- extends: new KeywordTokenType("extends", {
- beforeExpr
- }),
- export: new KeywordTokenType("export"),
- import: new KeywordTokenType("import", {
- startsExpr
- }),
- yield: new KeywordTokenType("yield", {
- beforeExpr,
- startsExpr
- }),
- null: new KeywordTokenType("null", {
- startsExpr
- }),
- true: new KeywordTokenType("true", {
- startsExpr
- }),
- false: new KeywordTokenType("false", {
- startsExpr
- }),
- in: new KeywordTokenType("in", {
- beforeExpr,
- binop: 7
- }),
- instanceof: new KeywordTokenType("instanceof", {
- beforeExpr,
- binop: 7
- }),
- typeof: new KeywordTokenType("typeof", {
- beforeExpr,
- prefix,
- startsExpr
- }),
- void: new KeywordTokenType("void", {
- beforeExpr,
- prefix,
- startsExpr
- }),
- delete: new KeywordTokenType("delete", {
- beforeExpr,
- prefix,
- startsExpr
- })
-}; // Map keyword names to token types.
-
-Object.keys(keywords).forEach(function (name) {
- types["_" + name] = keywords[name];
-});
-
-/* eslint max-len: 0 */
-function makePredicate(words) {
- var wordsArr = words.split(" ");
- return function (str) {
- return wordsArr.indexOf(str) >= 0;
- };
-} // Reserved word lists for various dialects of the language
-
-
-var reservedWords = {
- "6": makePredicate("enum await"),
- strict: makePredicate("implements interface let package private protected public static yield"),
- strictBind: makePredicate("eval arguments")
-}; // And the keywords
-
-var isKeyword = makePredicate("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"); // ## Character categories
-// Big ugly regular expressions that match characters in the
-// whitespace, identifier, and identifier-start categories. These
-// are only applied when a character is found to actually have a
-// code point above 128.
-// Generated by `bin/generate-identifier-regex.js`.
-
-/* prettier-ignore */
-
-var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\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-\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-\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";
-/* prettier-ignore */
-
-var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\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\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-\u0c03\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-\u0eb9\u0ebb\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\u1cf2-\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\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
-var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
-var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
-nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; // These are a run-length and offset encoded representation of the
-// >0xffff code points that are a valid part of identifiers. The
-// offset starts at 0x10000, and each pair of numbers represents an
-// offset to the next range, and then a size of the range. They were
-// generated by `bin/generate-identifier-regex.js`.
-
-/* prettier-ignore */
-
-var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 785, 52, 76, 44, 33, 24, 27, 35, 42, 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, 54, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 25, 391, 63, 32, 0, 257, 0, 11, 39, 8, 0, 22, 0, 12, 39, 3, 3, 55, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 698, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 65, 1, 31, 6124, 20, 754, 9486, 286, 82, 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, 4149, 196, 60, 67, 1213, 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];
-/* prettier-ignore */
-
-var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 10, 2, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 87, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 423, 9, 280, 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, 19719, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 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, 2214, 6, 110, 6, 6, 9, 792487, 239]; // This has a complexity linear to the value of the code. The
-// assumption is that looking up astral identifier characters is
-// rare.
-
-function isInAstralSet(code, set) {
- var pos = 0x10000;
-
- for (var i = 0; i < set.length; i += 2) {
- pos += set[i];
- if (pos > code) return false;
- pos += set[i + 1];
- if (pos >= code) return true;
- }
-
- return false;
-} // Test whether a given character code starts an identifier.
-
-
-function isIdentifierStart(code) {
- if (code < 65) return code === 36;
- if (code < 91) return true;
- if (code < 97) return code === 95;
- if (code < 123) return true;
-
- if (code <= 0xffff) {
- return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
- }
-
- return isInAstralSet(code, astralIdentifierStartCodes);
-} // Test whether a given character is part of an identifier.
-
-function isIdentifierChar(code) {
- if (code < 48) return code === 36;
- if (code < 58) return true;
- if (code < 65) return false;
- if (code < 91) return true;
- if (code < 97) return code === 95;
- if (code < 123) return true;
-
- if (code <= 0xffff) {
- return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
- }
-
- return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
-}
-
-// Matches a whole line break (where CRLF is considered a single
-// line break). Used to count lines.
-var lineBreak = /\r\n?|\n|\u2028|\u2029/;
-var lineBreakG = new RegExp(lineBreak.source, "g");
-function isNewLine(code) {
- return code === 10 || code === 13 || code === 0x2028 || code === 0x2029;
-}
-var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
-
-// The algorithm used to determine whether a regexp can appear at a
-// given point in the program is loosely based on sweet.js' approach.
-// See https://github.com/mozilla/sweet.js/wiki/design
-var TokContext = function TokContext(token, isExpr, preserveSpace, override) // Takes a Tokenizer as a this-parameter, and returns void.
-{
- this.token = token;
- this.isExpr = !!isExpr;
- this.preserveSpace = !!preserveSpace;
- this.override = override;
-};
-var types$1 = {
- braceStatement: new TokContext("{", false),
- braceExpression: new TokContext("{", true),
- templateQuasi: new TokContext("${", true),
- parenStatement: new TokContext("(", false),
- parenExpression: new TokContext("(", true),
- template: new TokContext("`", true, true, function (p) {
- return p.readTmplToken();
- }),
- functionExpression: new TokContext("function", true)
-}; // Token-specific context update code
-
-types.parenR.updateContext = types.braceR.updateContext = function () {
- if (this.state.context.length === 1) {
- this.state.exprAllowed = true;
- return;
- }
-
- var out = this.state.context.pop();
-
- if (out === types$1.braceStatement && this.curContext() === types$1.functionExpression) {
- this.state.context.pop();
- this.state.exprAllowed = false;
- } else if (out === types$1.templateQuasi) {
- this.state.exprAllowed = true;
- } else {
- this.state.exprAllowed = !out.isExpr;
- }
-};
-
-types.name.updateContext = function (prevType) {
- if (this.state.value === "of" && this.curContext() === types$1.parenStatement) {
- this.state.exprAllowed = !prevType.beforeExpr;
- return;
- }
-
- this.state.exprAllowed = false;
-
- if (prevType === types._let || prevType === types._const || prevType === types._var) {
- if (lineBreak.test(this.input.slice(this.state.end))) {
- this.state.exprAllowed = true;
- }
- }
-};
-
-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) {
- var 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 () {// tokExprAllowed stays unchanged
-};
-
-types._function.updateContext = function () {
- if (this.curContext() !== types$1.braceStatement) {
- this.state.context.push(types$1.functionExpression);
- }
-
- 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;
-};
-
-// These are used when `options.locations` is on, for the
-// `startLoc` and `endLoc` properties.
-var Position = function Position(line, col) {
- this.line = line;
- this.column = col;
-};
-var SourceLocation = function SourceLocation(start, end) {
- this.start = start; // $FlowIgnore (may start as null, but initialized later)
-
- this.end = end;
-}; // The `getLineInfo` function is mostly useful when the
-// `locations` option is off (for performance reasons) and you
-// want to find the line/column position for a given character
-// offset. `input` should be the code string that the offset refers
-// into.
-
-function getLineInfo(input, offset) {
- for (var line = 1, cur = 0;;) {
- lineBreakG.lastIndex = cur;
- var match = lineBreakG.exec(input);
-
- if (match && match.index < offset) {
- ++line;
- cur = match.index + match[0].length;
- } else {
- return new Position(line, offset - cur);
- }
- } // istanbul ignore next
-
-
- throw new Error("Unreachable");
-}
-
-var BaseParser =
-/*#__PURE__*/
-function () {
- function BaseParser() {}
-
- var _proto = BaseParser.prototype;
-
- // Properties set by constructor in index.js
- // Initialized by Tokenizer
- _proto.isReservedWord = function isReservedWord(word) {
- if (word === "await") {
- return this.inModule;
- } else {
- return reservedWords[6](word);
- }
- };
-
- _proto.hasPlugin = function hasPlugin(name) {
- return !!this.plugins[name];
- };
-
- return BaseParser;
-}();
-
-/* eslint max-len: 0 */
-
-/**
- * Based on the comment attachment algorithm used in espree and estraverse.
- *
- * 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 last(stack) {
- return stack[stack.length - 1];
-}
-
-var CommentsParser =
-/*#__PURE__*/
-function (_BaseParser) {
- _inheritsLoose(CommentsParser, _BaseParser);
-
- function CommentsParser() {
- return _BaseParser.apply(this, arguments) || this;
- }
-
- var _proto = CommentsParser.prototype;
-
- _proto.addComment = function addComment(comment) {
- if (this.filename) comment.loc.filename = this.filename;
- this.state.trailingComments.push(comment);
- this.state.leadingComments.push(comment);
- };
-
- _proto.processComment = function processComment(node) {
- if (node.type === "Program" && node.body.length > 0) return;
- var stack = this.state.commentStack;
- var firstChild, lastChild, trailingComments, i, j;
-
- if (this.state.trailingComments.length > 0) {
- // If the first comment in trailingComments comes after the
- // current node, then we're good - all comments in the array will
- // come after the node and so it's safe to add them as official
- // trailingComments.
- if (this.state.trailingComments[0].start >= node.end) {
- trailingComments = this.state.trailingComments;
- this.state.trailingComments = [];
- } else {
- // Otherwise, if the first comment doesn't come after the
- // current node, that means we have a mix of leading and trailing
- // comments in the array and that leadingComments contains the
- // same items as trailingComments. Reset trailingComments to
- // zero items and we'll handle this by evaluating leadingComments
- // later.
- this.state.trailingComments.length = 0;
- }
- } else {
- if (stack.length > 0) {
- var lastInStack = last(stack);
-
- if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
- trailingComments = lastInStack.trailingComments;
- lastInStack.trailingComments = null;
- }
- }
- } // Eating the stack.
-
-
- 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; // Attach comments that follow a trailing comma on the last
- // property in an object literal or a trailing comma in function arguments
- // as trailing comments
-
- if (firstChild && this.state.leadingComments.length > 0) {
- var 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) {
- var lastArg = last(node.arguments);
-
- if (lastArg && lastComment.start >= lastArg.start && lastComment.end <= node.end) {
- if (this.state.commentPreviousNode) {
- 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;
- lastChild.leadingComments = null;
- } else {
- // A leading comment for an anonymous class had been stolen by its first ClassMethod,
- // so this takes back the leading comment.
- // See also: https://github.com/eslint/espree/issues/158
- 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 {
- // https://github.com/eslint/espree/issues/2
- //
- // In special cases, such as return (without a value) and
- // debugger, all comments will end up as leadingComments and
- // will otherwise be eliminated. This step runs when the
- // commentStack is empty and there are comments left
- // in leadingComments.
- //
- // This loop figures out the stopping point between the actual
- // leading and trailing comments by finding the location of the
- // first comment that comes after the given node.
- for (i = 0; i < this.state.leadingComments.length; i++) {
- if (this.state.leadingComments[i].end > node.start) {
- break;
- }
- } // Split the array based on the location of the first comment
- // that comes after the node. Keep in mind that this could
- // result in an empty array, and if so, the array must be
- // deleted.
-
-
- var leadingComments = this.state.leadingComments.slice(0, i);
- node.leadingComments = leadingComments.length === 0 ? null : leadingComments; // Similarly, trailing comments are attached later. The variable
- // must be reset to null if there are no trailing comments.
-
- 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);
- };
-
- return CommentsParser;
-}(BaseParser);
-
-// takes an offset integer (into the current `input`) to indicate
-// the location of the error, attaches the position to the end
-// of the error message, and then raises a `SyntaxError` with that
-// message.
-
-var LocationParser =
-/*#__PURE__*/
-function (_CommentsParser) {
- _inheritsLoose(LocationParser, _CommentsParser);
-
- function LocationParser() {
- return _CommentsParser.apply(this, arguments) || this;
- }
-
- var _proto = LocationParser.prototype;
-
- _proto.raise = function raise(pos, message, missingPluginNames) {
- var loc = getLineInfo(this.input, pos);
- message += ` (${loc.line}:${loc.column})`; // $FlowIgnore
-
- var err = new SyntaxError(message);
- err.pos = pos;
- err.loc = loc;
-
- if (missingPluginNames) {
- err.missingPlugin = missingPluginNames;
- }
-
- throw err;
- };
-
- return LocationParser;
-}(CommentsParser);
-
-var State =
-/*#__PURE__*/
-function () {
- function State() {}
-
- var _proto = State.prototype;
-
- _proto.init = function init(options, input) {
- this.strict = options.strictMode === false ? false : options.sourceType === "module";
- this.input = input;
- this.potentialArrowAt = -1;
- this.noArrowAt = [];
- this.noArrowParamsConversionAt = []; // eslint-disable-next-line max-len
-
- this.inMethod = this.inFunction = this.inParameters = this.maybeInArrowParameters = this.inGenerator = this.inAsync = this.inPropertyName = this.inType = this.inClassProperty = this.noAnonFunctionType = false;
- this.classLevel = 0;
- this.labels = [];
- this.decoratorStack = [[]];
- this.yieldInPossibleArrowParameters = null;
- this.tokens = [];
- this.comments = [];
- this.trailingComments = [];
- this.leadingComments = [];
- this.commentStack = []; // $FlowIgnore
-
- this.commentPreviousNode = null;
- this.pos = this.lineStart = 0;
- this.curLine = options.startLine;
- this.type = types.eof;
- this.value = null;
- this.start = this.end = this.pos;
- this.startLoc = this.endLoc = this.curPosition(); // $FlowIgnore
-
- this.lastTokEndLoc = this.lastTokStartLoc = null;
- this.lastTokStart = this.lastTokEnd = this.pos;
- this.context = [types$1.braceStatement];
- this.exprAllowed = true;
- this.containsEsc = this.containsOctal = false;
- this.octalPosition = null;
- this.invalidTemplateEscapePosition = null;
- this.exportedIdentifiers = [];
- }; // TODO
-
-
- _proto.curPosition = function curPosition() {
- return new Position(this.curLine, this.pos - this.lineStart);
- };
-
- _proto.clone = function clone(skipArrays) {
- var _this = this;
-
- var state = new State();
- Object.keys(this).forEach(function (key) {
- // $FlowIgnore
- var val = _this[key];
-
- if ((!skipArrays || key === "context") && Array.isArray(val)) {
- val = val.slice();
- } // $FlowIgnore
-
-
- state[key] = val;
- });
- return state;
- };
-
- return State;
-}();
-
-var _isDigit = function isDigit(code) {
- return code >= 48 && code <= 57;
-};
-
-/* eslint max-len: 0 */
-// an immediate sibling of NumericLiteralSeparator _
-
-var forbiddenNumericSeparatorSiblings = {
- decBinOct: [46, 66, 69, 79, 95, // multiple separators are not allowed
- 98, 101, 111],
- hex: [46, 88, 95, // multiple separators are not allowed
- 120]
-};
-var allowedNumericSeparatorSiblings = {};
-allowedNumericSeparatorSiblings.bin = [// 0 - 1
-48, 49];
-allowedNumericSeparatorSiblings.oct = allowedNumericSeparatorSiblings.bin.concat([50, 51, 52, 53, 54, 55]);
-allowedNumericSeparatorSiblings.dec = allowedNumericSeparatorSiblings.oct.concat([56, 57]);
-allowedNumericSeparatorSiblings.hex = allowedNumericSeparatorSiblings.dec.concat([65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102]); // Object type used to represent tokens. Note that normally, tokens
-// simply exist as properties on the parser object. This is only
-// used for the onToken callback and the external tokenizer.
-
-var Token = function Token(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);
-}; // ## Tokenizer
-
-function codePointToString(code) {
- // UTF-16 Decoding
- if (code <= 0xffff) {
- return String.fromCharCode(code);
- } else {
- return String.fromCharCode((code - 0x10000 >> 10) + 0xd800, (code - 0x10000 & 1023) + 0xdc00);
- }
-}
-
-var Tokenizer =
-/*#__PURE__*/
-function (_LocationParser) {
- _inheritsLoose(Tokenizer, _LocationParser);
-
- // Forward-declarations
- // parser/util.js
- function Tokenizer(options, input) {
- var _this;
-
- _this = _LocationParser.call(this) || this;
- _this.state = new State();
-
- _this.state.init(options, input);
-
- _this.isLookahead = false;
- return _this;
- } // Move to the next token
-
-
- var _proto = Tokenizer.prototype;
-
- _proto.next = function 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();
- }; // TODO
-
-
- _proto.eat = function eat(type) {
- if (this.match(type)) {
- this.next();
- return true;
- } else {
- return false;
- }
- }; // TODO
-
-
- _proto.match = function match(type) {
- return this.state.type === type;
- }; // TODO
-
-
- _proto.isKeyword = function isKeyword$$1(word) {
- return isKeyword(word);
- }; // TODO
-
-
- _proto.lookahead = function lookahead() {
- var old = this.state;
- this.state = old.clone(true);
- this.isLookahead = true;
- this.next();
- this.isLookahead = false;
- var curr = this.state;
- this.state = old;
- return curr;
- }; // Toggle strict mode. Re-reads the next number or string to please
- // pedantic tests (`"use strict"; 010;` should fail).
-
-
- _proto.setStrict = function 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();
- };
-
- _proto.curContext = function curContext() {
- return this.state.context[this.state.context.length - 1];
- }; // Read a single token, updating the parser object's token-related
- // properties.
-
-
- _proto.nextToken = function nextToken() {
- var 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.input.length) {
- this.finishToken(types.eof);
- return;
- }
-
- if (curContext.override) {
- curContext.override(this);
- } else {
- this.readToken(this.fullCharCodeAtPos());
- }
- };
-
- _proto.readToken = function readToken(code) {
- // Identifier or keyword. '\uXXXX' sequences are allowed in
- // identifiers, so '\' also dispatches to that.
- if (isIdentifierStart(code) || code === 92) {
- this.readWord();
- } else {
- this.getTokenFromCode(code);
- }
- };
-
- _proto.fullCharCodeAtPos = function fullCharCodeAtPos() {
- var code = this.input.charCodeAt(this.state.pos);
- if (code <= 0xd7ff || code >= 0xe000) return code;
- var next = this.input.charCodeAt(this.state.pos + 1);
- return (code << 10) + next - 0x35fdc00;
- };
-
- _proto.pushComment = function pushComment(block, text, start, end, startLoc, endLoc) {
- var comment = {
- type: block ? "CommentBlock" : "CommentLine",
- value: text,
- start: start,
- end: end,
- loc: new SourceLocation(startLoc, endLoc)
- };
-
- if (!this.isLookahead) {
- if (this.options.tokens) this.state.tokens.push(comment);
- this.state.comments.push(comment);
- this.addComment(comment);
- }
- };
-
- _proto.skipBlockComment = function skipBlockComment() {
- var startLoc = this.state.curPosition();
- var start = this.state.pos;
- var 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;
- var match;
-
- while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) {
- ++this.state.curLine;
- this.state.lineStart = match.index + match[0].length;
- }
-
- this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition());
- };
-
- _proto.skipLineComment = function skipLineComment(startSkip) {
- var start = this.state.pos;
- var startLoc = this.state.curPosition();
- var ch = this.input.charCodeAt(this.state.pos += startSkip);
-
- if (this.state.pos < this.input.length) {
- while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.input.length) {
- ch = this.input.charCodeAt(this.state.pos);
- }
- }
-
- this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition());
- }; // Called at the start of the parse and after every token. Skips
- // whitespace and comments, and.
-
-
- _proto.skipSpace = function skipSpace() {
- loop: while (this.state.pos < this.input.length) {
- var ch = this.input.charCodeAt(this.state.pos);
-
- switch (ch) {
- case 32:
- case 160:
- ++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 (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
- ++this.state.pos;
- } else {
- break loop;
- }
-
- }
- }
- }; // Called at the end of every token. Sets `end`, `val`, and
- // maintains `context` and `exprAllowed`, and skips the space after
- // the token, so that the next one's `start` will point at the
- // right position.
-
-
- _proto.finishToken = function finishToken(type, val) {
- this.state.end = this.state.pos;
- this.state.endLoc = this.state.curPosition();
- var prevType = this.state.type;
- this.state.type = type;
- this.state.value = val;
- this.updateContext(prevType);
- }; // ### Token reading
- // This is the function that is called to fetch the next token. It
- // is somewhat obscure, because it works in character codes rather
- // than characters, and because operator parsing has been inlined
- // into it.
- //
- // All in the name of speed.
- //
-
-
- _proto.readToken_dot = function readToken_dot() {
- var next = this.input.charCodeAt(this.state.pos + 1);
-
- if (next >= 48 && next <= 57) {
- this.readNumber(true);
- return;
- }
-
- var 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);
- }
- };
-
- _proto.readToken_slash = function readToken_slash() {
- // '/'
- if (this.state.exprAllowed) {
- ++this.state.pos;
- this.readRegexp();
- return;
- }
-
- var next = this.input.charCodeAt(this.state.pos + 1);
-
- if (next === 61) {
- this.finishOp(types.assign, 2);
- } else {
- this.finishOp(types.slash, 1);
- }
- };
-
- _proto.readToken_mult_modulo = function readToken_mult_modulo(code) {
- // '%*'
- var type = code === 42 ? types.star : types.modulo;
- var width = 1;
- var next = this.input.charCodeAt(this.state.pos + 1);
- var exprAllowed = this.state.exprAllowed; // Exponentiation operator **
-
- 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);
- };
-
- _proto.readToken_pipe_amp = function readToken_pipe_amp(code) {
- // '|&'
- var next = this.input.charCodeAt(this.state.pos + 1);
-
- if (next === code) {
- this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2);
- return;
- }
-
- if (code === 124) {
- // '|>'
- if (next === 62) {
- this.finishOp(types.pipeline, 2);
- return;
- } else if (next === 125 && this.hasPlugin("flow")) {
- // '|}'
- this.finishOp(types.braceBarR, 2);
- return;
- }
- }
-
- if (next === 61) {
- this.finishOp(types.assign, 2);
- return;
- }
-
- this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1);
- };
-
- _proto.readToken_caret = function readToken_caret() {
- // '^'
- var next = this.input.charCodeAt(this.state.pos + 1);
-
- if (next === 61) {
- this.finishOp(types.assign, 2);
- } else {
- this.finishOp(types.bitwiseXOR, 1);
- }
- };
-
- _proto.readToken_plus_min = function readToken_plus_min(code) {
- // '+-'
- var next = this.input.charCodeAt(this.state.pos + 1);
-
- if (next === code) {
- if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos))) {
- // A `-->` line comment
- 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);
- }
- };
-
- _proto.readToken_lt_gt = function readToken_lt_gt(code) {
- // '<>'
- var next = this.input.charCodeAt(this.state.pos + 1);
- var 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) {
- // `<!--`, an XML-style comment that should be interpreted as a line comment
- this.skipLineComment(4);
- this.skipSpace();
- this.nextToken();
- return;
- }
-
- if (next === 61) {
- // <= | >=
- size = 2;
- }
-
- this.finishOp(types.relational, size);
- };
-
- _proto.readToken_eq_excl = function readToken_eq_excl(code) {
- // '=!'
- var 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);
- };
-
- _proto.readToken_question = function readToken_question() {
- // '?'
- var next = this.input.charCodeAt(this.state.pos + 1);
- var next2 = this.input.charCodeAt(this.state.pos + 2);
-
- if (next === 63) {
- // '??'
- this.finishOp(types.nullishCoalescing, 2);
- } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
- // '.' not followed by a number
- this.state.pos += 2;
- this.finishToken(types.questionDot);
- } else {
- ++this.state.pos;
- this.finishToken(types.question);
- }
- };
-
- _proto.getTokenFromCode = function getTokenFromCode(code) {
- switch (code) {
- case 35:
- if ((this.hasPlugin("classPrivateProperties") || this.hasPlugin("classPrivateMethods")) && this.state.classLevel > 0) {
- ++this.state.pos;
- this.finishToken(types.hash);
- return;
- } else {
- this.raise(this.state.pos, `Unexpected character '${codePointToString(code)}'`);
- }
-
- // The interpretation of a dot depends on whether it is followed
- // by a digit or another two dots.
-
- case 46:
- this.readToken_dot();
- return;
- // Punctuation tokens.
-
- 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:
- if (this.hasPlugin("flow") && this.input.charCodeAt(this.state.pos + 1) === 124) {
- this.finishOp(types.braceBarL, 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 64:
- ++this.state.pos;
- this.finishToken(types.at);
- return;
-
- case 96:
- ++this.state.pos;
- this.finishToken(types.backQuote);
- return;
-
- case 48:
- {
- var next = this.input.charCodeAt(this.state.pos + 1); // '0x', '0X' - hex number
-
- if (next === 120 || next === 88) {
- this.readRadixNumber(16);
- return;
- } // '0o', '0O' - octal number
-
-
- if (next === 111 || next === 79) {
- this.readRadixNumber(8);
- return;
- } // '0b', '0B' - binary number
-
-
- if (next === 98 || next === 66) {
- this.readRadixNumber(2);
- return;
- }
- }
- // Anything else beginning with a digit is an integer, octal
- // number, or float.
-
- case 49:
- case 50:
- case 51:
- case 52:
- case 53:
- case 54:
- case 55:
- case 56:
- case 57:
- this.readNumber(false);
- return;
- // Quotes produce strings.
-
- case 34:
- case 39:
- this.readString(code);
- return;
- // Operators are parsed inline in tiny state machines. '=' (charCodes.equalsTo) is
- // often referred to. `finishOp` simply skips the amount of
- // characters it is given as second argument, and returns a token
- // of the type given by its first argument.
-
- 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;
- }
-
- this.raise(this.state.pos, `Unexpected character '${codePointToString(code)}'`);
- };
-
- _proto.finishOp = function finishOp(type, size) {
- var str = this.input.slice(this.state.pos, this.state.pos + size);
- this.state.pos += size;
- this.finishToken(type, str);
- };
-
- _proto.readRegexp = function readRegexp() {
- var start = this.state.pos;
- var escaped, inClass;
-
- for (;;) {
- if (this.state.pos >= this.input.length) {
- this.raise(start, "Unterminated regular expression");
- }
-
- var 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;
- }
-
- var content = this.input.slice(start, this.state.pos);
- ++this.state.pos; // Need to use `readWord1` because '\uXXXX' sequences are allowed
- // here (don't ask).
-
- var mods = this.readWord1();
-
- if (mods) {
- var validFlags = /^[gmsiyu]*$/;
-
- if (!validFlags.test(mods)) {
- this.raise(start, "Invalid regular expression flag");
- }
- }
-
- this.finishToken(types.regexp, {
- pattern: content,
- flags: mods
- });
- }; // Read an integer in the given radix. Return null if zero digits
- // were read, the integer value otherwise. When `len` is given, this
- // will return `null` unless the integer has exactly `len` digits.
-
-
- _proto.readInt = function readInt(radix, len) {
- var start = this.state.pos;
- var forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
- var allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin;
- var total = 0;
-
- for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
- var code = this.input.charCodeAt(this.state.pos);
- var val = void 0;
-
- if (this.hasPlugin("numericSeparator")) {
- var prev = this.input.charCodeAt(this.state.pos - 1);
- var 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");
- } // Ignore this _ character
-
-
- ++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; // 0-9
- } 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;
- };
-
- _proto.readRadixNumber = function readRadixNumber(radix) {
- var start = this.state.pos;
- var isBigInt = false;
- this.state.pos += 2; // 0x
-
- var 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.fullCharCodeAtPos())) {
- this.raise(this.state.pos, "Identifier directly after number");
- }
-
- if (isBigInt) {
- var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
- this.finishToken(types.bigint, str);
- return;
- }
-
- this.finishToken(types.num, val);
- }; // Read an integer, octal integer, or floating-point number.
-
-
- _proto.readNumber = function readNumber(startsWithDot) {
- var start = this.state.pos;
- var octal = this.input.charCodeAt(start) === 48;
- var isFloat = false;
- var isBigInt = false;
-
- if (!startsWithDot && this.readInt(10) === null) {
- this.raise(start, "Invalid number");
- }
-
- if (octal && this.state.pos == start + 1) octal = false; // number === 0
-
- var 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) {
- // disallow floats and legacy octal syntax, new style octal ("0o") is handled in this.readRadixNumber
- if (isFloat || octal) this.raise(start, "Invalid BigIntLiteral");
- ++this.state.pos;
- isBigInt = true;
- }
- }
-
- if (isIdentifierStart(this.fullCharCodeAtPos())) {
- this.raise(this.state.pos, "Identifier directly after number");
- } // remove "_" for numeric literal separator, and "n" for BigInts
-
-
- var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
-
- if (isBigInt) {
- this.finishToken(types.bigint, str);
- return;
- }
-
- var val;
-
- if (isFloat) {
- val = parseFloat(str);
- } else if (!octal || str.length === 1) {
- val = parseInt(str, 10);
- } else if (this.state.strict) {
- this.raise(start, "Invalid number");
- } else if (/[89]/.test(str)) {
- val = parseInt(str, 10);
- } else {
- val = parseInt(str, 8);
- }
-
- this.finishToken(types.num, val);
- }; // Read a string value, interpreting backslash-escapes.
-
-
- _proto.readCodePoint = function readCodePoint(throwOnInvalid) {
- var ch = this.input.charCodeAt(this.state.pos);
- var code;
-
- if (ch === 123) {
- var codePos = ++this.state.pos;
- code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, throwOnInvalid);
- ++this.state.pos;
-
- if (code === null) {
- // $FlowFixMe (is this always non-null?)
- --this.state.invalidTemplateEscapePosition; // to point to the '\'' instead of the 'u'
- } 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;
- };
-
- _proto.readString = function readString(quote) {
- var out = "",
- chunkStart = ++this.state.pos;
-
- for (;;) {
- if (this.state.pos >= this.input.length) {
- this.raise(this.state.start, "Unterminated string constant");
- }
-
- var ch = this.input.charCodeAt(this.state.pos);
- if (ch === quote) break;
-
- if (ch === 92) {
- out += this.input.slice(chunkStart, this.state.pos); // $FlowFixMe
-
- out += this.readEscapedChar(false);
- chunkStart = this.state.pos;
- } else {
- if (isNewLine(ch)) {
- this.raise(this.state.start, "Unterminated string constant");
- }
-
- ++this.state.pos;
- }
- }
-
- out += this.input.slice(chunkStart, this.state.pos++);
- this.finishToken(types.string, out);
- }; // Reads template string tokens.
-
-
- _proto.readTmplToken = function readTmplToken() {
- var out = "",
- chunkStart = this.state.pos,
- containsInvalid = false;
-
- for (;;) {
- if (this.state.pos >= this.input.length) {
- this.raise(this.state.start, "Unterminated template");
- }
-
- var 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);
- var 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;
- }
- }
- }; // Used to read escaped characters
-
-
- _proto.readEscapedChar = function readEscapedChar(inTemplate) {
- var throwOnInvalid = !inTemplate;
- var ch = this.input.charCodeAt(++this.state.pos);
- ++this.state.pos;
-
- switch (ch) {
- case 110:
- return "\n";
-
- case 114:
- return "\r";
-
- case 120:
- {
- var code = this.readHexChar(2, throwOnInvalid);
- return code === null ? null : String.fromCharCode(code);
- }
-
- case 117:
- {
- var _code = this.readCodePoint(throwOnInvalid);
-
- return _code === null ? null : codePointToString(_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;
- return "";
-
- default:
- if (ch >= 48 && ch <= 55) {
- var codePos = this.state.pos - 1; // $FlowFixMe
-
- var octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0];
- var octal = parseInt(octalStr, 8);
-
- if (octal > 255) {
- octalStr = octalStr.slice(0, -1);
- octal = parseInt(octalStr, 8);
- }
-
- if (octal > 0) {
- 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) {
- // These properties are only used to throw an error for an octal which occurs
- // in a directive which occurs prior to a "use strict" directive.
- this.state.containsOctal = true;
- this.state.octalPosition = codePos;
- }
- }
-
- this.state.pos += octalStr.length - 1;
- return String.fromCharCode(octal);
- }
-
- return String.fromCharCode(ch);
- }
- }; // Used to read character escape sequences ('\x', '\u').
-
-
- _proto.readHexChar = function readHexChar(len, throwOnInvalid) {
- var codePos = this.state.pos;
- var 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;
- }; // Read an identifier, and return it as a string. Sets `this.state.containsEsc`
- // to whether the word contained a '\u' escape.
- //
- // Incrementally adds only escaped chars, adding other chunks as-is
- // as a micro-optimization.
-
-
- _proto.readWord1 = function readWord1() {
- this.state.containsEsc = false;
- var word = "",
- first = true,
- chunkStart = this.state.pos;
-
- while (this.state.pos < this.input.length) {
- var ch = this.fullCharCodeAtPos();
-
- if (isIdentifierChar(ch)) {
- this.state.pos += ch <= 0xffff ? 1 : 2;
- } else if (ch === 92) {
- this.state.containsEsc = true;
- word += this.input.slice(chunkStart, this.state.pos);
- var escStart = this.state.pos;
-
- if (this.input.charCodeAt(++this.state.pos) !== 117) {
- this.raise(this.state.pos, "Expecting Unicode escape sequence \\uXXXX");
- }
-
- ++this.state.pos;
- var esc = this.readCodePoint(true); // $FlowFixMe (thinks esc may be null, but throwOnInvalid is true)
-
- if (!(first ? isIdentifierStart : isIdentifierChar)(esc, true)) {
- this.raise(escStart, "Invalid Unicode escape");
- } // $FlowFixMe
-
-
- word += codePointToString(esc);
- chunkStart = this.state.pos;
- } else {
- break;
- }
-
- first = false;
- }
-
- return word + this.input.slice(chunkStart, this.state.pos);
- }; // Read an identifier or keyword token. Will check for reserved
- // words when necessary.
-
-
- _proto.readWord = function readWord() {
- var word = this.readWord1();
- var type = types.name;
-
- if (this.isKeyword(word)) {
- if (this.state.containsEsc) {
- this.raise(this.state.pos, `Escape sequence in keyword ${word}`);
- }
-
- type = keywords[word];
- }
-
- this.finishToken(type, word);
- };
-
- _proto.braceIsBlock = function braceIsBlock(prevType) {
- if (prevType === types.colon) {
- var parent = this.curContext();
-
- if (parent === types$1.braceStatement || parent === types$1.braceExpression) {
- return !parent.isExpr;
- }
- }
-
- if (prevType === types._return) {
- 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) {
- return true;
- }
-
- if (prevType === types.braceL) {
- return this.curContext() === types$1.braceStatement;
- }
-
- if (prevType === types.relational) {
- // `class C<T> { ... }`
- return true;
- }
-
- return !this.state.exprAllowed;
- };
-
- _proto.updateContext = function updateContext(prevType) {
- var type = this.state.type;
- var 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;
- }
- };
-
- return Tokenizer;
-}(LocationParser);
-
-var UtilParser =
-/*#__PURE__*/
-function (_Tokenizer) {
- _inheritsLoose(UtilParser, _Tokenizer);
-
- function UtilParser() {
- return _Tokenizer.apply(this, arguments) || this;
- }
-
- var _proto = UtilParser.prototype;
-
- // TODO
- _proto.addExtra = function addExtra(node, key, val) {
- if (!node) return;
- var extra = node.extra = node.extra || {};
- extra[key] = val;
- }; // TODO
-
-
- _proto.isRelational = function isRelational(op) {
- return this.match(types.relational) && this.state.value === op;
- }; // TODO
-
-
- _proto.expectRelational = function expectRelational(op) {
- if (this.isRelational(op)) {
- this.next();
- } else {
- this.unexpected(null, types.relational);
- }
- }; // eat() for relational operators.
-
-
- _proto.eatRelational = function eatRelational(op) {
- if (this.isRelational(op)) {
- this.next();
- return true;
- }
-
- return false;
- }; // Tests whether parsed token is a contextual keyword.
-
-
- _proto.isContextual = function isContextual(name) {
- return this.match(types.name) && this.state.value === name;
- };
-
- _proto.isLookaheadContextual = function isLookaheadContextual(name) {
- var l = this.lookahead();
- return l.type === types.name && l.value === name;
- }; // Consumes contextual keyword if possible.
-
-
- _proto.eatContextual = function eatContextual(name) {
- return this.state.value === name && this.eat(types.name);
- }; // Asserts that following token is given contextual keyword.
-
-
- _proto.expectContextual = function expectContextual(name, message) {
- if (!this.eatContextual(name)) this.unexpected(null, message);
- }; // Test whether a semicolon can be inserted at the current position.
-
-
- _proto.canInsertSemicolon = function canInsertSemicolon() {
- return this.match(types.eof) || this.match(types.braceR) || this.hasPrecedingLineBreak();
- };
-
- _proto.hasPrecedingLineBreak = function hasPrecedingLineBreak() {
- return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));
- }; // TODO
-
-
- _proto.isLineTerminator = function isLineTerminator() {
- return this.eat(types.semi) || this.canInsertSemicolon();
- }; // Consume a semicolon, or, failing that, see if we are allowed to
- // pretend that there is a semicolon at this position.
-
-
- _proto.semicolon = function semicolon() {
- if (!this.isLineTerminator()) this.unexpected(null, types.semi);
- }; // Expect a token of a given type. If found, consume it, otherwise,
- // raise an unexpected token error at given pos.
-
-
- _proto.expect = function expect(type, pos) {
- this.eat(type) || this.unexpected(pos, type);
- }; // Raise an unexpected token error. Can take the expected token type
- // instead of a message string.
-
-
- _proto.unexpected = function unexpected(pos, messageOrType) {
- if (messageOrType === void 0) {
- messageOrType = "Unexpected token";
- }
-
- if (typeof messageOrType !== "string") {
- messageOrType = `Unexpected token, expected "${messageOrType.label}"`;
- }
-
- throw this.raise(pos != null ? pos : this.state.start, messageOrType);
- };
-
- _proto.expectPlugin = function 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}'`, [name]);
- }
-
- return true;
- };
-
- _proto.expectOnePlugin = function expectOnePlugin(names, pos) {
- var _this = this;
-
- if (!names.some(function (n) {
- return _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(", ")}'`, names);
- }
- };
-
- return UtilParser;
-}(Tokenizer);
-
-// Start an AST node, attaching a start offset.
-var commentKeys = ["leadingComments", "trailingComments", "innerComments"];
-
-var Node =
-/*#__PURE__*/
-function () {
- function Node(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;
- }
-
- var _proto = Node.prototype;
-
- _proto.__clone = function __clone() {
- var _this = this;
-
- // $FlowIgnore
- var node2 = new Node();
- Object.keys(this).forEach(function (key) {
- // Do not clone comments that are already attached to the node
- if (commentKeys.indexOf(key) < 0) {
- // $FlowIgnore
- node2[key] = _this[key];
- }
- });
- return node2;
- };
-
- return Node;
-}();
-
-var NodeUtils =
-/*#__PURE__*/
-function (_UtilParser) {
- _inheritsLoose(NodeUtils, _UtilParser);
-
- function NodeUtils() {
- return _UtilParser.apply(this, arguments) || this;
- }
-
- var _proto2 = NodeUtils.prototype;
-
- _proto2.startNode = function startNode() {
- // $FlowIgnore
- return new Node(this, this.state.start, this.state.startLoc);
- };
-
- _proto2.startNodeAt = function startNodeAt(pos, loc) {
- // $FlowIgnore
- return new Node(this, pos, loc);
- };
- /** Start a new node with a previous node's location. */
-
-
- _proto2.startNodeAtNode = function startNodeAtNode(type) {
- return this.startNodeAt(type.start, type.loc.start);
- }; // Finish an AST node, adding `type` and `end` properties.
-
-
- _proto2.finishNode = function finishNode(node, type) {
- return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);
- }; // Finish node at given position
-
-
- _proto2.finishNodeAt = function 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;
- };
- /**
- * Reset the start location of node to the start location of locationNode
- */
-
-
- _proto2.resetStartLocationFromNode = function resetStartLocationFromNode(node, locationNode) {
- node.start = locationNode.start;
- node.loc.start = locationNode.loc.start;
- if (this.options.ranges) node.range[0] = locationNode.range[0];
- };
-
- return NodeUtils;
-}(UtilParser);
-
-var LValParser =
-/*#__PURE__*/
-function (_NodeUtils) {
- _inheritsLoose(LValParser, _NodeUtils);
-
- function LValParser() {
- return _NodeUtils.apply(this, arguments) || this;
- }
-
- var _proto = LValParser.prototype;
-
- // Forward-declaration: defined in expression.js
- // Forward-declaration: defined in statement.js
- // Convert existing expression atom to assignable pattern
- // if possible.
- _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) {
- if (node) {
- switch (node.type) {
- case "Identifier":
- case "ObjectPattern":
- case "ArrayPattern":
- case "AssignmentPattern":
- break;
-
- case "ObjectExpression":
- node.type = "ObjectPattern";
-
- for (var index = 0; index < node.properties.length; index++) {
- var prop = node.properties[index];
- var isLast = index === node.properties.length - 1;
- this.toAssignableObjectExpressionProp(prop, isBinding, isLast);
- }
-
- break;
-
- case "ObjectProperty":
- this.toAssignable(node.value, isBinding, contextDescription);
- break;
-
- case "SpreadElement":
- {
- this.checkToRestConversion(node);
- node.type = "RestElement";
- var 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 "MemberExpression":
- if (!isBinding) break;
-
- default:
- {
- var message = "Invalid left-hand side" + (contextDescription ? " in " + contextDescription :
- /* istanbul ignore next */
- "expression");
- this.raise(node.start, message);
- }
- }
- }
-
- return node;
- };
-
- _proto.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop, isBinding, isLast) {
- if (prop.type === "ObjectMethod") {
- var 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.raise(prop.start, "The rest element has to be the last element when destructuring");
- } else {
- this.toAssignable(prop, isBinding, "object destructuring pattern");
- }
- }; // Convert list of expression atoms to binding list.
-
-
- _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) {
- var end = exprList.length;
-
- if (end) {
- var last = exprList[end - 1];
-
- if (last && last.type === "RestElement") {
- --end;
- } else if (last && last.type === "SpreadElement") {
- last.type = "RestElement";
- var arg = last.argument;
- this.toAssignable(arg, isBinding, contextDescription);
-
- if (["Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern"].indexOf(arg.type) === -1) {
- this.unexpected(arg.start);
- }
-
- --end;
- }
- }
-
- for (var i = 0; i < end; i++) {
- var elt = exprList[i];
-
- if (elt && elt.type === "SpreadElement") {
- this.raise(elt.start, "The rest element has to be the last element when destructuring");
- }
-
- if (elt) this.toAssignable(elt, isBinding, contextDescription);
- }
-
- return exprList;
- }; // Convert list of expression atoms to a list of
-
-
- _proto.toReferencedList = function toReferencedList(exprList) {
- return exprList;
- }; // Parses spread element.
-
-
- _proto.parseSpread = function parseSpread(refShorthandDefaultPos) {
- var node = this.startNode();
- this.next();
- node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos);
- return this.finishNode(node, "SpreadElement");
- };
-
- _proto.parseRest = function parseRest() {
- var node = this.startNode();
- this.next();
- node.argument = this.parseBindingAtom();
- return this.finishNode(node, "RestElement");
- };
-
- _proto.shouldAllowYieldIdentifier = function shouldAllowYieldIdentifier() {
- return this.match(types._yield) && !this.state.strict && !this.state.inGenerator;
- };
-
- _proto.parseBindingIdentifier = function parseBindingIdentifier() {
- return this.parseIdentifier(this.shouldAllowYieldIdentifier());
- }; // Parses lvalue (assignable) atom.
-
-
- _proto.parseBindingAtom = function parseBindingAtom() {
- switch (this.state.type) {
- case types._yield:
- case types.name:
- return this.parseBindingIdentifier();
-
- case types.bracketL:
- {
- var node = this.startNode();
- this.next();
- node.elements = this.parseBindingList(types.bracketR, true);
- return this.finishNode(node, "ArrayPattern");
- }
-
- case types.braceL:
- return this.parseObj(true);
-
- default:
- throw this.unexpected();
- }
- };
-
- _proto.parseBindingList = function parseBindingList(close, allowEmpty, allowModifiers) {
- var elts = [];
- var first = true;
-
- while (!this.eat(close)) {
- if (first) {
- first = false;
- } else {
- this.expect(types.comma);
- }
-
- if (allowEmpty && this.match(types.comma)) {
- // $FlowFixMe This method returns `$ReadOnlyArray<?Pattern>` if `allowEmpty` is set.
- elts.push(null);
- } else if (this.eat(close)) {
- break;
- } else if (this.match(types.ellipsis)) {
- elts.push(this.parseAssignableListItemTypes(this.parseRest()));
- this.expect(close);
- break;
- } else {
- var decorators = [];
-
- if (this.match(types.at) && this.hasPlugin("decorators2")) {
- 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;
- };
-
- _proto.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) {
- var left = this.parseMaybeDefault();
- this.parseAssignableListItemTypes(left);
- var elt = this.parseMaybeDefault(left.start, left.loc.start, left);
-
- if (decorators.length) {
- left.decorators = decorators;
- }
-
- return elt;
- };
-
- _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) {
- return param;
- }; // Parses assignment pattern around given atom if possible.
-
-
- _proto.parseMaybeDefault = function 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;
- var node = this.startNodeAt(startPos, startLoc);
- node.left = left;
- node.right = this.parseMaybeAssign();
- return this.finishNode(node, "AssignmentPattern");
- }; // Verify that a node is an lval — something that can be assigned
- // to.
-
-
- _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) {
- switch (expr.type) {
- case "Identifier":
- this.checkReservedWord(expr.name, expr.start, false, true);
-
- if (checkClashes) {
- // we need to prefix this with an underscore for the cases where we have a key of
- // `__proto__`. there's a bug in old V8 where the following wouldn't work:
- //
- // > var obj = Object.create(null);
- // undefined
- // > obj.__proto__
- // null
- // > obj.__proto__ = true;
- // true
- // > obj.__proto__
- // null
- var _key = `_${expr.name}`;
-
- if (checkClashes[_key]) {
- this.raise(expr.start, "Argument name clash in strict mode");
- } else {
- checkClashes[_key] = true;
- }
- }
-
- break;
-
- case "MemberExpression":
- if (isBinding) this.raise(expr.start, "Binding member expression");
- break;
-
- case "ObjectPattern":
- for (var _i2 = 0, _expr$properties2 = expr.properties; _i2 < _expr$properties2.length; _i2++) {
- var prop = _expr$properties2[_i2];
- if (prop.type === "ObjectProperty") prop = prop.value;
- this.checkLVal(prop, isBinding, checkClashes, "object destructuring pattern");
- }
-
- break;
-
- case "ArrayPattern":
- for (var _i4 = 0, _expr$elements2 = expr.elements; _i4 < _expr$elements2.length; _i4++) {
- var elem = _expr$elements2[_i4];
-
- if (elem) {
- this.checkLVal(elem, isBinding, checkClashes, "array destructuring pattern");
- }
- }
-
- break;
-
- case "AssignmentPattern":
- this.checkLVal(expr.left, isBinding, checkClashes, "assignment pattern");
- break;
-
- case "RestElement":
- this.checkLVal(expr.argument, isBinding, checkClashes, "rest element");
- break;
-
- default:
- {
- var message = (isBinding ?
- /* istanbul ignore next */
- "Binding invalid" : "Invalid") + " left-hand side" + (contextDescription ? " in " + contextDescription :
- /* istanbul ignore next */
- "expression");
- this.raise(expr.start, message);
- }
- }
- };
-
- _proto.checkToRestConversion = function checkToRestConversion(node) {
- var validArgumentTypes = ["Identifier", "MemberExpression"];
-
- if (validArgumentTypes.indexOf(node.argument.type) !== -1) {
- return;
- }
-
- this.raise(node.argument.start, "Invalid rest operator's argument");
- };
-
- return LValParser;
-}(NodeUtils);
-
-/* eslint max-len: 0 */
-// A recursive descent parser operates by defining functions for all
-// syntactic elements, and recursively calling those, each function
-// advancing the input stream and returning an AST node. Precedence
-// of constructs (for example, the fact that `!x[1]` means `!(x[1])`
-// instead of `(!x)[1]` is handled by the fact that the parser
-// function that parses unary prefix operators is called first, and
-// in turn calls the function that parses `[]` subscripts — that
-// way, it'll receive the node for `x[1]` already parsed, and wraps
-// *that* in the unary operator node.
-//
-// Acorn uses an [operator precedence parser][opp] to handle binary
-// operator precedence, because it is much more compact than using
-// the technique outlined above, which uses different, nesting
-// functions to specify precedence, for all of the ten binary
-// precedence levels that JavaScript defines.
-//
-// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
-var ExpressionParser =
-/*#__PURE__*/
-function (_LValParser) {
- _inheritsLoose(ExpressionParser, _LValParser);
-
- function ExpressionParser() {
- return _LValParser.apply(this, arguments) || this;
- }
-
- var _proto = ExpressionParser.prototype;
-
- // Forward-declaration: defined in statement.js
- // Check if property name clashes with already added.
- // Object/class getters and setters are not allowed to clash —
- // either with each other or with an init property — and in
- // strict mode, init properties are also not allowed to be repeated.
- _proto.checkPropClash = function checkPropClash(prop, propHash) {
- if (prop.computed || prop.kind) return;
- var key = prop.key; // It is either an Identifier or a String/NumericLiteral
-
- var 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;
- }
- }; // Convenience method to parse an Expression only
-
-
- _proto.getExpression = function getExpression() {
- this.nextToken();
- var expr = this.parseExpression();
-
- if (!this.match(types.eof)) {
- this.unexpected();
- }
-
- expr.comments = this.state.comments;
- return expr;
- }; // ### Expression parsing
- // These nest, from the most general expression type at the top to
- // 'atomic', nondivisible expression types at the bottom. Most of
- // the functions will simply let the function (s) below them parse,
- // and, *if* the syntactic construct they handle is present, wrap
- // the AST node that the inner parser gave them in another node.
- // Parse a full expression. The optional arguments are used to
- // forbid the `in` operator (in for loops initialization expressions)
- // and provide reference for storing '=' operator inside shorthand
- // property assignment in contexts where both object expression
- // and object pattern might appear (so it's possible to raise
- // delayed syntax error at correct position).
-
-
- _proto.parseExpression = function parseExpression(noIn, refShorthandDefaultPos) {
- var startPos = this.state.start;
- var startLoc = this.state.startLoc;
- var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos);
-
- if (this.match(types.comma)) {
- var _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;
- }; // Parse an assignment expression. This includes applications of
- // operators like `+=`.
-
-
- _proto.parseMaybeAssign = function parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) {
- var startPos = this.state.start;
- var startLoc = this.state.startLoc;
-
- if (this.match(types._yield) && this.state.inGenerator) {
- var _left = this.parseYield();
-
- if (afterLeftParse) {
- _left = afterLeftParse.call(this, _left, startPos, startLoc);
- }
-
- return _left;
- }
-
- var failOnShorthandAssign;
-
- if (refShorthandDefaultPos) {
- failOnShorthandAssign = false;
- } else {
- refShorthandDefaultPos = {
- start: 0
- };
- failOnShorthandAssign = true;
- }
-
- if (this.match(types.parenL) || this.match(types.name) || this.match(types._yield)) {
- this.state.potentialArrowAt = this.state.start;
- }
-
- var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos);
-
- if (afterLeftParse) {
- left = afterLeftParse.call(this, left, startPos, startLoc);
- }
-
- if (this.state.type.isAssign) {
- var _node2 = this.startNodeAt(startPos, startLoc);
-
- _node2.operator = this.state.value;
- _node2.left = this.match(types.eq) ? this.toAssignable(left, undefined, "assignment expression") : left;
- refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly
-
- this.checkLVal(left, undefined, undefined, "assignment expression");
-
- if (left.extra && left.extra.parenthesized) {
- var errorMsg;
-
- if (left.type === "ObjectPattern") {
- errorMsg = "`({a}) = 0` use `({a} = 0)`";
- } else if (left.type === "ArrayPattern") {
- errorMsg = "`([a]) = 0` use `([a] = 0)`";
- }
-
- if (errorMsg) {
- this.raise(left.start, `You're trying to assign to a parenthesized expression, eg. instead of ${errorMsg}`);
- }
- }
-
- this.next();
- _node2.right = this.parseMaybeAssign(noIn);
- return this.finishNode(_node2, "AssignmentExpression");
- } else if (failOnShorthandAssign && refShorthandDefaultPos.start) {
- this.unexpected(refShorthandDefaultPos.start);
- }
-
- return left;
- }; // Parse a ternary conditional (`?:`) operator.
-
-
- _proto.parseMaybeConditional = function parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos) {
- var startPos = this.state.start;
- var startLoc = this.state.startLoc;
- var potentialArrowAt = this.state.potentialArrowAt;
- var 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);
- };
-
- _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, // FIXME: Disabling this for now since can't seem to get it to play nicely
- refNeedsArrowPos) {
- if (this.eat(types.question)) {
- var _node3 = this.startNodeAt(startPos, startLoc);
-
- _node3.test = expr;
- _node3.consequent = this.parseMaybeAssign();
- this.expect(types.colon);
- _node3.alternate = this.parseMaybeAssign(noIn);
- return this.finishNode(_node3, "ConditionalExpression");
- }
-
- return expr;
- }; // Start the precedence parser.
-
-
- _proto.parseExprOps = function parseExprOps(noIn, refShorthandDefaultPos) {
- var startPos = this.state.start;
- var startLoc = this.state.startLoc;
- var potentialArrowAt = this.state.potentialArrowAt;
- var 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);
- }; // Parse binary operators with the operator precedence parsing
- // algorithm. `left` is the left-hand side of the operator.
- // `minPrec` provides context that allows the function to stop and
- // defer further parser to one of its callers when it encounters an
- // operator that has a lower precedence than the set it is parsing.
-
-
- _proto.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) {
- var prec = this.state.type.binop;
-
- if (prec != null && (!noIn || !this.match(types._in))) {
- if (prec > minPrec) {
- var _node4 = this.startNodeAt(leftStartPos, leftStartLoc);
-
- _node4.left = left;
- _node4.operator = this.state.value;
-
- if (_node4.operator === "**" && left.type === "UnaryExpression" && left.extra && !left.extra.parenthesizedArgument && !left.extra.parenthesized) {
- this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");
- }
-
- var op = this.state.type;
- this.next();
- var startPos = this.state.start;
- var startLoc = this.state.startLoc;
-
- if (_node4.operator === "|>") {
- this.expectPlugin("pipelineOperator"); // Support syntax such as 10 |> x => x + 1
-
- this.state.potentialArrowAt = startPos;
- }
-
- if (_node4.operator === "??") {
- this.expectPlugin("nullishCoalescingOperator");
- }
-
- _node4.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn);
- this.finishNode(_node4, op === types.logicalOR || op === types.logicalAND || op === types.nullishCoalescing ? "LogicalExpression" : "BinaryExpression");
- return this.parseExprOp(_node4, leftStartPos, leftStartLoc, minPrec, noIn);
- }
- }
-
- return left;
- }; // Parse unary operators, both prefix and postfix.
-
-
- _proto.parseMaybeUnary = function parseMaybeUnary(refShorthandDefaultPos) {
- if (this.state.type.prefix) {
- var _node5 = this.startNode();
-
- var update = this.match(types.incDec);
- _node5.operator = this.state.value;
- _node5.prefix = true;
-
- if (_node5.operator === "throw") {
- this.expectPlugin("throwExpressions");
- }
-
- this.next();
- var argType = this.state.type;
- _node5.argument = this.parseMaybeUnary();
- this.addExtra(_node5, "parenthesizedArgument", argType === types.parenL && (!_node5.argument.extra || !_node5.argument.extra.parenthesized));
-
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
- this.unexpected(refShorthandDefaultPos.start);
- }
-
- if (update) {
- this.checkLVal(_node5.argument, undefined, undefined, "prefix operation");
- } else if (this.state.strict && _node5.operator === "delete") {
- var arg = _node5.argument;
-
- if (arg.type === "Identifier") {
- this.raise(_node5.start, "Deleting local variable in strict mode");
- } else if (arg.type === "MemberExpression" && arg.property.type === "PrivateName") {
- this.raise(_node5.start, "Deleting a private field is not allowed");
- }
- }
-
- return this.finishNode(_node5, update ? "UpdateExpression" : "UnaryExpression");
- }
-
- var startPos = this.state.start;
- var startLoc = this.state.startLoc;
- var expr = this.parseExprSubscripts(refShorthandDefaultPos);
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
-
- while (this.state.type.postfix && !this.canInsertSemicolon()) {
- var _node6 = this.startNodeAt(startPos, startLoc);
-
- _node6.operator = this.state.value;
- _node6.prefix = false;
- _node6.argument = expr;
- this.checkLVal(expr, undefined, undefined, "postfix operation");
- this.next();
- expr = this.finishNode(_node6, "UpdateExpression");
- }
-
- return expr;
- }; // Parse call, dot, and `[]`-subscript expressions.
-
-
- _proto.parseExprSubscripts = function parseExprSubscripts(refShorthandDefaultPos) {
- var startPos = this.state.start;
- var startLoc = this.state.startLoc;
- var potentialArrowAt = this.state.potentialArrowAt;
- var 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);
- };
-
- _proto.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) {
- var state = {
- stop: false
- };
-
- do {
- base = this.parseSubscript(base, startPos, startLoc, noCalls, state);
- } while (!state.stop);
-
- return base;
- };
- /** @param state Set 'state.stop = true' to indicate that we should stop parsing subscripts. */
-
-
- _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) {
- if (!noCalls && this.eat(types.doubleColon)) {
- var _node7 = this.startNodeAt(startPos, startLoc);
-
- _node7.object = base;
- _node7.callee = this.parseNoCallExpr();
- state.stop = true;
- return this.parseSubscripts(this.finishNode(_node7, "BindExpression"), startPos, startLoc, noCalls);
- } else if (this.match(types.questionDot)) {
- this.expectPlugin("optionalChaining");
-
- if (noCalls && this.lookahead().type == types.parenL) {
- state.stop = true;
- return base;
- }
-
- this.next();
-
- var _node8 = this.startNodeAt(startPos, startLoc);
-
- if (this.eat(types.bracketL)) {
- _node8.object = base;
- _node8.property = this.parseExpression();
- _node8.computed = true;
- _node8.optional = true;
- this.expect(types.bracketR);
- return this.finishNode(_node8, "MemberExpression");
- } else if (this.eat(types.parenL)) {
- var possibleAsync = this.atPossibleAsync(base);
- _node8.callee = base;
- _node8.arguments = this.parseCallExpressionArguments(types.parenR, possibleAsync);
- _node8.optional = true;
- return this.finishNode(_node8, "CallExpression");
- } else {
- _node8.object = base;
- _node8.property = this.parseIdentifier(true);
- _node8.computed = false;
- _node8.optional = true;
- return this.finishNode(_node8, "MemberExpression");
- }
- } else if (this.eat(types.dot)) {
- var _node9 = this.startNodeAt(startPos, startLoc);
-
- _node9.object = base;
- _node9.property = this.parseMaybePrivateName();
- _node9.computed = false;
- return this.finishNode(_node9, "MemberExpression");
- } else if (this.eat(types.bracketL)) {
- var _node10 = this.startNodeAt(startPos, startLoc);
-
- _node10.object = base;
- _node10.property = this.parseExpression();
- _node10.computed = true;
- this.expect(types.bracketR);
- return this.finishNode(_node10, "MemberExpression");
- } else if (!noCalls && this.match(types.parenL)) {
- var _possibleAsync = this.atPossibleAsync(base);
-
- this.next();
-
- var _node11 = this.startNodeAt(startPos, startLoc);
-
- _node11.callee = base; // TODO: Clean up/merge this into `this.state` or a class like acorn's
- // `DestructuringErrors` alongside refShorthandDefaultPos and
- // refNeedsArrowPos.
-
- var refTrailingCommaPos = {
- start: -1
- };
- _node11.arguments = this.parseCallExpressionArguments(types.parenR, _possibleAsync, refTrailingCommaPos);
- this.finishCallExpression(_node11);
-
- if (_possibleAsync && this.shouldParseAsyncArrow()) {
- state.stop = true;
-
- if (refTrailingCommaPos.start > -1) {
- this.raise(refTrailingCommaPos.start, "A trailing comma is not permitted after the rest element");
- }
-
- return this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), _node11);
- } else {
- this.toReferencedList(_node11.arguments);
- }
-
- return _node11;
- } else if (this.match(types.backQuote)) {
- var _node12 = this.startNodeAt(startPos, startLoc);
-
- _node12.tag = base;
- _node12.quasi = this.parseTemplate(true);
- return this.finishNode(_node12, "TaggedTemplateExpression");
- } else {
- state.stop = true;
- return base;
- }
- };
-
- _proto.atPossibleAsync = function atPossibleAsync(base) {
- return this.state.potentialArrowAt === base.start && base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon();
- };
-
- _proto.finishCallExpression = function finishCallExpression(node) {
- if (node.callee.type === "Import") {
- if (node.arguments.length !== 1) {
- this.raise(node.start, "import() requires exactly one argument");
- }
-
- var importArg = node.arguments[0];
-
- if (importArg && importArg.type === "SpreadElement") {
- this.raise(importArg.start, "... is not allowed in import()");
- }
- }
-
- return this.finishNode(node, "CallExpression");
- };
-
- _proto.parseCallExpressionArguments = function parseCallExpressionArguments(close, possibleAsyncArrow, refTrailingCommaPos) {
- var elts = [];
- var innerParenStart;
- var first = true;
-
- while (!this.eat(close)) {
- if (first) {
- first = false;
- } else {
- this.expect(types.comma);
- if (this.eat(close)) break;
- } // we need to make sure that if this is an async arrow functions, that we don't allow inner parens inside the params
-
-
- if (this.match(types.parenL) && !innerParenStart) {
- innerParenStart = this.state.start;
- }
-
- elts.push(this.parseExprListItem(false, possibleAsyncArrow ? {
- start: 0
- } : undefined, possibleAsyncArrow ? {
- start: 0
- } : undefined, possibleAsyncArrow ? refTrailingCommaPos : undefined));
- } // we found an async arrow function so let's not allow any inner parens
-
-
- if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) {
- this.unexpected();
- }
-
- return elts;
- };
-
- _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() {
- return this.match(types.arrow);
- };
-
- _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) {
- var oldYield = this.state.yieldInPossibleArrowParameters;
- this.state.yieldInPossibleArrowParameters = null;
- this.expect(types.arrow);
- this.parseArrowExpression(node, call.arguments, true);
- this.state.yieldInPossibleArrowParameters = oldYield;
- return node;
- }; // Parse a no-call expression (like argument of `new` or `::` operators).
-
-
- _proto.parseNoCallExpr = function parseNoCallExpr() {
- var startPos = this.state.start;
- var startLoc = this.state.startLoc;
- return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
- }; // Parse an atomic expression — either a single token that is an
- // expression, an expression started by a keyword like `function` or
- // `new`, or an expression wrapped in punctuation like `()`, `[]`,
- // or `{}`.
-
-
- _proto.parseExprAtom = function parseExprAtom(refShorthandDefaultPos) {
- var canBeArrow = this.state.potentialArrowAt === this.state.start;
- var node;
-
- switch (this.state.type) {
- case types._super:
- if (!this.state.inMethod && !this.state.inClassProperty && !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.match(types.bracketL) && !this.match(types.dot)) {
- this.unexpected();
- }
-
- if (this.match(types.parenL) && this.state.inMethod !== "constructor" && !this.options.allowSuperOutsideMethod) {
- this.raise(node.start, "super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'.");
- }
-
- return this.finishNode(node, "Super");
-
- case types._import:
- if (this.lookahead().type === types.dot) {
- return this.parseImportMetaProperty();
- }
-
- this.expectPlugin("dynamicImport");
- node = this.startNode();
- this.next();
-
- 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._yield:
- if (this.state.inGenerator) this.unexpected();
-
- case types.name:
- {
- node = this.startNode();
- var allowAwait = this.state.value === "await" && this.state.inAsync;
- var allowYield = this.shouldAllowYieldIdentifier();
- var id = this.parseIdentifier(allowAwait || allowYield);
-
- if (id.name === "await") {
- if (this.state.inAsync || this.inModule) {
- return this.parseAwait(node);
- }
- } else if (id.name === "async" && this.match(types._function) && !this.canInsertSemicolon()) {
- this.next();
- return this.parseFunction(node, false, false, true);
- } else if (canBeArrow && id.name === "async" && this.match(types.name)) {
- var oldYield = this.state.yieldInPossibleArrowParameters;
- this.state.yieldInPossibleArrowParameters = null;
- var params = [this.parseIdentifier()];
- this.expect(types.arrow); // let foo = bar => {};
-
- this.parseArrowExpression(node, params, true);
- this.state.yieldInPossibleArrowParameters = oldYield;
- return node;
- }
-
- if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) {
- var _oldYield = this.state.yieldInPossibleArrowParameters;
- this.state.yieldInPossibleArrowParameters = null;
- this.parseArrowExpression(node, [id]);
- this.state.yieldInPossibleArrowParameters = _oldYield;
- return node;
- }
-
- return id;
- }
-
- case types._do:
- {
- this.expectPlugin("doExpressions");
-
- var _node13 = this.startNode();
-
- this.next();
- var oldInFunction = this.state.inFunction;
- var oldLabels = this.state.labels;
- this.state.labels = [];
- this.state.inFunction = false;
- _node13.body = this.parseBlock(false);
- this.state.inFunction = oldInFunction;
- this.state.labels = oldLabels;
- return this.finishNode(_node13, "DoExpression");
- }
-
- case types.regexp:
- {
- var 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:
- node = this.startNode();
- this.next();
- node.elements = this.parseExprList(types.bracketR, true, refShorthandDefaultPos);
- this.toReferencedList(node.elements);
- return this.finishNode(node, "ArrayExpression");
-
- case types.braceL:
- return this.parseObj(false, refShorthandDefaultPos);
-
- 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;
- var 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.");
- }
- }
-
- default:
- throw this.unexpected();
- }
- };
-
- _proto.parseBooleanLiteral = function parseBooleanLiteral() {
- var node = this.startNode();
- node.value = this.match(types._true);
- this.next();
- return this.finishNode(node, "BooleanLiteral");
- };
-
- _proto.parseMaybePrivateName = function parseMaybePrivateName() {
- var isPrivate = this.match(types.hash);
-
- if (isPrivate) {
- this.expectOnePlugin(["classPrivateProperties", "classPrivateMethods"]);
-
- var _node14 = this.startNode();
-
- this.next();
- _node14.id = this.parseIdentifier(true);
- return this.finishNode(_node14, "PrivateName");
- } else {
- return this.parseIdentifier(true);
- }
- };
-
- _proto.parseFunctionExpression = function parseFunctionExpression() {
- var node = this.startNode();
- var meta = this.parseIdentifier(true);
-
- if (this.state.inGenerator && this.eat(types.dot)) {
- return this.parseMetaProperty(node, meta, "sent");
- }
-
- return this.parseFunction(node, false);
- };
-
- _proto.parseMetaProperty = function 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")) {
- // They didn't actually say `function.sent`, just `function.`, so a simple error would be less confusing.
- this.unexpected();
- }
- }
-
- node.property = this.parseIdentifier(true);
-
- if (node.property.name !== propertyName) {
- this.raise(node.property.start, `The only valid meta property for ${meta.name} is ${meta.name}.${propertyName}`);
- }
-
- return this.finishNode(node, "MetaProperty");
- };
-
- _proto.parseImportMetaProperty = function parseImportMetaProperty() {
- var node = this.startNode();
- var id = this.parseIdentifier(true);
- this.expect(types.dot);
-
- if (id.name === "import") {
- if (this.isContextual("meta")) {
- this.expectPlugin("importMeta");
- } else if (!this.hasPlugin("importMeta")) {
- this.raise(id.start, `Dynamic imports require a parameter: import('a.js').then`);
- }
- }
-
- if (!this.inModule) {
- this.raise(id.start, `import.meta may appear only with 'sourceType: "module"'`);
- }
-
- return this.parseMetaProperty(node, id, "meta");
- };
-
- _proto.parseLiteral = function parseLiteral(value, type, startPos, startLoc) {
- startPos = startPos || this.state.start;
- startLoc = startLoc || this.state.startLoc;
- var 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);
- };
-
- _proto.parseParenExpression = function parseParenExpression() {
- this.expect(types.parenL);
- var val = this.parseExpression();
- this.expect(types.parenR);
- return val;
- };
-
- _proto.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) {
- var startPos = this.state.start;
- var startLoc = this.state.startLoc;
- var val;
- this.expect(types.parenL);
- var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
- var oldYield = this.state.yieldInPossibleArrowParameters;
- this.state.maybeInArrowParameters = true;
- this.state.yieldInPossibleArrowParameters = null;
- var innerStartPos = this.state.start;
- var innerStartLoc = this.state.startLoc;
- var exprList = [];
- var refShorthandDefaultPos = {
- start: 0
- };
- var refNeedsArrowPos = {
- start: 0
- };
- var first = true;
- var spreadStart;
- var 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)) {
- var spreadNodeStartPos = this.state.start;
- var spreadNodeStartLoc = this.state.startLoc;
- spreadStart = this.state.start;
- exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStartPos, spreadNodeStartLoc));
-
- if (this.match(types.comma) && this.lookahead().type === types.parenR) {
- this.raise(this.state.start, "A trailing comma is not permitted after the rest element");
- }
-
- break;
- } else {
- exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos));
- }
- }
-
- var innerEndPos = this.state.start;
- var innerEndLoc = this.state.startLoc;
- this.expect(types.parenR);
- this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
- var arrowNode = this.startNodeAt(startPos, startLoc);
-
- if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
- for (var _i2 = 0; _i2 < exprList.length; _i2++) {
- var param = exprList[_i2];
-
- if (param.extra && param.extra.parenthesized) {
- this.unexpected(param.extra.parenStart);
- }
- }
-
- this.parseArrowExpression(arrowNode, exprList);
- this.state.yieldInPossibleArrowParameters = oldYield;
- return arrowNode;
- }
-
- this.state.yieldInPossibleArrowParameters = oldYield;
-
- 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);
-
- if (exprList.length > 1) {
- val = this.startNodeAt(innerStartPos, innerStartLoc);
- val.expressions = exprList;
- this.toReferencedList(val.expressions);
- this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
- } else {
- val = exprList[0];
- }
-
- this.addExtra(val, "parenthesized", true);
- this.addExtra(val, "parenStart", startPos);
- return val;
- };
-
- _proto.shouldParseArrow = function shouldParseArrow() {
- return !this.canInsertSemicolon();
- };
-
- _proto.parseArrow = function parseArrow(node) {
- if (this.eat(types.arrow)) {
- return node;
- }
- };
-
- _proto.parseParenItem = function parseParenItem(node, startPos, // eslint-disable-next-line no-unused-vars
- startLoc) {
- return node;
- }; // New's precedence is slightly tricky. It must allow its argument to
- // be a `[]` or dot subscript expression, but not a call — at least,
- // not without wrapping it in parentheses. Thus, it uses the noCalls
- // argument to parseSubscripts to prevent it from consuming the
- // argument list.
-
-
- _proto.parseNew = function parseNew() {
- var node = this.startNode();
- var meta = this.parseIdentifier(true);
-
- if (this.eat(types.dot)) {
- var metaProp = this.parseMetaProperty(node, meta, "target");
-
- if (!this.state.inFunction && !this.state.inClassProperty) {
- var 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 (this.eat(types.questionDot)) node.optional = true;
- this.parseNewArguments(node);
- return this.finishNode(node, "NewExpression");
- };
-
- _proto.parseNewArguments = function parseNewArguments(node) {
- if (this.eat(types.parenL)) {
- var args = this.parseExprList(types.parenR);
- this.toReferencedList(args); // $FlowFixMe (parseExprList should be all non-null in this case)
-
- node.arguments = args;
- } else {
- node.arguments = [];
- }
- }; // Parse template expression.
-
-
- _proto.parseTemplateElement = function parseTemplateElement(isTagged) {
- var elem = this.startNode();
-
- if (this.state.value === null) {
- if (!isTagged) {
- // TODO: fix this
- 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");
- };
-
- _proto.parseTemplate = function parseTemplate(isTagged) {
- var node = this.startNode();
- this.next();
- node.expressions = [];
- var 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");
- }; // Parse an object literal or binding pattern.
-
-
- _proto.parseObj = function parseObj(isPattern, refShorthandDefaultPos) {
- var decorators = [];
- var propHash = Object.create(null);
- var first = true;
- var node = this.startNode();
- node.properties = [];
- this.next();
- var firstRestLocation = null;
-
- while (!this.eat(types.braceR)) {
- if (first) {
- first = false;
- } else {
- this.expect(types.comma);
- if (this.eat(types.braceR)) break;
- }
-
- if (this.match(types.at)) {
- if (this.hasPlugin("decorators2")) {
- this.raise(this.state.start, "Stage 2 decorators disallow object literal property decorators");
- } else {
- // we needn't check if decorators (stage 0) plugin is enabled since it's checked by
- // the call to this.parseDecorator
- while (this.match(types.at)) {
- decorators.push(this.parseDecorator());
- }
- }
- }
-
- var prop = this.startNode(),
- isGenerator = false,
- _isAsync = false,
- startPos = void 0,
- startLoc = void 0;
-
- if (decorators.length) {
- prop.decorators = decorators;
- decorators = [];
- }
-
- if (this.match(types.ellipsis)) {
- this.expectPlugin("objectRestSpread");
- prop = this.parseSpread(isPattern ? {
- start: 0
- } : undefined);
-
- if (isPattern) {
- this.toAssignable(prop, true, "object pattern");
- }
-
- node.properties.push(prop);
-
- if (isPattern) {
- var position = this.state.start;
-
- if (firstRestLocation !== null) {
- this.unexpected(firstRestLocation, "Cannot have multiple rest elements when destructuring");
- } else if (this.eat(types.braceR)) {
- break;
- } else if (this.match(types.comma) && this.lookahead().type === types.braceR) {
- this.unexpected(position, "A trailing comma is not permitted after the rest element");
- } else {
- firstRestLocation = position;
- continue;
- }
- } else {
- continue;
- }
- }
-
- prop.method = false;
-
- if (isPattern || refShorthandDefaultPos) {
- startPos = this.state.start;
- startLoc = this.state.startLoc;
- }
-
- if (!isPattern) {
- isGenerator = this.eat(types.star);
- }
-
- if (!isPattern && this.isContextual("async")) {
- if (isGenerator) this.unexpected();
- var asyncId = this.parseIdentifier();
-
- if (this.match(types.colon) || this.match(types.parenL) || this.match(types.braceR) || this.match(types.eq) || this.match(types.comma)) {
- prop.key = asyncId;
- prop.computed = false;
- } else {
- _isAsync = true;
-
- if (this.match(types.star)) {
- this.expectPlugin("asyncGenerators");
- this.next();
- isGenerator = true;
- }
-
- this.parsePropertyName(prop);
- }
- } else {
- this.parsePropertyName(prop);
- }
-
- this.parseObjPropValue(prop, startPos, startLoc, isGenerator, _isAsync, isPattern, refShorthandDefaultPos);
- this.checkPropClash(prop, propHash);
-
- if (prop.shorthand) {
- this.addExtra(prop, "shorthand", true);
- }
-
- node.properties.push(prop);
- }
-
- if (firstRestLocation !== null) {
- this.unexpected(firstRestLocation, "The rest element has to be the last element when destructuring");
- }
-
- if (decorators.length) {
- this.raise(this.state.start, "You have trailing decorators with no property");
- }
-
- return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
- };
-
- _proto.isGetterOrSetterMethod = function isGetterOrSetterMethod(prop, isPattern) {
- return !isPattern && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.match(types.string) || // get "string"() {}
- this.match(types.num) || // get 1() {}
- this.match(types.bracketL) || // get ["string"]() {}
- this.match(types.name) || // get foo() {}
- !!this.state.type.keyword) // get debugger() {}
- ;
- }; // get methods aren't allowed to have any parameters
- // set methods must have exactly 1 parameter
-
-
- _proto.checkGetterSetterParamCount = function checkGetterSetterParamCount(method) {
- var paramCount = method.kind === "get" ? 0 : 1;
-
- if (method.params.length !== paramCount) {
- var start = method.start;
-
- if (method.kind === "get") {
- this.raise(start, "getter should have no params");
- } else {
- this.raise(start, "setter should have exactly one param");
- }
- }
- };
-
- _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern) {
- if (isAsync || isGenerator || this.match(types.parenL)) {
- if (isPattern) this.unexpected();
- prop.kind = "method";
- prop.method = true;
- return this.parseMethod(prop, isGenerator, isAsync,
- /* isConstructor */
- false, "ObjectMethod");
- }
-
- if (this.isGetterOrSetterMethod(prop, isPattern)) {
- if (isGenerator || isAsync) this.unexpected();
- prop.kind = prop.key.name;
- this.parsePropertyName(prop);
- this.parseMethod(prop,
- /* isGenerator */
- false,
- /* isAsync */
- false,
- /* isConstructor */
- false, "ObjectMethod");
- this.checkGetterSetterParamCount(prop);
- return prop;
- }
- };
-
- _proto.parseObjectProperty = function 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");
- }
- };
-
- _proto.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos) {
- var node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos);
- if (!node) this.unexpected(); // $FlowFixMe
-
- return node;
- };
-
- _proto.parsePropertyName = function parsePropertyName(prop) {
- if (this.eat(types.bracketL)) {
- prop.computed = true;
- prop.key = this.parseMaybeAssign();
- this.expect(types.bracketR);
- } else {
- var oldInPropertyName = this.state.inPropertyName;
- this.state.inPropertyName = true; // We check if it's valid for it to be a private name when we push it.
-
- prop.key = this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseMaybePrivateName();
-
- if (prop.key.type !== "PrivateName") {
- // ClassPrivateProperty is never computed, so we don't assign in that case.
- prop.computed = false;
- }
-
- this.state.inPropertyName = oldInPropertyName;
- }
-
- return prop.key;
- }; // Initialize empty function node.
-
-
- _proto.initFunction = function initFunction(node, isAsync) {
- node.id = null;
- node.generator = false;
- node.async = !!isAsync;
- }; // Parse object or class method.
-
-
- _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, type) {
- var oldInFunc = this.state.inFunction;
- var oldInMethod = this.state.inMethod;
- var oldInGenerator = this.state.inGenerator;
- this.state.inFunction = true;
- this.state.inMethod = node.kind || true;
- this.state.inGenerator = isGenerator;
- this.initFunction(node, isAsync);
- node.generator = !!isGenerator;
- var allowModifiers = isConstructor; // For TypeScript parameter properties
-
- this.parseFunctionParams(node, allowModifiers);
- this.parseFunctionBodyAndFinish(node, type);
- this.state.inFunction = oldInFunc;
- this.state.inMethod = oldInMethod;
- this.state.inGenerator = oldInGenerator;
- return node;
- }; // Parse arrow function expression.
- // If the parameters are provided, they will be converted to an
- // assignable list.
-
-
- _proto.parseArrowExpression = function parseArrowExpression(node, params, isAsync) {
- // if we got there, it's no more "yield in possible arrow parameters";
- // it's just "yield in arrow parameters"
- if (this.state.yieldInPossibleArrowParameters) {
- this.raise(this.state.yieldInPossibleArrowParameters.start, "yield is not allowed in the parameters of an arrow function" + " inside a generator");
- }
-
- var oldInFunc = this.state.inFunction;
- this.state.inFunction = true;
- this.initFunction(node, isAsync);
- if (params) this.setArrowFunctionParameters(node, params);
- var oldInGenerator = this.state.inGenerator;
- var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
- this.state.inGenerator = false;
- this.state.maybeInArrowParameters = false;
- this.parseFunctionBody(node, true);
- this.state.inGenerator = oldInGenerator;
- this.state.inFunction = oldInFunc;
- this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
- return this.finishNode(node, "ArrowFunctionExpression");
- };
-
- _proto.setArrowFunctionParameters = function setArrowFunctionParameters(node, params) {
- node.params = this.toAssignableList(params, true, "arrow function parameters");
- };
-
- _proto.isStrictBody = function isStrictBody(node) {
- var isBlockStatement = node.body.type === "BlockStatement";
-
- if (isBlockStatement && node.body.directives.length) {
- for (var _i4 = 0, _node$body$directives2 = node.body.directives; _i4 < _node$body$directives2.length; _i4++) {
- var directive = _node$body$directives2[_i4];
-
- if (directive.value.value === "use strict") {
- return true;
- }
- }
- }
-
- return false;
- };
-
- _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) {
- // $FlowIgnore (node is not bodiless if we get here)
- this.parseFunctionBody(node, allowExpressionBody);
- this.finishNode(node, type);
- }; // Parse function body and check parameters.
-
-
- _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression) {
- var isExpression = allowExpression && !this.match(types.braceL);
- var oldInParameters = this.state.inParameters;
- var oldInAsync = this.state.inAsync;
- this.state.inParameters = false;
- this.state.inAsync = node.async;
-
- if (isExpression) {
- node.body = this.parseMaybeAssign();
- } else {
- // Start a new scope with regard to labels and the `inGenerator`
- // flag (restore them to their old value afterwards).
- var oldInGen = this.state.inGenerator;
- var oldInFunc = this.state.inFunction;
- var oldLabels = this.state.labels;
- this.state.inGenerator = node.generator;
- this.state.inFunction = true;
- this.state.labels = [];
- node.body = this.parseBlock(true);
- this.state.inFunction = oldInFunc;
- this.state.inGenerator = oldInGen;
- this.state.labels = oldLabels;
- }
-
- this.state.inAsync = oldInAsync;
- this.checkFunctionNameAndParams(node, allowExpression);
- this.state.inParameters = oldInParameters;
- };
-
- _proto.checkFunctionNameAndParams = function checkFunctionNameAndParams(node, isArrowFunction) {
- // If this is a strict mode function, verify that argument names
- // are not repeated, and it does not try to bind the words `eval`
- // or `arguments`.
- var isStrict = this.isStrictBody(node); // Also check for arrow functions
-
- var checkLVal = this.state.strict || isStrict || isArrowFunction;
- var oldStrict = this.state.strict;
- if (isStrict) this.state.strict = isStrict;
-
- if (node.id) {
- this.checkReservedWord(node.id, node.start, true, true);
- }
-
- if (checkLVal) {
- var nameHash = Object.create(null);
-
- if (node.id) {
- this.checkLVal(node.id, true, undefined, "function name");
- }
-
- for (var _i6 = 0, _node$params2 = node.params; _i6 < _node$params2.length; _i6++) {
- var param = _node$params2[_i6];
-
- if (isStrict && param.type !== "Identifier") {
- this.raise(param.start, "Non-simple parameter in strict mode");
- }
-
- this.checkLVal(param, true, nameHash, "function parameter list");
- }
- }
-
- this.state.strict = oldStrict;
- }; // Parses a comma-separated list of expressions, and returns them as
- // an array. `close` is the token type that ends the list, and
- // `allowEmpty` can be turned on to allow subsequent commas with
- // nothing in between them to be parsed as `null` (which is needed
- // for array literals).
-
-
- _proto.parseExprList = function parseExprList(close, allowEmpty, refShorthandDefaultPos) {
- var elts = [];
- var 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;
- };
-
- _proto.parseExprListItem = function parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos, refTrailingCommaPos) {
- var elt;
-
- if (allowEmpty && this.match(types.comma)) {
- elt = null;
- } else if (this.match(types.ellipsis)) {
- elt = this.parseSpread(refShorthandDefaultPos);
-
- if (refTrailingCommaPos && this.match(types.comma)) {
- refTrailingCommaPos.start = this.state.start;
- }
- } else {
- elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos);
- }
-
- return elt;
- }; // Parse the next token as an identifier. If `liberal` is true (used
- // when parsing properties), it will also convert keywords into
- // identifiers.
-
-
- _proto.parseIdentifier = function parseIdentifier(liberal) {
- var node = this.startNode();
- var name = this.parseIdentifierName(node.start, liberal);
- node.name = name;
- node.loc.identifierName = name;
- return this.finishNode(node, "Identifier");
- };
-
- _proto.parseIdentifierName = function parseIdentifierName(pos, liberal) {
- if (!liberal) {
- this.checkReservedWord(this.state.value, this.state.start, !!this.state.type.keyword, false);
- }
-
- var name;
-
- if (this.match(types.name)) {
- name = this.state.value;
- } else if (this.state.type.keyword) {
- name = this.state.type.keyword;
- } else {
- throw this.unexpected();
- }
-
- if (!liberal && name === "await" && this.state.inAsync) {
- this.raise(pos, "invalid use of await inside of an async function");
- }
-
- this.next();
- return name;
- };
-
- _proto.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) {
- if (this.state.strict && (reservedWords.strict(word) || isBinding && reservedWords.strictBind(word))) {
- this.raise(startLoc, word + " is a reserved word in strict mode");
- }
-
- if (this.state.inGenerator && word === "yield") {
- this.raise(startLoc, "yield is a reserved word inside generator functions");
- }
-
- if (this.isReservedWord(word) || checkKeywords && this.isKeyword(word)) {
- this.raise(startLoc, word + " is a reserved word");
- }
- }; // Parses await expression inside async function.
-
-
- _proto.parseAwait = function parseAwait(node) {
- // istanbul ignore next: this condition is checked at the call site so won't be hit here
- if (!this.state.inAsync) {
- this.unexpected();
- }
-
- if (this.match(types.star)) {
- this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead.");
- }
-
- node.argument = this.parseMaybeUnary();
- return this.finishNode(node, "AwaitExpression");
- }; // Parses yield expression inside generator.
-
-
- _proto.parseYield = function parseYield() {
- var node = this.startNode();
-
- if (this.state.inParameters) {
- this.raise(node.start, "yield is not allowed in generator parameters");
- }
-
- if (this.state.maybeInArrowParameters && // We only set yieldInPossibleArrowParameters if we haven't already
- // found a possible invalid YieldExpression.
- !this.state.yieldInPossibleArrowParameters) {
- this.state.yieldInPossibleArrowParameters = node;
- }
-
- this.next();
-
- if (this.match(types.semi) || this.canInsertSemicolon() || !this.match(types.star) && !this.state.type.startsExpr) {
- node.delegate = false;
- node.argument = null;
- } else {
- node.delegate = this.eat(types.star);
- node.argument = this.parseMaybeAssign();
- }
-
- return this.finishNode(node, "YieldExpression");
- };
-
- return ExpressionParser;
-}(LValParser);
-
-/* eslint max-len: 0 */
-var empty = [];
-var loopLabel = {
- kind: "loop"
-};
-var switchLabel = {
- kind: "switch"
-};
-
-var StatementParser =
-/*#__PURE__*/
-function (_ExpressionParser) {
- _inheritsLoose(StatementParser, _ExpressionParser);
-
- function StatementParser() {
- return _ExpressionParser.apply(this, arguments) || this;
- }
-
- var _proto = StatementParser.prototype;
-
- // ### Statement parsing
- // Parse a program. Initializes the parser, reads any number of
- // statements, and wraps them in a Program node. Optionally takes a
- // `program` argument. If present, the statements will be appended
- // to its body instead of creating a new node.
- _proto.parseTopLevel = function parseTopLevel(file, program) {
- program.sourceType = this.options.sourceType;
- this.parseBlockBody(program, true, true, types.eof);
- 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");
- }; // TODO
-
-
- _proto.stmtToDirective = function stmtToDirective(stmt) {
- var expr = stmt.expression;
- var directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);
- var directive = this.startNodeAt(stmt.start, stmt.loc.start);
- var raw = this.input.slice(expr.start, expr.end);
- var val = directiveLiteral.value = raw.slice(1, -1); // remove quotes
-
- 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);
- }; // Parse a single statement.
- //
- // If expecting a statement and finding a slash operator, parse a
- // regular expression literal. This is to handle cases like
- // `if (foo) /blah/.exec(foo)`, where looking at the previous token
- // does not help.
-
-
- _proto.parseStatement = function parseStatement(declaration, topLevel) {
- if (this.match(types.at)) {
- this.parseDecorators(true);
- }
-
- return this.parseStatementContent(declaration, topLevel);
- };
-
- _proto.parseStatementContent = function parseStatementContent(declaration, topLevel) {
- var starttype = this.state.type;
- var node = this.startNode(); // Most types of statements are recognized by the keyword they
- // start with. Many are trivial to parse, some require a bit of
- // complexity.
-
- switch (starttype) {
- case types._break:
- case types._continue:
- // $FlowFixMe
- 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 (!declaration) this.unexpected();
- return this.parseFunctionStatement(node);
-
- case types._class:
- if (!declaration) 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._let:
- case types._const:
- if (!declaration) this.unexpected();
- // NOTE: falls through to _var
-
- case types._var:
- return this.parseVarStatement(node, starttype);
-
- 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:
- {
- var 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();
- var result;
-
- if (starttype == types._import) {
- result = this.parseImport(node);
- } else {
- result = this.parseExport(node);
- }
-
- this.assertModuleNodeAllowed(node);
- return result;
- }
-
- case types.name:
- if (this.state.value === "async") {
- // peek ahead and see if next token is a function
- var state = this.state.clone();
- this.next();
-
- if (this.match(types._function) && !this.canInsertSemicolon()) {
- this.expect(types._function);
- return this.parseFunction(node, true, false, true);
- } else {
- this.state = state;
- }
- }
-
- } // If the statement does not start with a statement keyword or a
- // brace, it's an ExpressionStatement or LabeledStatement. We
- // simply start parsing an expression, and afterwards, if the
- // next token is a colon and the expression was a simple
- // Identifier node, we switch to interpreting it as a label.
-
-
- var maybeName = this.state.value;
- var expr = this.parseExpression();
-
- if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) {
- return this.parseLabeledStatement(node, maybeName, expr);
- } else {
- return this.parseExpressionStatement(node, expr);
- }
- };
-
- _proto.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) {
- if (!this.options.allowImportExportEverywhere && !this.inModule) {
- this.raise(node.start, `'import' and 'export' may appear only with 'sourceType: "module"'`);
- }
- };
-
- _proto.takeDecorators = function takeDecorators(node) {
- var 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] = [];
- }
- };
-
- _proto.parseDecorators = function parseDecorators(allowExport) {
- if (this.hasPlugin("decorators2")) {
- allowExport = false;
- }
-
- var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
-
- while (this.match(types.at)) {
- var decorator = this.parseDecorator();
- currentContextDecorators.push(decorator);
- }
-
- if (this.match(types._export)) {
- if (allowExport) {
- return;
- } else {
- this.raise(this.state.start, "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead");
- }
- }
-
- if (!this.match(types._class)) {
- this.raise(this.state.start, "Leading decorators must be attached to a class declaration");
- }
- };
-
- _proto.parseDecorator = function parseDecorator() {
- this.expectOnePlugin(["decorators", "decorators2"]);
- var node = this.startNode();
- this.next();
-
- if (this.hasPlugin("decorators2")) {
- var startPos = this.state.start;
- var startLoc = this.state.startLoc;
- var expr = this.parseIdentifier(false);
-
- while (this.eat(types.dot)) {
- var _node = this.startNodeAt(startPos, startLoc);
-
- _node.object = expr;
- _node.property = this.parseIdentifier(true);
- _node.computed = false;
- expr = this.finishNode(_node, "MemberExpression");
- }
-
- if (this.eat(types.parenL)) {
- var _node2 = this.startNodeAt(startPos, startLoc);
-
- _node2.callee = expr; // Every time a decorator class expression is evaluated, a new empty array is pushed onto the stack
- // So that the decorators of any nested class expressions will be dealt with separately
-
- this.state.decoratorStack.push([]);
- _node2.arguments = this.parseCallExpressionArguments(types.parenR, false);
- this.state.decoratorStack.pop();
- expr = this.finishNode(_node2, "CallExpression");
- this.toReferencedList(expr.arguments);
- }
-
- node.expression = expr;
- } else {
- node.expression = this.parseMaybeAssign();
- }
-
- return this.finishNode(node, "Decorator");
- };
-
- _proto.parseBreakContinueStatement = function parseBreakContinueStatement(node, keyword) {
- var isBreak = keyword === "break";
- this.next();
-
- if (this.isLineTerminator()) {
- node.label = null;
- } else if (!this.match(types.name)) {
- this.unexpected();
- } else {
- node.label = this.parseIdentifier();
- this.semicolon();
- } // Verify that there is an actual destination to break or
- // continue to.
-
-
- var i;
-
- for (i = 0; i < this.state.labels.length; ++i) {
- var 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);
- }
-
- return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
- };
-
- _proto.parseDebuggerStatement = function parseDebuggerStatement(node) {
- this.next();
- this.semicolon();
- return this.finishNode(node, "DebuggerStatement");
- };
-
- _proto.parseDoStatement = function parseDoStatement(node) {
- this.next();
- this.state.labels.push(loopLabel);
- node.body = this.parseStatement(false);
- this.state.labels.pop();
- this.expect(types._while);
- node.test = this.parseParenExpression();
- this.eat(types.semi);
- return this.finishNode(node, "DoWhileStatement");
- }; // Disambiguating between a `for` and a `for`/`in` or `for`/`of`
- // loop is non-trivial. Basically, we have to parse the init `var`
- // statement or expression, disallowing the `in` operator (see
- // the second parameter to `parseExpression`), and then check
- // whether the next token is `in` or `of`. When there is no init
- // part (semicolon immediately after the opening parenthesis), it
- // is a regular `for` loop.
-
-
- _proto.parseForStatement = function parseForStatement(node) {
- this.next();
- this.state.labels.push(loopLabel);
- var forAwait = false;
-
- if (this.state.inAsync && this.isContextual("await")) {
- this.expectPlugin("asyncGenerators");
- forAwait = true;
- this.next();
- }
-
- this.expect(types.parenL);
-
- if (this.match(types.semi)) {
- if (forAwait) {
- this.unexpected();
- }
-
- return this.parseFor(node, null);
- }
-
- if (this.match(types._var) || this.match(types._let) || this.match(types._const)) {
- var _init = this.startNode();
-
- var varKind = this.state.type;
- this.next();
- this.parseVar(_init, true, varKind);
- this.finishNode(_init, "VariableDeclaration");
-
- if (this.match(types._in) || this.isContextual("of")) {
- if (_init.declarations.length === 1 && !_init.declarations[0].init) {
- return this.parseForIn(node, _init, forAwait);
- }
- }
-
- if (forAwait) {
- this.unexpected();
- }
-
- return this.parseFor(node, _init);
- }
-
- var refShorthandDefaultPos = {
- start: 0
- };
- var init = this.parseExpression(true, refShorthandDefaultPos);
-
- if (this.match(types._in) || this.isContextual("of")) {
- var 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, forAwait);
- } else if (refShorthandDefaultPos.start) {
- this.unexpected(refShorthandDefaultPos.start);
- }
-
- if (forAwait) {
- this.unexpected();
- }
-
- return this.parseFor(node, init);
- };
-
- _proto.parseFunctionStatement = function parseFunctionStatement(node) {
- this.next();
- return this.parseFunction(node, true);
- };
-
- _proto.parseIfStatement = function parseIfStatement(node) {
- this.next();
- node.test = this.parseParenExpression();
- node.consequent = this.parseStatement(false);
- node.alternate = this.eat(types._else) ? this.parseStatement(false) : null;
- return this.finishNode(node, "IfStatement");
- };
-
- _proto.parseReturnStatement = function parseReturnStatement(node) {
- if (!this.state.inFunction && !this.options.allowReturnOutsideFunction) {
- this.raise(this.state.start, "'return' outside of function");
- }
-
- this.next(); // In `return` (and `break`/`continue`), the keywords with
- // optional arguments, we eagerly look for a semicolon or the
- // possibility to insert one.
-
- if (this.isLineTerminator()) {
- node.argument = null;
- } else {
- node.argument = this.parseExpression();
- this.semicolon();
- }
-
- return this.finishNode(node, "ReturnStatement");
- };
-
- _proto.parseSwitchStatement = function parseSwitchStatement(node) {
- this.next();
- node.discriminant = this.parseParenExpression();
- var cases = node.cases = [];
- this.expect(types.braceL);
- this.state.labels.push(switchLabel); // Statements under must be grouped (by label) in SwitchCase
- // nodes. `cur` is used to keep the node that we are currently
- // adding statements to.
-
- var cur;
-
- for (var sawDefault; !this.match(types.braceR);) {
- if (this.match(types._case) || this.match(types._default)) {
- var 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(true));
- } else {
- this.unexpected();
- }
- }
- }
-
- if (cur) this.finishNode(cur, "SwitchCase");
- this.next(); // Closing brace
-
- this.state.labels.pop();
- return this.finishNode(node, "SwitchStatement");
- };
-
- _proto.parseThrowStatement = function 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");
- };
-
- _proto.parseTryStatement = function parseTryStatement(node) {
- this.next();
- node.block = this.parseBlock();
- node.handler = null;
-
- if (this.match(types._catch)) {
- var clause = this.startNode();
- this.next();
-
- if (this.match(types.parenL)) {
- this.expect(types.parenL);
- clause.param = this.parseBindingAtom();
- var clashes = Object.create(null);
- this.checkLVal(clause.param, true, clashes, "catch clause");
- this.expect(types.parenR);
- } else {
- this.expectPlugin("optionalCatchBinding");
- clause.param = null;
- }
-
- clause.body = this.parseBlock();
- node.handler = this.finishNode(clause, "CatchClause");
- }
-
- node.guardedHandlers = empty;
- 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");
- };
-
- _proto.parseVarStatement = function parseVarStatement(node, kind) {
- this.next();
- this.parseVar(node, false, kind);
- this.semicolon();
- return this.finishNode(node, "VariableDeclaration");
- };
-
- _proto.parseWhileStatement = function parseWhileStatement(node) {
- this.next();
- node.test = this.parseParenExpression();
- this.state.labels.push(loopLabel);
- node.body = this.parseStatement(false);
- this.state.labels.pop();
- return this.finishNode(node, "WhileStatement");
- };
-
- _proto.parseWithStatement = function parseWithStatement(node) {
- if (this.state.strict) {
- this.raise(this.state.start, "'with' in strict mode");
- }
-
- this.next();
- node.object = this.parseParenExpression();
- node.body = this.parseStatement(false);
- return this.finishNode(node, "WithStatement");
- };
-
- _proto.parseEmptyStatement = function parseEmptyStatement(node) {
- this.next();
- return this.finishNode(node, "EmptyStatement");
- };
-
- _proto.parseLabeledStatement = function parseLabeledStatement(node, maybeName, expr) {
- for (var _i2 = 0, _state$labels2 = this.state.labels; _i2 < _state$labels2.length; _i2++) {
- var label = _state$labels2[_i2];
-
- if (label.name === maybeName) {
- this.raise(expr.start, `Label '${maybeName}' is already declared`);
- }
- }
-
- var kind = this.state.type.isLoop ? "loop" : this.match(types._switch) ? "switch" : null;
-
- for (var i = this.state.labels.length - 1; i >= 0; i--) {
- var _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(true);
-
- if (node.body.type == "ClassDeclaration" || node.body.type == "VariableDeclaration" && node.body.kind !== "var" || node.body.type == "FunctionDeclaration" && (this.state.strict || node.body.generator || node.body.async)) {
- this.raise(node.body.start, "Invalid labeled declaration");
- }
-
- this.state.labels.pop();
- node.label = expr;
- return this.finishNode(node, "LabeledStatement");
- };
-
- _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) {
- node.expression = expr;
- this.semicolon();
- return this.finishNode(node, "ExpressionStatement");
- }; // Parse a semicolon-enclosed block of statements, handling `"use
- // strict"` declarations when `allowStrict` is true (used for
- // function bodies).
-
-
- _proto.parseBlock = function parseBlock(allowDirectives) {
- var node = this.startNode();
- this.expect(types.braceL);
- this.parseBlockBody(node, allowDirectives, false, types.braceR);
- return this.finishNode(node, "BlockStatement");
- };
-
- _proto.isValidDirective = function isValidDirective(stmt) {
- return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
- };
-
- _proto.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end) {
- var body = node.body = [];
- var directives = node.directives = [];
- this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end);
- }; // Undefined directives means that directives are not allowed.
-
-
- _proto.parseBlockOrModuleBlockBody = function parseBlockOrModuleBlockBody(body, directives, topLevel, end) {
- var parsedNonDirective = false;
- var oldStrict;
- var octalPosition;
-
- while (!this.eat(end)) {
- if (!parsedNonDirective && this.state.containsOctal && !octalPosition) {
- octalPosition = this.state.octalPosition;
- }
-
- var stmt = this.parseStatement(true, topLevel);
-
- if (directives && !parsedNonDirective && this.isValidDirective(stmt)) {
- var 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);
- }
- }; // Parse a regular `for` loop. The disambiguation code in
- // `parseStatement` will already have parsed the init statement or
- // expression.
-
-
- _proto.parseFor = function 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.parseStatement(false);
- this.state.labels.pop();
- return this.finishNode(node, "ForStatement");
- }; // Parse a `for`/`in` and `for`/`of` loop, which are almost
- // same from parser's perspective.
-
-
- _proto.parseForIn = function parseForIn(node, init, forAwait) {
- var type = this.match(types._in) ? "ForInStatement" : "ForOfStatement";
-
- if (forAwait) {
- this.eatContextual("of");
- } else {
- this.next();
- }
-
- if (type === "ForOfStatement") {
- node.await = !!forAwait;
- }
-
- node.left = init;
- node.right = this.parseExpression();
- this.expect(types.parenR);
- node.body = this.parseStatement(false);
- this.state.labels.pop();
- return this.finishNode(node, type);
- }; // Parse a list of variable declarations.
-
-
- _proto.parseVar = function parseVar(node, isFor, kind) {
- var declarations = node.declarations = []; // $FlowFixMe
-
- node.kind = kind.keyword;
-
- for (;;) {
- var decl = this.startNode();
- this.parseVarHead(decl);
-
- if (this.eat(types.eq)) {
- decl.init = this.parseMaybeAssign(isFor);
- } else {
- if (kind === types._const && !(this.match(types._in) || this.isContextual("of"))) {
- // `const` with no initializer is allowed in TypeScript. It could be a declaration `const x: number;`.
- if (!this.hasPlugin("typescript")) {
- 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;
- };
-
- _proto.parseVarHead = function parseVarHead(decl) {
- decl.id = this.parseBindingAtom();
- this.checkLVal(decl.id, true, undefined, "variable declaration");
- }; // Parse a function declaration or literal (depending on the
- // `isStatement` parameter).
-
-
- _proto.parseFunction = function parseFunction(node, isStatement, allowExpressionBody, isAsync, optionalId) {
- var oldInFunc = this.state.inFunction;
- var oldInMethod = this.state.inMethod;
- var oldInGenerator = this.state.inGenerator;
- this.state.inFunction = true;
- this.state.inMethod = false;
- this.initFunction(node, isAsync);
-
- if (this.match(types.star)) {
- if (node.async) {
- this.expectPlugin("asyncGenerators");
- }
-
- node.generator = true;
- this.next();
- }
-
- if (isStatement && !optionalId && !this.match(types.name) && !this.match(types._yield)) {
- this.unexpected();
- } // When parsing function expression, the binding identifier is parsed
- // according to the rules inside the function.
- // e.g. (function* yield() {}) is invalid because "yield" is disallowed in
- // generators.
- // This isn't the case with function declarations: function* yield() {} is
- // valid because yield is parsed as if it was outside the generator.
- // Therefore, this.state.inGenerator is set before or after parsing the
- // function id according to the "isStatement" parameter.
-
-
- if (!isStatement) this.state.inGenerator = node.generator;
-
- if (this.match(types.name) || this.match(types._yield)) {
- node.id = this.parseBindingIdentifier();
- }
-
- if (isStatement) this.state.inGenerator = node.generator;
- this.parseFunctionParams(node);
- this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression", allowExpressionBody);
- this.state.inFunction = oldInFunc;
- this.state.inMethod = oldInMethod;
- this.state.inGenerator = oldInGenerator;
- return node;
- };
-
- _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) {
- var oldInParameters = this.state.inParameters;
- this.state.inParameters = true;
- this.expect(types.parenL);
- node.params = this.parseBindingList(types.parenR,
- /* allowEmpty */
- false, allowModifiers);
- this.state.inParameters = oldInParameters;
- }; // Parse a class declaration or literal (depending on the
- // `isStatement` parameter).
-
-
- _proto.parseClass = function parseClass(node, isStatement, optionalId) {
- this.next();
- this.takeDecorators(node);
- this.parseClassId(node, isStatement, optionalId);
- this.parseClassSuper(node);
- this.parseClassBody(node);
- return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
- };
-
- _proto.isClassProperty = function isClassProperty() {
- return this.match(types.eq) || this.match(types.semi) || this.match(types.braceR);
- };
-
- _proto.isClassMethod = function isClassMethod() {
- return this.match(types.parenL);
- };
-
- _proto.isNonstaticConstructor = function isNonstaticConstructor(method) {
- return !method.computed && !method.static && (method.key.name === "constructor" || // Identifier
- method.key.value === "constructor") // String literal
- ;
- };
-
- _proto.parseClassBody = function parseClassBody(node) {
- // class bodies are implicitly strict
- var oldStrict = this.state.strict;
- this.state.strict = true;
- this.state.classLevel++;
- var state = {
- hadConstructor: false
- };
- var decorators = [];
- var classBody = this.startNode();
- classBody.body = [];
- this.expect(types.braceL);
-
- 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;
- }
-
- var member = this.startNode(); // steal the decorators if there are any
-
- if (decorators.length) {
- member.decorators = decorators;
- this.resetStartLocationFromNode(member, decorators[0]);
- decorators = [];
- }
-
- this.parseClassMember(classBody, member, state);
-
- if (this.hasPlugin("decorators2") && ["method", "get", "set"].indexOf(member.kind) === -1 && member.decorators && member.decorators.length > 0) {
- this.raise(member.start, "Stage 2 decorators may only be used with a class or a class method");
- }
- }
-
- if (decorators.length) {
- this.raise(this.state.start, "You have trailing decorators with no method");
- }
-
- node.body = this.finishNode(classBody, "ClassBody");
- this.state.classLevel--;
- this.state.strict = oldStrict;
- };
-
- _proto.parseClassMember = function parseClassMember(classBody, member, state) {
- var isStatic = false;
-
- if (this.match(types.name) && this.state.value === "static") {
- var key = this.parseIdentifier(true); // eats 'static'
-
- if (this.isClassMethod()) {
- var method = member; // a method named 'static'
-
- method.kind = "method";
- method.computed = false;
- method.key = key;
- method.static = false;
- this.pushClassMethod(classBody, method, false, false,
- /* isConstructor */
- false);
- return;
- } else if (this.isClassProperty()) {
- var prop = member; // a property named 'static'
-
- prop.computed = false;
- prop.key = key;
- prop.static = false;
- classBody.body.push(this.parseClassProperty(prop));
- return;
- } // otherwise something static
-
-
- isStatic = true;
- }
-
- this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
- };
-
- _proto.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
- var publicMethod = member;
- var privateMethod = member;
- var publicProp = member;
- var privateProp = member;
- var method = publicMethod;
- var publicMember = publicMethod;
- member.static = isStatic;
-
- if (this.eat(types.star)) {
- // a generator
- method.kind = "method";
- this.parseClassPropertyName(method);
-
- if (method.key.type === "PrivateName") {
- // Private generator method
- 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,
- /* isConstructor */
- false);
- return;
- }
-
- var key = this.parseClassPropertyName(member);
- var isPrivate = key.type === "PrivateName"; // Check the key is not a computed expression or string literal.
-
- var isSimple = key.type === "Identifier";
- this.parsePostMemberNameModifiers(publicMember);
-
- if (this.isClassMethod()) {
- method.kind = "method";
-
- if (isPrivate) {
- this.pushClassPrivateMethod(classBody, privateMethod, false, false);
- return;
- } // a normal method
-
-
- var isConstructor = this.isNonstaticConstructor(publicMethod);
-
- if (isConstructor) {
- publicMethod.kind = "constructor";
-
- if (publicMethod.decorators) {
- this.raise(publicMethod.start, "You can't attach decorators to a class constructor");
- } // TypeScript allows multiple overloaded constructor declarations.
-
-
- if (state.hadConstructor && !this.hasPlugin("typescript")) {
- this.raise(key.start, "Duplicate constructor in the same class");
- }
-
- state.hadConstructor = true;
- }
-
- this.pushClassMethod(classBody, publicMethod, false, false, isConstructor);
- } else if (this.isClassProperty()) {
- if (isPrivate) {
- this.pushClassPrivateProperty(classBody, privateProp);
- } else {
- this.pushClassProperty(classBody, publicProp);
- }
- } else if (isSimple && key.name === "async" && !this.isLineTerminator()) {
- // an async method
- var isGenerator = this.match(types.star);
-
- if (isGenerator) {
- this.expectPlugin("asyncGenerators");
- this.next();
- }
-
- method.kind = "method"; // The so-called parsed name would have been "async": get the real name.
-
- this.parseClassPropertyName(method);
-
- if (method.key.type === "PrivateName") {
- // private async method
- 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,
- /* isConstructor */
- false);
- }
- } else if (isSimple && (key.name === "get" || key.name === "set") && !(this.isLineTerminator() && this.match(types.star))) {
- // `get\n*` is an uninitialized property named 'get' followed by a generator.
- // a getter or setter
- method.kind = key.name; // The so-called parsed name would have been "get/set": get the real name.
-
- this.parseClassPropertyName(publicMethod);
-
- if (method.key.type === "PrivateName") {
- // private getter/setter
- 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,
- /* isConstructor */
- false);
- }
-
- this.checkGetterSetterParamCount(publicMethod);
- } else if (this.isLineTerminator()) {
- // an uninitialized class property (due to ASI, since we don't otherwise recognize the next token)
- if (isPrivate) {
- this.pushClassPrivateProperty(classBody, privateProp);
- } else {
- this.pushClassProperty(classBody, publicProp);
- }
- } else {
- this.unexpected();
- }
- };
-
- _proto.parseClassPropertyName = function parseClassPropertyName(member) {
- var 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;
- };
-
- _proto.pushClassProperty = function pushClassProperty(classBody, prop) {
- // This only affects properties, not methods.
- 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));
- };
-
- _proto.pushClassPrivateProperty = function pushClassPrivateProperty(classBody, prop) {
- this.expectPlugin("classPrivateProperties", prop.key.start);
- classBody.body.push(this.parseClassPrivateProperty(prop));
- };
-
- _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) {
- classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, "ClassMethod"));
- };
-
- _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
- this.expectPlugin("classPrivateMethods", method.key.start);
- classBody.body.push(this.parseMethod(method, isGenerator, isAsync,
- /* isConstructor */
- false, "ClassPrivateMethod"));
- }; // Overridden in typescript.js
-
-
- _proto.parsePostMemberNameModifiers = function parsePostMemberNameModifiers( // eslint-disable-next-line no-unused-vars
- methodOrProp) {}; // Overridden in typescript.js
-
-
- _proto.parseAccessModifier = function parseAccessModifier() {
- return undefined;
- };
-
- _proto.parseClassPrivateProperty = function parseClassPrivateProperty(node) {
- this.state.inClassProperty = true;
- node.value = this.eat(types.eq) ? this.parseMaybeAssign() : null;
- this.semicolon();
- this.state.inClassProperty = false;
- return this.finishNode(node, "ClassPrivateProperty");
- };
-
- _proto.parseClassProperty = function parseClassProperty(node) {
- if (!node.typeAnnotation) {
- this.expectPlugin("classProperties");
- }
-
- this.state.inClassProperty = true;
-
- if (this.match(types.eq)) {
- this.expectPlugin("classProperties");
- this.next();
- node.value = this.parseMaybeAssign();
- } else {
- node.value = null;
- }
-
- this.semicolon();
- this.state.inClassProperty = false;
- return this.finishNode(node, "ClassProperty");
- };
-
- _proto.parseClassId = function parseClassId(node, isStatement, optionalId) {
- if (this.match(types.name)) {
- node.id = this.parseIdentifier();
- } else {
- if (optionalId || !isStatement) {
- node.id = null;
- } else {
- this.unexpected(null, "A class name is required");
- }
- }
- };
-
- _proto.parseClassSuper = function parseClassSuper(node) {
- node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null;
- }; // Parses module export declaration.
- // TODO: better type. Node is an N.AnyExport.
-
-
- _proto.parseExport = function parseExport(node) {
- // export * from '...'
- if (this.shouldParseExportStar()) {
- this.parseExportStar(node);
- if (node.type === "ExportAllDeclaration") return node;
- } else if (this.isExportDefaultSpecifier()) {
- this.expectPlugin("exportDefaultFrom");
- var specifier = this.startNode();
- specifier.exported = this.parseIdentifier(true);
- var specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
- node.specifiers = specifiers;
-
- if (this.match(types.comma) && this.lookahead().type === types.star) {
- this.expect(types.comma);
-
- var _specifier = this.startNode();
-
- this.expect(types.star);
- this.expectContextual("as");
- _specifier.exported = this.parseIdentifier();
- specifiers.push(this.finishNode(_specifier, "ExportNamespaceSpecifier"));
- } else {
- this.parseExportSpecifiersMaybe(node);
- }
-
- this.parseExportFrom(node, true);
- } else if (this.eat(types._default)) {
- // export default ...
- node.declaration = this.parseExportDefaultExpression();
- this.checkExport(node, true, true);
- return this.finishNode(node, "ExportDefaultDeclaration");
- } else if (this.shouldParseExportDeclaration()) {
- if (this.isContextual("async")) {
- var next = this.lookahead(); // export async;
-
- if (next.type !== types._function) {
- this.unexpected(next.start, `Unexpected token, expected "function"`);
- }
- }
-
- node.specifiers = [];
- node.source = null;
- node.declaration = this.parseExportDeclaration(node);
- } else {
- // export { x, y as z } [from '...']
- node.declaration = null;
- node.specifiers = this.parseExportSpecifiers();
- this.parseExportFrom(node);
- }
-
- this.checkExport(node, true);
- return this.finishNode(node, "ExportNamedDeclaration");
- };
-
- _proto.parseExportDefaultExpression = function parseExportDefaultExpression() {
- var expr = this.startNode();
-
- if (this.eat(types._function)) {
- return this.parseFunction(expr, true, false, false, true);
- } else if (this.isContextual("async") && this.lookahead().type === types._function) {
- // async function declaration
- this.eatContextual("async");
- this.eat(types._function);
- return this.parseFunction(expr, true, false, true, true);
- } else if (this.match(types._class)) {
- return this.parseClass(expr, true, true);
- } else {
- var res = this.parseMaybeAssign();
- this.semicolon();
- return res;
- }
- }; // eslint-disable-next-line no-unused-vars
-
-
- _proto.parseExportDeclaration = function parseExportDeclaration(node) {
- return this.parseStatement(true);
- };
-
- _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() {
- if (this.match(types.name)) {
- return this.state.value !== "async";
- }
-
- if (!this.match(types._default)) {
- return false;
- }
-
- var lookahead = this.lookahead();
- return lookahead.type === types.comma || lookahead.type === types.name && lookahead.value === "from";
- };
-
- _proto.parseExportSpecifiersMaybe = function parseExportSpecifiersMaybe(node) {
- if (this.eat(types.comma)) {
- node.specifiers = node.specifiers.concat(this.parseExportSpecifiers());
- }
- };
-
- _proto.parseExportFrom = function parseExportFrom(node, expect) {
- if (this.eatContextual("from")) {
- node.source = this.match(types.string) ? this.parseExprAtom() : this.unexpected();
- this.checkExport(node);
- } else {
- if (expect) {
- this.unexpected();
- } else {
- node.source = null;
- }
- }
-
- this.semicolon();
- };
-
- _proto.shouldParseExportStar = function shouldParseExportStar() {
- return this.match(types.star);
- };
-
- _proto.parseExportStar = function parseExportStar(node) {
- this.expect(types.star);
-
- if (this.isContextual("as")) {
- this.parseExportNamespace(node);
- } else {
- this.parseExportFrom(node, true);
- this.finishNode(node, "ExportAllDeclaration");
- }
- };
-
- _proto.parseExportNamespace = function parseExportNamespace(node) {
- this.expectPlugin("exportNamespaceFrom");
- var specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc);
- this.next();
- specifier.exported = this.parseIdentifier(true);
- node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")];
- this.parseExportSpecifiersMaybe(node);
- this.parseExportFrom(node, true);
- };
-
- _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() {
- return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "let" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isContextual("async") || this.match(types.at) && this.expectPlugin("decorators2");
- };
-
- _proto.checkExport = function checkExport(node, checkNames, isDefault) {
- if (checkNames) {
- // Check for duplicate exports
- if (isDefault) {
- // Default exports
- this.checkDuplicateExports(node, "default");
- } else if (node.specifiers && node.specifiers.length) {
- // Named exports
- for (var _i4 = 0, _node$specifiers2 = node.specifiers; _i4 < _node$specifiers2.length; _i4++) {
- var specifier = _node$specifiers2[_i4];
- this.checkDuplicateExports(specifier, specifier.exported.name);
- }
- } else if (node.declaration) {
- // Exported declarations
- if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
- this.checkDuplicateExports(node, node.declaration.id.name);
- } else if (node.declaration.type === "VariableDeclaration") {
- for (var _i6 = 0, _node$declaration$dec2 = node.declaration.declarations; _i6 < _node$declaration$dec2.length; _i6++) {
- var declaration = _node$declaration$dec2[_i6];
- this.checkDeclaration(declaration.id);
- }
- }
- }
- }
-
- var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
-
- if (currentContextDecorators.length) {
- var 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);
- }
- };
-
- _proto.checkDeclaration = function checkDeclaration(node) {
- if (node.type === "ObjectPattern") {
- for (var _i8 = 0, _node$properties2 = node.properties; _i8 < _node$properties2.length; _i8++) {
- var prop = _node$properties2[_i8];
- this.checkDeclaration(prop);
- }
- } else if (node.type === "ArrayPattern") {
- for (var _i10 = 0, _node$elements2 = node.elements; _i10 < _node$elements2.length; _i10++) {
- var elem = _node$elements2[_i10];
-
- 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 === "Identifier") {
- this.checkDuplicateExports(node, node.name);
- }
- };
-
- _proto.checkDuplicateExports = function checkDuplicateExports(node, name) {
- if (this.state.exportedIdentifiers.indexOf(name) > -1) {
- this.raiseDuplicateExportError(node, name);
- }
-
- this.state.exportedIdentifiers.push(name);
- };
-
- _proto.raiseDuplicateExportError = function raiseDuplicateExportError(node, name) {
- throw this.raise(node.start, name === "default" ? "Only one default export allowed per module." : `\`${name}\` has already been exported. Exported identifiers must be unique.`);
- }; // Parses a comma-separated list of module exports.
-
-
- _proto.parseExportSpecifiers = function parseExportSpecifiers() {
- var nodes = [];
- var first = true;
- var needsFrom; // export { x, y as z } [from '...']
-
- this.expect(types.braceL);
-
- while (!this.eat(types.braceR)) {
- if (first) {
- first = false;
- } else {
- this.expect(types.comma);
- if (this.eat(types.braceR)) break;
- }
-
- var isDefault = this.match(types._default);
- if (isDefault && !needsFrom) needsFrom = true;
- var node = this.startNode();
- node.local = this.parseIdentifier(isDefault);
- node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone();
- nodes.push(this.finishNode(node, "ExportSpecifier"));
- } // https://github.com/ember-cli/ember-cli/pull/3739
-
-
- if (needsFrom && !this.isContextual("from")) {
- this.unexpected();
- }
-
- return nodes;
- }; // Parses import declaration.
-
-
- _proto.parseImport = function parseImport(node) {
- // import '...'
- if (this.match(types.string)) {
- node.specifiers = [];
- node.source = this.parseExprAtom();
- } else {
- node.specifiers = [];
- this.parseImportSpecifiers(node);
- this.expectContextual("from");
- node.source = this.match(types.string) ? this.parseExprAtom() : this.unexpected();
- }
-
- this.semicolon();
- return this.finishNode(node, "ImportDeclaration");
- }; // eslint-disable-next-line no-unused-vars
-
-
- _proto.shouldParseDefaultImport = function shouldParseDefaultImport(node) {
- return this.match(types.name);
- };
-
- _proto.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) {
- specifier.local = this.parseIdentifier();
- this.checkLVal(specifier.local, true, undefined, contextDescription);
- node.specifiers.push(this.finishNode(specifier, type));
- }; // Parses a comma-separated list of module imports.
-
-
- _proto.parseImportSpecifiers = function parseImportSpecifiers(node) {
- var first = true;
-
- if (this.shouldParseDefaultImport(node)) {
- // import defaultObj, { x, y as z } from '...'
- this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier");
- if (!this.eat(types.comma)) return;
- }
-
- if (this.match(types.star)) {
- var specifier = this.startNode();
- this.next();
- this.expectContextual("as");
- this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier");
- return;
- }
-
- this.expect(types.braceL);
-
- while (!this.eat(types.braceR)) {
- if (first) {
- first = false;
- } else {
- // Detect an attempt to deep destructure
- 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);
- }
- };
-
- _proto.parseImportSpecifier = function parseImportSpecifier(node) {
- var 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, true, undefined, "import specifier");
- node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
- };
-
- return StatementParser;
-}(ExpressionParser);
-
-var plugins = {};
-
-var Parser =
-/*#__PURE__*/
-function (_StatementParser) {
- _inheritsLoose(Parser, _StatementParser);
-
- function Parser(options, input) {
- var _this;
-
- options = getOptions(options);
- _this = _StatementParser.call(this, options, input) || this;
- _this.options = options;
- _this.inModule = _this.options.sourceType === "module";
- _this.input = input;
- _this.plugins = pluginsMap(_this.options.plugins);
- _this.filename = options.sourceFilename; // If enabled, skip leading hashbang line.
-
- if (_this.state.pos === 0 && _this.input[0] === "#" && _this.input[1] === "!") {
- _this.skipLineComment(2);
- }
-
- return _this;
- }
-
- var _proto = Parser.prototype;
-
- _proto.parse = function parse() {
- var file = this.startNode();
- var program = this.startNode();
- this.nextToken();
- return this.parseTopLevel(file, program);
- };
-
- return Parser;
-}(StatementParser);
-
-function pluginsMap(pluginList) {
- var pluginMap = {};
-
- for (var _i2 = 0; _i2 < pluginList.length; _i2++) {
- var _name = pluginList[_i2];
- pluginMap[_name] = true;
- }
-
- return pluginMap;
-}
-
-function isSimpleProperty(node) {
- return node != null && node.type === "Property" && node.kind === "init" && node.method === false;
-}
-
-var estreePlugin = (function (superClass) {
- return (
- /*#__PURE__*/
- function (_superClass) {
- _inheritsLoose(_class, _superClass);
-
- function _class() {
- return _superClass.apply(this, arguments) || this;
- }
-
- var _proto = _class.prototype;
-
- _proto.estreeParseRegExpLiteral = function estreeParseRegExpLiteral(_ref) {
- var pattern = _ref.pattern,
- flags = _ref.flags;
- var regex = null;
-
- try {
- regex = new RegExp(pattern, flags);
- } catch (e) {// In environments that don't support these flags value will
- // be null as the regex can't be represented natively.
- }
-
- var node = this.estreeParseLiteral(regex);
- node.regex = {
- pattern,
- flags
- };
- return node;
- };
-
- _proto.estreeParseLiteral = function estreeParseLiteral(value) {
- return this.parseLiteral(value, "Literal");
- };
-
- _proto.directiveToStmt = function directiveToStmt(directive) {
- var directiveLiteral = directive.value;
- var stmt = this.startNodeAt(directive.start, directive.loc.start);
- var 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);
- }; // ==================================
- // Overrides
- // ==================================
-
-
- _proto.initFunction = function initFunction(node, isAsync) {
- _superClass.prototype.initFunction.call(this, node, isAsync);
-
- node.expression = false;
- };
-
- _proto.checkDeclaration = function checkDeclaration(node) {
- if (isSimpleProperty(node)) {
- this.checkDeclaration(node.value);
- } else {
- _superClass.prototype.checkDeclaration.call(this, node);
- }
- };
-
- _proto.checkGetterSetterParamCount = function checkGetterSetterParamCount(prop) {
- var paramCount = prop.kind === "get" ? 0 : 1; // $FlowFixMe (prop.value present for ObjectMethod, but for ClassMethod should use prop.params?)
-
- if (prop.value.params.length !== paramCount) {
- var start = prop.start;
-
- if (prop.kind === "get") {
- this.raise(start, "getter should have no params");
- } else {
- this.raise(start, "setter should have exactly one param");
- }
- }
- };
-
- _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) {
- var _this = this;
-
- switch (expr.type) {
- case "ObjectPattern":
- expr.properties.forEach(function (prop) {
- _this.checkLVal(prop.type === "Property" ? prop.value : prop, isBinding, checkClashes, "object destructuring pattern");
- });
- break;
-
- default:
- _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription);
-
- }
- };
-
- _proto.checkPropClash = function checkPropClash(prop, propHash) {
- if (prop.computed || !isSimpleProperty(prop)) return;
- var key = prop.key; // It is either an Identifier or a String/NumericLiteral
-
- var 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;
- }
- };
-
- _proto.isStrictBody = function isStrictBody(node) {
- var isBlockStatement = node.body.type === "BlockStatement";
-
- if (isBlockStatement && node.body.body.length > 0) {
- for (var _i2 = 0, _node$body$body2 = node.body.body; _i2 < _node$body$body2.length; _i2++) {
- var directive = _node$body$body2[_i2];
-
- if (directive.type === "ExpressionStatement" && directive.expression.type === "Literal") {
- if (directive.expression.value === "use strict") return true;
- } else {
- // Break for the first non literal expression
- break;
- }
- }
- }
-
- return false;
- };
-
- _proto.isValidDirective = function isValidDirective(stmt) {
- return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && (!stmt.expression.extra || !stmt.expression.extra.parenthesized);
- };
-
- _proto.stmtToDirective = function stmtToDirective(stmt) {
- var directive = _superClass.prototype.stmtToDirective.call(this, stmt);
-
- var value = stmt.expression.value; // Reset value to the actual value as in estree mode we want
- // the stmt to have the real value and not the raw value
-
- directive.value.value = value;
- return directive;
- };
-
- _proto.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end) {
- var _this2 = this;
-
- _superClass.prototype.parseBlockBody.call(this, node, allowDirectives, topLevel, end);
-
- var directiveStatements = node.directives.map(function (d) {
- return _this2.directiveToStmt(d);
- });
- node.body = directiveStatements.concat(node.body);
- delete node.directives;
- };
-
- _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) {
- this.parseMethod(method, isGenerator, isAsync, isConstructor, "MethodDefinition");
-
- if (method.typeParameters) {
- // $FlowIgnore
- method.value.typeParameters = method.typeParameters;
- delete method.typeParameters;
- }
-
- classBody.body.push(method);
- };
-
- _proto.parseExprAtom = function 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 _superClass.prototype.parseExprAtom.call(this, refShorthandDefaultPos);
- }
- };
-
- _proto.parseLiteral = function parseLiteral(value, type, startPos, startLoc) {
- var node = _superClass.prototype.parseLiteral.call(this, value, type, startPos, startLoc);
-
- node.raw = node.extra.raw;
- delete node.extra;
- return node;
- };
-
- _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression) {
- _superClass.prototype.parseFunctionBody.call(this, node, allowExpression);
-
- node.expression = node.body.type !== "BlockStatement";
- };
-
- _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, type) {
- var funcNode = this.startNode();
- funcNode.kind = node.kind; // provide kind, so super method correctly sets state
-
- funcNode = _superClass.prototype.parseMethod.call(this, funcNode, isGenerator, isAsync, isConstructor, "FunctionExpression");
- delete funcNode.kind; // $FlowIgnore
-
- node.value = funcNode;
- return this.finishNode(node, type);
- };
-
- _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern) {
- var node = _superClass.prototype.parseObjectMethod.call(this, prop, isGenerator, isAsync, isPattern);
-
- if (node) {
- node.type = "Property";
- if (node.kind === "method") node.kind = "init";
- node.shorthand = false;
- }
-
- return node;
- };
-
- _proto.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) {
- var node = _superClass.prototype.parseObjectProperty.call(this, prop, startPos, startLoc, isPattern, refShorthandDefaultPos);
-
- if (node) {
- node.kind = "init";
- node.type = "Property";
- }
-
- return node;
- };
-
- _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) {
- if (isSimpleProperty(node)) {
- this.toAssignable(node.value, isBinding, contextDescription);
- return node;
- }
-
- return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription);
- };
-
- _proto.toAssignableObjectExpressionProp = function 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 {
- _superClass.prototype.toAssignableObjectExpressionProp.call(this, prop, isBinding, isLast);
- }
- };
-
- return _class;
- }(superClass)
- );
-});
-
-/* eslint max-len: 0 */
-var primitiveTypes = ["any", "bool", "boolean", "empty", "false", "mixed", "null", "number", "static", "string", "true", "typeof", "void"];
-
-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";
-}
-
-var exportSuggestions = {
- const: "declare export var",
- let: "declare export var",
- type: "export type",
- interface: "export interface"
-}; // Like Array#filter, but returns a tuple [ acceptedElements, discardedElements ]
-
-function partition(list, test) {
- var list1 = [];
- var list2 = [];
-
- for (var i = 0; i < list.length; i++) {
- (test(list[i], i, list) ? list1 : list2).push(list[i]);
- }
-
- return [list1, list2];
-}
-
-var flowPlugin = (function (superClass) {
- return (
- /*#__PURE__*/
- function (_superClass) {
- _inheritsLoose(_class, _superClass);
-
- function _class() {
- return _superClass.apply(this, arguments) || this;
- }
-
- var _proto = _class.prototype;
-
- _proto.flowParseTypeInitialiser = function flowParseTypeInitialiser(tok) {
- var oldInType = this.state.inType;
- this.state.inType = true;
- this.expect(tok || types.colon);
- var type = this.flowParseType();
- this.state.inType = oldInType;
- return type;
- };
-
- _proto.flowParsePredicate = function flowParsePredicate() {
- var node = this.startNode();
- var moduloLoc = this.state.startLoc;
- var moduloPos = this.state.start;
- this.expect(types.modulo);
- var checksLoc = this.state.startLoc;
- this.expectContextual("checks"); // Force '%' and 'checks' to be adjacent
-
- 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");
- }
- };
-
- _proto.flowParseTypeAndPredicateInitialiser = function flowParseTypeAndPredicateInitialiser() {
- var oldInType = this.state.inType;
- this.state.inType = true;
- this.expect(types.colon);
- var type = null;
- var 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];
- };
-
- _proto.flowParseDeclareClass = function flowParseDeclareClass(node) {
- this.next();
- this.flowParseInterfaceish(node,
- /*isClass*/
- true);
- return this.finishNode(node, "DeclareClass");
- };
-
- _proto.flowParseDeclareFunction = function flowParseDeclareFunction(node) {
- this.next();
- var id = node.id = this.parseIdentifier();
- var typeNode = this.startNode();
- var typeContainer = this.startNode();
-
- if (this.isRelational("<")) {
- typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
- } else {
- typeNode.typeParameters = null;
- }
-
- this.expect(types.parenL);
- var tmp = this.flowParseFunctionTypeParams();
- typeNode.params = tmp.params;
- typeNode.rest = tmp.rest;
- this.expect(types.parenR);
-
- var _flowParseTypeAndPred = this.flowParseTypeAndPredicateInitialiser();
-
- // $FlowFixMe (destructuring not supported yet)
- typeNode.returnType = _flowParseTypeAndPred[0];
- // $FlowFixMe (destructuring not supported yet)
- node.predicate = _flowParseTypeAndPred[1];
- typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
- id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
- this.finishNode(id, id.type);
- this.semicolon();
- return this.finishNode(node, "DeclareFunction");
- };
-
- _proto.flowParseDeclare = function 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.isContextual("module")) {
- if (this.lookahead().type === types.dot) {
- return this.flowParseDeclareModuleExports(node);
- } else {
- if (insideModule) {
- this.unexpected(null, "`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();
- }
- };
-
- _proto.flowParseDeclareVariable = function flowParseDeclareVariable(node) {
- this.next();
- node.id = this.flowParseTypeAnnotatableIdentifier(
- /*allowPrimitiveOverride*/
- true);
- this.semicolon();
- return this.finishNode(node, "DeclareVariable");
- };
-
- _proto.flowParseDeclareModule = function flowParseDeclareModule(node) {
- var _this = this;
-
- this.next();
-
- if (this.match(types.string)) {
- node.id = this.parseExprAtom();
- } else {
- node.id = this.parseIdentifier();
- }
-
- var bodyNode = node.body = this.startNode();
- var body = bodyNode.body = [];
- this.expect(types.braceL);
-
- while (!this.match(types.braceR)) {
- var _bodyNode = this.startNode();
-
- if (this.match(types._import)) {
- var lookahead = this.lookahead();
-
- if (lookahead.value !== "type" && lookahead.value !== "typeof") {
- this.unexpected(null, "Imports within a `declare module` body must always be `import type` or `import typeof`");
- }
-
- this.next();
- 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.expect(types.braceR);
- this.finishNode(bodyNode, "BlockStatement");
- var kind = null;
- var hasModuleExport = false;
- var 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(function (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");
- };
-
- _proto.flowParseDeclareExportDeclaration = function flowParseDeclareExportDeclaration(node, insideModule) {
- this.expect(types._export);
-
- if (this.eat(types._default)) {
- if (this.match(types._function) || this.match(types._class)) {
- // declare export default class ...
- // declare export default function ...
- node.declaration = this.flowParseDeclare(this.startNode());
- } else {
- // declare export default [type];
- node.declaration = this.flowParseType();
- this.semicolon();
- }
-
- node.default = true;
- return this.finishNode(node, "DeclareExportDeclaration");
- } else {
- if (this.match(types._const) || this.match(types._let) || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) {
- var label = this.state.value;
- var suggestion = exportSuggestions[label];
- this.unexpected(this.state.start, `\`declare export ${label}\` is not supported. Use \`${suggestion}\` instead`);
- }
-
- if (this.match(types._var) || // declare export var ...
- this.match(types._function) || // declare export function ...
- this.match(types._class) || // declare export class ...
- this.isContextual("opaque") // declare export opaque ..
- ) {
- node.declaration = this.flowParseDeclare(this.startNode());
- node.default = false;
- return this.finishNode(node, "DeclareExportDeclaration");
- } else if (this.match(types.star) || // declare export * from ''
- this.match(types.braceL) || // declare export {} ...
- this.isContextual("interface") || // declare export interface ...
- this.isContextual("type") || // declare export type ...
- this.isContextual("opaque") // declare export opaque type ...
- ) {
- node = this.parseExport(node);
-
- if (node.type === "ExportNamedDeclaration") {
- // flow does not support the ExportNamedDeclaration
- // $FlowIgnore
- node.type = "ExportDeclaration"; // $FlowFixMe
-
- node.default = false;
- delete node.exportKind;
- } // $FlowIgnore
-
-
- node.type = "Declare" + node.type;
- return node;
- }
- }
-
- throw this.unexpected();
- };
-
- _proto.flowParseDeclareModuleExports = function flowParseDeclareModuleExports(node) {
- this.expectContextual("module");
- this.expect(types.dot);
- this.expectContextual("exports");
- node.typeAnnotation = this.flowParseTypeAnnotation();
- this.semicolon();
- return this.finishNode(node, "DeclareModuleExports");
- };
-
- _proto.flowParseDeclareTypeAlias = function flowParseDeclareTypeAlias(node) {
- this.next();
- this.flowParseTypeAlias(node);
- return this.finishNode(node, "DeclareTypeAlias");
- };
-
- _proto.flowParseDeclareOpaqueType = function flowParseDeclareOpaqueType(node) {
- this.next();
- this.flowParseOpaqueType(node, true);
- return this.finishNode(node, "DeclareOpaqueType");
- };
-
- _proto.flowParseDeclareInterface = function flowParseDeclareInterface(node) {
- this.next();
- this.flowParseInterfaceish(node);
- return this.finishNode(node, "DeclareInterface");
- }; // Interfaces
-
-
- _proto.flowParseInterfaceish = function flowParseInterfaceish(node, isClass) {
- node.id = this.flowParseRestrictedIdentifier(
- /*liberal*/
- !isClass);
-
- if (this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterDeclaration();
- } else {
- node.typeParameters = null;
- }
-
- node.extends = [];
- 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));
- }
-
- node.body = this.flowParseObjectType(true, false, false);
- };
-
- _proto.flowParseInterfaceExtends = function flowParseInterfaceExtends() {
- var node = this.startNode();
- node.id = this.flowParseQualifiedTypeIdentifier();
-
- if (this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterInstantiation();
- } else {
- node.typeParameters = null;
- }
-
- return this.finishNode(node, "InterfaceExtends");
- };
-
- _proto.flowParseInterface = function flowParseInterface(node) {
- this.flowParseInterfaceish(node);
- return this.finishNode(node, "InterfaceDeclaration");
- };
-
- _proto.checkReservedType = function checkReservedType(word, startLoc) {
- if (primitiveTypes.indexOf(word) > -1) {
- this.raise(startLoc, `Cannot overwrite primitive type ${word}`);
- }
- };
-
- _proto.flowParseRestrictedIdentifier = function flowParseRestrictedIdentifier(liberal) {
- this.checkReservedType(this.state.value, this.state.start);
- return this.parseIdentifier(liberal);
- }; // Type aliases
-
-
- _proto.flowParseTypeAlias = function flowParseTypeAlias(node) {
- node.id = this.flowParseRestrictedIdentifier();
-
- if (this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterDeclaration();
- } else {
- node.typeParameters = null;
- }
-
- node.right = this.flowParseTypeInitialiser(types.eq);
- this.semicolon();
- return this.finishNode(node, "TypeAlias");
- };
-
- _proto.flowParseOpaqueType = function flowParseOpaqueType(node, declare) {
- this.expectContextual("type");
- node.id = this.flowParseRestrictedIdentifier(
- /*liberal*/
- true);
-
- if (this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterDeclaration();
- } else {
- node.typeParameters = null;
- } // Parse the supertype
-
-
- 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");
- }; // Type annotations
-
-
- _proto.flowParseTypeParameter = function flowParseTypeParameter() {
- var node = this.startNode();
- var variance = this.flowParseVariance();
- var 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();
- }
-
- return this.finishNode(node, "TypeParameter");
- };
-
- _proto.flowParseTypeParameterDeclaration = function flowParseTypeParameterDeclaration() {
- var oldInType = this.state.inType;
- var node = this.startNode();
- node.params = [];
- this.state.inType = true; // istanbul ignore else: this condition is already checked at all call sites
-
- if (this.isRelational("<") || this.match(types.jsxTagStart)) {
- this.next();
- } else {
- this.unexpected();
- }
-
- do {
- node.params.push(this.flowParseTypeParameter());
-
- if (!this.isRelational(">")) {
- this.expect(types.comma);
- }
- } while (!this.isRelational(">"));
-
- this.expectRelational(">");
- this.state.inType = oldInType;
- return this.finishNode(node, "TypeParameterDeclaration");
- };
-
- _proto.flowParseTypeParameterInstantiation = function flowParseTypeParameterInstantiation() {
- var node = this.startNode();
- var oldInType = this.state.inType;
- node.params = [];
- this.state.inType = true;
- this.expectRelational("<");
-
- while (!this.isRelational(">")) {
- node.params.push(this.flowParseType());
-
- if (!this.isRelational(">")) {
- this.expect(types.comma);
- }
- }
-
- this.expectRelational(">");
- this.state.inType = oldInType;
- return this.finishNode(node, "TypeParameterInstantiation");
- };
-
- _proto.flowParseObjectPropertyKey = function flowParseObjectPropertyKey() {
- return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
- };
-
- _proto.flowParseObjectTypeIndexer = function flowParseObjectTypeIndexer(node, isStatic, variance) {
- node.static = isStatic;
- this.expect(types.bracketL);
-
- 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");
- };
-
- _proto.flowParseObjectTypeMethodish = function 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");
- };
-
- _proto.flowParseObjectTypeCallProperty = function flowParseObjectTypeCallProperty(node, isStatic) {
- var valueNode = this.startNode();
- node.static = isStatic;
- node.value = this.flowParseObjectTypeMethodish(valueNode);
- return this.finishNode(node, "ObjectTypeCallProperty");
- };
-
- _proto.flowParseObjectType = function flowParseObjectType(allowStatic, allowExact, allowSpread) {
- var oldInType = this.state.inType;
- this.state.inType = true;
- var nodeStart = this.startNode();
- nodeStart.callProperties = [];
- nodeStart.properties = [];
- nodeStart.indexers = [];
- var endDelim;
- var exact;
-
- 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)) {
- var isStatic = false;
- var node = this.startNode();
-
- if (allowStatic && this.isContextual("static") && this.lookahead().type !== types.colon) {
- this.next();
- isStatic = true;
- }
-
- var variance = this.flowParseVariance();
-
- if (this.match(types.bracketL)) {
- nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
- } else if (this.match(types.parenL) || this.isRelational("<")) {
- if (variance) {
- this.unexpected(variance.start);
- }
-
- nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
- } else {
- var kind = "init";
-
- if (this.isContextual("get") || this.isContextual("set")) {
- var lookahead = this.lookahead();
-
- if (lookahead.type === types.name || lookahead.type === types.string || lookahead.type === types.num) {
- kind = this.state.value;
- this.next();
- }
- }
-
- nodeStart.properties.push(this.flowParseObjectTypeProperty(node, isStatic, variance, kind, allowSpread));
- }
-
- this.flowObjectTypeSemicolon();
- }
-
- this.expect(endDelim);
- var out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
- this.state.inType = oldInType;
- return out;
- };
-
- _proto.flowParseObjectTypeProperty = function flowParseObjectTypeProperty(node, isStatic, variance, kind, allowSpread) {
- if (this.match(types.ellipsis)) {
- if (!allowSpread) {
- this.unexpected(null, "Spread operator cannot appear in class or interface definitions");
- }
-
- if (variance) {
- this.unexpected(variance.start, "Spread properties cannot have variance");
- }
-
- this.expect(types.ellipsis);
- node.argument = this.flowParseType();
- return this.finishNode(node, "ObjectTypeSpreadProperty");
- } else {
- node.key = this.flowParseObjectPropertyKey();
- node.static = isStatic;
- node.kind = kind;
- var optional = false;
-
- if (this.isRelational("<") || this.match(types.parenL)) {
- // This is a method property
- node.method = true;
-
- if (variance) {
- this.unexpected(variance.start);
- }
-
- node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
-
- if (kind === "get" || kind === "set") {
- this.flowCheckGetterSetterParamCount(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");
- }
- }; // This is similar to checkGetterSetterParamCount, but as
- // babylon uses non estree properties we cannot reuse it here
-
-
- _proto.flowCheckGetterSetterParamCount = function flowCheckGetterSetterParamCount(property) {
- var paramCount = property.kind === "get" ? 0 : 1;
-
- if (property.value.params.length !== paramCount) {
- var start = property.start;
-
- if (property.kind === "get") {
- this.raise(start, "getter should have no params");
- } else {
- this.raise(start, "setter should have exactly one param");
- }
- }
- };
-
- _proto.flowObjectTypeSemicolon = function flowObjectTypeSemicolon() {
- if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) {
- this.unexpected();
- }
- };
-
- _proto.flowParseQualifiedTypeIdentifier = function flowParseQualifiedTypeIdentifier(startPos, startLoc, id) {
- startPos = startPos || this.state.start;
- startLoc = startLoc || this.state.startLoc;
- var node = id || this.parseIdentifier();
-
- while (this.eat(types.dot)) {
- var node2 = this.startNodeAt(startPos, startLoc);
- node2.qualification = node;
- node2.id = this.parseIdentifier();
- node = this.finishNode(node2, "QualifiedTypeIdentifier");
- }
-
- return node;
- };
-
- _proto.flowParseGenericType = function flowParseGenericType(startPos, startLoc, id) {
- var 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");
- };
-
- _proto.flowParseTypeofType = function flowParseTypeofType() {
- var node = this.startNode();
- this.expect(types._typeof);
- node.argument = this.flowParsePrimaryType();
- return this.finishNode(node, "TypeofTypeAnnotation");
- };
-
- _proto.flowParseTupleType = function flowParseTupleType() {
- var node = this.startNode();
- node.types = [];
- this.expect(types.bracketL); // We allow trailing commas
-
- while (this.state.pos < this.input.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");
- };
-
- _proto.flowParseFunctionTypeParam = function flowParseFunctionTypeParam() {
- var name = null;
- var optional = false;
- var typeAnnotation = null;
- var node = this.startNode();
- var 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");
- };
-
- _proto.reinterpretTypeAsFunctionTypeParam = function reinterpretTypeAsFunctionTypeParam(type) {
- var node = this.startNodeAt(type.start, type.loc.start);
- node.name = null;
- node.optional = false;
- node.typeAnnotation = type;
- return this.finishNode(node, "FunctionTypeParam");
- };
-
- _proto.flowParseFunctionTypeParams = function flowParseFunctionTypeParams(params) {
- if (params === void 0) {
- params = [];
- }
-
- var 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
- };
- };
-
- _proto.flowIdentToTypeAnnotation = function flowIdentToTypeAnnotation(startPos, startLoc, node, id) {
- switch (id.name) {
- case "any":
- return this.finishNode(node, "AnyTypeAnnotation");
-
- case "void":
- return this.finishNode(node, "VoidTypeAnnotation");
-
- 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:
- return this.flowParseGenericType(startPos, startLoc, id);
- }
- }; // The parsing of types roughly parallels the parsing of expressions, and
- // primary types are kind of like primary expressions...they're the
- // primitives with which other types are constructed.
-
-
- _proto.flowParsePrimaryType = function flowParsePrimaryType() {
- var startPos = this.state.start;
- var startLoc = this.state.startLoc;
- var node = this.startNode();
- var tmp;
- var type;
- var isGroupedType = false;
- var oldNoAnonFunctionType = this.state.noAnonFunctionType;
-
- switch (this.state.type) {
- case types.name:
- return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
-
- case types.braceL:
- return this.flowParseObjectType(false, false, true);
-
- case types.braceBarL:
- return this.flowParseObjectType(false, true, true);
-
- case types.bracketL:
- return this.flowParseTupleType();
-
- 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(); // Check to see if this is actually a grouped type
-
- if (!this.match(types.parenR) && !this.match(types.ellipsis)) {
- if (this.match(types.name)) {
- var 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; // A `,` or a `) =>` means this is an anonymous function type
-
- if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) {
- this.expect(types.parenR);
- return type;
- } else {
- // Eat a comma if there is one
- 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)) {
- this.unexpected(null, `Unexpected token, expected "number"`);
- }
-
- return this.parseLiteral(-this.state.value, "NumberLiteralTypeAnnotation", node.start, node.loc.start);
- }
-
- this.unexpected();
-
- case types.num:
- return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
-
- 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();
- }
-
- }
-
- throw this.unexpected();
- };
-
- _proto.flowParsePostfixType = function flowParsePostfixType() {
- var startPos = this.state.start,
- startLoc = this.state.startLoc;
- var type = this.flowParsePrimaryType();
-
- while (!this.canInsertSemicolon() && this.match(types.bracketL)) {
- var node = this.startNodeAt(startPos, startLoc);
- node.elementType = type;
- this.expect(types.bracketL);
- this.expect(types.bracketR);
- type = this.finishNode(node, "ArrayTypeAnnotation");
- }
-
- return type;
- };
-
- _proto.flowParsePrefixType = function flowParsePrefixType() {
- var node = this.startNode();
-
- if (this.eat(types.question)) {
- node.typeAnnotation = this.flowParsePrefixType();
- return this.finishNode(node, "NullableTypeAnnotation");
- } else {
- return this.flowParsePostfixType();
- }
- };
-
- _proto.flowParseAnonFunctionWithoutParens = function flowParseAnonFunctionWithoutParens() {
- var param = this.flowParsePrefixType();
-
- if (!this.state.noAnonFunctionType && this.eat(types.arrow)) {
- // TODO: This should be a type error. Passing in a SourceLocation, and it expects a Position.
- var 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;
- };
-
- _proto.flowParseIntersectionType = function flowParseIntersectionType() {
- var node = this.startNode();
- this.eat(types.bitwiseAND);
- var 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");
- };
-
- _proto.flowParseUnionType = function flowParseUnionType() {
- var node = this.startNode();
- this.eat(types.bitwiseOR);
- var 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");
- };
-
- _proto.flowParseType = function flowParseType() {
- var oldInType = this.state.inType;
- this.state.inType = true;
- var type = this.flowParseUnionType();
- this.state.inType = oldInType; // Ensure that a brace after a function generic type annotation is a
- // statement, except in arrow functions (noAnonFunctionType)
-
- this.state.exprAllowed = this.state.exprAllowed || this.state.noAnonFunctionType;
- return type;
- };
-
- _proto.flowParseTypeAnnotation = function flowParseTypeAnnotation() {
- var node = this.startNode();
- node.typeAnnotation = this.flowParseTypeInitialiser();
- return this.finishNode(node, "TypeAnnotation");
- };
-
- _proto.flowParseTypeAnnotatableIdentifier = function flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
- var ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
-
- if (this.match(types.colon)) {
- ident.typeAnnotation = this.flowParseTypeAnnotation();
- this.finishNode(ident, ident.type);
- }
-
- return ident;
- };
-
- _proto.typeCastToParameter = function typeCastToParameter(node) {
- node.expression.typeAnnotation = node.typeAnnotation;
- return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end);
- };
-
- _proto.flowParseVariance = function flowParseVariance() {
- var 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;
- }; // ==================================
- // Overrides
- // ==================================
-
-
- _proto.parseFunctionBody = function parseFunctionBody(node, allowExpressionBody) {
- var _this2 = this;
-
- if (allowExpressionBody) {
- return this.forwardNoArrowParamsConversionAt(node, function () {
- return _superClass.prototype.parseFunctionBody.call(_this2, node, true);
- });
- }
-
- return _superClass.prototype.parseFunctionBody.call(this, node, false);
- };
-
- _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) {
- // For arrow functions, `parseArrow` handles the return type itself.
- if (!allowExpressionBody && this.match(types.colon)) {
- var typeNode = this.startNode();
-
- var _flowParseTypeAndPred2 = this.flowParseTypeAndPredicateInitialiser();
-
- // $FlowFixMe (destructuring not supported yet)
- typeNode.typeAnnotation = _flowParseTypeAndPred2[0];
- // $FlowFixMe (destructuring not supported yet)
- node.predicate = _flowParseTypeAndPred2[1];
- node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
- }
-
- _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, type, allowExpressionBody);
- }; // interfaces
-
-
- _proto.parseStatement = function parseStatement(declaration, topLevel) {
- // strict mode handling of `interface` since it's a reserved word
- if (this.state.strict && this.match(types.name) && this.state.value === "interface") {
- var node = this.startNode();
- this.next();
- return this.flowParseInterface(node);
- } else {
- return _superClass.prototype.parseStatement.call(this, declaration, topLevel);
- }
- }; // declares, interfaces and type aliases
-
-
- _proto.parseExpressionStatement = function 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 _superClass.prototype.parseExpressionStatement.call(this, node, expr);
- }; // export type
-
-
- _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() {
- return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || _superClass.prototype.shouldParseExportDeclaration.call(this);
- };
-
- _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() {
- if (this.match(types.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value == "opaque")) {
- return false;
- }
-
- return _superClass.prototype.isExportDefaultSpecifier.call(this);
- };
-
- _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) {
- var _this3 = this;
-
- if (!this.match(types.question)) return expr; // only do the expensive clone if there is a question mark
- // and if we come from inside parens
-
- if (refNeedsArrowPos) {
- var _state = this.state.clone();
-
- try {
- return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc);
- } catch (err) {
- if (err instanceof SyntaxError) {
- this.state = _state;
- refNeedsArrowPos.start = err.pos || this.state.start;
- return expr;
- } else {
- // istanbul ignore next: no such error is expected
- throw err;
- }
- }
- }
-
- this.expect(types.question);
- var state = this.state.clone();
- var originalNoArrowAt = this.state.noArrowAt;
- var node = this.startNodeAt(startPos, startLoc);
-
- var _tryParseConditionalC = this.tryParseConditionalConsequent(),
- consequent = _tryParseConditionalC.consequent,
- failed = _tryParseConditionalC.failed;
-
- var _getArrowLikeExpressi = this.getArrowLikeExpressions(consequent),
- valid = _getArrowLikeExpressi[0],
- invalid = _getArrowLikeExpressi[1];
-
- if (failed || invalid.length > 0) {
- var noArrowAt = originalNoArrowAt.concat();
-
- if (invalid.length > 0) {
- this.state = state;
- this.state.noArrowAt = noArrowAt;
-
- for (var i = 0; i < invalid.length; i++) {
- noArrowAt.push(invalid[i].start);
- }
-
- var _tryParseConditionalC2 = this.tryParseConditionalConsequent();
-
- consequent = _tryParseConditionalC2.consequent;
- failed = _tryParseConditionalC2.failed;
-
- var _getArrowLikeExpressi2 = this.getArrowLikeExpressions(consequent);
-
- valid = _getArrowLikeExpressi2[0];
- invalid = _getArrowLikeExpressi2[1];
- }
-
- if (failed && valid.length > 1) {
- // if there are two or more possible correct ways of parsing, throw an
- // error.
- // e.g. Source: a ? (b): c => (d): e => f
- // Result 1: a ? b : (c => ((d): e => f))
- // Result 2: a ? ((b): c => d) : (e => f)
- 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);
-
- var _tryParseConditionalC3 = this.tryParseConditionalConsequent();
-
- consequent = _tryParseConditionalC3.consequent;
- failed = _tryParseConditionalC3.failed;
- }
-
- this.getArrowLikeExpressions(consequent, true);
- }
-
- this.state.noArrowAt = originalNoArrowAt;
- this.expect(types.colon);
- node.test = expr;
- node.consequent = consequent;
- node.alternate = this.forwardNoArrowParamsConversionAt(node, function () {
- return _this3.parseMaybeAssign(noIn, undefined, undefined, undefined);
- });
- return this.finishNode(node, "ConditionalExpression");
- };
-
- _proto.tryParseConditionalConsequent = function tryParseConditionalConsequent() {
- this.state.noArrowParamsConversionAt.push(this.state.start);
- var consequent = this.parseMaybeAssign();
- var failed = !this.match(types.colon);
- this.state.noArrowParamsConversionAt.pop();
- return {
- consequent,
- failed
- };
- }; // Given an expression, walks throught its arrow functions whose body is
- // an expression and throught conditional expressions. It returns every
- // function which has been parsed with a return type but could have been
- // parenthesized expressions.
- // These functions are separated into two arrays: one containing the ones
- // whose parameters can be converted to assignable lists, one containing the
- // others.
-
-
- _proto.getArrowLikeExpressions = function getArrowLikeExpressions(node, disallowInvalid) {
- var _this4 = this;
-
- var stack = [node];
- var arrows = [];
-
- while (stack.length !== 0) {
- var _node = stack.pop();
-
- if (_node.type === "ArrowFunctionExpression") {
- if (_node.typeParameters || !_node.returnType) {
- // This is an arrow expression without ambiguity, so check its parameters
- this.toAssignableList( // node.params is Expression[] instead of $ReadOnlyArray<Pattern> because it
- // has not been converted yet.
- _node.params, true, "arrow function parameters"); // Use super's method to force the parameters to be checked
-
- _superClass.prototype.checkFunctionNameAndParams.call(this, _node, true);
- } else {
- arrows.push(_node);
- }
-
- stack.push(_node.body);
- } else if (_node.type === "ConditionalExpression") {
- stack.push(_node.consequent);
- stack.push(_node.alternate);
- }
- }
-
- if (disallowInvalid) {
- for (var i = 0; i < arrows.length; i++) {
- this.toAssignableList(node.params, true, "arrow function parameters");
- }
-
- return [arrows, []];
- }
-
- return partition(arrows, function (node) {
- try {
- _this4.toAssignableList(node.params, true, "arrow function parameters");
-
- return true;
- } catch (err) {
- return false;
- }
- });
- };
-
- _proto.forwardNoArrowParamsConversionAt = function forwardNoArrowParamsConversionAt(node, parse) {
- var 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;
- };
-
- _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) {
- node = _superClass.prototype.parseParenItem.call(this, node, startPos, startLoc);
-
- if (this.eat(types.question)) {
- node.optional = true;
- }
-
- if (this.match(types.colon)) {
- var typeCastNode = this.startNodeAt(startPos, startLoc);
- typeCastNode.expression = node;
- typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
- return this.finishNode(typeCastNode, "TypeCastExpression");
- }
-
- return node;
- };
-
- _proto.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) {
- if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") {
- // Allow Flowtype imports and exports in all conditions because
- // Flow itself does not care about 'sourceType'.
- return;
- }
-
- _superClass.prototype.assertModuleNodeAllowed.call(this, node);
- };
-
- _proto.parseExport = function parseExport(node) {
- node = _superClass.prototype.parseExport.call(this, node);
-
- if (node.type === "ExportNamedDeclaration" || node.type === "ExportAllDeclaration") {
- node.exportKind = node.exportKind || "value";
- }
-
- return node;
- };
-
- _proto.parseExportDeclaration = function parseExportDeclaration(node) {
- if (this.isContextual("type")) {
- node.exportKind = "type";
- var declarationNode = this.startNode();
- this.next();
-
- if (this.match(types.braceL)) {
- // export type { foo, bar };
- node.specifiers = this.parseExportSpecifiers();
- this.parseExportFrom(node);
- return null;
- } else {
- // export type Foo = Bar;
- return this.flowParseTypeAlias(declarationNode);
- }
- } else if (this.isContextual("opaque")) {
- node.exportKind = "type";
-
- var _declarationNode = this.startNode();
-
- this.next(); // export opaque type Foo = Bar;
-
- return this.flowParseOpaqueType(_declarationNode, false);
- } else if (this.isContextual("interface")) {
- node.exportKind = "type";
-
- var _declarationNode2 = this.startNode();
-
- this.next();
- return this.flowParseInterface(_declarationNode2);
- } else {
- return _superClass.prototype.parseExportDeclaration.call(this, node);
- }
- };
-
- _proto.shouldParseExportStar = function shouldParseExportStar() {
- return _superClass.prototype.shouldParseExportStar.call(this) || this.isContextual("type") && this.lookahead().type === types.star;
- };
-
- _proto.parseExportStar = function parseExportStar(node) {
- if (this.eatContextual("type")) {
- node.exportKind = "type";
- }
-
- return _superClass.prototype.parseExportStar.call(this, node);
- };
-
- _proto.parseExportNamespace = function parseExportNamespace(node) {
- if (node.exportKind === "type") {
- this.unexpected();
- }
-
- return _superClass.prototype.parseExportNamespace.call(this, node);
- };
-
- _proto.parseClassId = function parseClassId(node, isStatement, optionalId) {
- _superClass.prototype.parseClassId.call(this, node, isStatement, optionalId);
-
- if (this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterDeclaration();
- }
- }; // don't consider `void` to be a keyword as then it'll use the void token type
- // and set startExpr
-
-
- _proto.isKeyword = function isKeyword(name) {
- if (this.state.inType && name === "void") {
- return false;
- } else {
- return _superClass.prototype.isKeyword.call(this, name);
- }
- }; // ensure that inside flow types, we bypass the jsx parser plugin
-
-
- _proto.readToken = function readToken(code) {
- if (this.state.inType && (code === 62 || code === 60)) {
- return this.finishOp(types.relational, 1);
- } else {
- return _superClass.prototype.readToken.call(this, code);
- }
- };
-
- _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) {
- if (node.type === "TypeCastExpression") {
- return _superClass.prototype.toAssignable.call(this, this.typeCastToParameter(node), isBinding, contextDescription);
- } else {
- return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription);
- }
- }; // turn type casts that we found in function parameter head into type annotated params
-
-
- _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) {
- for (var i = 0; i < exprList.length; i++) {
- var expr = exprList[i];
-
- if (expr && expr.type === "TypeCastExpression") {
- exprList[i] = this.typeCastToParameter(expr);
- }
- }
-
- return _superClass.prototype.toAssignableList.call(this, exprList, isBinding, contextDescription);
- }; // this is a list of nodes, from something like a call expression, we need to filter the
- // type casts that we've found that are illegal in this context
-
-
- _proto.toReferencedList = function toReferencedList(exprList) {
- for (var i = 0; i < exprList.length; i++) {
- var expr = exprList[i];
-
- if (expr && expr._exprListItem && expr.type === "TypeCastExpression") {
- this.raise(expr.start, "Unexpected type cast");
- }
- }
-
- return exprList;
- }; // parse an item inside a expression list eg. `(NODE, NODE)` where NODE represents
- // the position where this function is called
-
-
- _proto.parseExprListItem = function parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos) {
- var container = this.startNode();
-
- var node = _superClass.prototype.parseExprListItem.call(this, allowEmpty, refShorthandDefaultPos, refNeedsArrowPos);
-
- if (this.match(types.colon)) {
- container._exprListItem = true;
- container.expression = node;
- container.typeAnnotation = this.flowParseTypeAnnotation();
- return this.finishNode(container, "TypeCastExpression");
- } else {
- return node;
- }
- };
-
- _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) {
- if (expr.type !== "TypeCastExpression") {
- return _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription);
- }
- }; // parse class property type annotations
-
-
- _proto.parseClassProperty = function parseClassProperty(node) {
- if (this.match(types.colon)) {
- node.typeAnnotation = this.flowParseTypeAnnotation();
- }
-
- return _superClass.prototype.parseClassProperty.call(this, node);
- }; // determine whether or not we're currently in the position where a class method would appear
-
-
- _proto.isClassMethod = function isClassMethod() {
- return this.isRelational("<") || _superClass.prototype.isClassMethod.call(this);
- }; // determine whether or not we're currently in the position where a class property would appear
-
-
- _proto.isClassProperty = function isClassProperty() {
- return this.match(types.colon) || _superClass.prototype.isClassProperty.call(this);
- };
-
- _proto.isNonstaticConstructor = function isNonstaticConstructor(method) {
- return !this.match(types.colon) && _superClass.prototype.isNonstaticConstructor.call(this, method);
- }; // parse type parameters for class methods
-
-
- _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) {
- if (method.variance) {
- this.unexpected(method.variance.start);
- }
-
- delete method.variance;
-
- if (this.isRelational("<")) {
- method.typeParameters = this.flowParseTypeParameterDeclaration();
- }
-
- _superClass.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor);
- };
-
- _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
- if (method.variance) {
- this.unexpected(method.variance.start);
- }
-
- delete method.variance;
-
- if (this.isRelational("<")) {
- method.typeParameters = this.flowParseTypeParameterDeclaration();
- }
-
- _superClass.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync);
- }; // parse a the super class type parameters and implements
-
-
- _proto.parseClassSuper = function parseClassSuper(node) {
- _superClass.prototype.parseClassSuper.call(this, node);
-
- if (node.superClass && this.isRelational("<")) {
- node.superTypeParameters = this.flowParseTypeParameterInstantiation();
- }
-
- if (this.isContextual("implements")) {
- this.next();
- var implemented = node.implements = [];
-
- do {
- var _node2 = this.startNode();
-
- _node2.id = this.flowParseRestrictedIdentifier(
- /*liberal*/
- true);
-
- if (this.isRelational("<")) {
- _node2.typeParameters = this.flowParseTypeParameterInstantiation();
- } else {
- _node2.typeParameters = null;
- }
-
- implemented.push(this.finishNode(_node2, "ClassImplements"));
- } while (this.eat(types.comma));
- }
- };
-
- _proto.parsePropertyName = function parsePropertyName(node) {
- var variance = this.flowParseVariance();
-
- var key = _superClass.prototype.parsePropertyName.call(this, node); // $FlowIgnore ("variance" not defined on TsNamedTypeElementBase)
-
-
- node.variance = variance;
- return key;
- }; // parse type parameters for object method shorthand
-
-
- _proto.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos) {
- if (prop.variance) {
- this.unexpected(prop.variance.start);
- }
-
- delete prop.variance;
- var typeParameters; // method shorthand
-
- if (this.isRelational("<")) {
- typeParameters = this.flowParseTypeParameterDeclaration();
- if (!this.match(types.parenL)) this.unexpected();
- }
-
- _superClass.prototype.parseObjPropValue.call(this, prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos); // add typeParameters if we found them
-
-
- if (typeParameters) {
- // $FlowFixMe (trying to set '.typeParameters' on an expression)
- (prop.value || prop).typeParameters = typeParameters;
- }
- };
-
- _proto.parseAssignableListItemTypes = function 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.finishNode(param, param.type);
- return param;
- };
-
- _proto.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) {
- var node = _superClass.prototype.parseMaybeDefault.call(this, 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;
- };
-
- _proto.shouldParseDefaultImport = function shouldParseDefaultImport(node) {
- if (!hasTypeImportKind(node)) {
- return _superClass.prototype.shouldParseDefaultImport.call(this, node);
- }
-
- return isMaybeDefaultImport(this.state);
- };
-
- _proto.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) {
- specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true) : this.parseIdentifier();
- this.checkLVal(specifier.local, true, undefined, contextDescription);
- node.specifiers.push(this.finishNode(specifier, type));
- }; // parse typeof and type imports
-
-
- _proto.parseImportSpecifiers = function parseImportSpecifiers(node) {
- node.importKind = "value";
- var kind = null;
-
- if (this.match(types._typeof)) {
- kind = "typeof";
- } else if (this.isContextual("type")) {
- kind = "type";
- }
-
- if (kind) {
- var lh = this.lookahead(); // import type * is not allowed
-
- 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;
- }
- }
-
- _superClass.prototype.parseImportSpecifiers.call(this, node);
- }; // parse import-type/typeof shorthand
-
-
- _proto.parseImportSpecifier = function parseImportSpecifier(node) {
- var specifier = this.startNode();
- var firstIdentLoc = this.state.start;
- var firstIdent = this.parseIdentifier(true);
- var specifierTypeKind = null;
-
- if (firstIdent.name === "type") {
- specifierTypeKind = "type";
- } else if (firstIdent.name === "typeof") {
- specifierTypeKind = "typeof";
- }
-
- var isBinding = false;
-
- if (this.isContextual("as") && !this.isLookaheadContextual("as")) {
- var as_ident = this.parseIdentifier(true);
-
- if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) {
- // `import {type as ,` or `import {type as }`
- specifier.imported = as_ident;
- specifier.importKind = specifierTypeKind;
- specifier.local = as_ident.__clone();
- } else {
- // `import {type as foo`
- specifier.imported = firstIdent;
- specifier.importKind = null;
- specifier.local = this.parseIdentifier();
- }
- } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) {
- // `import {type foo`
- 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();
- }
-
- var nodeIsTypeImport = hasTypeImportKind(node);
- var 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, true, undefined, "import specifier");
- node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
- }; // parse function type parameters - function foo<T>() {}
-
-
- _proto.parseFunctionParams = function parseFunctionParams(node) {
- // $FlowFixMe
- var kind = node.kind;
-
- if (kind !== "get" && kind !== "set" && this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterDeclaration();
- }
-
- _superClass.prototype.parseFunctionParams.call(this, node);
- }; // parse flow type annotations on variable declarator heads - let foo: string = bar
-
-
- _proto.parseVarHead = function parseVarHead(decl) {
- _superClass.prototype.parseVarHead.call(this, decl);
-
- if (this.match(types.colon)) {
- decl.id.typeAnnotation = this.flowParseTypeAnnotation();
- this.finishNode(decl.id, decl.id.type);
- }
- }; // parse the return type of an async arrow function - let foo = (async (): number => {});
-
-
- _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) {
- if (this.match(types.colon)) {
- var oldNoAnonFunctionType = this.state.noAnonFunctionType;
- this.state.noAnonFunctionType = true;
- node.returnType = this.flowParseTypeAnnotation();
- this.state.noAnonFunctionType = oldNoAnonFunctionType;
- }
-
- return _superClass.prototype.parseAsyncArrowFromCallExpression.call(this, node, call);
- }; // todo description
-
-
- _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() {
- return this.match(types.colon) || _superClass.prototype.shouldParseAsyncArrow.call(this);
- }; // We need to support type parameter declarations for arrow functions. This
- // is tricky. There are three situations we need to handle
- //
- // 1. This is either JSX or an arrow function. We'll try JSX first. If that
- // fails, we'll try an arrow function. If that fails, we'll throw the JSX
- // error.
- // 2. This is an arrow function. We'll parse the type parameter declaration,
- // parse the rest, make sure the rest is an arrow function, and go from
- // there
- // 3. This is neither. Just call the super method
-
-
- _proto.parseMaybeAssign = function parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) {
- var _this5 = this;
-
- var jsxError = null;
-
- if (types.jsxTagStart && this.match(types.jsxTagStart)) {
- var state = this.state.clone();
-
- try {
- return _superClass.prototype.parseMaybeAssign.call(this, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos);
- } catch (err) {
- if (err instanceof SyntaxError) {
- this.state = state; // Remove `tc.j_expr` and `tc.j_oTag` from context added
- // by parsing `jsxTagStart` to stop the JSX plugin from
- // messing with the tokens
-
- this.state.context.length -= 2;
- jsxError = err;
- } else {
- // istanbul ignore next: no such error is expected
- throw err;
- }
- }
- }
-
- if (jsxError != null || this.isRelational("<")) {
- var arrowExpression;
- var typeParameters;
-
- try {
- typeParameters = this.flowParseTypeParameterDeclaration();
- arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, function () {
- return _superClass.prototype.parseMaybeAssign.call(_this5, 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 _superClass.prototype.parseMaybeAssign.call(this, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos);
- }; // handle return types for arrow functions
-
-
- _proto.parseArrow = function parseArrow(node) {
- if (this.match(types.colon)) {
- var state = this.state.clone();
-
- try {
- var oldNoAnonFunctionType = this.state.noAnonFunctionType;
- this.state.noAnonFunctionType = true;
- var typeNode = this.startNode();
-
- var _flowParseTypeAndPred3 = this.flowParseTypeAndPredicateInitialiser();
-
- // $FlowFixMe (destructuring not supported yet)
- typeNode.typeAnnotation = _flowParseTypeAndPred3[0];
- // $FlowFixMe (destructuring not supported yet)
- node.predicate = _flowParseTypeAndPred3[1];
- this.state.noAnonFunctionType = oldNoAnonFunctionType;
- if (this.canInsertSemicolon()) this.unexpected();
- if (!this.match(types.arrow)) this.unexpected(); // assign after it is clear it is an arrow
-
- node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
- } catch (err) {
- if (err instanceof SyntaxError) {
- this.state = state;
- } else {
- // istanbul ignore next: no such error is expected
- throw err;
- }
- }
- }
-
- return _superClass.prototype.parseArrow.call(this, node);
- };
-
- _proto.shouldParseArrow = function shouldParseArrow() {
- return this.match(types.colon) || _superClass.prototype.shouldParseArrow.call(this);
- };
-
- _proto.setArrowFunctionParameters = function setArrowFunctionParameters(node, params) {
- if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
- node.params = params;
- } else {
- _superClass.prototype.setArrowFunctionParameters.call(this, node, params);
- }
- };
-
- _proto.checkFunctionNameAndParams = function checkFunctionNameAndParams(node, isArrowFunction) {
- if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
- return;
- }
-
- return _superClass.prototype.checkFunctionNameAndParams.call(this, node, isArrowFunction);
- };
-
- _proto.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) {
- return _superClass.prototype.parseParenAndDistinguishExpression.call(this, canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1);
- };
-
- _proto.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) {
- if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) {
- this.next();
- var 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("<")) {
- var state = this.state.clone();
- var error;
-
- try {
- var _node3 = this.parseAsyncArrowWithTypeParameters(startPos, startLoc);
-
- if (_node3) return _node3;
- } catch (e) {
- error = e;
- }
-
- this.state = state;
-
- try {
- return _superClass.prototype.parseSubscripts.call(this, base, startPos, startLoc, noCalls);
- } catch (e) {
- throw error || e;
- }
- }
-
- return _superClass.prototype.parseSubscripts.call(this, base, startPos, startLoc, noCalls);
- };
-
- _proto.parseAsyncArrowWithTypeParameters = function parseAsyncArrowWithTypeParameters(startPos, startLoc) {
- var node = this.startNodeAt(startPos, startLoc);
- this.parseFunctionParams(node);
- if (!this.parseArrow(node)) return;
- return this.parseArrowExpression(node,
- /* params */
- undefined,
- /* isAsync */
- true);
- };
-
- return _class;
- }(superClass)
- );
-});
-
-var 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"
-};
-
-var HEX_NUMBER = /^[\da-fA-F]+$/;
-var 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); // treat as beginning of JSX expression
-
- this.state.context.push(types$1.j_oTag); // start opening tag context
-
- this.state.exprAllowed = false;
-};
-
-types.jsxTagEnd.updateContext = function (prevType) {
- var 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;
-} // Transforms JSX element name to string.
-
-
-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);
- } // istanbul ignore next
-
-
- throw new Error("Node had unexpected type: " + object.type);
-}
-
-var jsxPlugin = (function (superClass) {
- return (
- /*#__PURE__*/
- function (_superClass) {
- _inheritsLoose(_class, _superClass);
-
- function _class() {
- return _superClass.apply(this, arguments) || this;
- }
-
- var _proto = _class.prototype;
-
- // Reads inline JSX contents token.
- _proto.jsxReadToken = function jsxReadToken() {
- var out = "";
- var chunkStart = this.state.pos;
-
- for (;;) {
- if (this.state.pos >= this.input.length) {
- this.raise(this.state.start, "Unterminated JSX contents");
- }
-
- var 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 this.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;
- }
-
- }
- }
- };
-
- _proto.jsxReadNewLine = function jsxReadNewLine(normalizeCRLF) {
- var ch = this.input.charCodeAt(this.state.pos);
- var 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;
- };
-
- _proto.jsxReadString = function jsxReadString(quote) {
- var out = "";
- var chunkStart = ++this.state.pos;
-
- for (;;) {
- if (this.state.pos >= this.input.length) {
- this.raise(this.state.start, "Unterminated string constant");
- }
-
- var 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);
- };
-
- _proto.jsxReadEntity = function jsxReadEntity() {
- var str = "";
- var count = 0;
- var entity;
- var ch = this.input[this.state.pos];
- var startPos = ++this.state.pos;
-
- while (this.state.pos < this.input.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;
- }; // Read a JSX identifier (valid tag or attribute name).
- //
- // Optimized version since JSX identifiers can"t contain
- // escape characters and so can be read as single slice.
- // Also assumes that first character was already checked
- // by isIdentifierStart in readToken.
-
-
- _proto.jsxReadWord = function jsxReadWord() {
- var ch;
- var 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));
- }; // Parse next token as JSX identifier
-
-
- _proto.jsxParseIdentifier = function jsxParseIdentifier() {
- var 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");
- }; // Parse namespaced identifier.
-
-
- _proto.jsxParseNamespacedName = function jsxParseNamespacedName() {
- var startPos = this.state.start;
- var startLoc = this.state.startLoc;
- var name = this.jsxParseIdentifier();
- if (!this.eat(types.colon)) return name;
- var node = this.startNodeAt(startPos, startLoc);
- node.namespace = name;
- node.name = this.jsxParseIdentifier();
- return this.finishNode(node, "JSXNamespacedName");
- }; // Parses element name in any form - namespaced, member
- // or single identifier.
-
-
- _proto.jsxParseElementName = function jsxParseElementName() {
- var startPos = this.state.start;
- var startLoc = this.state.startLoc;
- var node = this.jsxParseNamespacedName();
-
- while (this.eat(types.dot)) {
- var newNode = this.startNodeAt(startPos, startLoc);
- newNode.object = node;
- newNode.property = this.jsxParseIdentifier();
- node = this.finishNode(newNode, "JSXMemberExpression");
- }
-
- return node;
- }; // Parses any type of JSX attribute value.
-
-
- _proto.jsxParseAttributeValue = function jsxParseAttributeValue() {
- var node;
-
- switch (this.state.type) {
- case types.braceL:
- node = this.jsxParseExpressionContainer();
-
- 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");
- }
- }; // JSXEmptyExpression is unique type since it doesn't actually parse anything,
- // and so it should start at the end of last read token (left brace) and finish
- // at the beginning of the next one (right brace).
-
-
- _proto.jsxParseEmptyExpression = function jsxParseEmptyExpression() {
- var node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
- return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
- }; // Parse JSX spread child
-
-
- _proto.jsxParseSpreadChild = function jsxParseSpreadChild() {
- var node = this.startNode();
- this.expect(types.braceL);
- this.expect(types.ellipsis);
- node.expression = this.parseExpression();
- this.expect(types.braceR);
- return this.finishNode(node, "JSXSpreadChild");
- }; // Parses JSX expression enclosed into curly brackets.
-
-
- _proto.jsxParseExpressionContainer = function jsxParseExpressionContainer() {
- var node = this.startNode();
- this.next();
-
- if (this.match(types.braceR)) {
- node.expression = this.jsxParseEmptyExpression();
- } else {
- node.expression = this.parseExpression();
- }
-
- this.expect(types.braceR);
- return this.finishNode(node, "JSXExpressionContainer");
- }; // Parses following JSX attribute name-value pair.
-
-
- _proto.jsxParseAttribute = function jsxParseAttribute() {
- var 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");
- }; // Parses JSX opening tag starting after "<".
-
-
- _proto.jsxParseOpeningElementAt = function jsxParseOpeningElementAt(startPos, startLoc) {
- var node = this.startNodeAt(startPos, startLoc);
-
- if (this.match(types.jsxTagEnd)) {
- this.expect(types.jsxTagEnd);
- return this.finishNode(node, "JSXOpeningFragment");
- }
-
- node.attributes = [];
- node.name = this.jsxParseElementName();
-
- while (!this.match(types.slash) && !this.match(types.jsxTagEnd)) {
- node.attributes.push(this.jsxParseAttribute());
- }
-
- node.selfClosing = this.eat(types.slash);
- this.expect(types.jsxTagEnd);
- return this.finishNode(node, "JSXOpeningElement");
- }; // Parses JSX closing tag starting after "</".
-
-
- _proto.jsxParseClosingElementAt = function jsxParseClosingElementAt(startPos, startLoc) {
- var 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");
- }; // Parses entire JSX element, including it"s opening tag
- // (starting after "<"), attributes, contents and closing tag.
-
-
- _proto.jsxParseElementAt = function jsxParseElementAt(startPos, startLoc) {
- var node = this.startNodeAt(startPos, startLoc);
- var children = [];
- var openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
- var 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:
- if (this.lookahead().type === types.ellipsis) {
- children.push(this.jsxParseSpreadChild());
- } else {
- children.push(this.jsxParseExpressionContainer());
- }
-
- break;
- // istanbul ignore next - should never happen
-
- default:
- throw this.unexpected();
- }
- }
-
- if (isFragment(openingElement) && !isFragment(closingElement)) {
- this.raise( // $FlowIgnore
- closingElement.start, "Expected corresponding JSX closing tag for <>");
- } else if (!isFragment(openingElement) && isFragment(closingElement)) {
- this.raise( // $FlowIgnore
- closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">");
- } else if (!isFragment(openingElement) && !isFragment(closingElement)) {
- if ( // $FlowIgnore
- getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
- this.raise( // $FlowIgnore
- 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");
- }
-
- return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement");
- }; // Parses entire JSX element from current position.
-
-
- _proto.jsxParseElement = function jsxParseElement() {
- var startPos = this.state.start;
- var startLoc = this.state.startLoc;
- this.next();
- return this.jsxParseElementAt(startPos, startLoc);
- }; // ==================================
- // Overrides
- // ==================================
-
-
- _proto.parseExprAtom = function parseExprAtom(refShortHandDefaultPos) {
- if (this.match(types.jsxText)) {
- return this.parseLiteral(this.state.value, "JSXText");
- } else if (this.match(types.jsxTagStart)) {
- return this.jsxParseElement();
- } else {
- return _superClass.prototype.parseExprAtom.call(this, refShortHandDefaultPos);
- }
- };
-
- _proto.readToken = function readToken(code) {
- if (this.state.inPropertyName) return _superClass.prototype.readToken.call(this, code);
- var 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.state.pos;
- return this.finishToken(types.jsxTagStart);
- }
-
- return _superClass.prototype.readToken.call(this, code);
- };
-
- _proto.updateContext = function updateContext(prevType) {
- if (this.match(types.braceL)) {
- var 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 {
- _superClass.prototype.updateContext.call(this, prevType);
- }
-
- this.state.exprAllowed = true;
- } else if (this.match(types.slash) && prevType === types.jsxTagStart) {
- this.state.context.length -= 2; // do not consider JSX expr -> JSX open tag -> ... anymore
-
- this.state.context.push(types$1.j_cTag); // reconsider as closing tag context
-
- this.state.exprAllowed = false;
- } else {
- return _superClass.prototype.updateContext.call(this, prevType);
- }
- };
-
- return _class;
- }(superClass)
- );
-});
-
-function nonNull(x) {
- if (x == null) {
- // $FlowIgnore
- throw new Error(`Unexpected ${x} value.`);
- }
-
- return x;
-}
-
-function assert(x) {
- if (!x) {
- throw new Error("Assert fail");
- }
-}
-
-// Doesn't handle "void" or "null" because those are keywords, not identifiers.
-function keywordTypeFromName(value) {
- switch (value) {
- case "any":
- return "TSAnyKeyword";
-
- case "boolean":
- return "TSBooleanKeyword";
-
- case "never":
- return "TSNeverKeyword";
-
- case "number":
- return "TSNumberKeyword";
-
- case "object":
- return "TSObjectKeyword";
-
- case "string":
- return "TSStringKeyword";
-
- case "symbol":
- return "TSSymbolKeyword";
-
- case "undefined":
- return "TSUndefinedKeyword";
-
- default:
- return undefined;
- }
-}
-
-var typescriptPlugin = (function (superClass) {
- return (
- /*#__PURE__*/
- function (_superClass) {
- _inheritsLoose(_class, _superClass);
-
- function _class() {
- return _superClass.apply(this, arguments) || this;
- }
-
- var _proto = _class.prototype;
-
- _proto.tsIsIdentifier = function tsIsIdentifier() {
- // TODO: actually a bit more complex in TypeScript, but shouldn't matter.
- // See https://github.com/Microsoft/TypeScript/issues/15008
- return this.match(types.name);
- };
-
- _proto.tsNextTokenCanFollowModifier = function tsNextTokenCanFollowModifier() {
- // Note: TypeScript's implementation is much more complicated because
- // more things are considered modifiers there.
- // This implementation only handles modifiers not handled by babylon itself. And "static".
- // TODO: Would be nice to avoid lookahead. Want a hasLineBreakUpNext() method...
- this.next();
- return !this.hasPrecedingLineBreak() && !this.match(types.parenL) && !this.match(types.colon) && !this.match(types.eq) && !this.match(types.question);
- };
- /** Parses a modifier matching one the given modifier names. */
-
-
- _proto.tsParseModifier = function tsParseModifier(allowedModifiers) {
- if (!this.match(types.name)) {
- return undefined;
- }
-
- var modifier = this.state.value;
-
- if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {
- return modifier;
- }
-
- return undefined;
- };
-
- _proto.tsIsListTerminator = function 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");
- };
-
- _proto.tsParseList = function tsParseList(kind, parseElement) {
- var result = [];
-
- while (!this.tsIsListTerminator(kind)) {
- // Skipping "parseListElement" from the TS source since that's just for error handling.
- result.push(parseElement());
- }
-
- return result;
- };
-
- _proto.tsParseDelimitedList = function tsParseDelimitedList(kind, parseElement) {
- return nonNull(this.tsParseDelimitedListWorker(kind, parseElement,
- /* expectSuccess */
- true));
- };
-
- _proto.tsTryParseDelimitedList = function tsTryParseDelimitedList(kind, parseElement) {
- return this.tsParseDelimitedListWorker(kind, parseElement,
- /* expectSuccess */
- false);
- };
- /**
- * If !expectSuccess, returns undefined instead of failing to parse.
- * If expectSuccess, parseElement should always return a defined value.
- */
-
-
- _proto.tsParseDelimitedListWorker = function tsParseDelimitedListWorker(kind, parseElement, expectSuccess) {
- var result = [];
-
- while (true) {
- if (this.tsIsListTerminator(kind)) {
- break;
- }
-
- var element = parseElement();
-
- if (element == null) {
- return undefined;
- }
-
- result.push(element);
-
- if (this.eat(types.comma)) {
- continue;
- }
-
- if (this.tsIsListTerminator(kind)) {
- break;
- }
-
- if (expectSuccess) {
- // This will fail with an error about a missing comma
- this.expect(types.comma);
- }
-
- return undefined;
- }
-
- return result;
- };
-
- _proto.tsParseBracketedList = function tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) {
- if (!skipFirstToken) {
- if (bracket) {
- this.expect(types.bracketL);
- } else {
- this.expectRelational("<");
- }
- }
-
- var result = this.tsParseDelimitedList(kind, parseElement);
-
- if (bracket) {
- this.expect(types.bracketR);
- } else {
- this.expectRelational(">");
- }
-
- return result;
- };
-
- _proto.tsParseEntityName = function tsParseEntityName(allowReservedWords) {
- var entity = this.parseIdentifier();
-
- while (this.eat(types.dot)) {
- var node = this.startNodeAtNode(entity);
- node.left = entity;
- node.right = this.parseIdentifier(allowReservedWords);
- entity = this.finishNode(node, "TSQualifiedName");
- }
-
- return entity;
- };
-
- _proto.tsParseTypeReference = function tsParseTypeReference() {
- var node = this.startNode();
- node.typeName = this.tsParseEntityName(
- /* allowReservedWords */
- false);
-
- if (!this.hasPrecedingLineBreak() && this.isRelational("<")) {
- node.typeParameters = this.tsParseTypeArguments();
- }
-
- return this.finishNode(node, "TSTypeReference");
- };
-
- _proto.tsParseThisTypePredicate = function tsParseThisTypePredicate(lhs) {
- this.next();
- var node = this.startNode();
- node.parameterName = lhs;
- node.typeAnnotation = this.tsParseTypeAnnotation(
- /* eatColon */
- false);
- return this.finishNode(node, "TSTypePredicate");
- };
-
- _proto.tsParseThisTypeNode = function tsParseThisTypeNode() {
- var node = this.startNode();
- this.next();
- return this.finishNode(node, "TSThisType");
- };
-
- _proto.tsParseTypeQuery = function tsParseTypeQuery() {
- var node = this.startNode();
- this.expect(types._typeof);
- node.exprName = this.tsParseEntityName(
- /* allowReservedWords */
- true);
- return this.finishNode(node, "TSTypeQuery");
- };
-
- _proto.tsParseTypeParameter = function tsParseTypeParameter() {
- var node = this.startNode();
- node.name = this.parseIdentifierName(node.start);
-
- if (this.eat(types._extends)) {
- node.constraint = this.tsParseType();
- }
-
- if (this.eat(types.eq)) {
- node.default = this.tsParseType();
- }
-
- return this.finishNode(node, "TSTypeParameter");
- };
-
- _proto.tsTryParseTypeParameters = function tsTryParseTypeParameters() {
- if (this.isRelational("<")) {
- return this.tsParseTypeParameters();
- }
- };
-
- _proto.tsParseTypeParameters = function tsParseTypeParameters() {
- var node = this.startNode();
-
- if (this.isRelational("<") || this.match(types.jsxTagStart)) {
- this.next();
- } else {
- this.unexpected();
- }
-
- node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this),
- /* bracket */
- false,
- /* skipFirstToken */
- true);
- return this.finishNode(node, "TSTypeParameterDeclaration");
- }; // Note: In TypeScript implementation we must provide `yieldContext` and `awaitContext`,
- // but here it's always false, because this is only used for types.
-
-
- _proto.tsFillSignature = function tsFillSignature(returnToken, signature) {
- // Arrow fns *must* have return token (`=>`). Normal functions can omit it.
- var 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);
- }
- };
-
- _proto.tsParseBindingListForSignature = function tsParseBindingListForSignature() {
- var _this = this;
-
- return this.parseBindingList(types.parenR).map(function (pattern) {
- if (pattern.type !== "Identifier" && pattern.type !== "RestElement") {
- throw _this.unexpected(pattern.start, "Name in a signature must be an Identifier.");
- }
-
- return pattern;
- });
- };
-
- _proto.tsParseTypeMemberSemicolon = function tsParseTypeMemberSemicolon() {
- if (!this.eat(types.comma)) {
- this.semicolon();
- }
- };
-
- _proto.tsParseSignatureMember = function tsParseSignatureMember(kind) {
- var node = this.startNode();
-
- if (kind === "TSConstructSignatureDeclaration") {
- this.expect(types._new);
- }
-
- this.tsFillSignature(types.colon, node);
- this.tsParseTypeMemberSemicolon();
- return this.finishNode(node, kind);
- };
-
- _proto.tsIsUnambiguouslyIndexSignature = function tsIsUnambiguouslyIndexSignature() {
- this.next(); // Skip '{'
-
- return this.eat(types.name) && this.match(types.colon);
- };
-
- _proto.tsTryParseIndexSignature = function tsTryParseIndexSignature(node) {
- if (!(this.match(types.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) {
- return undefined;
- }
-
- this.expect(types.bracketL);
- var id = this.parseIdentifier();
- this.expect(types.colon);
- id.typeAnnotation = this.tsParseTypeAnnotation(
- /* eatColon */
- false);
- this.expect(types.bracketR);
- node.parameters = [id];
- var type = this.tsTryParseTypeAnnotation();
- if (type) node.typeAnnotation = type;
- this.tsParseTypeMemberSemicolon();
- return this.finishNode(node, "TSIndexSignature");
- };
-
- _proto.tsParsePropertyOrMethodSignature = function tsParsePropertyOrMethodSignature(node, readonly) {
- this.parsePropertyName(node);
- if (this.eat(types.question)) node.optional = true;
- var nodeAny = node;
-
- if (!readonly && (this.match(types.parenL) || this.isRelational("<"))) {
- var method = nodeAny;
- this.tsFillSignature(types.colon, method);
- this.tsParseTypeMemberSemicolon();
- return this.finishNode(method, "TSMethodSignature");
- } else {
- var property = nodeAny;
- if (readonly) property.readonly = true;
- var type = this.tsTryParseTypeAnnotation();
- if (type) property.typeAnnotation = type;
- this.tsParseTypeMemberSemicolon();
- return this.finishNode(property, "TSPropertySignature");
- }
- };
-
- _proto.tsParseTypeMember = function tsParseTypeMember() {
- if (this.match(types.parenL) || this.isRelational("<")) {
- return this.tsParseSignatureMember("TSCallSignatureDeclaration");
- }
-
- if (this.match(types._new) && this.tsLookAhead(this.tsIsStartOfConstructSignature.bind(this))) {
- return this.tsParseSignatureMember("TSConstructSignatureDeclaration");
- } // Instead of fullStart, we create a node here.
-
-
- var node = this.startNode();
- var readonly = !!this.tsParseModifier(["readonly"]);
- var idx = this.tsTryParseIndexSignature(node);
-
- if (idx) {
- if (readonly) node.readonly = true;
- return idx;
- }
-
- return this.tsParsePropertyOrMethodSignature(node, readonly);
- };
-
- _proto.tsIsStartOfConstructSignature = function tsIsStartOfConstructSignature() {
- this.next();
- return this.match(types.parenL) || this.isRelational("<");
- };
-
- _proto.tsParseTypeLiteral = function tsParseTypeLiteral() {
- var node = this.startNode();
- node.members = this.tsParseObjectTypeMembers();
- return this.finishNode(node, "TSTypeLiteral");
- };
-
- _proto.tsParseObjectTypeMembers = function tsParseObjectTypeMembers() {
- this.expect(types.braceL);
- var members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
- this.expect(types.braceR);
- return members;
- };
-
- _proto.tsIsStartOfMappedType = function tsIsStartOfMappedType() {
- this.next();
-
- 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);
- };
-
- _proto.tsParseMappedTypeParameter = function tsParseMappedTypeParameter() {
- var node = this.startNode();
- node.name = this.parseIdentifierName(node.start);
- this.expect(types._in);
- node.constraint = this.tsParseType();
- return this.finishNode(node, "TSTypeParameter");
- };
-
- _proto.tsParseMappedType = function tsParseMappedType() {
- var node = this.startNode();
- this.expect(types.braceL);
-
- if (this.eatContextual("readonly")) {
- node.readonly = true;
- }
-
- this.expect(types.bracketL);
- node.typeParameter = this.tsParseMappedTypeParameter();
- this.expect(types.bracketR);
-
- if (this.eat(types.question)) {
- node.optional = true;
- }
-
- node.typeAnnotation = this.tsTryParseType();
- this.semicolon();
- this.expect(types.braceR);
- return this.finishNode(node, "TSMappedType");
- };
-
- _proto.tsParseTupleType = function tsParseTupleType() {
- var node = this.startNode();
- node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseType.bind(this),
- /* bracket */
- true,
- /* skipFirstToken */
- false);
- return this.finishNode(node, "TSTupleType");
- };
-
- _proto.tsParseParenthesizedType = function tsParseParenthesizedType() {
- var node = this.startNode();
- this.expect(types.parenL);
- node.typeAnnotation = this.tsParseType();
- this.expect(types.parenR);
- return this.finishNode(node, "TSParenthesizedType");
- };
-
- _proto.tsParseFunctionOrConstructorType = function tsParseFunctionOrConstructorType(type) {
- var node = this.startNode();
-
- if (type === "TSConstructorType") {
- this.expect(types._new);
- }
-
- this.tsFillSignature(types.arrow, node);
- return this.finishNode(node, type);
- };
-
- _proto.tsParseLiteralTypeNode = function tsParseLiteralTypeNode() {
- var _this2 = this;
-
- var node = this.startNode();
-
- node.literal = function () {
- switch (_this2.state.type) {
- case types.num:
- return _this2.parseLiteral(_this2.state.value, "NumericLiteral");
-
- case types.string:
- return _this2.parseLiteral(_this2.state.value, "StringLiteral");
-
- case types._true:
- case types._false:
- return _this2.parseBooleanLiteral();
-
- default:
- throw _this2.unexpected();
- }
- }();
-
- return this.finishNode(node, "TSLiteralType");
- };
-
- _proto.tsParseNonArrayType = function tsParseNonArrayType() {
- switch (this.state.type) {
- case types.name:
- case types._void:
- case types._null:
- {
- var type = this.match(types._void) ? "TSVoidKeyword" : this.match(types._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value);
-
- if (type !== undefined && this.lookahead().type !== types.dot) {
- var 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 === "-") {
- var _node = this.startNode();
-
- this.next();
-
- if (!this.match(types.num)) {
- throw this.unexpected();
- }
-
- _node.literal = this.parseLiteral(-this.state.value, "NumericLiteral", _node.start, _node.loc.start);
- return this.finishNode(_node, "TSLiteralType");
- }
-
- break;
-
- case types._this:
- {
- var thisKeyword = this.tsParseThisTypeNode();
-
- if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
- return this.tsParseThisTypePredicate(thisKeyword);
- } else {
- return thisKeyword;
- }
- }
-
- case types._typeof:
- return this.tsParseTypeQuery();
-
- 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();
- }
-
- throw this.unexpected();
- };
-
- _proto.tsParseArrayTypeOrHigher = function tsParseArrayTypeOrHigher() {
- var type = this.tsParseNonArrayType();
-
- while (!this.hasPrecedingLineBreak() && this.eat(types.bracketL)) {
- if (this.match(types.bracketR)) {
- var node = this.startNodeAtNode(type);
- node.elementType = type;
- this.expect(types.bracketR);
- type = this.finishNode(node, "TSArrayType");
- } else {
- var _node2 = this.startNodeAtNode(type);
-
- _node2.objectType = type;
- _node2.indexType = this.tsParseType();
- this.expect(types.bracketR);
- type = this.finishNode(_node2, "TSIndexedAccessType");
- }
- }
-
- return type;
- };
-
- _proto.tsParseTypeOperator = function tsParseTypeOperator(operator) {
- var node = this.startNode();
- this.expectContextual(operator);
- node.operator = operator;
- node.typeAnnotation = this.tsParseTypeOperatorOrHigher();
- return this.finishNode(node, "TSTypeOperator");
- };
-
- _proto.tsParseTypeOperatorOrHigher = function tsParseTypeOperatorOrHigher() {
- if (this.isContextual("keyof")) {
- return this.tsParseTypeOperator("keyof");
- }
-
- return this.tsParseArrayTypeOrHigher();
- };
-
- _proto.tsParseUnionOrIntersectionType = function tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
- this.eat(operator);
- var type = parseConstituentType();
-
- if (this.match(operator)) {
- var types$$1 = [type];
-
- while (this.eat(operator)) {
- types$$1.push(parseConstituentType());
- }
-
- var node = this.startNodeAtNode(type);
- node.types = types$$1;
- type = this.finishNode(node, kind);
- }
-
- return type;
- };
-
- _proto.tsParseIntersectionTypeOrHigher = function tsParseIntersectionTypeOrHigher() {
- return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types.bitwiseAND);
- };
-
- _proto.tsParseUnionTypeOrHigher = function tsParseUnionTypeOrHigher() {
- return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types.bitwiseOR);
- };
-
- _proto.tsIsStartOfFunctionType = function tsIsStartOfFunctionType() {
- if (this.isRelational("<")) {
- return true;
- }
-
- return this.match(types.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
- };
-
- _proto.tsSkipParameterStart = function tsSkipParameterStart() {
- if (this.match(types.name) || this.match(types._this)) {
- this.next();
- return true;
- }
-
- return false;
- };
-
- _proto.tsIsUnambiguouslyStartOfFunctionType = function 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)) {
- // ( xxx :
- // ( xxx ,
- // ( xxx ?
- // ( xxx =
- return true;
- }
-
- if (this.match(types.parenR)) {
- this.next();
-
- if (this.match(types.arrow)) {
- // ( xxx ) =>
- return true;
- }
- }
- }
-
- return false;
- };
-
- _proto.tsParseTypeOrTypePredicateAnnotation = function tsParseTypeOrTypePredicateAnnotation(returnToken) {
- var t = this.startNode();
- this.expect(returnToken);
- var typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));
-
- if (!typePredicateVariable) {
- return this.tsParseTypeAnnotation(
- /* eatColon */
- false, t);
- }
-
- var type = this.tsParseTypeAnnotation(
- /* eatColon */
- false);
- var node = this.startNodeAtNode(typePredicateVariable);
- node.parameterName = typePredicateVariable;
- node.typeAnnotation = type;
- t.typeAnnotation = this.finishNode(node, "TSTypePredicate");
- return this.finishNode(t, "TSTypeAnnotation");
- };
-
- _proto.tsTryParseTypeOrTypePredicateAnnotation = function tsTryParseTypeOrTypePredicateAnnotation() {
- return this.match(types.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types.colon) : undefined;
- };
-
- _proto.tsTryParseTypeAnnotation = function tsTryParseTypeAnnotation() {
- return this.match(types.colon) ? this.tsParseTypeAnnotation() : undefined;
- };
-
- _proto.tsTryParseType = function tsTryParseType() {
- return this.eat(types.colon) ? this.tsParseType() : undefined;
- };
-
- _proto.tsParseTypePredicatePrefix = function tsParseTypePredicatePrefix() {
- var id = this.parseIdentifier();
-
- if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
- this.next();
- return id;
- }
- };
-
- _proto.tsParseTypeAnnotation = function tsParseTypeAnnotation(eatColon, t) {
- if (eatColon === void 0) {
- eatColon = true;
- }
-
- if (t === void 0) {
- t = this.startNode();
- }
-
- if (eatColon) this.expect(types.colon);
- t.typeAnnotation = this.tsParseType();
- return this.finishNode(t, "TSTypeAnnotation");
- };
-
- _proto.tsParseType = function tsParseType() {
- // Need to set `state.inType` so that we don't parse JSX in a type context.
- var oldInType = this.state.inType;
- this.state.inType = true;
-
- try {
- if (this.tsIsStartOfFunctionType()) {
- return this.tsParseFunctionOrConstructorType("TSFunctionType");
- }
-
- if (this.match(types._new)) {
- // As in `new () => Date`
- return this.tsParseFunctionOrConstructorType("TSConstructorType");
- }
-
- return this.tsParseUnionTypeOrHigher();
- } finally {
- this.state.inType = oldInType;
- }
- };
-
- _proto.tsParseTypeAssertion = function tsParseTypeAssertion() {
- var node = this.startNode();
- node.typeAnnotation = this.tsParseType();
- this.expectRelational(">");
- node.expression = this.parseMaybeUnary();
- return this.finishNode(node, "TSTypeAssertion");
- };
-
- _proto.tsTryParseTypeArgumentsInExpression = function tsTryParseTypeArgumentsInExpression() {
- var _this3 = this;
-
- return this.tsTryParseAndCatch(function () {
- var res = _this3.startNode();
-
- _this3.expectRelational("<");
-
- var typeArguments = _this3.tsParseDelimitedList("TypeParametersOrArguments", _this3.tsParseType.bind(_this3));
-
- _this3.expectRelational(">");
-
- res.params = typeArguments;
-
- _this3.finishNode(res, "TSTypeParameterInstantiation");
-
- _this3.expect(types.parenL);
-
- return res;
- });
- };
-
- _proto.tsParseHeritageClause = function tsParseHeritageClause() {
- return this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this));
- };
-
- _proto.tsParseExpressionWithTypeArguments = function tsParseExpressionWithTypeArguments() {
- var node = this.startNode(); // Note: TS uses parseLeftHandSideExpressionOrHigher,
- // then has grammar errors later if it's not an EntityName.
-
- node.expression = this.tsParseEntityName(
- /* allowReservedWords */
- false);
-
- if (this.isRelational("<")) {
- node.typeParameters = this.tsParseTypeArguments();
- }
-
- return this.finishNode(node, "TSExpressionWithTypeArguments");
- };
-
- _proto.tsParseInterfaceDeclaration = function tsParseInterfaceDeclaration(node) {
- node.id = this.parseIdentifier();
- node.typeParameters = this.tsTryParseTypeParameters();
-
- if (this.eat(types._extends)) {
- node.extends = this.tsParseHeritageClause();
- }
-
- var body = this.startNode();
- body.body = this.tsParseObjectTypeMembers();
- node.body = this.finishNode(body, "TSInterfaceBody");
- return this.finishNode(node, "TSInterfaceDeclaration");
- };
-
- _proto.tsParseTypeAliasDeclaration = function tsParseTypeAliasDeclaration(node) {
- node.id = this.parseIdentifier();
- node.typeParameters = this.tsTryParseTypeParameters();
- this.expect(types.eq);
- node.typeAnnotation = this.tsParseType();
- this.semicolon();
- return this.finishNode(node, "TSTypeAliasDeclaration");
- };
-
- _proto.tsParseEnumMember = function tsParseEnumMember() {
- var node = this.startNode(); // Computed property names are grammar errors in an enum, so accept just string literal or identifier.
-
- node.id = this.match(types.string) ? this.parseLiteral(this.state.value, "StringLiteral") : this.parseIdentifier(
- /* liberal */
- true);
-
- if (this.eat(types.eq)) {
- node.initializer = this.parseMaybeAssign();
- }
-
- return this.finishNode(node, "TSEnumMember");
- };
-
- _proto.tsParseEnumDeclaration = function tsParseEnumDeclaration(node, isConst) {
- if (isConst) node.const = true;
- node.id = this.parseIdentifier();
- this.expect(types.braceL);
- node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
- this.expect(types.braceR);
- return this.finishNode(node, "TSEnumDeclaration");
- };
-
- _proto.tsParseModuleBlock = function tsParseModuleBlock() {
- var node = this.startNode();
- this.expect(types.braceL); // Inside of a module block is considered "top-level", meaning it can have imports and exports.
-
- this.parseBlockOrModuleBlockBody(node.body = [],
- /* directives */
- undefined,
- /* topLevel */
- true,
- /* end */
- types.braceR);
- return this.finishNode(node, "TSModuleBlock");
- };
-
- _proto.tsParseModuleOrNamespaceDeclaration = function tsParseModuleOrNamespaceDeclaration(node) {
- node.id = this.parseIdentifier();
-
- if (this.eat(types.dot)) {
- var inner = this.startNode();
- this.tsParseModuleOrNamespaceDeclaration(inner);
- node.body = inner;
- } else {
- node.body = this.tsParseModuleBlock();
- }
-
- return this.finishNode(node, "TSModuleDeclaration");
- };
-
- _proto.tsParseAmbientExternalModuleDeclaration = function 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");
- };
-
- _proto.tsParseImportEqualsDeclaration = function 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");
- };
-
- _proto.tsIsExternalModuleReference = function tsIsExternalModuleReference() {
- return this.isContextual("require") && this.lookahead().type === types.parenL;
- };
-
- _proto.tsParseModuleReference = function tsParseModuleReference() {
- return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(
- /* allowReservedWords */
- false);
- };
-
- _proto.tsParseExternalModuleReference = function tsParseExternalModuleReference() {
- var node = this.startNode();
- this.expectContextual("require");
- this.expect(types.parenL);
-
- if (!this.match(types.string)) {
- throw this.unexpected();
- }
-
- node.expression = this.parseLiteral(this.state.value, "StringLiteral");
- this.expect(types.parenR);
- return this.finishNode(node, "TSExternalModuleReference");
- }; // Utilities
-
-
- _proto.tsLookAhead = function tsLookAhead(f) {
- var state = this.state.clone();
- var res = f();
- this.state = state;
- return res;
- };
-
- _proto.tsTryParseAndCatch = function tsTryParseAndCatch(f) {
- var state = this.state.clone();
-
- try {
- return f();
- } catch (e) {
- if (e instanceof SyntaxError) {
- this.state = state;
- return undefined;
- }
-
- throw e;
- }
- };
-
- _proto.tsTryParse = function tsTryParse(f) {
- var state = this.state.clone();
- var result = f();
-
- if (result !== undefined && result !== false) {
- return result;
- } else {
- this.state = state;
- return undefined;
- }
- };
-
- _proto.nodeWithSamePosition = function nodeWithSamePosition(original, type) {
- var node = this.startNodeAtNode(original);
- node.type = type;
- node.end = original.end;
- node.loc.end = original.loc.end;
-
- if (original.leadingComments) {
- node.leadingComments = original.leadingComments;
- }
-
- if (original.trailingComments) {
- node.trailingComments = original.trailingComments;
- }
-
- if (original.innerComments) node.innerComments = original.innerComments;
- return node;
- };
-
- _proto.tsTryParseDeclare = function tsTryParseDeclare(nany) {
- switch (this.state.type) {
- case types._function:
- this.next();
- return this.parseFunction(nany,
- /* isStatement */
- true);
-
- case types._class:
- return this.parseClass(nany,
- /* isStatement */
- true,
- /* optionalId */
- false);
-
- case types._const:
- if (this.match(types._const) && this.isLookaheadContextual("enum")) {
- // `const enum = 0;` not allowed because "enum" is a strict mode reserved word.
- this.expect(types._const);
- this.expectContextual("enum");
- return this.tsParseEnumDeclaration(nany,
- /* isConst */
- true);
- }
-
- // falls through
-
- case types._var:
- case types._let:
- return this.parseVarStatement(nany, this.state.type);
-
- case types.name:
- {
- var value = this.state.value;
-
- if (value === "global") {
- return this.tsParseAmbientExternalModuleDeclaration(nany);
- } else {
- return this.tsParseDeclaration(nany, value,
- /* next */
- true);
- }
- }
- }
- }; // Note: this won't be called unless the keyword is allowed in `shouldParseExportDeclaration`.
-
-
- _proto.tsTryParseExportDeclaration = function tsTryParseExportDeclaration() {
- return this.tsParseDeclaration(this.startNode(), this.state.value,
- /* next */
- true);
- };
-
- _proto.tsParseExpressionStatement = function tsParseExpressionStatement(node, expr) {
- switch (expr.name) {
- case "declare":
- {
- var declaration = this.tsTryParseDeclare(node);
-
- if (declaration) {
- declaration.declare = true;
- return declaration;
- }
-
- break;
- }
-
- case "global":
- // `global { }` (with no `declare`) may appear inside an ambient module declaration.
- // Would like to use tsParseAmbientExternalModuleDeclaration here, but already ran past "global".
- if (this.match(types.braceL)) {
- var 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,
- /* next */
- false);
- }
- }; // Common to tsTryParseDeclare, tsTryParseExportDeclaration, and tsParseExpressionStatement.
-
-
- _proto.tsParseDeclaration = function tsParseDeclaration(node, value, next) {
- switch (value) {
- case "abstract":
- if (next || this.match(types._class)) {
- var cls = node;
- cls.abstract = true;
- if (next) this.next();
- return this.parseClass(cls,
- /* isStatement */
- true,
- /* optionalId */
- false);
- }
-
- break;
-
- case "enum":
- if (next || this.match(types.name)) {
- if (next) this.next();
- return this.tsParseEnumDeclaration(node,
- /* isConst */
- false);
- }
-
- break;
-
- case "interface":
- if (next || this.match(types.name)) {
- 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 (next || this.match(types.name)) {
- return this.tsParseModuleOrNamespaceDeclaration(node);
- }
-
- break;
-
- case "namespace":
- if (next || this.match(types.name)) {
- if (next) this.next();
- return this.tsParseModuleOrNamespaceDeclaration(node);
- }
-
- break;
-
- case "type":
- if (next || this.match(types.name)) {
- if (next) this.next();
- return this.tsParseTypeAliasDeclaration(node);
- }
-
- break;
- }
- };
-
- _proto.tsTryParseGenericAsyncArrowFunction = function tsTryParseGenericAsyncArrowFunction(startPos, startLoc) {
- var _this4 = this;
-
- var res = this.tsTryParseAndCatch(function () {
- var node = _this4.startNodeAt(startPos, startLoc);
-
- node.typeParameters = _this4.tsParseTypeParameters(); // Don't use overloaded parseFunctionParams which would look for "<" again.
-
- _superClass.prototype.parseFunctionParams.call(_this4, node);
-
- node.returnType = _this4.tsTryParseTypeOrTypePredicateAnnotation();
-
- _this4.expect(types.arrow);
-
- return node;
- });
-
- if (!res) {
- return undefined;
- }
-
- res.id = null;
- res.generator = false;
- res.expression = true; // May be set again by parseFunctionBody.
-
- res.async = true;
- this.parseFunctionBody(res, true);
- return this.finishNode(res, "ArrowFunctionExpression");
- };
-
- _proto.tsParseTypeArguments = function tsParseTypeArguments() {
- var node = this.startNode();
- this.expectRelational("<");
- node.params = this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this));
- this.expectRelational(">");
- return this.finishNode(node, "TSTypeParameterInstantiation");
- };
-
- _proto.tsIsDeclarationStart = function 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;
- }; // ======================================================
- // OVERRIDES
- // ======================================================
-
-
- _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() {
- if (this.tsIsDeclarationStart()) return false;
- return _superClass.prototype.isExportDefaultSpecifier.call(this);
- };
-
- _proto.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) {
- var accessibility;
- var readonly = false;
-
- if (allowModifiers) {
- accessibility = this.parseAccessModifier();
- readonly = !!this.tsParseModifier(["readonly"]);
- }
-
- var left = this.parseMaybeDefault();
- this.parseAssignableListItemTypes(left);
- var elt = this.parseMaybeDefault(left.start, left.loc.start, left);
-
- if (accessibility || readonly) {
- var pp = this.startNodeAtNode(elt);
-
- 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");
- } else {
- if (decorators.length) {
- left.decorators = decorators;
- }
-
- return elt;
- }
- };
-
- _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) {
- // For arrow functions, `parseArrow` handles the return type itself.
- if (!allowExpressionBody && this.match(types.colon)) {
- node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon);
- }
-
- var bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : undefined;
-
- if (bodilessType && !this.match(types.braceL) && this.isLineTerminator()) {
- this.finishNode(node, bodilessType);
- return;
- }
-
- _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, type, allowExpressionBody);
- };
-
- _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) {
- if (!this.hasPrecedingLineBreak() && this.eat(types.bang)) {
- var nonNullExpression = this.startNodeAt(startPos, startLoc);
- nonNullExpression.expression = base;
- return this.finishNode(nonNullExpression, "TSNonNullExpression");
- }
-
- if (!noCalls && this.isRelational("<")) {
- if (this.atPossibleAsync(base)) {
- // Almost certainly this is a generic async function `async <T>() => ...
- // But it might be a call with a type argument `async<T>();`
- var asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc);
-
- if (asyncArrowFn) {
- return asyncArrowFn;
- }
- }
-
- var node = this.startNodeAt(startPos, startLoc);
- node.callee = base; // May be passing type arguments. But may just be the `<` operator.
-
- var typeArguments = this.tsTryParseTypeArgumentsInExpression(); // Also eats the "("
-
- if (typeArguments) {
- // possibleAsync always false here, because we would have handled it above.
- // $FlowIgnore (won't be any undefined arguments)
- node.arguments = this.parseCallExpressionArguments(types.parenR,
- /* possibleAsync */
- false);
- node.typeParameters = typeArguments;
- return this.finishCallExpression(node);
- }
- }
-
- return _superClass.prototype.parseSubscript.call(this, base, startPos, startLoc, noCalls, state);
- };
-
- _proto.parseNewArguments = function parseNewArguments(node) {
- var _this5 = this;
-
- if (this.isRelational("<")) {
- // tsTryParseAndCatch is expensive, so avoid if not necessary.
- // 99% certain this is `new C<T>();`. But may be `new C < T;`, which is also legal.
- var typeParameters = this.tsTryParseAndCatch(function () {
- var args = _this5.tsParseTypeArguments();
-
- if (!_this5.match(types.parenL)) _this5.unexpected();
- return args;
- });
-
- if (typeParameters) {
- node.typeParameters = typeParameters;
- }
- }
-
- _superClass.prototype.parseNewArguments.call(this, node);
- };
-
- _proto.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) {
- if (nonNull(types._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.eatContextual("as")) {
- var node = this.startNodeAt(leftStartPos, leftStartLoc);
- node.expression = left;
- node.typeAnnotation = this.tsParseType();
- this.finishNode(node, "TSAsExpression");
- return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn);
- }
-
- return _superClass.prototype.parseExprOp.call(this, left, leftStartPos, leftStartLoc, minPrec, noIn);
- };
-
- _proto.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, // eslint-disable-next-line no-unused-vars
- isBinding) {} // Don't bother checking for TypeScript code.
- // Strict mode words may be allowed as in `declare namespace N { const static: number; }`.
- // And we have a type checker anyway, so don't bother having the parser do it.
-
- /*
- Don't bother doing this check in TypeScript code because:
- 1. We may have a nested export statement with the same name:
- export const x = 0;
- export namespace N {
- export const x = 1;
- }
- 2. We have a type checker to warn us about this sort of thing.
- */
- ;
-
- _proto.checkDuplicateExports = function checkDuplicateExports() {};
-
- _proto.parseImport = function parseImport(node) {
- if (this.match(types.name) && this.lookahead().type === types.eq) {
- return this.tsParseImportEqualsDeclaration(node);
- }
-
- return _superClass.prototype.parseImport.call(this, node);
- };
-
- _proto.parseExport = function parseExport(node) {
- if (this.match(types._import)) {
- // `export import A = B;`
- this.expect(types._import);
- return this.tsParseImportEqualsDeclaration(node,
- /* isExport */
- true);
- } else if (this.eat(types.eq)) {
- // `export = x;`
- var assign = node;
- assign.expression = this.parseExpression();
- this.semicolon();
- return this.finishNode(assign, "TSExportAssignment");
- } else if (this.eatContextual("as")) {
- // `export as namespace A;`
- var decl = node; // See `parseNamespaceExportDeclaration` in TypeScript's own parser
-
- this.expectContextual("namespace");
- decl.id = this.parseIdentifier();
- this.semicolon();
- return this.finishNode(decl, "TSNamespaceExportDeclaration");
- } else {
- return _superClass.prototype.parseExport.call(this, node);
- }
- };
-
- _proto.parseExportDefaultExpression = function parseExportDefaultExpression() {
- if (this.isContextual("abstract") && this.lookahead().type === types._class) {
- var cls = this.startNode();
- this.next(); // Skip "abstract"
-
- this.parseClass(cls, true, true);
- cls.abstract = true;
- return cls;
- }
-
- return _superClass.prototype.parseExportDefaultExpression.call(this);
- };
-
- _proto.parseStatementContent = function parseStatementContent(declaration, topLevel) {
- if (this.state.type === types._const) {
- var ahead = this.lookahead();
-
- if (ahead.type === types.name && ahead.value === "enum") {
- var node = this.startNode();
- this.expect(types._const);
- this.expectContextual("enum");
- return this.tsParseEnumDeclaration(node,
- /* isConst */
- true);
- }
- }
-
- return _superClass.prototype.parseStatementContent.call(this, declaration, topLevel);
- };
-
- _proto.parseAccessModifier = function parseAccessModifier() {
- return this.tsParseModifier(["public", "protected", "private"]);
- };
-
- _proto.parseClassMember = function parseClassMember(classBody, member, state) {
- var accessibility = this.parseAccessModifier();
- if (accessibility) member.accessibility = accessibility;
-
- _superClass.prototype.parseClassMember.call(this, classBody, member, state);
- };
-
- _proto.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
- var methodOrProp = member;
- var prop = member;
- var propOrIdx = member;
- var abstract = false,
- readonly = false;
- var 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) {
- var idx = this.tsTryParseIndexSignature(member);
-
- if (idx) {
- classBody.body.push(idx);
- return;
- }
- }
-
- if (readonly) {
- // Must be a property (if not an index signature).
- methodOrProp.static = isStatic;
- this.parseClassPropertyName(prop);
- this.parsePostMemberNameModifiers(methodOrProp);
- this.pushClassProperty(classBody, prop);
- return;
- }
-
- _superClass.prototype.parseClassMemberWithIsStatic.call(this, classBody, member, state, isStatic);
- };
-
- _proto.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) {
- var optional = this.eat(types.question);
- if (optional) methodOrProp.optional = true;
- }; // Note: The reason we do this in `parseExpressionStatement` and not `parseStatement`
- // is that e.g. `type()` is valid JS, so we must try parsing that first.
- // If it's really a type, we will parse `type` as the statement, and can correct it here
- // by parsing the rest.
-
-
- _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) {
- var decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : undefined;
- return decl || _superClass.prototype.parseExpressionStatement.call(this, node, expr);
- }; // export type
- // Should be true for anything parsed by `tsTryParseExportDeclaration`.
-
-
- _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() {
- if (this.tsIsDeclarationStart()) return true;
- return _superClass.prototype.shouldParseExportDeclaration.call(this);
- }; // An apparent conditional expression could actually be an optional parameter in an arrow function.
-
-
- _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) {
- // only do the expensive clone if there is a question mark
- // and if we come from inside parens
- if (!refNeedsArrowPos || !this.match(types.question)) {
- return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc, refNeedsArrowPos);
- }
-
- var state = this.state.clone();
-
- try {
- return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc);
- } catch (err) {
- if (!(err instanceof SyntaxError)) {
- // istanbul ignore next: no such error is expected
- throw err;
- }
-
- this.state = state;
- refNeedsArrowPos.start = err.pos || this.state.start;
- return expr;
- }
- }; // Note: These "type casts" are *not* valid TS expressions.
- // But we parse them here and change them when completing the arrow function.
-
-
- _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) {
- node = _superClass.prototype.parseParenItem.call(this, node, startPos, startLoc);
-
- if (this.eat(types.question)) {
- node.optional = true;
- }
-
- if (this.match(types.colon)) {
- var typeCastNode = this.startNodeAt(startPos, startLoc);
- typeCastNode.expression = node;
- typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();
- return this.finishNode(typeCastNode, "TSTypeCastExpression");
- }
-
- return node;
- };
-
- _proto.parseExportDeclaration = function parseExportDeclaration(node) {
- // "export declare" is equivalent to just "export".
- var isDeclare = this.eatContextual("declare");
- var declaration;
-
- if (this.match(types.name)) {
- declaration = this.tsTryParseExportDeclaration();
- }
-
- if (!declaration) {
- declaration = _superClass.prototype.parseExportDeclaration.call(this, node);
- }
-
- if (declaration && isDeclare) {
- declaration.declare = true;
- }
-
- return declaration;
- };
-
- _proto.parseClassId = function parseClassId(node, isStatement, optionalId) {
- var _superClass$prototype;
-
- if ((!isStatement || optionalId) && this.isContextual("implements")) {
- return;
- }
-
- (_superClass$prototype = _superClass.prototype.parseClassId).call.apply(_superClass$prototype, [this].concat(Array.prototype.slice.call(arguments)));
-
- var typeParameters = this.tsTryParseTypeParameters();
- if (typeParameters) node.typeParameters = typeParameters;
- };
-
- _proto.parseClassProperty = function parseClassProperty(node) {
- var type = this.tsTryParseTypeAnnotation();
- if (type) node.typeAnnotation = type;
- return _superClass.prototype.parseClassProperty.call(this, node);
- };
-
- _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) {
- var typeParameters = this.tsTryParseTypeParameters();
- if (typeParameters) method.typeParameters = typeParameters;
-
- _superClass.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor);
- };
-
- _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
- var typeParameters = this.tsTryParseTypeParameters();
- if (typeParameters) method.typeParameters = typeParameters;
-
- _superClass.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync);
- };
-
- _proto.parseClassSuper = function parseClassSuper(node) {
- _superClass.prototype.parseClassSuper.call(this, node);
-
- if (node.superClass && this.isRelational("<")) {
- node.superTypeParameters = this.tsParseTypeArguments();
- }
-
- if (this.eatContextual("implements")) {
- node.implements = this.tsParseHeritageClause();
- }
- };
-
- _proto.parseObjPropValue = function parseObjPropValue(prop) {
- var _superClass$prototype2;
-
- if (this.isRelational("<")) {
- throw new Error("TODO");
- }
-
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- (_superClass$prototype2 = _superClass.prototype.parseObjPropValue).call.apply(_superClass$prototype2, [this, prop].concat(args));
- };
-
- _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) {
- var typeParameters = this.tsTryParseTypeParameters();
- if (typeParameters) node.typeParameters = typeParameters;
-
- _superClass.prototype.parseFunctionParams.call(this, node, allowModifiers);
- }; // `let x: number;`
-
-
- _proto.parseVarHead = function parseVarHead(decl) {
- _superClass.prototype.parseVarHead.call(this, decl);
-
- var type = this.tsTryParseTypeAnnotation();
-
- if (type) {
- decl.id.typeAnnotation = type;
- this.finishNode(decl.id, decl.id.type); // set end position to end of type
- }
- }; // parse the return type of an async arrow function - let foo = (async (): number => {});
-
-
- _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) {
- if (this.match(types.colon)) {
- node.returnType = this.tsParseTypeAnnotation();
- }
-
- return _superClass.prototype.parseAsyncArrowFromCallExpression.call(this, node, call);
- };
-
- _proto.parseMaybeAssign = function parseMaybeAssign() {
- // Note: When the JSX plugin is on, type assertions (`<T> x`) aren't valid syntax.
- var jsxError;
-
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
- args[_key2] = arguments[_key2];
- }
-
- if (this.match(types.jsxTagStart)) {
- var context = this.curContext();
- assert(context === types$1.j_oTag); // Only time j_oTag is pushed is right after j_expr.
-
- assert(this.state.context[this.state.context.length - 2] === types$1.j_expr); // Prefer to parse JSX if possible. But may be an arrow fn.
-
- var _state = this.state.clone();
-
- try {
- var _superClass$prototype3;
-
- return (_superClass$prototype3 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype3, [this].concat(args));
- } catch (err) {
- if (!(err instanceof SyntaxError)) {
- // istanbul ignore next: no such error is expected
- throw err;
- }
-
- this.state = _state; // Pop the context added by the jsxTagStart.
-
- 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("<")) {
- var _superClass$prototype4;
-
- return (_superClass$prototype4 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype4, [this].concat(args));
- } // Either way, we're looking at a '<': tt.jsxTagStart or relational.
-
-
- var arrowExpression;
- var typeParameters;
- var state = this.state.clone();
-
- try {
- var _superClass$prototype5;
-
- // This is similar to TypeScript's `tryParseParenthesizedArrowFunctionExpression`.
- typeParameters = this.tsParseTypeParameters();
- arrowExpression = (_superClass$prototype5 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype5, [this].concat(args));
-
- if (arrowExpression.type !== "ArrowFunctionExpression") {
- this.unexpected(); // Go to the catch block (needs a SyntaxError).
- }
- } catch (err) {
- var _superClass$prototype6;
-
- if (!(err instanceof SyntaxError)) {
- // istanbul ignore next: no such error is expected
- throw err;
- }
-
- if (jsxError) {
- throw jsxError;
- } // Try parsing a type cast instead of an arrow function.
- // This will never happen outside of JSX.
- // (Because in JSX the '<' should be a jsxTagStart and not a relational.
-
-
- assert(!this.hasPlugin("jsx")); // Parsing an arrow function failed, so try a type cast.
-
- this.state = state; // This will start with a type assertion (via parseMaybeUnary).
- // But don't directly call `this.tsParseTypeAssertion` because we want to handle any binary after it.
-
- return (_superClass$prototype6 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype6, [this].concat(args));
- } // Correct TypeScript code should have at least 1 type parameter, but don't crash on bad code.
-
-
- if (typeParameters && typeParameters.params.length !== 0) {
- this.resetStartLocationFromNode(arrowExpression, typeParameters.params[0]);
- }
-
- arrowExpression.typeParameters = typeParameters;
- return arrowExpression;
- }; // Handle type assertions
-
-
- _proto.parseMaybeUnary = function parseMaybeUnary(refShorthandDefaultPos) {
- if (!this.hasPlugin("jsx") && this.eatRelational("<")) {
- return this.tsParseTypeAssertion();
- } else {
- return _superClass.prototype.parseMaybeUnary.call(this, refShorthandDefaultPos);
- }
- };
-
- _proto.parseArrow = function parseArrow(node) {
- if (this.match(types.colon)) {
- // This is different from how the TS parser does it.
- // TS uses lookahead. Babylon parses it as a parenthesized expression and converts.
- var state = this.state.clone();
-
- try {
- var returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon);
- if (this.canInsertSemicolon()) this.unexpected();
- if (!this.match(types.arrow)) this.unexpected();
- node.returnType = returnType;
- } catch (err) {
- if (err instanceof SyntaxError) {
- this.state = state;
- } else {
- // istanbul ignore next: no such error is expected
- throw err;
- }
- }
- }
-
- return _superClass.prototype.parseArrow.call(this, node);
- }; // Allow type annotations inside of a parameter list.
-
-
- _proto.parseAssignableListItemTypes = function 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;
- }
-
- var type = this.tsTryParseTypeAnnotation();
- if (type) param.typeAnnotation = type;
- return this.finishNode(param, param.type);
- };
-
- _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) {
- switch (node.type) {
- case "TSTypeCastExpression":
- return _superClass.prototype.toAssignable.call(this, this.typeCastToParameter(node), isBinding, contextDescription);
-
- case "TSParameterProperty":
- return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription);
-
- default:
- return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription);
- }
- };
-
- _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) {
- switch (expr.type) {
- case "TSTypeCastExpression":
- // Allow "typecasts" to appear on the left of assignment expressions,
- // because it may be in an arrow function.
- // e.g. `const f = (foo: number = 0) => foo;`
- return;
-
- case "TSParameterProperty":
- this.checkLVal(expr.parameter, isBinding, checkClashes, "parameter property");
- return;
-
- default:
- _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription);
-
- return;
- }
- };
-
- _proto.parseBindingAtom = function parseBindingAtom() {
- switch (this.state.type) {
- case types._this:
- // "this" may be the name of a parameter, so allow it.
- return this.parseIdentifier(
- /* liberal */
- true);
-
- default:
- return _superClass.prototype.parseBindingAtom.call(this);
- }
- }; // === === === === === === === === === === === === === === === ===
- // Note: All below methods are duplicates of something in flow.js.
- // Not sure what the best way to combine these is.
- // === === === === === === === === === === === === === === === ===
-
-
- _proto.isClassMethod = function isClassMethod() {
- return this.isRelational("<") || _superClass.prototype.isClassMethod.call(this);
- };
-
- _proto.isClassProperty = function isClassProperty() {
- return this.match(types.colon) || _superClass.prototype.isClassProperty.call(this);
- };
-
- _proto.parseMaybeDefault = function parseMaybeDefault() {
- var _superClass$prototype7;
-
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
- args[_key3] = arguments[_key3];
- }
-
- var node = (_superClass$prototype7 = _superClass.prototype.parseMaybeDefault).call.apply(_superClass$prototype7, [this].concat(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;
- }; // ensure that inside types, we bypass the jsx parser plugin
-
-
- _proto.readToken = function readToken(code) {
- if (this.state.inType && (code === 62 || code === 60)) {
- return this.finishOp(types.relational, 1);
- } else {
- return _superClass.prototype.readToken.call(this, code);
- }
- };
-
- _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) {
- for (var i = 0; i < exprList.length; i++) {
- var expr = exprList[i];
-
- if (expr && expr.type === "TSTypeCastExpression") {
- exprList[i] = this.typeCastToParameter(expr);
- }
- }
-
- return _superClass.prototype.toAssignableList.call(this, exprList, isBinding, contextDescription);
- };
-
- _proto.typeCastToParameter = function typeCastToParameter(node) {
- node.expression.typeAnnotation = node.typeAnnotation;
- return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end);
- };
-
- _proto.toReferencedList = function toReferencedList(exprList) {
- for (var i = 0; i < exprList.length; i++) {
- var expr = exprList[i];
-
- if (expr && expr._exprListItem && expr.type === "TsTypeCastExpression") {
- this.raise(expr.start, "Did not expect a type annotation here.");
- }
- }
-
- return exprList;
- };
-
- _proto.shouldParseArrow = function shouldParseArrow() {
- return this.match(types.colon) || _superClass.prototype.shouldParseArrow.call(this);
- };
-
- _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() {
- return this.match(types.colon) || _superClass.prototype.shouldParseAsyncArrow.call(this);
- };
-
- return _class;
- }(superClass)
- );
-});
-
-plugins.estree = estreePlugin;
-plugins.flow = flowPlugin;
-plugins.jsx = jsxPlugin;
-plugins.typescript = typescriptPlugin;
-function parse(input, options) {
- if (options && options.sourceType === "unambiguous") {
- options = Object.assign({}, options);
-
- try {
- options.sourceType = "module";
- var ast = getParser(options, input).parse(); // Rather than try to parse as a script first, we opt to parse as a module and convert back
- // to a script where possible to avoid having to do a full re-parse of the input content.
-
- if (!hasModuleSyntax(ast)) 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) {
- var parser = getParser(options, input);
-
- if (parser.options.strictMode) {
- parser.state.strict = true;
- }
-
- return parser.getExpression();
-}
-function getParser(options, input) {
- var cls = options && options.plugins ? getParserClass(options.plugins) : Parser;
- return new cls(options, input);
-}
-
-var parserClassCache = {};
-/** Get a Parser class with plugins applied. */
-
-function getParserClass(pluginsFromOptions) {
- if (pluginsFromOptions.indexOf("decorators") >= 0 && pluginsFromOptions.indexOf("decorators2") >= 0) {
- throw new Error("Cannot use decorators and decorators2 plugin together");
- } // Filter out just the plugins that have an actual mixin associated with them.
-
-
- var pluginList = pluginsFromOptions.filter(function (p) {
- return p === "estree" || p === "flow" || p === "jsx" || p === "typescript";
- });
-
- if (pluginList.indexOf("flow") >= 0) {
- // ensure flow plugin loads last
- pluginList = pluginList.filter(function (plugin) {
- return plugin !== "flow";
- });
- pluginList.push("flow");
- }
-
- if (pluginList.indexOf("flow") >= 0 && pluginList.indexOf("typescript") >= 0) {
- throw new Error("Cannot combine flow and typescript plugins.");
- }
-
- if (pluginList.indexOf("typescript") >= 0) {
- // ensure typescript plugin loads last
- pluginList = pluginList.filter(function (plugin) {
- return plugin !== "typescript";
- });
- pluginList.push("typescript");
- }
-
- if (pluginList.indexOf("estree") >= 0) {
- // ensure estree plugin loads first
- pluginList = pluginList.filter(function (plugin) {
- return plugin !== "estree";
- });
- pluginList.unshift("estree");
- }
-
- var key = pluginList.join("/");
- var cls = parserClassCache[key];
-
- if (!cls) {
- cls = Parser;
-
- for (var _i2 = 0, _pluginList2 = pluginList; _i2 < _pluginList2.length; _i2++) {
- var plugin = _pluginList2[_i2];
- cls = plugins[plugin](cls);
- }
-
- parserClassCache[key] = cls;
- }
-
- return cls;
-}
-
-function hasModuleSyntax(ast) {
- return ast.program.body.some(function (child) {
- return child.type === "ImportDeclaration" && (!child.importKind || child.importKind === "value") || child.type === "ExportNamedDeclaration" && (!child.exportKind || child.exportKind === "value") || child.type === "ExportAllDeclaration" && (!child.exportKind || child.exportKind === "value") || child.type === "ExportDefaultDeclaration";
- });
-}
-
-exports.parse = parse;
-exports.parseExpression = parseExpression;
-exports.tokTypes = types;
diff --git a/tools/node_modules/babel-eslint/node_modules/babylon/package.json b/tools/node_modules/babel-eslint/node_modules/babylon/package.json
deleted file mode 100644
index 120b7f57b6..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/babylon/package.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "_from": "babylon@7.0.0-beta.36",
- "_id": "babylon@7.0.0-beta.36",
- "_inBundle": false,
- "_integrity": "sha512-rw4YdadGwajAMMRl6a5swhQ0JCOOFyaYCfJ0AsmNBD8uBD/r4J8mux7wBaqavvFKqUKQYWOzA1Speams4YDzsQ==",
- "_location": "/babel-eslint/babylon",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "babylon@7.0.0-beta.36",
- "name": "babylon",
- "escapedName": "babylon",
- "rawSpec": "7.0.0-beta.36",
- "saveSpec": null,
- "fetchSpec": "7.0.0-beta.36"
- },
- "_requiredBy": [
- "/babel-eslint",
- "/babel-eslint/@babel/template",
- "/babel-eslint/@babel/traverse"
- ],
- "_resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.36.tgz",
- "_shasum": "3a3683ba6a9a1e02b0aa507c8e63435e39305b9e",
- "_spec": "babylon@7.0.0-beta.36",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint",
- "author": {
- "name": "Sebastian McKenzie",
- "email": "sebmck@gmail.com"
- },
- "bin": {
- "babylon": "./bin/babylon.js"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "A JavaScript parser",
- "devDependencies": {
- "@babel/helper-fixtures": "7.0.0-beta.36",
- "babel-plugin-transform-charcodes": "0.0.10",
- "charcodes": "0.0.10",
- "rollup": "^0.50.0",
- "rollup-plugin-babel": "^4.0.0-beta.0",
- "rollup-plugin-node-resolve": "^3.0.0",
- "rollup-watch": "^4.0.0",
- "unicode-10.0.0": "^0.7.4"
- },
- "engines": {
- "node": ">=4.2.0"
- },
- "files": [
- "bin",
- "lib"
- ],
- "homepage": "https://babeljs.io/",
- "keywords": [
- "babel",
- "javascript",
- "parser",
- "tc39",
- "ecmascript",
- "babylon"
- ],
- "license": "MIT",
- "main": "lib/index.js",
- "name": "babylon",
- "publishConfig": {
- "tag": "next"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/babel/babel/tree/master/packages/babylon"
- },
- "version": "7.0.0-beta.36"
-}
diff --git a/tools/node_modules/babel-eslint/node_modules/chalk/index.js b/tools/node_modules/babel-eslint/node_modules/chalk/index.js
index 05e62b3466..1cc5fa89a9 100644
--- a/tools/node_modules/babel-eslint/node_modules/chalk/index.js
+++ b/tools/node_modules/babel-eslint/node_modules/chalk/index.js
@@ -1,7 +1,7 @@
'use strict';
const escapeStringRegexp = require('escape-string-regexp');
const ansiStyles = require('ansi-styles');
-const supportsColor = require('supports-color');
+const stdoutColor = require('supports-color').stdout;
const template = require('./templates.js');
@@ -19,7 +19,7 @@ function applyOptions(obj, options) {
options = options || {};
// Detect level if not set manually
- const scLevel = supportsColor ? supportsColor.level : 0;
+ const scLevel = stdoutColor ? stdoutColor.level : 0;
obj.level = options.level === undefined ? scLevel : options.level;
obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
}
@@ -224,5 +224,5 @@ function chalkTag(chalk, strings) {
Object.defineProperties(Chalk.prototype, styles);
module.exports = Chalk(); // eslint-disable-line new-cap
-module.exports.supportsColor = supportsColor;
+module.exports.supportsColor = stdoutColor;
module.exports.default = module.exports; // For TypeScript
diff --git a/tools/node_modules/babel-eslint/node_modules/chalk/index.js.flow b/tools/node_modules/babel-eslint/node_modules/chalk/index.js.flow
new file mode 100644
index 0000000000..622caaa2e8
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/chalk/index.js.flow
@@ -0,0 +1,93 @@
+// @flow strict
+
+type TemplateStringsArray = $ReadOnlyArray<string>;
+
+export type Level = $Values<{
+ None: 0,
+ Basic: 1,
+ Ansi256: 2,
+ TrueColor: 3
+}>;
+
+export type ChalkOptions = {|
+ enabled?: boolean,
+ level?: Level
+|};
+
+export type ColorSupport = {|
+ level: Level,
+ hasBasic: boolean,
+ has256: boolean,
+ has16m: boolean
+|};
+
+export interface Chalk {
+ (...text: string[]): string,
+ (text: TemplateStringsArray, ...placeholders: string[]): string,
+ constructor(options?: ChalkOptions): Chalk,
+ enabled: boolean,
+ level: Level,
+ rgb(r: number, g: number, b: number): Chalk,
+ hsl(h: number, s: number, l: number): Chalk,
+ hsv(h: number, s: number, v: number): Chalk,
+ hwb(h: number, w: number, b: number): Chalk,
+ bgHex(color: string): Chalk,
+ bgKeyword(color: string): Chalk,
+ bgRgb(r: number, g: number, b: number): Chalk,
+ bgHsl(h: number, s: number, l: number): Chalk,
+ bgHsv(h: number, s: number, v: number): Chalk,
+ bgHwb(h: number, w: number, b: number): Chalk,
+ hex(color: string): Chalk,
+ keyword(color: string): Chalk,
+
+ +reset: Chalk,
+ +bold: Chalk,
+ +dim: Chalk,
+ +italic: Chalk,
+ +underline: Chalk,
+ +inverse: Chalk,
+ +hidden: Chalk,
+ +strikethrough: Chalk,
+
+ +visible: Chalk,
+
+ +black: Chalk,
+ +red: Chalk,
+ +green: Chalk,
+ +yellow: Chalk,
+ +blue: Chalk,
+ +magenta: Chalk,
+ +cyan: Chalk,
+ +white: Chalk,
+ +gray: Chalk,
+ +grey: Chalk,
+ +blackBright: Chalk,
+ +redBright: Chalk,
+ +greenBright: Chalk,
+ +yellowBright: Chalk,
+ +blueBright: Chalk,
+ +magentaBright: Chalk,
+ +cyanBright: Chalk,
+ +whiteBright: Chalk,
+
+ +bgBlack: Chalk,
+ +bgRed: Chalk,
+ +bgGreen: Chalk,
+ +bgYellow: Chalk,
+ +bgBlue: Chalk,
+ +bgMagenta: Chalk,
+ +bgCyan: Chalk,
+ +bgWhite: Chalk,
+ +bgBlackBright: Chalk,
+ +bgRedBright: Chalk,
+ +bgGreenBright: Chalk,
+ +bgYellowBright: Chalk,
+ +bgBlueBright: Chalk,
+ +bgMagentaBright: Chalk,
+ +bgCyanBright: Chalk,
+ +bgWhiteBrigh: Chalk,
+
+ supportsColor: ColorSupport
+};
+
+declare module.exports: Chalk;
diff --git a/tools/node_modules/babel-eslint/node_modules/chalk/package.json b/tools/node_modules/babel-eslint/node_modules/chalk/package.json
index cd3cc0752c..270fecdc34 100644
--- a/tools/node_modules/babel-eslint/node_modules/chalk/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/chalk/package.json
@@ -1,42 +1,20 @@
{
- "_from": "chalk@^2.0.0",
- "_id": "chalk@2.3.0",
- "_inBundle": false,
- "_integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==",
- "_location": "/babel-eslint/chalk",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "chalk@^2.0.0",
- "name": "chalk",
- "escapedName": "chalk",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/babel-eslint/@babel/code-frame"
- ],
- "_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz",
- "_shasum": "b5ea48efc9c1793dccc9b4767c93914d3f2d52ba",
- "_spec": "chalk@^2.0.0",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/@babel/code-frame",
"bugs": {
"url": "https://github.com/chalk/chalk/issues"
},
"bundleDependencies": false,
"dependencies": {
- "ansi-styles": "^3.1.0",
+ "ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
- "supports-color": "^4.0.0"
+ "supports-color": "^5.3.0"
},
"deprecated": false,
"description": "Terminal string styling done right",
"devDependencies": {
"ava": "*",
"coveralls": "^3.0.0",
- "execa": "^0.8.0",
+ "execa": "^0.9.0",
+ "flow-bin": "^0.68.0",
"import-fresh": "^2.0.0",
"matcha": "^0.7.0",
"nyc": "^11.0.2",
@@ -50,7 +28,8 @@
"files": [
"index.js",
"templates.js",
- "types/index.d.ts"
+ "types/index.d.ts",
+ "index.js.flow"
],
"homepage": "https://github.com/chalk/chalk#readme",
"keywords": [
@@ -85,14 +64,17 @@
"scripts": {
"bench": "matcha benchmark.js",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
- "test": "xo && tsc --project types && nyc ava"
+ "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava"
},
"types": "types/index.d.ts",
- "version": "2.3.0",
+ "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/chalk/readme.md b/tools/node_modules/babel-eslint/node_modules/chalk/readme.md
index 9bb2e65e85..d298e2c48d 100644
--- a/tools/node_modules/babel-eslint/node_modules/chalk/readme.md
+++ b/tools/node_modules/babel-eslint/node_modules/chalk/readme.md
@@ -1,7 +1,7 @@
<h1 align="center">
<br>
<br>
- <img width="320" src="https://cdn.rawgit.com/chalk/chalk/19935d6484811c5e468817f846b7b3d417d7bf4a/logo.svg" alt="chalk">
+ <img width="320" src="media/logo.svg" alt="Chalk">
<br>
<br>
<br>
@@ -9,11 +9,11 @@
> Terminal string styling done right
-[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs)
+[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs)
### [See what's new in Chalk 2](https://github.com/chalk/chalk/releases/tag/v2.0.0)
-![](https://github.com/chalk/ansi-styles/raw/master/screenshot.png)
+<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" alt="" width="900">
## Highlights
@@ -26,7 +26,7 @@
- Doesn't extend `String.prototype`
- Clean and focused
- Actively maintained
-- [Used by ~17,000 packages](https://www.npmjs.com/browse/depended/chalk) as of June 20th, 2017
+- [Used by ~23,000 packages](https://www.npmjs.com/browse/depended/chalk) as of December 31, 2017
## Install
@@ -35,6 +35,10 @@
$ npm install chalk
```
+<a href="https://www.patreon.com/sindresorhus">
+ <img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
+</a>
+
## Usage
@@ -51,7 +55,7 @@ const chalk = require('chalk');
const log = console.log;
// Combine styled and normal strings
-log(chalk.blue('Hello') + 'World' + chalk.red('!'));
+log(chalk.blue('Hello') + ' World' + chalk.red('!'));
// Compose multiple styles using the chainable API
log(chalk.blue.bgRed.bold('Hello world!'));
@@ -124,7 +128,7 @@ Multiple arguments will be separated by space.
Color support is automatically detected, as is the level (see `chalk.level`). However, if you'd like to simply enable/disable Chalk, you can do so via the `.enabled` property.
-Chalk is enabled by default unless expicitly disabled via the constructor or `chalk.level` is `0`.
+Chalk is enabled by default unless explicitly disabled via the constructor or `chalk.level` is `0`.
If you need to change this in a reusable module, create a new instance:
@@ -265,8 +269,8 @@ The following color models can be used:
- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')`
- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')`
- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')`
-- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 1, 1).bold('Orange!')`
-- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hsl(32, 0, 50).bold('Orange!')`
+- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')`
+- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')`
- `ansi16`
- `ansi256`
@@ -296,6 +300,7 @@ If you're on Windows, do yourself a favor and use [`cmder`](http://cmder.net/) i
- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal
- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings
- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings
+- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal
## Maintainers
diff --git a/tools/node_modules/babel-eslint/node_modules/color-convert/conversions.js b/tools/node_modules/babel-eslint/node_modules/color-convert/conversions.js
index 19ca4a9bf5..32172007ec 100644
--- a/tools/node_modules/babel-eslint/node_modules/color-convert/conversions.js
+++ b/tools/node_modules/babel-eslint/node_modules/color-convert/conversions.js
@@ -95,41 +95,48 @@ convert.rgb.hsl = function (rgb) {
};
convert.rgb.hsv = function (rgb) {
- var r = rgb[0];
- var g = rgb[1];
- var b = rgb[2];
- var min = Math.min(r, g, b);
- var max = Math.max(r, g, b);
- var delta = max - min;
+ var rdif;
+ var gdif;
+ var bdif;
var h;
var s;
- var v;
- if (max === 0) {
- s = 0;
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+ var v = Math.max(r, g, b);
+ var diff = v - Math.min(r, g, b);
+ var diffc = function (c) {
+ return (v - c) / 6 / diff + 1 / 2;
+ };
+
+ if (diff === 0) {
+ h = s = 0;
} else {
- s = (delta / max * 1000) / 10;
- }
-
- if (max === min) {
- h = 0;
- } else if (r === max) {
- h = (g - b) / delta;
- } else if (g === max) {
- h = 2 + (b - r) / delta;
- } else if (b === max) {
- h = 4 + (r - g) / delta;
- }
-
- h = Math.min(h * 60, 360);
-
- if (h < 0) {
- h += 360;
+ s = diff / v;
+ rdif = diffc(r);
+ gdif = diffc(g);
+ bdif = diffc(b);
+
+ if (r === v) {
+ h = bdif - gdif;
+ } else if (g === v) {
+ h = (1 / 3) + rdif - bdif;
+ } else if (b === v) {
+ h = (2 / 3) + gdif - rdif;
+ }
+ if (h < 0) {
+ h += 1;
+ } else if (h > 1) {
+ h -= 1;
+ }
}
- v = ((max / 255) * 1000) / 10;
-
- return [h, s, v];
+ return [
+ h * 360,
+ s * 100,
+ v * 100
+ ];
};
convert.rgb.hwb = function (rgb) {
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
index f3cf05b3f0..991f69308c 100644
--- a/tools/node_modules/babel-eslint/node_modules/color-convert/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/color-convert/package.json
@@ -1,27 +1,4 @@
{
- "_from": "color-convert@^1.9.0",
- "_id": "color-convert@1.9.1",
- "_inBundle": false,
- "_integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==",
- "_location": "/babel-eslint/color-convert",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "color-convert@^1.9.0",
- "name": "color-convert",
- "escapedName": "color-convert",
- "rawSpec": "^1.9.0",
- "saveSpec": null,
- "fetchSpec": "^1.9.0"
- },
- "_requiredBy": [
- "/babel-eslint/ansi-styles"
- ],
- "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz",
- "_shasum": "c1261107aeb2f294ebffec9ed9ecad529a6097ed",
- "_spec": "color-convert@^1.9.0",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/ansi-styles",
"author": {
"name": "Heather Arthur",
"email": "fayearthur@gmail.com"
@@ -31,13 +8,13 @@
},
"bundleDependencies": false,
"dependencies": {
- "color-name": "^1.1.1"
+ "color-name": "1.1.3"
},
"deprecated": false,
"description": "Plain color conversion functions",
"devDependencies": {
- "chalk": "^1.1.1",
- "xo": "^0.11.2"
+ "chalk": "1.1.1",
+ "xo": "0.11.2"
},
"files": [
"index.js",
@@ -70,7 +47,7 @@
"pretest": "xo",
"test": "node test/basic.js"
},
- "version": "1.9.1",
+ "version": "1.9.3",
"xo": {
"rules": {
"default-case": 0,
@@ -78,4 +55,4 @@
"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
index 5319acea33..87d0e72ec5 100644
--- a/tools/node_modules/babel-eslint/node_modules/color-name/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/color-name/package.json
@@ -1,27 +1,4 @@
{
- "_from": "color-name@^1.1.1",
- "_id": "color-name@1.1.3",
- "_inBundle": false,
- "_integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
- "_location": "/babel-eslint/color-name",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "color-name@^1.1.1",
- "name": "color-name",
- "escapedName": "color-name",
- "rawSpec": "^1.1.1",
- "saveSpec": null,
- "fetchSpec": "^1.1.1"
- },
- "_requiredBy": [
- "/babel-eslint/color-convert"
- ],
- "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "_shasum": "a7d0558bd89c42f795dd42328f740831ca53bc25",
- "_spec": "color-name@^1.1.1",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/color-convert",
"author": {
"name": "DY",
"email": "dfcreative@gmail.com"
@@ -50,4 +27,4 @@
"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/.coveralls.yml b/tools/node_modules/babel-eslint/node_modules/debug/.coveralls.yml
deleted file mode 100644
index 20a7068581..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/debug/.coveralls.yml
+++ /dev/null
@@ -1 +0,0 @@
-repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve
diff --git a/tools/node_modules/babel-eslint/node_modules/debug/Makefile b/tools/node_modules/babel-eslint/node_modules/debug/Makefile
deleted file mode 100644
index 3ddd1360e6..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/debug/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
-THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
-THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
-
-# BIN directory
-BIN := $(THIS_DIR)/node_modules/.bin
-
-# Path
-PATH := node_modules/.bin:$(PATH)
-SHELL := /bin/bash
-
-# applications
-NODE ?= $(shell which node)
-YARN ?= $(shell which yarn)
-PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
-BROWSERIFY ?= $(NODE) $(BIN)/browserify
-
-install: node_modules
-
-browser: dist/debug.js
-
-node_modules: package.json
- @NODE_ENV= $(PKG) install
- @touch node_modules
-
-dist/debug.js: src/*.js node_modules
- @mkdir -p dist
- @$(BROWSERIFY) \
- --standalone debug \
- . > dist/debug.js
-
-lint:
- @eslint *.js src/*.js
-
-test-node:
- @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
- @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
-
-test-browser:
- @$(MAKE) browser
- @karma start --single-run
-
-test-all:
- @concurrently \
- "make test-node" \
- "make test-browser"
-
-test:
- @if [ "x$(BROWSER)" = "x" ]; then \
- $(MAKE) test-node; \
- else \
- $(MAKE) test-browser; \
- fi
-
-clean:
- rimraf dist coverage
-
-.PHONY: browser install clean lint test test-all test-node test-browser
diff --git a/tools/node_modules/babel-eslint/node_modules/debug/README.md b/tools/node_modules/babel-eslint/node_modules/debug/README.md
index 8e754d17b1..88dae35d9f 100644
--- a/tools/node_modules/babel-eslint/node_modules/debug/README.md
+++ b/tools/node_modules/babel-eslint/node_modules/debug/README.md
@@ -70,7 +70,9 @@ Here are some examples:
<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
-#### Windows note
+#### Windows command prompt notes
+
+##### CMD
On Windows the environment variable is set using the `set` command.
@@ -78,14 +80,32 @@ On Windows the environment variable is set using the `set` command.
set DEBUG=*,-not_this
```
-Note that PowerShell uses different syntax to set environment variables.
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
```cmd
$env:DEBUG = "*,-not_this"
```
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
Then, run the program to be debugged as usual.
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
## Namespace Colors
@@ -248,6 +268,73 @@ error('now goes to stdout via console.info');
log('still goes to stdout, but via console.info now');
```
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
+`disable()`
+
+Will disable all namespaces. The functions returns the namespaces currently
+enabled (and skipped). This can be useful if you want to disable debugging
+temporarily without knowing what was enabled to begin with.
+
+For example:
+
+```js
+let debug = require('debug');
+debug.enable('foo:*,-foo:bar');
+let namespaces = debug.disable();
+debug.enable(namespaces);
+```
+
+Note: There is no guarantee that the string will be identical to the initial
+enable string, but semantically they will be identical.
+
## Checking whether a debug target is enabled
After you've created a debug instance, you can determine whether or not it is
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
new file mode 100644
index 0000000000..89ad0c2175
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/debug/dist/debug.js
@@ -0,0 +1,912 @@
+"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/karma.conf.js b/tools/node_modules/babel-eslint/node_modules/debug/karma.conf.js
deleted file mode 100644
index 103a82d15b..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/debug/karma.conf.js
+++ /dev/null
@@ -1,70 +0,0 @@
-// Karma configuration
-// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
-
-module.exports = function(config) {
- config.set({
-
- // base path that will be used to resolve all patterns (eg. files, exclude)
- basePath: '',
-
-
- // frameworks to use
- // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
- frameworks: ['mocha', 'chai', 'sinon'],
-
-
- // list of files / patterns to load in the browser
- files: [
- 'dist/debug.js',
- 'test/*spec.js'
- ],
-
-
- // list of files to exclude
- exclude: [
- 'src/node.js'
- ],
-
-
- // preprocess matching files before serving them to the browser
- // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
- preprocessors: {
- },
-
- // test results reporter to use
- // possible values: 'dots', 'progress'
- // available reporters: https://npmjs.org/browse/keyword/karma-reporter
- reporters: ['progress'],
-
-
- // web server port
- port: 9876,
-
-
- // enable / disable colors in the output (reporters and logs)
- colors: true,
-
-
- // level of logging
- // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
- logLevel: config.LOG_INFO,
-
-
- // enable / disable watching file and executing tests whenever any file changes
- autoWatch: true,
-
-
- // start these browsers
- // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
- browsers: ['PhantomJS'],
-
-
- // Continuous Integration mode
- // if true, Karma captures browsers, runs the tests and exits
- singleRun: false,
-
- // Concurrency level
- // how many browser should be started simultaneous
- concurrency: Infinity
- })
-}
diff --git a/tools/node_modules/babel-eslint/node_modules/debug/node.js b/tools/node_modules/babel-eslint/node_modules/debug/node.js
deleted file mode 100644
index 7fc36fe6db..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/debug/node.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./src/node');
diff --git a/tools/node_modules/babel-eslint/node_modules/debug/package.json b/tools/node_modules/babel-eslint/node_modules/debug/package.json
index 8d40591ec3..7bc94f7f06 100644
--- a/tools/node_modules/babel-eslint/node_modules/debug/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/debug/package.json
@@ -1,27 +1,4 @@
{
- "_from": "debug@^3.0.1",
- "_id": "debug@3.1.0",
- "_inBundle": false,
- "_integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
- "_location": "/babel-eslint/debug",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "debug@^3.0.1",
- "name": "debug",
- "escapedName": "debug",
- "rawSpec": "^3.0.1",
- "saveSpec": null,
- "fetchSpec": "^3.0.1"
- },
- "_requiredBy": [
- "/babel-eslint/@babel/traverse"
- ],
- "_resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "_shasum": "5bb5a0672628b64149566ba16819e61518c67261",
- "_spec": "debug@^3.0.1",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/@babel/traverse",
"author": {
"name": "TJ Holowaychuk",
"email": "tj@vision-media.ca"
@@ -43,28 +20,34 @@
}
],
"dependencies": {
- "ms": "2.0.0"
+ "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": "^2.11.15",
- "eslint": "^3.12.1",
+ "coveralls": "^3.0.2",
"istanbul": "^0.4.5",
- "karma": "^1.3.0",
+ "karma": "^3.0.0",
"karma-chai": "^0.1.0",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.2",
- "karma-sinon": "^1.0.5",
- "mocha": "^3.2.0",
+ "mocha": "^5.2.0",
"mocha-lcov-reporter": "^1.2.0",
"rimraf": "^2.5.4",
- "sinon": "^1.17.6",
- "sinon-chai": "^2.8.0"
+ "xo": "^0.23.0"
},
+ "files": [
+ "src",
+ "dist/debug.js",
+ "LICENSE",
+ "README.md"
+ ],
"homepage": "https://github.com/visionmedia/debug#readme",
"keywords": [
"debug",
@@ -78,5 +61,19 @@
"type": "git",
"url": "git://github.com/visionmedia/debug.git"
},
- "version": "3.1.0"
-}
+ "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
index f5149ff529..5f34c0d0a7 100644
--- a/tools/node_modules/babel-eslint/node_modules/debug/src/browser.js
+++ b/tools/node_modules/babel-eslint/node_modules/debug/src/browser.js
@@ -1,36 +1,97 @@
+/* eslint-env browser */
+
/**
* This is the web browser implementation of `debug()`.
- *
- * Expose `debug()` as the module.
*/
-exports = module.exports = require('./debug');
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
-exports.storage = 'undefined' != typeof chrome
- && 'undefined' != typeof chrome.storage
- ? chrome.storage.local
- : localstorage();
+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'
+ '#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'
];
/**
@@ -41,43 +102,31 @@ exports.colors = [
* 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') {
- 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+)/));
-}
-
-/**
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
- */
+ // 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;
+ }
-exports.formatters.j = function(v) {
- try {
- return JSON.stringify(v);
- } catch (err) {
- return '[UnexpectedJSONParseError]: ' + err.message;
- }
-};
+ // 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.
@@ -86,36 +135,38 @@ exports.formatters.j = function(v) {
*/
function formatArgs(args) {
- var useColors = this.useColors;
-
- args[0] = (useColors ? '%c' : '')
- + this.namespace
- + (useColors ? ' %c' : ' ')
- + args[0]
- + (useColors ? '%c ' : ' ')
- + '+' + exports.humanize(this.diff);
-
- if (!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 ('%c' === match) {
- // we only are interested in the *last* %c
- // (the user may have provided their own)
- lastC = index;
- }
- });
-
- args.splice(lastC, 0, c);
+ 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);
}
/**
@@ -124,13 +175,12 @@ function formatArgs(args) {
*
* @api public
*/
-
-function log() {
- // this hackery is required for IE8/9, where
- // the `console.log` function doesn't have 'apply'
- return 'object' === typeof console
- && console.log
- && Function.prototype.apply.call(console.log, console, arguments);
+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);
}
/**
@@ -139,15 +189,17 @@ function log() {
* @param {String} namespaces
* @api private
*/
-
function save(namespaces) {
- try {
- if (null == namespaces) {
- exports.storage.removeItem('debug');
- } else {
- exports.storage.debug = namespaces;
- }
- } catch(e) {}
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
}
/**
@@ -156,28 +208,24 @@ function save(namespaces) {
* @return {String} returns the previously persisted debug modes
* @api private
*/
-
function load() {
- var r;
- try {
- r = exports.storage.debug;
- } catch(e) {}
+ 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;
- }
+ // 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;
+ return r;
}
/**
- * Enable namespaces listed in `localStorage.debug` initially.
- */
-
-exports.enable(load());
-
-/**
* Localstorage attempts to return the localstorage.
*
* This is necessary because safari throws
@@ -189,7 +237,28 @@ exports.enable(load());
*/
function localstorage() {
- try {
- return window.localStorage;
- } catch (e) {}
+ 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
new file mode 100644
index 0000000000..2f82b8dc7d
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/debug/src/common.js
@@ -0,0 +1,266 @@
+
+/**
+ * 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/debug.js b/tools/node_modules/babel-eslint/node_modules/debug/src/debug.js
deleted file mode 100644
index 77e6384a33..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/debug/src/debug.js
+++ /dev/null
@@ -1,225 +0,0 @@
-
-/**
- * This is the common logic for both the Node.js and web browser
- * implementations of `debug()`.
- *
- * Expose `debug()` as the module.
- */
-
-exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
-exports.coerce = coerce;
-exports.disable = disable;
-exports.enable = enable;
-exports.enabled = enabled;
-exports.humanize = require('ms');
-
-/**
- * Active `debug` instances.
- */
-exports.instances = [];
-
-/**
- * The currently active debug mode names, and names to skip.
- */
-
-exports.names = [];
-exports.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".
- */
-
-exports.formatters = {};
-
-/**
- * Select a color.
- * @param {String} namespace
- * @return {Number}
- * @api private
- */
-
-function selectColor(namespace) {
- var hash = 0, i;
-
- for (i in namespace) {
- hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
- hash |= 0; // Convert to 32bit integer
- }
-
- return exports.colors[Math.abs(hash) % exports.colors.length];
-}
-
-/**
- * Create a debugger with the given `namespace`.
- *
- * @param {String} namespace
- * @return {Function}
- * @api public
- */
-
-function createDebug(namespace) {
-
- var prevTime;
-
- function debug() {
- // disabled?
- if (!debug.enabled) return;
-
- var self = debug;
-
- // set `diff` timestamp
- var curr = +new Date();
- var ms = curr - (prevTime || curr);
- self.diff = ms;
- self.prev = prevTime;
- self.curr = curr;
- prevTime = curr;
-
- // turn the `arguments` into a proper Array
- var args = new Array(arguments.length);
- for (var i = 0; i < args.length; i++) {
- args[i] = arguments[i];
- }
-
- args[0] = exports.coerce(args[0]);
-
- if ('string' !== typeof args[0]) {
- // 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 = exports.formatters[format];
- if ('function' === typeof formatter) {
- 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.)
- exports.formatArgs.call(self, args);
-
- var logFn = debug.log || exports.log || console.log.bind(console);
- logFn.apply(self, args);
- }
-
- debug.namespace = namespace;
- debug.enabled = exports.enabled(namespace);
- debug.useColors = exports.useColors();
- debug.color = selectColor(namespace);
- debug.destroy = destroy;
-
- // env-specific initialization logic for debug instances
- if ('function' === typeof exports.init) {
- exports.init(debug);
- }
-
- exports.instances.push(debug);
-
- return debug;
-}
-
-function destroy () {
- var index = exports.instances.indexOf(this);
- if (index !== -1) {
- exports.instances.splice(index, 1);
- return true;
- } else {
- return false;
- }
-}
-
-/**
- * Enables a debug mode by namespaces. This can include modes
- * separated by a colon and wildcards.
- *
- * @param {String} namespaces
- * @api public
- */
-
-function enable(namespaces) {
- exports.save(namespaces);
-
- exports.names = [];
- exports.skips = [];
-
- var i;
- var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
- var len = split.length;
-
- for (i = 0; i < len; i++) {
- if (!split[i]) continue; // ignore empty strings
- namespaces = split[i].replace(/\*/g, '.*?');
- if (namespaces[0] === '-') {
- exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
- } else {
- exports.names.push(new RegExp('^' + namespaces + '$'));
- }
- }
-
- for (i = 0; i < exports.instances.length; i++) {
- var instance = exports.instances[i];
- instance.enabled = exports.enabled(instance.namespace);
- }
-}
-
-/**
- * Disable debug output.
- *
- * @api public
- */
-
-function disable() {
- exports.enable('');
-}
-
-/**
- * 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, len;
- for (i = 0, len = exports.skips.length; i < len; i++) {
- if (exports.skips[i].test(name)) {
- return false;
- }
- }
- for (i = 0, len = exports.names.length; i < len; i++) {
- if (exports.names[i].test(name)) {
- return true;
- }
- }
- return false;
-}
-
-/**
- * Coerce `val`.
- *
- * @param {Mixed} val
- * @return {Mixed}
- * @api private
- */
-
-function coerce(val) {
- if (val instanceof Error) return val.stack || val.message;
- return val;
-}
diff --git a/tools/node_modules/babel-eslint/node_modules/debug/src/index.js b/tools/node_modules/babel-eslint/node_modules/debug/src/index.js
index cabcbcda13..bf4c57f259 100644
--- a/tools/node_modules/babel-eslint/node_modules/debug/src/index.js
+++ b/tools/node_modules/babel-eslint/node_modules/debug/src/index.js
@@ -1,10 +1,10 @@
/**
- * Detect Electron renderer process, which is node, but we should
+ * Detect Electron renderer / nwjs process, which is node, but we should
* treat as a browser.
*/
-if (typeof process === 'undefined' || process.type === 'renderer') {
- module.exports = require('./browser.js');
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+ module.exports = require('./browser.js');
} else {
- module.exports = require('./node.js');
+ module.exports = require('./node.js');
}
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
index d666fb9c00..5e1f1541a0 100644
--- a/tools/node_modules/babel-eslint/node_modules/debug/src/node.js
+++ b/tools/node_modules/babel-eslint/node_modules/debug/src/node.js
@@ -2,16 +2,13 @@
* Module dependencies.
*/
-var tty = require('tty');
-var util = require('util');
+const tty = require('tty');
+const util = require('util');
/**
* This is the Node.js implementation of `debug()`.
- *
- * Expose `debug()` as the module.
*/
-exports = module.exports = require('./debug');
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
@@ -23,21 +20,95 @@ exports.useColors = useColors;
* Colors.
*/
-exports.colors = [ 6, 2, 3, 4, 5, 1 ];
+exports.colors = [6, 2, 3, 4, 5, 1];
try {
- var supportsColor = require('supports-color');
- if (supportsColor && 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 (err) {
- // swallow - we only care if `supports-color` is available; it doesn't have to be.
+ // 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.
}
/**
@@ -46,24 +117,31 @@ try {
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
*/
-exports.inspectOpts = Object.keys(process.env).filter(function (key) {
- return /^debug_/i.test(key);
-}).reduce(function (obj, key) {
- // camel-case
- var prop = key
- .substring(6)
- .toLowerCase()
- .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
-
- // coerce string value into JS value
- var 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;
+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;
}, {});
/**
@@ -71,68 +149,45 @@ exports.inspectOpts = Object.keys(process.env).filter(function (key) {
*/
function useColors() {
- return 'colors' in exports.inspectOpts
- ? Boolean(exports.inspectOpts.colors)
- : tty.isatty(process.stderr.fd);
+ return 'colors' in exports.inspectOpts ?
+ Boolean(exports.inspectOpts.colors) :
+ tty.isatty(process.stderr.fd);
}
/**
- * Map %o to `util.inspect()`, all on a single line.
- */
-
-exports.formatters.o = function(v) {
- this.inspectOpts.colors = this.useColors;
- return util.inspect(v, this.inspectOpts)
- .split('\n').map(function(str) {
- return str.trim()
- }).join(' ');
-};
-
-/**
- * Map %o to `util.inspect()`, allowing multiple lines if needed.
- */
-
-exports.formatters.O = function(v) {
- this.inspectOpts.colors = this.useColors;
- return util.inspect(v, this.inspectOpts);
-};
-
-/**
* Adds ANSI color escape codes if enabled.
*
* @api public
*/
function formatArgs(args) {
- var name = this.namespace;
- var useColors = this.useColors;
-
- if (useColors) {
- var c = this.color;
- var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c);
- var prefix = ' ' + colorCode + ';1m' + name + ' ' + '\u001b[0m';
-
- args[0] = prefix + args[0].split('\n').join('\n' + prefix);
- args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
- } else {
- args[0] = getDate() + name + ' ' + args[0];
- }
+ 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 '';
- } else {
- return new Date().toISOString() + ' ';
- }
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+ return new Date().toISOString() + ' ';
}
/**
* Invokes `util.format()` with the specified arguments and writes to stderr.
*/
-function log() {
- return process.stderr.write(util.format.apply(util, arguments) + '\n');
+function log(...args) {
+ return process.stderr.write(util.format(...args) + '\n');
}
/**
@@ -141,15 +196,14 @@ function log() {
* @param {String} namespaces
* @api private
*/
-
function save(namespaces) {
- if (null == namespaces) {
- // 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;
- } else {
- process.env.DEBUG = 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;
+ }
}
/**
@@ -160,7 +214,7 @@ function save(namespaces) {
*/
function load() {
- return process.env.DEBUG;
+ return process.env.DEBUG;
}
/**
@@ -170,17 +224,34 @@ function load() {
* differently for a particular `debug` instance.
*/
-function init (debug) {
- debug.inspectOpts = {};
+function init(debug) {
+ debug.inspectOpts = {};
- var keys = Object.keys(exports.inspectOpts);
- for (var i = 0; i < keys.length; i++) {
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
- }
+ 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;
+
/**
- * Enable namespaces listed in `process.env.DEBUG` initially.
+ * Map %o to `util.inspect()`, all on a single line.
*/
-exports.enable(load());
+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
index 220031822f..ced6973347 100644
--- 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
@@ -1,27 +1,4 @@
{
- "_from": "escape-string-regexp@^1.0.5",
- "_id": "escape-string-regexp@1.0.5",
- "_inBundle": false,
- "_integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
- "_location": "/babel-eslint/escape-string-regexp",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "escape-string-regexp@^1.0.5",
- "name": "escape-string-regexp",
- "escapedName": "escape-string-regexp",
- "rawSpec": "^1.0.5",
- "saveSpec": null,
- "fetchSpec": "^1.0.5"
- },
- "_requiredBy": [
- "/babel-eslint/chalk"
- ],
- "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "_shasum": "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4",
- "_spec": "escape-string-regexp@^1.0.5",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/chalk",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -78,4 +55,4 @@
"test": "xo && ava"
},
"version": "1.0.5"
-}
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/eslint-scope/package.json b/tools/node_modules/babel-eslint/node_modules/eslint-scope/package.json
index 6acbc52edc..11062ef6e2 100644
--- a/tools/node_modules/babel-eslint/node_modules/eslint-scope/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/eslint-scope/package.json
@@ -1,27 +1,4 @@
{
- "_from": "eslint-scope@~3.7.1",
- "_id": "eslint-scope@3.7.1",
- "_inBundle": false,
- "_integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=",
- "_location": "/babel-eslint/eslint-scope",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "eslint-scope@~3.7.1",
- "name": "eslint-scope",
- "escapedName": "eslint-scope",
- "rawSpec": "~3.7.1",
- "saveSpec": null,
- "fetchSpec": "~3.7.1"
- },
- "_requiredBy": [
- "/babel-eslint"
- ],
- "_resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz",
- "_shasum": "3d63c3edfda02e06e01a452ad88caacc7cdcb6e8",
- "_spec": "eslint-scope@~3.7.1",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint",
"bugs": {
"url": "https://github.com/eslint/eslint-scope/issues"
},
@@ -71,4 +48,4 @@
"test": "node Makefile.js test"
},
"version": "3.7.1"
-}
+} \ No newline at end of file
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
index 23c97f40d5..13c7c6e903 100644
--- 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
@@ -1,27 +1,4 @@
{
- "_from": "eslint-visitor-keys@^1.0.0",
- "_id": "eslint-visitor-keys@1.0.0",
- "_inBundle": false,
- "_integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==",
- "_location": "/babel-eslint/eslint-visitor-keys",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "eslint-visitor-keys@^1.0.0",
- "name": "eslint-visitor-keys",
- "escapedName": "eslint-visitor-keys",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/babel-eslint"
- ],
- "_resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
- "_shasum": "3f3180fb2e291017716acb4c9d6d5b5c34a6a81d",
- "_spec": "eslint-visitor-keys@^1.0.0",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint",
"author": {
"name": "Toru Nagashima",
"url": "https://github.com/mysticatea"
@@ -65,4 +42,4 @@
"test": "nyc mocha tests/lib"
},
"version": "1.0.0"
-}
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/esrecurse/README.md b/tools/node_modules/babel-eslint/node_modules/esrecurse/README.md
index 03c2ff3025..ffea6b434a 100644
--- a/tools/node_modules/babel-eslint/node_modules/esrecurse/README.md
+++ b/tools/node_modules/babel-eslint/node_modules/esrecurse/README.md
@@ -44,6 +44,7 @@ class Derived extends esrecurse.Visitor {
XXXStatement(node) {
}
}
+```
```javascript
function DerivedVisitor() {
@@ -70,7 +71,7 @@ DerivedVisitor.prototype.XXXStatement = function (node) {
};
```
-The `childVisitorKeys` option does customize the behavoir of `this.visitChildren(node)`.
+The `childVisitorKeys` option does customize the behaviour of `this.visitChildren(node)`.
We can use user-defined node types.
```javascript
diff --git a/tools/node_modules/babel-eslint/node_modules/esrecurse/esrecurse.js b/tools/node_modules/babel-eslint/node_modules/esrecurse/esrecurse.js
index 0805e67f39..15d57dfd02 100644
--- a/tools/node_modules/babel-eslint/node_modules/esrecurse/esrecurse.js
+++ b/tools/node_modules/babel-eslint/node_modules/esrecurse/esrecurse.js
@@ -24,25 +24,7 @@
(function () {
'use strict';
- var assign,
- estraverse,
- isArray,
- objectKeys;
-
- assign = require('object-assign');
- estraverse = require('estraverse');
-
- isArray = Array.isArray || function isArray(array) {
- return Object.prototype.toString.call(array) === '[object Array]';
- };
-
- objectKeys = Object.keys || function (o) {
- var keys = [], key;
- for (key in o) {
- keys.push(key);
- }
- return keys;
- };
+ var estraverse = require('estraverse');
function isNode(node) {
if (node == null) {
@@ -60,10 +42,10 @@
this.__visitor = visitor || this;
this.__childVisitorKeys = options.childVisitorKeys
- ? assign({}, estraverse.VisitorKeys, options.childVisitorKeys)
+ ? Object.assign({}, estraverse.VisitorKeys, options.childVisitorKeys)
: estraverse.VisitorKeys;
if (options.fallback === 'iteration') {
- this.__fallback = objectKeys;
+ this.__fallback = Object.keys;
} else if (typeof options.fallback === 'function') {
this.__fallback = options.fallback;
}
@@ -94,7 +76,7 @@
for (i = 0, iz = children.length; i < iz; ++i) {
child = node[children[i]];
if (child) {
- if (isArray(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])) {
diff --git a/tools/node_modules/babel-eslint/node_modules/esrecurse/package-lock.json b/tools/node_modules/babel-eslint/node_modules/esrecurse/package-lock.json
deleted file mode 100644
index 8faf2d522d..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/esrecurse/package-lock.json
+++ /dev/null
@@ -1,4322 +0,0 @@
-{
- "name": "esrecurse",
- "version": "4.1.0",
- "lockfileVersion": 1,
- "dependencies": {
- "acorn": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
- "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=",
- "dev": true
- },
- "acorn-jsx": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz",
- "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=",
- "dev": true
- },
- "align-text": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
- "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
- "dev": true
- },
- "amdefine": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
- "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
- "dev": true
- },
- "ansi-cyan": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz",
- "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=",
- "dev": true
- },
- "ansi-escapes": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz",
- "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=",
- "dev": true
- },
- "ansi-red": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz",
- "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=",
- "dev": true
- },
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "dev": true
- },
- "ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
- "dev": true
- },
- "ansi-wrap": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
- "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=",
- "dev": true
- },
- "any-shell-escape": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/any-shell-escape/-/any-shell-escape-0.1.1.tgz",
- "integrity": "sha1-1Vq5ciRMcaml4asIefML8RCAaVk=",
- "dev": true
- },
- "anymatch": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz",
- "integrity": "sha1-o+Uvo5FoyCX/V7AkgSbOWo/5VQc=",
- "dev": true,
- "optional": true
- },
- "archy": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
- "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
- "dev": true
- },
- "argparse": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz",
- "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=",
- "dev": true
- },
- "arr-diff": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
- "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=",
- "dev": true
- },
- "arr-flatten": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.3.tgz",
- "integrity": "sha1-onTthawIhJtr14R8RYB0XcUa37E=",
- "dev": true
- },
- "arr-union": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz",
- "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=",
- "dev": true
- },
- "array-differ": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz",
- "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=",
- "dev": true
- },
- "array-each": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
- "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=",
- "dev": true
- },
- "array-find-index": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
- "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
- "dev": true
- },
- "array-slice": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.0.0.tgz",
- "integrity": "sha1-5zA08A3MH0CHYAj9IP6ud71LfC8=",
- "dev": true
- },
- "array-union": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
- "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
- "dev": true
- },
- "array-uniq": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
- "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
- "dev": true
- },
- "array-unique": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
- "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
- "dev": true
- },
- "arrify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
- "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
- "dev": true
- },
- "assertion-error": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz",
- "integrity": "sha1-E8pRXYYgbaC6xm6DTdOX2HWBCUw=",
- "dev": true
- },
- "async": {
- "version": "1.5.2",
- "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
- "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
- "dev": true
- },
- "async-each": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz",
- "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=",
- "dev": true,
- "optional": true
- },
- "babel-cli": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.24.1.tgz",
- "integrity": "sha1-IHzXBbumFImy6kG1MSNBz2rKIoM=",
- "dev": true,
- "dependencies": {
- "glob": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
- "dev": true
- },
- "lodash": {
- "version": "4.17.4",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
- },
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "dev": true
- },
- "source-map": {
- "version": "0.5.6",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
- "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=",
- "dev": true
- }
- }
- },
- "babel-code-frame": {
- "version": "6.22.0",
- "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz",
- "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=",
- "dev": true
- },
- "babel-core": {
- "version": "6.25.0",
- "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.25.0.tgz",
- "integrity": "sha1-fdQrBGPHQunVKW3rPsZ6kyLa1yk=",
- "dev": true,
- "dependencies": {
- "lodash": {
- "version": "4.17.4",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
- },
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "dev": true
- },
- "source-map": {
- "version": "0.5.6",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
- "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=",
- "dev": true
- }
- }
- },
- "babel-generator": {
- "version": "6.25.0",
- "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.25.0.tgz",
- "integrity": "sha1-M6GvcNXyiQrrRlpKd5PB32qeqfw=",
- "dev": true,
- "dependencies": {
- "jsesc": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
- "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
- "dev": true
- },
- "lodash": {
- "version": "4.17.4",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
- },
- "source-map": {
- "version": "0.5.6",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
- "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=",
- "dev": true
- }
- }
- },
- "babel-helper-call-delegate": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz",
- "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=",
- "dev": true
- },
- "babel-helper-define-map": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz",
- "integrity": "sha1-epdH8ljYlH0y1RX2qhx70CIEoIA=",
- "dev": true,
- "dependencies": {
- "lodash": {
- "version": "4.17.4",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
- }
- }
- },
- "babel-helper-function-name": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz",
- "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=",
- "dev": true
- },
- "babel-helper-get-function-arity": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz",
- "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=",
- "dev": true
- },
- "babel-helper-hoist-variables": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz",
- "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=",
- "dev": true
- },
- "babel-helper-optimise-call-expression": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz",
- "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=",
- "dev": true
- },
- "babel-helper-regex": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz",
- "integrity": "sha1-024i+rEAjXnYhkjjIRaGgShFbOg=",
- "dev": true,
- "dependencies": {
- "lodash": {
- "version": "4.17.4",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
- }
- }
- },
- "babel-helper-replace-supers": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz",
- "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=",
- "dev": true
- },
- "babel-helpers": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
- "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
- "dev": true
- },
- "babel-messages": {
- "version": "6.23.0",
- "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
- "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
- "dev": true
- },
- "babel-plugin-check-es2015-constants": {
- "version": "6.22.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz",
- "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=",
- "dev": true
- },
- "babel-plugin-transform-es2015-arrow-functions": {
- "version": "6.22.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz",
- "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=",
- "dev": true
- },
- "babel-plugin-transform-es2015-block-scoped-functions": {
- "version": "6.22.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz",
- "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=",
- "dev": true
- },
- "babel-plugin-transform-es2015-block-scoping": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz",
- "integrity": "sha1-dsKV3DpHQbFmWt/TFnIV3P8ypXY=",
- "dev": true,
- "dependencies": {
- "lodash": {
- "version": "4.17.4",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
- }
- }
- },
- "babel-plugin-transform-es2015-classes": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz",
- "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=",
- "dev": true
- },
- "babel-plugin-transform-es2015-computed-properties": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz",
- "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=",
- "dev": true
- },
- "babel-plugin-transform-es2015-destructuring": {
- "version": "6.23.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz",
- "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=",
- "dev": true
- },
- "babel-plugin-transform-es2015-duplicate-keys": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz",
- "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=",
- "dev": true
- },
- "babel-plugin-transform-es2015-for-of": {
- "version": "6.23.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz",
- "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=",
- "dev": true
- },
- "babel-plugin-transform-es2015-function-name": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz",
- "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=",
- "dev": true
- },
- "babel-plugin-transform-es2015-literals": {
- "version": "6.22.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz",
- "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=",
- "dev": true
- },
- "babel-plugin-transform-es2015-modules-amd": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz",
- "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=",
- "dev": true
- },
- "babel-plugin-transform-es2015-modules-commonjs": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz",
- "integrity": "sha1-0+MQtA72ZKNmIiAAl8bUQCmPK/4=",
- "dev": true
- },
- "babel-plugin-transform-es2015-modules-systemjs": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz",
- "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=",
- "dev": true
- },
- "babel-plugin-transform-es2015-modules-umd": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz",
- "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=",
- "dev": true
- },
- "babel-plugin-transform-es2015-object-super": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz",
- "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=",
- "dev": true
- },
- "babel-plugin-transform-es2015-parameters": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz",
- "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=",
- "dev": true
- },
- "babel-plugin-transform-es2015-shorthand-properties": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz",
- "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=",
- "dev": true
- },
- "babel-plugin-transform-es2015-spread": {
- "version": "6.22.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz",
- "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=",
- "dev": true
- },
- "babel-plugin-transform-es2015-sticky-regex": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz",
- "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=",
- "dev": true
- },
- "babel-plugin-transform-es2015-template-literals": {
- "version": "6.22.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz",
- "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=",
- "dev": true
- },
- "babel-plugin-transform-es2015-typeof-symbol": {
- "version": "6.23.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz",
- "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=",
- "dev": true
- },
- "babel-plugin-transform-es2015-unicode-regex": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz",
- "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=",
- "dev": true
- },
- "babel-plugin-transform-regenerator": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz",
- "integrity": "sha1-uNowWtQ8PJm0hI5P5AN7dw0jxBg=",
- "dev": true
- },
- "babel-plugin-transform-strict-mode": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz",
- "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=",
- "dev": true
- },
- "babel-polyfill": {
- "version": "6.23.0",
- "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz",
- "integrity": "sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=",
- "dev": true
- },
- "babel-preset-es2015": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz",
- "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=",
- "dev": true
- },
- "babel-register": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.24.1.tgz",
- "integrity": "sha1-fhDhOi9xBlvfrVoXh7pFvKbe118=",
- "dev": true,
- "dependencies": {
- "lodash": {
- "version": "4.17.4",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
- }
- }
- },
- "babel-runtime": {
- "version": "6.23.0",
- "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz",
- "integrity": "sha1-CpSJ8UTecO+zzkMArM2zKeL8VDs=",
- "dev": true
- },
- "babel-template": {
- "version": "6.25.0",
- "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.25.0.tgz",
- "integrity": "sha1-ZlJBFmt8KqTGGdceGSlpVSsQwHE=",
- "dev": true,
- "dependencies": {
- "lodash": {
- "version": "4.17.4",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
- }
- }
- },
- "babel-traverse": {
- "version": "6.25.0",
- "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.25.0.tgz",
- "integrity": "sha1-IldJfi/NGbie3BPEyROB+VEklvE=",
- "dev": true,
- "dependencies": {
- "globals": {
- "version": "9.18.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
- "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
- "dev": true
- },
- "lodash": {
- "version": "4.17.4",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
- }
- }
- },
- "babel-types": {
- "version": "6.25.0",
- "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.25.0.tgz",
- "integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=",
- "dev": true,
- "dependencies": {
- "lodash": {
- "version": "4.17.4",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
- }
- }
- },
- "babylon": {
- "version": "6.17.4",
- "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.17.4.tgz",
- "integrity": "sha512-kChlV+0SXkjE0vUn9OZ7pBMWRFd8uq3mZe8x1K6jhuNcAFAtEnjchFAqB+dYEXKyd+JpT6eppRR78QAr5gTsUw==",
- "dev": true
- },
- "balanced-match": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
- "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
- "dev": true
- },
- "beeper": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz",
- "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=",
- "dev": true
- },
- "binary-extensions": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.8.0.tgz",
- "integrity": "sha1-SOyNFt9Dd+rl+liEaCSAr02Vx3Q=",
- "dev": true,
- "optional": true
- },
- "bluebird": {
- "version": "3.4.7",
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz",
- "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=",
- "dev": true
- },
- "brace-expansion": {
- "version": "1.1.8",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
- "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
- "dev": true
- },
- "braces": {
- "version": "1.8.5",
- "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
- "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=",
- "dev": true
- },
- "bufferstreams": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/bufferstreams/-/bufferstreams-1.1.1.tgz",
- "integrity": "sha1-AWE3MGCsWYjv+ZBYcxEU9uGV1R4=",
- "dev": true,
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
- },
- "readable-stream": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.0.tgz",
- "integrity": "sha512-c7KMXGd4b48nN3OJ1U9qOsn6pXNzf6kLd3kdZCkg2sxAcoiufInqF0XckwEnlrcwuaYwonlNK8GQUIOC/WC7sg==",
- "dev": true
- },
- "string_decoder": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz",
- "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=",
- "dev": true,
- "dependencies": {
- "safe-buffer": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
- "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=",
- "dev": true
- }
- }
- }
- }
- },
- "builtin-modules": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
- "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
- "dev": true
- },
- "camelcase": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
- "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=",
- "dev": true
- },
- "camelcase-keys": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
- "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
- "dev": true
- },
- "catharsis": {
- "version": "0.8.8",
- "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.8.tgz",
- "integrity": "sha1-aTR59DqsVJ2Aa9c+kkzQ2USVGgY=",
- "dev": true
- },
- "center-align": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
- "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
- "dev": true,
- "optional": true
- },
- "chai": {
- "version": "3.5.0",
- "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz",
- "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=",
- "dev": true
- },
- "chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
- "dev": true
- },
- "chokidar": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz",
- "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=",
- "dev": true,
- "optional": true
- },
- "circular-json": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.1.tgz",
- "integrity": "sha1-vos2rvzN6LPKeqLWr8B6NyQsDS0=",
- "dev": true
- },
- "cli-cursor": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz",
- "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=",
- "dev": true
- },
- "cli-width": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-1.1.1.tgz",
- "integrity": "sha1-pNKT72frt7iNSk1CwMzwDE0eNm0=",
- "dev": true
- },
- "cliui": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
- "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
- "dev": true,
- "optional": true,
- "dependencies": {
- "wordwrap": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
- "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
- "dev": true,
- "optional": true
- }
- }
- },
- "clone": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz",
- "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=",
- "dev": true
- },
- "clone-stats": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz",
- "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=",
- "dev": true
- },
- "code-point-at": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
- "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
- "dev": true
- },
- "coffee-script": {
- "version": "1.12.6",
- "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.6.tgz",
- "integrity": "sha1-KFo/cRVokGUGTWv570Vy22ZpXL8=",
- "dev": true
- },
- "commander": {
- "version": "2.9.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
- "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=",
- "dev": true
- },
- "concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
- "dev": true
- },
- "concat-stream": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz",
- "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=",
- "dev": true,
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
- },
- "readable-stream": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.0.tgz",
- "integrity": "sha512-c7KMXGd4b48nN3OJ1U9qOsn6pXNzf6kLd3kdZCkg2sxAcoiufInqF0XckwEnlrcwuaYwonlNK8GQUIOC/WC7sg==",
- "dev": true
- },
- "string_decoder": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz",
- "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=",
- "dev": true,
- "dependencies": {
- "safe-buffer": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
- "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=",
- "dev": true
- }
- }
- }
- }
- },
- "convert-source-map": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz",
- "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=",
- "dev": true
- },
- "core-js": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz",
- "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=",
- "dev": true
- },
- "core-util-is": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
- "dev": true
- },
- "currently-unhandled": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
- "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
- "dev": true
- },
- "d": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
- "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
- "dev": true
- },
- "dateformat": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz",
- "integrity": "sha1-J0Pjq7XD/CRi5SfcpEXgTp9N7hc=",
- "dev": true
- },
- "debug": {
- "version": "2.6.8",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
- "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
- "dev": true
- },
- "decamelize": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
- "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
- "dev": true
- },
- "deep-eql": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz",
- "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=",
- "dev": true,
- "dependencies": {
- "type-detect": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz",
- "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=",
- "dev": true
- }
- }
- },
- "deep-is": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
- "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
- "dev": true
- },
- "defaults": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
- "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
- "dev": true
- },
- "del": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz",
- "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=",
- "dev": true
- },
- "deprecated": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz",
- "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=",
- "dev": true
- },
- "detect-file": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-0.1.0.tgz",
- "integrity": "sha1-STXe39lIhkjgBrASlWbpOGcR6mM=",
- "dev": true
- },
- "detect-indent": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
- "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
- "dev": true
- },
- "diff": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz",
- "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=",
- "dev": true
- },
- "doctrine": {
- "version": "0.7.2",
- "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-0.7.2.tgz",
- "integrity": "sha1-fLhgNZujvpDgQLJrcpzkv6ZUxSM=",
- "dev": true,
- "dependencies": {
- "esutils": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz",
- "integrity": "sha1-wBzKqa5LiXxtDD4hCuUvPHqEQ3U=",
- "dev": true
- }
- }
- },
- "dot-object": {
- "version": "1.5.4",
- "resolved": "https://registry.npmjs.org/dot-object/-/dot-object-1.5.4.tgz",
- "integrity": "sha1-ryuN8mJrZQIM1nKdRsMxvDDTtIc=",
- "dev": true,
- "dependencies": {
- "glob": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
- "dev": true
- },
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "dev": true
- }
- }
- },
- "duplexer2": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz",
- "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=",
- "dev": true
- },
- "end-of-stream": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz",
- "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=",
- "dev": true
- },
- "error-ex": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
- "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
- "dev": true
- },
- "es5-ext": {
- "version": "0.10.23",
- "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.23.tgz",
- "integrity": "sha1-dXi1G+l0IHpUh4IbVlOMIk5Oezg=",
- "dev": true
- },
- "es6-iterator": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz",
- "integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=",
- "dev": true
- },
- "es6-map": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz",
- "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=",
- "dev": true
- },
- "es6-set": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",
- "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=",
- "dev": true
- },
- "es6-symbol": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
- "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
- "dev": true
- },
- "es6-weak-map": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
- "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
- "dev": true
- },
- "escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
- "dev": true
- },
- "escope": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz",
- "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=",
- "dev": true
- },
- "eslint": {
- "version": "1.10.3",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-1.10.3.tgz",
- "integrity": "sha1-+xmpGxPBWAgrvKKUsX2Xm8g1Ogo=",
- "dev": true,
- "dependencies": {
- "espree": {
- "version": "2.2.5",
- "resolved": "https://registry.npmjs.org/espree/-/espree-2.2.5.tgz",
- "integrity": "sha1-32kbkxCIlAKuspzAZnCMVmkLhUs=",
- "dev": true
- },
- "glob": {
- "version": "5.0.15",
- "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
- "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=",
- "dev": true
- },
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "dev": true
- },
- "user-home": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz",
- "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=",
- "dev": true
- }
- }
- },
- "espree": {
- "version": "3.1.7",
- "resolved": "https://registry.npmjs.org/espree/-/espree-3.1.7.tgz",
- "integrity": "sha1-/V3ux2qXpRIKnNOnyxF3oJI7EdI=",
- "dev": true
- },
- "esprima": {
- "version": "2.7.3",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
- "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=",
- "dev": true
- },
- "esrecurse": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.1.0.tgz",
- "integrity": "sha1-RxO2U2rffyrE8yfVWed1a/9kgiA=",
- "dev": true,
- "dependencies": {
- "estraverse": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz",
- "integrity": "sha1-9srKcokzqFDvkGYdDheYK6RxEaI=",
- "dev": true
- }
- }
- },
- "estraverse": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
- "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM="
- },
- "estraverse-fb": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/estraverse-fb/-/estraverse-fb-1.3.1.tgz",
- "integrity": "sha1-Fg51qA5gWwjOiUvM4v4+Qpq/kr8=",
- "dev": true
- },
- "esutils": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
- "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
- "dev": true
- },
- "event-emitter": {
- "version": "0.3.5",
- "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
- "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=",
- "dev": true
- },
- "exit-hook": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz",
- "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=",
- "dev": true
- },
- "expand-brackets": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz",
- "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=",
- "dev": true
- },
- "expand-range": {
- "version": "1.8.2",
- "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
- "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
- "dev": true
- },
- "expand-tilde": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz",
- "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=",
- "dev": true
- },
- "extend": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
- "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
- "dev": true
- },
- "extend-shallow": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz",
- "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=",
- "dev": true,
- "dependencies": {
- "kind-of": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
- "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=",
- "dev": true
- }
- }
- },
- "extglob": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
- "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=",
- "dev": true
- },
- "fancy-log": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz",
- "integrity": "sha1-Rb4X0Cu5kX1gzP/UmVyZnmyMmUg=",
- "dev": true
- },
- "fast-levenshtein": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz",
- "integrity": "sha1-AXjc3uAjuSkFGTrwlZ6KdjnP3Lk=",
- "dev": true
- },
- "figures": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
- "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
- "dev": true
- },
- "file-entry-cache": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.3.1.tgz",
- "integrity": "sha1-RMYepgeuS+nBQC9B9EJwy/4zT/g=",
- "dev": true
- },
- "filename-regex": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
- "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=",
- "dev": true
- },
- "fill-range": {
- "version": "2.2.3",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz",
- "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=",
- "dev": true
- },
- "find-index": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz",
- "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=",
- "dev": true
- },
- "find-up": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
- "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
- "dev": true
- },
- "findup-sync": {
- "version": "0.4.3",
- "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz",
- "integrity": "sha1-QAQ5Kee8YK3wt/SCfExudaDeyhI=",
- "dev": true
- },
- "fined": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz",
- "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=",
- "dev": true,
- "dependencies": {
- "expand-tilde": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
- "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
- "dev": true
- }
- }
- },
- "first-chunk-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
- "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=",
- "dev": true
- },
- "flagged-respawn": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz",
- "integrity": "sha1-/xke3c1wiKZ1smEP/8l2vpuAdLU=",
- "dev": true
- },
- "flat-cache": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.2.tgz",
- "integrity": "sha1-+oZxTnLCHbiGAXYezy9VXRq8a5Y=",
- "dev": true,
- "dependencies": {
- "graceful-fs": {
- "version": "4.1.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
- "dev": true
- }
- }
- },
- "for-in": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
- "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
- "dev": true
- },
- "for-own": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz",
- "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=",
- "dev": true
- },
- "fs-exists-sync": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz",
- "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=",
- "dev": true
- },
- "fs-readdir-recursive": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz",
- "integrity": "sha1-jNF0XItPiinIyuw5JHaSG6GV9WA=",
- "dev": true
- },
- "fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
- "dev": true
- },
- "fsevents": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz",
- "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==",
- "dev": true,
- "optional": true,
- "dependencies": {
- "abbrev": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "ajv": {
- "version": "4.11.8",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "ansi-regex": {
- "version": "2.1.1",
- "bundled": true,
- "dev": true
- },
- "aproba": {
- "version": "1.1.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "are-we-there-yet": {
- "version": "1.1.4",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "asn1": {
- "version": "0.2.3",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "assert-plus": {
- "version": "0.2.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "asynckit": {
- "version": "0.4.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "aws-sign2": {
- "version": "0.6.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "aws4": {
- "version": "1.6.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "balanced-match": {
- "version": "0.4.2",
- "bundled": true,
- "dev": true
- },
- "bcrypt-pbkdf": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "block-stream": {
- "version": "0.0.9",
- "bundled": true,
- "dev": true
- },
- "boom": {
- "version": "2.10.1",
- "bundled": true,
- "dev": true
- },
- "brace-expansion": {
- "version": "1.1.7",
- "bundled": true,
- "dev": true
- },
- "buffer-shims": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "caseless": {
- "version": "0.12.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "co": {
- "version": "4.6.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "code-point-at": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true
- },
- "combined-stream": {
- "version": "1.0.5",
- "bundled": true,
- "dev": true
- },
- "concat-map": {
- "version": "0.0.1",
- "bundled": true,
- "dev": true
- },
- "console-control-strings": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true
- },
- "core-util-is": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "cryptiles": {
- "version": "2.0.5",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "dashdash": {
- "version": "1.14.1",
- "bundled": true,
- "dev": true,
- "optional": true,
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- }
- }
- },
- "debug": {
- "version": "2.6.8",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "deep-extend": {
- "version": "0.4.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "delayed-stream": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "delegates": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "ecc-jsbn": {
- "version": "0.1.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "extend": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "extsprintf": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "forever-agent": {
- "version": "0.6.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "form-data": {
- "version": "2.1.4",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "fs.realpath": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "fstream": {
- "version": "1.0.11",
- "bundled": true,
- "dev": true
- },
- "fstream-ignore": {
- "version": "1.0.5",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "gauge": {
- "version": "2.7.4",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "getpass": {
- "version": "0.1.7",
- "bundled": true,
- "dev": true,
- "optional": true,
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- }
- }
- },
- "glob": {
- "version": "7.1.2",
- "bundled": true,
- "dev": true
- },
- "graceful-fs": {
- "version": "4.1.11",
- "bundled": true,
- "dev": true
- },
- "har-schema": {
- "version": "1.0.5",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "har-validator": {
- "version": "4.2.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "has-unicode": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "hawk": {
- "version": "3.1.3",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "hoek": {
- "version": "2.16.3",
- "bundled": true,
- "dev": true
- },
- "http-signature": {
- "version": "1.1.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "inflight": {
- "version": "1.0.6",
- "bundled": true,
- "dev": true
- },
- "inherits": {
- "version": "2.0.3",
- "bundled": true,
- "dev": true
- },
- "ini": {
- "version": "1.3.4",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "is-fullwidth-code-point": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "is-typedarray": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "isarray": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "isstream": {
- "version": "0.1.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "jodid25519": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "jsbn": {
- "version": "0.1.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "json-schema": {
- "version": "0.2.3",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "json-stable-stringify": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "json-stringify-safe": {
- "version": "5.0.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "jsonify": {
- "version": "0.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "jsprim": {
- "version": "1.4.0",
- "bundled": true,
- "dev": true,
- "optional": true,
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- }
- }
- },
- "mime-db": {
- "version": "1.27.0",
- "bundled": true,
- "dev": true
- },
- "mime-types": {
- "version": "2.1.15",
- "bundled": true,
- "dev": true
- },
- "minimatch": {
- "version": "3.0.4",
- "bundled": true,
- "dev": true
- },
- "minimist": {
- "version": "0.0.8",
- "bundled": true,
- "dev": true
- },
- "mkdirp": {
- "version": "0.5.1",
- "bundled": true,
- "dev": true
- },
- "ms": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "node-pre-gyp": {
- "version": "0.6.36",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "nopt": {
- "version": "4.0.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "npmlog": {
- "version": "4.1.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "number-is-nan": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "oauth-sign": {
- "version": "0.8.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "object-assign": {
- "version": "4.1.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "once": {
- "version": "1.4.0",
- "bundled": true,
- "dev": true
- },
- "os-homedir": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "os-tmpdir": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "osenv": {
- "version": "0.1.4",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "path-is-absolute": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "performance-now": {
- "version": "0.2.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "process-nextick-args": {
- "version": "1.0.7",
- "bundled": true,
- "dev": true
- },
- "punycode": {
- "version": "1.4.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "qs": {
- "version": "6.4.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "rc": {
- "version": "1.2.1",
- "bundled": true,
- "dev": true,
- "optional": true,
- "dependencies": {
- "minimist": {
- "version": "1.2.0",
- "bundled": true,
- "dev": true,
- "optional": true
- }
- }
- },
- "readable-stream": {
- "version": "2.2.9",
- "bundled": true,
- "dev": true
- },
- "request": {
- "version": "2.81.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "rimraf": {
- "version": "2.6.1",
- "bundled": true,
- "dev": true
- },
- "safe-buffer": {
- "version": "5.0.1",
- "bundled": true,
- "dev": true
- },
- "semver": {
- "version": "5.3.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "set-blocking": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "signal-exit": {
- "version": "3.0.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "sntp": {
- "version": "1.0.9",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "sshpk": {
- "version": "1.13.0",
- "bundled": true,
- "dev": true,
- "optional": true,
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- }
- }
- },
- "string_decoder": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "string-width": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "stringstream": {
- "version": "0.0.5",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "strip-ansi": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true
- },
- "strip-json-comments": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "tar": {
- "version": "2.2.1",
- "bundled": true,
- "dev": true
- },
- "tar-pack": {
- "version": "3.4.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "tough-cookie": {
- "version": "2.3.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "tunnel-agent": {
- "version": "0.6.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "tweetnacl": {
- "version": "0.14.5",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "uid-number": {
- "version": "0.0.6",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "util-deprecate": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "uuid": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "verror": {
- "version": "1.3.6",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "wide-align": {
- "version": "1.1.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "wrappy": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- }
- }
- },
- "gaze": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz",
- "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=",
- "dev": true
- },
- "generate-function": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
- "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=",
- "dev": true
- },
- "generate-object-property": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
- "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=",
- "dev": true
- },
- "get-stdin": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
- "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
- "dev": true
- },
- "glob": {
- "version": "4.5.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz",
- "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=",
- "dev": true
- },
- "glob-base": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz",
- "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=",
- "dev": true
- },
- "glob-parent": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
- "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
- "dev": true
- },
- "glob-stream": {
- "version": "3.1.18",
- "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz",
- "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=",
- "dev": true,
- "dependencies": {
- "readable-stream": {
- "version": "1.0.34",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
- "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
- "dev": true
- },
- "through2": {
- "version": "0.6.5",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
- "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
- "dev": true
- }
- }
- },
- "glob-watcher": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz",
- "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=",
- "dev": true
- },
- "glob2base": {
- "version": "0.0.12",
- "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz",
- "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=",
- "dev": true
- },
- "global-modules": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz",
- "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=",
- "dev": true
- },
- "global-prefix": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz",
- "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=",
- "dev": true
- },
- "globals": {
- "version": "8.18.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-8.18.0.tgz",
- "integrity": "sha1-k9SmK9ysOM+vr8R9awNHaMsP/LQ=",
- "dev": true
- },
- "globby": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
- "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=",
- "dev": true,
- "dependencies": {
- "glob": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
- "dev": true
- },
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "dev": true
- }
- }
- },
- "globule": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz",
- "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=",
- "dev": true,
- "dependencies": {
- "glob": {
- "version": "3.1.21",
- "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz",
- "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=",
- "dev": true
- },
- "graceful-fs": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz",
- "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=",
- "dev": true
- },
- "inherits": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz",
- "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=",
- "dev": true
- },
- "minimatch": {
- "version": "0.2.14",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
- "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
- "dev": true
- }
- }
- },
- "glogg": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz",
- "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=",
- "dev": true
- },
- "graceful-fs": {
- "version": "3.0.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz",
- "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=",
- "dev": true
- },
- "graceful-readlink": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
- "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=",
- "dev": true
- },
- "growl": {
- "version": "1.9.2",
- "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz",
- "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=",
- "dev": true
- },
- "gulp": {
- "version": "3.9.1",
- "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz",
- "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=",
- "dev": true
- },
- "gulp-bump": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/gulp-bump/-/gulp-bump-1.0.0.tgz",
- "integrity": "sha1-XofEsSlyalzphvIjDnU3vzzecqw=",
- "dev": true,
- "dependencies": {
- "readable-stream": {
- "version": "1.0.34",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
- "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
- "dev": true
- },
- "semver": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
- "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
- "dev": true
- },
- "through2": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz",
- "integrity": "sha1-390BLrnHAOIyP9M084rGIqs3Lac=",
- "dev": true
- },
- "xtend": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz",
- "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=",
- "dev": true
- }
- }
- },
- "gulp-eslint": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/gulp-eslint/-/gulp-eslint-1.1.1.tgz",
- "integrity": "sha1-nxY4D1MxchUrN/O1woFkmt+PRmQ=",
- "dev": true
- },
- "gulp-filter": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-3.0.1.tgz",
- "integrity": "sha1-fG/85bVj6J3nqQ387/FuyKjLFWI=",
- "dev": true
- },
- "gulp-git": {
- "version": "1.15.1",
- "resolved": "https://registry.npmjs.org/gulp-git/-/gulp-git-1.15.1.tgz",
- "integrity": "sha1-zdnTVPxB2Ny1LO9HJW37o2Z4WXk=",
- "dev": true,
- "dependencies": {
- "readable-stream": {
- "version": "1.0.34",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
- "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
- "dev": true
- },
- "through2": {
- "version": "0.6.5",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
- "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
- "dev": true
- }
- }
- },
- "gulp-mocha": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/gulp-mocha/-/gulp-mocha-2.2.0.tgz",
- "integrity": "sha1-HOXrpLlLQMdDav7DxJgsjuqJQZI=",
- "dev": true
- },
- "gulp-tag-version": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/gulp-tag-version/-/gulp-tag-version-1.3.0.tgz",
- "integrity": "sha1-hEjIfu0YZtuObLWYvEGb4t98R9s=",
- "dev": true,
- "dependencies": {
- "ansi-regex": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz",
- "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=",
- "dev": true
- },
- "ansi-styles": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz",
- "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=",
- "dev": true
- },
- "chalk": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz",
- "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=",
- "dev": true
- },
- "dateformat": {
- "version": "1.0.12",
- "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz",
- "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=",
- "dev": true
- },
- "gulp-git": {
- "version": "0.3.6",
- "resolved": "https://registry.npmjs.org/gulp-git/-/gulp-git-0.3.6.tgz",
- "integrity": "sha1-d+w9oiklwkbt15bKENQWOWXYFAo=",
- "dev": true
- },
- "gulp-util": {
- "version": "2.2.20",
- "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-2.2.20.tgz",
- "integrity": "sha1-1xRuVyiRC9jwR6awseVJvCLb1kw=",
- "dev": true,
- "dependencies": {
- "through2": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz",
- "integrity": "sha1-390BLrnHAOIyP9M084rGIqs3Lac=",
- "dev": true
- }
- }
- },
- "has-ansi": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz",
- "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=",
- "dev": true
- },
- "lodash._reinterpolate": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz",
- "integrity": "sha1-TxInqlqHEfxjL1sHofRgequLMiI=",
- "dev": true
- },
- "lodash.escape": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-2.4.1.tgz",
- "integrity": "sha1-LOEsXghNsKV92l5dHu659dF1o7Q=",
- "dev": true
- },
- "lodash.keys": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz",
- "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=",
- "dev": true
- },
- "lodash.template": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-2.4.1.tgz",
- "integrity": "sha1-nmEQB+32KRKal0qzxIuBez4c8g0=",
- "dev": true
- },
- "lodash.templatesettings": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz",
- "integrity": "sha1-6nbHXRHrhtTb6JqDiTu4YZKaxpk=",
- "dev": true
- },
- "minimist": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.2.0.tgz",
- "integrity": "sha1-Tf/lJdriuGTGbC4jxicdev3s784=",
- "dev": true
- },
- "readable-stream": {
- "version": "1.0.34",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
- "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
- "dev": true
- },
- "strip-ansi": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz",
- "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=",
- "dev": true
- },
- "supports-color": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz",
- "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=",
- "dev": true
- },
- "through2": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz",
- "integrity": "sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s=",
- "dev": true,
- "dependencies": {
- "xtend": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
- "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
- "dev": true
- }
- }
- },
- "vinyl": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.2.3.tgz",
- "integrity": "sha1-vKk4IJWC7FpJrVOKAPofEl5RMlI=",
- "dev": true
- },
- "xtend": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz",
- "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=",
- "dev": true
- }
- }
- },
- "gulp-util": {
- "version": "3.0.8",
- "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz",
- "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=",
- "dev": true,
- "dependencies": {
- "object-assign": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz",
- "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=",
- "dev": true
- }
- }
- },
- "gulplog": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
- "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=",
- "dev": true
- },
- "handlebars": {
- "version": "4.0.10",
- "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.10.tgz",
- "integrity": "sha1-PTDHGLCaPZbyPqTMH0A8TTup/08=",
- "dev": true
- },
- "has-ansi": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
- "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
- "dev": true
- },
- "has-gulplog": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz",
- "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=",
- "dev": true
- },
- "home-or-tmp": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
- "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=",
- "dev": true
- },
- "homedir-polyfill": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz",
- "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=",
- "dev": true
- },
- "hosted-git-info": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.2.tgz",
- "integrity": "sha1-AHa59GonBQbduq6lZJaJdGBhKmc=",
- "dev": true
- },
- "indent-string": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
- "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
- "dev": true
- },
- "inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
- "dev": true
- },
- "inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
- "dev": true
- },
- "ini": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz",
- "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=",
- "dev": true
- },
- "inquirer": {
- "version": "0.11.4",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.11.4.tgz",
- "integrity": "sha1-geM3ToNhvq/y2XAWIG01nQsy+k0=",
- "dev": true,
- "dependencies": {
- "lodash": {
- "version": "3.10.1",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
- "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
- "dev": true
- }
- }
- },
- "interpret": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz",
- "integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=",
- "dev": true
- },
- "invariant": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz",
- "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=",
- "dev": true
- },
- "irregular-plurals": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.2.0.tgz",
- "integrity": "sha1-OPKZg0uowAwwvpxVThNyaXUv86w=",
- "dev": true
- },
- "is-absolute": {
- "version": "0.2.6",
- "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz",
- "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=",
- "dev": true
- },
- "is-arrayish": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
- "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
- "dev": true
- },
- "is-binary-path": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
- "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
- "dev": true,
- "optional": true
- },
- "is-buffer": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz",
- "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=",
- "dev": true
- },
- "is-builtin-module": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
- "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
- "dev": true
- },
- "is-dotfile": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
- "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=",
- "dev": true
- },
- "is-equal-shallow": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz",
- "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=",
- "dev": true
- },
- "is-extendable": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
- "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
- "dev": true
- },
- "is-extglob": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
- "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
- "dev": true
- },
- "is-finite": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
- "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
- "dev": true
- },
- "is-glob": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
- "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
- "dev": true
- },
- "is-my-json-valid": {
- "version": "2.16.0",
- "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz",
- "integrity": "sha1-8Hndm/2uZe4gOKrorLyGqxCeNpM=",
- "dev": true
- },
- "is-number": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz",
- "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=",
- "dev": true
- },
- "is-path-cwd": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz",
- "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=",
- "dev": true
- },
- "is-path-in-cwd": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz",
- "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=",
- "dev": true
- },
- "is-path-inside": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz",
- "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=",
- "dev": true
- },
- "is-plain-object": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.3.tgz",
- "integrity": "sha1-wVvz5LZrYtcu+vKSWEhmPsvGGbY=",
- "dev": true,
- "dependencies": {
- "isobject": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.0.tgz",
- "integrity": "sha1-OVZSF/NmF4nooKDAgNX35rxG4aA=",
- "dev": true
- }
- }
- },
- "is-posix-bracket": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz",
- "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=",
- "dev": true
- },
- "is-primitive": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
- "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=",
- "dev": true
- },
- "is-property": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
- "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=",
- "dev": true
- },
- "is-relative": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz",
- "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=",
- "dev": true
- },
- "is-resolvable": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz",
- "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=",
- "dev": true
- },
- "is-unc-path": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz",
- "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=",
- "dev": true
- },
- "is-utf8": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
- "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
- "dev": true
- },
- "is-windows": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz",
- "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=",
- "dev": true
- },
- "isarray": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
- "dev": true
- },
- "isexe": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
- "dev": true
- },
- "isobject": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
- "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
- "dev": true,
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
- }
- }
- },
- "jade": {
- "version": "0.26.3",
- "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz",
- "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=",
- "dev": true,
- "dependencies": {
- "commander": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz",
- "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY=",
- "dev": true
- },
- "mkdirp": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz",
- "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=",
- "dev": true
- }
- }
- },
- "js-tokens": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz",
- "integrity": "sha1-COnxMkhKLEWjCQfp3E1VZ7fxFNc=",
- "dev": true
- },
- "js-yaml": {
- "version": "3.4.5",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.4.5.tgz",
- "integrity": "sha1-w0A3l98SuRhmV08t4jZG/oyvtE0=",
- "dev": true
- },
- "js2xmlparser": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-1.0.0.tgz",
- "integrity": "sha1-WhcPLo1kds5FQF4EgjJCUTeC/jA=",
- "dev": true
- },
- "jsdoc": {
- "version": "3.4.3",
- "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.4.3.tgz",
- "integrity": "sha1-5XQNYUXGgfZnnmwXeDqI292XzNM=",
- "dev": true,
- "dependencies": {
- "strip-json-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
- "dev": true
- }
- }
- },
- "jsesc": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
- "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
- "dev": true
- },
- "json-stable-stringify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
- "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
- "dev": true
- },
- "json5": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
- "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
- "dev": true
- },
- "jsonify": {
- "version": "0.0.0",
- "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
- "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
- "dev": true
- },
- "jsonpointer": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
- "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=",
- "dev": true
- },
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "dev": true
- },
- "klaw": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz",
- "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=",
- "dev": true,
- "dependencies": {
- "graceful-fs": {
- "version": "4.1.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
- "dev": true,
- "optional": true
- }
- }
- },
- "lazy-cache": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
- "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
- "dev": true,
- "optional": true
- },
- "levn": {
- "version": "0.2.5",
- "resolved": "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz",
- "integrity": "sha1-uo0znQykphDjo/FFucr0iAcVUFQ=",
- "dev": true
- },
- "liftoff": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz",
- "integrity": "sha1-qY8v9nGD2Lp8+soQVIvX/wVQs4U=",
- "dev": true
- },
- "load-json-file": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
- "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
- "dev": true,
- "dependencies": {
- "graceful-fs": {
- "version": "4.1.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
- "dev": true
- },
- "strip-bom": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
- "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
- "dev": true
- }
- }
- },
- "lodash": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz",
- "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=",
- "dev": true
- },
- "lodash._arraycopy": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz",
- "integrity": "sha1-due3wfH7klRzdIeKVi7Qaj5Q9uE=",
- "dev": true
- },
- "lodash._arrayeach": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz",
- "integrity": "sha1-urFWsqkNPxu9XGU0AzSeXlkz754=",
- "dev": true
- },
- "lodash._arraymap": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lodash._arraymap/-/lodash._arraymap-3.0.0.tgz",
- "integrity": "sha1-Go/Q9MDfS2HeoHbXF83Jfwo8PmY=",
- "dev": true
- },
- "lodash._baseassign": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz",
- "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=",
- "dev": true
- },
- "lodash._baseclone": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz",
- "integrity": "sha1-MDUZv2OT/n5C802LYw73eU41Qrc=",
- "dev": true
- },
- "lodash._basecopy": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
- "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=",
- "dev": true
- },
- "lodash._basedifference": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/lodash._basedifference/-/lodash._basedifference-3.0.3.tgz",
- "integrity": "sha1-8sIEKWwqeOArOJCBtu3KyTPPYpw=",
- "dev": true
- },
- "lodash._baseflatten": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz",
- "integrity": "sha1-B3D/gBMa9uNPO1EXlqe6UhTmX/c=",
- "dev": true
- },
- "lodash._basefor": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/lodash._basefor/-/lodash._basefor-3.0.3.tgz",
- "integrity": "sha1-dVC06SGO8J+tJDQ7YSAhx5tMIMI=",
- "dev": true
- },
- "lodash._baseindexof": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz",
- "integrity": "sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=",
- "dev": true
- },
- "lodash._basetostring": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz",
- "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=",
- "dev": true
- },
- "lodash._basevalues": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz",
- "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=",
- "dev": true
- },
- "lodash._bindcallback": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz",
- "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=",
- "dev": true
- },
- "lodash._cacheindexof": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz",
- "integrity": "sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=",
- "dev": true
- },
- "lodash._createassigner": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz",
- "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=",
- "dev": true
- },
- "lodash._createcache": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/lodash._createcache/-/lodash._createcache-3.1.2.tgz",
- "integrity": "sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=",
- "dev": true
- },
- "lodash._escapehtmlchar": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz",
- "integrity": "sha1-32fDu2t+jh6DGrSL+geVuSr+iZ0=",
- "dev": true
- },
- "lodash._escapestringchar": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz",
- "integrity": "sha1-7P4iYYoq3lC/7qQ5N+Ud9m8O23I=",
- "dev": true
- },
- "lodash._getnative": {
- "version": "3.9.1",
- "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz",
- "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=",
- "dev": true
- },
- "lodash._htmlescapes": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz",
- "integrity": "sha1-MtFL8IRLbeb4tioFG09nwii2JMs=",
- "dev": true
- },
- "lodash._isiterateecall": {
- "version": "3.0.9",
- "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz",
- "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=",
- "dev": true
- },
- "lodash._isnative": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz",
- "integrity": "sha1-PqZAS3hKe+g2x7V1gOHN95sUgyw=",
- "dev": true
- },
- "lodash._objecttypes": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz",
- "integrity": "sha1-fAt/admKH3ZSn4kLDNsbTf7BHBE=",
- "dev": true
- },
- "lodash._pickbyarray": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/lodash._pickbyarray/-/lodash._pickbyarray-3.0.2.tgz",
- "integrity": "sha1-H4mNlgfrVgsOFnOEt3x8bRCKpMU=",
- "dev": true
- },
- "lodash._pickbycallback": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lodash._pickbycallback/-/lodash._pickbycallback-3.0.0.tgz",
- "integrity": "sha1-/2G5oBens699MObFPeKK+hm4dQo=",
- "dev": true
- },
- "lodash._reescape": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz",
- "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=",
- "dev": true
- },
- "lodash._reevaluate": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz",
- "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=",
- "dev": true
- },
- "lodash._reinterpolate": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz",
- "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=",
- "dev": true
- },
- "lodash._reunescapedhtml": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz",
- "integrity": "sha1-dHxPxAED6zu4oJduVx96JlnpO6c=",
- "dev": true,
- "dependencies": {
- "lodash.keys": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz",
- "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=",
- "dev": true
- }
- }
- },
- "lodash._root": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz",
- "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=",
- "dev": true
- },
- "lodash._shimkeys": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz",
- "integrity": "sha1-bpzJZm/wgfC1psl4uD4kLmlJ0gM=",
- "dev": true
- },
- "lodash.clonedeep": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz",
- "integrity": "sha1-oKHkDYKl6on/WxR7hETtY9koJ9s=",
- "dev": true
- },
- "lodash.defaults": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz",
- "integrity": "sha1-p+iIXwXmiFEUS24SqPNngCa8TFQ=",
- "dev": true,
- "dependencies": {
- "lodash.keys": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz",
- "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=",
- "dev": true
- }
- }
- },
- "lodash.escape": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz",
- "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=",
- "dev": true
- },
- "lodash.isarguments": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
- "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=",
- "dev": true
- },
- "lodash.isarray": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
- "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=",
- "dev": true
- },
- "lodash.isobject": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz",
- "integrity": "sha1-Wi5H/mmVPx7mMafrof5k0tBlWPU=",
- "dev": true
- },
- "lodash.isplainobject": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
- "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=",
- "dev": true
- },
- "lodash.isstring": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
- "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=",
- "dev": true
- },
- "lodash.istypedarray": {
- "version": "3.0.6",
- "resolved": "https://registry.npmjs.org/lodash.istypedarray/-/lodash.istypedarray-3.0.6.tgz",
- "integrity": "sha1-yaR3SYYHUB2OhJTSg7h8OSgc72I=",
- "dev": true
- },
- "lodash.keys": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
- "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=",
- "dev": true
- },
- "lodash.keysin": {
- "version": "3.0.8",
- "resolved": "https://registry.npmjs.org/lodash.keysin/-/lodash.keysin-3.0.8.tgz",
- "integrity": "sha1-IsRJPrvtsUJ5YqVLRFssinZ/tH8=",
- "dev": true
- },
- "lodash.mapvalues": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz",
- "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=",
- "dev": true
- },
- "lodash.merge": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-3.3.2.tgz",
- "integrity": "sha1-DZDZPtY3sYeEN7s+IWASYNev6ZQ=",
- "dev": true,
- "dependencies": {
- "lodash.isplainobject": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-3.2.0.tgz",
- "integrity": "sha1-moI4rhayAEMpYM1zRlEtASP79MU=",
- "dev": true
- }
- }
- },
- "lodash.omit": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-3.1.0.tgz",
- "integrity": "sha1-iX/jguZBPZrJfGH3jtHgV6AK+fM=",
- "dev": true
- },
- "lodash.restparam": {
- "version": "3.6.1",
- "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz",
- "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=",
- "dev": true
- },
- "lodash.template": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz",
- "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=",
- "dev": true
- },
- "lodash.templatesettings": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz",
- "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=",
- "dev": true
- },
- "lodash.toplainobject": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lodash.toplainobject/-/lodash.toplainobject-3.0.0.tgz",
- "integrity": "sha1-KHkK2ULSk9eKpmOgfs9/UsoEGY0=",
- "dev": true
- },
- "lodash.values": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-2.4.1.tgz",
- "integrity": "sha1-q/UUQ2s8twUAFieXjLzzCxKA7qQ=",
- "dev": true,
- "dependencies": {
- "lodash.keys": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz",
- "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=",
- "dev": true
- }
- }
- },
- "longest": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
- "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
- "dev": true
- },
- "loose-envify": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
- "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=",
- "dev": true
- },
- "loud-rejection": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
- "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
- "dev": true
- },
- "lru-cache": {
- "version": "2.7.3",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
- "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=",
- "dev": true
- },
- "map-cache": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
- "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
- "dev": true
- },
- "map-obj": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
- "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
- "dev": true
- },
- "map-stream": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",
- "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=",
- "dev": true
- },
- "marked": {
- "version": "0.3.6",
- "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz",
- "integrity": "sha1-ssbGGPzOzk74bE/Gy4p8v1rtqNc=",
- "dev": true
- },
- "meow": {
- "version": "3.7.0",
- "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
- "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
- "dev": true
- },
- "micromatch": {
- "version": "2.3.11",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
- "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=",
- "dev": true
- },
- "minimatch": {
- "version": "2.0.10",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
- "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=",
- "dev": true
- },
- "minimist": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
- "dev": true
- },
- "mkdirp": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
- "dev": true,
- "dependencies": {
- "minimist": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
- "dev": true
- }
- }
- },
- "mocha": {
- "version": "2.5.3",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.5.3.tgz",
- "integrity": "sha1-FhvlvetJZ3HrmzV0UFC2IrWu/Fg=",
- "dev": true,
- "dependencies": {
- "commander": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz",
- "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=",
- "dev": true
- },
- "debug": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
- "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=",
- "dev": true
- },
- "escape-string-regexp": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz",
- "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE=",
- "dev": true
- },
- "glob": {
- "version": "3.2.11",
- "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
- "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=",
- "dev": true
- },
- "minimatch": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
- "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=",
- "dev": true
- },
- "ms": {
- "version": "0.7.1",
- "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
- "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=",
- "dev": true
- },
- "supports-color": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.0.tgz",
- "integrity": "sha1-/x7R5hFp0Gs88tWI4YixjYhH4X4=",
- "dev": true
- }
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
- },
- "multimatch": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz",
- "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=",
- "dev": true,
- "dependencies": {
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "dev": true
- }
- }
- },
- "multipipe": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz",
- "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=",
- "dev": true
- },
- "mute-stream": {
- "version": "0.0.5",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz",
- "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=",
- "dev": true
- },
- "nan": {
- "version": "2.6.2",
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz",
- "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=",
- "dev": true,
- "optional": true
- },
- "natives": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz",
- "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=",
- "dev": true
- },
- "normalize-package-data": {
- "version": "2.3.8",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.8.tgz",
- "integrity": "sha1-2Bntoqne29H/pWPqQHHZNngilbs=",
- "dev": true
- },
- "normalize-path": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
- "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
- "dev": true
- },
- "number-is-nan": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
- "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
- "dev": true
- },
- "object-assign": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
- },
- "object-keys": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
- "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=",
- "dev": true
- },
- "object.defaults": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz",
- "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=",
- "dev": true,
- "dependencies": {
- "for-own": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
- "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
- "dev": true
- },
- "isobject": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.0.tgz",
- "integrity": "sha1-OVZSF/NmF4nooKDAgNX35rxG4aA=",
- "dev": true
- }
- }
- },
- "object.omit": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
- "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=",
- "dev": true
- },
- "object.pick": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.2.0.tgz",
- "integrity": "sha1-tTkr7peC2m2ft9avr1OXefEjTCs=",
- "dev": true
- },
- "once": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz",
- "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=",
- "dev": true
- },
- "onetime": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
- "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
- "dev": true
- },
- "optimist": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
- "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
- "dev": true,
- "dependencies": {
- "minimist": {
- "version": "0.0.10",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
- "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
- "dev": true
- }
- }
- },
- "optionator": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.6.0.tgz",
- "integrity": "sha1-tj7Lvw4xX61LyYJ7Rdx7pFKE/LY=",
- "dev": true
- },
- "orchestrator": {
- "version": "0.3.8",
- "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz",
- "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=",
- "dev": true
- },
- "ordered-read-streams": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz",
- "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=",
- "dev": true
- },
- "os-homedir": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
- "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
- "dev": true
- },
- "os-tmpdir": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
- "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
- "dev": true
- },
- "output-file-sync": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz",
- "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=",
- "dev": true,
- "dependencies": {
- "graceful-fs": {
- "version": "4.1.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
- "dev": true
- }
- }
- },
- "parse-filepath": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.1.tgz",
- "integrity": "sha1-FZ1hVdQ5BNFsEO9piRHaHpGWm3M=",
- "dev": true
- },
- "parse-glob": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
- "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=",
- "dev": true
- },
- "parse-json": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
- "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
- "dev": true
- },
- "parse-passwd": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
- "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
- "dev": true
- },
- "path-exists": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
- "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
- "dev": true
- },
- "path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
- "dev": true
- },
- "path-is-inside": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
- "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=",
- "dev": true
- },
- "path-parse": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
- "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
- "dev": true
- },
- "path-root": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
- "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=",
- "dev": true
- },
- "path-root-regex": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
- "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=",
- "dev": true
- },
- "path-type": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
- "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
- "dev": true,
- "dependencies": {
- "graceful-fs": {
- "version": "4.1.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
- "dev": true
- }
- }
- },
- "pify": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
- "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
- "dev": true
- },
- "pinkie": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
- "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
- "dev": true
- },
- "pinkie-promise": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
- "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
- "dev": true
- },
- "plugin-error": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz",
- "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=",
- "dev": true,
- "dependencies": {
- "arr-diff": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz",
- "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=",
- "dev": true
- },
- "array-slice": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz",
- "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=",
- "dev": true
- }
- }
- },
- "plugin-log": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/plugin-log/-/plugin-log-0.1.0.tgz",
- "integrity": "sha1-hgSc9qsQgzOYqTHzaJy67nteEzM=",
- "dev": true,
- "dependencies": {
- "dateformat": {
- "version": "1.0.12",
- "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz",
- "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=",
- "dev": true
- }
- }
- },
- "plur": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz",
- "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=",
- "dev": true
- },
- "prelude-ls": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
- "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
- "dev": true
- },
- "preserve": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
- "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=",
- "dev": true
- },
- "pretty-hrtime": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
- "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=",
- "dev": true
- },
- "private": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz",
- "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=",
- "dev": true
- },
- "process-nextick-args": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
- "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
- "dev": true
- },
- "randomatic": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz",
- "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==",
- "dev": true,
- "dependencies": {
- "is-number": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
- "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
- "dev": true,
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "dev": true
- }
- }
- },
- "kind-of": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
- "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
- "dev": true
- }
- }
- },
- "read-pkg": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
- "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
- "dev": true
- },
- "read-pkg-up": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
- "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
- "dev": true
- },
- "readable-stream": {
- "version": "1.1.14",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
- "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
- "dev": true
- },
- "readdirp": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz",
- "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=",
- "dev": true,
- "optional": true,
- "dependencies": {
- "graceful-fs": {
- "version": "4.1.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
- "dev": true,
- "optional": true
- },
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true,
- "optional": true
- },
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "dev": true,
- "optional": true
- },
- "readable-stream": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.0.tgz",
- "integrity": "sha512-c7KMXGd4b48nN3OJ1U9qOsn6pXNzf6kLd3kdZCkg2sxAcoiufInqF0XckwEnlrcwuaYwonlNK8GQUIOC/WC7sg==",
- "dev": true,
- "optional": true
- },
- "string_decoder": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz",
- "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=",
- "dev": true,
- "optional": true,
- "dependencies": {
- "safe-buffer": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
- "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=",
- "dev": true,
- "optional": true
- }
- }
- }
- }
- },
- "readline2": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz",
- "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=",
- "dev": true
- },
- "rechoir": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
- "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
- "dev": true
- },
- "redent": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
- "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=",
- "dev": true
- },
- "regenerate": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz",
- "integrity": "sha1-0ZQcZ7rUN+G+dkM63Vs4X5WxkmA=",
- "dev": true
- },
- "regenerator-runtime": {
- "version": "0.10.5",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
- "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=",
- "dev": true
- },
- "regenerator-transform": {
- "version": "0.9.11",
- "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.9.11.tgz",
- "integrity": "sha1-On0GdSDLe3F2dp61/4aGkb7+EoM=",
- "dev": true
- },
- "regex-cache": {
- "version": "0.4.3",
- "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz",
- "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=",
- "dev": true
- },
- "regexpu-core": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz",
- "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=",
- "dev": true
- },
- "regjsgen": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
- "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=",
- "dev": true
- },
- "regjsparser": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
- "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
- "dev": true
- },
- "remove-trailing-separator": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz",
- "integrity": "sha1-abBi2XhyetFNxrVrpKt3L9jXBRE=",
- "dev": true
- },
- "repeat-element": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",
- "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=",
- "dev": true
- },
- "repeat-string": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
- "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
- "dev": true
- },
- "repeating": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
- "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
- "dev": true
- },
- "replace-ext": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz",
- "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=",
- "dev": true
- },
- "require-dir": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/require-dir/-/require-dir-0.1.0.tgz",
- "integrity": "sha1-geAeKZ+vW3TDS2WU+OWt1Zhd3sU=",
- "dev": true
- },
- "requizzle": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.1.tgz",
- "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=",
- "dev": true,
- "dependencies": {
- "underscore": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
- "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=",
- "dev": true
- }
- }
- },
- "resolve": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz",
- "integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=",
- "dev": true
- },
- "resolve-dir": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz",
- "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=",
- "dev": true
- },
- "resolve-from": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz",
- "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=",
- "dev": true
- },
- "restore-cursor": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz",
- "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=",
- "dev": true
- },
- "right-align": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
- "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
- "dev": true,
- "optional": true
- },
- "rimraf": {
- "version": "2.6.1",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz",
- "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=",
- "dev": true,
- "dependencies": {
- "glob": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
- "dev": true
- },
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "dev": true
- }
- }
- },
- "run-async": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
- "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=",
- "dev": true
- },
- "rx-lite": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz",
- "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=",
- "dev": true
- },
- "safe-buffer": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz",
- "integrity": "sha512-aSLEDudu6OoRr/2rU609gRmnYboRLxgDG1z9o2Q0os7236FwvcqIOO8r8U5JUEwivZOhDaKlFO4SbPTJYyBEyQ==",
- "dev": true
- },
- "semver": {
- "version": "4.3.6",
- "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
- "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=",
- "dev": true
- },
- "sequencify": {
- "version": "0.0.7",
- "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz",
- "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=",
- "dev": true
- },
- "set-immediate-shim": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
- "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=",
- "dev": true,
- "optional": true
- },
- "shelljs": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz",
- "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=",
- "dev": true
- },
- "sigmund": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
- "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=",
- "dev": true
- },
- "signal-exit": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
- "dev": true
- },
- "slash": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
- "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
- "dev": true
- },
- "source-map": {
- "version": "0.4.4",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
- "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
- "dev": true
- },
- "source-map-support": {
- "version": "0.4.15",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz",
- "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=",
- "dev": true,
- "dependencies": {
- "source-map": {
- "version": "0.5.6",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
- "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=",
- "dev": true
- }
- }
- },
- "sparkles": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz",
- "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=",
- "dev": true
- },
- "spdx-correct": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz",
- "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=",
- "dev": true
- },
- "spdx-expression-parse": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz",
- "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=",
- "dev": true
- },
- "spdx-license-ids": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz",
- "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=",
- "dev": true
- },
- "sprintf-js": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
- "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
- "dev": true
- },
- "stream-consume": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz",
- "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=",
- "dev": true
- },
- "streamfilter": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-1.0.5.tgz",
- "integrity": "sha1-h1BxEb644phFFxe1Ec/tjwAqv1M=",
- "dev": true,
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
- },
- "readable-stream": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.0.tgz",
- "integrity": "sha512-c7KMXGd4b48nN3OJ1U9qOsn6pXNzf6kLd3kdZCkg2sxAcoiufInqF0XckwEnlrcwuaYwonlNK8GQUIOC/WC7sg==",
- "dev": true
- },
- "string_decoder": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz",
- "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=",
- "dev": true,
- "dependencies": {
- "safe-buffer": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
- "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=",
- "dev": true
- }
- }
- }
- }
- },
- "string_decoder": {
- "version": "0.10.31",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
- "dev": true
- },
- "string-width": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
- "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
- "dev": true
- },
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "dev": true
- },
- "strip-bom": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz",
- "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=",
- "dev": true
- },
- "strip-indent": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
- "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
- "dev": true
- },
- "strip-json-comments": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
- "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=",
- "dev": true
- },
- "supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
- "dev": true
- },
- "taffydb": {
- "version": "2.6.2",
- "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz",
- "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=",
- "dev": true
- },
- "temp": {
- "version": "0.8.3",
- "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz",
- "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=",
- "dev": true,
- "dependencies": {
- "rimraf": {
- "version": "2.2.8",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
- "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=",
- "dev": true
- }
- }
- },
- "text-table": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
- "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
- "dev": true
- },
- "through": {
- "version": "2.3.8",
- "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
- "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
- "dev": true
- },
- "through2": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
- "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
- "dev": true,
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
- },
- "readable-stream": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.0.tgz",
- "integrity": "sha512-c7KMXGd4b48nN3OJ1U9qOsn6pXNzf6kLd3kdZCkg2sxAcoiufInqF0XckwEnlrcwuaYwonlNK8GQUIOC/WC7sg==",
- "dev": true
- },
- "string_decoder": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz",
- "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=",
- "dev": true,
- "dependencies": {
- "safe-buffer": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
- "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=",
- "dev": true
- }
- }
- }
- }
- },
- "tildify": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz",
- "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=",
- "dev": true
- },
- "time-stamp": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz",
- "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=",
- "dev": true
- },
- "to-fast-properties": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
- "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
- "dev": true
- },
- "to-iso-string": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/to-iso-string/-/to-iso-string-0.0.2.tgz",
- "integrity": "sha1-TcGeZk38y+Jb2NtQiwDG2hWCVdE=",
- "dev": true
- },
- "trim-newlines": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
- "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
- "dev": true
- },
- "trim-right": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
- "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=",
- "dev": true
- },
- "tryit": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz",
- "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=",
- "dev": true
- },
- "type-check": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
- "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
- "dev": true
- },
- "type-detect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz",
- "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=",
- "dev": true
- },
- "typedarray": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
- "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
- "dev": true
- },
- "uglify-js": {
- "version": "2.8.29",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
- "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
- "dev": true,
- "optional": true,
- "dependencies": {
- "source-map": {
- "version": "0.5.6",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
- "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=",
- "dev": true,
- "optional": true
- }
- }
- },
- "uglify-to-browserify": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
- "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
- "dev": true,
- "optional": true
- },
- "unc-path-regex": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
- "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
- "dev": true
- },
- "underscore": {
- "version": "1.8.3",
- "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
- "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=",
- "dev": true
- },
- "underscore-contrib": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz",
- "integrity": "sha1-ZltmwkeD+PorGMn4y7Dix9SMJsc=",
- "dev": true,
- "dependencies": {
- "underscore": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
- "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=",
- "dev": true
- }
- }
- },
- "unique-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz",
- "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=",
- "dev": true
- },
- "user-home": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz",
- "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=",
- "dev": true
- },
- "util-deprecate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
- "dev": true
- },
- "v8flags": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz",
- "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=",
- "dev": true
- },
- "validate-npm-package-license": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz",
- "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=",
- "dev": true
- },
- "vinyl": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz",
- "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=",
- "dev": true
- },
- "vinyl-fs": {
- "version": "0.3.14",
- "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz",
- "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=",
- "dev": true,
- "dependencies": {
- "clone": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz",
- "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=",
- "dev": true
- },
- "readable-stream": {
- "version": "1.0.34",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
- "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
- "dev": true
- },
- "through2": {
- "version": "0.6.5",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
- "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
- "dev": true
- },
- "vinyl": {
- "version": "0.4.6",
- "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz",
- "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=",
- "dev": true
- }
- }
- },
- "which": {
- "version": "1.2.14",
- "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz",
- "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=",
- "dev": true
- },
- "window-size": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
- "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
- "dev": true,
- "optional": true
- },
- "wordwrap": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
- "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=",
- "dev": true
- },
- "wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
- "dev": true
- },
- "write": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz",
- "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=",
- "dev": true
- },
- "xml-escape": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.0.0.tgz",
- "integrity": "sha1-AJY9aXsq3wwYXE4E5zF0upsojrI=",
- "dev": true
- },
- "xtend": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
- "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
- "dev": true
- },
- "yargs": {
- "version": "3.10.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
- "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
- "dev": true,
- "optional": true,
- "dependencies": {
- "camelcase": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
- "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
- "dev": true,
- "optional": true
- }
- }
- }
- }
-}
diff --git a/tools/node_modules/babel-eslint/node_modules/esrecurse/package.json b/tools/node_modules/babel-eslint/node_modules/esrecurse/package.json
index 9a3c7c14b7..3b1e0519a7 100755
--- a/tools/node_modules/babel-eslint/node_modules/esrecurse/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/esrecurse/package.json
@@ -1,27 +1,4 @@
{
- "_from": "esrecurse@^4.1.0",
- "_id": "esrecurse@4.2.0",
- "_inBundle": false,
- "_integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=",
- "_location": "/babel-eslint/esrecurse",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "esrecurse@^4.1.0",
- "name": "esrecurse",
- "escapedName": "esrecurse",
- "rawSpec": "^4.1.0",
- "saveSpec": null,
- "fetchSpec": "^4.1.0"
- },
- "_requiredBy": [
- "/babel-eslint/eslint-scope"
- ],
- "_resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz",
- "_shasum": "fa9568d98d3823f9a41d91e902dcab9ea6e5b163",
- "_spec": "esrecurse@^4.1.0",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/eslint-scope",
"babel": {
"presets": [
"es2015"
@@ -32,8 +9,7 @@
},
"bundleDependencies": false,
"dependencies": {
- "estraverse": "^4.1.0",
- "object-assign": "^4.0.1"
+ "estraverse": "^4.1.0"
},
"deprecated": false,
"description": "ECMAScript AST recursive visitor",
@@ -55,7 +31,7 @@
"minimist": "^1.1.0"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=4.0"
},
"homepage": "https://github.com/estools/esrecurse",
"license": "BSD-2-Clause",
@@ -77,5 +53,5 @@
"test": "gulp travis",
"unit-test": "gulp test"
},
- "version": "4.2.0"
-}
+ "version": "4.2.1"
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/estraverse/package.json b/tools/node_modules/babel-eslint/node_modules/estraverse/package.json
index dfc516a934..18c8952639 100644
--- a/tools/node_modules/babel-eslint/node_modules/estraverse/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/estraverse/package.json
@@ -1,28 +1,4 @@
{
- "_from": "estraverse@^4.1.1",
- "_id": "estraverse@4.2.0",
- "_inBundle": false,
- "_integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
- "_location": "/babel-eslint/estraverse",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "estraverse@^4.1.1",
- "name": "estraverse",
- "escapedName": "estraverse",
- "rawSpec": "^4.1.1",
- "saveSpec": null,
- "fetchSpec": "^4.1.1"
- },
- "_requiredBy": [
- "/babel-eslint/eslint-scope",
- "/babel-eslint/esrecurse"
- ],
- "_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
- "_shasum": "0dee3fed31fcd469618ce7342099fc1afa0bdb13",
- "_spec": "estraverse@^4.1.1",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/eslint-scope",
"bugs": {
"url": "https://github.com/estools/estraverse/issues"
},
@@ -66,4 +42,4 @@
"unit-test": "mocha --compilers js:babel-register"
},
"version": "4.2.0"
-}
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/package.json b/tools/node_modules/babel-eslint/node_modules/esutils/package.json
index 865d3f6673..84df59656f 100644
--- a/tools/node_modules/babel-eslint/node_modules/esutils/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/esutils/package.json
@@ -1,28 +1,4 @@
{
- "_from": "esutils@^2.0.2",
- "_id": "esutils@2.0.2",
- "_inBundle": false,
- "_integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
- "_location": "/babel-eslint/esutils",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "esutils@^2.0.2",
- "name": "esutils",
- "escapedName": "esutils",
- "rawSpec": "^2.0.2",
- "saveSpec": null,
- "fetchSpec": "^2.0.2"
- },
- "_requiredBy": [
- "/babel-eslint/@babel/code-frame",
- "/babel-eslint/@babel/types"
- ],
- "_resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
- "_shasum": "0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b",
- "_spec": "esutils@^2.0.2",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/@babel/code-frame",
"bugs": {
"url": "https://github.com/estools/esutils/issues"
},
@@ -75,4 +51,4 @@
"unit-test": "mocha --compilers coffee:coffee-script -R spec"
},
"version": "2.0.2"
-}
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/globals/globals.json b/tools/node_modules/babel-eslint/node_modules/globals/globals.json
index e035233db3..65a4c7ec78 100644
--- a/tools/node_modules/babel-eslint/node_modules/globals/globals.json
+++ b/tools/node_modules/babel-eslint/node_modules/globals/globals.json
@@ -3,6 +3,9 @@
"Array": false,
"ArrayBuffer": false,
"Atomics": false,
+ "BigInt": false,
+ "BigInt64Array": false,
+ "BigUint64Array": false,
"Boolean": false,
"constructor": false,
"DataView": false,
@@ -221,6 +224,8 @@
"WeakSet": false
},
"browser": {
+ "AbortController": false,
+ "AbortSignal": false,
"addEventListener": false,
"alert": false,
"AnalyserNode": false,
@@ -246,6 +251,9 @@
"AudioParam": false,
"AudioProcessingEvent": false,
"AudioScheduledSourceNode": false,
+ "AudioWorkletGlobalScope ": false,
+ "AudioWorkletNode": false,
+ "AudioWorkletProcessor": false,
"BarProp": false,
"BaseAudioContext": false,
"BatteryManager": false,
@@ -477,7 +485,7 @@
"KeyframeEffectReadOnly": false,
"length": false,
"localStorage": false,
- "location": false,
+ "location": true,
"Location": false,
"locationbar": false,
"matchMedia": false,
@@ -690,9 +698,11 @@
"PushManager": false,
"PushSubscription": false,
"PushSubscriptionOptions": false,
+ "queueMicrotask": false,
"RadioNodeList": false,
"Range": false,
"ReadableStream": false,
+ "registerProcessor": false,
"RemotePlayback": false,
"removeEventListener": false,
"Request": false,
@@ -706,13 +716,19 @@
"RTCCertificate": false,
"RTCDataChannel": false,
"RTCDataChannelEvent": false,
+ "RTCDtlsTransport": false,
"RTCIceCandidate": false,
+ "RTCIceGatherer": false,
+ "RTCIceTransport": false,
"RTCPeerConnection": false,
"RTCPeerConnectionIceEvent": false,
"RTCRtpContributingSource": false,
"RTCRtpReceiver": false,
+ "RTCRtpSender": false,
+ "RTCSctpTransport": false,
"RTCSessionDescription": false,
"RTCStatsReport": false,
+ "RTCTrackEvent": false,
"screen": false,
"Screen": false,
"screenLeft": false,
@@ -915,6 +931,7 @@
"XSLTProcessor": false
},
"worker": {
+ "addEventListener": false,
"applicationCache": false,
"atob": false,
"Blob": false,
@@ -969,6 +986,8 @@
"PerformanceTiming": false,
"postMessage": true,
"Promise": false,
+ "queueMicrotask": false,
+ "removeEventListener": false,
"Request": false,
"Response": false,
"self": true,
@@ -981,6 +1000,7 @@
"URLSearchParams": false,
"WebSocket": false,
"Worker": false,
+ "WorkerGlobalScope": false,
"XMLHttpRequest": false
},
"node": {
@@ -996,10 +1016,15 @@
"Intl": false,
"module": false,
"process": false,
+ "queueMicrotask": false,
"require": false,
"setImmediate": false,
"setInterval": false,
- "setTimeout": false
+ "setTimeout": false,
+ "TextDecoder": false,
+ "TextEncoder": false,
+ "URL": false,
+ "URLSearchParams": false
},
"commonjs": {
"exports": true,
@@ -1174,7 +1199,8 @@
"jQuery": false
},
"yui": {
- "Y": false,
+ "YAHOO": false,
+ "YAHOO_config": false,
"YUI": false,
"YUI_config": false
},
@@ -1339,25 +1365,99 @@
"Ref": false
},
"serviceworker": {
+ "addEventListener": false,
+ "applicationCache": false,
+ "atob": false,
+ "Blob": false,
+ "BroadcastChannel": false,
+ "btoa": false,
"Cache": false,
"caches": false,
"CacheStorage": false,
+ "clearInterval": false,
+ "clearTimeout": false,
"Client": false,
"clients": false,
"Clients": false,
+ "close": true,
+ "console": false,
"ExtendableEvent": false,
"ExtendableMessageEvent": false,
+ "fetch": false,
"FetchEvent": false,
+ "FileReaderSync": false,
+ "FormData": false,
+ "Headers": false,
+ "IDBCursor": false,
+ "IDBCursorWithValue": false,
+ "IDBDatabase": false,
+ "IDBFactory": false,
+ "IDBIndex": false,
+ "IDBKeyRange": false,
+ "IDBObjectStore": false,
+ "IDBOpenDBRequest": false,
+ "IDBRequest": false,
+ "IDBTransaction": false,
+ "IDBVersionChangeEvent": false,
+ "ImageData": false,
"importScripts": false,
+ "indexedDB": false,
+ "location": false,
+ "MessageChannel": false,
+ "MessagePort": false,
+ "name": false,
+ "navigator": false,
+ "Notification": false,
+ "onclose": true,
+ "onconnect": true,
+ "onerror": true,
+ "onfetch": true,
+ "oninstall": true,
+ "onlanguagechange": true,
+ "onmessage": true,
+ "onmessageerror": true,
+ "onnotificationclick": true,
+ "onnotificationclose": true,
+ "onoffline": true,
+ "ononline": true,
+ "onpush": true,
+ "onpushsubscriptionchange": true,
+ "onrejectionhandled": true,
+ "onsync": true,
+ "onunhandledrejection": true,
+ "performance": false,
+ "Performance": false,
+ "PerformanceEntry": false,
+ "PerformanceMark": false,
+ "PerformanceMeasure": false,
+ "PerformanceNavigation": false,
+ "PerformanceResourceTiming": false,
+ "PerformanceTiming": false,
+ "postMessage": true,
+ "Promise": false,
+ "queueMicrotask": false,
"registration": false,
+ "removeEventListener": false,
+ "Request": false,
+ "Response": false,
"self": false,
"ServiceWorker": false,
"ServiceWorkerContainer": false,
"ServiceWorkerGlobalScope": false,
"ServiceWorkerMessageEvent": false,
"ServiceWorkerRegistration": false,
+ "setInterval": false,
+ "setTimeout": false,
"skipWaiting": false,
- "WindowClient": false
+ "TextDecoder": false,
+ "TextEncoder": false,
+ "URL": false,
+ "URLSearchParams": false,
+ "WebSocket": false,
+ "WindowClient": false,
+ "Worker": false,
+ "WorkerGlobalScope": false,
+ "XMLHttpRequest": false
},
"atomtest": {
"advanceClock": false,
@@ -1376,6 +1476,7 @@
"currentURL": false,
"fillIn": false,
"find": false,
+ "findAll": false,
"findWithAssert": false,
"keyEvent": false,
"pauseTest": false,
@@ -1399,7 +1500,9 @@
"clearTimeout": false,
"console": false,
"setInterval": false,
- "setTimeout": false
+ "setTimeout": false,
+ "URL": false,
+ "URLSearchParams": false
},
"webextensions": {
"browser": false,
@@ -1407,6 +1510,9 @@
"opr": false
},
"greasemonkey": {
+ "cloneInto": false,
+ "createObjectIn": false,
+ "exportFunction": false,
"GM": false,
"GM_addStyle": false,
"GM_deleteValue": false,
diff --git a/tools/node_modules/babel-eslint/node_modules/globals/package.json b/tools/node_modules/babel-eslint/node_modules/globals/package.json
index 169be257c2..aa91e2f18e 100644
--- a/tools/node_modules/babel-eslint/node_modules/globals/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/globals/package.json
@@ -1,27 +1,4 @@
{
- "_from": "globals@^11.1.0",
- "_id": "globals@11.1.0",
- "_inBundle": false,
- "_integrity": "sha512-uEuWt9mqTlPDwSqi+sHjD4nWU/1N+q0fiWI9T1mZpD2UENqX20CFD5T/ziLZvztPaBKl7ZylUi1q6Qfm7E2CiQ==",
- "_location": "/babel-eslint/globals",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "globals@^11.1.0",
- "name": "globals",
- "escapedName": "globals",
- "rawSpec": "^11.1.0",
- "saveSpec": null,
- "fetchSpec": "^11.1.0"
- },
- "_requiredBy": [
- "/babel-eslint/@babel/traverse"
- ],
- "_resolved": "https://registry.npmjs.org/globals/-/globals-11.1.0.tgz",
- "_shasum": "632644457f5f0e3ae711807183700ebf2e4633e4",
- "_spec": "globals@^11.1.0",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/@babel/traverse",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -34,8 +11,8 @@
"deprecated": false,
"description": "Global identifiers from different JavaScript environments",
"devDependencies": {
- "ava": "*",
- "xo": "*"
+ "ava": "0.21.0",
+ "xo": "0.18.0"
},
"engines": {
"node": ">=4"
@@ -64,10 +41,10 @@
"scripts": {
"test": "xo && ava"
},
- "version": "11.1.0",
+ "version": "11.11.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/index.js b/tools/node_modules/babel-eslint/node_modules/has-flag/index.js
index 68820307dc..5139728fba 100644
--- a/tools/node_modules/babel-eslint/node_modules/has-flag/index.js
+++ b/tools/node_modules/babel-eslint/node_modules/has-flag/index.js
@@ -1,10 +1,8 @@
'use strict';
-module.exports = function (flag, argv) {
+module.exports = (flag, argv) => {
argv = argv || process.argv;
-
- var terminatorPos = argv.indexOf('--');
- var prefix = /^-{1,2}/.test(flag) ? '' : '--';
- var pos = argv.indexOf(prefix + flag);
-
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
+ const pos = argv.indexOf(prefix + flag);
+ const terminatorPos = argv.indexOf('--');
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
};
diff --git a/tools/node_modules/babel-eslint/node_modules/has-flag/license b/tools/node_modules/babel-eslint/node_modules/has-flag/license
index 654d0bfe94..e7af2f7710 100644
--- a/tools/node_modules/babel-eslint/node_modules/has-flag/license
+++ b/tools/node_modules/babel-eslint/node_modules/has-flag/license
@@ -1,21 +1,9 @@
-The MIT License (MIT)
+MIT License
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:
+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 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.
+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/has-flag/package.json b/tools/node_modules/babel-eslint/node_modules/has-flag/package.json
index dfba3e81ab..1903ff01cf 100644
--- a/tools/node_modules/babel-eslint/node_modules/has-flag/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/has-flag/package.json
@@ -1,27 +1,4 @@
{
- "_from": "has-flag@^2.0.0",
- "_id": "has-flag@2.0.0",
- "_inBundle": false,
- "_integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
- "_location": "/babel-eslint/has-flag",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "has-flag@^2.0.0",
- "name": "has-flag",
- "escapedName": "has-flag",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/babel-eslint/supports-color"
- ],
- "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
- "_shasum": "e8207af1cc7b30d446cc70b734b5e8be18f88d51",
- "_spec": "has-flag@^2.0.0",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/supports-color",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -38,7 +15,7 @@
"xo": "*"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=4"
},
"files": [
"index.js"
@@ -64,23 +41,6 @@
"optimist"
],
"license": "MIT",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Joshua Appelman",
- "email": "jappelman@xebia.com",
- "url": "jbnicolai.com"
- },
- {
- "name": "JD Ballard",
- "email": "i.am.qix@gmail.com",
- "url": "github.com/qix-"
- }
- ],
"name": "has-flag",
"repository": {
"type": "git",
@@ -89,5 +49,5 @@
"scripts": {
"test": "xo && ava"
},
- "version": "2.0.0"
-}
+ "version": "3.0.0"
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/has-flag/readme.md b/tools/node_modules/babel-eslint/node_modules/has-flag/readme.md
index 0caca6cba1..677893c278 100644
--- a/tools/node_modules/babel-eslint/node_modules/has-flag/readme.md
+++ b/tools/node_modules/babel-eslint/node_modules/has-flag/readme.md
@@ -8,7 +8,7 @@ Correctly stops looking after an `--` argument terminator.
## Install
```
-$ npm install --save has-flag
+$ npm install has-flag
```
@@ -24,6 +24,9 @@ hasFlag('unicorn');
hasFlag('--unicorn');
//=> true
+hasFlag('f');
+//=> true
+
hasFlag('-f');
//=> true
@@ -46,7 +49,7 @@ $ node foo.js -f --unicorn --foo=bar -- --rainbow
### hasFlag(flag, [argv])
-Returns a boolean whether the flag exists.
+Returns a boolean for whether the flag exists.
#### flag
@@ -56,7 +59,7 @@ CLI flag to look for. The `--` prefix is optional.
#### argv
-Type: `array`<br>
+Type: `string[]`<br>
Default: `process.argv`
CLI arguments.
diff --git a/tools/node_modules/babel-eslint/node_modules/invariant/README.md b/tools/node_modules/babel-eslint/node_modules/invariant/README.md
deleted file mode 100644
index 96aac6d36c..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/invariant/README.md
+++ /dev/null
@@ -1,37 +0,0 @@
-# invariant
-
-[![Build Status](https://travis-ci.org/zertosh/invariant.svg?branch=master)](https://travis-ci.org/zertosh/invariant)
-
-A mirror of Facebook's `invariant` (e.g. [React](https://github.com/facebook/react/blob/v0.13.3/src/vendor/core/invariant.js), [flux](https://github.com/facebook/flux/blob/2.0.2/src/invariant.js)).
-
-A way to provide descriptive errors in development but generic errors in production.
-
-## Install
-
-With [npm](http://npmjs.org) do:
-
-```sh
-npm install invariant
-```
-
-## `invariant(condition, message)`
-
-```js
-var invariant = require('invariant');
-
-invariant(someTruthyVal, 'This will not throw');
-// No errors
-
-invariant(someFalseyVal, 'This will throw an error with this message');
-// Error: Invariant Violation: This will throw an error with this message
-```
-
-**Note:** When `process.env.NODE_ENV` is not `production`, the message is required. If omitted, `invariant` will throw regardless of the truthiness of the condition. When `process.env.NODE_ENV` is `production`, the message is optional – so they can be minified away.
-
-### Browser
-
-When used with [browserify](https://github.com/substack/node-browserify), it'll use `browser.js` (instead of `invariant.js`) and the [envify](https://github.com/hughsk/envify) transform will inline the value of `process.env.NODE_ENV`.
-
-### Node
-
-The node version is optimized around the performance implications of accessing `process.env`. The value of `process.env.NODE_ENV` is cached, and repeatedly used instead of reading `proces.env`. See [Server rendering is slower with npm react #812](https://github.com/facebook/react/issues/812)
diff --git a/tools/node_modules/babel-eslint/node_modules/invariant/browser.js b/tools/node_modules/babel-eslint/node_modules/invariant/browser.js
deleted file mode 100644
index 29ead50433..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/invariant/browser.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Copyright 2013-2015, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- */
-
-'use strict';
-
-/**
- * Use invariant() to assert state which your program assumes to be true.
- *
- * Provide sprintf-style format (only %s is supported) and arguments
- * to provide information about what broke and what you were
- * expecting.
- *
- * The invariant message will be stripped in production, but the invariant
- * will remain to ensure logic does not differ in production.
- */
-
-var invariant = function(condition, format, a, b, c, d, e, f) {
- if (process.env.NODE_ENV !== 'production') {
- if (format === undefined) {
- throw new Error('invariant requires an error message argument');
- }
- }
-
- if (!condition) {
- var error;
- if (format === undefined) {
- error = new Error(
- 'Minified exception occurred; use the non-minified dev environment ' +
- 'for the full error message and additional helpful warnings.'
- );
- } else {
- var args = [a, b, c, d, e, f];
- var argIndex = 0;
- error = new Error(
- format.replace(/%s/g, function() { return args[argIndex++]; })
- );
- error.name = 'Invariant Violation';
- }
-
- error.framesToPop = 1; // we don't care about invariant's own frame
- throw error;
- }
-};
-
-module.exports = invariant;
diff --git a/tools/node_modules/babel-eslint/node_modules/invariant/invariant.js b/tools/node_modules/babel-eslint/node_modules/invariant/invariant.js
deleted file mode 100644
index 1859a2a52c..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/invariant/invariant.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Copyright 2013-2015, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- */
-
-'use strict';
-
-/**
- * Use invariant() to assert state which your program assumes to be true.
- *
- * Provide sprintf-style format (only %s is supported) and arguments
- * to provide information about what broke and what you were
- * expecting.
- *
- * The invariant message will be stripped in production, but the invariant
- * will remain to ensure logic does not differ in production.
- */
-
-var NODE_ENV = process.env.NODE_ENV;
-
-var invariant = function(condition, format, a, b, c, d, e, f) {
- if (NODE_ENV !== 'production') {
- if (format === undefined) {
- throw new Error('invariant requires an error message argument');
- }
- }
-
- if (!condition) {
- var error;
- if (format === undefined) {
- error = new Error(
- 'Minified exception occurred; use the non-minified dev environment ' +
- 'for the full error message and additional helpful warnings.'
- );
- } else {
- var args = [a, b, c, d, e, f];
- var argIndex = 0;
- error = new Error(
- format.replace(/%s/g, function() { return args[argIndex++]; })
- );
- error.name = 'Invariant Violation';
- }
-
- error.framesToPop = 1; // we don't care about invariant's own frame
- throw error;
- }
-};
-
-module.exports = invariant;
diff --git a/tools/node_modules/babel-eslint/node_modules/invariant/invariant.js.flow b/tools/node_modules/babel-eslint/node_modules/invariant/invariant.js.flow
deleted file mode 100644
index 361c5192c2..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/invariant/invariant.js.flow
+++ /dev/null
@@ -1,7 +0,0 @@
-/* @flow */
-
-declare module.exports: (
- condition: any,
- format?: string,
- ...args: Array<any>
-) => void;
diff --git a/tools/node_modules/babel-eslint/node_modules/invariant/package.json b/tools/node_modules/babel-eslint/node_modules/invariant/package.json
deleted file mode 100644
index 9b6aac402c..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/invariant/package.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "_from": "invariant@^2.2.0",
- "_id": "invariant@2.2.2",
- "_inBundle": false,
- "_integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=",
- "_location": "/babel-eslint/invariant",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "invariant@^2.2.0",
- "name": "invariant",
- "escapedName": "invariant",
- "rawSpec": "^2.2.0",
- "saveSpec": null,
- "fetchSpec": "^2.2.0"
- },
- "_requiredBy": [
- "/babel-eslint/@babel/traverse"
- ],
- "_resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz",
- "_shasum": "9e1f56ac0acdb6bf303306f338be3b204ae60360",
- "_spec": "invariant@^2.2.0",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/@babel/traverse",
- "author": {
- "name": "Andres Suarez",
- "email": "zertosh@gmail.com"
- },
- "browser": "browser.js",
- "browserify": {
- "transform": [
- "loose-envify"
- ]
- },
- "bugs": {
- "url": "https://github.com/zertosh/invariant/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "loose-envify": "^1.0.0"
- },
- "deprecated": false,
- "description": "invariant",
- "devDependencies": {
- "browserify": "^11.0.1",
- "flow-bin": "^0.35.0",
- "tap": "^1.4.0"
- },
- "files": [
- "browser.js",
- "invariant.js",
- "invariant.js.flow"
- ],
- "homepage": "https://github.com/zertosh/invariant#readme",
- "keywords": [
- "test",
- "invariant"
- ],
- "license": "BSD-3-Clause",
- "main": "invariant.js",
- "name": "invariant",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zertosh/invariant.git"
- },
- "scripts": {
- "test": "NODE_ENV=production tap test/*.js && NODE_ENV=development tap test/*.js"
- },
- "version": "2.2.2"
-}
diff --git a/tools/node_modules/babel-eslint/node_modules/js-tokens/LICENSE b/tools/node_modules/babel-eslint/node_modules/js-tokens/LICENSE
index 748f42e87d..54aef52f3a 100644
--- a/tools/node_modules/babel-eslint/node_modules/js-tokens/LICENSE
+++ b/tools/node_modules/babel-eslint/node_modules/js-tokens/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2014, 2015, 2016, 2017 Simon Lydell
+Copyright (c) 2014, 2015, 2016, 2017, 2018 Simon Lydell
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/tools/node_modules/babel-eslint/node_modules/js-tokens/README.md b/tools/node_modules/babel-eslint/node_modules/js-tokens/README.md
index 5c93a88852..00cdf1634d 100644
--- a/tools/node_modules/babel-eslint/node_modules/js-tokens/README.md
+++ b/tools/node_modules/babel-eslint/node_modules/js-tokens/README.md
@@ -73,14 +73,13 @@ Whitespace includes both line terminators and other whitespace.
ECMAScript support
==================
-The intention is to always support the latest stable ECMAScript version.
+The intention is to always support the latest ECMAScript version whose feature
+set has been finalized.
If adding support for a newer version requires changes, a new version with a
major verion bump will be released.
-Currently, [ECMAScript 2017] is supported.
-
-[ECMAScript 2017]: https://www.ecma-international.org/ecma-262/8.0/index.html
+Currently, ECMAScript 2018 is supported.
Invalid code handling
@@ -100,7 +99,8 @@ inside the regex.
Invalid ASCII characters have their own capturing group.
Invalid non-ASCII characters are treated as names, to simplify the matching of
-names (except unicode spaces which are treated as whitespace).
+names (except unicode spaces which are treated as whitespace). Note: See also
+the [ES2018](#es2018) section.
Regex literals may contain invalid regex syntax. They are still matched as
regex literals. They may also contain repeated regex flags, to keep the regex
@@ -144,7 +144,8 @@ var regex = / 2/g
A human can easily understand that in the `number` line we’re dealing with
division, and in the `regex` line we’re dealing with a regex literal. How come?
Because humans can look at the whole code to put the `/` characters in context.
-A JavaScript regex cannot. It only sees forwards.
+A JavaScript regex cannot. It only sees forwards. (Well, ES2018 regexes can also
+look backwards. See the [ES2018](#es2018) section).
When the `jsTokens` regex scans throught the above, it will see the following
at the end of both the `number` and `regex` rows:
@@ -192,7 +193,7 @@ valid regex flag. I initially wanted to future-proof by allowing `[a-zA-Z]*`
(any letter) as flags, but it is not worth it since it increases the amount of
ambigous cases. So only the standard `g`, `m`, `i`, `y` and `u` flags are
allowed. This means that the above example will be identified as division as
-long as you don’t rename the `e` variable to some permutation of `gmiyu` 1 to 5
+long as you don’t rename the `e` variable to some permutation of `gmiyus` 1 to 6
characters long.
Lastly, we can look _forward_ for information.
@@ -215,6 +216,23 @@ If the end of a statement looks like a regex literal (even if it isn’t), it
will be treated as one. Otherwise it should work as expected (if you write sane
code).
+### ES2018 ###
+
+ES2018 added some nice regex improvements to the language.
+
+- [Unicode property escapes] should allow telling names and invalid non-ASCII
+ characters apart without blowing up the regex size.
+- [Lookbehind assertions] should allow matching telling division and regex
+ literals apart in more cases.
+- [Named capture groups] might simplify some things.
+
+These things would be nice to do, but are not critical. They probably have to
+wait until the oldest maintained Node.js LTS release supports those features.
+
+[Unicode property escapes]: http://2ality.com/2017/07/regexp-unicode-property-escapes.html
+[Lookbehind assertions]: http://2ality.com/2017/05/regexp-lookbehind-assertions.html
+[Named capture groups]: http://2ality.com/2017/05/regexp-named-capture-groups.html
+
License
=======
diff --git a/tools/node_modules/babel-eslint/node_modules/js-tokens/index.js b/tools/node_modules/babel-eslint/node_modules/js-tokens/index.js
index a3c8a0d7bd..b23a4a0e7f 100644
--- a/tools/node_modules/babel-eslint/node_modules/js-tokens/index.js
+++ b/tools/node_modules/babel-eslint/node_modules/js-tokens/index.js
@@ -1,4 +1,4 @@
-// Copyright 2014, 2015, 2016, 2017 Simon Lydell
+// Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell
// License: MIT. (See LICENSE.)
Object.defineProperty(exports, "__esModule", {
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
// This regex comes from regex.coffee, and is inserted here by generate-index.js
// (run `npm run build`).
-exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g
+exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g
exports.matchToToken = function(match) {
- var token = {type: "invalid", value: match[0]}
+ var token = {type: "invalid", value: match[0], closed: undefined}
if (match[ 1]) token.type = "string" , token.closed = !!(match[3] || match[4])
else if (match[ 5]) token.type = "comment"
else if (match[ 6]) token.type = "comment", token.closed = !!match[7]
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
index f20a2c5aa3..ccfb4ef3dc 100644
--- a/tools/node_modules/babel-eslint/node_modules/js-tokens/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/js-tokens/package.json
@@ -1,28 +1,4 @@
{
- "_from": "js-tokens@^3.0.0",
- "_id": "js-tokens@3.0.2",
- "_inBundle": false,
- "_integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
- "_location": "/babel-eslint/js-tokens",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "js-tokens@^3.0.0",
- "name": "js-tokens",
- "escapedName": "js-tokens",
- "rawSpec": "^3.0.0",
- "saveSpec": null,
- "fetchSpec": "^3.0.0"
- },
- "_requiredBy": [
- "/babel-eslint/@babel/code-frame",
- "/babel-eslint/loose-envify"
- ],
- "_resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
- "_shasum": "9866df395102130e38f7f996bceb65443209c25b",
- "_spec": "js-tokens@^3.0.0",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/@babel/code-frame",
"author": {
"name": "Simon Lydell"
},
@@ -33,10 +9,10 @@
"deprecated": false,
"description": "A regex that tokenizes JavaScript.",
"devDependencies": {
- "coffee-script": "~1.12.6",
- "esprima": "^4.0.0",
- "everything.js": "^1.0.3",
- "mocha": "^3.4.2"
+ "coffeescript": "2.1.1",
+ "esprima": "4.0.0",
+ "everything.js": "1.0.3",
+ "mocha": "5.0.0"
},
"files": [
"index.js"
@@ -61,5 +37,5 @@
"esprima-compare": "node esprima-compare ./index.js everything.js/es5.js",
"test": "mocha --ui tdd"
},
- "version": "3.0.2"
-}
+ "version": "4.0.0"
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/LICENSE-MIT.txt b/tools/node_modules/babel-eslint/node_modules/jsesc/LICENSE-MIT.txt
new file mode 100644
index 0000000000..a41e0a7ef9
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/jsesc/LICENSE-MIT.txt
@@ -0,0 +1,20 @@
+Copyright Mathias Bynens <https://mathiasbynens.be/>
+
+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/jsesc/README.md b/tools/node_modules/babel-eslint/node_modules/jsesc/README.md
new file mode 100644
index 0000000000..aae2b13a19
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/jsesc/README.md
@@ -0,0 +1,421 @@
+# jsesc [![Build status](https://travis-ci.org/mathiasbynens/jsesc.svg?branch=master)](https://travis-ci.org/mathiasbynens/jsesc) [![Code coverage status](https://coveralls.io/repos/mathiasbynens/jsesc/badge.svg)](https://coveralls.io/r/mathiasbynens/jsesc) [![Dependency status](https://gemnasium.com/mathiasbynens/jsesc.svg)](https://gemnasium.com/mathiasbynens/jsesc)
+
+Given some data, _jsesc_ returns a stringified representation of that data. jsesc is similar to `JSON.stringify()` except:
+
+1. it outputs JavaScript instead of JSON [by default](#json), enabling support for data structures like ES6 maps and sets;
+2. it offers [many options](#api) to customize the output;
+3. its output is ASCII-safe [by default](#minimal), thanks to its use of [escape sequences](https://mathiasbynens.be/notes/javascript-escapes) where needed.
+
+For any input, jsesc generates the shortest possible valid printable-ASCII-only output. [Here’s an online demo.](https://mothereff.in/js-escapes)
+
+jsesc’s output can be used instead of `JSON.stringify`’s to avoid [mojibake](https://en.wikipedia.org/wiki/Mojibake) and other encoding issues, or even to [avoid errors](https://twitter.com/annevk/status/380000829643571200) when passing JSON-formatted data (which may contain U+2028 LINE SEPARATOR, U+2029 PARAGRAPH SEPARATOR, or [lone surrogates](https://esdiscuss.org/topic/code-points-vs-unicode-scalar-values#content-14)) to a JavaScript parser or an UTF-8 encoder.
+
+## Installation
+
+Via [npm](https://www.npmjs.com/):
+
+```bash
+npm install jsesc
+```
+
+In [Node.js](https://nodejs.org/):
+
+```js
+const jsesc = require('jsesc');
+```
+
+## API
+
+### `jsesc(value, options)`
+
+This function takes a value and returns an escaped version of the value where any characters that are not printable ASCII symbols are escaped using the shortest possible (but valid) [escape sequences for use in JavaScript strings](https://mathiasbynens.be/notes/javascript-escapes). The first supported value type is strings:
+
+```js
+jsesc('Ich ♥ Bücher');
+// → 'Ich \\u2665 B\\xFCcher'
+
+jsesc('foo 𝌆 bar');
+// → 'foo \\uD834\\uDF06 bar'
+```
+
+Instead of a string, the `value` can also be an array, an object, a map, a set, or a buffer. In such cases, `jsesc` returns a stringified version of the value where any characters that are not printable ASCII symbols are escaped in the same way.
+
+```js
+// Escaping an array
+jsesc([
+ 'Ich ♥ Bücher', 'foo 𝌆 bar'
+]);
+// → '[\'Ich \\u2665 B\\xFCcher\',\'foo \\uD834\\uDF06 bar\']'
+
+// Escaping an object
+jsesc({
+ 'Ich ♥ Bücher': 'foo 𝌆 bar'
+});
+// → '{\'Ich \\u2665 B\\xFCcher\':\'foo \\uD834\\uDF06 bar\'}'
+```
+
+The optional `options` argument accepts an object with the following options:
+
+#### `quotes`
+
+The default value for the `quotes` option is `'single'`. This means that any occurrences of `'` in the input string are escaped as `\'`, so that the output can be used in a string literal wrapped in single quotes.
+
+```js
+jsesc('`Lorem` ipsum "dolor" sit \'amet\' etc.');
+// → 'Lorem ipsum "dolor" sit \\\'amet\\\' etc.'
+
+jsesc('`Lorem` ipsum "dolor" sit \'amet\' etc.', {
+ 'quotes': 'single'
+});
+// → '`Lorem` ipsum "dolor" sit \\\'amet\\\' etc.'
+// → "`Lorem` ipsum \"dolor\" sit \\'amet\\' etc."
+```
+
+If you want to use the output as part of a string literal wrapped in double quotes, set the `quotes` option to `'double'`.
+
+```js
+jsesc('`Lorem` ipsum "dolor" sit \'amet\' etc.', {
+ 'quotes': 'double'
+});
+// → '`Lorem` ipsum \\"dolor\\" sit \'amet\' etc.'
+// → "`Lorem` ipsum \\\"dolor\\\" sit 'amet' etc."
+```
+
+If you want to use the output as part of a template literal (i.e. wrapped in backticks), set the `quotes` option to `'backtick'`.
+
+```js
+jsesc('`Lorem` ipsum "dolor" sit \'amet\' etc.', {
+ 'quotes': 'backtick'
+});
+// → '\\`Lorem\\` ipsum "dolor" sit \'amet\' etc.'
+// → "\\`Lorem\\` ipsum \"dolor\" sit 'amet' etc."
+// → `\\\`Lorem\\\` ipsum "dolor" sit 'amet' etc.`
+```
+
+This setting also affects the output for arrays and objects:
+
+```js
+jsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, {
+ 'quotes': 'double'
+});
+// → '{"Ich \\u2665 B\\xFCcher":"foo \\uD834\\uDF06 bar"}'
+
+jsesc([ 'Ich ♥ Bücher', 'foo 𝌆 bar' ], {
+ 'quotes': 'double'
+});
+// → '["Ich \\u2665 B\\xFCcher","foo \\uD834\\uDF06 bar"]'
+```
+
+#### `numbers`
+
+The default value for the `numbers` option is `'decimal'`. This means that any numeric values are represented using decimal integer literals. Other valid options are `binary`, `octal`, and `hexadecimal`, which result in binary integer literals, octal integer literals, and hexadecimal integer literals, respectively.
+
+```js
+jsesc(42, {
+ 'numbers': 'binary'
+});
+// → '0b101010'
+
+jsesc(42, {
+ 'numbers': 'octal'
+});
+// → '0o52'
+
+jsesc(42, {
+ 'numbers': 'decimal'
+});
+// → '42'
+
+jsesc(42, {
+ 'numbers': 'hexadecimal'
+});
+// → '0x2A'
+```
+
+#### `wrap`
+
+The `wrap` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, the output is a valid JavaScript string literal wrapped in quotes. The type of quotes can be specified through the `quotes` setting.
+
+```js
+jsesc('Lorem ipsum "dolor" sit \'amet\' etc.', {
+ 'quotes': 'single',
+ 'wrap': true
+});
+// → '\'Lorem ipsum "dolor" sit \\\'amet\\\' etc.\''
+// → "\'Lorem ipsum \"dolor\" sit \\\'amet\\\' etc.\'"
+
+jsesc('Lorem ipsum "dolor" sit \'amet\' etc.', {
+ 'quotes': 'double',
+ 'wrap': true
+});
+// → '"Lorem ipsum \\"dolor\\" sit \'amet\' etc."'
+// → "\"Lorem ipsum \\\"dolor\\\" sit \'amet\' etc.\""
+```
+
+#### `es6`
+
+The `es6` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, any astral Unicode symbols in the input are escaped using [ECMAScript 6 Unicode code point escape sequences](https://mathiasbynens.be/notes/javascript-escapes#unicode-code-point) instead of using separate escape sequences for each surrogate half. If backwards compatibility with ES5 environments is a concern, don’t enable this setting. If the `json` setting is enabled, the value for the `es6` setting is ignored (as if it was `false`).
+
+```js
+// By default, the `es6` option is disabled:
+jsesc('foo 𝌆 bar 💩 baz');
+// → 'foo \\uD834\\uDF06 bar \\uD83D\\uDCA9 baz'
+
+// To explicitly disable it:
+jsesc('foo 𝌆 bar 💩 baz', {
+ 'es6': false
+});
+// → 'foo \\uD834\\uDF06 bar \\uD83D\\uDCA9 baz'
+
+// To enable it:
+jsesc('foo 𝌆 bar 💩 baz', {
+ 'es6': true
+});
+// → 'foo \\u{1D306} bar \\u{1F4A9} baz'
+```
+
+#### `escapeEverything`
+
+The `escapeEverything` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, all the symbols in the output are escaped — even printable ASCII symbols.
+
+```js
+jsesc('lolwat"foo\'bar', {
+ 'escapeEverything': true
+});
+// → '\\x6C\\x6F\\x6C\\x77\\x61\\x74\\"\\x66\\x6F\\x6F\\\'\\x62\\x61\\x72'
+// → "\\x6C\\x6F\\x6C\\x77\\x61\\x74\\\"\\x66\\x6F\\x6F\\'\\x62\\x61\\x72"
+```
+
+This setting also affects the output for string literals within arrays and objects.
+
+#### `minimal`
+
+The `minimal` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, only a limited set of symbols in the output are escaped:
+
+* U+0000 `\0`
+* U+0008 `\b`
+* U+0009 `\t`
+* U+000A `\n`
+* U+000C `\f`
+* U+000D `\r`
+* U+005C `\\`
+* U+2028 `\u2028`
+* U+2029 `\u2029`
+* whatever symbol is being used for wrapping string literals (based on [the `quotes` option](#quotes))
+
+Note: with this option enabled, jsesc output is no longer guaranteed to be ASCII-safe.
+
+```js
+jsesc('foo\u2029bar\nbaz©qux𝌆flops', {
+ 'minimal': false
+});
+// → 'foo\\u2029bar\\nbaz©qux𝌆flops'
+```
+
+#### `isScriptContext`
+
+The `isScriptContext` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, occurrences of [`</script` and `</style`](https://mathiasbynens.be/notes/etago) in the output are escaped as `<\/script` and `<\/style`, and [`<!--`](https://mathiasbynens.be/notes/etago#comment-8) is escaped as `\x3C!--` (or `\u003C!--` when the `json` option is enabled). This setting is useful when jsesc’s output ends up as part of a `<script>` or `<style>` element in an HTML document.
+
+```js
+jsesc('foo</script>bar', {
+ 'isScriptContext': true
+});
+// → 'foo<\\/script>bar'
+```
+
+#### `compact`
+
+The `compact` option takes a boolean value (`true` or `false`), and defaults to `true` (enabled). When enabled, the output for arrays and objects is as compact as possible; it’s not formatted nicely.
+
+```js
+jsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, {
+ 'compact': true // this is the default
+});
+// → '{\'Ich \u2665 B\xFCcher\':\'foo \uD834\uDF06 bar\'}'
+
+jsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, {
+ 'compact': false
+});
+// → '{\n\t\'Ich \u2665 B\xFCcher\': \'foo \uD834\uDF06 bar\'\n}'
+
+jsesc([ 'Ich ♥ Bücher', 'foo 𝌆 bar' ], {
+ 'compact': false
+});
+// → '[\n\t\'Ich \u2665 B\xFCcher\',\n\t\'foo \uD834\uDF06 bar\'\n]'
+```
+
+This setting has no effect on the output for strings.
+
+#### `indent`
+
+The `indent` option takes a string value, and defaults to `'\t'`. When the `compact` setting is enabled (`true`), the value of the `indent` option is used to format the output for arrays and objects.
+
+```js
+jsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, {
+ 'compact': false,
+ 'indent': '\t' // this is the default
+});
+// → '{\n\t\'Ich \u2665 B\xFCcher\': \'foo \uD834\uDF06 bar\'\n}'
+
+jsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, {
+ 'compact': false,
+ 'indent': ' '
+});
+// → '{\n \'Ich \u2665 B\xFCcher\': \'foo \uD834\uDF06 bar\'\n}'
+
+jsesc([ 'Ich ♥ Bücher', 'foo 𝌆 bar' ], {
+ 'compact': false,
+ 'indent': ' '
+});
+// → '[\n \'Ich \u2665 B\xFCcher\',\n\ t\'foo \uD834\uDF06 bar\'\n]'
+```
+
+This setting has no effect on the output for strings.
+
+#### `indentLevel`
+
+The `indentLevel` option takes a numeric value, and defaults to `0`. It represents the current indentation level, i.e. the number of times the value of [the `indent` option](#indent) is repeated.
+
+```js
+jsesc(['a', 'b', 'c'], {
+ 'compact': false,
+ 'indentLevel': 1
+});
+// → '[\n\t\t\'a\',\n\t\t\'b\',\n\t\t\'c\'\n\t]'
+
+jsesc(['a', 'b', 'c'], {
+ 'compact': false,
+ 'indentLevel': 2
+});
+// → '[\n\t\t\t\'a\',\n\t\t\t\'b\',\n\t\t\t\'c\'\n\t\t]'
+```
+
+#### `json`
+
+The `json` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, the output is valid JSON. [Hexadecimal character escape sequences](https://mathiasbynens.be/notes/javascript-escapes#hexadecimal) and [the `\v` or `\0` escape sequences](https://mathiasbynens.be/notes/javascript-escapes#single) are not used. Setting `json: true` implies `quotes: 'double', wrap: true, es6: false`, although these values can still be overridden if needed — but in such cases, the output won’t be valid JSON anymore.
+
+```js
+jsesc('foo\x00bar\xFF\uFFFDbaz', {
+ 'json': true
+});
+// → '"foo\\u0000bar\\u00FF\\uFFFDbaz"'
+
+jsesc({ 'foo\x00bar\xFF\uFFFDbaz': 'foo\x00bar\xFF\uFFFDbaz' }, {
+ 'json': true
+});
+// → '{"foo\\u0000bar\\u00FF\\uFFFDbaz":"foo\\u0000bar\\u00FF\\uFFFDbaz"}'
+
+jsesc([ 'foo\x00bar\xFF\uFFFDbaz', 'foo\x00bar\xFF\uFFFDbaz' ], {
+ 'json': true
+});
+// → '["foo\\u0000bar\\u00FF\\uFFFDbaz","foo\\u0000bar\\u00FF\\uFFFDbaz"]'
+
+// Values that are acceptable in JSON but aren’t strings, arrays, or object
+// literals can’t be escaped, so they’ll just be preserved:
+jsesc([ 'foo\x00bar', [1, '©', { 'foo': true, 'qux': null }], 42 ], {
+ 'json': true
+});
+// → '["foo\\u0000bar",[1,"\\u00A9",{"foo":true,"qux":null}],42]'
+// Values that aren’t allowed in JSON are run through `JSON.stringify()`:
+jsesc([ undefined, -Infinity ], {
+ 'json': true
+});
+// → '[null,null]'
+```
+
+**Note:** Using this option on objects or arrays that contain non-string values relies on `JSON.stringify()`. For legacy environments like IE ≤ 7, use [a `JSON` polyfill](http://bestiejs.github.io/json3/).
+
+#### `lowercaseHex`
+
+The `lowercaseHex` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, any alphabetical hexadecimal digits in escape sequences as well as any hexadecimal integer literals (see [the `numbers` option](#numbers)) in the output are in lowercase.
+
+```js
+jsesc('Ich ♥ Bücher', {
+ 'lowercaseHex': true
+});
+// → 'Ich \\u2665 B\\xfccher'
+// ^^
+
+jsesc(42, {
+ 'numbers': 'hexadecimal',
+ 'lowercaseHex': true
+});
+// → '0x2a'
+// ^^
+```
+
+### `jsesc.version`
+
+A string representing the semantic version number.
+
+### Using the `jsesc` binary
+
+To use the `jsesc` binary in your shell, simply install jsesc globally using npm:
+
+```bash
+npm install -g jsesc
+```
+
+After that you’re able to escape strings from the command line:
+
+```bash
+$ jsesc 'föo ♥ bår 𝌆 baz'
+f\xF6o \u2665 b\xE5r \uD834\uDF06 baz
+```
+
+To escape arrays or objects containing string values, use the `-o`/`--object` option:
+
+```bash
+$ jsesc --object '{ "föo": "♥", "bår": "𝌆 baz" }'
+{'f\xF6o':'\u2665','b\xE5r':'\uD834\uDF06 baz'}
+```
+
+To prettify the output in such cases, use the `-p`/`--pretty` option:
+
+```bash
+$ jsesc --pretty '{ "föo": "♥", "bår": "𝌆 baz" }'
+{
+ 'f\xF6o': '\u2665',
+ 'b\xE5r': '\uD834\uDF06 baz'
+}
+```
+
+For valid JSON output, use the `-j`/`--json` option:
+
+```bash
+$ jsesc --json --pretty '{ "föo": "♥", "bår": "𝌆 baz" }'
+{
+ "f\u00F6o": "\u2665",
+ "b\u00E5r": "\uD834\uDF06 baz"
+}
+```
+
+Read a local JSON file, escape any non-ASCII symbols, and save the result to a new file:
+
+```bash
+$ jsesc --json --object < data-raw.json > data-escaped.json
+```
+
+Or do the same with an online JSON file:
+
+```bash
+$ curl -sL "http://git.io/aorKgQ" | jsesc --json --object > data-escaped.json
+```
+
+See `jsesc --help` for the full list of options.
+
+## Support
+
+As of v2.0.0, jsesc supports Node.js v4+ only.
+
+Older versions (up to jsesc v1.3.0) support Chrome 27, Firefox 3, Safari 4, Opera 10, IE 6, Node.js v6.0.0, Narwhal 0.3.2, RingoJS 0.8-0.11, PhantomJS 1.9.0, and Rhino 1.7RC4. **Note:** Using the `json` option on objects or arrays that contain non-string values relies on `JSON.parse()`. For legacy environments like IE ≤ 7, use [a `JSON` polyfill](https://bestiejs.github.io/json3/).
+
+## Author
+
+| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
+|---|
+| [Mathias Bynens](https://mathiasbynens.be/) |
+
+## License
+
+This library is available under the [MIT](https://mths.be/mit) license.
diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/bin/jsesc b/tools/node_modules/babel-eslint/node_modules/jsesc/bin/jsesc
new file mode 100755
index 0000000000..e9a541db32
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/jsesc/bin/jsesc
@@ -0,0 +1,148 @@
+#!/usr/bin/env node
+(function() {
+
+ var fs = require('fs');
+ var stringEscape = require('../jsesc.js');
+ var strings = process.argv.splice(2);
+ var stdin = process.stdin;
+ var data;
+ var timeout;
+ var isObject = false;
+ var options = {};
+ var log = console.log;
+
+ var main = function() {
+ var option = strings[0];
+
+ if (/^(?:-h|--help|undefined)$/.test(option)) {
+ log(
+ 'jsesc v%s - https://mths.be/jsesc',
+ stringEscape.version
+ );
+ log([
+ '\nUsage:\n',
+ '\tjsesc [string]',
+ '\tjsesc [-s | --single-quotes] [string]',
+ '\tjsesc [-d | --double-quotes] [string]',
+ '\tjsesc [-w | --wrap] [string]',
+ '\tjsesc [-e | --escape-everything] [string]',
+ '\tjsesc [-t | --escape-etago] [string]',
+ '\tjsesc [-6 | --es6] [string]',
+ '\tjsesc [-l | --lowercase-hex] [string]',
+ '\tjsesc [-j | --json] [string]',
+ '\tjsesc [-o | --object] [stringified_object]', // `JSON.parse()` the argument
+ '\tjsesc [-p | --pretty] [string]', // `compact: false`
+ '\tjsesc [-v | --version]',
+ '\tjsesc [-h | --help]',
+ '\nExamples:\n',
+ '\tjsesc \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
+ '\tjsesc --json \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
+ '\tjsesc --json --escape-everything \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
+ '\tjsesc --double-quotes --wrap \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
+ '\techo \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\' | jsesc'
+ ].join('\n'));
+ return process.exit(1);
+ }
+
+ if (/^(?:-v|--version)$/.test(option)) {
+ log('v%s', stringEscape.version);
+ return process.exit(1);
+ }
+
+ strings.forEach(function(string) {
+ // Process options
+ if (/^(?:-s|--single-quotes)$/.test(string)) {
+ options.quotes = 'single';
+ return;
+ }
+ if (/^(?:-d|--double-quotes)$/.test(string)) {
+ options.quotes = 'double';
+ return;
+ }
+ if (/^(?:-w|--wrap)$/.test(string)) {
+ options.wrap = true;
+ return;
+ }
+ if (/^(?:-e|--escape-everything)$/.test(string)) {
+ options.escapeEverything = true;
+ return;
+ }
+ if (/^(?:-t|--escape-etago)$/.test(string)) {
+ options.escapeEtago = true;
+ return;
+ }
+ if (/^(?:-6|--es6)$/.test(string)) {
+ options.es6 = true;
+ return;
+ }
+ if (/^(?:-l|--lowercase-hex)$/.test(string)) {
+ options.lowercaseHex = true;
+ return;
+ }
+ if (/^(?:-j|--json)$/.test(string)) {
+ options.json = true;
+ return;
+ }
+ if (/^(?:-o|--object)$/.test(string)) {
+ isObject = true;
+ return;
+ }
+ if (/^(?:-p|--pretty)$/.test(string)) {
+ isObject = true;
+ options.compact = false;
+ return;
+ }
+
+ // Process string(s)
+ var result;
+ try {
+ if (isObject) {
+ string = JSON.parse(string);
+ }
+ result = stringEscape(string, options);
+ log(result);
+ } catch(error) {
+ log(error.message + '\n');
+ log('Error: failed to escape.');
+ log('If you think this is a bug in jsesc, please report it:');
+ log('https://github.com/mathiasbynens/jsesc/issues/new');
+ log(
+ '\nStack trace using jsesc@%s:\n',
+ stringEscape.version
+ );
+ log(error.stack);
+ return process.exit(1);
+ }
+ });
+ // Return with exit status 0 outside of the `forEach` loop, in case
+ // multiple strings were passed in.
+ return process.exit(0);
+
+ };
+
+ if (stdin.isTTY) {
+ // handle shell arguments
+ main();
+ } else {
+ // Either the script is called from within a non-TTY context,
+ // or `stdin` content is being piped in.
+ if (!process.stdout.isTTY) { // called from a non-TTY context
+ timeout = setTimeout(function() {
+ // if no piped data arrived after a while, handle shell arguments
+ main();
+ }, 250);
+ }
+
+ data = '';
+ stdin.on('data', function(chunk) {
+ clearTimeout(timeout);
+ data += chunk;
+ });
+ stdin.on('end', function() {
+ strings.push(data.trim());
+ main();
+ });
+ stdin.resume();
+ }
+
+}());
diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/jsesc.js b/tools/node_modules/babel-eslint/node_modules/jsesc/jsesc.js
new file mode 100644
index 0000000000..7b8b923614
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/jsesc/jsesc.js
@@ -0,0 +1,329 @@
+'use strict';
+
+const object = {};
+const hasOwnProperty = object.hasOwnProperty;
+const forOwn = (object, callback) => {
+ for (const key in object) {
+ if (hasOwnProperty.call(object, key)) {
+ callback(key, object[key]);
+ }
+ }
+};
+
+const extend = (destination, source) => {
+ if (!source) {
+ return destination;
+ }
+ forOwn(source, (key, value) => {
+ destination[key] = value;
+ });
+ return destination;
+};
+
+const forEach = (array, callback) => {
+ const length = array.length;
+ let index = -1;
+ while (++index < length) {
+ callback(array[index]);
+ }
+};
+
+const toString = object.toString;
+const isArray = Array.isArray;
+const isBuffer = Buffer.isBuffer;
+const isObject = (value) => {
+ // This is a very simple check, but it’s good enough for what we need.
+ return toString.call(value) == '[object Object]';
+};
+const isString = (value) => {
+ return typeof value == 'string' ||
+ toString.call(value) == '[object String]';
+};
+const isNumber = (value) => {
+ return typeof value == 'number' ||
+ toString.call(value) == '[object Number]';
+};
+const isFunction = (value) => {
+ return typeof value == 'function';
+};
+const isMap = (value) => {
+ return toString.call(value) == '[object Map]';
+};
+const isSet = (value) => {
+ return toString.call(value) == '[object Set]';
+};
+
+/*--------------------------------------------------------------------------*/
+
+// https://mathiasbynens.be/notes/javascript-escapes#single
+const singleEscapes = {
+ '"': '\\"',
+ '\'': '\\\'',
+ '\\': '\\\\',
+ '\b': '\\b',
+ '\f': '\\f',
+ '\n': '\\n',
+ '\r': '\\r',
+ '\t': '\\t'
+ // `\v` is omitted intentionally, because in IE < 9, '\v' == 'v'.
+ // '\v': '\\x0B'
+};
+const regexSingleEscape = /["'\\\b\f\n\r\t]/;
+
+const regexDigit = /[0-9]/;
+const regexWhitelist = /[ !#-&\(-\[\]-_a-~]/;
+
+const jsesc = (argument, options) => {
+ const increaseIndentation = () => {
+ oldIndent = indent;
+ ++options.indentLevel;
+ indent = options.indent.repeat(options.indentLevel)
+ };
+ // Handle options
+ const defaults = {
+ 'escapeEverything': false,
+ 'minimal': false,
+ 'isScriptContext': false,
+ 'quotes': 'single',
+ 'wrap': false,
+ 'es6': false,
+ 'json': false,
+ 'compact': true,
+ 'lowercaseHex': false,
+ 'numbers': 'decimal',
+ 'indent': '\t',
+ 'indentLevel': 0,
+ '__inline1__': false,
+ '__inline2__': false
+ };
+ const json = options && options.json;
+ if (json) {
+ defaults.quotes = 'double';
+ defaults.wrap = true;
+ }
+ options = extend(defaults, options);
+ if (
+ options.quotes != 'single' &&
+ options.quotes != 'double' &&
+ options.quotes != 'backtick'
+ ) {
+ options.quotes = 'single';
+ }
+ const quote = options.quotes == 'double' ?
+ '"' :
+ (options.quotes == 'backtick' ?
+ '`' :
+ '\''
+ );
+ const compact = options.compact;
+ const lowercaseHex = options.lowercaseHex;
+ let indent = options.indent.repeat(options.indentLevel);
+ let oldIndent = '';
+ const inline1 = options.__inline1__;
+ const inline2 = options.__inline2__;
+ const newLine = compact ? '' : '\n';
+ let result;
+ let isEmpty = true;
+ const useBinNumbers = options.numbers == 'binary';
+ const useOctNumbers = options.numbers == 'octal';
+ const useDecNumbers = options.numbers == 'decimal';
+ const useHexNumbers = options.numbers == 'hexadecimal';
+
+ if (json && argument && isFunction(argument.toJSON)) {
+ argument = argument.toJSON();
+ }
+
+ if (!isString(argument)) {
+ if (isMap(argument)) {
+ if (argument.size == 0) {
+ return 'new Map()';
+ }
+ if (!compact) {
+ options.__inline1__ = true;
+ options.__inline2__ = false;
+ }
+ return 'new Map(' + jsesc(Array.from(argument), options) + ')';
+ }
+ if (isSet(argument)) {
+ if (argument.size == 0) {
+ return 'new Set()';
+ }
+ return 'new Set(' + jsesc(Array.from(argument), options) + ')';
+ }
+ if (isBuffer(argument)) {
+ if (argument.length == 0) {
+ return 'Buffer.from([])';
+ }
+ return 'Buffer.from(' + jsesc(Array.from(argument), options) + ')';
+ }
+ if (isArray(argument)) {
+ result = [];
+ options.wrap = true;
+ if (inline1) {
+ options.__inline1__ = false;
+ options.__inline2__ = true;
+ }
+ if (!inline2) {
+ increaseIndentation();
+ }
+ forEach(argument, (value) => {
+ isEmpty = false;
+ if (inline2) {
+ options.__inline2__ = false;
+ }
+ result.push(
+ (compact || inline2 ? '' : indent) +
+ jsesc(value, options)
+ );
+ });
+ if (isEmpty) {
+ return '[]';
+ }
+ if (inline2) {
+ return '[' + result.join(', ') + ']';
+ }
+ return '[' + newLine + result.join(',' + newLine) + newLine +
+ (compact ? '' : oldIndent) + ']';
+ } else if (isNumber(argument)) {
+ if (json) {
+ // Some number values (e.g. `Infinity`) cannot be represented in JSON.
+ return JSON.stringify(argument);
+ }
+ if (useDecNumbers) {
+ return String(argument);
+ }
+ if (useHexNumbers) {
+ let hexadecimal = argument.toString(16);
+ if (!lowercaseHex) {
+ hexadecimal = hexadecimal.toUpperCase();
+ }
+ return '0x' + hexadecimal;
+ }
+ if (useBinNumbers) {
+ return '0b' + argument.toString(2);
+ }
+ if (useOctNumbers) {
+ return '0o' + argument.toString(8);
+ }
+ } else if (!isObject(argument)) {
+ if (json) {
+ // For some values (e.g. `undefined`, `function` objects),
+ // `JSON.stringify(value)` returns `undefined` (which isn’t valid
+ // JSON) instead of `'null'`.
+ return JSON.stringify(argument) || 'null';
+ }
+ return String(argument);
+ } else { // it’s an object
+ result = [];
+ options.wrap = true;
+ increaseIndentation();
+ forOwn(argument, (key, value) => {
+ isEmpty = false;
+ result.push(
+ (compact ? '' : indent) +
+ jsesc(key, options) + ':' +
+ (compact ? '' : ' ') +
+ jsesc(value, options)
+ );
+ });
+ if (isEmpty) {
+ return '{}';
+ }
+ return '{' + newLine + result.join(',' + newLine) + newLine +
+ (compact ? '' : oldIndent) + '}';
+ }
+ }
+
+ const string = argument;
+ // Loop over each code unit in the string and escape it
+ let index = -1;
+ const length = string.length;
+ result = '';
+ while (++index < length) {
+ const character = string.charAt(index);
+ if (options.es6) {
+ const first = string.charCodeAt(index);
+ if ( // check if it’s the start of a surrogate pair
+ first >= 0xD800 && first <= 0xDBFF && // high surrogate
+ length > index + 1 // there is a next code unit
+ ) {
+ const second = string.charCodeAt(index + 1);
+ if (second >= 0xDC00 && second <= 0xDFFF) { // low surrogate
+ // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
+ const codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
+ let hexadecimal = codePoint.toString(16);
+ if (!lowercaseHex) {
+ hexadecimal = hexadecimal.toUpperCase();
+ }
+ result += '\\u{' + hexadecimal + '}';
+ ++index;
+ continue;
+ }
+ }
+ }
+ if (!options.escapeEverything) {
+ if (regexWhitelist.test(character)) {
+ // It’s a printable ASCII character that is not `"`, `'` or `\`,
+ // so don’t escape it.
+ result += character;
+ continue;
+ }
+ if (character == '"') {
+ result += quote == character ? '\\"' : character;
+ continue;
+ }
+ if (character == '`') {
+ result += quote == character ? '\\`' : character;
+ continue;
+ }
+ if (character == '\'') {
+ result += quote == character ? '\\\'' : character;
+ continue;
+ }
+ }
+ if (
+ character == '\0' &&
+ !json &&
+ !regexDigit.test(string.charAt(index + 1))
+ ) {
+ result += '\\0';
+ continue;
+ }
+ if (regexSingleEscape.test(character)) {
+ // no need for a `hasOwnProperty` check here
+ result += singleEscapes[character];
+ continue;
+ }
+ const charCode = character.charCodeAt(0);
+ if (options.minimal && charCode != 0x2028 && charCode != 0x2029) {
+ result += character;
+ continue;
+ }
+ let hexadecimal = charCode.toString(16);
+ if (!lowercaseHex) {
+ hexadecimal = hexadecimal.toUpperCase();
+ }
+ const longhand = hexadecimal.length > 2 || json;
+ const escaped = '\\' + (longhand ? 'u' : 'x') +
+ ('0000' + hexadecimal).slice(longhand ? -4 : -2);
+ result += escaped;
+ continue;
+ }
+ if (options.wrap) {
+ result = quote + result + quote;
+ }
+ if (quote == '`') {
+ result = result.replace(/\$\{/g, '\\\$\{');
+ }
+ if (options.isScriptContext) {
+ // https://mathiasbynens.be/notes/etago
+ return result
+ .replace(/<\/(script|style)/gi, '<\\/$1')
+ .replace(/<!--/g, json ? '\\u003C!--' : '\\x3C!--');
+ }
+ return result;
+};
+
+jsesc.version = '2.5.2';
+
+module.exports = jsesc;
diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/man/jsesc.1 b/tools/node_modules/babel-eslint/node_modules/jsesc/man/jsesc.1
new file mode 100644
index 0000000000..2655ee7ae7
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/jsesc/man/jsesc.1
@@ -0,0 +1,94 @@
+.Dd May 13, 2016
+.Dt jsesc 1
+.Sh NAME
+.Nm jsesc
+.Nd escape strings for use in JavaScript string literals
+.Sh SYNOPSIS
+.Nm
+.Op Fl s | -single-quotes Ar string
+.br
+.Op Fl d | -double-quotes Ar string
+.br
+.Op Fl w | -wrap Ar string
+.br
+.Op Fl e | -escape-everything Ar string
+.br
+.Op Fl 6 | -es6 Ar string
+.br
+.Op Fl l | -lowercase-hex Ar string
+.br
+.Op Fl j | -json Ar string
+.br
+.Op Fl p | -object Ar string
+.br
+.Op Fl p | -pretty Ar string
+.br
+.Op Fl v | -version
+.br
+.Op Fl h | -help
+.Sh DESCRIPTION
+.Nm
+escapes strings for use in JavaScript string literals while generating the shortest possible valid ASCII-only output.
+.Sh OPTIONS
+.Bl -ohang -offset
+.It Sy "-s, --single-quotes"
+Escape any occurrences of ' in the input string as \\', so that the output can be used in a JavaScript string literal wrapped in single quotes.
+.It Sy "-d, --double-quotes"
+Escape any occurrences of " in the input string as \\", so that the output can be used in a JavaScript string literal wrapped in double quotes.
+.It Sy "-w, --wrap"
+Make sure the output is a valid JavaScript string literal wrapped in quotes. The type of quotes can be specified using the
+.Ar -s | --single-quotes
+or
+.Ar -d | --double-quotes
+settings.
+.It Sy "-6, --es6"
+Escape any astral Unicode symbols using ECMAScript 6 Unicode code point escape sequences.
+.It Sy "-e, --escape-everything"
+Escape all the symbols in the output, even printable ASCII symbols.
+.It Sy "-j, --json"
+Make sure the output is valid JSON. Hexadecimal character escape sequences and the \\v or \\0 escape sequences will not be used. Setting this flag enables the
+.Ar -d | --double-quotes
+and
+.Ar -w | --wrap
+settings.
+.It Sy "-o, --object"
+Treat the input as a JavaScript object rather than a string. Accepted values are flat arrays containing only string values, and flat objects containing only string values.
+.It Sy "-p, --pretty"
+Pretty-print the output for objects, using whitespace to make it more readable. Setting this flag enables the
+.It Sy "-l, --lowercase-hex"
+Use lowercase for alphabetical hexadecimal digits in escape sequences.
+.Ar -o | --object
+setting.
+.It Sy "-v, --version"
+Print jsesc's version.
+.It Sy "-h, --help"
+Show the help screen.
+.El
+.Sh EXIT STATUS
+The
+.Nm jsesc
+utility exits with one of the following values:
+.Pp
+.Bl -tag -width flag -compact
+.It Li 0
+.Nm
+successfully escaped the given string and printed the result.
+.It Li 1
+.Nm
+wasn't instructed to escape anything (for example, the
+.Ar --help
+flag was set); or, an error occurred.
+.El
+.Sh EXAMPLES
+.Bl -ohang -offset
+.It Sy "jsesc 'foo bar baz'"
+Print an escaped version of the given string.
+.It Sy echo\ 'foo bar baz'\ |\ jsesc
+Print an escaped version of the string that gets piped in.
+.El
+.Sh BUGS
+jsesc's bug tracker is located at <https://github.com/mathiasbynens/jsesc/issues>.
+.Sh AUTHOR
+Mathias Bynens <https://mathiasbynens.be/>
+.Sh WWW
+<https://mths.be/jsesc>
diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/package.json b/tools/node_modules/babel-eslint/node_modules/jsesc/package.json
new file mode 100644
index 0000000000..735096b93f
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/jsesc/package.json
@@ -0,0 +1,62 @@
+{
+ "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
index acdd128cd7..ba111a5a54 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/README.md
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/README.md
@@ -1,4 +1,4 @@
-# lodash v4.17.4
+# lodash v4.17.11
The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
@@ -28,12 +28,12 @@ var at = require('lodash/at');
var curryN = require('lodash/fp/curryN');
```
-See the [package source](https://github.com/lodash/lodash/tree/4.17.4-npm) for more details.
+See the [package source](https://github.com/lodash/lodash/tree/4.17.11-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 54-55, Firefox 49-50, IE 11, Edge 14, Safari 9-10, Node.js 6-7, & PhantomJS 2.1.1.<br>
+Tested in Chrome 68-69, Firefox 61-62, IE 11, Edge 17, Safari 10-11, Node.js 6-10, & PhantomJS 2.1.1.<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/_addMapEntry.js b/tools/node_modules/babel-eslint/node_modules/lodash/_addMapEntry.js
deleted file mode 100644
index 5a69212160..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_addMapEntry.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * Adds the key-value `pair` to `map`.
- *
- * @private
- * @param {Object} map The map to modify.
- * @param {Array} pair The key-value pair to add.
- * @returns {Object} Returns `map`.
- */
-function addMapEntry(map, pair) {
- // Don't return `map.set` because it's not chainable in IE 11.
- map.set(pair[0], pair[1]);
- return map;
-}
-
-module.exports = addMapEntry;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_addSetEntry.js b/tools/node_modules/babel-eslint/node_modules/lodash/_addSetEntry.js
deleted file mode 100644
index 1a07b708ac..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_addSetEntry.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * Adds `value` to `set`.
- *
- * @private
- * @param {Object} set The set to modify.
- * @param {*} value The value to add.
- * @returns {Object} Returns `set`.
- */
-function addSetEntry(set, value) {
- // Don't return `set.add` because it's not chainable in IE 11.
- set.add(value);
- return set;
-}
-
-module.exports = addSetEntry;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseClone.js b/tools/node_modules/babel-eslint/node_modules/lodash/_baseClone.js
index 7c27a37d32..6f73684f2a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseClone.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/_baseClone.js
@@ -15,7 +15,9 @@ var Stack = require('./_Stack'),
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. */
@@ -123,7 +125,7 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
if (!cloneableTags[tag]) {
return object ? value : {};
}
- result = initCloneByTag(value, tag, baseClone, isDeep);
+ result = initCloneByTag(value, tag, isDeep);
}
}
// Check for circular references and return its corresponding clone.
@@ -134,6 +136,22 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
}
stack.set(value, result);
+ if (isSet(value)) {
+ value.forEach(function(subValue) {
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
+ });
+
+ return result;
+ }
+
+ if (isMap(value)) {
+ value.forEach(function(subValue, key) {
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+
+ return result;
+ }
+
var keysFunc = isFull
? (isFlat ? getAllKeysIn : getAllKeys)
: (isFlat ? keysIn : keys);
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMerge.js b/tools/node_modules/babel-eslint/node_modules/lodash/_baseMerge.js
index f4cb8c6988..c5868f04c5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMerge.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/_baseMerge.js
@@ -3,7 +3,8 @@ var Stack = require('./_Stack'),
baseFor = require('./_baseFor'),
baseMergeDeep = require('./_baseMergeDeep'),
isObject = require('./isObject'),
- keysIn = require('./keysIn');
+ keysIn = require('./keysIn'),
+ safeGet = require('./_safeGet');
/**
* The base implementation of `_.merge` without support for multiple sources.
@@ -27,7 +28,7 @@ function baseMerge(object, source, srcIndex, customizer, stack) {
}
else {
var newValue = customizer
- ? customizer(object[key], srcValue, (key + ''), object, source, stack)
+ ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
: undefined;
if (newValue === undefined) {
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMergeDeep.js b/tools/node_modules/babel-eslint/node_modules/lodash/_baseMergeDeep.js
index 42b405a3dc..4679e8dce4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMergeDeep.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/_baseMergeDeep.js
@@ -11,6 +11,7 @@ var assignMergeValue = require('./_assignMergeValue'),
isObject = require('./isObject'),
isPlainObject = require('./isPlainObject'),
isTypedArray = require('./isTypedArray'),
+ safeGet = require('./_safeGet'),
toPlainObject = require('./toPlainObject');
/**
@@ -29,8 +30,8 @@ var assignMergeValue = require('./_assignMergeValue'),
* counterparts.
*/
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
- var objValue = object[key],
- srcValue = source[key],
+ var objValue = safeGet(object, key),
+ srcValue = safeGet(source, key),
stacked = stack.get(srcValue);
if (stacked) {
@@ -73,7 +74,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
if (isArguments(objValue)) {
newValue = toPlainObject(objValue);
}
- else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
+ else if (!isObject(objValue) || isFunction(objValue)) {
newValue = initCloneObject(srcValue);
}
}
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneMap.js b/tools/node_modules/babel-eslint/node_modules/lodash/_cloneMap.js
deleted file mode 100644
index 334b73e986..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneMap.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var addMapEntry = require('./_addMapEntry'),
- arrayReduce = require('./_arrayReduce'),
- mapToArray = require('./_mapToArray');
-
-/** Used to compose bitmasks for cloning. */
-var CLONE_DEEP_FLAG = 1;
-
-/**
- * Creates a clone of `map`.
- *
- * @private
- * @param {Object} map The map to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned map.
- */
-function cloneMap(map, isDeep, cloneFunc) {
- var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
- return arrayReduce(array, addMapEntry, new map.constructor);
-}
-
-module.exports = cloneMap;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneSet.js b/tools/node_modules/babel-eslint/node_modules/lodash/_cloneSet.js
deleted file mode 100644
index 713a2f76b0..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneSet.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var addSetEntry = require('./_addSetEntry'),
- arrayReduce = require('./_arrayReduce'),
- setToArray = require('./_setToArray');
-
-/** Used to compose bitmasks for cloning. */
-var CLONE_DEEP_FLAG = 1;
-
-/**
- * Creates a clone of `set`.
- *
- * @private
- * @param {Object} set The set to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned set.
- */
-function cloneSet(set, isDeep, cloneFunc) {
- var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
- return arrayReduce(array, addSetEntry, new set.constructor);
-}
-
-module.exports = cloneSet;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicodeWord.js b/tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicodeWord.js
index a35d6e504d..95d52c444c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicodeWord.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicodeWord.js
@@ -1,5 +1,5 @@
/** 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 ]/;
+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 ]/;
/**
* Checks if `string` contains a word composed of Unicode symbols.
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneArray.js b/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneArray.js
index aef02120e5..078c15af98 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneArray.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneArray.js
@@ -13,7 +13,7 @@ var hasOwnProperty = objectProto.hasOwnProperty;
*/
function initCloneArray(array) {
var length = array.length,
- result = array.constructor(length);
+ result = new array.constructor(length);
// Add properties assigned by `RegExp#exec`.
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneByTag.js b/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneByTag.js
index e7b77edc69..f69a008ca3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneByTag.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneByTag.js
@@ -1,8 +1,6 @@
var cloneArrayBuffer = require('./_cloneArrayBuffer'),
cloneDataView = require('./_cloneDataView'),
- cloneMap = require('./_cloneMap'),
cloneRegExp = require('./_cloneRegExp'),
- cloneSet = require('./_cloneSet'),
cloneSymbol = require('./_cloneSymbol'),
cloneTypedArray = require('./_cloneTypedArray');
@@ -32,16 +30,15 @@ var arrayBufferTag = '[object ArrayBuffer]',
* Initializes an object clone based on its `toStringTag`.
*
* **Note:** This function only supports cloning values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ * `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 {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the initialized clone.
*/
-function initCloneByTag(object, tag, cloneFunc, isDeep) {
+function initCloneByTag(object, tag, isDeep) {
var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag:
@@ -60,7 +57,7 @@ function initCloneByTag(object, tag, cloneFunc, isDeep) {
return cloneTypedArray(object, isDeep);
case mapTag:
- return cloneMap(object, isDeep, cloneFunc);
+ return new Ctor;
case numberTag:
case stringTag:
@@ -70,7 +67,7 @@ function initCloneByTag(object, tag, cloneFunc, isDeep) {
return cloneRegExp(object);
case setTag:
- return cloneSet(object, isDeep, cloneFunc);
+ return new Ctor;
case symbolTag:
return cloneSymbol(object);
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isIndex.js b/tools/node_modules/babel-eslint/node_modules/lodash/_isIndex.js
index e123dde8bc..061cd390c3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_isIndex.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/_isIndex.js
@@ -13,10 +13,13 @@ var reIsUint = /^(?:0|[1-9]\d*)$/;
* @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 &&
- (typeof value == 'number' || reIsUint.test(value)) &&
- (value > -1 && value % 1 == 0 && value < length);
+ (type == 'number' ||
+ (type != 'symbol' && reIsUint.test(value))) &&
+ (value > -1 && value % 1 == 0 && value < length);
}
module.exports = isIndex;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_nodeUtil.js b/tools/node_modules/babel-eslint/node_modules/lodash/_nodeUtil.js
index 14e179fe1c..983d78f75b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_nodeUtil.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/_nodeUtil.js
@@ -15,6 +15,14 @@ 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) {}
}());
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_safeGet.js b/tools/node_modules/babel-eslint/node_modules/lodash/_safeGet.js
new file mode 100644
index 0000000000..411b062053
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/_safeGet.js
@@ -0,0 +1,17 @@
+/**
+ * Gets the value at `key`, unless `key` is "__proto__".
+ *
+ * @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 == '__proto__') {
+ return;
+ }
+
+ return object[key];
+}
+
+module.exports = safeGet;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stringToPath.js b/tools/node_modules/babel-eslint/node_modules/lodash/_stringToPath.js
index db7b0f7dba..8f39f8a29b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_stringToPath.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/_stringToPath.js
@@ -1,8 +1,7 @@
var memoizeCapped = require('./_memoizeCapped');
/** Used to match property names within property paths. */
-var reLeadingDot = /^\./,
- rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
@@ -16,11 +15,11 @@ var reEscapeChar = /\\(\\)?/g;
*/
var stringToPath = memoizeCapped(function(string) {
var result = [];
- if (reLeadingDot.test(string)) {
+ if (string.charCodeAt(0) === 46 /* . */) {
result.push('');
}
- string.replace(rePropName, function(match, number, quote, string) {
- result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ string.replace(rePropName, function(match, number, quote, subString) {
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
});
return result;
});
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_unicodeWords.js b/tools/node_modules/babel-eslint/node_modules/lodash/_unicodeWords.js
index d8b822ada9..e72e6e0f93 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_unicodeWords.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/_unicodeWords.js
@@ -38,8 +38,8 @@ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
reOptMod = rsModifier + '?',
rsOptVar = '[' + rsVarRange + ']?',
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
- rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)',
- rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)',
+ 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;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/core.js b/tools/node_modules/babel-eslint/node_modules/lodash/core.js
index 88c263f86d..e333c15b98 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/core.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/core.js
@@ -13,7 +13,7 @@
var undefined;
/** Used as the semantic version number. */
- var VERSION = '4.17.4';
+ var VERSION = '4.17.11';
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
@@ -49,6 +49,9 @@
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;',
@@ -1160,26 +1163,6 @@
}
/**
- * 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;
- }
-
- /**
* A specialized version of `baseIsEqualDeep` for arrays with support for
* partial deep comparisons.
*
@@ -1367,6 +1350,48 @@
}
/**
+ * 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.
@@ -3099,39 +3124,6 @@
});
/**
- * 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);
- });
-
- /**
* 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.
@@ -3191,9 +3183,35 @@
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
- var defaults = baseRest(function(args) {
- args.push(undefined, customDefaultsAssignIn);
- return assignInWith.apply(undefined, args);
+ 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;
});
/**
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
index b909d31c75..bd1e5453f3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/core.min.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/core.min.js
@@ -3,27 +3,27 @@
* 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 K(n)&&pn.call(n,"callee")&&!bn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?nn: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(nn,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===nn?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=D),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,In);
-}function h(n,t){return l(t,function(t){return V(n[t])})}function v(n,t){return n>t}function y(n,t,r,e,u){return n===t||(null==n||null==t||!K(n)&&!K(t)?n!==n&&t!==t:b(n,t,r,e,y,u))}function b(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=B(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=M(+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=R(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?Y:(typeof n=="object"?d:r)(n)}function _(n,t){return n<t}function j(n,t){var r=-1,e=U(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&&y(n[u],r[u],3)))return false}return true}}function m(n,t){return n=Object(n),G(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function O(n){return xn(q(n,void 0,Y),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 G(r,function(n,r){return r.func.apply(r.thisArg,t([n],r.args))},n)}function k(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):nn;if(f===nn&&(f=n[c]),u)r[c]=f;else{var a=r,l=a[c];
-pn.call(a,c)&&M(l,f)&&(f!==nn||c in a)||(a[c]=f)}}return r}function N(n){return O(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:nn,o=3<n.length&&typeof o=="function"?(u--,o):nn;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 H(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){return n===nn||M(n,ln[r])&&!pn.call(e,r)?t:n}function B(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?[]:nn;++c<i;){var l=n[c],p=t[c];if(void 0!==nn){f=false;break}if(a){if(!E(t,function(n,t){if(!z(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 R(n,t,r,e,u,o){
-var i=1&r,c=In(n),f=c.length,a=In(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!==nn||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 D(t){return Nn(t)||n(t)}function I(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);
-return t}function q(n,t,r){return t=jn(t===nn?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 P(n){return n&&n.length?n[0]:nn}function z(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 C(n,t){return mn(n,g(t));
-}function G(n,t,r){return e(n,g(t),r,3>arguments.length,mn)}function J(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=nn),r}}function M(n,t){return n===t||n!==n&&t!==t}function U(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t),t&&!V(n)}function V(n){return!!H(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n);
-}function H(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function K(n){return null!=n&&typeof n=="object"}function L(n){return typeof n=="number"||K(n)&&"[object Number]"==hn.call(n)}function Q(n){return typeof n=="string"||!Nn(n)&&K(n)&&"[object String]"==hn.call(n)}function W(n){return typeof n=="string"?n:null==n?"":n+""}function X(n){return null==n?[]:u(n,In(n))}function Y(n){return n}function Z(n,r,e){var u=In(r),o=h(r,u);null!=e||H(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,In(r)));
-var i=!(H(e)&&"chain"in e&&!e.chain),c=V(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 nn,tn=1/0,rn=/[&<>"']/g,en=RegExp(rn.source),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?nn:n[t]}}({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,yn=Object.create,bn=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 H(t)?yn?yn(t):(n.prototype=t,t=new n,n.prototype=nn,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(!U(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=Y,An=function(n){return function(t,r,e){var u=Object(t);if(!U(t)){var o=g(r);t=In(t),r=function(n){return o(u[n],n,u)}}return r=n(t,r,e),-1<r?u[o?t[r]:r]:nn}}(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,I(t),n)}),Rn=N(function(n,t,r,e){k(t,qn(t),n,e)}),Dn=O(function(n){return n.push(nn,T),Rn.apply(nn,n)}),In=_n,qn=I,$n=function(n){return xn(q(n,nn,$),n+"");
-}(function(n,t){return null==n?{}:m(n,t)});o.assignIn=Bn,o.before=J,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=Dn,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,tn):[]},o.iteratee=g,o.keys=In,o.map=function(n,t){return j(n,g(t))},o.matches=function(n){return d(Tn({},n))},o.mixin=Z,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 J(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return r=r===nn?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!==nn,o=null===r,i=r===r,c=e!==nn,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 U(n)?n.length?A(n):[]:X(n)},o.values=X,o.extend=Bn,Z(o,o),o.clone=function(n){return H(n)?Nn(n)?A(n):k(n,_n(n)):n;
-},o.escape=function(n){return(n=W(n))&&en.test(n)?n.replace(rn,fn):n},o.every=function(n,t,r){return t=r?nn:t,f(n,g(t))},o.find=An,o.forEach=C,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=P,o.identity=Y,o.indexOf=z,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||K(n)&&"[object Boolean]"==hn.call(n)},o.isDate=function(n){return K(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return U(t)&&(Nn(t)||Q(t)||V(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){
-return y(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=V,o.isNaN=function(n){return L(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=L,o.isObject=H,o.isRegExp=function(n){return K(n)&&"[object RegExp]"==hn.call(n)},o.isString=Q,o.isUndefined=function(n){return n===nn},o.last=function(n){var t=null==n?0:n.length;return t?n[t-1]:nn},o.max=function(n){return n&&n.length?a(n,Y,v):nn},o.min=function(n){return n&&n.length?a(n,Y,_):nn},o.noConflict=function(){return on._===this&&(on._=vn),
-this},o.noop=function(){},o.reduce=G,o.result=function(n,t,r){return t=null==n?nn:n[t],t===nn&&(t=r),V(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=U(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?nn:t,E(n,g(t))},o.uniqueId=function(n){var t=++sn;return W(n)+t},o.each=C,o.first=P,Z(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.4",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
+;(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.11",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/debounce.js b/tools/node_modules/babel-eslint/node_modules/lodash/debounce.js
index 04d7dfd317..205e49f342 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/debounce.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/debounce.js
@@ -108,9 +108,11 @@ function debounce(func, wait, options) {
function remainingWait(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime,
- result = wait - timeSinceLastCall;
+ timeWaiting = wait - timeSinceLastCall;
- return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
+ return maxing
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
+ : timeWaiting;
}
function shouldInvoke(time) {
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/defaults.js b/tools/node_modules/babel-eslint/node_modules/lodash/defaults.js
index 6b75ee08ce..c74df044c4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/defaults.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/defaults.js
@@ -1,7 +1,13 @@
-var apply = require('./_apply'),
- assignInWith = require('./assignInWith'),
- baseRest = require('./_baseRest'),
- customDefaultsAssignIn = require('./_customDefaultsAssignIn');
+var baseRest = require('./_baseRest'),
+ eq = require('./eq'),
+ isIterateeCall = require('./_isIterateeCall'),
+ keysIn = require('./keysIn');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Assigns own and inherited enumerable string keyed properties of source
@@ -24,9 +30,35 @@ var apply = require('./_apply'),
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
-var defaults = baseRest(function(args) {
- args.push(undefined, customDefaultsAssignIn);
- return apply(assignInWith, undefined, args);
+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;
});
module.exports = defaults;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_baseConvert.js b/tools/node_modules/babel-eslint/node_modules/lodash/fp/_baseConvert.js
index 7af27655bc..9baf8e1902 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_baseConvert.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/fp/_baseConvert.js
@@ -136,8 +136,7 @@ function wrapImmutable(func, cloner) {
* @returns {Function|Object} Returns the converted function or object.
*/
function baseConvert(util, name, func, options) {
- var setPlaceholder,
- isLib = typeof name == 'function',
+ var isLib = typeof name == 'function',
isObj = name === Object(name);
if (isObj) {
@@ -158,10 +157,10 @@ function baseConvert(util, name, func, options) {
'rearg': 'rearg' in options ? options.rearg : true
};
- var forceCurry = ('curry' in options) && options.curry,
+ var defaultHolder = isLib ? func : fallbackHolder,
+ forceCurry = ('curry' in options) && options.curry,
forceFixed = ('fixed' in options) && options.fixed,
forceRearg = ('rearg' in options) && options.rearg,
- placeholder = isLib ? func : fallbackHolder,
pristine = isLib ? func.runInContext() : undefined;
var helpers = isLib ? func : {
@@ -171,7 +170,9 @@ function baseConvert(util, name, func, options) {
'curry': util.curry,
'forEach': util.forEach,
'isArray': util.isArray,
+ 'isError': util.isError,
'isFunction': util.isFunction,
+ 'isWeakMap': util.isWeakMap,
'iteratee': util.iteratee,
'keys': util.keys,
'rearg': util.rearg,
@@ -185,7 +186,9 @@ function baseConvert(util, name, func, options) {
curry = helpers.curry,
each = helpers.forEach,
isArray = helpers.isArray,
+ isError = helpers.isError,
isFunction = helpers.isFunction,
+ isWeakMap = helpers.isWeakMap,
keys = helpers.keys,
rearg = helpers.rearg,
toInteger = helpers.toInteger,
@@ -355,8 +358,9 @@ function baseConvert(util, name, func, options) {
var key = path[index],
value = nested[key];
- if (value != null) {
- nested[path[index]] = clone(index == lastIndex ? value : Object(value));
+ if (value != null &&
+ !(isFunction(value) || isError(value) || isWeakMap(value))) {
+ nested[key] = clone(index == lastIndex ? value : Object(value));
}
nested = nested[key];
}
@@ -461,7 +465,7 @@ function baseConvert(util, name, func, options) {
* @param {Function} func The function to wrap.
* @returns {Function} Returns the converted function.
*/
- function wrap(name, func) {
+ function wrap(name, func, placeholder) {
var result,
realName = mapping.aliasToReal[name] || name,
wrapped = func,
@@ -506,17 +510,15 @@ function baseConvert(util, name, func, options) {
};
}
result.convert = createConverter(realName, func);
- if (mapping.placeholder[realName]) {
- setPlaceholder = true;
- result.placeholder = func.placeholder = placeholder;
- }
+ result.placeholder = func.placeholder = placeholder;
+
return result;
}
/*--------------------------------------------------------------------------*/
if (!isObj) {
- return wrap(name, func);
+ return wrap(name, func, defaultHolder);
}
var _ = func;
@@ -526,7 +528,7 @@ function baseConvert(util, name, func, options) {
each(mapping.aryMethod[aryKey], function(key) {
var func = _[mapping.remap[key] || key];
if (func) {
- pairs.push([key, wrap(key, func)]);
+ pairs.push([key, wrap(key, func, _)]);
}
});
});
@@ -552,9 +554,8 @@ function baseConvert(util, name, func, options) {
});
_.convert = convertLib;
- if (setPlaceholder) {
- _.placeholder = placeholder;
- }
+ _.placeholder = _;
+
// Assign aliases.
each(keys(_), function(key) {
each(mapping.realToAlias[key] || [], function(alias) {
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_mapping.js b/tools/node_modules/babel-eslint/node_modules/lodash/fp/_mapping.js
index 8f5ddf2d09..a642ec0584 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_mapping.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/fp/_mapping.js
@@ -261,16 +261,6 @@ exports.mutate = {
}
};
-/** Used to track methods with placeholder support */
-exports.placeholder = {
- 'bind': true,
- 'bindKey': true,
- 'curry': true,
- 'curryRight': true,
- 'partial': true,
- 'partialRight': true
-};
-
/** Used to map real names to their aliases. */
exports.realToAlias = (function() {
var hasOwnProperty = Object.prototype.hasOwnProperty,
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_util.js b/tools/node_modules/babel-eslint/node_modules/lodash/fp/_util.js
index 7084463026..1dbf36f5d2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_util.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/fp/_util.js
@@ -5,7 +5,9 @@ module.exports = {
'curry': require('../curry'),
'forEach': require('../_arrayEach'),
'isArray': require('../isArray'),
+ 'isError': require('../isError'),
'isFunction': require('../isFunction'),
+ 'isWeakMap': require('../isWeakMap'),
'iteratee': require('../iteratee'),
'keys': require('../_baseKeys'),
'rearg': require('../rearg'),
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/invert.js b/tools/node_modules/babel-eslint/node_modules/lodash/invert.js
index 21d10aba37..8c4795097b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/invert.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/invert.js
@@ -2,6 +2,16 @@ var constant = require('./constant'),
createInverter = require('./_createInverter'),
identity = require('./identity');
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
/**
* Creates an object composed of the inverted keys and values of `object`.
* If `object` contains duplicate values, subsequent values overwrite
@@ -21,6 +31,11 @@ var constant = require('./constant'),
* // => { '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));
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/invertBy.js b/tools/node_modules/babel-eslint/node_modules/lodash/invertBy.js
index e5ba0f7091..3f4f7e532c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/invertBy.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/invertBy.js
@@ -8,6 +8,13 @@ var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
+/**
* 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
@@ -34,6 +41,11 @@ var hasOwnProperty = objectProto.hasOwnProperty;
* // => { '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 {
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lodash.js b/tools/node_modules/babel-eslint/node_modules/lodash/lodash.js
index b39ddce69b..cb139dd81e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/lodash.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/lodash.js
@@ -12,7 +12,7 @@
var undefined;
/** Used as the semantic version number. */
- var VERSION = '4.17.4';
+ var VERSION = '4.17.11';
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
@@ -143,7 +143,6 @@
/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
reIsPlainProp = /^\w*$/,
- reLeadingDot = /^\./,
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
/**
@@ -243,8 +242,8 @@
reOptMod = rsModifier + '?',
rsOptVar = '[' + rsVarRange + ']?',
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
- rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)',
- rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)',
+ 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('|') + ')';
@@ -277,7 +276,7 @@
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 ]/;
+ 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 = [
@@ -437,6 +436,14 @@
/** 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) {}
}());
@@ -452,34 +459,6 @@
/*--------------------------------------------------------------------------*/
/**
- * Adds the key-value `pair` to `map`.
- *
- * @private
- * @param {Object} map The map to modify.
- * @param {Array} pair The key-value pair to add.
- * @returns {Object} Returns `map`.
- */
- function addMapEntry(map, pair) {
- // Don't return `map.set` because it's not chainable in IE 11.
- map.set(pair[0], pair[1]);
- return map;
- }
-
- /**
- * Adds `value` to `set`.
- *
- * @private
- * @param {Object} set The set to modify.
- * @param {*} value The value to add.
- * @returns {Object} Returns `set`.
- */
- function addSetEntry(set, value) {
- // Don't return `set.add` because it's not chainable in IE 11.
- set.add(value);
- return set;
- }
-
- /**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
@@ -2677,7 +2656,7 @@
if (!cloneableTags[tag]) {
return object ? value : {};
}
- result = initCloneByTag(value, tag, baseClone, isDeep);
+ result = initCloneByTag(value, tag, isDeep);
}
}
// Check for circular references and return its corresponding clone.
@@ -2688,6 +2667,22 @@
}
stack.set(value, result);
+ if (isSet(value)) {
+ value.forEach(function(subValue) {
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
+ });
+
+ return result;
+ }
+
+ if (isMap(value)) {
+ value.forEach(function(subValue, key) {
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+
+ return result;
+ }
+
var keysFunc = isFull
? (isFlat ? getAllKeysIn : getAllKeys)
: (isFlat ? keysIn : keys);
@@ -3615,7 +3610,7 @@
}
else {
var newValue = customizer
- ? customizer(object[key], srcValue, (key + ''), object, source, stack)
+ ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
: undefined;
if (newValue === undefined) {
@@ -3642,8 +3637,8 @@
* counterparts.
*/
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
- var objValue = object[key],
- srcValue = source[key],
+ var objValue = safeGet(object, key),
+ srcValue = safeGet(source, key),
stacked = stack.get(srcValue);
if (stacked) {
@@ -3686,7 +3681,7 @@
if (isArguments(objValue)) {
newValue = toPlainObject(objValue);
}
- else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
+ else if (!isObject(objValue) || isFunction(objValue)) {
newValue = initCloneObject(srcValue);
}
}
@@ -4552,20 +4547,6 @@
}
/**
- * Creates a clone of `map`.
- *
- * @private
- * @param {Object} map The map to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned map.
- */
- function cloneMap(map, isDeep, cloneFunc) {
- var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
- return arrayReduce(array, addMapEntry, new map.constructor);
- }
-
- /**
* Creates a clone of `regexp`.
*
* @private
@@ -4579,20 +4560,6 @@
}
/**
- * Creates a clone of `set`.
- *
- * @private
- * @param {Object} set The set to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned set.
- */
- function cloneSet(set, isDeep, cloneFunc) {
- var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
- return arrayReduce(array, addSetEntry, new set.constructor);
- }
-
- /**
* Creates a clone of the `symbol` object.
*
* @private
@@ -6186,7 +6153,7 @@
*/
function initCloneArray(array) {
var length = array.length,
- result = array.constructor(length);
+ result = new array.constructor(length);
// Add properties assigned by `RegExp#exec`.
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
@@ -6213,16 +6180,15 @@
* Initializes an object clone based on its `toStringTag`.
*
* **Note:** This function only supports cloning values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ * `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 {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the initialized clone.
*/
- function initCloneByTag(object, tag, cloneFunc, isDeep) {
+ function initCloneByTag(object, tag, isDeep) {
var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag:
@@ -6241,7 +6207,7 @@
return cloneTypedArray(object, isDeep);
case mapTag:
- return cloneMap(object, isDeep, cloneFunc);
+ return new Ctor;
case numberTag:
case stringTag:
@@ -6251,7 +6217,7 @@
return cloneRegExp(object);
case setTag:
- return cloneSet(object, isDeep, cloneFunc);
+ return new Ctor;
case symbolTag:
return cloneSymbol(object);
@@ -6298,10 +6264,13 @@
* @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 &&
- (typeof value == 'number' || reIsUint.test(value)) &&
- (value > -1 && value % 1 == 0 && value < length);
+ (type == 'number' ||
+ (type != 'symbol' && reIsUint.test(value))) &&
+ (value > -1 && value % 1 == 0 && value < length);
}
/**
@@ -6636,6 +6605,22 @@
}
/**
+ * Gets the value at `key`, unless `key` is "__proto__".
+ *
+ * @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 == '__proto__') {
+ return;
+ }
+
+ return object[key];
+ }
+
+ /**
* Sets metadata for `func`.
*
* **Note:** If this function becomes hot, i.e. is invoked a lot in a short
@@ -6751,11 +6736,11 @@
*/
var stringToPath = memoizeCapped(function(string) {
var result = [];
- if (reLeadingDot.test(string)) {
+ if (string.charCodeAt(0) === 46 /* . */) {
result.push('');
}
- string.replace(rePropName, function(match, number, quote, string) {
- result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ string.replace(rePropName, function(match, number, quote, subString) {
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
});
return result;
});
@@ -10363,9 +10348,11 @@
function remainingWait(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime,
- result = wait - timeSinceLastCall;
+ timeWaiting = wait - timeSinceLastCall;
- return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
+ return maxing
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
+ : timeWaiting;
}
function shouldInvoke(time) {
@@ -12797,9 +12784,35 @@
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
- var defaults = baseRest(function(args) {
- args.push(undefined, customDefaultsAssignIn);
- return apply(assignInWith, undefined, args);
+ 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;
});
/**
@@ -13196,6 +13209,11 @@
* // => { '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));
@@ -13226,6 +13244,11 @@
* // => { '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 {
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
index ca447f4e82..c911263442 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/lodash.min.js
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/lodash.min.js
@@ -2,135 +2,136 @@
* @license
* Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
*/
-;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(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 e(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 u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&false!==t(n[r],r,n););return n}function i(n,t){for(var r=null==n?0:n.length;r--&&false!==t(n[r],r,n););
-return n}function o(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 f(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 c(n,t){return!(null==n||!n.length)&&-1<d(n,t,0)}function a(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 l(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 s(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];
-return n}function h(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 p(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 _(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 v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,false}),e}function g(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 d(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=g(n,b,r);return n}function y(n,t,r,e){--r;for(var u=n.length;++r<u;)if(e(n[r],t))return r;return-1}function b(n){return n!==n}function x(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:P}function j(n){return function(t){return null==t?F:t[n]}}function w(n){return function(t){return null==n?F:n[t]}}function m(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=false,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;
-return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==F&&(r=r===F?i:r+i)}return r}function E(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function O(n,t){return l(t,function(t){return[t,n[t]]})}function S(n){return function(t){return n(t)}}function I(n,t){return l(t,function(t){return n[t]})}function R(n,t){return n.has(t)}function z(n,t){for(var r=-1,e=n.length;++r<e&&-1<d(t,n[r],0););return r}function W(n,t){for(var r=n.length;r--&&-1<d(t,n[r],0););return r}function B(n){
-return"\\"+Tn[n]}function L(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function U(n,t){return function(r){return n(t(r))}}function C(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 D(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function T(n){if(Bn.test(n)){
-for(var t=zn.lastIndex=0;zn.test(n);)++t;n=t}else n=tt(n);return n}function $(n){return Bn.test(n)?n.match(zn)||[]:n.split("")}var F,N=1/0,P=NaN,Z=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],q=/\b__p\+='';/g,V=/\b(__p\+=)''\+/g,K=/(__e\(.*?\)|\b__t\))\+'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,J=RegExp(G.source),Y=RegExp(H.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,nn=/<%=([\s\S]+?)%>/g,tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,en=/^\./,un=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,on=/[\\^$.*+?()[\]{}|]/g,fn=RegExp(on.source),cn=/^\s+|\s+$/g,an=/^\s+/,ln=/\s+$/,sn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hn=/\{\n\/\* \[wrapped with (.+)\] \*/,pn=/,? & /,_n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vn=/\\(\\)?/g,gn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dn=/\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,xn=/^\[object .+?Constructor\]$/,jn=/^0o[0-7]+$/i,wn=/^(?:0|[1-9]\d*)$/,mn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,An=/($^)/,kn=/['\n\r\u2028\u2029\\]/g,En="[\\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])?)*",On="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+En,Sn="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",In=RegExp("['\u2019]","g"),Rn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),zn=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Sn+En,"g"),Wn=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)|\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)|\\d+",On].join("|"),"g"),Bn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ln=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Un="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(" "),Cn={};
-Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object DataView]"]=Cn["[object Date]"]=Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object WeakMap]"]=false;
-var Dn={};Dn["[object Arguments]"]=Dn["[object Array]"]=Dn["[object ArrayBuffer]"]=Dn["[object DataView]"]=Dn["[object Boolean]"]=Dn["[object Date]"]=Dn["[object Float32Array]"]=Dn["[object Float64Array]"]=Dn["[object Int8Array]"]=Dn["[object Int16Array]"]=Dn["[object Int32Array]"]=Dn["[object Map]"]=Dn["[object Number]"]=Dn["[object Object]"]=Dn["[object RegExp]"]=Dn["[object Set]"]=Dn["[object String]"]=Dn["[object Symbol]"]=Dn["[object Uint8Array]"]=Dn["[object Uint8ClampedArray]"]=Dn["[object Uint16Array]"]=Dn["[object Uint32Array]"]=true,
-Dn["[object Error]"]=Dn["[object Function]"]=Dn["[object WeakMap]"]=false;var Mn,Tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$n=parseFloat,Fn=parseInt,Nn=typeof global=="object"&&global&&global.Object===Object&&global,Pn=typeof self=="object"&&self&&self.Object===Object&&self,Zn=Nn||Pn||Function("return this")(),qn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vn=qn&&typeof module=="object"&&module&&!module.nodeType&&module,Kn=Vn&&Vn.exports===qn,Gn=Kn&&Nn.process;
-n:{try{Mn=Gn&&Gn.binding&&Gn.binding("util");break n}catch(n){}Mn=void 0}var Hn=Mn&&Mn.isArrayBuffer,Jn=Mn&&Mn.isDate,Yn=Mn&&Mn.isMap,Qn=Mn&&Mn.isRegExp,Xn=Mn&&Mn.isSet,nt=Mn&&Mn.isTypedArray,tt=j("length"),rt=w({"\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"}),et=w({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),ut=w({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),it=function w(En){function On(n){if(xu(n)&&!af(n)&&!(n instanceof Mn)){if(n instanceof zn)return n;if(ci.call(n,"__wrapped__"))return Pe(n)}return new zn(n)}function Sn(){}function zn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=F}function Mn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,
-this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}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 Nn(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 Pn(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 qn(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new Pn;++t<r;)this.add(n[t])}function Vn(n){
-this.size=(this.__data__=new Nn(n)).size}function Gn(n,t){var r,e=af(n),u=!e&&cf(n),i=!e&&!u&&sf(n),o=!e&&!u&&!i&&gf(n),u=(e=e||u||i||o)?E(n.length,ri):[],f=u.length;for(r in n)!t&&!ci.call(n,r)||e&&("length"==r||i&&("offset"==r||"parent"==r)||o&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||Re(r,f))||u.push(r);return u}function tt(n){var t=n.length;return t?n[cr(0,t-1)]:F}function ot(n,t){return Te(Mr(n),gt(t,0,n.length))}function ft(n){return Te(Mr(n))}function ct(n,t,r){(r===F||hu(n[t],r))&&(r!==F||t in n)||_t(n,t,r);
-}function at(n,t,r){var e=n[t];ci.call(n,t)&&hu(e,r)&&(r!==F||t in n)||_t(n,t,r)}function lt(n,t){for(var r=n.length;r--;)if(hu(n[r][0],t))return r;return-1}function st(n,t,r,e){return oo(n,function(n,u,i){t(e,n,r(n),i)}),e}function ht(n,t){return n&&Tr(t,Lu(t),n)}function pt(n,t){return n&&Tr(t,Uu(t),n)}function _t(n,t,r){"__proto__"==t&&Ei?Ei(n,t,{configurable:true,enumerable:true,value:r,writable:true}):n[t]=r}function vt(n,t){for(var r=-1,e=t.length,u=Hu(e),i=null==n;++r<e;)u[r]=i?F:Wu(n,t[r]);return u;
-}function gt(n,t,r){return n===n&&(r!==F&&(n=n<=r?n:r),t!==F&&(n=n>=t?n:t)),n}function dt(n,t,r,e,i,o){var f,c=1&t,a=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==F)return f;if(!bu(n))return n;if(e=af(n)){if(f=Ee(n),!c)return Mr(n,f)}else{var s=yo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(sf(n))return Wr(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Oe(n),!c)return a?Fr(n,pt(f,n)):$r(n,ht(f,n))}else{if(!Dn[s])return i?n:{};f=Se(n,s,dt,c)}}if(o||(o=new Vn),
-i=o.get(n))return i;o.set(n,f);var a=l?a?ye:de:a?Uu:Lu,p=e?F:a(n);return u(p||n,function(e,u){p&&(u=e,e=n[u]),at(f,u,dt(e,t,r,u,n,o))}),f}function yt(n){var t=Lu(n);return function(r){return bt(r,n,t)}}function bt(n,t,r){var e=r.length;if(null==n)return!e;for(n=ni(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function xt(n,t,r){if(typeof n!="function")throw new ei("Expected a function");return jo(function(){n.apply(F,r)},t)}function jt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length;
-if(!f)return s;r&&(t=l(t,S(r))),e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++u<f;){var p=n[u],_=null==r?p:r(p),p=e||0!==p?p:0;if(o&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function wt(n,t){var r=true;return oo(n,function(n,e,u){return r=!!t(n,e,u)}),r}function mt(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===F?o===o&&!Au(o):r(o,f)))var f=o,c=i}return c}function At(n,t){var r=[];return oo(n,function(n,e,u){
-t(n,e,u)&&r.push(n)}),r}function kt(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Ie),u||(u=[]);++i<o;){var f=n[i];0<t&&r(f)?1<t?kt(f,t-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function Et(n,t){return n&&co(n,t,Lu)}function Ot(n,t){return n&&ao(n,t,Lu)}function St(n,t){return f(t,function(t){return gu(n[t])})}function It(n,t){t=Rr(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[$e(t[r++])];return r&&r==e?n:F}function Rt(n,t,r){return t=t(n),af(n)?t:s(t,r(n))}function zt(n){if(null==n)n=n===F?"[object Undefined]":"[object Null]";else if(ki&&ki in ni(n)){
-var t=ci.call(n,ki),r=n[ki];try{n[ki]=F;var e=true}catch(n){}var u=si.call(n);e&&(t?n[ki]=r:delete n[ki]),n=u}else n=si.call(n);return n}function Wt(n,t){return n>t}function Bt(n,t){return null!=n&&ci.call(n,t)}function Lt(n,t){return null!=n&&t in ni(n)}function Ut(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=Hu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Mi(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_<u&&h.length<s;){var g=p[_],d=t?t(g):g,g=r||0!==g?g:0;
-if(v?!R(v,d):!e(h,d,r)){for(o=i;--o;){var y=f[o];if(y?!R(y,d):!e(n[o],d,r))continue n}v&&v.push(d),h.push(g)}}return h}function Ct(n,t,r){var e={};return Et(n,function(n,u,i){t(e,r(n),u,i)}),e}function Dt(n,t,e){return t=Rr(t,n),n=2>t.length?n:It(n,vr(t,0,-1)),t=null==n?n:n[$e(Ge(t))],null==t?F:r(t,n,e)}function Mt(n){return xu(n)&&"[object Arguments]"==zt(n)}function Tt(n){return xu(n)&&"[object ArrayBuffer]"==zt(n)}function $t(n){return xu(n)&&"[object Date]"==zt(n)}function Ft(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!xu(n)&&!xu(t))t=n!==n&&t!==t;else n:{
-var i=af(n),o=af(t),f=i?"[object Array]":yo(n),c=o?"[object Array]":yo(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)&&sf(n)){if(!sf(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Vn),t=i||gf(n)?_e(n,t,r,e,Ft,u):ve(n,t,f,r,e,Ft,u);else{if(!(1&r)&&(i=a&&ci.call(n,"__wrapped__"),f=o&&ci.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Vn),t=Ft(n,t,r,e,u);break n}if(c)t:if(u||(u=new Vn),
-i=1&r,f=de(n),o=f.length,c=de(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:ci.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(_===F?h!==p&&!Ft(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 Nt(n){return xu(n)&&"[object Map]"==yo(n)}function Pt(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ni(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===F&&!(c in n))return false}else{if(f=new Vn,e)var s=e(a,l,c,n,t,f);if(s===F?!Ft(l,a,3,e,f):!s)return false}}return true}function Zt(n){return!(!bu(n)||li&&li in n)&&(gu(n)?_i:xn).test(Fe(n))}function qt(n){
-return xu(n)&&"[object RegExp]"==zt(n)}function Vt(n){return xu(n)&&"[object Set]"==yo(n)}function Kt(n){return xu(n)&&yu(n.length)&&!!Cn[zt(n)]}function Gt(n){return typeof n=="function"?n:null==n?Nu:typeof n=="object"?af(n)?Xt(n[0],n[1]):Qt(n):Vu(n)}function Ht(n){if(!Le(n))return Ci(n);var t,r=[];for(t in ni(n))ci.call(n,t)&&"constructor"!=t&&r.push(t);return r}function Jt(n,t){return n<t}function Yt(n,t){var r=-1,e=pu(n)?Hu(n.length):[];return oo(n,function(n,u,i){e[++r]=t(n,u,i)}),e}function Qt(n){
-var t=me(n);return 1==t.length&&t[0][2]?Ue(t[0][0],t[0][1]):function(r){return r===n||Pt(r,n,t)}}function Xt(n,t){return We(n)&&t===t&&!bu(t)?Ue($e(n),t):function(r){var e=Wu(r,n);return e===F&&e===t?Bu(r,n):Ft(t,e,3)}}function nr(n,t,r,e,u){n!==t&&co(t,function(i,o){if(bu(i)){u||(u=new Vn);var f=u,c=n[o],a=t[o],l=f.get(a);if(l)ct(n,o,l);else{var l=e?e(c,a,o+"",n,t,f):F,s=l===F;if(s){var h=af(a),p=!h&&sf(a),_=!h&&!p&&gf(a),l=a;h||p||_?af(c)?l=c:_u(c)?l=Mr(c):p?(s=false,l=Wr(a,true)):_?(s=false,l=Lr(a,true)):l=[]:wu(a)||cf(a)?(l=c,
-cf(c)?l=Ru(c):(!bu(c)||r&&gu(c))&&(l=Oe(a))):s=false}s&&(f.set(a,l),nr(l,a,r,e,f),f.delete(a)),ct(n,o,l)}}else f=e?e(n[o],i,o+"",n,t,u):F,f===F&&(f=i),ct(n,o,f)},Uu)}function tr(n,t){var r=n.length;if(r)return t+=0>t?r:0,Re(t,r)?n[t]:F}function rr(n,t,r){var e=-1;return t=l(t.length?t:[Nu],S(je())),n=Yt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(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=Ur(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 er(n,t){return ur(n,t,function(t,r){return Bu(n,r)})}function ur(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=It(n,o);r(f,o)&&pr(i,Rr(o,n),f)}return i}function ir(n){return function(t){return It(t,n)}}function or(n,t,r,e){var u=e?y:d,i=-1,o=t.length,f=n;for(n===t&&(t=Mr(t)),r&&(f=l(n,S(r)));++i<o;)for(var c=0,a=t[i],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==n&&wi.call(f,c,1),wi.call(n,c,1);return n}function fr(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;Re(u)?wi.call(n,u,1):mr(n,u)}}}function cr(n,t){return n+zi(Fi()*(t-n+1))}function ar(n,t){var r="";if(!n||1>t||9007199254740991<t)return r;do t%2&&(r+=n),(t=zi(t/2))&&(n+=n);while(t);return r}function lr(n,t){return wo(Ce(n,t,Nu),n+"")}function sr(n){return tt(Du(n))}function hr(n,t){var r=Du(n);return Te(r,gt(t,0,r.length))}function pr(n,t,r,e){if(!bu(n))return n;t=Rr(t,n);for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=$e(t[u]),a=r;if(u!=o){var l=f[c],a=e?e(l,c,f):F;
-a===F&&(a=bu(l)?l:Re(t[u+1])?[]:{})}at(f,c,a),f=f[c]}return n}function _r(n){return Te(Du(n))}function vr(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=Hu(u);++e<u;)r[e]=n[e+t];return r}function gr(n,t){var r;return oo(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function dr(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&&!Au(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return yr(n,t,Nu,r);
-}function yr(n,t,r,e){t=r(t);for(var u=0,i=null==n?0:n.length,o=t!==t,f=null===t,c=Au(t),a=t===F;u<i;){var l=zi((u+i)/2),s=r(n[l]),h=s!==F,p=null===s,_=s===s,v=Au(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 Mi(i,4294967294)}function br(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||!hu(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function xr(n){return typeof n=="number"?n:Au(n)?P:+n}function jr(n){if(typeof n=="string")return n;
-if(af(n))return l(n,jr)+"";if(Au(n))return uo?uo.call(n):"";var t=n+"";return"0"==t&&1/n==-N?"-0":t}function wr(n,t,r){var e=-1,u=c,i=n.length,o=true,f=[],l=f;if(r)o=false,u=a;else if(200<=i){if(u=t?null:po(n))return D(u);o=false,u=R,l=new qn}else l=t?[]:f;n:for(;++e<i;){var s=n[e],h=t?t(s):s,s=r||0!==s?s:0;if(o&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;t&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function mr(n,t){return t=Rr(t,n),n=2>t.length?n:It(n,vr(t,0,-1)),
-null==n||delete n[$e(Ge(t))]}function Ar(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?vr(n,e?0:i,e?i+1:u):vr(n,e?i+1:0,e?u:i)}function kr(n,t){var r=n;return r instanceof Mn&&(r=r.value()),h(t,function(n,t){return t.func.apply(t.thisArg,s([n],t.args))},r)}function Er(n,t,r){var e=n.length;if(2>e)return e?wr(n[0]):[];for(var u=-1,i=Hu(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=jt(i[u]||o,n[f],t,r));return wr(kt(i,1),t,r)}function Or(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;)r(o,n[e],e<i?t[e]:F);
-return o}function Sr(n){return _u(n)?n:[]}function Ir(n){return typeof n=="function"?n:Nu}function Rr(n,t){return af(n)?n:We(n,t)?[n]:mo(zu(n))}function zr(n,t,r){var e=n.length;return r=r===F?e:r,!t&&r>=e?n:vr(n,t,r)}function Wr(n,t){if(t)return n.slice();var r=n.length,r=yi?yi(r):new n.constructor(r);return n.copy(r),r}function Br(n){var t=new n.constructor(n.byteLength);return new di(t).set(new di(n)),t}function Lr(n,t){return new n.constructor(t?Br(n.buffer):n.buffer,n.byteOffset,n.length)}function Ur(n,t){
-if(n!==t){var r=n!==F,e=null===n,u=n===n,i=Au(n),o=t!==F,f=null===t,c=t===t,a=Au(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 Cr(n,t,r,e){var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Di(i-o,0),l=Hu(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 Dr(n,t,r,e){var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Di(i-f,0),s=Hu(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 Mr(n,t){var r=-1,e=n.length;for(t||(t=Hu(e));++r<e;)t[r]=n[r];return t}function Tr(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):F;c===F&&(c=n[f]),u?_t(r,f,c):at(r,f,c)}return r}function $r(n,t){return Tr(n,vo(n),t)}function Fr(n,t){return Tr(n,go(n),t)}function Nr(n,t){return function(r,u){var i=af(r)?e:st,o=t?t():{};return i(r,n,je(u,2),o);
-}}function Pr(n){return lr(function(t,r){var e=-1,u=r.length,i=1<u?r[u-1]:F,o=2<u?r[2]:F,i=3<n.length&&typeof i=="function"?(u--,i):F;for(o&&ze(r[0],r[1],o)&&(i=3>u?F:i,u=1),t=ni(t);++e<u;)(o=r[e])&&n(t,o,e,i);return t})}function Zr(n,t){return function(r,e){if(null==r)return r;if(!pu(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ni(r);(t?i--:++i<u)&&false!==e(o[i],i,o););return r}}function qr(n){return function(t,r,e){var u=-1,i=ni(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 Vr(n,t,r){function e(){return(this&&this!==Zn&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=1&t,i=Hr(n);return e}function Kr(n){return function(t){t=zu(t);var r=Bn.test(t)?$(t):F,e=r?r[0]:t.charAt(0);return t=r?zr(r,1).join(""):t.slice(1),e[n]()+t}}function Gr(n){return function(t){return h($u(Tu(t).replace(In,"")),n,"")}}function Hr(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=io(n.prototype),t=n.apply(r,t);return bu(t)?t:r}}function Jr(n,t,e){function u(){for(var o=arguments.length,f=Hu(o),c=o,a=xe(u);c--;)f[c]=arguments[c];return c=3>o&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,o<e?fe(n,t,Xr,u.placeholder,F,f,c,F,F,e-o):r(this&&this!==Zn&&this instanceof u?i:n,this,f);
-}var i=Hr(n);return u}function Yr(n){return function(t,r,e){var u=ni(t);if(!pu(t)){var i=je(r,3);t=Lu(t),r=function(n){return i(u[n],n,u)}}return r=n(t,r,e),-1<r?u[i?t[r]:r]:F}}function Qr(n){return ge(function(t){var r=t.length,e=r,u=zn.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if(typeof i!="function")throw new ei("Expected a function");if(u&&!o&&"wrapper"==be(i))var o=new zn([],true)}for(e=o?e:r;++e<r;)var i=t[e],u=be(i),f="wrapper"==u?_o(i):F,o=f&&Be(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[be(f[0])].apply(o,f[3]):1==i.length&&Be(i)?o[u]():o.thru(i);
-return function(){var n=arguments,e=n[0];if(o&&1==n.length&&af(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 Xr(n,t,r,e,u,i,o,f,c,a){function l(){for(var d=arguments.length,y=Hu(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=xe(l),b=y.length;for(x=0;b--;)y[b]===j&&++x}if(e&&(y=Cr(y,e,u,_)),i&&(y=Dr(y,i,o,_)),d-=x,_&&d<a)return j=C(y,j),fe(n,t,Xr,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=Mi(f.length,x),m=Mr(y);w--;){
-var A=f[w];y[w]=Re(A,x)?m[A]:F}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==Zn&&this instanceof l&&(b=g||Hr(b)),b.apply(j,y)}var s=128&t,h=1&t,p=2&t,_=24&t,v=512&t,g=p?F:Hr(n);return l}function ne(n,t){return function(r,e){return Ct(r,n,t(e))}}function te(n,t){return function(r,e){var u;if(r===F&&e===F)return t;if(r!==F&&(u=r),e!==F){if(u===F)return e;typeof r=="string"||typeof e=="string"?(r=jr(r),e=jr(e)):(r=xr(r),e=xr(e)),u=n(r,e)}return u}}function re(n){return ge(function(t){
-return t=l(t,S(je())),lr(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function ee(n,t){t=t===F?" ":jr(t);var r=t.length;return 2>r?r?ar(t,n):t:(r=ar(t,Ri(n/T(t))),Bn.test(t)?zr($(r),0,n).join(""):r.slice(0,n))}function ue(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Hu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++t];return r(h,o?e:this,s)}var o=1&t,f=Hr(n);return i}function ie(n){return function(t,r,e){
-e&&typeof e!="number"&&ze(t,r,e)&&(r=e=F),t=Eu(t),r===F?(r=t,t=0):r=Eu(r),e=e===F?t<r?1:-1:Eu(e);var u=-1;r=Di(Ri((r-t)/(e||1)),0);for(var i=Hu(r);r--;)i[n?r:++u]=t,t+=e;return i}}function oe(n){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=Iu(t),r=Iu(r)),n(t,r)}}function fe(n,t,r,e,u,i,o,f,c,a){var l=8&t,s=l?o:F;o=l?F:o;var h=l?i:F;return i=l?F: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(F,u),Be(n)&&xo(r,u),r.placeholder=e,De(r,n,t)}function ce(n){
-var t=Xu[n];return function(n,r){if(n=Iu(n),r=null==r?0:Mi(Ou(r),292)){var e=(zu(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(zu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function ae(n){return function(t){var r=yo(t);return"[object Map]"==r?L(t):"[object Set]"==r?M(t):O(t,n(t))}}function le(n,t,r,e,u,i,o,f){var c=2&t;if(!c&&typeof n!="function")throw new ei("Expected a function");var a=e?e.length:0;if(a||(t&=-97,e=u=F),o=o===F?o:Di(Ou(o),0),f=f===F?f:Ou(f),a-=u?u.length:0,64&t){
-var l=e,s=u;e=u=F}var h=c?F:_o(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?Cr(e,r,h[4]):r,i[4]=e?C(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Dr(e,r,h[6]):r,i[6]=e?C(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Mi(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]===F?c?0:n.length:Di(i[9]-a,0),!f&&24&t&&(t&=-25),De((h?lo:xo)(t&&1!=t?8==t||16==t?Jr(n,t,f):32!=t&&33!=t||u.length?Xr.apply(F,i):ue(n,t,r,e):Vr(n,t,r),i),n,t)}function se(n,t,r,e){return n===F||hu(n,ii[r])&&!ci.call(e,r)?t:n}function he(n,t,r,e,u,i){return bu(n)&&bu(t)&&(i.set(t,n),nr(n,t,F,he,i),i.delete(t)),n}function pe(n){return wu(n)?F:n}function _e(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 qn:F;
-for(i.set(n,t),i.set(t,n);++c<f;){var s=n[c],h=t[c];if(e)var p=o?e(h,s,c,t,n,i):e(s,h,c,n,t,i);if(p!==F){if(p)continue;a=false;break}if(l){if(!_(t,function(n,t){if(!R(l,t)&&(s===n||u(s,n,r,e,i)))return l.push(t)})){a=false;break}}else if(s!==h&&!u(s,h,r,e,i)){a=false;break}}return i.delete(n),i.delete(t),a}function ve(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 di(n),new di(t)))break;
-return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return hu(+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=L;case"[object Set]":if(f||(f=D),n.size!=t.size&&!(1&e))break;return(r=o.get(n))?r==t:(e|=2,o.set(n,t),t=_e(f(n),f(t),e,u,i,o),o.delete(n),t);case"[object Symbol]":if(eo)return eo.call(n)==eo.call(t)}return false}function ge(n){return wo(Ce(n,F,Ve),n+"")}function de(n){
-return Rt(n,Lu,vo)}function ye(n){return Rt(n,Uu,go)}function be(n){for(var t=n.name+"",r=Ji[t],e=ci.call(Ji,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function xe(n){return(ci.call(On,"placeholder")?On:n).placeholder}function je(){var n=On.iteratee||Pu,n=n===Pu?Gt:n;return arguments.length?n(arguments[0],arguments[1]):n}function we(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 me(n){for(var t=Lu(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,u===u&&!bu(u)]}return t}function Ae(n,t){var r=null==n?F:n[t];return Zt(r)?r:F}function ke(n,t,r){t=Rr(t,n);for(var e=-1,u=t.length,i=false;++e<u;){var o=$e(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&&yu(u)&&Re(o,u)&&(af(n)||cf(n)))}function Ee(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&ci.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Oe(n){
-return typeof n.constructor!="function"||Le(n)?{}:io(bi(n))}function Se(r,e,u,i){var o=r.constructor;switch(e){case"[object ArrayBuffer]":return Br(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object DataView]":return e=i?Br(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.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 Lr(r,i);case"[object Map]":return e=i?u(L(r),1):L(r),h(e,n,new r.constructor);case"[object Number]":case"[object String]":return new o(r);case"[object RegExp]":return e=new r.constructor(r.source,dn.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=i?u(D(r),1):D(r),h(e,t,new r.constructor);case"[object Symbol]":return eo?ni(eo.call(r)):{}}}function Ie(n){return af(n)||cf(n)||!!(mi&&n&&n[mi])}function Re(n,t){return t=null==t?9007199254740991:t,
-!!t&&(typeof n=="number"||wn.test(n))&&-1<n&&0==n%1&&n<t}function ze(n,t,r){if(!bu(r))return false;var e=typeof t;return!!("number"==e?pu(r)&&Re(t,r.length):"string"==e&&t in r)&&hu(r[t],n)}function We(n,t){if(af(n))return false;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!Au(n))||(rn.test(n)||!tn.test(n)||null!=t&&n in ni(t))}function Be(n){var t=be(n),r=On[t];return typeof r=="function"&&t in Mn.prototype&&(n===r||(t=_o(r),!!t&&n===t[0]))}function Le(n){var t=n&&n.constructor;
-return n===(typeof t=="function"&&t.prototype||ii)}function Ue(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==F||n in ni(r)))}}function Ce(n,t,e){return t=Di(t===F?n.length-1:t,0),function(){for(var u=arguments,i=-1,o=Di(u.length-t,0),f=Hu(o);++i<o;)f[i]=u[t+i];for(i=-1,o=Hu(t+1);++i<t;)o[i]=u[i];return o[t]=e(f),r(n,this,o)}}function De(n,t,r){var e=t+"";t=wo;var u,i=Ne;return u=(u=e.match(hn))?u[1].split(pn):[],r=i(u,r),(i=r.length)&&(u=i-1,r[u]=(1<i?"& ":"")+r[u],r=r.join(2<i?", ":" "),
-e=e.replace(sn,"{\n/* [wrapped with "+r+"] */\n")),t(n,e)}function Me(n){var t=0,r=0;return function(){var e=Ti(),u=16-(e-r);if(r=e,0<u){if(800<=++t)return arguments[0]}else t=0;return n.apply(F,arguments)}}function Te(n,t){var r=-1,e=n.length,u=e-1;for(t=t===F?e:t;++r<t;){var e=cr(r,u),i=n[e];n[e]=n[r],n[r]=i}return n.length=t,n}function $e(n){if(typeof n=="string"||Au(n))return n;var t=n+"";return"0"==t&&1/n==-N?"-0":t}function Fe(n){if(null!=n){try{return fi.call(n)}catch(n){}return n+""}return"";
-}function Ne(n,t){return u(Z,function(r){var e="_."+r[0];t&r[1]&&!c(n,e)&&n.push(e)}),n.sort()}function Pe(n){if(n instanceof Mn)return n.clone();var t=new zn(n.__wrapped__,n.__chain__);return t.__actions__=Mr(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Ze(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Ou(r),0>r&&(r=Di(e+r,0)),g(n,je(t,3),r)):-1}function qe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=Ou(r),u=0>r?Di(e+u,0):Mi(u,e-1)),
-g(n,je(t,3),u,true)}function Ve(n){return(null==n?0:n.length)?kt(n,1):[]}function Ke(n){return n&&n.length?n[0]:F}function Ge(n){var t=null==n?0:n.length;return t?n[t-1]:F}function He(n,t){return n&&n.length&&t&&t.length?or(n,t):n}function Je(n){return null==n?n:Ni.call(n)}function Ye(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(_u(n))return t=Di(n.length,t),true}),E(t,function(t){return l(n,j(t))})}function Qe(n,t){if(!n||!n.length)return[];var e=Ye(n);return null==t?e:l(e,function(n){
-return r(t,F,n)})}function Xe(n){return n=On(n),n.__chain__=true,n}function nu(n,t){return t(n)}function tu(){return this}function ru(n,t){return(af(n)?u:oo)(n,je(t,3))}function eu(n,t){return(af(n)?i:fo)(n,je(t,3))}function uu(n,t){return(af(n)?l:Yt)(n,je(t,3))}function iu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,le(n,128,F,F,F,F,t)}function ou(n,t){var r;if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),
-r}}function fu(n,t,r){return t=r?F:t,n=le(n,8,F,F,F,F,F,t),n.placeholder=fu.placeholder,n}function cu(n,t,r){return t=r?F:t,n=le(n,16,F,F,F,F,F,t),n.placeholder=cu.placeholder,n}function au(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Jo();if(u(n))return o(n);var r,e=jo;r=n-_,n=t-(n-p),r=g?Mi(n,l-r):n,h=e(i,r)}function o(n){return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Jo(),r=u(n);if(c=arguments,
-a=this,p=n,r){if(h===F)return _=n=p,h=jo(i,t),v?e(n):s;if(g)return h=jo(i,t),e(p)}return h===F&&(h=jo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ei("Expected a function");return t=Iu(t)||0,bu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Di(Iu(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==F&&ho(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Jo())},f}function lu(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 ei("Expected a function");return r.cache=new(lu.Cache||Pn),r}function su(n){if(typeof n!="function")throw new ei("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 hu(n,t){return n===t||n!==n&&t!==t}function pu(n){return null!=n&&yu(n.length)&&!gu(n);
-}function _u(n){return xu(n)&&pu(n)}function vu(n){if(!xu(n))return false;var t=zt(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!wu(n)}function gu(n){return!!bu(n)&&(n=zt(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function du(n){return typeof n=="number"&&n==Ou(n)}function yu(n){return typeof n=="number"&&-1<n&&0==n%1&&9007199254740991>=n}function bu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t);
-}function xu(n){return null!=n&&typeof n=="object"}function ju(n){return typeof n=="number"||xu(n)&&"[object Number]"==zt(n)}function wu(n){return!(!xu(n)||"[object Object]"!=zt(n))&&(n=bi(n),null===n||(n=ci.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&fi.call(n)==hi))}function mu(n){return typeof n=="string"||!af(n)&&xu(n)&&"[object String]"==zt(n)}function Au(n){return typeof n=="symbol"||xu(n)&&"[object Symbol]"==zt(n)}function ku(n){if(!n)return[];if(pu(n))return mu(n)?$(n):Mr(n);
-if(Ai&&n[Ai]){n=n[Ai]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=yo(n),("[object Map]"==t?L:"[object Set]"==t?D:Du)(n)}function Eu(n){return n?(n=Iu(n),n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Ou(n){n=Eu(n);var t=n%1;return n===n?t?n-t:n:0}function Su(n){return n?gt(Ou(n),0,4294967295):0}function Iu(n){if(typeof n=="number")return n;if(Au(n))return P;if(bu(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=bu(n)?n+"":n),typeof n!="string")return 0===n?n:+n;
-n=n.replace(cn,"");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Ru(n){return Tr(n,Uu(n))}function zu(n){return null==n?"":jr(n)}function Wu(n,t,r){return n=null==n?F:It(n,t),n===F?r:n}function Bu(n,t){return null!=n&&ke(n,t,Lt)}function Lu(n){return pu(n)?Gn(n):Ht(n)}function Uu(n){if(pu(n))n=Gn(n,true);else if(bu(n)){var t,r=Le(n),e=[];for(t in n)("constructor"!=t||!r&&ci.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in ni(n))t.push(r);n=t}return n}function Cu(n,t){
-if(null==n)return{};var r=l(ye(n),function(n){return[n]});return t=je(t),ur(n,r,function(n,r){return t(n,r[0])})}function Du(n){return null==n?[]:I(n,Lu(n))}function Mu(n){return Nf(zu(n).toLowerCase())}function Tu(n){return(n=zu(n))&&n.replace(mn,rt).replace(Rn,"")}function $u(n,t,r){return n=zu(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function Fu(n){return function(){return n}}function Nu(n){return n}function Pu(n){return Gt(typeof n=="function"?n:dt(n,1))}function Zu(n,t,r){
-var e=Lu(t),i=St(t,e);null!=r||bu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=St(t,Lu(t)));var o=!(bu(r)&&"chain"in r&&!r.chain),f=gu(n);return u(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__=Mr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments))})}),n}function qu(){}function Vu(n){return We(n)?j($e(n)):ir(n)}function Ku(){return[]}function Gu(){
-return false}En=null==En?Zn:it.defaults(Zn.Object(),En,it.pick(Zn,Un));var Hu=En.Array,Ju=En.Date,Yu=En.Error,Qu=En.Function,Xu=En.Math,ni=En.Object,ti=En.RegExp,ri=En.String,ei=En.TypeError,ui=Hu.prototype,ii=ni.prototype,oi=En["__core-js_shared__"],fi=Qu.prototype.toString,ci=ii.hasOwnProperty,ai=0,li=function(){var n=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),si=ii.toString,hi=fi.call(ni),pi=Zn._,_i=ti("^"+fi.call(ci).replace(on,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=Kn?En.Buffer:F,gi=En.Symbol,di=En.Uint8Array,yi=vi?vi.f:F,bi=U(ni.getPrototypeOf,ni),xi=ni.create,ji=ii.propertyIsEnumerable,wi=ui.splice,mi=gi?gi.isConcatSpreadable:F,Ai=gi?gi.iterator:F,ki=gi?gi.toStringTag:F,Ei=function(){
-try{var n=Ae(ni,"defineProperty");return n({},"",{}),n}catch(n){}}(),Oi=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Si=Ju&&Ju.now!==Zn.Date.now&&Ju.now,Ii=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ri=Xu.ceil,zi=Xu.floor,Wi=ni.getOwnPropertySymbols,Bi=vi?vi.isBuffer:F,Li=En.isFinite,Ui=ui.join,Ci=U(ni.keys,ni),Di=Xu.max,Mi=Xu.min,Ti=Ju.now,$i=En.parseInt,Fi=Xu.random,Ni=ui.reverse,Pi=Ae(En,"DataView"),Zi=Ae(En,"Map"),qi=Ae(En,"Promise"),Vi=Ae(En,"Set"),Ki=Ae(En,"WeakMap"),Gi=Ae(ni,"create"),Hi=Ki&&new Ki,Ji={},Yi=Fe(Pi),Qi=Fe(Zi),Xi=Fe(qi),no=Fe(Vi),to=Fe(Ki),ro=gi?gi.prototype:F,eo=ro?ro.valueOf:F,uo=ro?ro.toString:F,io=function(){
-function n(){}return function(t){return bu(t)?xi?xi(t):(n.prototype=t,t=new n,n.prototype=F,t):{}}}();On.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:"",imports:{_:On}},On.prototype=Sn.prototype,On.prototype.constructor=On,zn.prototype=io(Sn.prototype),zn.prototype.constructor=zn,Mn.prototype=io(Sn.prototype),Mn.prototype.constructor=Mn,Tn.prototype.clear=function(){this.__data__=Gi?Gi(null):{},this.size=0},Tn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],
-this.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Gi?(n=t[n],"__lodash_hash_undefined__"===n?F:n):ci.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Gi?t[n]!==F:ci.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Gi&&t===F?"__lodash_hash_undefined__":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=lt(t,n),!(0>n)&&(n==t.length-1?t.pop():wi.call(t,n,1),
---this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=lt(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1<lt(this.__data__,n)},Nn.prototype.set=function(n,t){var r=this.__data__,e=lt(r,n);return 0>e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new(Zi||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=we(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return we(this,n).get(n);
-},Pn.prototype.has=function(n){return we(this,n).has(n)},Pn.prototype.set=function(n,t){var r=we(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){
-return this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!Zi||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var oo=Zr(Et),fo=Zr(Ot,true),co=qr(),ao=qr(true),lo=Hi?function(n,t){return Hi.set(n,t),n}:Nu,so=Ei?function(n,t){return Ei(n,"toString",{configurable:true,enumerable:false,value:Fu(t),writable:true})}:Nu,ho=Oi||function(n){
-return Zn.clearTimeout(n)},po=Vi&&1/D(new Vi([,-0]))[1]==N?function(n){return new Vi(n)}:qu,_o=Hi?function(n){return Hi.get(n)}:qu,vo=Wi?function(n){return null==n?[]:(n=ni(n),f(Wi(n),function(t){return ji.call(n,t)}))}:Ku,go=Wi?function(n){for(var t=[];n;)s(t,vo(n)),n=bi(n);return t}:Ku,yo=zt;(Pi&&"[object DataView]"!=yo(new Pi(new ArrayBuffer(1)))||Zi&&"[object Map]"!=yo(new Zi)||qi&&"[object Promise]"!=yo(qi.resolve())||Vi&&"[object Set]"!=yo(new Vi)||Ki&&"[object WeakMap]"!=yo(new Ki))&&(yo=function(n){
-var t=zt(n);if(n=(n="[object Object]"==t?n.constructor:F)?Fe(n):"")switch(n){case Yi:return"[object DataView]";case Qi:return"[object Map]";case Xi:return"[object Promise]";case no:return"[object Set]";case to:return"[object WeakMap]"}return t});var bo=oi?gu:Gu,xo=Me(lo),jo=Ii||function(n,t){return Zn.setTimeout(n,t)},wo=Me(so),mo=function(n){n=lu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return en.test(n)&&t.push(""),n.replace(un,function(n,r,e,u){
-t.push(e?u.replace(vn,"$1"):r||n)}),t}),Ao=lr(function(n,t){return _u(n)?jt(n,kt(t,1,_u,true)):[]}),ko=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),je(r,2)):[]}),Eo=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),F,r):[]}),Oo=lr(function(n){var t=l(n,Sr);return t.length&&t[0]===n[0]?Ut(t):[]}),So=lr(function(n){var t=Ge(n),r=l(n,Sr);return t===Ge(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ut(r,je(t,2)):[]}),Io=lr(function(n){var t=Ge(n),r=l(n,Sr);return(t=typeof t=="function"?t:F)&&r.pop(),
-r.length&&r[0]===n[0]?Ut(r,F,t):[]}),Ro=lr(He),zo=ge(function(n,t){var r=null==n?0:n.length,e=vt(n,t);return fr(n,l(t,function(n){return Re(n,r)?+n:n}).sort(Ur)),e}),Wo=lr(function(n){return wr(kt(n,1,_u,true))}),Bo=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),wr(kt(n,1,_u,true),je(t,2))}),Lo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return wr(kt(n,1,_u,true),F,t)}),Uo=lr(function(n,t){return _u(n)?jt(n,t):[]}),Co=lr(function(n){return Er(f(n,_u))}),Do=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),
-Er(f(n,_u),je(t,2))}),Mo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return Er(f(n,_u),F,t)}),To=lr(Ye),$o=lr(function(n){var t=n.length,t=1<t?n[t-1]:F,t=typeof t=="function"?(n.pop(),t):F;return Qe(n,t)}),Fo=ge(function(n){function t(t){return vt(t,n)}var r=n.length,e=r?n[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof Mn&&Re(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(u,this.__chain__).thru(function(n){return r&&!n.length&&n.push(F),
-n})):this.thru(t)}),No=Nr(function(n,t,r){ci.call(n,r)?++n[r]:_t(n,r,1)}),Po=Yr(Ze),Zo=Yr(qe),qo=Nr(function(n,t,r){ci.call(n,r)?n[r].push(t):_t(n,r,[t])}),Vo=lr(function(n,t,e){var u=-1,i=typeof t=="function",o=pu(n)?Hu(n.length):[];return oo(n,function(n){o[++u]=i?r(t,n,e):Dt(n,t,e)}),o}),Ko=Nr(function(n,t,r){_t(n,r,t)}),Go=Nr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Ho=lr(function(n,t){if(null==n)return[];var r=t.length;return 1<r&&ze(n,t[0],t[1])?t=[]:2<r&&ze(t[0],t[1],t[2])&&(t=[t[0]]),
-rr(n,kt(t,1),[])}),Jo=Si||function(){return Zn.Date.now()},Yo=lr(function(n,t,r){var e=1;if(r.length)var u=C(r,xe(Yo)),e=32|e;return le(n,e,t,r,u)}),Qo=lr(function(n,t,r){var e=3;if(r.length)var u=C(r,xe(Qo)),e=32|e;return le(t,e,n,r,u)}),Xo=lr(function(n,t){return xt(n,1,t)}),nf=lr(function(n,t,r){return xt(n,Iu(t)||0,r)});lu.Cache=Pn;var tf=lr(function(n,t){t=1==t.length&&af(t[0])?l(t[0],S(je())):l(kt(t,1),S(je()));var e=t.length;return lr(function(u){for(var i=-1,o=Mi(u.length,e);++i<o;)u[i]=t[i].call(this,u[i]);
-return r(n,this,u)})}),rf=lr(function(n,t){return le(n,32,F,t,C(t,xe(rf)))}),ef=lr(function(n,t){return le(n,64,F,t,C(t,xe(ef)))}),uf=ge(function(n,t){return le(n,256,F,F,F,t)}),of=oe(Wt),ff=oe(function(n,t){return n>=t}),cf=Mt(function(){return arguments}())?Mt:function(n){return xu(n)&&ci.call(n,"callee")&&!ji.call(n,"callee")},af=Hu.isArray,lf=Hn?S(Hn):Tt,sf=Bi||Gu,hf=Jn?S(Jn):$t,pf=Yn?S(Yn):Nt,_f=Qn?S(Qn):qt,vf=Xn?S(Xn):Vt,gf=nt?S(nt):Kt,df=oe(Jt),yf=oe(function(n,t){return n<=t}),bf=Pr(function(n,t){
-if(Le(t)||pu(t))Tr(t,Lu(t),n);else for(var r in t)ci.call(t,r)&&at(n,r,t[r])}),xf=Pr(function(n,t){Tr(t,Uu(t),n)}),jf=Pr(function(n,t,r,e){Tr(t,Uu(t),n,e)}),wf=Pr(function(n,t,r,e){Tr(t,Lu(t),n,e)}),mf=ge(vt),Af=lr(function(n){return n.push(F,se),r(jf,F,n)}),kf=lr(function(n){return n.push(F,he),r(Rf,F,n)}),Ef=ne(function(n,t,r){n[t]=r},Fu(Nu)),Of=ne(function(n,t,r){ci.call(n,t)?n[t].push(r):n[t]=[r]},je),Sf=lr(Dt),If=Pr(function(n,t,r){nr(n,t,r)}),Rf=Pr(function(n,t,r,e){nr(n,t,r,e)}),zf=ge(function(n,t){
-var r={};if(null==n)return r;var e=false;t=l(t,function(t){return t=Rr(t,n),e||(e=1<t.length),t}),Tr(n,ye(n),r),e&&(r=dt(r,7,pe));for(var u=t.length;u--;)mr(r,t[u]);return r}),Wf=ge(function(n,t){return null==n?{}:er(n,t)}),Bf=ae(Lu),Lf=ae(Uu),Uf=Gr(function(n,t,r){return t=t.toLowerCase(),n+(r?Mu(t):t)}),Cf=Gr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Df=Gr(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Mf=Kr("toLowerCase"),Tf=Gr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase();
-}),$f=Gr(function(n,t,r){return n+(r?" ":"")+Nf(t)}),Ff=Gr(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Nf=Kr("toUpperCase"),Pf=lr(function(n,t){try{return r(n,F,t)}catch(n){return vu(n)?n:new Yu(n)}}),Zf=ge(function(n,t){return u(t,function(t){t=$e(t),_t(n,t,Yo(n[t],n))}),n}),qf=Qr(),Vf=Qr(true),Kf=lr(function(n,t){return function(r){return Dt(r,n,t)}}),Gf=lr(function(n,t){return function(r){return Dt(n,r,t)}}),Hf=re(l),Jf=re(o),Yf=re(_),Qf=ie(),Xf=ie(true),nc=te(function(n,t){return n+t},0),tc=ce("ceil"),rc=te(function(n,t){
-return n/t},1),ec=ce("floor"),uc=te(function(n,t){return n*t},1),ic=ce("round"),oc=te(function(n,t){return n-t},0);return On.after=function(n,t){if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){if(1>--n)return t.apply(this,arguments)}},On.ary=iu,On.assign=bf,On.assignIn=xf,On.assignInWith=jf,On.assignWith=wf,On.at=mf,On.before=ou,On.bind=Yo,On.bindAll=Zf,On.bindKey=Qo,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return af(n)?n:[n]},
-On.chain=Xe,On.chunk=function(n,t,r){if(t=(r?ze(n,t,r):t===F)?1:Di(Ou(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Hu(Ri(r/t));e<r;)i[u++]=vr(n,e,e+=t);return i},On.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},On.concat=function(){var n=arguments.length;if(!n)return[];for(var t=Hu(n-1),r=arguments[0];n--;)t[n-1]=arguments[n];return s(af(r)?Mr(r):[r],kt(t,1))},On.cond=function(n){var t=null==n?0:n.length,e=je();return n=t?l(n,function(n){
-if("function"!=typeof n[1])throw new ei("Expected a function");return[e(n[0]),n[1]]}):[],lr(function(e){for(var u=-1;++u<t;){var i=n[u];if(r(i[0],this,e))return r(i[1],this,e)}})},On.conforms=function(n){return yt(dt(n,1))},On.constant=Fu,On.countBy=No,On.create=function(n,t){var r=io(n);return null==t?r:ht(r,t)},On.curry=fu,On.curryRight=cu,On.debounce=au,On.defaults=Af,On.defaultsDeep=kf,On.defer=Xo,On.delay=nf,On.difference=Ao,On.differenceBy=ko,On.differenceWith=Eo,On.drop=function(n,t,r){var e=null==n?0:n.length;
-return e?(t=r||t===F?1:Ou(t),vr(n,0>t?0:t,e)):[]},On.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true,true):[]},On.dropWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&ze(n,t,r)&&(r=0,e=u),u=n.length,r=Ou(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:Ou(e),0>e&&(e+=u),e=r>e?0:Su(e);r<e;)n[r++]=t;
-return n},On.filter=function(n,t){return(af(n)?f:At)(n,je(t,3))},On.flatMap=function(n,t){return kt(uu(n,t),1)},On.flatMapDeep=function(n,t){return kt(uu(n,t),N)},On.flatMapDepth=function(n,t,r){return r=r===F?1:Ou(r),kt(uu(n,t),r)},On.flatten=Ve,On.flattenDeep=function(n){return(null==n?0:n.length)?kt(n,N):[]},On.flattenDepth=function(n,t){return null!=n&&n.length?(t=t===F?1:Ou(t),kt(n,t)):[]},On.flip=function(n){return le(n,512)},On.flow=qf,On.flowRight=Vf,On.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},On.functions=function(n){return null==n?[]:St(n,Lu(n))},On.functionsIn=function(n){return null==n?[]:St(n,Uu(n))},On.groupBy=qo,On.initial=function(n){return(null==n?0:n.length)?vr(n,0,-1):[]},On.intersection=Oo,On.intersectionBy=So,On.intersectionWith=Io,On.invert=Ef,On.invertBy=Of,On.invokeMap=Vo,On.iteratee=Pu,On.keyBy=Ko,On.keys=Lu,On.keysIn=Uu,On.map=uu,On.mapKeys=function(n,t){var r={};return t=je(t,3),Et(n,function(n,e,u){_t(r,t(n,e,u),n)}),r},On.mapValues=function(n,t){
-var r={};return t=je(t,3),Et(n,function(n,e,u){_t(r,e,t(n,e,u))}),r},On.matches=function(n){return Qt(dt(n,1))},On.matchesProperty=function(n,t){return Xt(n,dt(t,1))},On.memoize=lu,On.merge=If,On.mergeWith=Rf,On.method=Kf,On.methodOf=Gf,On.mixin=Zu,On.negate=su,On.nthArg=function(n){return n=Ou(n),lr(function(t){return tr(t,n)})},On.omit=zf,On.omitBy=function(n,t){return Cu(n,su(je(t)))},On.once=function(n){return ou(2,n)},On.orderBy=function(n,t,r,e){return null==n?[]:(af(t)||(t=null==t?[]:[t]),
-r=e?F:r,af(r)||(r=null==r?[]:[r]),rr(n,t,r))},On.over=Hf,On.overArgs=tf,On.overEvery=Jf,On.overSome=Yf,On.partial=rf,On.partialRight=ef,On.partition=Go,On.pick=Wf,On.pickBy=Cu,On.property=Vu,On.propertyOf=function(n){return function(t){return null==n?F:It(n,t)}},On.pull=Ro,On.pullAll=He,On.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?or(n,t,je(r,2)):n},On.pullAllWith=function(n,t,r){return n&&n.length&&t&&t.length?or(n,t,F,r):n},On.pullAt=zo,On.range=Qf,On.rangeRight=Xf,On.rearg=uf,On.reject=function(n,t){
-return(af(n)?f:At)(n,su(je(t,3)))},On.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=je(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return fr(n,u),r},On.rest=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=t===F?t:Ou(t),lr(n,t)},On.reverse=Je,On.sampleSize=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),(af(n)?ot:hr)(n,t)},On.set=function(n,t,r){return null==n?n:pr(n,t,r)},On.setWith=function(n,t,r,e){return e=typeof e=="function"?e:F,
-null==n?n:pr(n,t,r,e)},On.shuffle=function(n){return(af(n)?ft:_r)(n)},On.slice=function(n,t,r){var e=null==n?0:n.length;return e?(r&&typeof r!="number"&&ze(n,t,r)?(t=0,r=e):(t=null==t?0:Ou(t),r=r===F?e:Ou(r)),vr(n,t,r)):[]},On.sortBy=Ho,On.sortedUniq=function(n){return n&&n.length?br(n):[]},On.sortedUniqBy=function(n,t){return n&&n.length?br(n,je(t,2)):[]},On.split=function(n,t,r){return r&&typeof r!="number"&&ze(n,t,r)&&(t=r=F),r=r===F?4294967295:r>>>0,r?(n=zu(n))&&(typeof t=="string"||null!=t&&!_f(t))&&(t=jr(t),
-!t&&Bn.test(n))?zr($(n),0,r):n.split(t,r):[]},On.spread=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=null==t?0:Di(Ou(t),0),lr(function(e){var u=e[t];return e=zr(e,0,t),u&&s(e,u),r(n,this,e)})},On.tail=function(n){var t=null==n?0:n.length;return t?vr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:Ou(t),vr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){
-return n&&n.length?Ar(n,je(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?Ar(n,je(t,3)):[]},On.tap=function(n,t){return t(n),n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ei("Expected a function");return bu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),au(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=nu,On.toArray=ku,On.toPairs=Bf,On.toPairsIn=Lf,On.toPath=function(n){return af(n)?l(n,$e):Au(n)?[n]:Mr(mo(zu(n)))},On.toPlainObject=Ru,
-On.transform=function(n,t,r){var e=af(n),i=e||sf(n)||gf(n);if(t=je(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:bu(n)&&gu(o)?io(bi(n)):{}}return(i?u:Et)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return iu(n,1)},On.union=Wo,On.unionBy=Bo,On.unionWith=Lo,On.uniq=function(n){return n&&n.length?wr(n):[]},On.uniqBy=function(n,t){return n&&n.length?wr(n,je(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t=="function"?t:F,n&&n.length?wr(n,F,t):[]},On.unset=function(n,t){return null==n||mr(n,t);
-},On.unzip=Ye,On.unzipWith=Qe,On.update=function(n,t,r){return null==n?n:pr(n,t,Ir(r)(It(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e=="function"?e:F,null!=n&&(n=pr(n,t,Ir(r)(It(n,t)),e)),n},On.values=Du,On.valuesIn=function(n){return null==n?[]:I(n,Uu(n))},On.without=Uo,On.words=$u,On.wrap=function(n,t){return rf(Ir(t),n)},On.xor=Co,On.xorBy=Do,On.xorWith=Mo,On.zip=To,On.zipObject=function(n,t){return Or(n||[],t||[],at)},On.zipObjectDeep=function(n,t){return Or(n||[],t||[],pr);
-},On.zipWith=$o,On.entries=Bf,On.entriesIn=Lf,On.extend=xf,On.extendWith=jf,Zu(On,On),On.add=nc,On.attempt=Pf,On.camelCase=Uf,On.capitalize=Mu,On.ceil=tc,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=Iu(r),r=r===r?r:0),t!==F&&(t=Iu(t),t=t===t?t:0),gt(Iu(n),t,r)},On.clone=function(n){return dt(n,4)},On.cloneDeep=function(n){return dt(n,5)},On.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,5,t)},On.cloneWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,4,t)},
-On.conformsTo=function(n,t){return null==t||bt(n,t,Lu(t))},On.deburr=Tu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=rc,On.endsWith=function(n,t,r){n=zu(n),t=jr(t);var e=n.length,e=r=r===F?e:gt(Ou(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=hu,On.escape=function(n){return(n=zu(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=zu(n))&&fn.test(n)?n.replace(on,"\\$&"):n},On.every=function(n,t,r){var e=af(n)?o:wt;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3));
-},On.find=Po,On.findIndex=Ze,On.findKey=function(n,t){return v(n,je(t,3),Et)},On.findLast=Zo,On.findLastIndex=qe,On.findLastKey=function(n,t){return v(n,je(t,3),Ot)},On.floor=ec,On.forEach=ru,On.forEachRight=eu,On.forIn=function(n,t){return null==n?n:co(n,je(t,3),Uu)},On.forInRight=function(n,t){return null==n?n:ao(n,je(t,3),Uu)},On.forOwn=function(n,t){return n&&Et(n,je(t,3))},On.forOwnRight=function(n,t){return n&&Ot(n,je(t,3))},On.get=Wu,On.gt=of,On.gte=ff,On.has=function(n,t){return null!=n&&ke(n,t,Bt);
-},On.hasIn=Bu,On.head=Ke,On.identity=Nu,On.includes=function(n,t,r,e){return n=pu(n)?n:Du(n),r=r&&!e?Ou(r):0,e=n.length,0>r&&(r=Di(e+r,0)),mu(n)?r<=e&&-1<n.indexOf(t,r):!!e&&-1<d(n,t,r)},On.indexOf=function(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Ou(r),0>r&&(r=Di(e+r,0)),d(n,t,r)):-1},On.inRange=function(n,t,r){return t=Eu(t),r===F?(r=t,t=0):r=Eu(r),n=Iu(n),n>=Mi(t,r)&&n<Di(t,r)},On.invoke=Sf,On.isArguments=cf,On.isArray=af,On.isArrayBuffer=lf,On.isArrayLike=pu,On.isArrayLikeObject=_u,
-On.isBoolean=function(n){return true===n||false===n||xu(n)&&"[object Boolean]"==zt(n)},On.isBuffer=sf,On.isDate=hf,On.isElement=function(n){return xu(n)&&1===n.nodeType&&!wu(n)},On.isEmpty=function(n){if(null==n)return true;if(pu(n)&&(af(n)||typeof n=="string"||typeof n.splice=="function"||sf(n)||gf(n)||cf(n)))return!n.length;var t=yo(n);if("[object Map]"==t||"[object Set]"==t)return!n.size;if(Le(n))return!Ht(n).length;for(var r in n)if(ci.call(n,r))return false;return true},On.isEqual=function(n,t){return Ft(n,t);
-},On.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:F)?r(n,t):F;return e===F?Ft(n,t,F,r):!!e},On.isError=vu,On.isFinite=function(n){return typeof n=="number"&&Li(n)},On.isFunction=gu,On.isInteger=du,On.isLength=yu,On.isMap=pf,On.isMatch=function(n,t){return n===t||Pt(n,t,me(t))},On.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:F,Pt(n,t,me(t),r)},On.isNaN=function(n){return ju(n)&&n!=+n},On.isNative=function(n){if(bo(n))throw new Yu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
-return Zt(n)},On.isNil=function(n){return null==n},On.isNull=function(n){return null===n},On.isNumber=ju,On.isObject=bu,On.isObjectLike=xu,On.isPlainObject=wu,On.isRegExp=_f,On.isSafeInteger=function(n){return du(n)&&-9007199254740991<=n&&9007199254740991>=n},On.isSet=vf,On.isString=mu,On.isSymbol=Au,On.isTypedArray=gf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return xu(n)&&"[object WeakMap]"==yo(n)},On.isWeakSet=function(n){return xu(n)&&"[object WeakSet]"==zt(n)},On.join=function(n,t){
-return null==n?"":Ui.call(n,t)},On.kebabCase=Cf,On.last=Ge,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=Ou(r),u=0>u?Di(e+u,0):Mi(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Df,On.lowerFirst=Mf,On.lt=df,On.lte=yf,On.max=function(n){return n&&n.length?mt(n,Nu,Wt):F},On.maxBy=function(n,t){return n&&n.length?mt(n,je(t,2),Wt):F},On.mean=function(n){return x(n,Nu)},On.meanBy=function(n,t){return x(n,je(t,2))},On.min=function(n){
-return n&&n.length?mt(n,Nu,Jt):F},On.minBy=function(n,t){return n&&n.length?mt(n,je(t,2),Jt):F},On.stubArray=Ku,On.stubFalse=Gu,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return true},On.multiply=uc,On.nth=function(n,t){return n&&n.length?tr(n,Ou(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=pi),this},On.noop=qu,On.now=Jo,On.pad=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,ee(zi(t),r)+n+ee(Ri(t),r))},On.padEnd=function(n,t,r){
-n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&e<t?n+ee(t-e,r):n},On.padStart=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&e<t?ee(t-e,r)+n:n},On.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),$i(zu(n).replace(an,""),t||0)},On.random=function(n,t,r){if(r&&typeof r!="boolean"&&ze(n,t,r)&&(t=r=F),r===F&&(typeof t=="boolean"?(r=t,t=F):typeof n=="boolean"&&(r=n,n=F)),n===F&&t===F?(n=0,t=1):(n=Eu(n),t===F?(t=n,n=0):t=Eu(t)),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Fi(),Mi(n+r*(t-n+$n("1e-"+((r+"").length-1))),t)):cr(n,t);
-},On.reduce=function(n,t,r){var e=af(n)?h:m,u=3>arguments.length;return e(n,je(t,4),r,u,oo)},On.reduceRight=function(n,t,r){var e=af(n)?p:m,u=3>arguments.length;return e(n,je(t,4),r,u,fo)},On.repeat=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),ar(zu(n),t)},On.replace=function(){var n=arguments,t=zu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=Rr(t,n);var e=-1,u=t.length;for(u||(u=1,n=F);++e<u;){var i=null==n?F:n[$e(t[e])];i===F&&(e=u,i=r),n=gu(i)?i.call(n):i;
-}return n},On.round=ic,On.runInContext=w,On.sample=function(n){return(af(n)?tt:sr)(n)},On.size=function(n){if(null==n)return 0;if(pu(n))return mu(n)?T(n):n.length;var t=yo(n);return"[object Map]"==t||"[object Set]"==t?n.size:Ht(n).length},On.snakeCase=Tf,On.some=function(n,t,r){var e=af(n)?_:gr;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3))},On.sortedIndex=function(n,t){return dr(n,t)},On.sortedIndexBy=function(n,t,r){return yr(n,t,je(r,2))},On.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){
-var e=dr(n,t);if(e<r&&hu(n[e],t))return e}return-1},On.sortedLastIndex=function(n,t){return dr(n,t,true)},On.sortedLastIndexBy=function(n,t,r){return yr(n,t,je(r,2),true)},On.sortedLastIndexOf=function(n,t){if(null==n?0:n.length){var r=dr(n,t,true)-1;if(hu(n[r],t))return r}return-1},On.startCase=$f,On.startsWith=function(n,t,r){return n=zu(n),r=null==r?0:gt(Ou(r),0,n.length),t=jr(t),n.slice(r,r+t.length)==t},On.subtract=oc,On.sum=function(n){return n&&n.length?k(n,Nu):0},On.sumBy=function(n,t){return n&&n.length?k(n,je(t,2)):0;
-},On.template=function(n,t,r){var e=On.templateSettings;r&&ze(n,t,r)&&(t=F),n=zu(n),t=jf({},t,e,se),r=jf({},t.imports,e.imports,se);var u,i,o=Lu(r),f=I(r,o),c=0;r=t.interpolate||An;var a="__p+='";r=ti((t.escape||An).source+"|"+r.source+"|"+(r===nn?gn:An).source+"|"+(t.evaluate||An).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,o,f,l){return e||(e=o),a+=n.slice(c,l).replace(kn,B),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=t.variable)||(a="with(obj){"+a+"}"),a=(i?a.replace(q,""):a).replace(V,"$1").replace(K,"$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=Pf(function(){return Qu(o,l+"return "+a).apply(F,f)}),t.source=a,vu(t))throw t;return t},On.times=function(n,t){if(n=Ou(n),1>n||9007199254740991<n)return[];
-var r=4294967295,e=Mi(n,4294967295);for(t=je(t),n-=4294967295,e=E(e,t);++r<n;)t(r);return e},On.toFinite=Eu,On.toInteger=Ou,On.toLength=Su,On.toLower=function(n){return zu(n).toLowerCase()},On.toNumber=Iu,On.toSafeInteger=function(n){return n?gt(Ou(n),-9007199254740991,9007199254740991):0===n?n:0},On.toString=zu,On.toUpper=function(n){return zu(n).toUpperCase()},On.trim=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(cn,""):n&&(t=jr(t))?(n=$(n),r=$(t),t=z(n,r),r=W(n,r)+1,zr(n,t,r).join("")):n;
-},On.trimEnd=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(ln,""):n&&(t=jr(t))?(n=$(n),t=W(n,$(t))+1,zr(n,0,t).join("")):n},On.trimStart=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(an,""):n&&(t=jr(t))?(n=$(n),t=z(n,$(t)),zr(n,t).join("")):n},On.truncate=function(n,t){var r=30,e="...";if(bu(t))var u="separator"in t?t.separator:u,r="length"in t?Ou(t.length):r,e="omission"in t?jr(t.omission):e;n=zu(n);var i=n.length;if(Bn.test(n))var o=$(n),i=o.length;if(r>=i)return n;if(i=r-T(e),1>i)return e;
-if(r=o?zr(o,0,i).join(""):n.slice(0,i),u===F)return r+e;if(o&&(i+=r.length-i),_f(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=ti(u.source,zu(dn.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(jr(u),i)!=i&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},On.unescape=function(n){return(n=zu(n))&&J.test(n)?n.replace(G,ut):n},On.uniqueId=function(n){var t=++ai;return zu(n)+t},On.upperCase=Ff,On.upperFirst=Nf,On.each=ru,On.eachRight=eu,On.first=Ke,
-Zu(On,function(){var n={};return Et(On,function(t,r){ci.call(On.prototype,r)||(n[r]=t)}),n}(),{chain:false}),On.VERSION="4.17.4",u("bind bindKey curry curryRight partial partialRight".split(" "),function(n){On[n].placeholder=On}),u(["drop","take"],function(n,t){Mn.prototype[n]=function(r){r=r===F?1:Di(Ou(r),0);var e=this.__filtered__&&!t?new Mn(this):this.clone();return e.__filtered__?e.__takeCount__=Mi(r,e.__takeCount__):e.__views__.push({size:Mi(r,4294967295),type:n+(0>e.__dir__?"Right":"")}),e},Mn.prototype[n+"Right"]=function(t){
-return this.reverse()[n](t).reverse()}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:je(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1);
-}}),Mn.prototype.compact=function(){return this.filter(Nu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=lr(function(n,t){return typeof n=="function"?new Mn(this):this.map(function(r){return Dt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(su(je(n)))},Mn.prototype.slice=function(n,t){n=Ou(n);var r=this;return r.__filtered__&&(0<n||0>t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),
-t!==F&&(t=Ou(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Et(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||af(o);
-l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=ui[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){
-var u=this.value();return t.apply(af(u)?u:[],n)}return this[r](function(r){return t.apply(af(r)?r:[],n)})}}),Et(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+"";(Ji[e]||(Ji[e]=[])).push({name:t,func:r})}}),Ji[Xr(F,2).name]=[{name:"wrapper",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Mr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Mr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Mr(this.__views__),
-n},Mn.prototype.reverse=function(){if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=af(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=Mi(n,f+s);break;case"takeRight":f=Di(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=Mi(n,this.__takeCount__),!e||!u&&i==n&&l==n)return kr(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},On.prototype.at=Fo,On.prototype.chain=function(){return Xe(this)},On.prototype.commit=function(){return new zn(this.value(),this.__chain__)},On.prototype.next=function(){this.__values__===F&&(this.__values__=ku(this.value()));
-var n=this.__index__>=this.__values__.length;return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Pe(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:nu,args:[Je],thisArg:F}),new zn(n,this.__chain__)):this.thru(Je);
-},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return kr(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Ai&&(On.prototype[Ai]=tu),On}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=it, define(function(){return it})):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this); \ No newline at end of file
+;(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 k(n,t){return c(t,function(t){return[t,n[t]]})}function E(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"\\"+Ln[n]}function W(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n];
+}),r}function U(n,t){return function(r){return n(t(r))}}function B(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 L(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,kn="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",En=RegExp("['\u2019]","g"),Sn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),On=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+kn+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(" "),Un={};
+Un["[object Float32Array]"]=Un["[object Float64Array]"]=Un["[object Int8Array]"]=Un["[object Int16Array]"]=Un["[object Int32Array]"]=Un["[object Uint8Array]"]=Un["[object Uint8ClampedArray]"]=Un["[object Uint16Array]"]=Un["[object Uint32Array]"]=true,Un["[object Arguments]"]=Un["[object Array]"]=Un["[object ArrayBuffer]"]=Un["[object Boolean]"]=Un["[object DataView]"]=Un["[object Date]"]=Un["[object Error]"]=Un["[object Function]"]=Un["[object Map]"]=Un["[object Number]"]=Un["[object Object]"]=Un["[object RegExp]"]=Un["[object Set]"]=Un["[object String]"]=Un["[object WeakMap]"]=false;
+var Bn={};Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object DataView]"]=Bn["[object Boolean]"]=Bn["[object Date]"]=Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object Symbol]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true,
+Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object WeakMap]"]=false;var Ln={"\\":"\\","'":"'","\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.require&&Nn.require("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 Ln)){if(n instanceof On)return n;if(oi.call(n,"__wrapped__"))return Fe(n)}return new On(n)}function kn(){}function On(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=T}function Ln(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(Lr(n),pt(t,0,n.length))}function ut(n){return De(Lr(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,Uu(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 Lr(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(!Bn[s])return i?n:{};f=ke(n,s,c)}}if(o||(o=new Zn),
+i=o.get(n))return i;if(o.set(n,f),pf(n))return n.forEach(function(r){f.add(_t(r,t,e,r,n,o))}),f;if(sf(n))return n.forEach(function(r,u){f.set(u,_t(r,t,e,u,n,o))}),f;var a=l?a?ve:_e:a?Uu: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,E(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=Ee),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 kt(n,t){return i(t,function(t){return _u(n[t])})}function Et(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)return n===T?"[object Undefined]":"[object Null]";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,E(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 Ut(n,t,r,e){return mt(n,function(n,u,i){t(e,r(n),u,i)}),e}function Bt(t,r,e){return r=Sr(r,t),t=2>r.length?t:Et(t,hr(r,0,-1)),r=null==t?t:t[Me(Ve(r))],null==r?T:n(r,t,e)}function Lt(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)return true;if(null==n||null==t||!yu(n)&&!yu(t))return n!==n&&t!==t;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)&&!!Un[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 Bi(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(du(i)){u||(u=new Zn);var f=u,c=Be(n,o),a=Be(t,o),l=f.get(a);if(!l){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=Lr(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(Be(n,o),i,o+"",n,t,u):T,f===T&&(f=i),it(n,o,f)},Uu)}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],E(ye())),n=Gt(n,function(n,r,u){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){if(e>=f){e=c;break n}e=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=Et(n,o);r(f,o)&&lr(i,Sr(o,n),f)}return i}function rr(n){return function(t){return Et(t,n)}}function er(n,t,r,e){var u=e?g:v,i=-1,o=t.length,f=n;for(n===t&&(t=Lr(t)),r&&(f=c(n,E(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)}}return n}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(Ue(n,t,$u),n+"")}function cr(n){return Qn(Lu(n))}function ar(n,t){var r=Lu(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(Lu(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 L(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:Et(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 Ln&&(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 kr(n){return hu(n)?n:[]}function Er(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 Ur(n,t,r,e){var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Li(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 Br(n,t,r,e){var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Li(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 Lr(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(En,"")),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?[]:B(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=Ur(y,e,u,_)),i&&(y=Br(y,i,o,_)),d-=x,_&&d<a)return j=B(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=Lr(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 Ut(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,E(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=Li(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,Le(r,n,t)}function ie(n){
+var t=Yu[n];return function(n,r){if(n=Su(n),r=null==r?0:Ci(ku(r),292)){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):k(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:Li(ku(o),0),f=f===T?f:ku(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?Ur(e,r,h[4]):r,i[4]=e?B(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Br(e,r,h[6]):r,i[6]=e?B(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:Li(i[9]-a,0),!f&&24&t&&(t&=-25),c=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),Le((h?co:yo)(c,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=L),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(Ue(n,T,Ze),n+"")}function _e(n){return St(n,Wu,po)}function ve(n){return St(n,Uu,_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 ke(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 Ee(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 Ln.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 Ue(t,r,e){return r=Li(r===T?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Li(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 Be(n,t){if("__proto__"!=t)return n[t]}function Le(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 Ln)return n.clone();var t=new On(n.__wrapped__,n.__chain__);return t.__actions__=Lr(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:ku(r),0>r&&(r=Li(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=ku(r),u=0>r?Li(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=Li(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=ku(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 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)?Li(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){if(typeof n!="function"||null!=t&&typeof t!="function")throw new ti("Expected a function");var r=function(){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)};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==ku(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):Lr(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?L:Lu)(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 ku(n){n=Au(n);var t=n%1;return n===n?t?n-t:n:0}function Eu(n){return n?pt(ku(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,Uu(n))}function Iu(n){return null==n?"":yr(n)}function Ru(n,t,r){return n=null==n?T:Et(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 Uu(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 Bu(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 Lu(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=kt(t,u);null!=e||du(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=kt(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__=Lr(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.allocUnsafe:T,di=U(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){}}(),ki=mn.clearTimeout!==$n.clearTimeout&&mn.clearTimeout,Ei=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,Ui=ri.join,Bi=U(Qu.keys,Qu),Li=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=kn.prototype,An.prototype.constructor=An,On.prototype=eo(kn.prototype),On.prototype.constructor=On,Ln.prototype=eo(kn.prototype),Ln.prototype.constructor=Ln,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=ki||function(n){
+return $n.clearTimeout(n)},so=Zi&&1/L(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):[]}),ko=fr(function(n){var t=c(n,kr);return t.length&&t[0]===n[0]?Wt(t):[]}),Eo=fr(function(n){var t=Ve(n),r=c(n,kr);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,kr);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)}),Uo=fr(function(n,t){return hu(n)?yt(n,t):[]}),Bo=fr(function(n){return mr(i(n,hu))}),Lo=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){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return ht(t,n)};return!(1<t||this.__actions__.length)&&e instanceof Ln&&Se(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:Qe,args:[u],thisArg:T}),new On(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(T),
+n})):this.thru(u)}),$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):Bt(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=Ei||function(){return $n.Date.now()},Ho=fr(function(n,t,r){var e=1;if(r.length)var u=B(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=B(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],E(ye())):c(wt(r,1),E(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,B(t,de(nf)))}),tf=fr(function(n,t){return fe(n,64,T,t,B(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=Lt(function(){return arguments}())?Lt:function(n){return yu(n)&&oi.call(n,"callee")&&!bi.call(n,"callee")},ff=Ku.isArray,cf=Vn?E(Vn):Ct,af=zi||Vu,lf=Kn?E(Kn):Dt,sf=Gn?E(Gn):Tt,hf=Hn?E(Hn):Nt,pf=Jn?E(Jn):Pt,_f=Yn?E(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,Uu(t),n)}),bf=$r(function(n,t,r,e){Cr(t,Uu(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=Uu(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)),kf=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),Ef=fr(Bt),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(Uu),Uf=qr(function(n,t,r){return t=t.toLowerCase(),n+(r?Cu(t):t)}),Bf=qr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Lf=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 Bt(r,n,t)}}),Vf=fr(function(n,t){return function(r){return Bt(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=ku(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:Li(ku(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)?Lr(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:ku(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:ku(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=ku(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:ku(e),0>e&&(e+=u),e=r>e?0:Eu(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:ku(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:ku(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?[]:kt(n,Wu(n))},An.functionsIn=function(n){return null==n?[]:kt(n,Uu(n))},An.groupBy=Po,An.initial=function(n){
+return(null==n?0:n.length)?hr(n,0,-1):[]},An.intersection=ko,An.intersectionBy=Eo,An.intersectionWith=So,An.invert=Af,An.invertBy=kf,An.invokeMap=Zo,An.iteratee=Fu,An.keyBy=qo,An.keys=Wu,An.keysIn=Uu,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=ku(n),fr(function(t){return Qt(t,n)})},An.omit=If,An.omitBy=function(n,t){return Bu(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=Bu,An.property=Zu,
+An.propertyOf=function(n){return function(t){return null==n?T:Et(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:ku(t),fr(n,t)},An.reverse=Ge,An.sampleSize=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:ku(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:ku(t),r=r===T?e:ku(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:Li(ku(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:ku(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:ku(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]:Lr(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&&(r=Er(r),n=lr(n,t,r(Et(n,t)),void 0)),n},An.updateWith=function(n,t,r,e){
+return e=typeof e=="function"?e:T,null!=n&&(r=Er(r),n=lr(n,t,r(Et(n,t)),e)),n},An.values=Lu,An.valuesIn=function(n){return null==n?[]:S(n,Uu(n))},An.without=Uo,An.words=Mu,An.wrap=function(n,t){return nf(Er(t),n)},An.xor=Bo,An.xorBy=Lo,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=Uf,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(ku(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),Uu)},An.forInRight=function(n,t){return null==n?n:fo(n,ye(t,3),Uu)},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:Lu(n),r=r&&!e?ku(r):0,e=n.length,0>r&&(r=Li(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:ku(r),0>r&&(r=Li(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<Li(t,r)},An.invoke=Ef,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?"":Ui.call(n,t)},An.kebabCase=Bf,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=ku(r),u=0>u?Li(e+u,0):Ci(u,e-1)),
+t===t)n:{for(r=u+1;r--;)if(n[r]===t){n=r;break n}n=r}else n=_(n,d,u,true);return n},An.lowerCase=Lf,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,ku(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=ku(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=ku(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=ku(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:ku(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(ku(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="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\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=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=ku(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=ku,An.toLength=Eu,An.toLower=function(n){
+return Iu(n).toLowerCase()},An.toNumber=Su,An.toSafeInteger=function(n){return n?pt(ku(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?ku(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.11",r("bind bindKey curry curryRight partial partialRight".split(" "),function(n){
+An[n].placeholder=An}),r(["drop","take"],function(n,t){Ln.prototype[n]=function(r){r=r===T?1:Li(ku(r),0);var e=this.__filtered__&&!t?new Ln(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},Ln.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;Ln.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":"");Ln.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Ln.prototype[n]=function(){return this.__filtered__?new Ln(this):this[r](1)}}),Ln.prototype.compact=function(){return this.filter($u)},Ln.prototype.find=function(n){return this.filter(n).head()},Ln.prototype.findLast=function(n){return this.reverse().find(n);
+},Ln.prototype.invokeMap=fr(function(n,t){return typeof n=="function"?new Ln(this):this.map(function(r){return Bt(r,n,t)})}),Ln.prototype.reject=function(n){return this.filter(au(ye(n)))},Ln.prototype.slice=function(n,t){n=ku(n);var r=this;return r.__filtered__&&(0<n||0>t)?new Ln(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==T&&(t=ku(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Ln.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ln.prototype.toArray=function(){return this.take(4294967295);
+},mt(Ln.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(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Ln,c=o[0],l=f||ff(t),s=function(n){return n=u.apply(An,a([n],o)),e&&h?n[0]:n};l&&r&&typeof c=="function"&&1!=c.length&&(f=l=false);var h=this.__chain__,p=!!this.__actions__.length,c=i&&!h,f=f&&!p;return!i&&l?(t=f?t:new Ln(this),t=n.apply(t,o),t.__actions__.push({
+func:Qe,args:[s],thisArg:T}),new On(t,h)):c&&f?n.apply(this,o):(t=this.thru(s),c?e?t.value()[0]:t.value():t)})}),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(Ln.prototype,function(n,t){var r=An[t];if(r){var e=r.name+"";
+(Gi[e]||(Gi[e]=[])).push({name:t,func:r})}}),Gi[Jr(T,2).name]=[{name:"wrapper",func:T}],Ln.prototype.clone=function(){var n=new Ln(this.__wrapped__);return n.__actions__=Lr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Lr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Lr(this.__views__),n},Ln.prototype.reverse=function(){if(this.__filtered__){var n=new Ln(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n;
+},Ln.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=ff(t),u=0>r,i=e?t.length:0;n=0;for(var o=i,f=this.__views__,c=-1,a=f.length;++c<a;){var l=f[c],s=l.size;switch(l.type){case"drop":n+=s;break;case"dropRight":o-=s;break;case"take":o=Ci(o,n+s);break;case"takeRight":n=Li(n,o-s)}}if(n={start:n,end:o},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 kn;){
+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 Ln?(this.__actions__.length&&(n=new Ln(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/package.json b/tools/node_modules/babel-eslint/node_modules/lodash/package.json
index c55059a843..73236b6290 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/lodash/package.json
@@ -1,29 +1,4 @@
{
- "_from": "lodash@^4.2.0",
- "_id": "lodash@4.17.4",
- "_inBundle": false,
- "_integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "_location": "/babel-eslint/lodash",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "lodash@^4.2.0",
- "name": "lodash",
- "escapedName": "lodash",
- "rawSpec": "^4.2.0",
- "saveSpec": null,
- "fetchSpec": "^4.2.0"
- },
- "_requiredBy": [
- "/babel-eslint/@babel/template",
- "/babel-eslint/@babel/traverse",
- "/babel-eslint/@babel/types"
- ],
- "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "_shasum": "78203a4d1c328ae1d86dca6460e369b57f4055ae",
- "_spec": "lodash@^4.2.0",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/@babel/traverse",
"author": {
"name": "John-David Dalton",
"email": "john.david.dalton@gmail.com",
@@ -62,7 +37,7 @@
"url": "git+https://github.com/lodash/lodash.git"
},
"scripts": {
- "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
+ "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\""
},
- "version": "4.17.4"
-}
+ "version": "4.17.11"
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/loose-envify/LICENSE b/tools/node_modules/babel-eslint/node_modules/loose-envify/LICENSE
deleted file mode 100644
index fbafb48758..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/loose-envify/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Andres Suarez <zertosh@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/loose-envify/README.md b/tools/node_modules/babel-eslint/node_modules/loose-envify/README.md
deleted file mode 100644
index 7f4e07b00d..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/loose-envify/README.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# loose-envify
-
-[![Build Status](https://travis-ci.org/zertosh/loose-envify.svg?branch=master)](https://travis-ci.org/zertosh/loose-envify)
-
-Fast (and loose) selective `process.env` replacer using [js-tokens](https://github.com/lydell/js-tokens) instead of an AST. Works just like [envify](https://github.com/hughsk/envify) but much faster.
-
-## Gotchas
-
-* Doesn't handle broken syntax.
-* Doesn't look inside embedded expressions in template strings.
- - **this won't work:**
- ```js
- console.log(`the current env is ${process.env.NODE_ENV}`);
- ```
-* Doesn't replace oddly-spaced or oddly-commented expressions.
- - **this won't work:**
- ```js
- console.log(process./*won't*/env./*work*/NODE_ENV);
- ```
-
-## Usage/Options
-
-loose-envify has the exact same interface as [envify](https://github.com/hughsk/envify), including the CLI.
-
-## Benchmark
-
-```
-envify:
-
- $ for i in {1..5}; do node bench/bench.js 'envify'; done
- 708ms
- 727ms
- 791ms
- 719ms
- 720ms
-
-loose-envify:
-
- $ for i in {1..5}; do node bench/bench.js '../'; done
- 51ms
- 52ms
- 52ms
- 52ms
- 52ms
-```
diff --git a/tools/node_modules/babel-eslint/node_modules/loose-envify/cli.js b/tools/node_modules/babel-eslint/node_modules/loose-envify/cli.js
deleted file mode 100755
index c0b63cb1df..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/loose-envify/cli.js
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env node
-'use strict';
-
-var looseEnvify = require('./');
-var fs = require('fs');
-
-if (process.argv[2]) {
- fs.createReadStream(process.argv[2], {encoding: 'utf8'})
- .pipe(looseEnvify(process.argv[2]))
- .pipe(process.stdout);
-} else {
- process.stdin.resume()
- process.stdin
- .pipe(looseEnvify(__filename))
- .pipe(process.stdout);
-}
diff --git a/tools/node_modules/babel-eslint/node_modules/loose-envify/custom.js b/tools/node_modules/babel-eslint/node_modules/loose-envify/custom.js
deleted file mode 100644
index 6389bfac50..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/loose-envify/custom.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// envify compatibility
-'use strict';
-
-module.exports = require('./loose-envify');
diff --git a/tools/node_modules/babel-eslint/node_modules/loose-envify/index.js b/tools/node_modules/babel-eslint/node_modules/loose-envify/index.js
deleted file mode 100644
index 8cd8305ddc..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/loose-envify/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./loose-envify')(process.env);
diff --git a/tools/node_modules/babel-eslint/node_modules/loose-envify/loose-envify.js b/tools/node_modules/babel-eslint/node_modules/loose-envify/loose-envify.js
deleted file mode 100644
index b5a5be2207..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/loose-envify/loose-envify.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-var stream = require('stream');
-var util = require('util');
-var replace = require('./replace');
-
-var jsonExtRe = /\.json$/;
-
-module.exports = function(rootEnv) {
- rootEnv = rootEnv || process.env;
- return function (file, trOpts) {
- if (jsonExtRe.test(file)) {
- return stream.PassThrough();
- }
- var envs = trOpts ? [rootEnv, trOpts] : [rootEnv];
- return new LooseEnvify(envs);
- };
-};
-
-function LooseEnvify(envs) {
- stream.Transform.call(this);
- this._data = '';
- this._envs = envs;
-}
-util.inherits(LooseEnvify, stream.Transform);
-
-LooseEnvify.prototype._transform = function(buf, enc, cb) {
- this._data += buf;
- cb();
-};
-
-LooseEnvify.prototype._flush = function(cb) {
- var replaced = replace(this._data, this._envs);
- this.push(replaced);
- cb();
-};
diff --git a/tools/node_modules/babel-eslint/node_modules/loose-envify/package.json b/tools/node_modules/babel-eslint/node_modules/loose-envify/package.json
deleted file mode 100644
index 688bee713b..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/loose-envify/package.json
+++ /dev/null
@@ -1,67 +0,0 @@
-{
- "_from": "loose-envify@^1.0.0",
- "_id": "loose-envify@1.3.1",
- "_inBundle": false,
- "_integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=",
- "_location": "/babel-eslint/loose-envify",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "loose-envify@^1.0.0",
- "name": "loose-envify",
- "escapedName": "loose-envify",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/babel-eslint/invariant"
- ],
- "_resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
- "_shasum": "d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848",
- "_spec": "loose-envify@^1.0.0",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/invariant",
- "author": {
- "name": "Andres Suarez",
- "email": "zertosh@gmail.com"
- },
- "bin": {
- "loose-envify": "cli.js"
- },
- "bugs": {
- "url": "https://github.com/zertosh/loose-envify/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "js-tokens": "^3.0.0"
- },
- "deprecated": false,
- "description": "Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST",
- "devDependencies": {
- "browserify": "^13.1.1",
- "envify": "^3.4.0",
- "tap": "^8.0.0"
- },
- "homepage": "https://github.com/zertosh/loose-envify",
- "keywords": [
- "environment",
- "variables",
- "browserify",
- "browserify-transform",
- "transform",
- "source",
- "configuration"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "loose-envify",
- "repository": {
- "type": "git",
- "url": "git://github.com/zertosh/loose-envify.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "1.3.1"
-}
diff --git a/tools/node_modules/babel-eslint/node_modules/loose-envify/replace.js b/tools/node_modules/babel-eslint/node_modules/loose-envify/replace.js
deleted file mode 100644
index ec15e81c29..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/loose-envify/replace.js
+++ /dev/null
@@ -1,65 +0,0 @@
-'use strict';
-
-var jsTokens = require('js-tokens').default;
-
-var processEnvRe = /\bprocess\.env\.[_$a-zA-Z][$\w]+\b/;
-var spaceOrCommentRe = /^(?:\s|\/[/*])/;
-
-function replace(src, envs) {
- if (!processEnvRe.test(src)) {
- return src;
- }
-
- var out = [];
- var purge = envs.some(function(env) {
- return env._ && env._.indexOf('purge') !== -1;
- });
-
- jsTokens.lastIndex = 0
- var parts = src.match(jsTokens);
-
- for (var i = 0; i < parts.length; i++) {
- if (parts[i ] === 'process' &&
- parts[i + 1] === '.' &&
- parts[i + 2] === 'env' &&
- parts[i + 3] === '.') {
- var prevCodeToken = getAdjacentCodeToken(-1, parts, i);
- var nextCodeToken = getAdjacentCodeToken(1, parts, i + 4);
- var replacement = getReplacementString(envs, parts[i + 4], purge);
- if (prevCodeToken !== '.' &&
- nextCodeToken !== '.' &&
- nextCodeToken !== '=' &&
- typeof replacement === 'string') {
- out.push(replacement);
- i += 4;
- continue;
- }
- }
- out.push(parts[i]);
- }
-
- return out.join('');
-}
-
-function getAdjacentCodeToken(dir, parts, i) {
- while (true) {
- var part = parts[i += dir];
- if (!spaceOrCommentRe.test(part)) {
- return part;
- }
- }
-}
-
-function getReplacementString(envs, name, purge) {
- for (var j = 0; j < envs.length; j++) {
- var env = envs[j];
- if (typeof env[name] !== 'undefined') {
- return JSON.stringify(env[name]);
- }
- }
- if (purge) {
- return 'undefined';
- }
-}
-
-module.exports = replace;
diff --git a/tools/node_modules/babel-eslint/node_modules/ms/index.js b/tools/node_modules/babel-eslint/node_modules/ms/index.js
index 6a522b16b3..72297501f9 100644
--- a/tools/node_modules/babel-eslint/node_modules/ms/index.js
+++ b/tools/node_modules/babel-eslint/node_modules/ms/index.js
@@ -6,6 +6,7 @@ var s = 1000;
var m = s * 60;
var h = m * 60;
var d = h * 24;
+var w = d * 7;
var y = d * 365.25;
/**
@@ -49,7 +50,7 @@ function parse(str) {
if (str.length > 100) {
return;
}
- var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
+ 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) {
@@ -64,6 +65,10 @@ function parse(str) {
case 'yr':
case 'y':
return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
case 'days':
case 'day':
case 'd':
@@ -106,16 +111,17 @@ function parse(str) {
*/
function fmtShort(ms) {
- if (ms >= d) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
return Math.round(ms / d) + 'd';
}
- if (ms >= h) {
+ if (msAbs >= h) {
return Math.round(ms / h) + 'h';
}
- if (ms >= m) {
+ if (msAbs >= m) {
return Math.round(ms / m) + 'm';
}
- if (ms >= s) {
+ if (msAbs >= s) {
return Math.round(ms / s) + 's';
}
return ms + 'ms';
@@ -130,23 +136,27 @@ function fmtShort(ms) {
*/
function fmtLong(ms) {
- return plural(ms, d, 'day') ||
- plural(ms, h, 'hour') ||
- plural(ms, m, 'minute') ||
- plural(ms, s, 'second') ||
- ms + ' 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, n, name) {
- if (ms < n) {
- return;
- }
- if (ms < n * 1.5) {
- return Math.floor(ms / n) + ' ' + name;
- }
- return Math.ceil(ms / n) + ' ' + name + 's';
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
}
diff --git a/tools/node_modules/babel-eslint/node_modules/ms/package.json b/tools/node_modules/babel-eslint/node_modules/ms/package.json
index 421a861863..c59290ffb9 100644
--- a/tools/node_modules/babel-eslint/node_modules/ms/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/ms/package.json
@@ -1,39 +1,16 @@
{
- "_from": "ms@2.0.0",
- "_id": "ms@2.0.0",
- "_inBundle": false,
- "_integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "_location": "/babel-eslint/ms",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "ms@2.0.0",
- "name": "ms",
- "escapedName": "ms",
- "rawSpec": "2.0.0",
- "saveSpec": null,
- "fetchSpec": "2.0.0"
- },
- "_requiredBy": [
- "/babel-eslint/debug"
- ],
- "_resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "_shasum": "5608aeadfc00be6c2901df5f9861788de0d597c8",
- "_spec": "ms@2.0.0",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/debug",
"bugs": {
"url": "https://github.com/zeit/ms/issues"
},
"bundleDependencies": false,
"deprecated": false,
- "description": "Tiny milisecond conversion utility",
+ "description": "Tiny millisecond conversion utility",
"devDependencies": {
- "eslint": "3.19.0",
+ "eslint": "4.12.1",
"expect.js": "0.3.1",
- "husky": "0.13.3",
- "lint-staged": "3.4.1",
- "mocha": "3.4.1"
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
},
"eslintConfig": {
"extends": "eslint:recommended",
@@ -65,5 +42,5 @@
"precommit": "lint-staged",
"test": "mocha tests.js"
},
- "version": "2.0.0"
-}
+ "version": "2.1.1"
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/ms/readme.md b/tools/node_modules/babel-eslint/node_modules/ms/readme.md
index 84a9974ccc..bb767293ac 100644
--- a/tools/node_modules/babel-eslint/node_modules/ms/readme.md
+++ b/tools/node_modules/babel-eslint/node_modules/ms/readme.md
@@ -17,35 +17,44 @@ ms('1m') // 60000
ms('5s') // 5000
ms('1y') // 31557600000
ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
```
-### Convert from milliseconds
+### Convert from Milliseconds
```js
ms(60000) // "1m"
ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
ms(ms('10 hours')) // "10h"
```
-### Time format written-out
+### Time Format Written-Out
```js
ms(60000, { long: true }) // "1 minute"
ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
ms(ms('10 hours'), { long: true }) // "10 hours"
```
## Features
-- Works both in [node](https://nodejs.org) and in the browser.
-- If a number is supplied to `ms`, a string with a unit is returned.
-- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
-- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
-## Caught a bug?
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Link the package to the global module directory: `npm link`
-3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
As always, you can run the tests using: `npm test`
diff --git a/tools/node_modules/babel-eslint/node_modules/object-assign/index.js b/tools/node_modules/babel-eslint/node_modules/object-assign/index.js
deleted file mode 100644
index 0930cf8890..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/object-assign/index.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-object-assign
-(c) Sindre Sorhus
-@license MIT
-*/
-
-'use strict';
-/* eslint-disable no-unused-vars */
-var getOwnPropertySymbols = Object.getOwnPropertySymbols;
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function toObject(val) {
- if (val === null || val === undefined) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-function shouldUseNative() {
- try {
- if (!Object.assign) {
- return false;
- }
-
- // Detect buggy property enumeration order in older V8 versions.
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
- test1[5] = 'de';
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test2 = {};
- for (var i = 0; i < 10; i++) {
- test2['_' + String.fromCharCode(i)] = i;
- }
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
- return test2[n];
- });
- if (order2.join('') !== '0123456789') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test3 = {};
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
- test3[letter] = letter;
- });
- if (Object.keys(Object.assign({}, test3)).join('') !==
- 'abcdefghijklmnopqrst') {
- return false;
- }
-
- return true;
- } catch (err) {
- // We don't expect any of the above to throw, but better to be safe.
- return false;
- }
-}
-
-module.exports = shouldUseNative() ? Object.assign : function (target, source) {
- var from;
- var to = toObject(target);
- var symbols;
-
- for (var s = 1; s < arguments.length; s++) {
- from = Object(arguments[s]);
-
- for (var key in from) {
- if (hasOwnProperty.call(from, key)) {
- to[key] = from[key];
- }
- }
-
- if (getOwnPropertySymbols) {
- symbols = getOwnPropertySymbols(from);
- for (var i = 0; i < symbols.length; i++) {
- if (propIsEnumerable.call(from, symbols[i])) {
- to[symbols[i]] = from[symbols[i]];
- }
- }
- }
- }
-
- return to;
-};
diff --git a/tools/node_modules/babel-eslint/node_modules/object-assign/package.json b/tools/node_modules/babel-eslint/node_modules/object-assign/package.json
deleted file mode 100644
index c079426dad..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/object-assign/package.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "_from": "object-assign@^4.0.1",
- "_id": "object-assign@4.1.1",
- "_inBundle": false,
- "_integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
- "_location": "/babel-eslint/object-assign",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "object-assign@^4.0.1",
- "name": "object-assign",
- "escapedName": "object-assign",
- "rawSpec": "^4.0.1",
- "saveSpec": null,
- "fetchSpec": "^4.0.1"
- },
- "_requiredBy": [
- "/babel-eslint/esrecurse"
- ],
- "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "_shasum": "2109adc7965887cfc05cbbd442cac8bfbb360863",
- "_spec": "object-assign@^4.0.1",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/esrecurse",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/object-assign/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "ES2015 `Object.assign()` ponyfill",
- "devDependencies": {
- "ava": "^0.16.0",
- "lodash": "^4.16.4",
- "matcha": "^0.7.0",
- "xo": "^0.16.0"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/object-assign#readme",
- "keywords": [
- "object",
- "assign",
- "extend",
- "properties",
- "es2015",
- "ecmascript",
- "harmony",
- "ponyfill",
- "prollyfill",
- "polyfill",
- "shim",
- "browser"
- ],
- "license": "MIT",
- "name": "object-assign",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/object-assign.git"
- },
- "scripts": {
- "bench": "matcha bench.js",
- "test": "xo && ava"
- },
- "version": "4.1.1"
-}
diff --git a/tools/node_modules/babel-eslint/node_modules/object-assign/readme.md b/tools/node_modules/babel-eslint/node_modules/object-assign/readme.md
deleted file mode 100644
index 1be09d35c7..0000000000
--- a/tools/node_modules/babel-eslint/node_modules/object-assign/readme.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
-
-> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)
-
-
-## Use the built-in
-
-Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari),
-support `Object.assign()` :tada:. If you target only those environments, then by all
-means, use `Object.assign()` instead of this package.
-
-
-## Install
-
-```
-$ npm install --save object-assign
-```
-
-
-## Usage
-
-```js
-const objectAssign = require('object-assign');
-
-objectAssign({foo: 0}, {bar: 1});
-//=> {foo: 0, bar: 1}
-
-// multiple sources
-objectAssign({foo: 0}, {bar: 1}, {baz: 2});
-//=> {foo: 0, bar: 1, baz: 2}
-
-// overwrites equal keys
-objectAssign({foo: 0}, {foo: 1}, {foo: 2});
-//=> {foo: 2}
-
-// ignores null and undefined sources
-objectAssign({foo: 0}, null, {bar: 1}, undefined);
-//=> {foo: 0, bar: 1}
-```
-
-
-## API
-
-### objectAssign(target, [source, ...])
-
-Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
-
-
-## Resources
-
-- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
-
-
-## Related
-
-- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()`
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/node_modules/babel-eslint/node_modules/invariant/LICENSE b/tools/node_modules/babel-eslint/node_modules/source-map/LICENSE
index 35b4e8fab2..ed1b7cf27e 100644
--- a/tools/node_modules/babel-eslint/node_modules/invariant/LICENSE
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/LICENSE
@@ -1,4 +1,5 @@
-Copyright (c) 2016, Andres Suarez
+
+Copyright (c) 2009-2011, Mozilla Foundation and contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -11,13 +12,13 @@ modification, are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
-* Neither the name of invariant nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
+* Neither the names of the Mozilla Foundation nor the names of project
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/README.md b/tools/node_modules/babel-eslint/node_modules/source-map/README.md
new file mode 100644
index 0000000000..32813394ad
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/README.md
@@ -0,0 +1,729 @@
+# Source Map
+
+[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map)
+
+[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map)
+
+This is a library to generate and consume the source map format
+[described here][format].
+
+[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
+
+## Use with Node
+
+ $ npm install source-map
+
+## Use on the Web
+
+ <script src="https://raw.githubusercontent.com/mozilla/source-map/master/dist/source-map.min.js" defer></script>
+
+--------------------------------------------------------------------------------
+
+<!-- `npm run toc` to regenerate the Table of Contents -->
+
+<!-- START doctoc generated TOC please keep comment here to allow auto update -->
+<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
+## Table of Contents
+
+- [Examples](#examples)
+ - [Consuming a source map](#consuming-a-source-map)
+ - [Generating a source map](#generating-a-source-map)
+ - [With SourceNode (high level API)](#with-sourcenode-high-level-api)
+ - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api)
+- [API](#api)
+ - [SourceMapConsumer](#sourcemapconsumer)
+ - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap)
+ - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans)
+ - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition)
+ - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition)
+ - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition)
+ - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources)
+ - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing)
+ - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order)
+ - [SourceMapGenerator](#sourcemapgenerator)
+ - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap)
+ - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer)
+ - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping)
+ - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent)
+ - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath)
+ - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring)
+ - [SourceNode](#sourcenode)
+ - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name)
+ - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath)
+ - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk)
+ - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk)
+ - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent)
+ - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn)
+ - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn)
+ - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep)
+ - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement)
+ - [SourceNode.prototype.toString()](#sourcenodeprototypetostring)
+ - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap)
+
+<!-- END doctoc generated TOC please keep comment here to allow auto update -->
+
+## Examples
+
+### Consuming a source map
+
+```js
+var rawSourceMap = {
+ version: 3,
+ file: 'min.js',
+ names: ['bar', 'baz', 'n'],
+ sources: ['one.js', 'two.js'],
+ sourceRoot: 'http://example.com/www/js/',
+ mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'
+};
+
+var smc = new SourceMapConsumer(rawSourceMap);
+
+console.log(smc.sources);
+// [ 'http://example.com/www/js/one.js',
+// 'http://example.com/www/js/two.js' ]
+
+console.log(smc.originalPositionFor({
+ line: 2,
+ column: 28
+}));
+// { source: 'http://example.com/www/js/two.js',
+// line: 2,
+// column: 10,
+// name: 'n' }
+
+console.log(smc.generatedPositionFor({
+ source: 'http://example.com/www/js/two.js',
+ line: 2,
+ column: 10
+}));
+// { line: 2, column: 28 }
+
+smc.eachMapping(function (m) {
+ // ...
+});
+```
+
+### Generating a source map
+
+In depth guide:
+[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/)
+
+#### With SourceNode (high level API)
+
+```js
+function compile(ast) {
+ switch (ast.type) {
+ case 'BinaryExpression':
+ return new SourceNode(
+ ast.location.line,
+ ast.location.column,
+ ast.location.source,
+ [compile(ast.left), " + ", compile(ast.right)]
+ );
+ case 'Literal':
+ return new SourceNode(
+ ast.location.line,
+ ast.location.column,
+ ast.location.source,
+ String(ast.value)
+ );
+ // ...
+ default:
+ throw new Error("Bad AST");
+ }
+}
+
+var ast = parse("40 + 2", "add.js");
+console.log(compile(ast).toStringWithSourceMap({
+ file: 'add.js'
+}));
+// { code: '40 + 2',
+// map: [object SourceMapGenerator] }
+```
+
+#### With SourceMapGenerator (low level API)
+
+```js
+var map = new SourceMapGenerator({
+ file: "source-mapped.js"
+});
+
+map.addMapping({
+ generated: {
+ line: 10,
+ column: 35
+ },
+ source: "foo.js",
+ original: {
+ line: 33,
+ column: 2
+ },
+ name: "christopher"
+});
+
+console.log(map.toString());
+// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}'
+```
+
+## API
+
+Get a reference to the module:
+
+```js
+// Node.js
+var sourceMap = require('source-map');
+
+// Browser builds
+var sourceMap = window.sourceMap;
+
+// Inside Firefox
+const sourceMap = require("devtools/toolkit/sourcemap/source-map.js");
+```
+
+### SourceMapConsumer
+
+A SourceMapConsumer instance represents a parsed source map which we can query
+for information about the original file positions by giving it a file position
+in the generated source.
+
+#### new SourceMapConsumer(rawSourceMap)
+
+The only parameter is the raw source map (either as a string which can be
+`JSON.parse`'d, or an object). According to the spec, source maps have the
+following attributes:
+
+* `version`: Which version of the source map spec this map is following.
+
+* `sources`: An array of URLs to the original source files.
+
+* `names`: An array of identifiers which can be referenced by individual
+ mappings.
+
+* `sourceRoot`: Optional. The URL root from which all sources are relative.
+
+* `sourcesContent`: Optional. An array of contents of the original source files.
+
+* `mappings`: A string of base64 VLQs which contain the actual mappings.
+
+* `file`: Optional. The generated filename this source map is associated with.
+
+```js
+var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData);
+```
+
+#### SourceMapConsumer.prototype.computeColumnSpans()
+
+Compute the last column for each generated mapping. The last column is
+inclusive.
+
+```js
+// Before:
+consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" })
+// [ { line: 2,
+// column: 1 },
+// { line: 2,
+// column: 10 },
+// { line: 2,
+// column: 20 } ]
+
+consumer.computeColumnSpans();
+
+// After:
+consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" })
+// [ { line: 2,
+// column: 1,
+// lastColumn: 9 },
+// { line: 2,
+// column: 10,
+// lastColumn: 19 },
+// { line: 2,
+// column: 20,
+// lastColumn: Infinity } ]
+
+```
+
+#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)
+
+Returns the original source, line, and column information for the generated
+source's line and column positions provided. The only argument is an object with
+the following properties:
+
+* `line`: The line number in the generated source.
+
+* `column`: The column number in the generated source.
+
+* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or
+ `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest
+ element that is smaller than or greater than the one we are searching for,
+ respectively, if the exact element cannot be found. Defaults to
+ `SourceMapConsumer.GREATEST_LOWER_BOUND`.
+
+and an object is returned with the following properties:
+
+* `source`: The original source file, or null if this information is not
+ available.
+
+* `line`: The line number in the original source, or null if this information is
+ not available.
+
+* `column`: The column number in the original source, or null if this
+ information is not available.
+
+* `name`: The original identifier, or null if this information is not available.
+
+```js
+consumer.originalPositionFor({ line: 2, column: 10 })
+// { source: 'foo.coffee',
+// line: 2,
+// column: 2,
+// name: null }
+
+consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 })
+// { source: null,
+// line: null,
+// column: null,
+// name: null }
+```
+
+#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)
+
+Returns the generated line and column information for the original source,
+line, and column positions provided. The only argument is an object with
+the following properties:
+
+* `source`: The filename of the original source.
+
+* `line`: The line number in the original source.
+
+* `column`: The column number in the original source.
+
+and an object is returned with the following properties:
+
+* `line`: The line number in the generated source, or null.
+
+* `column`: The column number in the generated source, or null.
+
+```js
+consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 })
+// { line: 1,
+// column: 56 }
+```
+
+#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)
+
+Returns all generated line and column information for the original source, line,
+and column provided. If no column is provided, returns all mappings
+corresponding to a either the line we are searching for or the next closest line
+that has any mappings. Otherwise, returns all mappings corresponding to the
+given line and either the column we are searching for or the next closest column
+that has any offsets.
+
+The only argument is an object with the following properties:
+
+* `source`: The filename of the original source.
+
+* `line`: The line number in the original source.
+
+* `column`: Optional. The column number in the original source.
+
+and an array of objects is returned, each with the following properties:
+
+* `line`: The line number in the generated source, or null.
+
+* `column`: The column number in the generated source, or null.
+
+```js
+consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" })
+// [ { line: 2,
+// column: 1 },
+// { line: 2,
+// column: 10 },
+// { line: 2,
+// column: 20 } ]
+```
+
+#### SourceMapConsumer.prototype.hasContentsOfAllSources()
+
+Return true if we have the embedded source content for every source listed in
+the source map, false otherwise.
+
+In other words, if this method returns `true`, then
+`consumer.sourceContentFor(s)` will succeed for every source `s` in
+`consumer.sources`.
+
+```js
+// ...
+if (consumer.hasContentsOfAllSources()) {
+ consumerReadyCallback(consumer);
+} else {
+ fetchSources(consumer, consumerReadyCallback);
+}
+// ...
+```
+
+#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])
+
+Returns the original source content for the source provided. The only
+argument is the URL of the original source file.
+
+If the source content for the given source is not found, then an error is
+thrown. Optionally, pass `true` as the second param to have `null` returned
+instead.
+
+```js
+consumer.sources
+// [ "my-cool-lib.clj" ]
+
+consumer.sourceContentFor("my-cool-lib.clj")
+// "..."
+
+consumer.sourceContentFor("this is not in the source map");
+// Error: "this is not in the source map" is not in the source map
+
+consumer.sourceContentFor("this is not in the source map", true);
+// null
+```
+
+#### SourceMapConsumer.prototype.eachMapping(callback, context, order)
+
+Iterate over each mapping between an original source/line/column and a
+generated line/column in this source map.
+
+* `callback`: The function that is called with each mapping. Mappings have the
+ form `{ source, generatedLine, generatedColumn, originalLine, originalColumn,
+ name }`
+
+* `context`: Optional. If specified, this object will be the value of `this`
+ every time that `callback` is called.
+
+* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or
+ `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over
+ the mappings sorted by the generated file's line/column order or the
+ original's source/line/column order, respectively. Defaults to
+ `SourceMapConsumer.GENERATED_ORDER`.
+
+```js
+consumer.eachMapping(function (m) { console.log(m); })
+// ...
+// { source: 'illmatic.js',
+// generatedLine: 1,
+// generatedColumn: 0,
+// originalLine: 1,
+// originalColumn: 0,
+// name: null }
+// { source: 'illmatic.js',
+// generatedLine: 2,
+// generatedColumn: 0,
+// originalLine: 2,
+// originalColumn: 0,
+// name: null }
+// ...
+```
+### SourceMapGenerator
+
+An instance of the SourceMapGenerator represents a source map which is being
+built incrementally.
+
+#### new SourceMapGenerator([startOfSourceMap])
+
+You may pass an object with the following properties:
+
+* `file`: The filename of the generated source that this source map is
+ associated with.
+
+* `sourceRoot`: A root for all relative URLs in this source map.
+
+* `skipValidation`: Optional. When `true`, disables validation of mappings as
+ they are added. This can improve performance but should be used with
+ discretion, as a last resort. Even then, one should avoid using this flag when
+ running tests, if possible.
+
+```js
+var generator = new sourceMap.SourceMapGenerator({
+ file: "my-generated-javascript-file.js",
+ sourceRoot: "http://example.com/app/js/"
+});
+```
+
+#### SourceMapGenerator.fromSourceMap(sourceMapConsumer)
+
+Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance.
+
+* `sourceMapConsumer` The SourceMap.
+
+```js
+var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer);
+```
+
+#### SourceMapGenerator.prototype.addMapping(mapping)
+
+Add a single mapping from original source line and column to the generated
+source's line and column for this source map being created. The mapping object
+should have the following properties:
+
+* `generated`: An object with the generated line and column positions.
+
+* `original`: An object with the original line and column positions.
+
+* `source`: The original source file (relative to the sourceRoot).
+
+* `name`: An optional original token name for this mapping.
+
+```js
+generator.addMapping({
+ source: "module-one.scm",
+ original: { line: 128, column: 0 },
+ generated: { line: 3, column: 456 }
+})
+```
+
+#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)
+
+Set the source content for an original source file.
+
+* `sourceFile` the URL of the original source file.
+
+* `sourceContent` the content of the source file.
+
+```js
+generator.setSourceContent("module-one.scm",
+ fs.readFileSync("path/to/module-one.scm"))
+```
+
+#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])
+
+Applies a SourceMap for a source file to the SourceMap.
+Each mapping to the supplied source file is rewritten using the
+supplied SourceMap. Note: The resolution for the resulting mappings
+is the minimum of this map and the supplied map.
+
+* `sourceMapConsumer`: The SourceMap to be applied.
+
+* `sourceFile`: Optional. The filename of the source file.
+ If omitted, sourceMapConsumer.file will be used, if it exists.
+ Otherwise an error will be thrown.
+
+* `sourceMapPath`: Optional. The dirname of the path to the SourceMap
+ to be applied. If relative, it is relative to the SourceMap.
+
+ This parameter is needed when the two SourceMaps aren't in the same
+ directory, and the SourceMap to be applied contains relative source
+ paths. If so, those relative source paths need to be rewritten
+ relative to the SourceMap.
+
+ If omitted, it is assumed that both SourceMaps are in the same directory,
+ thus not needing any rewriting. (Supplying `'.'` has the same effect.)
+
+#### SourceMapGenerator.prototype.toString()
+
+Renders the source map being generated to a string.
+
+```js
+generator.toString()
+// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}'
+```
+
+### SourceNode
+
+SourceNodes provide a way to abstract over interpolating and/or concatenating
+snippets of generated JavaScript source code, while maintaining the line and
+column information associated between those snippets and the original source
+code. This is useful as the final intermediate representation a compiler might
+use before outputting the generated JS and source map.
+
+#### new SourceNode([line, column, source[, chunk[, name]]])
+
+* `line`: The original line number associated with this source node, or null if
+ it isn't associated with an original line.
+
+* `column`: The original column number associated with this source node, or null
+ if it isn't associated with an original column.
+
+* `source`: The original source's filename; null if no filename is provided.
+
+* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see
+ below.
+
+* `name`: Optional. The original identifier.
+
+```js
+var node = new SourceNode(1, 2, "a.cpp", [
+ new SourceNode(3, 4, "b.cpp", "extern int status;\n"),
+ new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"),
+ new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"),
+]);
+```
+
+#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])
+
+Creates a SourceNode from generated code and a SourceMapConsumer.
+
+* `code`: The generated code
+
+* `sourceMapConsumer` The SourceMap for the generated code
+
+* `relativePath` The optional path that relative sources in `sourceMapConsumer`
+ should be relative to.
+
+```js
+var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8"));
+var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"),
+ consumer);
+```
+
+#### SourceNode.prototype.add(chunk)
+
+Add a chunk of generated JS to this source node.
+
+* `chunk`: A string snippet of generated JS code, another instance of
+ `SourceNode`, or an array where each member is one of those things.
+
+```js
+node.add(" + ");
+node.add(otherNode);
+node.add([leftHandOperandNode, " + ", rightHandOperandNode]);
+```
+
+#### SourceNode.prototype.prepend(chunk)
+
+Prepend a chunk of generated JS to this source node.
+
+* `chunk`: A string snippet of generated JS code, another instance of
+ `SourceNode`, or an array where each member is one of those things.
+
+```js
+node.prepend("/** Build Id: f783haef86324gf **/\n\n");
+```
+
+#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent)
+
+Set the source content for a source file. This will be added to the
+`SourceMap` in the `sourcesContent` field.
+
+* `sourceFile`: The filename of the source file
+
+* `sourceContent`: The content of the source file
+
+```js
+node.setSourceContent("module-one.scm",
+ fs.readFileSync("path/to/module-one.scm"))
+```
+
+#### SourceNode.prototype.walk(fn)
+
+Walk over the tree of JS snippets in this node and its children. The walking
+function is called once for each snippet of JS and is passed that snippet and
+the its original associated source's line/column location.
+
+* `fn`: The traversal function.
+
+```js
+var node = new SourceNode(1, 2, "a.js", [
+ new SourceNode(3, 4, "b.js", "uno"),
+ "dos",
+ [
+ "tres",
+ new SourceNode(5, 6, "c.js", "quatro")
+ ]
+]);
+
+node.walk(function (code, loc) { console.log("WALK:", code, loc); })
+// WALK: uno { source: 'b.js', line: 3, column: 4, name: null }
+// WALK: dos { source: 'a.js', line: 1, column: 2, name: null }
+// WALK: tres { source: 'a.js', line: 1, column: 2, name: null }
+// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null }
+```
+
+#### SourceNode.prototype.walkSourceContents(fn)
+
+Walk over the tree of SourceNodes. The walking function is called for each
+source file content and is passed the filename and source content.
+
+* `fn`: The traversal function.
+
+```js
+var a = new SourceNode(1, 2, "a.js", "generated from a");
+a.setSourceContent("a.js", "original a");
+var b = new SourceNode(1, 2, "b.js", "generated from b");
+b.setSourceContent("b.js", "original b");
+var c = new SourceNode(1, 2, "c.js", "generated from c");
+c.setSourceContent("c.js", "original c");
+
+var node = new SourceNode(null, null, null, [a, b, c]);
+node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); })
+// WALK: a.js : original a
+// WALK: b.js : original b
+// WALK: c.js : original c
+```
+
+#### SourceNode.prototype.join(sep)
+
+Like `Array.prototype.join` except for SourceNodes. Inserts the separator
+between each of this source node's children.
+
+* `sep`: The separator.
+
+```js
+var lhs = new SourceNode(1, 2, "a.rs", "my_copy");
+var operand = new SourceNode(3, 4, "a.rs", "=");
+var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()");
+
+var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]);
+var joinedNode = node.join(" ");
+```
+
+#### SourceNode.prototype.replaceRight(pattern, replacement)
+
+Call `String.prototype.replace` on the very right-most source snippet. Useful
+for trimming white space from the end of a source node, etc.
+
+* `pattern`: The pattern to replace.
+
+* `replacement`: The thing to replace the pattern with.
+
+```js
+// Trim trailing white space.
+node.replaceRight(/\s*$/, "");
+```
+
+#### SourceNode.prototype.toString()
+
+Return the string representation of this source node. Walks over the tree and
+concatenates all the various snippets together to one string.
+
+```js
+var node = new SourceNode(1, 2, "a.js", [
+ new SourceNode(3, 4, "b.js", "uno"),
+ "dos",
+ [
+ "tres",
+ new SourceNode(5, 6, "c.js", "quatro")
+ ]
+]);
+
+node.toString()
+// 'unodostresquatro'
+```
+
+#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])
+
+Returns the string representation of this tree of source nodes, plus a
+SourceMapGenerator which contains all the mappings between the generated and
+original sources.
+
+The arguments are the same as those to `new SourceMapGenerator`.
+
+```js
+var node = new SourceNode(1, 2, "a.js", [
+ new SourceNode(3, 4, "b.js", "uno"),
+ "dos",
+ [
+ "tres",
+ new SourceNode(5, 6, "c.js", "quatro")
+ ]
+]);
+
+node.toStringWithSourceMap({ file: "my-output-file.js" })
+// { code: 'unodostresquatro',
+// map: [object SourceMapGenerator] }
+```
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.debug.js b/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.debug.js
new file mode 100644
index 0000000000..b5ab6382ab
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.debug.js
@@ -0,0 +1,3091 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+ else if(typeof exports === 'object')
+ exports["sourceMap"] = factory();
+ else
+ root["sourceMap"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+/******/
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /*
+ * Copyright 2009-2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE.txt or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+ exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;
+ exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer;
+ exports.SourceNode = __webpack_require__(10).SourceNode;
+
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var base64VLQ = __webpack_require__(2);
+ var util = __webpack_require__(4);
+ var ArraySet = __webpack_require__(5).ArraySet;
+ var MappingList = __webpack_require__(6).MappingList;
+
+ /**
+ * An instance of the SourceMapGenerator represents a source map which is
+ * being built incrementally. You may pass an object with the following
+ * properties:
+ *
+ * - file: The filename of the generated source.
+ * - sourceRoot: A root for all relative URLs in this source map.
+ */
+ function SourceMapGenerator(aArgs) {
+ if (!aArgs) {
+ aArgs = {};
+ }
+ this._file = util.getArg(aArgs, 'file', null);
+ this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
+ this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
+ this._sources = new ArraySet();
+ this._names = new ArraySet();
+ this._mappings = new MappingList();
+ this._sourcesContents = null;
+ }
+
+ SourceMapGenerator.prototype._version = 3;
+
+ /**
+ * Creates a new SourceMapGenerator based on a SourceMapConsumer
+ *
+ * @param aSourceMapConsumer The SourceMap.
+ */
+ SourceMapGenerator.fromSourceMap =
+ function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
+ var sourceRoot = aSourceMapConsumer.sourceRoot;
+ var generator = new SourceMapGenerator({
+ file: aSourceMapConsumer.file,
+ sourceRoot: sourceRoot
+ });
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ var newMapping = {
+ generated: {
+ line: mapping.generatedLine,
+ column: mapping.generatedColumn
+ }
+ };
+
+ if (mapping.source != null) {
+ newMapping.source = mapping.source;
+ if (sourceRoot != null) {
+ newMapping.source = util.relative(sourceRoot, newMapping.source);
+ }
+
+ newMapping.original = {
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ };
+
+ if (mapping.name != null) {
+ newMapping.name = mapping.name;
+ }
+ }
+
+ generator.addMapping(newMapping);
+ });
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ generator.setSourceContent(sourceFile, content);
+ }
+ });
+ return generator;
+ };
+
+ /**
+ * Add a single mapping from original source line and column to the generated
+ * source's line and column for this source map being created. The mapping
+ * object should have the following properties:
+ *
+ * - generated: An object with the generated line and column positions.
+ * - original: An object with the original line and column positions.
+ * - source: The original source file (relative to the sourceRoot).
+ * - name: An optional original token name for this mapping.
+ */
+ SourceMapGenerator.prototype.addMapping =
+ function SourceMapGenerator_addMapping(aArgs) {
+ var generated = util.getArg(aArgs, 'generated');
+ var original = util.getArg(aArgs, 'original', null);
+ var source = util.getArg(aArgs, 'source', null);
+ var name = util.getArg(aArgs, 'name', null);
+
+ if (!this._skipValidation) {
+ this._validateMapping(generated, original, source, name);
+ }
+
+ if (source != null) {
+ source = String(source);
+ if (!this._sources.has(source)) {
+ this._sources.add(source);
+ }
+ }
+
+ if (name != null) {
+ name = String(name);
+ if (!this._names.has(name)) {
+ this._names.add(name);
+ }
+ }
+
+ this._mappings.add({
+ generatedLine: generated.line,
+ generatedColumn: generated.column,
+ originalLine: original != null && original.line,
+ originalColumn: original != null && original.column,
+ source: source,
+ name: name
+ });
+ };
+
+ /**
+ * Set the source content for a source file.
+ */
+ SourceMapGenerator.prototype.setSourceContent =
+ function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
+ var source = aSourceFile;
+ if (this._sourceRoot != null) {
+ source = util.relative(this._sourceRoot, source);
+ }
+
+ if (aSourceContent != null) {
+ // Add the source content to the _sourcesContents map.
+ // Create a new _sourcesContents map if the property is null.
+ if (!this._sourcesContents) {
+ this._sourcesContents = Object.create(null);
+ }
+ this._sourcesContents[util.toSetString(source)] = aSourceContent;
+ } else if (this._sourcesContents) {
+ // Remove the source file from the _sourcesContents map.
+ // If the _sourcesContents map is empty, set the property to null.
+ delete this._sourcesContents[util.toSetString(source)];
+ if (Object.keys(this._sourcesContents).length === 0) {
+ this._sourcesContents = null;
+ }
+ }
+ };
+
+ /**
+ * Applies the mappings of a sub-source-map for a specific source file to the
+ * source map being generated. Each mapping to the supplied source file is
+ * rewritten using the supplied source map. Note: The resolution for the
+ * resulting mappings is the minimium of this map and the supplied map.
+ *
+ * @param aSourceMapConsumer The source map to be applied.
+ * @param aSourceFile Optional. The filename of the source file.
+ * If omitted, SourceMapConsumer's file property will be used.
+ * @param aSourceMapPath Optional. The dirname of the path to the source map
+ * to be applied. If relative, it is relative to the SourceMapConsumer.
+ * This parameter is needed when the two source maps aren't in the same
+ * directory, and the source map to be applied contains relative source
+ * paths. If so, those relative source paths need to be rewritten
+ * relative to the SourceMapGenerator.
+ */
+ SourceMapGenerator.prototype.applySourceMap =
+ function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
+ var sourceFile = aSourceFile;
+ // If aSourceFile is omitted, we will use the file property of the SourceMap
+ if (aSourceFile == null) {
+ if (aSourceMapConsumer.file == null) {
+ throw new Error(
+ 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
+ 'or the source map\'s "file" property. Both were omitted.'
+ );
+ }
+ sourceFile = aSourceMapConsumer.file;
+ }
+ var sourceRoot = this._sourceRoot;
+ // Make "sourceFile" relative if an absolute Url is passed.
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ // Applying the SourceMap can add and remove items from the sources and
+ // the names array.
+ var newSources = new ArraySet();
+ var newNames = new ArraySet();
+
+ // Find mappings for the "sourceFile"
+ this._mappings.unsortedForEach(function (mapping) {
+ if (mapping.source === sourceFile && mapping.originalLine != null) {
+ // Check if it can be mapped by the source map, then update the mapping.
+ var original = aSourceMapConsumer.originalPositionFor({
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ });
+ if (original.source != null) {
+ // Copy mapping
+ mapping.source = original.source;
+ if (aSourceMapPath != null) {
+ mapping.source = util.join(aSourceMapPath, mapping.source)
+ }
+ if (sourceRoot != null) {
+ mapping.source = util.relative(sourceRoot, mapping.source);
+ }
+ mapping.originalLine = original.line;
+ mapping.originalColumn = original.column;
+ if (original.name != null) {
+ mapping.name = original.name;
+ }
+ }
+ }
+
+ var source = mapping.source;
+ if (source != null && !newSources.has(source)) {
+ newSources.add(source);
+ }
+
+ var name = mapping.name;
+ if (name != null && !newNames.has(name)) {
+ newNames.add(name);
+ }
+
+ }, this);
+ this._sources = newSources;
+ this._names = newNames;
+
+ // Copy sourcesContents of applied map.
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aSourceMapPath != null) {
+ sourceFile = util.join(aSourceMapPath, sourceFile);
+ }
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ this.setSourceContent(sourceFile, content);
+ }
+ }, this);
+ };
+
+ /**
+ * A mapping can have one of the three levels of data:
+ *
+ * 1. Just the generated position.
+ * 2. The Generated position, original position, and original source.
+ * 3. Generated and original position, original source, as well as a name
+ * token.
+ *
+ * To maintain consistency, we validate that any new mapping being added falls
+ * in to one of these categories.
+ */
+ SourceMapGenerator.prototype._validateMapping =
+ function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
+ aName) {
+ // When aOriginal is truthy but has empty values for .line and .column,
+ // it is most likely a programmer error. In this case we throw a very
+ // specific error message to try to guide them the right way.
+ // For example: https://github.com/Polymer/polymer-bundler/pull/519
+ if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
+ throw new Error(
+ 'original.line and original.column are not numbers -- you probably meant to omit ' +
+ 'the original mapping entirely and only map the generated position. If so, pass ' +
+ 'null for the original mapping instead of an object with empty or null values.'
+ );
+ }
+
+ if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
+ && aGenerated.line > 0 && aGenerated.column >= 0
+ && !aOriginal && !aSource && !aName) {
+ // Case 1.
+ return;
+ }
+ else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
+ && aOriginal && 'line' in aOriginal && 'column' in aOriginal
+ && aGenerated.line > 0 && aGenerated.column >= 0
+ && aOriginal.line > 0 && aOriginal.column >= 0
+ && aSource) {
+ // Cases 2 and 3.
+ return;
+ }
+ else {
+ throw new Error('Invalid mapping: ' + JSON.stringify({
+ generated: aGenerated,
+ source: aSource,
+ original: aOriginal,
+ name: aName
+ }));
+ }
+ };
+
+ /**
+ * Serialize the accumulated mappings in to the stream of base 64 VLQs
+ * specified by the source map format.
+ */
+ SourceMapGenerator.prototype._serializeMappings =
+ function SourceMapGenerator_serializeMappings() {
+ var previousGeneratedColumn = 0;
+ var previousGeneratedLine = 1;
+ var previousOriginalColumn = 0;
+ var previousOriginalLine = 0;
+ var previousName = 0;
+ var previousSource = 0;
+ var result = '';
+ var next;
+ var mapping;
+ var nameIdx;
+ var sourceIdx;
+
+ var mappings = this._mappings.toArray();
+ for (var i = 0, len = mappings.length; i < len; i++) {
+ mapping = mappings[i];
+ next = ''
+
+ if (mapping.generatedLine !== previousGeneratedLine) {
+ previousGeneratedColumn = 0;
+ while (mapping.generatedLine !== previousGeneratedLine) {
+ next += ';';
+ previousGeneratedLine++;
+ }
+ }
+ else {
+ if (i > 0) {
+ if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
+ continue;
+ }
+ next += ',';
+ }
+ }
+
+ next += base64VLQ.encode(mapping.generatedColumn
+ - previousGeneratedColumn);
+ previousGeneratedColumn = mapping.generatedColumn;
+
+ if (mapping.source != null) {
+ sourceIdx = this._sources.indexOf(mapping.source);
+ next += base64VLQ.encode(sourceIdx - previousSource);
+ previousSource = sourceIdx;
+
+ // lines are stored 0-based in SourceMap spec version 3
+ next += base64VLQ.encode(mapping.originalLine - 1
+ - previousOriginalLine);
+ previousOriginalLine = mapping.originalLine - 1;
+
+ next += base64VLQ.encode(mapping.originalColumn
+ - previousOriginalColumn);
+ previousOriginalColumn = mapping.originalColumn;
+
+ if (mapping.name != null) {
+ nameIdx = this._names.indexOf(mapping.name);
+ next += base64VLQ.encode(nameIdx - previousName);
+ previousName = nameIdx;
+ }
+ }
+
+ result += next;
+ }
+
+ return result;
+ };
+
+ SourceMapGenerator.prototype._generateSourcesContent =
+ function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
+ return aSources.map(function (source) {
+ if (!this._sourcesContents) {
+ return null;
+ }
+ if (aSourceRoot != null) {
+ source = util.relative(aSourceRoot, source);
+ }
+ var key = util.toSetString(source);
+ return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
+ ? this._sourcesContents[key]
+ : null;
+ }, this);
+ };
+
+ /**
+ * Externalize the source map.
+ */
+ SourceMapGenerator.prototype.toJSON =
+ function SourceMapGenerator_toJSON() {
+ var map = {
+ version: this._version,
+ sources: this._sources.toArray(),
+ names: this._names.toArray(),
+ mappings: this._serializeMappings()
+ };
+ if (this._file != null) {
+ map.file = this._file;
+ }
+ if (this._sourceRoot != null) {
+ map.sourceRoot = this._sourceRoot;
+ }
+ if (this._sourcesContents) {
+ map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
+ }
+
+ return map;
+ };
+
+ /**
+ * Render the source map being generated to a string.
+ */
+ SourceMapGenerator.prototype.toString =
+ function SourceMapGenerator_toString() {
+ return JSON.stringify(this.toJSON());
+ };
+
+ exports.SourceMapGenerator = SourceMapGenerator;
+
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ *
+ * Based on the Base 64 VLQ implementation in Closure Compiler:
+ * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
+ *
+ * Copyright 2011 The Closure Compiler Authors. All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+ var base64 = __webpack_require__(3);
+
+ // A single base 64 digit can contain 6 bits of data. For the base 64 variable
+ // length quantities we use in the source map spec, the first bit is the sign,
+ // the next four bits are the actual value, and the 6th bit is the
+ // continuation bit. The continuation bit tells us whether there are more
+ // digits in this value following this digit.
+ //
+ // Continuation
+ // | Sign
+ // | |
+ // V V
+ // 101011
+
+ var VLQ_BASE_SHIFT = 5;
+
+ // binary: 100000
+ var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
+
+ // binary: 011111
+ var VLQ_BASE_MASK = VLQ_BASE - 1;
+
+ // binary: 100000
+ var VLQ_CONTINUATION_BIT = VLQ_BASE;
+
+ /**
+ * Converts from a two-complement value to a value where the sign bit is
+ * placed in the least significant bit. For example, as decimals:
+ * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
+ * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
+ */
+ function toVLQSigned(aValue) {
+ return aValue < 0
+ ? ((-aValue) << 1) + 1
+ : (aValue << 1) + 0;
+ }
+
+ /**
+ * Converts to a two-complement value from a value where the sign bit is
+ * placed in the least significant bit. For example, as decimals:
+ * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
+ * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
+ */
+ function fromVLQSigned(aValue) {
+ var isNegative = (aValue & 1) === 1;
+ var shifted = aValue >> 1;
+ return isNegative
+ ? -shifted
+ : shifted;
+ }
+
+ /**
+ * Returns the base 64 VLQ encoded value.
+ */
+ exports.encode = function base64VLQ_encode(aValue) {
+ var encoded = "";
+ var digit;
+
+ var vlq = toVLQSigned(aValue);
+
+ do {
+ digit = vlq & VLQ_BASE_MASK;
+ vlq >>>= VLQ_BASE_SHIFT;
+ if (vlq > 0) {
+ // There are still more digits in this value, so we must make sure the
+ // continuation bit is marked.
+ digit |= VLQ_CONTINUATION_BIT;
+ }
+ encoded += base64.encode(digit);
+ } while (vlq > 0);
+
+ return encoded;
+ };
+
+ /**
+ * Decodes the next base 64 VLQ value from the given string and returns the
+ * value and the rest of the string via the out parameter.
+ */
+ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
+ var strLen = aStr.length;
+ var result = 0;
+ var shift = 0;
+ var continuation, digit;
+
+ do {
+ if (aIndex >= strLen) {
+ throw new Error("Expected more digits in base 64 VLQ value.");
+ }
+
+ digit = base64.decode(aStr.charCodeAt(aIndex++));
+ if (digit === -1) {
+ throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
+ }
+
+ continuation = !!(digit & VLQ_CONTINUATION_BIT);
+ digit &= VLQ_BASE_MASK;
+ result = result + (digit << shift);
+ shift += VLQ_BASE_SHIFT;
+ } while (continuation);
+
+ aOutParam.value = fromVLQSigned(result);
+ aOutParam.rest = aIndex;
+ };
+
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
+
+ /**
+ * Encode an integer in the range of 0 to 63 to a single base 64 digit.
+ */
+ exports.encode = function (number) {
+ if (0 <= number && number < intToCharMap.length) {
+ return intToCharMap[number];
+ }
+ throw new TypeError("Must be between 0 and 63: " + number);
+ };
+
+ /**
+ * Decode a single base 64 character code digit to an integer. Returns -1 on
+ * failure.
+ */
+ exports.decode = function (charCode) {
+ var bigA = 65; // 'A'
+ var bigZ = 90; // 'Z'
+
+ var littleA = 97; // 'a'
+ var littleZ = 122; // 'z'
+
+ var zero = 48; // '0'
+ var nine = 57; // '9'
+
+ var plus = 43; // '+'
+ var slash = 47; // '/'
+
+ var littleOffset = 26;
+ var numberOffset = 52;
+
+ // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
+ if (bigA <= charCode && charCode <= bigZ) {
+ return (charCode - bigA);
+ }
+
+ // 26 - 51: abcdefghijklmnopqrstuvwxyz
+ if (littleA <= charCode && charCode <= littleZ) {
+ return (charCode - littleA + littleOffset);
+ }
+
+ // 52 - 61: 0123456789
+ if (zero <= charCode && charCode <= nine) {
+ return (charCode - zero + numberOffset);
+ }
+
+ // 62: +
+ if (charCode == plus) {
+ return 62;
+ }
+
+ // 63: /
+ if (charCode == slash) {
+ return 63;
+ }
+
+ // Invalid base64 digit.
+ return -1;
+ };
+
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ /**
+ * This is a helper function for getting values from parameter/options
+ * objects.
+ *
+ * @param args The object we are extracting values from
+ * @param name The name of the property we are getting.
+ * @param defaultValue An optional value to return if the property is missing
+ * from the object. If this is not specified and the property is missing, an
+ * error will be thrown.
+ */
+ function getArg(aArgs, aName, aDefaultValue) {
+ if (aName in aArgs) {
+ return aArgs[aName];
+ } else if (arguments.length === 3) {
+ return aDefaultValue;
+ } else {
+ throw new Error('"' + aName + '" is a required argument.');
+ }
+ }
+ exports.getArg = getArg;
+
+ var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
+ var dataUrlRegexp = /^data:.+\,.+$/;
+
+ function urlParse(aUrl) {
+ var match = aUrl.match(urlRegexp);
+ if (!match) {
+ return null;
+ }
+ return {
+ scheme: match[1],
+ auth: match[2],
+ host: match[3],
+ port: match[4],
+ path: match[5]
+ };
+ }
+ exports.urlParse = urlParse;
+
+ function urlGenerate(aParsedUrl) {
+ var url = '';
+ if (aParsedUrl.scheme) {
+ url += aParsedUrl.scheme + ':';
+ }
+ url += '//';
+ if (aParsedUrl.auth) {
+ url += aParsedUrl.auth + '@';
+ }
+ if (aParsedUrl.host) {
+ url += aParsedUrl.host;
+ }
+ if (aParsedUrl.port) {
+ url += ":" + aParsedUrl.port
+ }
+ if (aParsedUrl.path) {
+ url += aParsedUrl.path;
+ }
+ return url;
+ }
+ exports.urlGenerate = urlGenerate;
+
+ /**
+ * Normalizes a path, or the path portion of a URL:
+ *
+ * - Replaces consecutive slashes with one slash.
+ * - Removes unnecessary '.' parts.
+ * - Removes unnecessary '<dir>/..' parts.
+ *
+ * Based on code in the Node.js 'path' core module.
+ *
+ * @param aPath The path or url to normalize.
+ */
+ function normalize(aPath) {
+ var path = aPath;
+ var url = urlParse(aPath);
+ if (url) {
+ if (!url.path) {
+ return aPath;
+ }
+ path = url.path;
+ }
+ var isAbsolute = exports.isAbsolute(path);
+
+ var parts = path.split(/\/+/);
+ for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
+ part = parts[i];
+ if (part === '.') {
+ parts.splice(i, 1);
+ } else if (part === '..') {
+ up++;
+ } else if (up > 0) {
+ if (part === '') {
+ // The first part is blank if the path is absolute. Trying to go
+ // above the root is a no-op. Therefore we can remove all '..' parts
+ // directly after the root.
+ parts.splice(i + 1, up);
+ up = 0;
+ } else {
+ parts.splice(i, 2);
+ up--;
+ }
+ }
+ }
+ path = parts.join('/');
+
+ if (path === '') {
+ path = isAbsolute ? '/' : '.';
+ }
+
+ if (url) {
+ url.path = path;
+ return urlGenerate(url);
+ }
+ return path;
+ }
+ exports.normalize = normalize;
+
+ /**
+ * Joins two paths/URLs.
+ *
+ * @param aRoot The root path or URL.
+ * @param aPath The path or URL to be joined with the root.
+ *
+ * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
+ * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
+ * first.
+ * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
+ * is updated with the result and aRoot is returned. Otherwise the result
+ * is returned.
+ * - If aPath is absolute, the result is aPath.
+ * - Otherwise the two paths are joined with a slash.
+ * - Joining for example 'http://' and 'www.example.com' is also supported.
+ */
+ function join(aRoot, aPath) {
+ if (aRoot === "") {
+ aRoot = ".";
+ }
+ if (aPath === "") {
+ aPath = ".";
+ }
+ var aPathUrl = urlParse(aPath);
+ var aRootUrl = urlParse(aRoot);
+ if (aRootUrl) {
+ aRoot = aRootUrl.path || '/';
+ }
+
+ // `join(foo, '//www.example.org')`
+ if (aPathUrl && !aPathUrl.scheme) {
+ if (aRootUrl) {
+ aPathUrl.scheme = aRootUrl.scheme;
+ }
+ return urlGenerate(aPathUrl);
+ }
+
+ if (aPathUrl || aPath.match(dataUrlRegexp)) {
+ return aPath;
+ }
+
+ // `join('http://', 'www.example.com')`
+ if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
+ aRootUrl.host = aPath;
+ return urlGenerate(aRootUrl);
+ }
+
+ var joined = aPath.charAt(0) === '/'
+ ? aPath
+ : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
+
+ if (aRootUrl) {
+ aRootUrl.path = joined;
+ return urlGenerate(aRootUrl);
+ }
+ return joined;
+ }
+ exports.join = join;
+
+ exports.isAbsolute = function (aPath) {
+ return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
+ };
+
+ /**
+ * Make a path relative to a URL or another path.
+ *
+ * @param aRoot The root path or URL.
+ * @param aPath The path or URL to be made relative to aRoot.
+ */
+ function relative(aRoot, aPath) {
+ if (aRoot === "") {
+ aRoot = ".";
+ }
+
+ aRoot = aRoot.replace(/\/$/, '');
+
+ // It is possible for the path to be above the root. In this case, simply
+ // checking whether the root is a prefix of the path won't work. Instead, we
+ // need to remove components from the root one by one, until either we find
+ // a prefix that fits, or we run out of components to remove.
+ var level = 0;
+ while (aPath.indexOf(aRoot + '/') !== 0) {
+ var index = aRoot.lastIndexOf("/");
+ if (index < 0) {
+ return aPath;
+ }
+
+ // If the only part of the root that is left is the scheme (i.e. http://,
+ // file:///, etc.), one or more slashes (/), or simply nothing at all, we
+ // have exhausted all components, so the path is not relative to the root.
+ aRoot = aRoot.slice(0, index);
+ if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
+ return aPath;
+ }
+
+ ++level;
+ }
+
+ // Make sure we add a "../" for each component we removed from the root.
+ return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
+ }
+ exports.relative = relative;
+
+ var supportsNullProto = (function () {
+ var obj = Object.create(null);
+ return !('__proto__' in obj);
+ }());
+
+ function identity (s) {
+ return s;
+ }
+
+ /**
+ * Because behavior goes wacky when you set `__proto__` on objects, we
+ * have to prefix all the strings in our set with an arbitrary character.
+ *
+ * See https://github.com/mozilla/source-map/pull/31 and
+ * https://github.com/mozilla/source-map/issues/30
+ *
+ * @param String aStr
+ */
+ function toSetString(aStr) {
+ if (isProtoString(aStr)) {
+ return '$' + aStr;
+ }
+
+ return aStr;
+ }
+ exports.toSetString = supportsNullProto ? identity : toSetString;
+
+ function fromSetString(aStr) {
+ if (isProtoString(aStr)) {
+ return aStr.slice(1);
+ }
+
+ return aStr;
+ }
+ exports.fromSetString = supportsNullProto ? identity : fromSetString;
+
+ function isProtoString(s) {
+ if (!s) {
+ return false;
+ }
+
+ var length = s.length;
+
+ if (length < 9 /* "__proto__".length */) {
+ return false;
+ }
+
+ if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 2) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
+ s.charCodeAt(length - 4) !== 116 /* 't' */ ||
+ s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
+ s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
+ s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
+ s.charCodeAt(length - 8) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 9) !== 95 /* '_' */) {
+ return false;
+ }
+
+ for (var i = length - 10; i >= 0; i--) {
+ if (s.charCodeAt(i) !== 36 /* '$' */) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Comparator between two mappings where the original positions are compared.
+ *
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
+ * mappings with the same original source/line/column, but different generated
+ * line and column the same. Useful when searching for a mapping with a
+ * stubbed out mapping.
+ */
+ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
+ var cmp = mappingA.source - mappingB.source;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0 || onlyCompareOriginal) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return mappingA.name - mappingB.name;
+ }
+ exports.compareByOriginalPositions = compareByOriginalPositions;
+
+ /**
+ * Comparator between two mappings with deflated source and name indices where
+ * the generated positions are compared.
+ *
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
+ * mappings with the same generated line and column, but different
+ * source/name/original line and column the same. Useful when searching for a
+ * mapping with a stubbed out mapping.
+ */
+ function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0 || onlyCompareGenerated) {
+ return cmp;
+ }
+
+ cmp = mappingA.source - mappingB.source;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return mappingA.name - mappingB.name;
+ }
+ exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
+
+ function strcmp(aStr1, aStr2) {
+ if (aStr1 === aStr2) {
+ return 0;
+ }
+
+ if (aStr1 > aStr2) {
+ return 1;
+ }
+
+ return -1;
+ }
+
+ /**
+ * Comparator between two mappings with inflated source and name strings where
+ * the generated positions are compared.
+ */
+ function compareByGeneratedPositionsInflated(mappingA, mappingB) {
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = strcmp(mappingA.source, mappingB.source);
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return strcmp(mappingA.name, mappingB.name);
+ }
+ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
+
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var util = __webpack_require__(4);
+ var has = Object.prototype.hasOwnProperty;
+ var hasNativeMap = typeof Map !== "undefined";
+
+ /**
+ * A data structure which is a combination of an array and a set. Adding a new
+ * member is O(1), testing for membership is O(1), and finding the index of an
+ * element is O(1). Removing elements from the set is not supported. Only
+ * strings are supported for membership.
+ */
+ function ArraySet() {
+ this._array = [];
+ this._set = hasNativeMap ? new Map() : Object.create(null);
+ }
+
+ /**
+ * Static method for creating ArraySet instances from an existing array.
+ */
+ ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
+ var set = new ArraySet();
+ for (var i = 0, len = aArray.length; i < len; i++) {
+ set.add(aArray[i], aAllowDuplicates);
+ }
+ return set;
+ };
+
+ /**
+ * Return how many unique items are in this ArraySet. If duplicates have been
+ * added, than those do not count towards the size.
+ *
+ * @returns Number
+ */
+ ArraySet.prototype.size = function ArraySet_size() {
+ return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
+ };
+
+ /**
+ * Add the given string to this set.
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
+ var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
+ var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
+ var idx = this._array.length;
+ if (!isDuplicate || aAllowDuplicates) {
+ this._array.push(aStr);
+ }
+ if (!isDuplicate) {
+ if (hasNativeMap) {
+ this._set.set(aStr, idx);
+ } else {
+ this._set[sStr] = idx;
+ }
+ }
+ };
+
+ /**
+ * Is the given string a member of this set?
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.has = function ArraySet_has(aStr) {
+ if (hasNativeMap) {
+ return this._set.has(aStr);
+ } else {
+ var sStr = util.toSetString(aStr);
+ return has.call(this._set, sStr);
+ }
+ };
+
+ /**
+ * What is the index of the given string in the array?
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
+ if (hasNativeMap) {
+ var idx = this._set.get(aStr);
+ if (idx >= 0) {
+ return idx;
+ }
+ } else {
+ var sStr = util.toSetString(aStr);
+ if (has.call(this._set, sStr)) {
+ return this._set[sStr];
+ }
+ }
+
+ throw new Error('"' + aStr + '" is not in the set.');
+ };
+
+ /**
+ * What is the element at the given index?
+ *
+ * @param Number aIdx
+ */
+ ArraySet.prototype.at = function ArraySet_at(aIdx) {
+ if (aIdx >= 0 && aIdx < this._array.length) {
+ return this._array[aIdx];
+ }
+ throw new Error('No element indexed by ' + aIdx);
+ };
+
+ /**
+ * Returns the array representation of this set (which has the proper indices
+ * indicated by indexOf). Note that this is a copy of the internal array used
+ * for storing the members so that no one can mess with internal state.
+ */
+ ArraySet.prototype.toArray = function ArraySet_toArray() {
+ return this._array.slice();
+ };
+
+ exports.ArraySet = ArraySet;
+
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2014 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var util = __webpack_require__(4);
+
+ /**
+ * Determine whether mappingB is after mappingA with respect to generated
+ * position.
+ */
+ function generatedPositionAfter(mappingA, mappingB) {
+ // Optimized for most common case
+ var lineA = mappingA.generatedLine;
+ var lineB = mappingB.generatedLine;
+ var columnA = mappingA.generatedColumn;
+ var columnB = mappingB.generatedColumn;
+ return lineB > lineA || lineB == lineA && columnB >= columnA ||
+ util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
+ }
+
+ /**
+ * A data structure to provide a sorted view of accumulated mappings in a
+ * performance conscious manner. It trades a neglibable overhead in general
+ * case for a large speedup in case of mappings being added in order.
+ */
+ function MappingList() {
+ this._array = [];
+ this._sorted = true;
+ // Serves as infimum
+ this._last = {generatedLine: -1, generatedColumn: 0};
+ }
+
+ /**
+ * Iterate through internal items. This method takes the same arguments that
+ * `Array.prototype.forEach` takes.
+ *
+ * NOTE: The order of the mappings is NOT guaranteed.
+ */
+ MappingList.prototype.unsortedForEach =
+ function MappingList_forEach(aCallback, aThisArg) {
+ this._array.forEach(aCallback, aThisArg);
+ };
+
+ /**
+ * Add the given source mapping.
+ *
+ * @param Object aMapping
+ */
+ MappingList.prototype.add = function MappingList_add(aMapping) {
+ if (generatedPositionAfter(this._last, aMapping)) {
+ this._last = aMapping;
+ this._array.push(aMapping);
+ } else {
+ this._sorted = false;
+ this._array.push(aMapping);
+ }
+ };
+
+ /**
+ * Returns the flat, sorted array of mappings. The mappings are sorted by
+ * generated position.
+ *
+ * WARNING: This method returns internal data without copying, for
+ * performance. The return value must NOT be mutated, and should be treated as
+ * an immutable borrow. If you want to take ownership, you must make your own
+ * copy.
+ */
+ MappingList.prototype.toArray = function MappingList_toArray() {
+ if (!this._sorted) {
+ this._array.sort(util.compareByGeneratedPositionsInflated);
+ this._sorted = true;
+ }
+ return this._array;
+ };
+
+ exports.MappingList = MappingList;
+
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var util = __webpack_require__(4);
+ var binarySearch = __webpack_require__(8);
+ var ArraySet = __webpack_require__(5).ArraySet;
+ var base64VLQ = __webpack_require__(2);
+ var quickSort = __webpack_require__(9).quickSort;
+
+ function SourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ return sourceMap.sections != null
+ ? new IndexedSourceMapConsumer(sourceMap)
+ : new BasicSourceMapConsumer(sourceMap);
+ }
+
+ SourceMapConsumer.fromSourceMap = function(aSourceMap) {
+ return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
+ }
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ SourceMapConsumer.prototype._version = 3;
+
+ // `__generatedMappings` and `__originalMappings` are arrays that hold the
+ // parsed mapping coordinates from the source map's "mappings" attribute. They
+ // are lazily instantiated, accessed via the `_generatedMappings` and
+ // `_originalMappings` getters respectively, and we only parse the mappings
+ // and create these arrays once queried for a source location. We jump through
+ // these hoops because there can be many thousands of mappings, and parsing
+ // them is expensive, so we only want to do it if we must.
+ //
+ // Each object in the arrays is of the form:
+ //
+ // {
+ // generatedLine: The line number in the generated code,
+ // generatedColumn: The column number in the generated code,
+ // source: The path to the original source file that generated this
+ // chunk of code,
+ // originalLine: The line number in the original source that
+ // corresponds to this chunk of generated code,
+ // originalColumn: The column number in the original source that
+ // corresponds to this chunk of generated code,
+ // name: The name of the original symbol which generated this chunk of
+ // code.
+ // }
+ //
+ // All properties except for `generatedLine` and `generatedColumn` can be
+ // `null`.
+ //
+ // `_generatedMappings` is ordered by the generated positions.
+ //
+ // `_originalMappings` is ordered by the original positions.
+
+ SourceMapConsumer.prototype.__generatedMappings = null;
+ Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
+ get: function () {
+ if (!this.__generatedMappings) {
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+
+ return this.__generatedMappings;
+ }
+ });
+
+ SourceMapConsumer.prototype.__originalMappings = null;
+ Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
+ get: function () {
+ if (!this.__originalMappings) {
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+
+ return this.__originalMappings;
+ }
+ });
+
+ SourceMapConsumer.prototype._charIsMappingSeparator =
+ function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
+ var c = aStr.charAt(index);
+ return c === ";" || c === ",";
+ };
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ SourceMapConsumer.prototype._parseMappings =
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ throw new Error("Subclasses must implement _parseMappings");
+ };
+
+ SourceMapConsumer.GENERATED_ORDER = 1;
+ SourceMapConsumer.ORIGINAL_ORDER = 2;
+
+ SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
+ SourceMapConsumer.LEAST_UPPER_BOUND = 2;
+
+ /**
+ * Iterate over each mapping between an original source/line/column and a
+ * generated line/column in this source map.
+ *
+ * @param Function aCallback
+ * The function that is called with each mapping.
+ * @param Object aContext
+ * Optional. If specified, this object will be the value of `this` every
+ * time that `aCallback` is called.
+ * @param aOrder
+ * Either `SourceMapConsumer.GENERATED_ORDER` or
+ * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
+ * iterate over the mappings sorted by the generated file's line/column
+ * order or the original's source/line/column order, respectively. Defaults to
+ * `SourceMapConsumer.GENERATED_ORDER`.
+ */
+ SourceMapConsumer.prototype.eachMapping =
+ function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
+ var context = aContext || null;
+ var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
+
+ var mappings;
+ switch (order) {
+ case SourceMapConsumer.GENERATED_ORDER:
+ mappings = this._generatedMappings;
+ break;
+ case SourceMapConsumer.ORIGINAL_ORDER:
+ mappings = this._originalMappings;
+ break;
+ default:
+ throw new Error("Unknown order of iteration.");
+ }
+
+ var sourceRoot = this.sourceRoot;
+ mappings.map(function (mapping) {
+ var source = mapping.source === null ? null : this._sources.at(mapping.source);
+ if (source != null && sourceRoot != null) {
+ source = util.join(sourceRoot, source);
+ }
+ return {
+ source: source,
+ generatedLine: mapping.generatedLine,
+ generatedColumn: mapping.generatedColumn,
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: mapping.name === null ? null : this._names.at(mapping.name)
+ };
+ }, this).forEach(aCallback, context);
+ };
+
+ /**
+ * Returns all generated line and column information for the original source,
+ * line, and column provided. If no column is provided, returns all mappings
+ * corresponding to a either the line we are searching for or the next
+ * closest line that has any mappings. Otherwise, returns all mappings
+ * corresponding to the given line and either the column we are searching for
+ * or the next closest column that has any offsets.
+ *
+ * The only argument is an object with the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: Optional. the column number in the original source.
+ *
+ * and an array of objects is returned, each with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ SourceMapConsumer.prototype.allGeneratedPositionsFor =
+ function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
+ var line = util.getArg(aArgs, 'line');
+
+ // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
+ // returns the index of the closest mapping less than the needle. By
+ // setting needle.originalColumn to 0, we thus find the last mapping for
+ // the given line, provided such a mapping exists.
+ var needle = {
+ source: util.getArg(aArgs, 'source'),
+ originalLine: line,
+ originalColumn: util.getArg(aArgs, 'column', 0)
+ };
+
+ if (this.sourceRoot != null) {
+ needle.source = util.relative(this.sourceRoot, needle.source);
+ }
+ if (!this._sources.has(needle.source)) {
+ return [];
+ }
+ needle.source = this._sources.indexOf(needle.source);
+
+ var mappings = [];
+
+ var index = this._findMapping(needle,
+ this._originalMappings,
+ "originalLine",
+ "originalColumn",
+ util.compareByOriginalPositions,
+ binarySearch.LEAST_UPPER_BOUND);
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+
+ if (aArgs.column === undefined) {
+ var originalLine = mapping.originalLine;
+
+ // Iterate until either we run out of mappings, or we run into
+ // a mapping for a different line than the one we found. Since
+ // mappings are sorted, this is guaranteed to find all mappings for
+ // the line we found.
+ while (mapping && mapping.originalLine === originalLine) {
+ mappings.push({
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ });
+
+ mapping = this._originalMappings[++index];
+ }
+ } else {
+ var originalColumn = mapping.originalColumn;
+
+ // Iterate until either we run out of mappings, or we run into
+ // a mapping for a different line than the one we were searching for.
+ // Since mappings are sorted, this is guaranteed to find all mappings for
+ // the line we are searching for.
+ while (mapping &&
+ mapping.originalLine === line &&
+ mapping.originalColumn == originalColumn) {
+ mappings.push({
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ });
+
+ mapping = this._originalMappings[++index];
+ }
+ }
+ }
+
+ return mappings;
+ };
+
+ exports.SourceMapConsumer = SourceMapConsumer;
+
+ /**
+ * A BasicSourceMapConsumer instance represents a parsed source map which we can
+ * query for information about the original file positions by giving it a file
+ * position in the generated source.
+ *
+ * The only parameter is the raw source map (either as a JSON string, or
+ * already parsed to an object). According to the spec, source maps have the
+ * following attributes:
+ *
+ * - version: Which version of the source map spec this map is following.
+ * - sources: An array of URLs to the original source files.
+ * - names: An array of identifiers which can be referrenced by individual mappings.
+ * - sourceRoot: Optional. The URL root from which all sources are relative.
+ * - sourcesContent: Optional. An array of contents of the original source files.
+ * - mappings: A string of base64 VLQs which contain the actual mappings.
+ * - file: Optional. The generated file this source map is associated with.
+ *
+ * Here is an example source map, taken from the source map spec[0]:
+ *
+ * {
+ * version : 3,
+ * file: "out.js",
+ * sourceRoot : "",
+ * sources: ["foo.js", "bar.js"],
+ * names: ["src", "maps", "are", "fun"],
+ * mappings: "AA,AB;;ABCDE;"
+ * }
+ *
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
+ */
+ function BasicSourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ var version = util.getArg(sourceMap, 'version');
+ var sources = util.getArg(sourceMap, 'sources');
+ // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
+ // requires the array) to play nice here.
+ var names = util.getArg(sourceMap, 'names', []);
+ var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
+ var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
+ var mappings = util.getArg(sourceMap, 'mappings');
+ var file = util.getArg(sourceMap, 'file', null);
+
+ // Once again, Sass deviates from the spec and supplies the version as a
+ // string rather than a number, so we use loose equality checking here.
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+
+ sources = sources
+ .map(String)
+ // Some source maps produce relative source paths like "./foo.js" instead of
+ // "foo.js". Normalize these first so that future comparisons will succeed.
+ // See bugzil.la/1090768.
+ .map(util.normalize)
+ // Always ensure that absolute sources are internally stored relative to
+ // the source root, if the source root is absolute. Not doing this would
+ // be particularly problematic when the source root is a prefix of the
+ // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
+ .map(function (source) {
+ return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
+ ? util.relative(sourceRoot, source)
+ : source;
+ });
+
+ // Pass `true` below to allow duplicate names and sources. While source maps
+ // are intended to be compressed and deduplicated, the TypeScript compiler
+ // sometimes generates source maps with duplicates in them. See Github issue
+ // #72 and bugzil.la/889492.
+ this._names = ArraySet.fromArray(names.map(String), true);
+ this._sources = ArraySet.fromArray(sources, true);
+
+ this.sourceRoot = sourceRoot;
+ this.sourcesContent = sourcesContent;
+ this._mappings = mappings;
+ this.file = file;
+ }
+
+ BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
+ BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
+
+ /**
+ * Create a BasicSourceMapConsumer from a SourceMapGenerator.
+ *
+ * @param SourceMapGenerator aSourceMap
+ * The source map that will be consumed.
+ * @returns BasicSourceMapConsumer
+ */
+ BasicSourceMapConsumer.fromSourceMap =
+ function SourceMapConsumer_fromSourceMap(aSourceMap) {
+ var smc = Object.create(BasicSourceMapConsumer.prototype);
+
+ var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
+ var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
+ smc.sourceRoot = aSourceMap._sourceRoot;
+ smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
+ smc.sourceRoot);
+ smc.file = aSourceMap._file;
+
+ // Because we are modifying the entries (by converting string sources and
+ // names to indices into the sources and names ArraySets), we have to make
+ // a copy of the entry or else bad things happen. Shared mutable state
+ // strikes again! See github issue #191.
+
+ var generatedMappings = aSourceMap._mappings.toArray().slice();
+ var destGeneratedMappings = smc.__generatedMappings = [];
+ var destOriginalMappings = smc.__originalMappings = [];
+
+ for (var i = 0, length = generatedMappings.length; i < length; i++) {
+ var srcMapping = generatedMappings[i];
+ var destMapping = new Mapping;
+ destMapping.generatedLine = srcMapping.generatedLine;
+ destMapping.generatedColumn = srcMapping.generatedColumn;
+
+ if (srcMapping.source) {
+ destMapping.source = sources.indexOf(srcMapping.source);
+ destMapping.originalLine = srcMapping.originalLine;
+ destMapping.originalColumn = srcMapping.originalColumn;
+
+ if (srcMapping.name) {
+ destMapping.name = names.indexOf(srcMapping.name);
+ }
+
+ destOriginalMappings.push(destMapping);
+ }
+
+ destGeneratedMappings.push(destMapping);
+ }
+
+ quickSort(smc.__originalMappings, util.compareByOriginalPositions);
+
+ return smc;
+ };
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ BasicSourceMapConsumer.prototype._version = 3;
+
+ /**
+ * The list of original sources.
+ */
+ Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ return this._sources.toArray().map(function (s) {
+ return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
+ }, this);
+ }
+ });
+
+ /**
+ * Provide the JIT with a nice shape / hidden class.
+ */
+ function Mapping() {
+ this.generatedLine = 0;
+ this.generatedColumn = 0;
+ this.source = null;
+ this.originalLine = null;
+ this.originalColumn = null;
+ this.name = null;
+ }
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ BasicSourceMapConsumer.prototype._parseMappings =
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ var generatedLine = 1;
+ var previousGeneratedColumn = 0;
+ var previousOriginalLine = 0;
+ var previousOriginalColumn = 0;
+ var previousSource = 0;
+ var previousName = 0;
+ var length = aStr.length;
+ var index = 0;
+ var cachedSegments = {};
+ var temp = {};
+ var originalMappings = [];
+ var generatedMappings = [];
+ var mapping, str, segment, end, value;
+
+ while (index < length) {
+ if (aStr.charAt(index) === ';') {
+ generatedLine++;
+ index++;
+ previousGeneratedColumn = 0;
+ }
+ else if (aStr.charAt(index) === ',') {
+ index++;
+ }
+ else {
+ mapping = new Mapping();
+ mapping.generatedLine = generatedLine;
+
+ // Because each offset is encoded relative to the previous one,
+ // many segments often have the same encoding. We can exploit this
+ // fact by caching the parsed variable length fields of each segment,
+ // allowing us to avoid a second parse if we encounter the same
+ // segment again.
+ for (end = index; end < length; end++) {
+ if (this._charIsMappingSeparator(aStr, end)) {
+ break;
+ }
+ }
+ str = aStr.slice(index, end);
+
+ segment = cachedSegments[str];
+ if (segment) {
+ index += str.length;
+ } else {
+ segment = [];
+ while (index < end) {
+ base64VLQ.decode(aStr, index, temp);
+ value = temp.value;
+ index = temp.rest;
+ segment.push(value);
+ }
+
+ if (segment.length === 2) {
+ throw new Error('Found a source, but no line and column');
+ }
+
+ if (segment.length === 3) {
+ throw new Error('Found a source and line, but no column');
+ }
+
+ cachedSegments[str] = segment;
+ }
+
+ // Generated column.
+ mapping.generatedColumn = previousGeneratedColumn + segment[0];
+ previousGeneratedColumn = mapping.generatedColumn;
+
+ if (segment.length > 1) {
+ // Original source.
+ mapping.source = previousSource + segment[1];
+ previousSource += segment[1];
+
+ // Original line.
+ mapping.originalLine = previousOriginalLine + segment[2];
+ previousOriginalLine = mapping.originalLine;
+ // Lines are stored 0-based
+ mapping.originalLine += 1;
+
+ // Original column.
+ mapping.originalColumn = previousOriginalColumn + segment[3];
+ previousOriginalColumn = mapping.originalColumn;
+
+ if (segment.length > 4) {
+ // Original name.
+ mapping.name = previousName + segment[4];
+ previousName += segment[4];
+ }
+ }
+
+ generatedMappings.push(mapping);
+ if (typeof mapping.originalLine === 'number') {
+ originalMappings.push(mapping);
+ }
+ }
+ }
+
+ quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
+ this.__generatedMappings = generatedMappings;
+
+ quickSort(originalMappings, util.compareByOriginalPositions);
+ this.__originalMappings = originalMappings;
+ };
+
+ /**
+ * Find the mapping that best matches the hypothetical "needle" mapping that
+ * we are searching for in the given "haystack" of mappings.
+ */
+ BasicSourceMapConsumer.prototype._findMapping =
+ function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
+ aColumnName, aComparator, aBias) {
+ // To return the position we are searching for, we must first find the
+ // mapping for the given position and then return the opposite position it
+ // points to. Because the mappings are sorted, we can use binary search to
+ // find the best mapping.
+
+ if (aNeedle[aLineName] <= 0) {
+ throw new TypeError('Line must be greater than or equal to 1, got '
+ + aNeedle[aLineName]);
+ }
+ if (aNeedle[aColumnName] < 0) {
+ throw new TypeError('Column must be greater than or equal to 0, got '
+ + aNeedle[aColumnName]);
+ }
+
+ return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
+ };
+
+ /**
+ * Compute the last column for each generated mapping. The last column is
+ * inclusive.
+ */
+ BasicSourceMapConsumer.prototype.computeColumnSpans =
+ function SourceMapConsumer_computeColumnSpans() {
+ for (var index = 0; index < this._generatedMappings.length; ++index) {
+ var mapping = this._generatedMappings[index];
+
+ // Mappings do not contain a field for the last generated columnt. We
+ // can come up with an optimistic estimate, however, by assuming that
+ // mappings are contiguous (i.e. given two consecutive mappings, the
+ // first mapping ends where the second one starts).
+ if (index + 1 < this._generatedMappings.length) {
+ var nextMapping = this._generatedMappings[index + 1];
+
+ if (mapping.generatedLine === nextMapping.generatedLine) {
+ mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
+ continue;
+ }
+ }
+
+ // The last mapping for each line spans the entire line.
+ mapping.lastGeneratedColumn = Infinity;
+ }
+ };
+
+ /**
+ * Returns the original source, line, and column information for the generated
+ * source's line and column positions provided. The only argument is an object
+ * with the following properties:
+ *
+ * - line: The line number in the generated source.
+ * - column: The column number in the generated source.
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - source: The original source file, or null.
+ * - line: The line number in the original source, or null.
+ * - column: The column number in the original source, or null.
+ * - name: The original identifier, or null.
+ */
+ BasicSourceMapConsumer.prototype.originalPositionFor =
+ function SourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+
+ var index = this._findMapping(
+ needle,
+ this._generatedMappings,
+ "generatedLine",
+ "generatedColumn",
+ util.compareByGeneratedPositionsDeflated,
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
+ );
+
+ if (index >= 0) {
+ var mapping = this._generatedMappings[index];
+
+ if (mapping.generatedLine === needle.generatedLine) {
+ var source = util.getArg(mapping, 'source', null);
+ if (source !== null) {
+ source = this._sources.at(source);
+ if (this.sourceRoot != null) {
+ source = util.join(this.sourceRoot, source);
+ }
+ }
+ var name = util.getArg(mapping, 'name', null);
+ if (name !== null) {
+ name = this._names.at(name);
+ }
+ return {
+ source: source,
+ line: util.getArg(mapping, 'originalLine', null),
+ column: util.getArg(mapping, 'originalColumn', null),
+ name: name
+ };
+ }
+ }
+
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ };
+
+ /**
+ * Return true if we have the source content for every source in the source
+ * map, false otherwise.
+ */
+ BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
+ function BasicSourceMapConsumer_hasContentsOfAllSources() {
+ if (!this.sourcesContent) {
+ return false;
+ }
+ return this.sourcesContent.length >= this._sources.size() &&
+ !this.sourcesContent.some(function (sc) { return sc == null; });
+ };
+
+ /**
+ * Returns the original source content. The only argument is the url of the
+ * original source file. Returns null if no original source content is
+ * available.
+ */
+ BasicSourceMapConsumer.prototype.sourceContentFor =
+ function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
+ if (!this.sourcesContent) {
+ return null;
+ }
+
+ if (this.sourceRoot != null) {
+ aSource = util.relative(this.sourceRoot, aSource);
+ }
+
+ if (this._sources.has(aSource)) {
+ return this.sourcesContent[this._sources.indexOf(aSource)];
+ }
+
+ var url;
+ if (this.sourceRoot != null
+ && (url = util.urlParse(this.sourceRoot))) {
+ // XXX: file:// URIs and absolute paths lead to unexpected behavior for
+ // many users. We can help them out when they expect file:// URIs to
+ // behave like it would if they were running a local HTTP server. See
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
+ var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
+ if (url.scheme == "file"
+ && this._sources.has(fileUriAbsPath)) {
+ return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
+ }
+
+ if ((!url.path || url.path == "/")
+ && this._sources.has("/" + aSource)) {
+ return this.sourcesContent[this._sources.indexOf("/" + aSource)];
+ }
+ }
+
+ // This function is used recursively from
+ // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
+ // don't want to throw if we can't find the source - we just want to
+ // return null, so we provide a flag to exit gracefully.
+ if (nullOnMissing) {
+ return null;
+ }
+ else {
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ }
+ };
+
+ /**
+ * Returns the generated line and column information for the original source,
+ * line, and column positions provided. The only argument is an object with
+ * the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: The column number in the original source.
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ BasicSourceMapConsumer.prototype.generatedPositionFor =
+ function SourceMapConsumer_generatedPositionFor(aArgs) {
+ var source = util.getArg(aArgs, 'source');
+ if (this.sourceRoot != null) {
+ source = util.relative(this.sourceRoot, source);
+ }
+ if (!this._sources.has(source)) {
+ return {
+ line: null,
+ column: null,
+ lastColumn: null
+ };
+ }
+ source = this._sources.indexOf(source);
+
+ var needle = {
+ source: source,
+ originalLine: util.getArg(aArgs, 'line'),
+ originalColumn: util.getArg(aArgs, 'column')
+ };
+
+ var index = this._findMapping(
+ needle,
+ this._originalMappings,
+ "originalLine",
+ "originalColumn",
+ util.compareByOriginalPositions,
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
+ );
+
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+
+ if (mapping.source === needle.source) {
+ return {
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ };
+ }
+ }
+
+ return {
+ line: null,
+ column: null,
+ lastColumn: null
+ };
+ };
+
+ exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
+
+ /**
+ * An IndexedSourceMapConsumer instance represents a parsed source map which
+ * we can query for information. It differs from BasicSourceMapConsumer in
+ * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
+ * input.
+ *
+ * The only parameter is a raw source map (either as a JSON string, or already
+ * parsed to an object). According to the spec for indexed source maps, they
+ * have the following attributes:
+ *
+ * - version: Which version of the source map spec this map is following.
+ * - file: Optional. The generated file this source map is associated with.
+ * - sections: A list of section definitions.
+ *
+ * Each value under the "sections" field has two fields:
+ * - offset: The offset into the original specified at which this section
+ * begins to apply, defined as an object with a "line" and "column"
+ * field.
+ * - map: A source map definition. This source map could also be indexed,
+ * but doesn't have to be.
+ *
+ * Instead of the "map" field, it's also possible to have a "url" field
+ * specifying a URL to retrieve a source map from, but that's currently
+ * unsupported.
+ *
+ * Here's an example source map, taken from the source map spec[0], but
+ * modified to omit a section which uses the "url" field.
+ *
+ * {
+ * version : 3,
+ * file: "app.js",
+ * sections: [{
+ * offset: {line:100, column:10},
+ * map: {
+ * version : 3,
+ * file: "section.js",
+ * sources: ["foo.js", "bar.js"],
+ * names: ["src", "maps", "are", "fun"],
+ * mappings: "AAAA,E;;ABCDE;"
+ * }
+ * }],
+ * }
+ *
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
+ */
+ function IndexedSourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ var version = util.getArg(sourceMap, 'version');
+ var sections = util.getArg(sourceMap, 'sections');
+
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+
+ this._sources = new ArraySet();
+ this._names = new ArraySet();
+
+ var lastOffset = {
+ line: -1,
+ column: 0
+ };
+ this._sections = sections.map(function (s) {
+ if (s.url) {
+ // The url field will require support for asynchronicity.
+ // See https://github.com/mozilla/source-map/issues/16
+ throw new Error('Support for url field in sections not implemented.');
+ }
+ var offset = util.getArg(s, 'offset');
+ var offsetLine = util.getArg(offset, 'line');
+ var offsetColumn = util.getArg(offset, 'column');
+
+ if (offsetLine < lastOffset.line ||
+ (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
+ throw new Error('Section offsets must be ordered and non-overlapping.');
+ }
+ lastOffset = offset;
+
+ return {
+ generatedOffset: {
+ // The offset fields are 0-based, but we use 1-based indices when
+ // encoding/decoding from VLQ.
+ generatedLine: offsetLine + 1,
+ generatedColumn: offsetColumn + 1
+ },
+ consumer: new SourceMapConsumer(util.getArg(s, 'map'))
+ }
+ });
+ }
+
+ IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
+ IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ IndexedSourceMapConsumer.prototype._version = 3;
+
+ /**
+ * The list of original sources.
+ */
+ Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ var sources = [];
+ for (var i = 0; i < this._sections.length; i++) {
+ for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
+ sources.push(this._sections[i].consumer.sources[j]);
+ }
+ }
+ return sources;
+ }
+ });
+
+ /**
+ * Returns the original source, line, and column information for the generated
+ * source's line and column positions provided. The only argument is an object
+ * with the following properties:
+ *
+ * - line: The line number in the generated source.
+ * - column: The column number in the generated source.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - source: The original source file, or null.
+ * - line: The line number in the original source, or null.
+ * - column: The column number in the original source, or null.
+ * - name: The original identifier, or null.
+ */
+ IndexedSourceMapConsumer.prototype.originalPositionFor =
+ function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+
+ // Find the section containing the generated position we're trying to map
+ // to an original position.
+ var sectionIndex = binarySearch.search(needle, this._sections,
+ function(needle, section) {
+ var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
+ if (cmp) {
+ return cmp;
+ }
+
+ return (needle.generatedColumn -
+ section.generatedOffset.generatedColumn);
+ });
+ var section = this._sections[sectionIndex];
+
+ if (!section) {
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ }
+
+ return section.consumer.originalPositionFor({
+ line: needle.generatedLine -
+ (section.generatedOffset.generatedLine - 1),
+ column: needle.generatedColumn -
+ (section.generatedOffset.generatedLine === needle.generatedLine
+ ? section.generatedOffset.generatedColumn - 1
+ : 0),
+ bias: aArgs.bias
+ });
+ };
+
+ /**
+ * Return true if we have the source content for every source in the source
+ * map, false otherwise.
+ */
+ IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
+ function IndexedSourceMapConsumer_hasContentsOfAllSources() {
+ return this._sections.every(function (s) {
+ return s.consumer.hasContentsOfAllSources();
+ });
+ };
+
+ /**
+ * Returns the original source content. The only argument is the url of the
+ * original source file. Returns null if no original source content is
+ * available.
+ */
+ IndexedSourceMapConsumer.prototype.sourceContentFor =
+ function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+
+ var content = section.consumer.sourceContentFor(aSource, true);
+ if (content) {
+ return content;
+ }
+ }
+ if (nullOnMissing) {
+ return null;
+ }
+ else {
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ }
+ };
+
+ /**
+ * Returns the generated line and column information for the original source,
+ * line, and column positions provided. The only argument is an object with
+ * the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: The column number in the original source.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ IndexedSourceMapConsumer.prototype.generatedPositionFor =
+ function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+
+ // Only consider this section if the requested source is in the list of
+ // sources of the consumer.
+ if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
+ continue;
+ }
+ var generatedPosition = section.consumer.generatedPositionFor(aArgs);
+ if (generatedPosition) {
+ var ret = {
+ line: generatedPosition.line +
+ (section.generatedOffset.generatedLine - 1),
+ column: generatedPosition.column +
+ (section.generatedOffset.generatedLine === generatedPosition.line
+ ? section.generatedOffset.generatedColumn - 1
+ : 0)
+ };
+ return ret;
+ }
+ }
+
+ return {
+ line: null,
+ column: null
+ };
+ };
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ IndexedSourceMapConsumer.prototype._parseMappings =
+ function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ this.__generatedMappings = [];
+ this.__originalMappings = [];
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+ var sectionMappings = section.consumer._generatedMappings;
+ for (var j = 0; j < sectionMappings.length; j++) {
+ var mapping = sectionMappings[j];
+
+ var source = section.consumer._sources.at(mapping.source);
+ if (section.consumer.sourceRoot !== null) {
+ source = util.join(section.consumer.sourceRoot, source);
+ }
+ this._sources.add(source);
+ source = this._sources.indexOf(source);
+
+ var name = section.consumer._names.at(mapping.name);
+ this._names.add(name);
+ name = this._names.indexOf(name);
+
+ // The mappings coming from the consumer for the section have
+ // generated positions relative to the start of the section, so we
+ // need to offset them to be relative to the start of the concatenated
+ // generated file.
+ var adjustedMapping = {
+ source: source,
+ generatedLine: mapping.generatedLine +
+ (section.generatedOffset.generatedLine - 1),
+ generatedColumn: mapping.generatedColumn +
+ (section.generatedOffset.generatedLine === mapping.generatedLine
+ ? section.generatedOffset.generatedColumn - 1
+ : 0),
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: name
+ };
+
+ this.__generatedMappings.push(adjustedMapping);
+ if (typeof adjustedMapping.originalLine === 'number') {
+ this.__originalMappings.push(adjustedMapping);
+ }
+ }
+ }
+
+ quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
+ quickSort(this.__originalMappings, util.compareByOriginalPositions);
+ };
+
+ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
+
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ exports.GREATEST_LOWER_BOUND = 1;
+ exports.LEAST_UPPER_BOUND = 2;
+
+ /**
+ * Recursive implementation of binary search.
+ *
+ * @param aLow Indices here and lower do not contain the needle.
+ * @param aHigh Indices here and higher do not contain the needle.
+ * @param aNeedle The element being searched for.
+ * @param aHaystack The non-empty array being searched.
+ * @param aCompare Function which takes two elements and returns -1, 0, or 1.
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ */
+ function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
+ // This function terminates when one of the following is true:
+ //
+ // 1. We find the exact element we are looking for.
+ //
+ // 2. We did not find the exact element, but we can return the index of
+ // the next-closest element.
+ //
+ // 3. We did not find the exact element, and there is no next-closest
+ // element than the one we are searching for, so we return -1.
+ var mid = Math.floor((aHigh - aLow) / 2) + aLow;
+ var cmp = aCompare(aNeedle, aHaystack[mid], true);
+ if (cmp === 0) {
+ // Found the element we are looking for.
+ return mid;
+ }
+ else if (cmp > 0) {
+ // Our needle is greater than aHaystack[mid].
+ if (aHigh - mid > 1) {
+ // The element is in the upper half.
+ return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
+ }
+
+ // The exact needle element was not found in this haystack. Determine if
+ // we are in termination case (3) or (2) and return the appropriate thing.
+ if (aBias == exports.LEAST_UPPER_BOUND) {
+ return aHigh < aHaystack.length ? aHigh : -1;
+ } else {
+ return mid;
+ }
+ }
+ else {
+ // Our needle is less than aHaystack[mid].
+ if (mid - aLow > 1) {
+ // The element is in the lower half.
+ return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
+ }
+
+ // we are in termination case (3) or (2) and return the appropriate thing.
+ if (aBias == exports.LEAST_UPPER_BOUND) {
+ return mid;
+ } else {
+ return aLow < 0 ? -1 : aLow;
+ }
+ }
+ }
+
+ /**
+ * This is an implementation of binary search which will always try and return
+ * the index of the closest element if there is no exact hit. This is because
+ * mappings between original and generated line/col pairs are single points,
+ * and there is an implicit region between each of them, so a miss just means
+ * that you aren't on the very start of a region.
+ *
+ * @param aNeedle The element you are looking for.
+ * @param aHaystack The array that is being searched.
+ * @param aCompare A function which takes the needle and an element in the
+ * array and returns -1, 0, or 1 depending on whether the needle is less
+ * than, equal to, or greater than the element, respectively.
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
+ */
+ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
+ if (aHaystack.length === 0) {
+ return -1;
+ }
+
+ var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
+ aCompare, aBias || exports.GREATEST_LOWER_BOUND);
+ if (index < 0) {
+ return -1;
+ }
+
+ // We have found either the exact element, or the next-closest element than
+ // the one we are searching for. However, there may be more than one such
+ // element. Make sure we always return the smallest of these.
+ while (index - 1 >= 0) {
+ if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
+ break;
+ }
+ --index;
+ }
+
+ return index;
+ };
+
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ // It turns out that some (most?) JavaScript engines don't self-host
+ // `Array.prototype.sort`. This makes sense because C++ will likely remain
+ // faster than JS when doing raw CPU-intensive sorting. However, when using a
+ // custom comparator function, calling back and forth between the VM's C++ and
+ // JIT'd JS is rather slow *and* loses JIT type information, resulting in
+ // worse generated code for the comparator function than would be optimal. In
+ // fact, when sorting with a comparator, these costs outweigh the benefits of
+ // sorting in C++. By using our own JS-implemented Quick Sort (below), we get
+ // a ~3500ms mean speed-up in `bench/bench.html`.
+
+ /**
+ * Swap the elements indexed by `x` and `y` in the array `ary`.
+ *
+ * @param {Array} ary
+ * The array.
+ * @param {Number} x
+ * The index of the first item.
+ * @param {Number} y
+ * The index of the second item.
+ */
+ function swap(ary, x, y) {
+ var temp = ary[x];
+ ary[x] = ary[y];
+ ary[y] = temp;
+ }
+
+ /**
+ * Returns a random integer within the range `low .. high` inclusive.
+ *
+ * @param {Number} low
+ * The lower bound on the range.
+ * @param {Number} high
+ * The upper bound on the range.
+ */
+ function randomIntInRange(low, high) {
+ return Math.round(low + (Math.random() * (high - low)));
+ }
+
+ /**
+ * The Quick Sort algorithm.
+ *
+ * @param {Array} ary
+ * An array to sort.
+ * @param {function} comparator
+ * Function to use to compare two items.
+ * @param {Number} p
+ * Start index of the array
+ * @param {Number} r
+ * End index of the array
+ */
+ function doQuickSort(ary, comparator, p, r) {
+ // If our lower bound is less than our upper bound, we (1) partition the
+ // array into two pieces and (2) recurse on each half. If it is not, this is
+ // the empty array and our base case.
+
+ if (p < r) {
+ // (1) Partitioning.
+ //
+ // The partitioning chooses a pivot between `p` and `r` and moves all
+ // elements that are less than or equal to the pivot to the before it, and
+ // all the elements that are greater than it after it. The effect is that
+ // once partition is done, the pivot is in the exact place it will be when
+ // the array is put in sorted order, and it will not need to be moved
+ // again. This runs in O(n) time.
+
+ // Always choose a random pivot so that an input array which is reverse
+ // sorted does not cause O(n^2) running time.
+ var pivotIndex = randomIntInRange(p, r);
+ var i = p - 1;
+
+ swap(ary, pivotIndex, r);
+ var pivot = ary[r];
+
+ // Immediately after `j` is incremented in this loop, the following hold
+ // true:
+ //
+ // * Every element in `ary[p .. i]` is less than or equal to the pivot.
+ //
+ // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
+ for (var j = p; j < r; j++) {
+ if (comparator(ary[j], pivot) <= 0) {
+ i += 1;
+ swap(ary, i, j);
+ }
+ }
+
+ swap(ary, i + 1, j);
+ var q = i + 1;
+
+ // (2) Recurse on each half.
+
+ doQuickSort(ary, comparator, p, q - 1);
+ doQuickSort(ary, comparator, q + 1, r);
+ }
+ }
+
+ /**
+ * Sort the given array in-place with the given comparator function.
+ *
+ * @param {Array} ary
+ * An array to sort.
+ * @param {function} comparator
+ * Function to use to compare two items.
+ */
+ exports.quickSort = function (ary, comparator) {
+ doQuickSort(ary, comparator, 0, ary.length - 1);
+ };
+
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;
+ var util = __webpack_require__(4);
+
+ // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
+ // operating systems these days (capturing the result).
+ var REGEX_NEWLINE = /(\r?\n)/;
+
+ // Newline character code for charCodeAt() comparisons
+ var NEWLINE_CODE = 10;
+
+ // Private symbol for identifying `SourceNode`s when multiple versions of
+ // the source-map library are loaded. This MUST NOT CHANGE across
+ // versions!
+ var isSourceNode = "$$$isSourceNode$$$";
+
+ /**
+ * SourceNodes provide a way to abstract over interpolating/concatenating
+ * snippets of generated JavaScript source code while maintaining the line and
+ * column information associated with the original source code.
+ *
+ * @param aLine The original line number.
+ * @param aColumn The original column number.
+ * @param aSource The original source's filename.
+ * @param aChunks Optional. An array of strings which are snippets of
+ * generated JS, or other SourceNodes.
+ * @param aName The original identifier.
+ */
+ function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
+ this.children = [];
+ this.sourceContents = {};
+ this.line = aLine == null ? null : aLine;
+ this.column = aColumn == null ? null : aColumn;
+ this.source = aSource == null ? null : aSource;
+ this.name = aName == null ? null : aName;
+ this[isSourceNode] = true;
+ if (aChunks != null) this.add(aChunks);
+ }
+
+ /**
+ * Creates a SourceNode from generated code and a SourceMapConsumer.
+ *
+ * @param aGeneratedCode The generated code
+ * @param aSourceMapConsumer The SourceMap for the generated code
+ * @param aRelativePath Optional. The path that relative sources in the
+ * SourceMapConsumer should be relative to.
+ */
+ SourceNode.fromStringWithSourceMap =
+ function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
+ // The SourceNode we want to fill with the generated code
+ // and the SourceMap
+ var node = new SourceNode();
+
+ // All even indices of this array are one line of the generated code,
+ // while all odd indices are the newlines between two adjacent lines
+ // (since `REGEX_NEWLINE` captures its match).
+ // Processed fragments are accessed by calling `shiftNextLine`.
+ var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
+ var remainingLinesIndex = 0;
+ var shiftNextLine = function() {
+ var lineContents = getNextLine();
+ // The last line of a file might not have a newline.
+ var newLine = getNextLine() || "";
+ return lineContents + newLine;
+
+ function getNextLine() {
+ return remainingLinesIndex < remainingLines.length ?
+ remainingLines[remainingLinesIndex++] : undefined;
+ }
+ };
+
+ // We need to remember the position of "remainingLines"
+ var lastGeneratedLine = 1, lastGeneratedColumn = 0;
+
+ // The generate SourceNodes we need a code range.
+ // To extract it current and last mapping is used.
+ // Here we store the last mapping.
+ var lastMapping = null;
+
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ if (lastMapping !== null) {
+ // We add the code from "lastMapping" to "mapping":
+ // First check if there is a new line in between.
+ if (lastGeneratedLine < mapping.generatedLine) {
+ // Associate first line with "lastMapping"
+ addMappingWithCode(lastMapping, shiftNextLine());
+ lastGeneratedLine++;
+ lastGeneratedColumn = 0;
+ // The remaining code is added without mapping
+ } else {
+ // There is no new line in between.
+ // Associate the code between "lastGeneratedColumn" and
+ // "mapping.generatedColumn" with "lastMapping"
+ var nextLine = remainingLines[remainingLinesIndex];
+ var code = nextLine.substr(0, mapping.generatedColumn -
+ lastGeneratedColumn);
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -
+ lastGeneratedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ addMappingWithCode(lastMapping, code);
+ // No more remaining code, continue
+ lastMapping = mapping;
+ return;
+ }
+ }
+ // We add the generated code until the first mapping
+ // to the SourceNode without any mapping.
+ // Each line is added as separate string.
+ while (lastGeneratedLine < mapping.generatedLine) {
+ node.add(shiftNextLine());
+ lastGeneratedLine++;
+ }
+ if (lastGeneratedColumn < mapping.generatedColumn) {
+ var nextLine = remainingLines[remainingLinesIndex];
+ node.add(nextLine.substr(0, mapping.generatedColumn));
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ }
+ lastMapping = mapping;
+ }, this);
+ // We have processed all mappings.
+ if (remainingLinesIndex < remainingLines.length) {
+ if (lastMapping) {
+ // Associate the remaining code in the current line with "lastMapping"
+ addMappingWithCode(lastMapping, shiftNextLine());
+ }
+ // and add the remaining lines without any mapping
+ node.add(remainingLines.splice(remainingLinesIndex).join(""));
+ }
+
+ // Copy sourcesContent into SourceNode
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aRelativePath != null) {
+ sourceFile = util.join(aRelativePath, sourceFile);
+ }
+ node.setSourceContent(sourceFile, content);
+ }
+ });
+
+ return node;
+
+ function addMappingWithCode(mapping, code) {
+ if (mapping === null || mapping.source === undefined) {
+ node.add(code);
+ } else {
+ var source = aRelativePath
+ ? util.join(aRelativePath, mapping.source)
+ : mapping.source;
+ node.add(new SourceNode(mapping.originalLine,
+ mapping.originalColumn,
+ source,
+ code,
+ mapping.name));
+ }
+ }
+ };
+
+ /**
+ * Add a chunk of generated JS to this source node.
+ *
+ * @param aChunk A string snippet of generated JS code, another instance of
+ * SourceNode, or an array where each member is one of those things.
+ */
+ SourceNode.prototype.add = function SourceNode_add(aChunk) {
+ if (Array.isArray(aChunk)) {
+ aChunk.forEach(function (chunk) {
+ this.add(chunk);
+ }, this);
+ }
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
+ if (aChunk) {
+ this.children.push(aChunk);
+ }
+ }
+ else {
+ throw new TypeError(
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
+ );
+ }
+ return this;
+ };
+
+ /**
+ * Add a chunk of generated JS to the beginning of this source node.
+ *
+ * @param aChunk A string snippet of generated JS code, another instance of
+ * SourceNode, or an array where each member is one of those things.
+ */
+ SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
+ if (Array.isArray(aChunk)) {
+ for (var i = aChunk.length-1; i >= 0; i--) {
+ this.prepend(aChunk[i]);
+ }
+ }
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
+ this.children.unshift(aChunk);
+ }
+ else {
+ throw new TypeError(
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
+ );
+ }
+ return this;
+ };
+
+ /**
+ * Walk over the tree of JS snippets in this node and its children. The
+ * walking function is called once for each snippet of JS and is passed that
+ * snippet and the its original associated source's line/column location.
+ *
+ * @param aFn The traversal function.
+ */
+ SourceNode.prototype.walk = function SourceNode_walk(aFn) {
+ var chunk;
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ chunk = this.children[i];
+ if (chunk[isSourceNode]) {
+ chunk.walk(aFn);
+ }
+ else {
+ if (chunk !== '') {
+ aFn(chunk, { source: this.source,
+ line: this.line,
+ column: this.column,
+ name: this.name });
+ }
+ }
+ }
+ };
+
+ /**
+ * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
+ * each of `this.children`.
+ *
+ * @param aSep The separator.
+ */
+ SourceNode.prototype.join = function SourceNode_join(aSep) {
+ var newChildren;
+ var i;
+ var len = this.children.length;
+ if (len > 0) {
+ newChildren = [];
+ for (i = 0; i < len-1; i++) {
+ newChildren.push(this.children[i]);
+ newChildren.push(aSep);
+ }
+ newChildren.push(this.children[i]);
+ this.children = newChildren;
+ }
+ return this;
+ };
+
+ /**
+ * Call String.prototype.replace on the very right-most source snippet. Useful
+ * for trimming whitespace from the end of a source node, etc.
+ *
+ * @param aPattern The pattern to replace.
+ * @param aReplacement The thing to replace the pattern with.
+ */
+ SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
+ var lastChild = this.children[this.children.length - 1];
+ if (lastChild[isSourceNode]) {
+ lastChild.replaceRight(aPattern, aReplacement);
+ }
+ else if (typeof lastChild === 'string') {
+ this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
+ }
+ else {
+ this.children.push(''.replace(aPattern, aReplacement));
+ }
+ return this;
+ };
+
+ /**
+ * Set the source content for a source file. This will be added to the SourceMapGenerator
+ * in the sourcesContent field.
+ *
+ * @param aSourceFile The filename of the source file
+ * @param aSourceContent The content of the source file
+ */
+ SourceNode.prototype.setSourceContent =
+ function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
+ this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
+ };
+
+ /**
+ * Walk over the tree of SourceNodes. The walking function is called for each
+ * source file content and is passed the filename and source content.
+ *
+ * @param aFn The traversal function.
+ */
+ SourceNode.prototype.walkSourceContents =
+ function SourceNode_walkSourceContents(aFn) {
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ if (this.children[i][isSourceNode]) {
+ this.children[i].walkSourceContents(aFn);
+ }
+ }
+
+ var sources = Object.keys(this.sourceContents);
+ for (var i = 0, len = sources.length; i < len; i++) {
+ aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
+ }
+ };
+
+ /**
+ * Return the string representation of this source node. Walks over the tree
+ * and concatenates all the various snippets together to one string.
+ */
+ SourceNode.prototype.toString = function SourceNode_toString() {
+ var str = "";
+ this.walk(function (chunk) {
+ str += chunk;
+ });
+ return str;
+ };
+
+ /**
+ * Returns the string representation of this source node along with a source
+ * map.
+ */
+ SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
+ var generated = {
+ code: "",
+ line: 1,
+ column: 0
+ };
+ var map = new SourceMapGenerator(aArgs);
+ var sourceMappingActive = false;
+ var lastOriginalSource = null;
+ var lastOriginalLine = null;
+ var lastOriginalColumn = null;
+ var lastOriginalName = null;
+ this.walk(function (chunk, original) {
+ generated.code += chunk;
+ if (original.source !== null
+ && original.line !== null
+ && original.column !== null) {
+ if(lastOriginalSource !== original.source
+ || lastOriginalLine !== original.line
+ || lastOriginalColumn !== original.column
+ || lastOriginalName !== original.name) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ lastOriginalSource = original.source;
+ lastOriginalLine = original.line;
+ lastOriginalColumn = original.column;
+ lastOriginalName = original.name;
+ sourceMappingActive = true;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ generated: {
+ line: generated.line,
+ column: generated.column
+ }
+ });
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ }
+ for (var idx = 0, length = chunk.length; idx < length; idx++) {
+ if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
+ generated.line++;
+ generated.column = 0;
+ // Mappings end at eol
+ if (idx + 1 === length) {
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ } else {
+ generated.column++;
+ }
+ }
+ });
+ this.walkSourceContents(function (sourceFile, sourceContent) {
+ map.setSourceContent(sourceFile, sourceContent);
+ });
+
+ return { code: generated.code, map: map };
+ };
+
+ exports.SourceNode = SourceNode;
+
+
+/***/ })
+/******/ ])
+});
+;
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBlNDczOGZjNzJhN2IyMzAzOTg4OSIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LXZscS5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LmpzIiwid2VicGFjazovLy8uL2xpYi91dGlsLmpzIiwid2VicGFjazovLy8uL2xpYi9hcnJheS1zZXQuanMiLCJ3ZWJwYWNrOi8vLy4vbGliL21hcHBpbmctbGlzdC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmluYXJ5LXNlYXJjaC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvcXVpY2stc29ydC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW5vZGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQztBQUNELE87QUNWQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx1QkFBZTtBQUNmO0FBQ0E7QUFDQTs7QUFFQTtBQU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JldmlvdXNHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBpZiAoaSA+IDApIHtcbiAgICAgICAgICBpZiAoIXV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQobWFwcGluZywgbWFwcGluZ3NbaSAtIDFdKSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5leHQgKz0gJywnO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c0dlbmVyYXRlZENvbHVtbik7XG4gICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2VJZHggPSB0aGlzLl9zb3VyY2VzLmluZGV4T2YobWFwcGluZy5zb3VyY2UpO1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICBwcmV2aW91c1NvdXJjZSA9IHNvdXJjZUlkeDtcblxuICAgICAgICAvLyBsaW5lcyBhcmUgc3RvcmVkIDAtYmFzZWQgaW4gU291cmNlTWFwIHNwZWMgdmVyc2lvbiAzXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsTGluZSAtIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c09yaWdpbmFsTGluZSk7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcml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IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBzb3VyY2VGaWxlKTtcbiAgICAgICAgfVxuICAgICAgICBub2RlLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbm9kZTtcblxuICAgIGZ1bmN0aW9uIGFkZE1hcHBpbmdXaXRoQ29kZShtYXBwaW5nLCBjb2RlKSB7XG4gICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJy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lbmVyYXRlZC5jb2x1bW4gPSAwO1xuICAgICAgICAvLyBNYXBwaW5ncyBlbmQgYXQgZW9sXG4gICAgICAgIGlmIChpZHggKyAxID09PSBsZW5ndGgpIHtcbiAgICAgICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.js b/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.js
new file mode 100644
index 0000000000..4e630e2943
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.js
@@ -0,0 +1,3090 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+ else if(typeof exports === 'object')
+ exports["sourceMap"] = factory();
+ else
+ root["sourceMap"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /*
+ * Copyright 2009-2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE.txt or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+ exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;
+ exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer;
+ exports.SourceNode = __webpack_require__(10).SourceNode;
+
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var base64VLQ = __webpack_require__(2);
+ var util = __webpack_require__(4);
+ var ArraySet = __webpack_require__(5).ArraySet;
+ var MappingList = __webpack_require__(6).MappingList;
+
+ /**
+ * An instance of the SourceMapGenerator represents a source map which is
+ * being built incrementally. You may pass an object with the following
+ * properties:
+ *
+ * - file: The filename of the generated source.
+ * - sourceRoot: A root for all relative URLs in this source map.
+ */
+ function SourceMapGenerator(aArgs) {
+ if (!aArgs) {
+ aArgs = {};
+ }
+ this._file = util.getArg(aArgs, 'file', null);
+ this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
+ this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
+ this._sources = new ArraySet();
+ this._names = new ArraySet();
+ this._mappings = new MappingList();
+ this._sourcesContents = null;
+ }
+
+ SourceMapGenerator.prototype._version = 3;
+
+ /**
+ * Creates a new SourceMapGenerator based on a SourceMapConsumer
+ *
+ * @param aSourceMapConsumer The SourceMap.
+ */
+ SourceMapGenerator.fromSourceMap =
+ function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
+ var sourceRoot = aSourceMapConsumer.sourceRoot;
+ var generator = new SourceMapGenerator({
+ file: aSourceMapConsumer.file,
+ sourceRoot: sourceRoot
+ });
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ var newMapping = {
+ generated: {
+ line: mapping.generatedLine,
+ column: mapping.generatedColumn
+ }
+ };
+
+ if (mapping.source != null) {
+ newMapping.source = mapping.source;
+ if (sourceRoot != null) {
+ newMapping.source = util.relative(sourceRoot, newMapping.source);
+ }
+
+ newMapping.original = {
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ };
+
+ if (mapping.name != null) {
+ newMapping.name = mapping.name;
+ }
+ }
+
+ generator.addMapping(newMapping);
+ });
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ generator.setSourceContent(sourceFile, content);
+ }
+ });
+ return generator;
+ };
+
+ /**
+ * Add a single mapping from original source line and column to the generated
+ * source's line and column for this source map being created. The mapping
+ * object should have the following properties:
+ *
+ * - generated: An object with the generated line and column positions.
+ * - original: An object with the original line and column positions.
+ * - source: The original source file (relative to the sourceRoot).
+ * - name: An optional original token name for this mapping.
+ */
+ SourceMapGenerator.prototype.addMapping =
+ function SourceMapGenerator_addMapping(aArgs) {
+ var generated = util.getArg(aArgs, 'generated');
+ var original = util.getArg(aArgs, 'original', null);
+ var source = util.getArg(aArgs, 'source', null);
+ var name = util.getArg(aArgs, 'name', null);
+
+ if (!this._skipValidation) {
+ this._validateMapping(generated, original, source, name);
+ }
+
+ if (source != null) {
+ source = String(source);
+ if (!this._sources.has(source)) {
+ this._sources.add(source);
+ }
+ }
+
+ if (name != null) {
+ name = String(name);
+ if (!this._names.has(name)) {
+ this._names.add(name);
+ }
+ }
+
+ this._mappings.add({
+ generatedLine: generated.line,
+ generatedColumn: generated.column,
+ originalLine: original != null && original.line,
+ originalColumn: original != null && original.column,
+ source: source,
+ name: name
+ });
+ };
+
+ /**
+ * Set the source content for a source file.
+ */
+ SourceMapGenerator.prototype.setSourceContent =
+ function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
+ var source = aSourceFile;
+ if (this._sourceRoot != null) {
+ source = util.relative(this._sourceRoot, source);
+ }
+
+ if (aSourceContent != null) {
+ // Add the source content to the _sourcesContents map.
+ // Create a new _sourcesContents map if the property is null.
+ if (!this._sourcesContents) {
+ this._sourcesContents = Object.create(null);
+ }
+ this._sourcesContents[util.toSetString(source)] = aSourceContent;
+ } else if (this._sourcesContents) {
+ // Remove the source file from the _sourcesContents map.
+ // If the _sourcesContents map is empty, set the property to null.
+ delete this._sourcesContents[util.toSetString(source)];
+ if (Object.keys(this._sourcesContents).length === 0) {
+ this._sourcesContents = null;
+ }
+ }
+ };
+
+ /**
+ * Applies the mappings of a sub-source-map for a specific source file to the
+ * source map being generated. Each mapping to the supplied source file is
+ * rewritten using the supplied source map. Note: The resolution for the
+ * resulting mappings is the minimium of this map and the supplied map.
+ *
+ * @param aSourceMapConsumer The source map to be applied.
+ * @param aSourceFile Optional. The filename of the source file.
+ * If omitted, SourceMapConsumer's file property will be used.
+ * @param aSourceMapPath Optional. The dirname of the path to the source map
+ * to be applied. If relative, it is relative to the SourceMapConsumer.
+ * This parameter is needed when the two source maps aren't in the same
+ * directory, and the source map to be applied contains relative source
+ * paths. If so, those relative source paths need to be rewritten
+ * relative to the SourceMapGenerator.
+ */
+ SourceMapGenerator.prototype.applySourceMap =
+ function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
+ var sourceFile = aSourceFile;
+ // If aSourceFile is omitted, we will use the file property of the SourceMap
+ if (aSourceFile == null) {
+ if (aSourceMapConsumer.file == null) {
+ throw new Error(
+ 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
+ 'or the source map\'s "file" property. Both were omitted.'
+ );
+ }
+ sourceFile = aSourceMapConsumer.file;
+ }
+ var sourceRoot = this._sourceRoot;
+ // Make "sourceFile" relative if an absolute Url is passed.
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ // Applying the SourceMap can add and remove items from the sources and
+ // the names array.
+ var newSources = new ArraySet();
+ var newNames = new ArraySet();
+
+ // Find mappings for the "sourceFile"
+ this._mappings.unsortedForEach(function (mapping) {
+ if (mapping.source === sourceFile && mapping.originalLine != null) {
+ // Check if it can be mapped by the source map, then update the mapping.
+ var original = aSourceMapConsumer.originalPositionFor({
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ });
+ if (original.source != null) {
+ // Copy mapping
+ mapping.source = original.source;
+ if (aSourceMapPath != null) {
+ mapping.source = util.join(aSourceMapPath, mapping.source)
+ }
+ if (sourceRoot != null) {
+ mapping.source = util.relative(sourceRoot, mapping.source);
+ }
+ mapping.originalLine = original.line;
+ mapping.originalColumn = original.column;
+ if (original.name != null) {
+ mapping.name = original.name;
+ }
+ }
+ }
+
+ var source = mapping.source;
+ if (source != null && !newSources.has(source)) {
+ newSources.add(source);
+ }
+
+ var name = mapping.name;
+ if (name != null && !newNames.has(name)) {
+ newNames.add(name);
+ }
+
+ }, this);
+ this._sources = newSources;
+ this._names = newNames;
+
+ // Copy sourcesContents of applied map.
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aSourceMapPath != null) {
+ sourceFile = util.join(aSourceMapPath, sourceFile);
+ }
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ this.setSourceContent(sourceFile, content);
+ }
+ }, this);
+ };
+
+ /**
+ * A mapping can have one of the three levels of data:
+ *
+ * 1. Just the generated position.
+ * 2. The Generated position, original position, and original source.
+ * 3. Generated and original position, original source, as well as a name
+ * token.
+ *
+ * To maintain consistency, we validate that any new mapping being added falls
+ * in to one of these categories.
+ */
+ SourceMapGenerator.prototype._validateMapping =
+ function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
+ aName) {
+ // When aOriginal is truthy but has empty values for .line and .column,
+ // it is most likely a programmer error. In this case we throw a very
+ // specific error message to try to guide them the right way.
+ // For example: https://github.com/Polymer/polymer-bundler/pull/519
+ if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
+ throw new Error(
+ 'original.line and original.column are not numbers -- you probably meant to omit ' +
+ 'the original mapping entirely and only map the generated position. If so, pass ' +
+ 'null for the original mapping instead of an object with empty or null values.'
+ );
+ }
+
+ if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
+ && aGenerated.line > 0 && aGenerated.column >= 0
+ && !aOriginal && !aSource && !aName) {
+ // Case 1.
+ return;
+ }
+ else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
+ && aOriginal && 'line' in aOriginal && 'column' in aOriginal
+ && aGenerated.line > 0 && aGenerated.column >= 0
+ && aOriginal.line > 0 && aOriginal.column >= 0
+ && aSource) {
+ // Cases 2 and 3.
+ return;
+ }
+ else {
+ throw new Error('Invalid mapping: ' + JSON.stringify({
+ generated: aGenerated,
+ source: aSource,
+ original: aOriginal,
+ name: aName
+ }));
+ }
+ };
+
+ /**
+ * Serialize the accumulated mappings in to the stream of base 64 VLQs
+ * specified by the source map format.
+ */
+ SourceMapGenerator.prototype._serializeMappings =
+ function SourceMapGenerator_serializeMappings() {
+ var previousGeneratedColumn = 0;
+ var previousGeneratedLine = 1;
+ var previousOriginalColumn = 0;
+ var previousOriginalLine = 0;
+ var previousName = 0;
+ var previousSource = 0;
+ var result = '';
+ var next;
+ var mapping;
+ var nameIdx;
+ var sourceIdx;
+
+ var mappings = this._mappings.toArray();
+ for (var i = 0, len = mappings.length; i < len; i++) {
+ mapping = mappings[i];
+ next = ''
+
+ if (mapping.generatedLine !== previousGeneratedLine) {
+ previousGeneratedColumn = 0;
+ while (mapping.generatedLine !== previousGeneratedLine) {
+ next += ';';
+ previousGeneratedLine++;
+ }
+ }
+ else {
+ if (i > 0) {
+ if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
+ continue;
+ }
+ next += ',';
+ }
+ }
+
+ next += base64VLQ.encode(mapping.generatedColumn
+ - previousGeneratedColumn);
+ previousGeneratedColumn = mapping.generatedColumn;
+
+ if (mapping.source != null) {
+ sourceIdx = this._sources.indexOf(mapping.source);
+ next += base64VLQ.encode(sourceIdx - previousSource);
+ previousSource = sourceIdx;
+
+ // lines are stored 0-based in SourceMap spec version 3
+ next += base64VLQ.encode(mapping.originalLine - 1
+ - previousOriginalLine);
+ previousOriginalLine = mapping.originalLine - 1;
+
+ next += base64VLQ.encode(mapping.originalColumn
+ - previousOriginalColumn);
+ previousOriginalColumn = mapping.originalColumn;
+
+ if (mapping.name != null) {
+ nameIdx = this._names.indexOf(mapping.name);
+ next += base64VLQ.encode(nameIdx - previousName);
+ previousName = nameIdx;
+ }
+ }
+
+ result += next;
+ }
+
+ return result;
+ };
+
+ SourceMapGenerator.prototype._generateSourcesContent =
+ function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
+ return aSources.map(function (source) {
+ if (!this._sourcesContents) {
+ return null;
+ }
+ if (aSourceRoot != null) {
+ source = util.relative(aSourceRoot, source);
+ }
+ var key = util.toSetString(source);
+ return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
+ ? this._sourcesContents[key]
+ : null;
+ }, this);
+ };
+
+ /**
+ * Externalize the source map.
+ */
+ SourceMapGenerator.prototype.toJSON =
+ function SourceMapGenerator_toJSON() {
+ var map = {
+ version: this._version,
+ sources: this._sources.toArray(),
+ names: this._names.toArray(),
+ mappings: this._serializeMappings()
+ };
+ if (this._file != null) {
+ map.file = this._file;
+ }
+ if (this._sourceRoot != null) {
+ map.sourceRoot = this._sourceRoot;
+ }
+ if (this._sourcesContents) {
+ map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
+ }
+
+ return map;
+ };
+
+ /**
+ * Render the source map being generated to a string.
+ */
+ SourceMapGenerator.prototype.toString =
+ function SourceMapGenerator_toString() {
+ return JSON.stringify(this.toJSON());
+ };
+
+ exports.SourceMapGenerator = SourceMapGenerator;
+
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ *
+ * Based on the Base 64 VLQ implementation in Closure Compiler:
+ * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
+ *
+ * Copyright 2011 The Closure Compiler Authors. All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+ var base64 = __webpack_require__(3);
+
+ // A single base 64 digit can contain 6 bits of data. For the base 64 variable
+ // length quantities we use in the source map spec, the first bit is the sign,
+ // the next four bits are the actual value, and the 6th bit is the
+ // continuation bit. The continuation bit tells us whether there are more
+ // digits in this value following this digit.
+ //
+ // Continuation
+ // | Sign
+ // | |
+ // V V
+ // 101011
+
+ var VLQ_BASE_SHIFT = 5;
+
+ // binary: 100000
+ var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
+
+ // binary: 011111
+ var VLQ_BASE_MASK = VLQ_BASE - 1;
+
+ // binary: 100000
+ var VLQ_CONTINUATION_BIT = VLQ_BASE;
+
+ /**
+ * Converts from a two-complement value to a value where the sign bit is
+ * placed in the least significant bit. For example, as decimals:
+ * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
+ * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
+ */
+ function toVLQSigned(aValue) {
+ return aValue < 0
+ ? ((-aValue) << 1) + 1
+ : (aValue << 1) + 0;
+ }
+
+ /**
+ * Converts to a two-complement value from a value where the sign bit is
+ * placed in the least significant bit. For example, as decimals:
+ * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
+ * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
+ */
+ function fromVLQSigned(aValue) {
+ var isNegative = (aValue & 1) === 1;
+ var shifted = aValue >> 1;
+ return isNegative
+ ? -shifted
+ : shifted;
+ }
+
+ /**
+ * Returns the base 64 VLQ encoded value.
+ */
+ exports.encode = function base64VLQ_encode(aValue) {
+ var encoded = "";
+ var digit;
+
+ var vlq = toVLQSigned(aValue);
+
+ do {
+ digit = vlq & VLQ_BASE_MASK;
+ vlq >>>= VLQ_BASE_SHIFT;
+ if (vlq > 0) {
+ // There are still more digits in this value, so we must make sure the
+ // continuation bit is marked.
+ digit |= VLQ_CONTINUATION_BIT;
+ }
+ encoded += base64.encode(digit);
+ } while (vlq > 0);
+
+ return encoded;
+ };
+
+ /**
+ * Decodes the next base 64 VLQ value from the given string and returns the
+ * value and the rest of the string via the out parameter.
+ */
+ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
+ var strLen = aStr.length;
+ var result = 0;
+ var shift = 0;
+ var continuation, digit;
+
+ do {
+ if (aIndex >= strLen) {
+ throw new Error("Expected more digits in base 64 VLQ value.");
+ }
+
+ digit = base64.decode(aStr.charCodeAt(aIndex++));
+ if (digit === -1) {
+ throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
+ }
+
+ continuation = !!(digit & VLQ_CONTINUATION_BIT);
+ digit &= VLQ_BASE_MASK;
+ result = result + (digit << shift);
+ shift += VLQ_BASE_SHIFT;
+ } while (continuation);
+
+ aOutParam.value = fromVLQSigned(result);
+ aOutParam.rest = aIndex;
+ };
+
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
+
+ /**
+ * Encode an integer in the range of 0 to 63 to a single base 64 digit.
+ */
+ exports.encode = function (number) {
+ if (0 <= number && number < intToCharMap.length) {
+ return intToCharMap[number];
+ }
+ throw new TypeError("Must be between 0 and 63: " + number);
+ };
+
+ /**
+ * Decode a single base 64 character code digit to an integer. Returns -1 on
+ * failure.
+ */
+ exports.decode = function (charCode) {
+ var bigA = 65; // 'A'
+ var bigZ = 90; // 'Z'
+
+ var littleA = 97; // 'a'
+ var littleZ = 122; // 'z'
+
+ var zero = 48; // '0'
+ var nine = 57; // '9'
+
+ var plus = 43; // '+'
+ var slash = 47; // '/'
+
+ var littleOffset = 26;
+ var numberOffset = 52;
+
+ // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
+ if (bigA <= charCode && charCode <= bigZ) {
+ return (charCode - bigA);
+ }
+
+ // 26 - 51: abcdefghijklmnopqrstuvwxyz
+ if (littleA <= charCode && charCode <= littleZ) {
+ return (charCode - littleA + littleOffset);
+ }
+
+ // 52 - 61: 0123456789
+ if (zero <= charCode && charCode <= nine) {
+ return (charCode - zero + numberOffset);
+ }
+
+ // 62: +
+ if (charCode == plus) {
+ return 62;
+ }
+
+ // 63: /
+ if (charCode == slash) {
+ return 63;
+ }
+
+ // Invalid base64 digit.
+ return -1;
+ };
+
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ /**
+ * This is a helper function for getting values from parameter/options
+ * objects.
+ *
+ * @param args The object we are extracting values from
+ * @param name The name of the property we are getting.
+ * @param defaultValue An optional value to return if the property is missing
+ * from the object. If this is not specified and the property is missing, an
+ * error will be thrown.
+ */
+ function getArg(aArgs, aName, aDefaultValue) {
+ if (aName in aArgs) {
+ return aArgs[aName];
+ } else if (arguments.length === 3) {
+ return aDefaultValue;
+ } else {
+ throw new Error('"' + aName + '" is a required argument.');
+ }
+ }
+ exports.getArg = getArg;
+
+ var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
+ var dataUrlRegexp = /^data:.+\,.+$/;
+
+ function urlParse(aUrl) {
+ var match = aUrl.match(urlRegexp);
+ if (!match) {
+ return null;
+ }
+ return {
+ scheme: match[1],
+ auth: match[2],
+ host: match[3],
+ port: match[4],
+ path: match[5]
+ };
+ }
+ exports.urlParse = urlParse;
+
+ function urlGenerate(aParsedUrl) {
+ var url = '';
+ if (aParsedUrl.scheme) {
+ url += aParsedUrl.scheme + ':';
+ }
+ url += '//';
+ if (aParsedUrl.auth) {
+ url += aParsedUrl.auth + '@';
+ }
+ if (aParsedUrl.host) {
+ url += aParsedUrl.host;
+ }
+ if (aParsedUrl.port) {
+ url += ":" + aParsedUrl.port
+ }
+ if (aParsedUrl.path) {
+ url += aParsedUrl.path;
+ }
+ return url;
+ }
+ exports.urlGenerate = urlGenerate;
+
+ /**
+ * Normalizes a path, or the path portion of a URL:
+ *
+ * - Replaces consecutive slashes with one slash.
+ * - Removes unnecessary '.' parts.
+ * - Removes unnecessary '<dir>/..' parts.
+ *
+ * Based on code in the Node.js 'path' core module.
+ *
+ * @param aPath The path or url to normalize.
+ */
+ function normalize(aPath) {
+ var path = aPath;
+ var url = urlParse(aPath);
+ if (url) {
+ if (!url.path) {
+ return aPath;
+ }
+ path = url.path;
+ }
+ var isAbsolute = exports.isAbsolute(path);
+
+ var parts = path.split(/\/+/);
+ for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
+ part = parts[i];
+ if (part === '.') {
+ parts.splice(i, 1);
+ } else if (part === '..') {
+ up++;
+ } else if (up > 0) {
+ if (part === '') {
+ // The first part is blank if the path is absolute. Trying to go
+ // above the root is a no-op. Therefore we can remove all '..' parts
+ // directly after the root.
+ parts.splice(i + 1, up);
+ up = 0;
+ } else {
+ parts.splice(i, 2);
+ up--;
+ }
+ }
+ }
+ path = parts.join('/');
+
+ if (path === '') {
+ path = isAbsolute ? '/' : '.';
+ }
+
+ if (url) {
+ url.path = path;
+ return urlGenerate(url);
+ }
+ return path;
+ }
+ exports.normalize = normalize;
+
+ /**
+ * Joins two paths/URLs.
+ *
+ * @param aRoot The root path or URL.
+ * @param aPath The path or URL to be joined with the root.
+ *
+ * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
+ * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
+ * first.
+ * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
+ * is updated with the result and aRoot is returned. Otherwise the result
+ * is returned.
+ * - If aPath is absolute, the result is aPath.
+ * - Otherwise the two paths are joined with a slash.
+ * - Joining for example 'http://' and 'www.example.com' is also supported.
+ */
+ function join(aRoot, aPath) {
+ if (aRoot === "") {
+ aRoot = ".";
+ }
+ if (aPath === "") {
+ aPath = ".";
+ }
+ var aPathUrl = urlParse(aPath);
+ var aRootUrl = urlParse(aRoot);
+ if (aRootUrl) {
+ aRoot = aRootUrl.path || '/';
+ }
+
+ // `join(foo, '//www.example.org')`
+ if (aPathUrl && !aPathUrl.scheme) {
+ if (aRootUrl) {
+ aPathUrl.scheme = aRootUrl.scheme;
+ }
+ return urlGenerate(aPathUrl);
+ }
+
+ if (aPathUrl || aPath.match(dataUrlRegexp)) {
+ return aPath;
+ }
+
+ // `join('http://', 'www.example.com')`
+ if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
+ aRootUrl.host = aPath;
+ return urlGenerate(aRootUrl);
+ }
+
+ var joined = aPath.charAt(0) === '/'
+ ? aPath
+ : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
+
+ if (aRootUrl) {
+ aRootUrl.path = joined;
+ return urlGenerate(aRootUrl);
+ }
+ return joined;
+ }
+ exports.join = join;
+
+ exports.isAbsolute = function (aPath) {
+ return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
+ };
+
+ /**
+ * Make a path relative to a URL or another path.
+ *
+ * @param aRoot The root path or URL.
+ * @param aPath The path or URL to be made relative to aRoot.
+ */
+ function relative(aRoot, aPath) {
+ if (aRoot === "") {
+ aRoot = ".";
+ }
+
+ aRoot = aRoot.replace(/\/$/, '');
+
+ // It is possible for the path to be above the root. In this case, simply
+ // checking whether the root is a prefix of the path won't work. Instead, we
+ // need to remove components from the root one by one, until either we find
+ // a prefix that fits, or we run out of components to remove.
+ var level = 0;
+ while (aPath.indexOf(aRoot + '/') !== 0) {
+ var index = aRoot.lastIndexOf("/");
+ if (index < 0) {
+ return aPath;
+ }
+
+ // If the only part of the root that is left is the scheme (i.e. http://,
+ // file:///, etc.), one or more slashes (/), or simply nothing at all, we
+ // have exhausted all components, so the path is not relative to the root.
+ aRoot = aRoot.slice(0, index);
+ if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
+ return aPath;
+ }
+
+ ++level;
+ }
+
+ // Make sure we add a "../" for each component we removed from the root.
+ return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
+ }
+ exports.relative = relative;
+
+ var supportsNullProto = (function () {
+ var obj = Object.create(null);
+ return !('__proto__' in obj);
+ }());
+
+ function identity (s) {
+ return s;
+ }
+
+ /**
+ * Because behavior goes wacky when you set `__proto__` on objects, we
+ * have to prefix all the strings in our set with an arbitrary character.
+ *
+ * See https://github.com/mozilla/source-map/pull/31 and
+ * https://github.com/mozilla/source-map/issues/30
+ *
+ * @param String aStr
+ */
+ function toSetString(aStr) {
+ if (isProtoString(aStr)) {
+ return '$' + aStr;
+ }
+
+ return aStr;
+ }
+ exports.toSetString = supportsNullProto ? identity : toSetString;
+
+ function fromSetString(aStr) {
+ if (isProtoString(aStr)) {
+ return aStr.slice(1);
+ }
+
+ return aStr;
+ }
+ exports.fromSetString = supportsNullProto ? identity : fromSetString;
+
+ function isProtoString(s) {
+ if (!s) {
+ return false;
+ }
+
+ var length = s.length;
+
+ if (length < 9 /* "__proto__".length */) {
+ return false;
+ }
+
+ if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 2) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
+ s.charCodeAt(length - 4) !== 116 /* 't' */ ||
+ s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
+ s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
+ s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
+ s.charCodeAt(length - 8) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 9) !== 95 /* '_' */) {
+ return false;
+ }
+
+ for (var i = length - 10; i >= 0; i--) {
+ if (s.charCodeAt(i) !== 36 /* '$' */) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Comparator between two mappings where the original positions are compared.
+ *
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
+ * mappings with the same original source/line/column, but different generated
+ * line and column the same. Useful when searching for a mapping with a
+ * stubbed out mapping.
+ */
+ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
+ var cmp = mappingA.source - mappingB.source;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0 || onlyCompareOriginal) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return mappingA.name - mappingB.name;
+ }
+ exports.compareByOriginalPositions = compareByOriginalPositions;
+
+ /**
+ * Comparator between two mappings with deflated source and name indices where
+ * the generated positions are compared.
+ *
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
+ * mappings with the same generated line and column, but different
+ * source/name/original line and column the same. Useful when searching for a
+ * mapping with a stubbed out mapping.
+ */
+ function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0 || onlyCompareGenerated) {
+ return cmp;
+ }
+
+ cmp = mappingA.source - mappingB.source;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return mappingA.name - mappingB.name;
+ }
+ exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
+
+ function strcmp(aStr1, aStr2) {
+ if (aStr1 === aStr2) {
+ return 0;
+ }
+
+ if (aStr1 > aStr2) {
+ return 1;
+ }
+
+ return -1;
+ }
+
+ /**
+ * Comparator between two mappings with inflated source and name strings where
+ * the generated positions are compared.
+ */
+ function compareByGeneratedPositionsInflated(mappingA, mappingB) {
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = strcmp(mappingA.source, mappingB.source);
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return strcmp(mappingA.name, mappingB.name);
+ }
+ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
+
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var util = __webpack_require__(4);
+ var has = Object.prototype.hasOwnProperty;
+ var hasNativeMap = typeof Map !== "undefined";
+
+ /**
+ * A data structure which is a combination of an array and a set. Adding a new
+ * member is O(1), testing for membership is O(1), and finding the index of an
+ * element is O(1). Removing elements from the set is not supported. Only
+ * strings are supported for membership.
+ */
+ function ArraySet() {
+ this._array = [];
+ this._set = hasNativeMap ? new Map() : Object.create(null);
+ }
+
+ /**
+ * Static method for creating ArraySet instances from an existing array.
+ */
+ ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
+ var set = new ArraySet();
+ for (var i = 0, len = aArray.length; i < len; i++) {
+ set.add(aArray[i], aAllowDuplicates);
+ }
+ return set;
+ };
+
+ /**
+ * Return how many unique items are in this ArraySet. If duplicates have been
+ * added, than those do not count towards the size.
+ *
+ * @returns Number
+ */
+ ArraySet.prototype.size = function ArraySet_size() {
+ return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
+ };
+
+ /**
+ * Add the given string to this set.
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
+ var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
+ var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
+ var idx = this._array.length;
+ if (!isDuplicate || aAllowDuplicates) {
+ this._array.push(aStr);
+ }
+ if (!isDuplicate) {
+ if (hasNativeMap) {
+ this._set.set(aStr, idx);
+ } else {
+ this._set[sStr] = idx;
+ }
+ }
+ };
+
+ /**
+ * Is the given string a member of this set?
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.has = function ArraySet_has(aStr) {
+ if (hasNativeMap) {
+ return this._set.has(aStr);
+ } else {
+ var sStr = util.toSetString(aStr);
+ return has.call(this._set, sStr);
+ }
+ };
+
+ /**
+ * What is the index of the given string in the array?
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
+ if (hasNativeMap) {
+ var idx = this._set.get(aStr);
+ if (idx >= 0) {
+ return idx;
+ }
+ } else {
+ var sStr = util.toSetString(aStr);
+ if (has.call(this._set, sStr)) {
+ return this._set[sStr];
+ }
+ }
+
+ throw new Error('"' + aStr + '" is not in the set.');
+ };
+
+ /**
+ * What is the element at the given index?
+ *
+ * @param Number aIdx
+ */
+ ArraySet.prototype.at = function ArraySet_at(aIdx) {
+ if (aIdx >= 0 && aIdx < this._array.length) {
+ return this._array[aIdx];
+ }
+ throw new Error('No element indexed by ' + aIdx);
+ };
+
+ /**
+ * Returns the array representation of this set (which has the proper indices
+ * indicated by indexOf). Note that this is a copy of the internal array used
+ * for storing the members so that no one can mess with internal state.
+ */
+ ArraySet.prototype.toArray = function ArraySet_toArray() {
+ return this._array.slice();
+ };
+
+ exports.ArraySet = ArraySet;
+
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2014 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var util = __webpack_require__(4);
+
+ /**
+ * Determine whether mappingB is after mappingA with respect to generated
+ * position.
+ */
+ function generatedPositionAfter(mappingA, mappingB) {
+ // Optimized for most common case
+ var lineA = mappingA.generatedLine;
+ var lineB = mappingB.generatedLine;
+ var columnA = mappingA.generatedColumn;
+ var columnB = mappingB.generatedColumn;
+ return lineB > lineA || lineB == lineA && columnB >= columnA ||
+ util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
+ }
+
+ /**
+ * A data structure to provide a sorted view of accumulated mappings in a
+ * performance conscious manner. It trades a neglibable overhead in general
+ * case for a large speedup in case of mappings being added in order.
+ */
+ function MappingList() {
+ this._array = [];
+ this._sorted = true;
+ // Serves as infimum
+ this._last = {generatedLine: -1, generatedColumn: 0};
+ }
+
+ /**
+ * Iterate through internal items. This method takes the same arguments that
+ * `Array.prototype.forEach` takes.
+ *
+ * NOTE: The order of the mappings is NOT guaranteed.
+ */
+ MappingList.prototype.unsortedForEach =
+ function MappingList_forEach(aCallback, aThisArg) {
+ this._array.forEach(aCallback, aThisArg);
+ };
+
+ /**
+ * Add the given source mapping.
+ *
+ * @param Object aMapping
+ */
+ MappingList.prototype.add = function MappingList_add(aMapping) {
+ if (generatedPositionAfter(this._last, aMapping)) {
+ this._last = aMapping;
+ this._array.push(aMapping);
+ } else {
+ this._sorted = false;
+ this._array.push(aMapping);
+ }
+ };
+
+ /**
+ * Returns the flat, sorted array of mappings. The mappings are sorted by
+ * generated position.
+ *
+ * WARNING: This method returns internal data without copying, for
+ * performance. The return value must NOT be mutated, and should be treated as
+ * an immutable borrow. If you want to take ownership, you must make your own
+ * copy.
+ */
+ MappingList.prototype.toArray = function MappingList_toArray() {
+ if (!this._sorted) {
+ this._array.sort(util.compareByGeneratedPositionsInflated);
+ this._sorted = true;
+ }
+ return this._array;
+ };
+
+ exports.MappingList = MappingList;
+
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var util = __webpack_require__(4);
+ var binarySearch = __webpack_require__(8);
+ var ArraySet = __webpack_require__(5).ArraySet;
+ var base64VLQ = __webpack_require__(2);
+ var quickSort = __webpack_require__(9).quickSort;
+
+ function SourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ return sourceMap.sections != null
+ ? new IndexedSourceMapConsumer(sourceMap)
+ : new BasicSourceMapConsumer(sourceMap);
+ }
+
+ SourceMapConsumer.fromSourceMap = function(aSourceMap) {
+ return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
+ }
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ SourceMapConsumer.prototype._version = 3;
+
+ // `__generatedMappings` and `__originalMappings` are arrays that hold the
+ // parsed mapping coordinates from the source map's "mappings" attribute. They
+ // are lazily instantiated, accessed via the `_generatedMappings` and
+ // `_originalMappings` getters respectively, and we only parse the mappings
+ // and create these arrays once queried for a source location. We jump through
+ // these hoops because there can be many thousands of mappings, and parsing
+ // them is expensive, so we only want to do it if we must.
+ //
+ // Each object in the arrays is of the form:
+ //
+ // {
+ // generatedLine: The line number in the generated code,
+ // generatedColumn: The column number in the generated code,
+ // source: The path to the original source file that generated this
+ // chunk of code,
+ // originalLine: The line number in the original source that
+ // corresponds to this chunk of generated code,
+ // originalColumn: The column number in the original source that
+ // corresponds to this chunk of generated code,
+ // name: The name of the original symbol which generated this chunk of
+ // code.
+ // }
+ //
+ // All properties except for `generatedLine` and `generatedColumn` can be
+ // `null`.
+ //
+ // `_generatedMappings` is ordered by the generated positions.
+ //
+ // `_originalMappings` is ordered by the original positions.
+
+ SourceMapConsumer.prototype.__generatedMappings = null;
+ Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
+ get: function () {
+ if (!this.__generatedMappings) {
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+
+ return this.__generatedMappings;
+ }
+ });
+
+ SourceMapConsumer.prototype.__originalMappings = null;
+ Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
+ get: function () {
+ if (!this.__originalMappings) {
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+
+ return this.__originalMappings;
+ }
+ });
+
+ SourceMapConsumer.prototype._charIsMappingSeparator =
+ function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
+ var c = aStr.charAt(index);
+ return c === ";" || c === ",";
+ };
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ SourceMapConsumer.prototype._parseMappings =
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ throw new Error("Subclasses must implement _parseMappings");
+ };
+
+ SourceMapConsumer.GENERATED_ORDER = 1;
+ SourceMapConsumer.ORIGINAL_ORDER = 2;
+
+ SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
+ SourceMapConsumer.LEAST_UPPER_BOUND = 2;
+
+ /**
+ * Iterate over each mapping between an original source/line/column and a
+ * generated line/column in this source map.
+ *
+ * @param Function aCallback
+ * The function that is called with each mapping.
+ * @param Object aContext
+ * Optional. If specified, this object will be the value of `this` every
+ * time that `aCallback` is called.
+ * @param aOrder
+ * Either `SourceMapConsumer.GENERATED_ORDER` or
+ * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
+ * iterate over the mappings sorted by the generated file's line/column
+ * order or the original's source/line/column order, respectively. Defaults to
+ * `SourceMapConsumer.GENERATED_ORDER`.
+ */
+ SourceMapConsumer.prototype.eachMapping =
+ function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
+ var context = aContext || null;
+ var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
+
+ var mappings;
+ switch (order) {
+ case SourceMapConsumer.GENERATED_ORDER:
+ mappings = this._generatedMappings;
+ break;
+ case SourceMapConsumer.ORIGINAL_ORDER:
+ mappings = this._originalMappings;
+ break;
+ default:
+ throw new Error("Unknown order of iteration.");
+ }
+
+ var sourceRoot = this.sourceRoot;
+ mappings.map(function (mapping) {
+ var source = mapping.source === null ? null : this._sources.at(mapping.source);
+ if (source != null && sourceRoot != null) {
+ source = util.join(sourceRoot, source);
+ }
+ return {
+ source: source,
+ generatedLine: mapping.generatedLine,
+ generatedColumn: mapping.generatedColumn,
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: mapping.name === null ? null : this._names.at(mapping.name)
+ };
+ }, this).forEach(aCallback, context);
+ };
+
+ /**
+ * Returns all generated line and column information for the original source,
+ * line, and column provided. If no column is provided, returns all mappings
+ * corresponding to a either the line we are searching for or the next
+ * closest line that has any mappings. Otherwise, returns all mappings
+ * corresponding to the given line and either the column we are searching for
+ * or the next closest column that has any offsets.
+ *
+ * The only argument is an object with the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: Optional. the column number in the original source.
+ *
+ * and an array of objects is returned, each with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ SourceMapConsumer.prototype.allGeneratedPositionsFor =
+ function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
+ var line = util.getArg(aArgs, 'line');
+
+ // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
+ // returns the index of the closest mapping less than the needle. By
+ // setting needle.originalColumn to 0, we thus find the last mapping for
+ // the given line, provided such a mapping exists.
+ var needle = {
+ source: util.getArg(aArgs, 'source'),
+ originalLine: line,
+ originalColumn: util.getArg(aArgs, 'column', 0)
+ };
+
+ if (this.sourceRoot != null) {
+ needle.source = util.relative(this.sourceRoot, needle.source);
+ }
+ if (!this._sources.has(needle.source)) {
+ return [];
+ }
+ needle.source = this._sources.indexOf(needle.source);
+
+ var mappings = [];
+
+ var index = this._findMapping(needle,
+ this._originalMappings,
+ "originalLine",
+ "originalColumn",
+ util.compareByOriginalPositions,
+ binarySearch.LEAST_UPPER_BOUND);
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+
+ if (aArgs.column === undefined) {
+ var originalLine = mapping.originalLine;
+
+ // Iterate until either we run out of mappings, or we run into
+ // a mapping for a different line than the one we found. Since
+ // mappings are sorted, this is guaranteed to find all mappings for
+ // the line we found.
+ while (mapping && mapping.originalLine === originalLine) {
+ mappings.push({
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ });
+
+ mapping = this._originalMappings[++index];
+ }
+ } else {
+ var originalColumn = mapping.originalColumn;
+
+ // Iterate until either we run out of mappings, or we run into
+ // a mapping for a different line than the one we were searching for.
+ // Since mappings are sorted, this is guaranteed to find all mappings for
+ // the line we are searching for.
+ while (mapping &&
+ mapping.originalLine === line &&
+ mapping.originalColumn == originalColumn) {
+ mappings.push({
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ });
+
+ mapping = this._originalMappings[++index];
+ }
+ }
+ }
+
+ return mappings;
+ };
+
+ exports.SourceMapConsumer = SourceMapConsumer;
+
+ /**
+ * A BasicSourceMapConsumer instance represents a parsed source map which we can
+ * query for information about the original file positions by giving it a file
+ * position in the generated source.
+ *
+ * The only parameter is the raw source map (either as a JSON string, or
+ * already parsed to an object). According to the spec, source maps have the
+ * following attributes:
+ *
+ * - version: Which version of the source map spec this map is following.
+ * - sources: An array of URLs to the original source files.
+ * - names: An array of identifiers which can be referrenced by individual mappings.
+ * - sourceRoot: Optional. The URL root from which all sources are relative.
+ * - sourcesContent: Optional. An array of contents of the original source files.
+ * - mappings: A string of base64 VLQs which contain the actual mappings.
+ * - file: Optional. The generated file this source map is associated with.
+ *
+ * Here is an example source map, taken from the source map spec[0]:
+ *
+ * {
+ * version : 3,
+ * file: "out.js",
+ * sourceRoot : "",
+ * sources: ["foo.js", "bar.js"],
+ * names: ["src", "maps", "are", "fun"],
+ * mappings: "AA,AB;;ABCDE;"
+ * }
+ *
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
+ */
+ function BasicSourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ var version = util.getArg(sourceMap, 'version');
+ var sources = util.getArg(sourceMap, 'sources');
+ // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
+ // requires the array) to play nice here.
+ var names = util.getArg(sourceMap, 'names', []);
+ var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
+ var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
+ var mappings = util.getArg(sourceMap, 'mappings');
+ var file = util.getArg(sourceMap, 'file', null);
+
+ // Once again, Sass deviates from the spec and supplies the version as a
+ // string rather than a number, so we use loose equality checking here.
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+
+ sources = sources
+ .map(String)
+ // Some source maps produce relative source paths like "./foo.js" instead of
+ // "foo.js". Normalize these first so that future comparisons will succeed.
+ // See bugzil.la/1090768.
+ .map(util.normalize)
+ // Always ensure that absolute sources are internally stored relative to
+ // the source root, if the source root is absolute. Not doing this would
+ // be particularly problematic when the source root is a prefix of the
+ // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
+ .map(function (source) {
+ return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
+ ? util.relative(sourceRoot, source)
+ : source;
+ });
+
+ // Pass `true` below to allow duplicate names and sources. While source maps
+ // are intended to be compressed and deduplicated, the TypeScript compiler
+ // sometimes generates source maps with duplicates in them. See Github issue
+ // #72 and bugzil.la/889492.
+ this._names = ArraySet.fromArray(names.map(String), true);
+ this._sources = ArraySet.fromArray(sources, true);
+
+ this.sourceRoot = sourceRoot;
+ this.sourcesContent = sourcesContent;
+ this._mappings = mappings;
+ this.file = file;
+ }
+
+ BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
+ BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
+
+ /**
+ * Create a BasicSourceMapConsumer from a SourceMapGenerator.
+ *
+ * @param SourceMapGenerator aSourceMap
+ * The source map that will be consumed.
+ * @returns BasicSourceMapConsumer
+ */
+ BasicSourceMapConsumer.fromSourceMap =
+ function SourceMapConsumer_fromSourceMap(aSourceMap) {
+ var smc = Object.create(BasicSourceMapConsumer.prototype);
+
+ var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
+ var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
+ smc.sourceRoot = aSourceMap._sourceRoot;
+ smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
+ smc.sourceRoot);
+ smc.file = aSourceMap._file;
+
+ // Because we are modifying the entries (by converting string sources and
+ // names to indices into the sources and names ArraySets), we have to make
+ // a copy of the entry or else bad things happen. Shared mutable state
+ // strikes again! See github issue #191.
+
+ var generatedMappings = aSourceMap._mappings.toArray().slice();
+ var destGeneratedMappings = smc.__generatedMappings = [];
+ var destOriginalMappings = smc.__originalMappings = [];
+
+ for (var i = 0, length = generatedMappings.length; i < length; i++) {
+ var srcMapping = generatedMappings[i];
+ var destMapping = new Mapping;
+ destMapping.generatedLine = srcMapping.generatedLine;
+ destMapping.generatedColumn = srcMapping.generatedColumn;
+
+ if (srcMapping.source) {
+ destMapping.source = sources.indexOf(srcMapping.source);
+ destMapping.originalLine = srcMapping.originalLine;
+ destMapping.originalColumn = srcMapping.originalColumn;
+
+ if (srcMapping.name) {
+ destMapping.name = names.indexOf(srcMapping.name);
+ }
+
+ destOriginalMappings.push(destMapping);
+ }
+
+ destGeneratedMappings.push(destMapping);
+ }
+
+ quickSort(smc.__originalMappings, util.compareByOriginalPositions);
+
+ return smc;
+ };
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ BasicSourceMapConsumer.prototype._version = 3;
+
+ /**
+ * The list of original sources.
+ */
+ Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ return this._sources.toArray().map(function (s) {
+ return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
+ }, this);
+ }
+ });
+
+ /**
+ * Provide the JIT with a nice shape / hidden class.
+ */
+ function Mapping() {
+ this.generatedLine = 0;
+ this.generatedColumn = 0;
+ this.source = null;
+ this.originalLine = null;
+ this.originalColumn = null;
+ this.name = null;
+ }
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ BasicSourceMapConsumer.prototype._parseMappings =
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ var generatedLine = 1;
+ var previousGeneratedColumn = 0;
+ var previousOriginalLine = 0;
+ var previousOriginalColumn = 0;
+ var previousSource = 0;
+ var previousName = 0;
+ var length = aStr.length;
+ var index = 0;
+ var cachedSegments = {};
+ var temp = {};
+ var originalMappings = [];
+ var generatedMappings = [];
+ var mapping, str, segment, end, value;
+
+ while (index < length) {
+ if (aStr.charAt(index) === ';') {
+ generatedLine++;
+ index++;
+ previousGeneratedColumn = 0;
+ }
+ else if (aStr.charAt(index) === ',') {
+ index++;
+ }
+ else {
+ mapping = new Mapping();
+ mapping.generatedLine = generatedLine;
+
+ // Because each offset is encoded relative to the previous one,
+ // many segments often have the same encoding. We can exploit this
+ // fact by caching the parsed variable length fields of each segment,
+ // allowing us to avoid a second parse if we encounter the same
+ // segment again.
+ for (end = index; end < length; end++) {
+ if (this._charIsMappingSeparator(aStr, end)) {
+ break;
+ }
+ }
+ str = aStr.slice(index, end);
+
+ segment = cachedSegments[str];
+ if (segment) {
+ index += str.length;
+ } else {
+ segment = [];
+ while (index < end) {
+ base64VLQ.decode(aStr, index, temp);
+ value = temp.value;
+ index = temp.rest;
+ segment.push(value);
+ }
+
+ if (segment.length === 2) {
+ throw new Error('Found a source, but no line and column');
+ }
+
+ if (segment.length === 3) {
+ throw new Error('Found a source and line, but no column');
+ }
+
+ cachedSegments[str] = segment;
+ }
+
+ // Generated column.
+ mapping.generatedColumn = previousGeneratedColumn + segment[0];
+ previousGeneratedColumn = mapping.generatedColumn;
+
+ if (segment.length > 1) {
+ // Original source.
+ mapping.source = previousSource + segment[1];
+ previousSource += segment[1];
+
+ // Original line.
+ mapping.originalLine = previousOriginalLine + segment[2];
+ previousOriginalLine = mapping.originalLine;
+ // Lines are stored 0-based
+ mapping.originalLine += 1;
+
+ // Original column.
+ mapping.originalColumn = previousOriginalColumn + segment[3];
+ previousOriginalColumn = mapping.originalColumn;
+
+ if (segment.length > 4) {
+ // Original name.
+ mapping.name = previousName + segment[4];
+ previousName += segment[4];
+ }
+ }
+
+ generatedMappings.push(mapping);
+ if (typeof mapping.originalLine === 'number') {
+ originalMappings.push(mapping);
+ }
+ }
+ }
+
+ quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
+ this.__generatedMappings = generatedMappings;
+
+ quickSort(originalMappings, util.compareByOriginalPositions);
+ this.__originalMappings = originalMappings;
+ };
+
+ /**
+ * Find the mapping that best matches the hypothetical "needle" mapping that
+ * we are searching for in the given "haystack" of mappings.
+ */
+ BasicSourceMapConsumer.prototype._findMapping =
+ function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
+ aColumnName, aComparator, aBias) {
+ // To return the position we are searching for, we must first find the
+ // mapping for the given position and then return the opposite position it
+ // points to. Because the mappings are sorted, we can use binary search to
+ // find the best mapping.
+
+ if (aNeedle[aLineName] <= 0) {
+ throw new TypeError('Line must be greater than or equal to 1, got '
+ + aNeedle[aLineName]);
+ }
+ if (aNeedle[aColumnName] < 0) {
+ throw new TypeError('Column must be greater than or equal to 0, got '
+ + aNeedle[aColumnName]);
+ }
+
+ return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
+ };
+
+ /**
+ * Compute the last column for each generated mapping. The last column is
+ * inclusive.
+ */
+ BasicSourceMapConsumer.prototype.computeColumnSpans =
+ function SourceMapConsumer_computeColumnSpans() {
+ for (var index = 0; index < this._generatedMappings.length; ++index) {
+ var mapping = this._generatedMappings[index];
+
+ // Mappings do not contain a field for the last generated columnt. We
+ // can come up with an optimistic estimate, however, by assuming that
+ // mappings are contiguous (i.e. given two consecutive mappings, the
+ // first mapping ends where the second one starts).
+ if (index + 1 < this._generatedMappings.length) {
+ var nextMapping = this._generatedMappings[index + 1];
+
+ if (mapping.generatedLine === nextMapping.generatedLine) {
+ mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
+ continue;
+ }
+ }
+
+ // The last mapping for each line spans the entire line.
+ mapping.lastGeneratedColumn = Infinity;
+ }
+ };
+
+ /**
+ * Returns the original source, line, and column information for the generated
+ * source's line and column positions provided. The only argument is an object
+ * with the following properties:
+ *
+ * - line: The line number in the generated source.
+ * - column: The column number in the generated source.
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - source: The original source file, or null.
+ * - line: The line number in the original source, or null.
+ * - column: The column number in the original source, or null.
+ * - name: The original identifier, or null.
+ */
+ BasicSourceMapConsumer.prototype.originalPositionFor =
+ function SourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+
+ var index = this._findMapping(
+ needle,
+ this._generatedMappings,
+ "generatedLine",
+ "generatedColumn",
+ util.compareByGeneratedPositionsDeflated,
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
+ );
+
+ if (index >= 0) {
+ var mapping = this._generatedMappings[index];
+
+ if (mapping.generatedLine === needle.generatedLine) {
+ var source = util.getArg(mapping, 'source', null);
+ if (source !== null) {
+ source = this._sources.at(source);
+ if (this.sourceRoot != null) {
+ source = util.join(this.sourceRoot, source);
+ }
+ }
+ var name = util.getArg(mapping, 'name', null);
+ if (name !== null) {
+ name = this._names.at(name);
+ }
+ return {
+ source: source,
+ line: util.getArg(mapping, 'originalLine', null),
+ column: util.getArg(mapping, 'originalColumn', null),
+ name: name
+ };
+ }
+ }
+
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ };
+
+ /**
+ * Return true if we have the source content for every source in the source
+ * map, false otherwise.
+ */
+ BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
+ function BasicSourceMapConsumer_hasContentsOfAllSources() {
+ if (!this.sourcesContent) {
+ return false;
+ }
+ return this.sourcesContent.length >= this._sources.size() &&
+ !this.sourcesContent.some(function (sc) { return sc == null; });
+ };
+
+ /**
+ * Returns the original source content. The only argument is the url of the
+ * original source file. Returns null if no original source content is
+ * available.
+ */
+ BasicSourceMapConsumer.prototype.sourceContentFor =
+ function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
+ if (!this.sourcesContent) {
+ return null;
+ }
+
+ if (this.sourceRoot != null) {
+ aSource = util.relative(this.sourceRoot, aSource);
+ }
+
+ if (this._sources.has(aSource)) {
+ return this.sourcesContent[this._sources.indexOf(aSource)];
+ }
+
+ var url;
+ if (this.sourceRoot != null
+ && (url = util.urlParse(this.sourceRoot))) {
+ // XXX: file:// URIs and absolute paths lead to unexpected behavior for
+ // many users. We can help them out when they expect file:// URIs to
+ // behave like it would if they were running a local HTTP server. See
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
+ var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
+ if (url.scheme == "file"
+ && this._sources.has(fileUriAbsPath)) {
+ return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
+ }
+
+ if ((!url.path || url.path == "/")
+ && this._sources.has("/" + aSource)) {
+ return this.sourcesContent[this._sources.indexOf("/" + aSource)];
+ }
+ }
+
+ // This function is used recursively from
+ // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
+ // don't want to throw if we can't find the source - we just want to
+ // return null, so we provide a flag to exit gracefully.
+ if (nullOnMissing) {
+ return null;
+ }
+ else {
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ }
+ };
+
+ /**
+ * Returns the generated line and column information for the original source,
+ * line, and column positions provided. The only argument is an object with
+ * the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: The column number in the original source.
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ BasicSourceMapConsumer.prototype.generatedPositionFor =
+ function SourceMapConsumer_generatedPositionFor(aArgs) {
+ var source = util.getArg(aArgs, 'source');
+ if (this.sourceRoot != null) {
+ source = util.relative(this.sourceRoot, source);
+ }
+ if (!this._sources.has(source)) {
+ return {
+ line: null,
+ column: null,
+ lastColumn: null
+ };
+ }
+ source = this._sources.indexOf(source);
+
+ var needle = {
+ source: source,
+ originalLine: util.getArg(aArgs, 'line'),
+ originalColumn: util.getArg(aArgs, 'column')
+ };
+
+ var index = this._findMapping(
+ needle,
+ this._originalMappings,
+ "originalLine",
+ "originalColumn",
+ util.compareByOriginalPositions,
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
+ );
+
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+
+ if (mapping.source === needle.source) {
+ return {
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ };
+ }
+ }
+
+ return {
+ line: null,
+ column: null,
+ lastColumn: null
+ };
+ };
+
+ exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
+
+ /**
+ * An IndexedSourceMapConsumer instance represents a parsed source map which
+ * we can query for information. It differs from BasicSourceMapConsumer in
+ * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
+ * input.
+ *
+ * The only parameter is a raw source map (either as a JSON string, or already
+ * parsed to an object). According to the spec for indexed source maps, they
+ * have the following attributes:
+ *
+ * - version: Which version of the source map spec this map is following.
+ * - file: Optional. The generated file this source map is associated with.
+ * - sections: A list of section definitions.
+ *
+ * Each value under the "sections" field has two fields:
+ * - offset: The offset into the original specified at which this section
+ * begins to apply, defined as an object with a "line" and "column"
+ * field.
+ * - map: A source map definition. This source map could also be indexed,
+ * but doesn't have to be.
+ *
+ * Instead of the "map" field, it's also possible to have a "url" field
+ * specifying a URL to retrieve a source map from, but that's currently
+ * unsupported.
+ *
+ * Here's an example source map, taken from the source map spec[0], but
+ * modified to omit a section which uses the "url" field.
+ *
+ * {
+ * version : 3,
+ * file: "app.js",
+ * sections: [{
+ * offset: {line:100, column:10},
+ * map: {
+ * version : 3,
+ * file: "section.js",
+ * sources: ["foo.js", "bar.js"],
+ * names: ["src", "maps", "are", "fun"],
+ * mappings: "AAAA,E;;ABCDE;"
+ * }
+ * }],
+ * }
+ *
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
+ */
+ function IndexedSourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ var version = util.getArg(sourceMap, 'version');
+ var sections = util.getArg(sourceMap, 'sections');
+
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+
+ this._sources = new ArraySet();
+ this._names = new ArraySet();
+
+ var lastOffset = {
+ line: -1,
+ column: 0
+ };
+ this._sections = sections.map(function (s) {
+ if (s.url) {
+ // The url field will require support for asynchronicity.
+ // See https://github.com/mozilla/source-map/issues/16
+ throw new Error('Support for url field in sections not implemented.');
+ }
+ var offset = util.getArg(s, 'offset');
+ var offsetLine = util.getArg(offset, 'line');
+ var offsetColumn = util.getArg(offset, 'column');
+
+ if (offsetLine < lastOffset.line ||
+ (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
+ throw new Error('Section offsets must be ordered and non-overlapping.');
+ }
+ lastOffset = offset;
+
+ return {
+ generatedOffset: {
+ // The offset fields are 0-based, but we use 1-based indices when
+ // encoding/decoding from VLQ.
+ generatedLine: offsetLine + 1,
+ generatedColumn: offsetColumn + 1
+ },
+ consumer: new SourceMapConsumer(util.getArg(s, 'map'))
+ }
+ });
+ }
+
+ IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
+ IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ IndexedSourceMapConsumer.prototype._version = 3;
+
+ /**
+ * The list of original sources.
+ */
+ Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ var sources = [];
+ for (var i = 0; i < this._sections.length; i++) {
+ for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
+ sources.push(this._sections[i].consumer.sources[j]);
+ }
+ }
+ return sources;
+ }
+ });
+
+ /**
+ * Returns the original source, line, and column information for the generated
+ * source's line and column positions provided. The only argument is an object
+ * with the following properties:
+ *
+ * - line: The line number in the generated source.
+ * - column: The column number in the generated source.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - source: The original source file, or null.
+ * - line: The line number in the original source, or null.
+ * - column: The column number in the original source, or null.
+ * - name: The original identifier, or null.
+ */
+ IndexedSourceMapConsumer.prototype.originalPositionFor =
+ function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+
+ // Find the section containing the generated position we're trying to map
+ // to an original position.
+ var sectionIndex = binarySearch.search(needle, this._sections,
+ function(needle, section) {
+ var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
+ if (cmp) {
+ return cmp;
+ }
+
+ return (needle.generatedColumn -
+ section.generatedOffset.generatedColumn);
+ });
+ var section = this._sections[sectionIndex];
+
+ if (!section) {
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ }
+
+ return section.consumer.originalPositionFor({
+ line: needle.generatedLine -
+ (section.generatedOffset.generatedLine - 1),
+ column: needle.generatedColumn -
+ (section.generatedOffset.generatedLine === needle.generatedLine
+ ? section.generatedOffset.generatedColumn - 1
+ : 0),
+ bias: aArgs.bias
+ });
+ };
+
+ /**
+ * Return true if we have the source content for every source in the source
+ * map, false otherwise.
+ */
+ IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
+ function IndexedSourceMapConsumer_hasContentsOfAllSources() {
+ return this._sections.every(function (s) {
+ return s.consumer.hasContentsOfAllSources();
+ });
+ };
+
+ /**
+ * Returns the original source content. The only argument is the url of the
+ * original source file. Returns null if no original source content is
+ * available.
+ */
+ IndexedSourceMapConsumer.prototype.sourceContentFor =
+ function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+
+ var content = section.consumer.sourceContentFor(aSource, true);
+ if (content) {
+ return content;
+ }
+ }
+ if (nullOnMissing) {
+ return null;
+ }
+ else {
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ }
+ };
+
+ /**
+ * Returns the generated line and column information for the original source,
+ * line, and column positions provided. The only argument is an object with
+ * the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: The column number in the original source.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ IndexedSourceMapConsumer.prototype.generatedPositionFor =
+ function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+
+ // Only consider this section if the requested source is in the list of
+ // sources of the consumer.
+ if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
+ continue;
+ }
+ var generatedPosition = section.consumer.generatedPositionFor(aArgs);
+ if (generatedPosition) {
+ var ret = {
+ line: generatedPosition.line +
+ (section.generatedOffset.generatedLine - 1),
+ column: generatedPosition.column +
+ (section.generatedOffset.generatedLine === generatedPosition.line
+ ? section.generatedOffset.generatedColumn - 1
+ : 0)
+ };
+ return ret;
+ }
+ }
+
+ return {
+ line: null,
+ column: null
+ };
+ };
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ IndexedSourceMapConsumer.prototype._parseMappings =
+ function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ this.__generatedMappings = [];
+ this.__originalMappings = [];
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+ var sectionMappings = section.consumer._generatedMappings;
+ for (var j = 0; j < sectionMappings.length; j++) {
+ var mapping = sectionMappings[j];
+
+ var source = section.consumer._sources.at(mapping.source);
+ if (section.consumer.sourceRoot !== null) {
+ source = util.join(section.consumer.sourceRoot, source);
+ }
+ this._sources.add(source);
+ source = this._sources.indexOf(source);
+
+ var name = section.consumer._names.at(mapping.name);
+ this._names.add(name);
+ name = this._names.indexOf(name);
+
+ // The mappings coming from the consumer for the section have
+ // generated positions relative to the start of the section, so we
+ // need to offset them to be relative to the start of the concatenated
+ // generated file.
+ var adjustedMapping = {
+ source: source,
+ generatedLine: mapping.generatedLine +
+ (section.generatedOffset.generatedLine - 1),
+ generatedColumn: mapping.generatedColumn +
+ (section.generatedOffset.generatedLine === mapping.generatedLine
+ ? section.generatedOffset.generatedColumn - 1
+ : 0),
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: name
+ };
+
+ this.__generatedMappings.push(adjustedMapping);
+ if (typeof adjustedMapping.originalLine === 'number') {
+ this.__originalMappings.push(adjustedMapping);
+ }
+ }
+ }
+
+ quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
+ quickSort(this.__originalMappings, util.compareByOriginalPositions);
+ };
+
+ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
+
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ exports.GREATEST_LOWER_BOUND = 1;
+ exports.LEAST_UPPER_BOUND = 2;
+
+ /**
+ * Recursive implementation of binary search.
+ *
+ * @param aLow Indices here and lower do not contain the needle.
+ * @param aHigh Indices here and higher do not contain the needle.
+ * @param aNeedle The element being searched for.
+ * @param aHaystack The non-empty array being searched.
+ * @param aCompare Function which takes two elements and returns -1, 0, or 1.
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ */
+ function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
+ // This function terminates when one of the following is true:
+ //
+ // 1. We find the exact element we are looking for.
+ //
+ // 2. We did not find the exact element, but we can return the index of
+ // the next-closest element.
+ //
+ // 3. We did not find the exact element, and there is no next-closest
+ // element than the one we are searching for, so we return -1.
+ var mid = Math.floor((aHigh - aLow) / 2) + aLow;
+ var cmp = aCompare(aNeedle, aHaystack[mid], true);
+ if (cmp === 0) {
+ // Found the element we are looking for.
+ return mid;
+ }
+ else if (cmp > 0) {
+ // Our needle is greater than aHaystack[mid].
+ if (aHigh - mid > 1) {
+ // The element is in the upper half.
+ return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
+ }
+
+ // The exact needle element was not found in this haystack. Determine if
+ // we are in termination case (3) or (2) and return the appropriate thing.
+ if (aBias == exports.LEAST_UPPER_BOUND) {
+ return aHigh < aHaystack.length ? aHigh : -1;
+ } else {
+ return mid;
+ }
+ }
+ else {
+ // Our needle is less than aHaystack[mid].
+ if (mid - aLow > 1) {
+ // The element is in the lower half.
+ return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
+ }
+
+ // we are in termination case (3) or (2) and return the appropriate thing.
+ if (aBias == exports.LEAST_UPPER_BOUND) {
+ return mid;
+ } else {
+ return aLow < 0 ? -1 : aLow;
+ }
+ }
+ }
+
+ /**
+ * This is an implementation of binary search which will always try and return
+ * the index of the closest element if there is no exact hit. This is because
+ * mappings between original and generated line/col pairs are single points,
+ * and there is an implicit region between each of them, so a miss just means
+ * that you aren't on the very start of a region.
+ *
+ * @param aNeedle The element you are looking for.
+ * @param aHaystack The array that is being searched.
+ * @param aCompare A function which takes the needle and an element in the
+ * array and returns -1, 0, or 1 depending on whether the needle is less
+ * than, equal to, or greater than the element, respectively.
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
+ */
+ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
+ if (aHaystack.length === 0) {
+ return -1;
+ }
+
+ var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
+ aCompare, aBias || exports.GREATEST_LOWER_BOUND);
+ if (index < 0) {
+ return -1;
+ }
+
+ // We have found either the exact element, or the next-closest element than
+ // the one we are searching for. However, there may be more than one such
+ // element. Make sure we always return the smallest of these.
+ while (index - 1 >= 0) {
+ if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
+ break;
+ }
+ --index;
+ }
+
+ return index;
+ };
+
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ // It turns out that some (most?) JavaScript engines don't self-host
+ // `Array.prototype.sort`. This makes sense because C++ will likely remain
+ // faster than JS when doing raw CPU-intensive sorting. However, when using a
+ // custom comparator function, calling back and forth between the VM's C++ and
+ // JIT'd JS is rather slow *and* loses JIT type information, resulting in
+ // worse generated code for the comparator function than would be optimal. In
+ // fact, when sorting with a comparator, these costs outweigh the benefits of
+ // sorting in C++. By using our own JS-implemented Quick Sort (below), we get
+ // a ~3500ms mean speed-up in `bench/bench.html`.
+
+ /**
+ * Swap the elements indexed by `x` and `y` in the array `ary`.
+ *
+ * @param {Array} ary
+ * The array.
+ * @param {Number} x
+ * The index of the first item.
+ * @param {Number} y
+ * The index of the second item.
+ */
+ function swap(ary, x, y) {
+ var temp = ary[x];
+ ary[x] = ary[y];
+ ary[y] = temp;
+ }
+
+ /**
+ * Returns a random integer within the range `low .. high` inclusive.
+ *
+ * @param {Number} low
+ * The lower bound on the range.
+ * @param {Number} high
+ * The upper bound on the range.
+ */
+ function randomIntInRange(low, high) {
+ return Math.round(low + (Math.random() * (high - low)));
+ }
+
+ /**
+ * The Quick Sort algorithm.
+ *
+ * @param {Array} ary
+ * An array to sort.
+ * @param {function} comparator
+ * Function to use to compare two items.
+ * @param {Number} p
+ * Start index of the array
+ * @param {Number} r
+ * End index of the array
+ */
+ function doQuickSort(ary, comparator, p, r) {
+ // If our lower bound is less than our upper bound, we (1) partition the
+ // array into two pieces and (2) recurse on each half. If it is not, this is
+ // the empty array and our base case.
+
+ if (p < r) {
+ // (1) Partitioning.
+ //
+ // The partitioning chooses a pivot between `p` and `r` and moves all
+ // elements that are less than or equal to the pivot to the before it, and
+ // all the elements that are greater than it after it. The effect is that
+ // once partition is done, the pivot is in the exact place it will be when
+ // the array is put in sorted order, and it will not need to be moved
+ // again. This runs in O(n) time.
+
+ // Always choose a random pivot so that an input array which is reverse
+ // sorted does not cause O(n^2) running time.
+ var pivotIndex = randomIntInRange(p, r);
+ var i = p - 1;
+
+ swap(ary, pivotIndex, r);
+ var pivot = ary[r];
+
+ // Immediately after `j` is incremented in this loop, the following hold
+ // true:
+ //
+ // * Every element in `ary[p .. i]` is less than or equal to the pivot.
+ //
+ // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
+ for (var j = p; j < r; j++) {
+ if (comparator(ary[j], pivot) <= 0) {
+ i += 1;
+ swap(ary, i, j);
+ }
+ }
+
+ swap(ary, i + 1, j);
+ var q = i + 1;
+
+ // (2) Recurse on each half.
+
+ doQuickSort(ary, comparator, p, q - 1);
+ doQuickSort(ary, comparator, q + 1, r);
+ }
+ }
+
+ /**
+ * Sort the given array in-place with the given comparator function.
+ *
+ * @param {Array} ary
+ * An array to sort.
+ * @param {function} comparator
+ * Function to use to compare two items.
+ */
+ exports.quickSort = function (ary, comparator) {
+ doQuickSort(ary, comparator, 0, ary.length - 1);
+ };
+
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;
+ var util = __webpack_require__(4);
+
+ // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
+ // operating systems these days (capturing the result).
+ var REGEX_NEWLINE = /(\r?\n)/;
+
+ // Newline character code for charCodeAt() comparisons
+ var NEWLINE_CODE = 10;
+
+ // Private symbol for identifying `SourceNode`s when multiple versions of
+ // the source-map library are loaded. This MUST NOT CHANGE across
+ // versions!
+ var isSourceNode = "$$$isSourceNode$$$";
+
+ /**
+ * SourceNodes provide a way to abstract over interpolating/concatenating
+ * snippets of generated JavaScript source code while maintaining the line and
+ * column information associated with the original source code.
+ *
+ * @param aLine The original line number.
+ * @param aColumn The original column number.
+ * @param aSource The original source's filename.
+ * @param aChunks Optional. An array of strings which are snippets of
+ * generated JS, or other SourceNodes.
+ * @param aName The original identifier.
+ */
+ function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
+ this.children = [];
+ this.sourceContents = {};
+ this.line = aLine == null ? null : aLine;
+ this.column = aColumn == null ? null : aColumn;
+ this.source = aSource == null ? null : aSource;
+ this.name = aName == null ? null : aName;
+ this[isSourceNode] = true;
+ if (aChunks != null) this.add(aChunks);
+ }
+
+ /**
+ * Creates a SourceNode from generated code and a SourceMapConsumer.
+ *
+ * @param aGeneratedCode The generated code
+ * @param aSourceMapConsumer The SourceMap for the generated code
+ * @param aRelativePath Optional. The path that relative sources in the
+ * SourceMapConsumer should be relative to.
+ */
+ SourceNode.fromStringWithSourceMap =
+ function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
+ // The SourceNode we want to fill with the generated code
+ // and the SourceMap
+ var node = new SourceNode();
+
+ // All even indices of this array are one line of the generated code,
+ // while all odd indices are the newlines between two adjacent lines
+ // (since `REGEX_NEWLINE` captures its match).
+ // Processed fragments are accessed by calling `shiftNextLine`.
+ var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
+ var remainingLinesIndex = 0;
+ var shiftNextLine = function() {
+ var lineContents = getNextLine();
+ // The last line of a file might not have a newline.
+ var newLine = getNextLine() || "";
+ return lineContents + newLine;
+
+ function getNextLine() {
+ return remainingLinesIndex < remainingLines.length ?
+ remainingLines[remainingLinesIndex++] : undefined;
+ }
+ };
+
+ // We need to remember the position of "remainingLines"
+ var lastGeneratedLine = 1, lastGeneratedColumn = 0;
+
+ // The generate SourceNodes we need a code range.
+ // To extract it current and last mapping is used.
+ // Here we store the last mapping.
+ var lastMapping = null;
+
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ if (lastMapping !== null) {
+ // We add the code from "lastMapping" to "mapping":
+ // First check if there is a new line in between.
+ if (lastGeneratedLine < mapping.generatedLine) {
+ // Associate first line with "lastMapping"
+ addMappingWithCode(lastMapping, shiftNextLine());
+ lastGeneratedLine++;
+ lastGeneratedColumn = 0;
+ // The remaining code is added without mapping
+ } else {
+ // There is no new line in between.
+ // Associate the code between "lastGeneratedColumn" and
+ // "mapping.generatedColumn" with "lastMapping"
+ var nextLine = remainingLines[remainingLinesIndex];
+ var code = nextLine.substr(0, mapping.generatedColumn -
+ lastGeneratedColumn);
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -
+ lastGeneratedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ addMappingWithCode(lastMapping, code);
+ // No more remaining code, continue
+ lastMapping = mapping;
+ return;
+ }
+ }
+ // We add the generated code until the first mapping
+ // to the SourceNode without any mapping.
+ // Each line is added as separate string.
+ while (lastGeneratedLine < mapping.generatedLine) {
+ node.add(shiftNextLine());
+ lastGeneratedLine++;
+ }
+ if (lastGeneratedColumn < mapping.generatedColumn) {
+ var nextLine = remainingLines[remainingLinesIndex];
+ node.add(nextLine.substr(0, mapping.generatedColumn));
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ }
+ lastMapping = mapping;
+ }, this);
+ // We have processed all mappings.
+ if (remainingLinesIndex < remainingLines.length) {
+ if (lastMapping) {
+ // Associate the remaining code in the current line with "lastMapping"
+ addMappingWithCode(lastMapping, shiftNextLine());
+ }
+ // and add the remaining lines without any mapping
+ node.add(remainingLines.splice(remainingLinesIndex).join(""));
+ }
+
+ // Copy sourcesContent into SourceNode
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aRelativePath != null) {
+ sourceFile = util.join(aRelativePath, sourceFile);
+ }
+ node.setSourceContent(sourceFile, content);
+ }
+ });
+
+ return node;
+
+ function addMappingWithCode(mapping, code) {
+ if (mapping === null || mapping.source === undefined) {
+ node.add(code);
+ } else {
+ var source = aRelativePath
+ ? util.join(aRelativePath, mapping.source)
+ : mapping.source;
+ node.add(new SourceNode(mapping.originalLine,
+ mapping.originalColumn,
+ source,
+ code,
+ mapping.name));
+ }
+ }
+ };
+
+ /**
+ * Add a chunk of generated JS to this source node.
+ *
+ * @param aChunk A string snippet of generated JS code, another instance of
+ * SourceNode, or an array where each member is one of those things.
+ */
+ SourceNode.prototype.add = function SourceNode_add(aChunk) {
+ if (Array.isArray(aChunk)) {
+ aChunk.forEach(function (chunk) {
+ this.add(chunk);
+ }, this);
+ }
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
+ if (aChunk) {
+ this.children.push(aChunk);
+ }
+ }
+ else {
+ throw new TypeError(
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
+ );
+ }
+ return this;
+ };
+
+ /**
+ * Add a chunk of generated JS to the beginning of this source node.
+ *
+ * @param aChunk A string snippet of generated JS code, another instance of
+ * SourceNode, or an array where each member is one of those things.
+ */
+ SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
+ if (Array.isArray(aChunk)) {
+ for (var i = aChunk.length-1; i >= 0; i--) {
+ this.prepend(aChunk[i]);
+ }
+ }
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
+ this.children.unshift(aChunk);
+ }
+ else {
+ throw new TypeError(
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
+ );
+ }
+ return this;
+ };
+
+ /**
+ * Walk over the tree of JS snippets in this node and its children. The
+ * walking function is called once for each snippet of JS and is passed that
+ * snippet and the its original associated source's line/column location.
+ *
+ * @param aFn The traversal function.
+ */
+ SourceNode.prototype.walk = function SourceNode_walk(aFn) {
+ var chunk;
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ chunk = this.children[i];
+ if (chunk[isSourceNode]) {
+ chunk.walk(aFn);
+ }
+ else {
+ if (chunk !== '') {
+ aFn(chunk, { source: this.source,
+ line: this.line,
+ column: this.column,
+ name: this.name });
+ }
+ }
+ }
+ };
+
+ /**
+ * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
+ * each of `this.children`.
+ *
+ * @param aSep The separator.
+ */
+ SourceNode.prototype.join = function SourceNode_join(aSep) {
+ var newChildren;
+ var i;
+ var len = this.children.length;
+ if (len > 0) {
+ newChildren = [];
+ for (i = 0; i < len-1; i++) {
+ newChildren.push(this.children[i]);
+ newChildren.push(aSep);
+ }
+ newChildren.push(this.children[i]);
+ this.children = newChildren;
+ }
+ return this;
+ };
+
+ /**
+ * Call String.prototype.replace on the very right-most source snippet. Useful
+ * for trimming whitespace from the end of a source node, etc.
+ *
+ * @param aPattern The pattern to replace.
+ * @param aReplacement The thing to replace the pattern with.
+ */
+ SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
+ var lastChild = this.children[this.children.length - 1];
+ if (lastChild[isSourceNode]) {
+ lastChild.replaceRight(aPattern, aReplacement);
+ }
+ else if (typeof lastChild === 'string') {
+ this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
+ }
+ else {
+ this.children.push(''.replace(aPattern, aReplacement));
+ }
+ return this;
+ };
+
+ /**
+ * Set the source content for a source file. This will be added to the SourceMapGenerator
+ * in the sourcesContent field.
+ *
+ * @param aSourceFile The filename of the source file
+ * @param aSourceContent The content of the source file
+ */
+ SourceNode.prototype.setSourceContent =
+ function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
+ this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
+ };
+
+ /**
+ * Walk over the tree of SourceNodes. The walking function is called for each
+ * source file content and is passed the filename and source content.
+ *
+ * @param aFn The traversal function.
+ */
+ SourceNode.prototype.walkSourceContents =
+ function SourceNode_walkSourceContents(aFn) {
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ if (this.children[i][isSourceNode]) {
+ this.children[i].walkSourceContents(aFn);
+ }
+ }
+
+ var sources = Object.keys(this.sourceContents);
+ for (var i = 0, len = sources.length; i < len; i++) {
+ aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
+ }
+ };
+
+ /**
+ * Return the string representation of this source node. Walks over the tree
+ * and concatenates all the various snippets together to one string.
+ */
+ SourceNode.prototype.toString = function SourceNode_toString() {
+ var str = "";
+ this.walk(function (chunk) {
+ str += chunk;
+ });
+ return str;
+ };
+
+ /**
+ * Returns the string representation of this source node along with a source
+ * map.
+ */
+ SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
+ var generated = {
+ code: "",
+ line: 1,
+ column: 0
+ };
+ var map = new SourceMapGenerator(aArgs);
+ var sourceMappingActive = false;
+ var lastOriginalSource = null;
+ var lastOriginalLine = null;
+ var lastOriginalColumn = null;
+ var lastOriginalName = null;
+ this.walk(function (chunk, original) {
+ generated.code += chunk;
+ if (original.source !== null
+ && original.line !== null
+ && original.column !== null) {
+ if(lastOriginalSource !== original.source
+ || lastOriginalLine !== original.line
+ || lastOriginalColumn !== original.column
+ || lastOriginalName !== original.name) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ lastOriginalSource = original.source;
+ lastOriginalLine = original.line;
+ lastOriginalColumn = original.column;
+ lastOriginalName = original.name;
+ sourceMappingActive = true;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ generated: {
+ line: generated.line,
+ column: generated.column
+ }
+ });
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ }
+ for (var idx = 0, length = chunk.length; idx < length; idx++) {
+ if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
+ generated.line++;
+ generated.column = 0;
+ // Mappings end at eol
+ if (idx + 1 === length) {
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ } else {
+ generated.column++;
+ }
+ }
+ });
+ this.walkSourceContents(function (sourceFile, sourceContent) {
+ map.setSourceContent(sourceFile, sourceContent);
+ });
+
+ return { code: generated.code, map: map };
+ };
+
+ exports.SourceNode = SourceNode;
+
+
+/***/ })
+/******/ ])
+});
+; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.min.js b/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.min.js
new file mode 100644
index 0000000000..f2a46bd025
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.min.js
@@ -0,0 +1,2 @@
+!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f<d;f++){if(n=h[f],e="",n.generatedLine!==a)for(s=0;n.generatedLine!==a;)e+=";",a++;else if(f>0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<<s,u=a-1,l=a;n.encode=function(e){var n,r="",o=t(e);do n=o&u,o>>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<<p,p+=s}while(t);r.value=o(g),r.rest=n}},function(e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(0<=e&&e<r.length)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},n.decode=function(e){var n=65,r=90,t=97,o=122,i=48,s=57,a=43,u=47,l=26,c=52;return n<=e&&e<=r?e-n:t<=e&&e<=o?e-t+l:i<=e&&e<=s?e-i+c:e==a?62:e==u?63:-1}},function(e,n){function r(e,n,r){if(n in e)return e[n];if(3===arguments.length)return r;throw new Error('"'+n+'" is a required argument.')}function t(e){var n=e.match(m);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function o(e){var n="";return e.scheme&&(n+=e.scheme+":"),n+="//",e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}function i(e){var r=e,i=t(e);if(i){if(!i.path)return e;r=i.path}for(var s,a=n.isAbsolute(r),u=r.split(/\/+/),l=0,c=u.length-1;c>=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(_))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=e.source-n.source;return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:e.name-n.name))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=e.source-n.source,0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:e.name-n.name))))}function f(e,n){return e===n?0:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}n.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,_=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(m)},n.relative=a;var v=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=v?u:l,n.fromSetString=v?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o<i;o++)r.add(e[o],n);return r},t.prototype.size=function(){return s?this._set.size:Object.getOwnPropertyNames(this._set).length},t.prototype.add=function(e,n){var r=s?e:o.toSetString(e),t=s?this.has(e):i.call(this._set,r),a=this._array.length;t&&!n||this._array.push(e),t||(s?this._set.set(e,a):this._set[r]=a)},t.prototype.has=function(e){if(s)return this._set.has(e);var n=o.toSetString(e);return i.call(this._set,n)},t.prototype.indexOf=function(e){if(s){var n=this._set.get(e);if(n>=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},t.prototype.toArray=function(){return this._array.slice()},n.ArraySet=t},function(e,n,r){function t(e,n){var r=e.generatedLine,t=n.generatedLine,o=e.generatedColumn,s=n.generatedColumn;return t>r||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),t=a.getArg(n,"sources"),o=a.getArg(n,"names",[]),i=a.getArg(n,"sourceRoot",null),s=a.getArg(n,"sourcesContent",null),u=a.getArg(n,"mappings"),c=a.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);t=t.map(String).map(a.normalize).map(function(e){return i&&a.isAbsolute(i)&&a.isAbsolute(e)?a.relative(i,e):e}),this._names=l.fromArray(o.map(String),!0),this._sources=l.fromArray(t,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=u,this.file=c}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),o=a.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=a.getArg(e,"offset"),r=a.getArg(n,"line"),o=a.getArg(n,"column");if(r<i.line||r===i.line&&o<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=n,{generatedOffset:{generatedLine:r+1,generatedColumn:o+1},consumer:new t(a.getArg(e,"map"))}})}var a=r(4),u=r(8),l=r(5).ArraySet,c=r(2),g=r(9).quickSort;t.fromSourceMap=function(e){return o.fromSourceMap(e)},t.prototype._version=3,t.prototype.__generatedMappings=null,Object.defineProperty(t.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),t.prototype.__originalMappings=null,Object.defineProperty(t.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),t.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return";"===r||","===r},t.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")},t.GENERATED_ORDER=1,t.ORIGINAL_ORDER=2,t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.prototype.eachMapping=function(e,n,r){var o,i=n||null,s=r||t.GENERATED_ORDER;switch(s){case t.GENERATED_ORDER:o=this._generatedMappings;break;case t.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;o.map(function(e){var n=null===e.source?null:this._sources.at(e.source);return null!=n&&null!=u&&(n=a.join(u,n)),{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,i)},t.prototype.allGeneratedPositionsFor=function(e){var n=a.getArg(e,"line"),r={source:a.getArg(e,"source"),originalLine:n,originalColumn:a.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=a.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var t=[],o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(o>=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.fromSourceMap=function(e){var n=Object.create(o.prototype),r=n._names=l.fromArray(e._names.toArray(),!0),t=n._sources=l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=s.length;p<h;p++){var f=s[p],d=new i;d.generatedLine=f.generatedLine,d.generatedColumn=f.generatedColumn,f.source&&(d.source=t.indexOf(f.source),d.originalLine=f.originalLine,d.originalColumn=f.originalColumn,f.name&&(d.name=r.indexOf(f.name)),c.push(d)),u.push(d)}return g(n.__originalMappings,a.compareByOriginalPositions),n},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?a.join(this.sourceRoot,e):e},this)}}),o.prototype._parseMappings=function(e,n){for(var r,t,o,s,u,l=1,p=0,h=0,f=0,d=0,m=0,_=e.length,v=0,y={},C={},A=[],S=[];v<_;)if(";"===e.charAt(v))l++,v++,p=0;else if(","===e.charAt(v))v++;else{for(r=new i,r.generatedLine=l,s=v;s<_&&!this._charIsMappingSeparator(e,s);s++);if(t=e.slice(v,s),o=y[t])v+=t.length;else{for(o=[];v<s;)c.decode(e,v,C),u=C.value,v=C.rest,o.push(u);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");y[t]=o}r.generatedColumn=p+o[0],p=r.generatedColumn,o.length>1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),S.push(r),"number"==typeof r.originalLine&&A.push(r)}g(S,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,g(A,a.compareByOriginalPositions),this.__originalMappings=A},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}},o.prototype.originalPositionFor=function(e){var n={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",a.compareByGeneratedPositionsDeflated,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(r>=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=a.join(this.sourceRoot,i)));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=a.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n<this._sections.length;n++)for(var r=0;r<this._sections[n].consumer.sources.length;r++)e.push(this._sections[n].consumer.sources[r]);return e}}),s.prototype.originalPositionFor=function(e){var n={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},r=u.search(n,this._sections,function(e,n){var r=e.generatedLine-n.generatedOffset.generatedLine;return r?r:e.generatedColumn-n.generatedOffset.generatedColumn}),t=this._sections[r];return t?t.consumer.originalPositionFor({line:n.generatedLine-(t.generatedOffset.generatedLine-1),column:n.generatedColumn-(t.generatedOffset.generatedLine===n.generatedLine?t.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},s.prototype.sourceContentFor=function(e,n){for(var r=0;r<this._sections.length;r++){var t=this._sections[r],o=t.consumer.sourceContentFor(e,!0);if(o)return o}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer.sources.indexOf(a.getArg(e,"source"))!==-1){var t=r.consumer.generatedPositionFor(e);if(t){var o={line:t.line+(r.generatedOffset.generatedLine-1),column:t.column+(r.generatedOffset.generatedLine===t.line?r.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}},s.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var t=this._sections[r],o=t.consumer._generatedMappings,i=0;i<o.length;i++){var s=o[i],u=t.consumer._sources.at(s.source);null!==t.consumer.sourceRoot&&(u=a.join(t.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var l=t.consumer._names.at(s.name);this._names.add(l),l=this._names.indexOf(l);var c={source:u,generatedLine:s.generatedLine+(t.generatedOffset.generatedLine-1),generatedColumn:s.generatedColumn+(t.generatedOffset.generatedLine===s.generatedLine?t.generatedOffset.generatedColumn-1:0),originalLine:s.originalLine,originalColumn:s.originalColumn,name:l};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}g(this.__generatedMappings,a.compareByGeneratedPositionsDeflated),g(this.__originalMappings,a.compareByOriginalPositions)},n.IndexedSourceMapConsumer=s},function(e,n){function r(e,t,o,i,s,a){var u=Math.floor((t-e)/2)+e,l=s(o,i[u],!0);return 0===l?u:l>0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t<i.length?t:-1:u:u-e>1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i<s){var a=t(i,s),u=i-1;r(e,a,s);for(var l=e[s],c=i;c<s;c++)n(e[c],l)<=0&&(u+=1,r(e,u,c));r(e,u+1,c);var g=u+1;o(e,n,i,g-1),o(e,n,g+1,s)}}n.quickSort=function(e,n){o(e,n,0,e.length-1)}},function(e,n,r){function t(e,n,r,t,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==n?null:n,this.source=null==r?null:r,this.name=null==o?null:o,this[u]=!0,null!=t&&this.add(t)}var o=r(1).SourceMapGenerator,i=r(4),s=/(\r?\n)/,a=10,u="$$$isSourceNode$$$";t.fromStringWithSourceMap=function(e,n,r){function o(e,n){if(null===e||void 0===e.source)a.add(n);else{var o=r?i.join(r,e.source):e.source;a.add(new t(e.originalLine,e.originalColumn,o,n,e.name))}}var a=new t,u=e.split(s),l=0,c=function(){function e(){return l<u.length?u[l++]:void 0}var n=e(),r=e()||"";return n+r},g=1,p=0,h=null;return n.eachMapping(function(e){if(null!==h){if(!(g<e.generatedLine)){var n=u[l],r=n.substr(0,e.generatedColumn-p);return u[l]=n.substr(e.generatedColumn-p),p=e.generatedColumn,o(h,r),void(h=e)}o(h,c()),g++,p=0}for(;g<e.generatedLine;)a.add(c()),g++;if(p<e.generatedColumn){var n=u[l];a.add(n.substr(0,e.generatedColumn)),u[l]=n.substr(e.generatedColumn),p=e.generatedColumn}h=e},this),l<u.length&&(h&&o(h,c()),a.add(u.splice(l).join(""))),n.sources.forEach(function(e){var t=n.sourceContentFor(e);null!=t&&(null!=r&&(e=i.join(r,e)),a.setSourceContent(e,t))}),a},t.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},t.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r<t;r++)n=this.children[r],n[u]?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})},t.prototype.join=function(e){var n,r,t=this.children.length;if(t>0){for(n=[],r=0;r<t-1;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this},t.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[u]?r.replaceRight(e,n):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this},t.prototype.setSourceContent=function(e,n){this.sourceContents[i.toSetString(e)]=n},t.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;n<r;n++)this.children[n][u]&&this.children[n].walkSourceContents(e);for(var t=Object.keys(this.sourceContents),n=0,r=t.length;n<r;n++)e(i.fromSetString(t[n]),this.sourceContents[t[n]])},t.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e},t.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new o(e),t=!1,i=null,s=null,u=null,l=null;return this.walk(function(e,o){n.code+=e,null!==o.source&&null!==o.line&&null!==o.column?(i===o.source&&s===o.line&&u===o.column&&l===o.name||r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name}),i=o.source,s=o.line,u=o.column,l=o.name,t=!0):t&&(r.addMapping({generated:{line:n.line,column:n.column}}),i=null,t=!1);for(var c=0,g=e.length;c<g;c++)e.charCodeAt(c)===a?(n.line++,n.column=0,c+1===g?(i=null,t=!1):t&&r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name})):n.column++}),this.walkSourceContents(function(e,n){r.setSourceContent(e,n)}),{code:n.code,map:r}},n.SourceNode=t}])});
+//# sourceMappingURL=source-map.min.js.map \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.min.js.map b/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.min.js.map
new file mode 100644
index 0000000000..588b70cb98
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///source-map.min.js","webpack:///webpack/bootstrap 42c329f865e32e011afb","webpack:///./source-map.js","webpack:///./lib/source-map-generator.js","webpack:///./lib/base64-vlq.js","webpack:///./lib/base64.js","webpack:///./lib/util.js","webpack:///./lib/array-set.js","webpack:///./lib/mapping-list.js","webpack:///./lib/source-map-consumer.js","webpack:///./lib/binary-search.js","webpack:///./lib/quick-sort.js","webpack:///./lib/source-node.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","SourceMapGenerator","SourceMapConsumer","SourceNode","aArgs","_file","util","getArg","_sourceRoot","_skipValidation","_sources","ArraySet","_names","_mappings","MappingList","_sourcesContents","base64VLQ","prototype","_version","fromSourceMap","aSourceMapConsumer","sourceRoot","generator","file","eachMapping","mapping","newMapping","generated","line","generatedLine","column","generatedColumn","source","relative","original","originalLine","originalColumn","name","addMapping","sources","forEach","sourceFile","content","sourceContentFor","setSourceContent","_validateMapping","String","has","add","aSourceFile","aSourceContent","Object","create","toSetString","keys","length","applySourceMap","aSourceMapPath","Error","newSources","newNames","unsortedForEach","originalPositionFor","join","aGenerated","aOriginal","aSource","aName","JSON","stringify","_serializeMappings","next","nameIdx","sourceIdx","previousGeneratedColumn","previousGeneratedLine","previousOriginalColumn","previousOriginalLine","previousName","previousSource","result","mappings","toArray","i","len","compareByGeneratedPositionsInflated","encode","indexOf","_generateSourcesContent","aSources","aSourceRoot","map","key","hasOwnProperty","toJSON","version","names","sourcesContent","toString","toVLQSigned","aValue","fromVLQSigned","isNegative","shifted","base64","VLQ_BASE_SHIFT","VLQ_BASE","VLQ_BASE_MASK","VLQ_CONTINUATION_BIT","digit","encoded","vlq","decode","aStr","aIndex","aOutParam","continuation","strLen","shift","charCodeAt","charAt","value","rest","intToCharMap","split","number","TypeError","charCode","bigA","bigZ","littleA","littleZ","zero","nine","plus","slash","littleOffset","numberOffset","aDefaultValue","arguments","urlParse","aUrl","match","urlRegexp","scheme","auth","host","port","path","urlGenerate","aParsedUrl","url","normalize","aPath","part","isAbsolute","parts","up","splice","aRoot","aPathUrl","aRootUrl","dataUrlRegexp","joined","replace","level","index","lastIndexOf","slice","Array","substr","identity","s","isProtoString","fromSetString","compareByOriginalPositions","mappingA","mappingB","onlyCompareOriginal","cmp","compareByGeneratedPositionsDeflated","onlyCompareGenerated","strcmp","aStr1","aStr2","supportsNullProto","obj","_array","_set","hasNativeMap","Map","fromArray","aArray","aAllowDuplicates","set","size","getOwnPropertyNames","sStr","isDuplicate","idx","push","get","at","aIdx","generatedPositionAfter","lineA","lineB","columnA","columnB","_sorted","_last","aCallback","aThisArg","aMapping","sort","aSourceMap","sourceMap","parse","sections","IndexedSourceMapConsumer","BasicSourceMapConsumer","Mapping","lastOffset","_sections","offset","offsetLine","offsetColumn","generatedOffset","consumer","binarySearch","quickSort","__generatedMappings","defineProperty","_parseMappings","__originalMappings","_charIsMappingSeparator","GENERATED_ORDER","ORIGINAL_ORDER","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","aContext","aOrder","context","order","_generatedMappings","_originalMappings","allGeneratedPositionsFor","needle","_findMapping","undefined","lastColumn","smc","generatedMappings","destGeneratedMappings","destOriginalMappings","srcMapping","destMapping","str","segment","end","cachedSegments","temp","originalMappings","aNeedle","aMappings","aLineName","aColumnName","aComparator","aBias","search","computeColumnSpans","nextMapping","lastGeneratedColumn","Infinity","hasContentsOfAllSources","some","sc","nullOnMissing","fileUriAbsPath","generatedPositionFor","constructor","j","sectionIndex","section","bias","every","generatedPosition","ret","sectionMappings","adjustedMapping","recursiveSearch","aLow","aHigh","aHaystack","aCompare","mid","Math","floor","swap","ary","x","y","randomIntInRange","low","high","round","random","doQuickSort","comparator","r","pivotIndex","pivot","q","aLine","aColumn","aChunks","children","sourceContents","isSourceNode","REGEX_NEWLINE","NEWLINE_CODE","fromStringWithSourceMap","aGeneratedCode","aRelativePath","addMappingWithCode","code","node","remainingLines","remainingLinesIndex","shiftNextLine","getNextLine","lineContents","newLine","lastGeneratedLine","lastMapping","nextLine","aChunk","isArray","chunk","prepend","unshift","walk","aFn","aSep","newChildren","replaceRight","aPattern","aReplacement","lastChild","walkSourceContents","toStringWithSourceMap","sourceMappingActive","lastOriginalSource","lastOriginalLine","lastOriginalColumn","lastOriginalName","sourceContent"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,UAAAD,IAEAD,EAAA,UAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAAUL,EAAQD,EAASM,GEjDjCN,EAAAe,mBAAAT,EAAA,GAAAS,mBACAf,EAAAgB,kBAAAV,EAAA,GAAAU,kBACAhB,EAAAiB,WAAAX,EAAA,IAAAW,YF6DM,SAAUhB,EAAQD,EAASM,GGhDjC,QAAAS,GAAAG,GACAA,IACAA,MAEAd,KAAAe,MAAAC,EAAAC,OAAAH,EAAA,aACAd,KAAAkB,YAAAF,EAAAC,OAAAH,EAAA,mBACAd,KAAAmB,gBAAAH,EAAAC,OAAAH,EAAA,qBACAd,KAAAoB,SAAA,GAAAC,GACArB,KAAAsB,OAAA,GAAAD,GACArB,K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AAA+V,KAAA,SAAAH,EAAAhT,GACAP,EAAA0S,MAAAa,EACA,OAAAhT,EAAAF,QACA,OAAAE,EAAAN,MACA,OAAAM,EAAAJ,QACAkU,IAAA9T,EAAAF,QACAiU,IAAA/T,EAAAN,MACAsU,IAAAhU,EAAAJ,QACAqU,IAAAjU,EAAAG,MACAsD,EAAArD,YACAN,OAAAE,EAAAF,OACAE,UACAN,KAAAM,EAAAN,KACAE,OAAAI,EAAAJ,QAEAH,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,QAEAO,KAAAH,EAAAG,OAGA2T,EAAA9T,EAAAF,OACAiU,EAAA/T,EAAAN,KACAsU,EAAAhU,EAAAJ,OACAqU,EAAAjU,EAAAG,KACA0T,GAAA,GACKA,IACLpQ,EAAArD,YACAX,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,UAGAkU,EAAA,KACAD,GAAA,EAEA,QAAAxJ,GAAA,EAAAhJ,EAAA2R,EAAA3R,OAA4CgJ,EAAAhJ,EAAcgJ,IAC1D2I,EAAA3N,WAAAgF,KAAAyH,GACArS,EAAAC,OACAD,EAAAG,OAAA,EAEAyK,EAAA,IAAAhJ,GACAyS,EAAA,KACAD,GAAA,GACSA,GACTpQ,EAAArD,YACAN,OAAAE,EAAAF,OACAE,UACAN,KAAAM,EAAAN,KACAE,OAAAI,EAAAJ,QAEAH,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,QAEAO,KAAAH,EAAAG,QAIAV,EAAAG,WAIAxC,KAAAuW,mBAAA,SAAApT,EAAA2T,GACAzQ,EAAA/C,iBAAAH,EAAA2T,MAGU/B,KAAA1S,EAAA0S,KAAA1O,QAGVzG,EAAAiB","file":"source-map.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sourceMap\"] = factory();\n\telse\n\t\troot[\"sourceMap\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sourceMap\"] = factory();\n\telse\n\t\troot[\"sourceMap\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/*\n\t * Copyright 2009-2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE.txt or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\texports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\texports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer;\n\texports.SourceNode = __webpack_require__(10).SourceNode;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar base64VLQ = __webpack_require__(2);\n\tvar util = __webpack_require__(4);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar MappingList = __webpack_require__(6).MappingList;\n\t\n\t/**\n\t * An instance of the SourceMapGenerator represents a source map which is\n\t * being built incrementally. You may pass an object with the following\n\t * properties:\n\t *\n\t * - file: The filename of the generated source.\n\t * - sourceRoot: A root for all relative URLs in this source map.\n\t */\n\tfunction SourceMapGenerator(aArgs) {\n\t if (!aArgs) {\n\t aArgs = {};\n\t }\n\t this._file = util.getArg(aArgs, 'file', null);\n\t this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n\t this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t this._mappings = new MappingList();\n\t this._sourcesContents = null;\n\t}\n\t\n\tSourceMapGenerator.prototype._version = 3;\n\t\n\t/**\n\t * Creates a new SourceMapGenerator based on a SourceMapConsumer\n\t *\n\t * @param aSourceMapConsumer The SourceMap.\n\t */\n\tSourceMapGenerator.fromSourceMap =\n\t function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n\t var sourceRoot = aSourceMapConsumer.sourceRoot;\n\t var generator = new SourceMapGenerator({\n\t file: aSourceMapConsumer.file,\n\t sourceRoot: sourceRoot\n\t });\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t var newMapping = {\n\t generated: {\n\t line: mapping.generatedLine,\n\t column: mapping.generatedColumn\n\t }\n\t };\n\t\n\t if (mapping.source != null) {\n\t newMapping.source = mapping.source;\n\t if (sourceRoot != null) {\n\t newMapping.source = util.relative(sourceRoot, newMapping.source);\n\t }\n\t\n\t newMapping.original = {\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t };\n\t\n\t if (mapping.name != null) {\n\t newMapping.name = mapping.name;\n\t }\n\t }\n\t\n\t generator.addMapping(newMapping);\n\t });\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t generator.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t return generator;\n\t };\n\t\n\t/**\n\t * Add a single mapping from original source line and column to the generated\n\t * source's line and column for this source map being created. The mapping\n\t * object should have the following properties:\n\t *\n\t * - generated: An object with the generated line and column positions.\n\t * - original: An object with the original line and column positions.\n\t * - source: The original source file (relative to the sourceRoot).\n\t * - name: An optional original token name for this mapping.\n\t */\n\tSourceMapGenerator.prototype.addMapping =\n\t function SourceMapGenerator_addMapping(aArgs) {\n\t var generated = util.getArg(aArgs, 'generated');\n\t var original = util.getArg(aArgs, 'original', null);\n\t var source = util.getArg(aArgs, 'source', null);\n\t var name = util.getArg(aArgs, 'name', null);\n\t\n\t if (!this._skipValidation) {\n\t this._validateMapping(generated, original, source, name);\n\t }\n\t\n\t if (source != null) {\n\t source = String(source);\n\t if (!this._sources.has(source)) {\n\t this._sources.add(source);\n\t }\n\t }\n\t\n\t if (name != null) {\n\t name = String(name);\n\t if (!this._names.has(name)) {\n\t this._names.add(name);\n\t }\n\t }\n\t\n\t this._mappings.add({\n\t generatedLine: generated.line,\n\t generatedColumn: generated.column,\n\t originalLine: original != null && original.line,\n\t originalColumn: original != null && original.column,\n\t source: source,\n\t name: name\n\t });\n\t };\n\t\n\t/**\n\t * Set the source content for a source file.\n\t */\n\tSourceMapGenerator.prototype.setSourceContent =\n\t function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n\t var source = aSourceFile;\n\t if (this._sourceRoot != null) {\n\t source = util.relative(this._sourceRoot, source);\n\t }\n\t\n\t if (aSourceContent != null) {\n\t // Add the source content to the _sourcesContents map.\n\t // Create a new _sourcesContents map if the property is null.\n\t if (!this._sourcesContents) {\n\t this._sourcesContents = Object.create(null);\n\t }\n\t this._sourcesContents[util.toSetString(source)] = aSourceContent;\n\t } else if (this._sourcesContents) {\n\t // Remove the source file from the _sourcesContents map.\n\t // If the _sourcesContents map is empty, set the property to null.\n\t delete this._sourcesContents[util.toSetString(source)];\n\t if (Object.keys(this._sourcesContents).length === 0) {\n\t this._sourcesContents = null;\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Applies the mappings of a sub-source-map for a specific source file to the\n\t * source map being generated. Each mapping to the supplied source file is\n\t * rewritten using the supplied source map. Note: The resolution for the\n\t * resulting mappings is the minimium of this map and the supplied map.\n\t *\n\t * @param aSourceMapConsumer The source map to be applied.\n\t * @param aSourceFile Optional. The filename of the source file.\n\t * If omitted, SourceMapConsumer's file property will be used.\n\t * @param aSourceMapPath Optional. The dirname of the path to the source map\n\t * to be applied. If relative, it is relative to the SourceMapConsumer.\n\t * This parameter is needed when the two source maps aren't in the same\n\t * directory, and the source map to be applied contains relative source\n\t * paths. If so, those relative source paths need to be rewritten\n\t * relative to the SourceMapGenerator.\n\t */\n\tSourceMapGenerator.prototype.applySourceMap =\n\t function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n\t var sourceFile = aSourceFile;\n\t // If aSourceFile is omitted, we will use the file property of the SourceMap\n\t if (aSourceFile == null) {\n\t if (aSourceMapConsumer.file == null) {\n\t throw new Error(\n\t 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n\t 'or the source map\\'s \"file\" property. Both were omitted.'\n\t );\n\t }\n\t sourceFile = aSourceMapConsumer.file;\n\t }\n\t var sourceRoot = this._sourceRoot;\n\t // Make \"sourceFile\" relative if an absolute Url is passed.\n\t if (sourceRoot != null) {\n\t sourceFile = util.relative(sourceRoot, sourceFile);\n\t }\n\t // Applying the SourceMap can add and remove items from the sources and\n\t // the names array.\n\t var newSources = new ArraySet();\n\t var newNames = new ArraySet();\n\t\n\t // Find mappings for the \"sourceFile\"\n\t this._mappings.unsortedForEach(function (mapping) {\n\t if (mapping.source === sourceFile && mapping.originalLine != null) {\n\t // Check if it can be mapped by the source map, then update the mapping.\n\t var original = aSourceMapConsumer.originalPositionFor({\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t });\n\t if (original.source != null) {\n\t // Copy mapping\n\t mapping.source = original.source;\n\t if (aSourceMapPath != null) {\n\t mapping.source = util.join(aSourceMapPath, mapping.source)\n\t }\n\t if (sourceRoot != null) {\n\t mapping.source = util.relative(sourceRoot, mapping.source);\n\t }\n\t mapping.originalLine = original.line;\n\t mapping.originalColumn = original.column;\n\t if (original.name != null) {\n\t mapping.name = original.name;\n\t }\n\t }\n\t }\n\t\n\t var source = mapping.source;\n\t if (source != null && !newSources.has(source)) {\n\t newSources.add(source);\n\t }\n\t\n\t var name = mapping.name;\n\t if (name != null && !newNames.has(name)) {\n\t newNames.add(name);\n\t }\n\t\n\t }, this);\n\t this._sources = newSources;\n\t this._names = newNames;\n\t\n\t // Copy sourcesContents of applied map.\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aSourceMapPath != null) {\n\t sourceFile = util.join(aSourceMapPath, sourceFile);\n\t }\n\t if (sourceRoot != null) {\n\t sourceFile = util.relative(sourceRoot, sourceFile);\n\t }\n\t this.setSourceContent(sourceFile, content);\n\t }\n\t }, this);\n\t };\n\t\n\t/**\n\t * A mapping can have one of the three levels of data:\n\t *\n\t * 1. Just the generated position.\n\t * 2. The Generated position, original position, and original source.\n\t * 3. Generated and original position, original source, as well as a name\n\t * token.\n\t *\n\t * To maintain consistency, we validate that any new mapping being added falls\n\t * in to one of these categories.\n\t */\n\tSourceMapGenerator.prototype._validateMapping =\n\t function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n\t aName) {\n\t // When aOriginal is truthy but has empty values for .line and .column,\n\t // it is most likely a programmer error. In this case we throw a very\n\t // specific error message to try to guide them the right way.\n\t // For example: https://github.com/Polymer/polymer-bundler/pull/519\n\t if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n\t throw new Error(\n\t 'original.line and original.column are not numbers -- you probably meant to omit ' +\n\t 'the original mapping entirely and only map the generated position. If so, pass ' +\n\t 'null for the original mapping instead of an object with empty or null values.'\n\t );\n\t }\n\t\n\t if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '<dir>/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap)\n\t : new BasicSourceMapConsumer(sourceMap);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t if (source != null && sourceRoot != null) {\n\t source = util.join(sourceRoot, source);\n\t }\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: Optional. the column number in the original source.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t if (this.sourceRoot != null) {\n\t needle.source = util.relative(this.sourceRoot, needle.source);\n\t }\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\t needle.source = this._sources.indexOf(needle.source);\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The only parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t if (this.sourceRoot != null) {\n\t source = util.join(this.sourceRoot, source);\n\t }\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t if (this.sourceRoot != null) {\n\t aSource = util.relative(this.sourceRoot, aSource);\n\t }\n\t\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t if (this.sourceRoot != null) {\n\t source = util.relative(this.sourceRoot, source);\n\t }\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t source = this._sources.indexOf(source);\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The only parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util.join(section.consumer.sourceRoot, source);\n\t }\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 42c329f865e32e011afb","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '<dir>/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/array-set.js b/tools/node_modules/babel-eslint/node_modules/source-map/lib/array-set.js
new file mode 100644
index 0000000000..fbd5c81cae
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/lib/array-set.js
@@ -0,0 +1,121 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+var util = require('./util');
+var has = Object.prototype.hasOwnProperty;
+var hasNativeMap = typeof Map !== "undefined";
+
+/**
+ * A data structure which is a combination of an array and a set. Adding a new
+ * member is O(1), testing for membership is O(1), and finding the index of an
+ * element is O(1). Removing elements from the set is not supported. Only
+ * strings are supported for membership.
+ */
+function ArraySet() {
+ this._array = [];
+ this._set = hasNativeMap ? new Map() : Object.create(null);
+}
+
+/**
+ * Static method for creating ArraySet instances from an existing array.
+ */
+ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
+ var set = new ArraySet();
+ for (var i = 0, len = aArray.length; i < len; i++) {
+ set.add(aArray[i], aAllowDuplicates);
+ }
+ return set;
+};
+
+/**
+ * Return how many unique items are in this ArraySet. If duplicates have been
+ * added, than those do not count towards the size.
+ *
+ * @returns Number
+ */
+ArraySet.prototype.size = function ArraySet_size() {
+ return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
+};
+
+/**
+ * Add the given string to this set.
+ *
+ * @param String aStr
+ */
+ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
+ var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
+ var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
+ var idx = this._array.length;
+ if (!isDuplicate || aAllowDuplicates) {
+ this._array.push(aStr);
+ }
+ if (!isDuplicate) {
+ if (hasNativeMap) {
+ this._set.set(aStr, idx);
+ } else {
+ this._set[sStr] = idx;
+ }
+ }
+};
+
+/**
+ * Is the given string a member of this set?
+ *
+ * @param String aStr
+ */
+ArraySet.prototype.has = function ArraySet_has(aStr) {
+ if (hasNativeMap) {
+ return this._set.has(aStr);
+ } else {
+ var sStr = util.toSetString(aStr);
+ return has.call(this._set, sStr);
+ }
+};
+
+/**
+ * What is the index of the given string in the array?
+ *
+ * @param String aStr
+ */
+ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
+ if (hasNativeMap) {
+ var idx = this._set.get(aStr);
+ if (idx >= 0) {
+ return idx;
+ }
+ } else {
+ var sStr = util.toSetString(aStr);
+ if (has.call(this._set, sStr)) {
+ return this._set[sStr];
+ }
+ }
+
+ throw new Error('"' + aStr + '" is not in the set.');
+};
+
+/**
+ * What is the element at the given index?
+ *
+ * @param Number aIdx
+ */
+ArraySet.prototype.at = function ArraySet_at(aIdx) {
+ if (aIdx >= 0 && aIdx < this._array.length) {
+ return this._array[aIdx];
+ }
+ throw new Error('No element indexed by ' + aIdx);
+};
+
+/**
+ * Returns the array representation of this set (which has the proper indices
+ * indicated by indexOf). Note that this is a copy of the internal array used
+ * for storing the members so that no one can mess with internal state.
+ */
+ArraySet.prototype.toArray = function ArraySet_toArray() {
+ return this._array.slice();
+};
+
+exports.ArraySet = ArraySet;
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/base64-vlq.js b/tools/node_modules/babel-eslint/node_modules/source-map/lib/base64-vlq.js
new file mode 100644
index 0000000000..612b404018
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/lib/base64-vlq.js
@@ -0,0 +1,140 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ *
+ * Based on the Base 64 VLQ implementation in Closure Compiler:
+ * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
+ *
+ * Copyright 2011 The Closure Compiler Authors. All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+var base64 = require('./base64');
+
+// A single base 64 digit can contain 6 bits of data. For the base 64 variable
+// length quantities we use in the source map spec, the first bit is the sign,
+// the next four bits are the actual value, and the 6th bit is the
+// continuation bit. The continuation bit tells us whether there are more
+// digits in this value following this digit.
+//
+// Continuation
+// | Sign
+// | |
+// V V
+// 101011
+
+var VLQ_BASE_SHIFT = 5;
+
+// binary: 100000
+var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
+
+// binary: 011111
+var VLQ_BASE_MASK = VLQ_BASE - 1;
+
+// binary: 100000
+var VLQ_CONTINUATION_BIT = VLQ_BASE;
+
+/**
+ * Converts from a two-complement value to a value where the sign bit is
+ * placed in the least significant bit. For example, as decimals:
+ * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
+ * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
+ */
+function toVLQSigned(aValue) {
+ return aValue < 0
+ ? ((-aValue) << 1) + 1
+ : (aValue << 1) + 0;
+}
+
+/**
+ * Converts to a two-complement value from a value where the sign bit is
+ * placed in the least significant bit. For example, as decimals:
+ * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
+ * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
+ */
+function fromVLQSigned(aValue) {
+ var isNegative = (aValue & 1) === 1;
+ var shifted = aValue >> 1;
+ return isNegative
+ ? -shifted
+ : shifted;
+}
+
+/**
+ * Returns the base 64 VLQ encoded value.
+ */
+exports.encode = function base64VLQ_encode(aValue) {
+ var encoded = "";
+ var digit;
+
+ var vlq = toVLQSigned(aValue);
+
+ do {
+ digit = vlq & VLQ_BASE_MASK;
+ vlq >>>= VLQ_BASE_SHIFT;
+ if (vlq > 0) {
+ // There are still more digits in this value, so we must make sure the
+ // continuation bit is marked.
+ digit |= VLQ_CONTINUATION_BIT;
+ }
+ encoded += base64.encode(digit);
+ } while (vlq > 0);
+
+ return encoded;
+};
+
+/**
+ * Decodes the next base 64 VLQ value from the given string and returns the
+ * value and the rest of the string via the out parameter.
+ */
+exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
+ var strLen = aStr.length;
+ var result = 0;
+ var shift = 0;
+ var continuation, digit;
+
+ do {
+ if (aIndex >= strLen) {
+ throw new Error("Expected more digits in base 64 VLQ value.");
+ }
+
+ digit = base64.decode(aStr.charCodeAt(aIndex++));
+ if (digit === -1) {
+ throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
+ }
+
+ continuation = !!(digit & VLQ_CONTINUATION_BIT);
+ digit &= VLQ_BASE_MASK;
+ result = result + (digit << shift);
+ shift += VLQ_BASE_SHIFT;
+ } while (continuation);
+
+ aOutParam.value = fromVLQSigned(result);
+ aOutParam.rest = aIndex;
+};
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/base64.js b/tools/node_modules/babel-eslint/node_modules/source-map/lib/base64.js
new file mode 100644
index 0000000000..8aa86b3026
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/lib/base64.js
@@ -0,0 +1,67 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
+
+/**
+ * Encode an integer in the range of 0 to 63 to a single base 64 digit.
+ */
+exports.encode = function (number) {
+ if (0 <= number && number < intToCharMap.length) {
+ return intToCharMap[number];
+ }
+ throw new TypeError("Must be between 0 and 63: " + number);
+};
+
+/**
+ * Decode a single base 64 character code digit to an integer. Returns -1 on
+ * failure.
+ */
+exports.decode = function (charCode) {
+ var bigA = 65; // 'A'
+ var bigZ = 90; // 'Z'
+
+ var littleA = 97; // 'a'
+ var littleZ = 122; // 'z'
+
+ var zero = 48; // '0'
+ var nine = 57; // '9'
+
+ var plus = 43; // '+'
+ var slash = 47; // '/'
+
+ var littleOffset = 26;
+ var numberOffset = 52;
+
+ // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
+ if (bigA <= charCode && charCode <= bigZ) {
+ return (charCode - bigA);
+ }
+
+ // 26 - 51: abcdefghijklmnopqrstuvwxyz
+ if (littleA <= charCode && charCode <= littleZ) {
+ return (charCode - littleA + littleOffset);
+ }
+
+ // 52 - 61: 0123456789
+ if (zero <= charCode && charCode <= nine) {
+ return (charCode - zero + numberOffset);
+ }
+
+ // 62: +
+ if (charCode == plus) {
+ return 62;
+ }
+
+ // 63: /
+ if (charCode == slash) {
+ return 63;
+ }
+
+ // Invalid base64 digit.
+ return -1;
+};
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/binary-search.js b/tools/node_modules/babel-eslint/node_modules/source-map/lib/binary-search.js
new file mode 100644
index 0000000000..010ac941e1
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/lib/binary-search.js
@@ -0,0 +1,111 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+exports.GREATEST_LOWER_BOUND = 1;
+exports.LEAST_UPPER_BOUND = 2;
+
+/**
+ * Recursive implementation of binary search.
+ *
+ * @param aLow Indices here and lower do not contain the needle.
+ * @param aHigh Indices here and higher do not contain the needle.
+ * @param aNeedle The element being searched for.
+ * @param aHaystack The non-empty array being searched.
+ * @param aCompare Function which takes two elements and returns -1, 0, or 1.
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ */
+function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
+ // This function terminates when one of the following is true:
+ //
+ // 1. We find the exact element we are looking for.
+ //
+ // 2. We did not find the exact element, but we can return the index of
+ // the next-closest element.
+ //
+ // 3. We did not find the exact element, and there is no next-closest
+ // element than the one we are searching for, so we return -1.
+ var mid = Math.floor((aHigh - aLow) / 2) + aLow;
+ var cmp = aCompare(aNeedle, aHaystack[mid], true);
+ if (cmp === 0) {
+ // Found the element we are looking for.
+ return mid;
+ }
+ else if (cmp > 0) {
+ // Our needle is greater than aHaystack[mid].
+ if (aHigh - mid > 1) {
+ // The element is in the upper half.
+ return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
+ }
+
+ // The exact needle element was not found in this haystack. Determine if
+ // we are in termination case (3) or (2) and return the appropriate thing.
+ if (aBias == exports.LEAST_UPPER_BOUND) {
+ return aHigh < aHaystack.length ? aHigh : -1;
+ } else {
+ return mid;
+ }
+ }
+ else {
+ // Our needle is less than aHaystack[mid].
+ if (mid - aLow > 1) {
+ // The element is in the lower half.
+ return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
+ }
+
+ // we are in termination case (3) or (2) and return the appropriate thing.
+ if (aBias == exports.LEAST_UPPER_BOUND) {
+ return mid;
+ } else {
+ return aLow < 0 ? -1 : aLow;
+ }
+ }
+}
+
+/**
+ * This is an implementation of binary search which will always try and return
+ * the index of the closest element if there is no exact hit. This is because
+ * mappings between original and generated line/col pairs are single points,
+ * and there is an implicit region between each of them, so a miss just means
+ * that you aren't on the very start of a region.
+ *
+ * @param aNeedle The element you are looking for.
+ * @param aHaystack The array that is being searched.
+ * @param aCompare A function which takes the needle and an element in the
+ * array and returns -1, 0, or 1 depending on whether the needle is less
+ * than, equal to, or greater than the element, respectively.
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
+ */
+exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
+ if (aHaystack.length === 0) {
+ return -1;
+ }
+
+ var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
+ aCompare, aBias || exports.GREATEST_LOWER_BOUND);
+ if (index < 0) {
+ return -1;
+ }
+
+ // We have found either the exact element, or the next-closest element than
+ // the one we are searching for. However, there may be more than one such
+ // element. Make sure we always return the smallest of these.
+ while (index - 1 >= 0) {
+ if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
+ break;
+ }
+ --index;
+ }
+
+ return index;
+};
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/mapping-list.js b/tools/node_modules/babel-eslint/node_modules/source-map/lib/mapping-list.js
new file mode 100644
index 0000000000..06d1274a02
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/lib/mapping-list.js
@@ -0,0 +1,79 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2014 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+var util = require('./util');
+
+/**
+ * Determine whether mappingB is after mappingA with respect to generated
+ * position.
+ */
+function generatedPositionAfter(mappingA, mappingB) {
+ // Optimized for most common case
+ var lineA = mappingA.generatedLine;
+ var lineB = mappingB.generatedLine;
+ var columnA = mappingA.generatedColumn;
+ var columnB = mappingB.generatedColumn;
+ return lineB > lineA || lineB == lineA && columnB >= columnA ||
+ util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
+}
+
+/**
+ * A data structure to provide a sorted view of accumulated mappings in a
+ * performance conscious manner. It trades a neglibable overhead in general
+ * case for a large speedup in case of mappings being added in order.
+ */
+function MappingList() {
+ this._array = [];
+ this._sorted = true;
+ // Serves as infimum
+ this._last = {generatedLine: -1, generatedColumn: 0};
+}
+
+/**
+ * Iterate through internal items. This method takes the same arguments that
+ * `Array.prototype.forEach` takes.
+ *
+ * NOTE: The order of the mappings is NOT guaranteed.
+ */
+MappingList.prototype.unsortedForEach =
+ function MappingList_forEach(aCallback, aThisArg) {
+ this._array.forEach(aCallback, aThisArg);
+ };
+
+/**
+ * Add the given source mapping.
+ *
+ * @param Object aMapping
+ */
+MappingList.prototype.add = function MappingList_add(aMapping) {
+ if (generatedPositionAfter(this._last, aMapping)) {
+ this._last = aMapping;
+ this._array.push(aMapping);
+ } else {
+ this._sorted = false;
+ this._array.push(aMapping);
+ }
+};
+
+/**
+ * Returns the flat, sorted array of mappings. The mappings are sorted by
+ * generated position.
+ *
+ * WARNING: This method returns internal data without copying, for
+ * performance. The return value must NOT be mutated, and should be treated as
+ * an immutable borrow. If you want to take ownership, you must make your own
+ * copy.
+ */
+MappingList.prototype.toArray = function MappingList_toArray() {
+ if (!this._sorted) {
+ this._array.sort(util.compareByGeneratedPositionsInflated);
+ this._sorted = true;
+ }
+ return this._array;
+};
+
+exports.MappingList = MappingList;
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/quick-sort.js b/tools/node_modules/babel-eslint/node_modules/source-map/lib/quick-sort.js
new file mode 100644
index 0000000000..6a7caadbbd
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/lib/quick-sort.js
@@ -0,0 +1,114 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+// It turns out that some (most?) JavaScript engines don't self-host
+// `Array.prototype.sort`. This makes sense because C++ will likely remain
+// faster than JS when doing raw CPU-intensive sorting. However, when using a
+// custom comparator function, calling back and forth between the VM's C++ and
+// JIT'd JS is rather slow *and* loses JIT type information, resulting in
+// worse generated code for the comparator function than would be optimal. In
+// fact, when sorting with a comparator, these costs outweigh the benefits of
+// sorting in C++. By using our own JS-implemented Quick Sort (below), we get
+// a ~3500ms mean speed-up in `bench/bench.html`.
+
+/**
+ * Swap the elements indexed by `x` and `y` in the array `ary`.
+ *
+ * @param {Array} ary
+ * The array.
+ * @param {Number} x
+ * The index of the first item.
+ * @param {Number} y
+ * The index of the second item.
+ */
+function swap(ary, x, y) {
+ var temp = ary[x];
+ ary[x] = ary[y];
+ ary[y] = temp;
+}
+
+/**
+ * Returns a random integer within the range `low .. high` inclusive.
+ *
+ * @param {Number} low
+ * The lower bound on the range.
+ * @param {Number} high
+ * The upper bound on the range.
+ */
+function randomIntInRange(low, high) {
+ return Math.round(low + (Math.random() * (high - low)));
+}
+
+/**
+ * The Quick Sort algorithm.
+ *
+ * @param {Array} ary
+ * An array to sort.
+ * @param {function} comparator
+ * Function to use to compare two items.
+ * @param {Number} p
+ * Start index of the array
+ * @param {Number} r
+ * End index of the array
+ */
+function doQuickSort(ary, comparator, p, r) {
+ // If our lower bound is less than our upper bound, we (1) partition the
+ // array into two pieces and (2) recurse on each half. If it is not, this is
+ // the empty array and our base case.
+
+ if (p < r) {
+ // (1) Partitioning.
+ //
+ // The partitioning chooses a pivot between `p` and `r` and moves all
+ // elements that are less than or equal to the pivot to the before it, and
+ // all the elements that are greater than it after it. The effect is that
+ // once partition is done, the pivot is in the exact place it will be when
+ // the array is put in sorted order, and it will not need to be moved
+ // again. This runs in O(n) time.
+
+ // Always choose a random pivot so that an input array which is reverse
+ // sorted does not cause O(n^2) running time.
+ var pivotIndex = randomIntInRange(p, r);
+ var i = p - 1;
+
+ swap(ary, pivotIndex, r);
+ var pivot = ary[r];
+
+ // Immediately after `j` is incremented in this loop, the following hold
+ // true:
+ //
+ // * Every element in `ary[p .. i]` is less than or equal to the pivot.
+ //
+ // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
+ for (var j = p; j < r; j++) {
+ if (comparator(ary[j], pivot) <= 0) {
+ i += 1;
+ swap(ary, i, j);
+ }
+ }
+
+ swap(ary, i + 1, j);
+ var q = i + 1;
+
+ // (2) Recurse on each half.
+
+ doQuickSort(ary, comparator, p, q - 1);
+ doQuickSort(ary, comparator, q + 1, r);
+ }
+}
+
+/**
+ * Sort the given array in-place with the given comparator function.
+ *
+ * @param {Array} ary
+ * An array to sort.
+ * @param {function} comparator
+ * Function to use to compare two items.
+ */
+exports.quickSort = function (ary, comparator) {
+ doQuickSort(ary, comparator, 0, ary.length - 1);
+};
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-consumer.js b/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-consumer.js
new file mode 100644
index 0000000000..6abcc280ee
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-consumer.js
@@ -0,0 +1,1082 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+var util = require('./util');
+var binarySearch = require('./binary-search');
+var ArraySet = require('./array-set').ArraySet;
+var base64VLQ = require('./base64-vlq');
+var quickSort = require('./quick-sort').quickSort;
+
+function SourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ return sourceMap.sections != null
+ ? new IndexedSourceMapConsumer(sourceMap)
+ : new BasicSourceMapConsumer(sourceMap);
+}
+
+SourceMapConsumer.fromSourceMap = function(aSourceMap) {
+ return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
+}
+
+/**
+ * The version of the source mapping spec that we are consuming.
+ */
+SourceMapConsumer.prototype._version = 3;
+
+// `__generatedMappings` and `__originalMappings` are arrays that hold the
+// parsed mapping coordinates from the source map's "mappings" attribute. They
+// are lazily instantiated, accessed via the `_generatedMappings` and
+// `_originalMappings` getters respectively, and we only parse the mappings
+// and create these arrays once queried for a source location. We jump through
+// these hoops because there can be many thousands of mappings, and parsing
+// them is expensive, so we only want to do it if we must.
+//
+// Each object in the arrays is of the form:
+//
+// {
+// generatedLine: The line number in the generated code,
+// generatedColumn: The column number in the generated code,
+// source: The path to the original source file that generated this
+// chunk of code,
+// originalLine: The line number in the original source that
+// corresponds to this chunk of generated code,
+// originalColumn: The column number in the original source that
+// corresponds to this chunk of generated code,
+// name: The name of the original symbol which generated this chunk of
+// code.
+// }
+//
+// All properties except for `generatedLine` and `generatedColumn` can be
+// `null`.
+//
+// `_generatedMappings` is ordered by the generated positions.
+//
+// `_originalMappings` is ordered by the original positions.
+
+SourceMapConsumer.prototype.__generatedMappings = null;
+Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
+ get: function () {
+ if (!this.__generatedMappings) {
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+
+ return this.__generatedMappings;
+ }
+});
+
+SourceMapConsumer.prototype.__originalMappings = null;
+Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
+ get: function () {
+ if (!this.__originalMappings) {
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+
+ return this.__originalMappings;
+ }
+});
+
+SourceMapConsumer.prototype._charIsMappingSeparator =
+ function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
+ var c = aStr.charAt(index);
+ return c === ";" || c === ",";
+ };
+
+/**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+SourceMapConsumer.prototype._parseMappings =
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ throw new Error("Subclasses must implement _parseMappings");
+ };
+
+SourceMapConsumer.GENERATED_ORDER = 1;
+SourceMapConsumer.ORIGINAL_ORDER = 2;
+
+SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
+SourceMapConsumer.LEAST_UPPER_BOUND = 2;
+
+/**
+ * Iterate over each mapping between an original source/line/column and a
+ * generated line/column in this source map.
+ *
+ * @param Function aCallback
+ * The function that is called with each mapping.
+ * @param Object aContext
+ * Optional. If specified, this object will be the value of `this` every
+ * time that `aCallback` is called.
+ * @param aOrder
+ * Either `SourceMapConsumer.GENERATED_ORDER` or
+ * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
+ * iterate over the mappings sorted by the generated file's line/column
+ * order or the original's source/line/column order, respectively. Defaults to
+ * `SourceMapConsumer.GENERATED_ORDER`.
+ */
+SourceMapConsumer.prototype.eachMapping =
+ function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
+ var context = aContext || null;
+ var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
+
+ var mappings;
+ switch (order) {
+ case SourceMapConsumer.GENERATED_ORDER:
+ mappings = this._generatedMappings;
+ break;
+ case SourceMapConsumer.ORIGINAL_ORDER:
+ mappings = this._originalMappings;
+ break;
+ default:
+ throw new Error("Unknown order of iteration.");
+ }
+
+ var sourceRoot = this.sourceRoot;
+ mappings.map(function (mapping) {
+ var source = mapping.source === null ? null : this._sources.at(mapping.source);
+ if (source != null && sourceRoot != null) {
+ source = util.join(sourceRoot, source);
+ }
+ return {
+ source: source,
+ generatedLine: mapping.generatedLine,
+ generatedColumn: mapping.generatedColumn,
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: mapping.name === null ? null : this._names.at(mapping.name)
+ };
+ }, this).forEach(aCallback, context);
+ };
+
+/**
+ * Returns all generated line and column information for the original source,
+ * line, and column provided. If no column is provided, returns all mappings
+ * corresponding to a either the line we are searching for or the next
+ * closest line that has any mappings. Otherwise, returns all mappings
+ * corresponding to the given line and either the column we are searching for
+ * or the next closest column that has any offsets.
+ *
+ * The only argument is an object with the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: Optional. the column number in the original source.
+ *
+ * and an array of objects is returned, each with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+SourceMapConsumer.prototype.allGeneratedPositionsFor =
+ function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
+ var line = util.getArg(aArgs, 'line');
+
+ // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
+ // returns the index of the closest mapping less than the needle. By
+ // setting needle.originalColumn to 0, we thus find the last mapping for
+ // the given line, provided such a mapping exists.
+ var needle = {
+ source: util.getArg(aArgs, 'source'),
+ originalLine: line,
+ originalColumn: util.getArg(aArgs, 'column', 0)
+ };
+
+ if (this.sourceRoot != null) {
+ needle.source = util.relative(this.sourceRoot, needle.source);
+ }
+ if (!this._sources.has(needle.source)) {
+ return [];
+ }
+ needle.source = this._sources.indexOf(needle.source);
+
+ var mappings = [];
+
+ var index = this._findMapping(needle,
+ this._originalMappings,
+ "originalLine",
+ "originalColumn",
+ util.compareByOriginalPositions,
+ binarySearch.LEAST_UPPER_BOUND);
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+
+ if (aArgs.column === undefined) {
+ var originalLine = mapping.originalLine;
+
+ // Iterate until either we run out of mappings, or we run into
+ // a mapping for a different line than the one we found. Since
+ // mappings are sorted, this is guaranteed to find all mappings for
+ // the line we found.
+ while (mapping && mapping.originalLine === originalLine) {
+ mappings.push({
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ });
+
+ mapping = this._originalMappings[++index];
+ }
+ } else {
+ var originalColumn = mapping.originalColumn;
+
+ // Iterate until either we run out of mappings, or we run into
+ // a mapping for a different line than the one we were searching for.
+ // Since mappings are sorted, this is guaranteed to find all mappings for
+ // the line we are searching for.
+ while (mapping &&
+ mapping.originalLine === line &&
+ mapping.originalColumn == originalColumn) {
+ mappings.push({
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ });
+
+ mapping = this._originalMappings[++index];
+ }
+ }
+ }
+
+ return mappings;
+ };
+
+exports.SourceMapConsumer = SourceMapConsumer;
+
+/**
+ * A BasicSourceMapConsumer instance represents a parsed source map which we can
+ * query for information about the original file positions by giving it a file
+ * position in the generated source.
+ *
+ * The only parameter is the raw source map (either as a JSON string, or
+ * already parsed to an object). According to the spec, source maps have the
+ * following attributes:
+ *
+ * - version: Which version of the source map spec this map is following.
+ * - sources: An array of URLs to the original source files.
+ * - names: An array of identifiers which can be referrenced by individual mappings.
+ * - sourceRoot: Optional. The URL root from which all sources are relative.
+ * - sourcesContent: Optional. An array of contents of the original source files.
+ * - mappings: A string of base64 VLQs which contain the actual mappings.
+ * - file: Optional. The generated file this source map is associated with.
+ *
+ * Here is an example source map, taken from the source map spec[0]:
+ *
+ * {
+ * version : 3,
+ * file: "out.js",
+ * sourceRoot : "",
+ * sources: ["foo.js", "bar.js"],
+ * names: ["src", "maps", "are", "fun"],
+ * mappings: "AA,AB;;ABCDE;"
+ * }
+ *
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
+ */
+function BasicSourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ var version = util.getArg(sourceMap, 'version');
+ var sources = util.getArg(sourceMap, 'sources');
+ // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
+ // requires the array) to play nice here.
+ var names = util.getArg(sourceMap, 'names', []);
+ var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
+ var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
+ var mappings = util.getArg(sourceMap, 'mappings');
+ var file = util.getArg(sourceMap, 'file', null);
+
+ // Once again, Sass deviates from the spec and supplies the version as a
+ // string rather than a number, so we use loose equality checking here.
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+
+ sources = sources
+ .map(String)
+ // Some source maps produce relative source paths like "./foo.js" instead of
+ // "foo.js". Normalize these first so that future comparisons will succeed.
+ // See bugzil.la/1090768.
+ .map(util.normalize)
+ // Always ensure that absolute sources are internally stored relative to
+ // the source root, if the source root is absolute. Not doing this would
+ // be particularly problematic when the source root is a prefix of the
+ // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
+ .map(function (source) {
+ return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
+ ? util.relative(sourceRoot, source)
+ : source;
+ });
+
+ // Pass `true` below to allow duplicate names and sources. While source maps
+ // are intended to be compressed and deduplicated, the TypeScript compiler
+ // sometimes generates source maps with duplicates in them. See Github issue
+ // #72 and bugzil.la/889492.
+ this._names = ArraySet.fromArray(names.map(String), true);
+ this._sources = ArraySet.fromArray(sources, true);
+
+ this.sourceRoot = sourceRoot;
+ this.sourcesContent = sourcesContent;
+ this._mappings = mappings;
+ this.file = file;
+}
+
+BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
+BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
+
+/**
+ * Create a BasicSourceMapConsumer from a SourceMapGenerator.
+ *
+ * @param SourceMapGenerator aSourceMap
+ * The source map that will be consumed.
+ * @returns BasicSourceMapConsumer
+ */
+BasicSourceMapConsumer.fromSourceMap =
+ function SourceMapConsumer_fromSourceMap(aSourceMap) {
+ var smc = Object.create(BasicSourceMapConsumer.prototype);
+
+ var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
+ var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
+ smc.sourceRoot = aSourceMap._sourceRoot;
+ smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
+ smc.sourceRoot);
+ smc.file = aSourceMap._file;
+
+ // Because we are modifying the entries (by converting string sources and
+ // names to indices into the sources and names ArraySets), we have to make
+ // a copy of the entry or else bad things happen. Shared mutable state
+ // strikes again! See github issue #191.
+
+ var generatedMappings = aSourceMap._mappings.toArray().slice();
+ var destGeneratedMappings = smc.__generatedMappings = [];
+ var destOriginalMappings = smc.__originalMappings = [];
+
+ for (var i = 0, length = generatedMappings.length; i < length; i++) {
+ var srcMapping = generatedMappings[i];
+ var destMapping = new Mapping;
+ destMapping.generatedLine = srcMapping.generatedLine;
+ destMapping.generatedColumn = srcMapping.generatedColumn;
+
+ if (srcMapping.source) {
+ destMapping.source = sources.indexOf(srcMapping.source);
+ destMapping.originalLine = srcMapping.originalLine;
+ destMapping.originalColumn = srcMapping.originalColumn;
+
+ if (srcMapping.name) {
+ destMapping.name = names.indexOf(srcMapping.name);
+ }
+
+ destOriginalMappings.push(destMapping);
+ }
+
+ destGeneratedMappings.push(destMapping);
+ }
+
+ quickSort(smc.__originalMappings, util.compareByOriginalPositions);
+
+ return smc;
+ };
+
+/**
+ * The version of the source mapping spec that we are consuming.
+ */
+BasicSourceMapConsumer.prototype._version = 3;
+
+/**
+ * The list of original sources.
+ */
+Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ return this._sources.toArray().map(function (s) {
+ return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
+ }, this);
+ }
+});
+
+/**
+ * Provide the JIT with a nice shape / hidden class.
+ */
+function Mapping() {
+ this.generatedLine = 0;
+ this.generatedColumn = 0;
+ this.source = null;
+ this.originalLine = null;
+ this.originalColumn = null;
+ this.name = null;
+}
+
+/**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+BasicSourceMapConsumer.prototype._parseMappings =
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ var generatedLine = 1;
+ var previousGeneratedColumn = 0;
+ var previousOriginalLine = 0;
+ var previousOriginalColumn = 0;
+ var previousSource = 0;
+ var previousName = 0;
+ var length = aStr.length;
+ var index = 0;
+ var cachedSegments = {};
+ var temp = {};
+ var originalMappings = [];
+ var generatedMappings = [];
+ var mapping, str, segment, end, value;
+
+ while (index < length) {
+ if (aStr.charAt(index) === ';') {
+ generatedLine++;
+ index++;
+ previousGeneratedColumn = 0;
+ }
+ else if (aStr.charAt(index) === ',') {
+ index++;
+ }
+ else {
+ mapping = new Mapping();
+ mapping.generatedLine = generatedLine;
+
+ // Because each offset is encoded relative to the previous one,
+ // many segments often have the same encoding. We can exploit this
+ // fact by caching the parsed variable length fields of each segment,
+ // allowing us to avoid a second parse if we encounter the same
+ // segment again.
+ for (end = index; end < length; end++) {
+ if (this._charIsMappingSeparator(aStr, end)) {
+ break;
+ }
+ }
+ str = aStr.slice(index, end);
+
+ segment = cachedSegments[str];
+ if (segment) {
+ index += str.length;
+ } else {
+ segment = [];
+ while (index < end) {
+ base64VLQ.decode(aStr, index, temp);
+ value = temp.value;
+ index = temp.rest;
+ segment.push(value);
+ }
+
+ if (segment.length === 2) {
+ throw new Error('Found a source, but no line and column');
+ }
+
+ if (segment.length === 3) {
+ throw new Error('Found a source and line, but no column');
+ }
+
+ cachedSegments[str] = segment;
+ }
+
+ // Generated column.
+ mapping.generatedColumn = previousGeneratedColumn + segment[0];
+ previousGeneratedColumn = mapping.generatedColumn;
+
+ if (segment.length > 1) {
+ // Original source.
+ mapping.source = previousSource + segment[1];
+ previousSource += segment[1];
+
+ // Original line.
+ mapping.originalLine = previousOriginalLine + segment[2];
+ previousOriginalLine = mapping.originalLine;
+ // Lines are stored 0-based
+ mapping.originalLine += 1;
+
+ // Original column.
+ mapping.originalColumn = previousOriginalColumn + segment[3];
+ previousOriginalColumn = mapping.originalColumn;
+
+ if (segment.length > 4) {
+ // Original name.
+ mapping.name = previousName + segment[4];
+ previousName += segment[4];
+ }
+ }
+
+ generatedMappings.push(mapping);
+ if (typeof mapping.originalLine === 'number') {
+ originalMappings.push(mapping);
+ }
+ }
+ }
+
+ quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
+ this.__generatedMappings = generatedMappings;
+
+ quickSort(originalMappings, util.compareByOriginalPositions);
+ this.__originalMappings = originalMappings;
+ };
+
+/**
+ * Find the mapping that best matches the hypothetical "needle" mapping that
+ * we are searching for in the given "haystack" of mappings.
+ */
+BasicSourceMapConsumer.prototype._findMapping =
+ function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
+ aColumnName, aComparator, aBias) {
+ // To return the position we are searching for, we must first find the
+ // mapping for the given position and then return the opposite position it
+ // points to. Because the mappings are sorted, we can use binary search to
+ // find the best mapping.
+
+ if (aNeedle[aLineName] <= 0) {
+ throw new TypeError('Line must be greater than or equal to 1, got '
+ + aNeedle[aLineName]);
+ }
+ if (aNeedle[aColumnName] < 0) {
+ throw new TypeError('Column must be greater than or equal to 0, got '
+ + aNeedle[aColumnName]);
+ }
+
+ return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
+ };
+
+/**
+ * Compute the last column for each generated mapping. The last column is
+ * inclusive.
+ */
+BasicSourceMapConsumer.prototype.computeColumnSpans =
+ function SourceMapConsumer_computeColumnSpans() {
+ for (var index = 0; index < this._generatedMappings.length; ++index) {
+ var mapping = this._generatedMappings[index];
+
+ // Mappings do not contain a field for the last generated columnt. We
+ // can come up with an optimistic estimate, however, by assuming that
+ // mappings are contiguous (i.e. given two consecutive mappings, the
+ // first mapping ends where the second one starts).
+ if (index + 1 < this._generatedMappings.length) {
+ var nextMapping = this._generatedMappings[index + 1];
+
+ if (mapping.generatedLine === nextMapping.generatedLine) {
+ mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
+ continue;
+ }
+ }
+
+ // The last mapping for each line spans the entire line.
+ mapping.lastGeneratedColumn = Infinity;
+ }
+ };
+
+/**
+ * Returns the original source, line, and column information for the generated
+ * source's line and column positions provided. The only argument is an object
+ * with the following properties:
+ *
+ * - line: The line number in the generated source.
+ * - column: The column number in the generated source.
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - source: The original source file, or null.
+ * - line: The line number in the original source, or null.
+ * - column: The column number in the original source, or null.
+ * - name: The original identifier, or null.
+ */
+BasicSourceMapConsumer.prototype.originalPositionFor =
+ function SourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+
+ var index = this._findMapping(
+ needle,
+ this._generatedMappings,
+ "generatedLine",
+ "generatedColumn",
+ util.compareByGeneratedPositionsDeflated,
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
+ );
+
+ if (index >= 0) {
+ var mapping = this._generatedMappings[index];
+
+ if (mapping.generatedLine === needle.generatedLine) {
+ var source = util.getArg(mapping, 'source', null);
+ if (source !== null) {
+ source = this._sources.at(source);
+ if (this.sourceRoot != null) {
+ source = util.join(this.sourceRoot, source);
+ }
+ }
+ var name = util.getArg(mapping, 'name', null);
+ if (name !== null) {
+ name = this._names.at(name);
+ }
+ return {
+ source: source,
+ line: util.getArg(mapping, 'originalLine', null),
+ column: util.getArg(mapping, 'originalColumn', null),
+ name: name
+ };
+ }
+ }
+
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ };
+
+/**
+ * Return true if we have the source content for every source in the source
+ * map, false otherwise.
+ */
+BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
+ function BasicSourceMapConsumer_hasContentsOfAllSources() {
+ if (!this.sourcesContent) {
+ return false;
+ }
+ return this.sourcesContent.length >= this._sources.size() &&
+ !this.sourcesContent.some(function (sc) { return sc == null; });
+ };
+
+/**
+ * Returns the original source content. The only argument is the url of the
+ * original source file. Returns null if no original source content is
+ * available.
+ */
+BasicSourceMapConsumer.prototype.sourceContentFor =
+ function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
+ if (!this.sourcesContent) {
+ return null;
+ }
+
+ if (this.sourceRoot != null) {
+ aSource = util.relative(this.sourceRoot, aSource);
+ }
+
+ if (this._sources.has(aSource)) {
+ return this.sourcesContent[this._sources.indexOf(aSource)];
+ }
+
+ var url;
+ if (this.sourceRoot != null
+ && (url = util.urlParse(this.sourceRoot))) {
+ // XXX: file:// URIs and absolute paths lead to unexpected behavior for
+ // many users. We can help them out when they expect file:// URIs to
+ // behave like it would if they were running a local HTTP server. See
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
+ var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
+ if (url.scheme == "file"
+ && this._sources.has(fileUriAbsPath)) {
+ return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
+ }
+
+ if ((!url.path || url.path == "/")
+ && this._sources.has("/" + aSource)) {
+ return this.sourcesContent[this._sources.indexOf("/" + aSource)];
+ }
+ }
+
+ // This function is used recursively from
+ // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
+ // don't want to throw if we can't find the source - we just want to
+ // return null, so we provide a flag to exit gracefully.
+ if (nullOnMissing) {
+ return null;
+ }
+ else {
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ }
+ };
+
+/**
+ * Returns the generated line and column information for the original source,
+ * line, and column positions provided. The only argument is an object with
+ * the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: The column number in the original source.
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+BasicSourceMapConsumer.prototype.generatedPositionFor =
+ function SourceMapConsumer_generatedPositionFor(aArgs) {
+ var source = util.getArg(aArgs, 'source');
+ if (this.sourceRoot != null) {
+ source = util.relative(this.sourceRoot, source);
+ }
+ if (!this._sources.has(source)) {
+ return {
+ line: null,
+ column: null,
+ lastColumn: null
+ };
+ }
+ source = this._sources.indexOf(source);
+
+ var needle = {
+ source: source,
+ originalLine: util.getArg(aArgs, 'line'),
+ originalColumn: util.getArg(aArgs, 'column')
+ };
+
+ var index = this._findMapping(
+ needle,
+ this._originalMappings,
+ "originalLine",
+ "originalColumn",
+ util.compareByOriginalPositions,
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
+ );
+
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+
+ if (mapping.source === needle.source) {
+ return {
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ };
+ }
+ }
+
+ return {
+ line: null,
+ column: null,
+ lastColumn: null
+ };
+ };
+
+exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
+
+/**
+ * An IndexedSourceMapConsumer instance represents a parsed source map which
+ * we can query for information. It differs from BasicSourceMapConsumer in
+ * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
+ * input.
+ *
+ * The only parameter is a raw source map (either as a JSON string, or already
+ * parsed to an object). According to the spec for indexed source maps, they
+ * have the following attributes:
+ *
+ * - version: Which version of the source map spec this map is following.
+ * - file: Optional. The generated file this source map is associated with.
+ * - sections: A list of section definitions.
+ *
+ * Each value under the "sections" field has two fields:
+ * - offset: The offset into the original specified at which this section
+ * begins to apply, defined as an object with a "line" and "column"
+ * field.
+ * - map: A source map definition. This source map could also be indexed,
+ * but doesn't have to be.
+ *
+ * Instead of the "map" field, it's also possible to have a "url" field
+ * specifying a URL to retrieve a source map from, but that's currently
+ * unsupported.
+ *
+ * Here's an example source map, taken from the source map spec[0], but
+ * modified to omit a section which uses the "url" field.
+ *
+ * {
+ * version : 3,
+ * file: "app.js",
+ * sections: [{
+ * offset: {line:100, column:10},
+ * map: {
+ * version : 3,
+ * file: "section.js",
+ * sources: ["foo.js", "bar.js"],
+ * names: ["src", "maps", "are", "fun"],
+ * mappings: "AAAA,E;;ABCDE;"
+ * }
+ * }],
+ * }
+ *
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
+ */
+function IndexedSourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ var version = util.getArg(sourceMap, 'version');
+ var sections = util.getArg(sourceMap, 'sections');
+
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+
+ this._sources = new ArraySet();
+ this._names = new ArraySet();
+
+ var lastOffset = {
+ line: -1,
+ column: 0
+ };
+ this._sections = sections.map(function (s) {
+ if (s.url) {
+ // The url field will require support for asynchronicity.
+ // See https://github.com/mozilla/source-map/issues/16
+ throw new Error('Support for url field in sections not implemented.');
+ }
+ var offset = util.getArg(s, 'offset');
+ var offsetLine = util.getArg(offset, 'line');
+ var offsetColumn = util.getArg(offset, 'column');
+
+ if (offsetLine < lastOffset.line ||
+ (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
+ throw new Error('Section offsets must be ordered and non-overlapping.');
+ }
+ lastOffset = offset;
+
+ return {
+ generatedOffset: {
+ // The offset fields are 0-based, but we use 1-based indices when
+ // encoding/decoding from VLQ.
+ generatedLine: offsetLine + 1,
+ generatedColumn: offsetColumn + 1
+ },
+ consumer: new SourceMapConsumer(util.getArg(s, 'map'))
+ }
+ });
+}
+
+IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
+IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
+
+/**
+ * The version of the source mapping spec that we are consuming.
+ */
+IndexedSourceMapConsumer.prototype._version = 3;
+
+/**
+ * The list of original sources.
+ */
+Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ var sources = [];
+ for (var i = 0; i < this._sections.length; i++) {
+ for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
+ sources.push(this._sections[i].consumer.sources[j]);
+ }
+ }
+ return sources;
+ }
+});
+
+/**
+ * Returns the original source, line, and column information for the generated
+ * source's line and column positions provided. The only argument is an object
+ * with the following properties:
+ *
+ * - line: The line number in the generated source.
+ * - column: The column number in the generated source.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - source: The original source file, or null.
+ * - line: The line number in the original source, or null.
+ * - column: The column number in the original source, or null.
+ * - name: The original identifier, or null.
+ */
+IndexedSourceMapConsumer.prototype.originalPositionFor =
+ function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+
+ // Find the section containing the generated position we're trying to map
+ // to an original position.
+ var sectionIndex = binarySearch.search(needle, this._sections,
+ function(needle, section) {
+ var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
+ if (cmp) {
+ return cmp;
+ }
+
+ return (needle.generatedColumn -
+ section.generatedOffset.generatedColumn);
+ });
+ var section = this._sections[sectionIndex];
+
+ if (!section) {
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ }
+
+ return section.consumer.originalPositionFor({
+ line: needle.generatedLine -
+ (section.generatedOffset.generatedLine - 1),
+ column: needle.generatedColumn -
+ (section.generatedOffset.generatedLine === needle.generatedLine
+ ? section.generatedOffset.generatedColumn - 1
+ : 0),
+ bias: aArgs.bias
+ });
+ };
+
+/**
+ * Return true if we have the source content for every source in the source
+ * map, false otherwise.
+ */
+IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
+ function IndexedSourceMapConsumer_hasContentsOfAllSources() {
+ return this._sections.every(function (s) {
+ return s.consumer.hasContentsOfAllSources();
+ });
+ };
+
+/**
+ * Returns the original source content. The only argument is the url of the
+ * original source file. Returns null if no original source content is
+ * available.
+ */
+IndexedSourceMapConsumer.prototype.sourceContentFor =
+ function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+
+ var content = section.consumer.sourceContentFor(aSource, true);
+ if (content) {
+ return content;
+ }
+ }
+ if (nullOnMissing) {
+ return null;
+ }
+ else {
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ }
+ };
+
+/**
+ * Returns the generated line and column information for the original source,
+ * line, and column positions provided. The only argument is an object with
+ * the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: The column number in the original source.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+IndexedSourceMapConsumer.prototype.generatedPositionFor =
+ function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+
+ // Only consider this section if the requested source is in the list of
+ // sources of the consumer.
+ if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
+ continue;
+ }
+ var generatedPosition = section.consumer.generatedPositionFor(aArgs);
+ if (generatedPosition) {
+ var ret = {
+ line: generatedPosition.line +
+ (section.generatedOffset.generatedLine - 1),
+ column: generatedPosition.column +
+ (section.generatedOffset.generatedLine === generatedPosition.line
+ ? section.generatedOffset.generatedColumn - 1
+ : 0)
+ };
+ return ret;
+ }
+ }
+
+ return {
+ line: null,
+ column: null
+ };
+ };
+
+/**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+IndexedSourceMapConsumer.prototype._parseMappings =
+ function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ this.__generatedMappings = [];
+ this.__originalMappings = [];
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+ var sectionMappings = section.consumer._generatedMappings;
+ for (var j = 0; j < sectionMappings.length; j++) {
+ var mapping = sectionMappings[j];
+
+ var source = section.consumer._sources.at(mapping.source);
+ if (section.consumer.sourceRoot !== null) {
+ source = util.join(section.consumer.sourceRoot, source);
+ }
+ this._sources.add(source);
+ source = this._sources.indexOf(source);
+
+ var name = section.consumer._names.at(mapping.name);
+ this._names.add(name);
+ name = this._names.indexOf(name);
+
+ // The mappings coming from the consumer for the section have
+ // generated positions relative to the start of the section, so we
+ // need to offset them to be relative to the start of the concatenated
+ // generated file.
+ var adjustedMapping = {
+ source: source,
+ generatedLine: mapping.generatedLine +
+ (section.generatedOffset.generatedLine - 1),
+ generatedColumn: mapping.generatedColumn +
+ (section.generatedOffset.generatedLine === mapping.generatedLine
+ ? section.generatedOffset.generatedColumn - 1
+ : 0),
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: name
+ };
+
+ this.__generatedMappings.push(adjustedMapping);
+ if (typeof adjustedMapping.originalLine === 'number') {
+ this.__originalMappings.push(adjustedMapping);
+ }
+ }
+ }
+
+ quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
+ quickSort(this.__originalMappings, util.compareByOriginalPositions);
+ };
+
+exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-generator.js b/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-generator.js
new file mode 100644
index 0000000000..aff1e7fb26
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-generator.js
@@ -0,0 +1,416 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+var base64VLQ = require('./base64-vlq');
+var util = require('./util');
+var ArraySet = require('./array-set').ArraySet;
+var MappingList = require('./mapping-list').MappingList;
+
+/**
+ * An instance of the SourceMapGenerator represents a source map which is
+ * being built incrementally. You may pass an object with the following
+ * properties:
+ *
+ * - file: The filename of the generated source.
+ * - sourceRoot: A root for all relative URLs in this source map.
+ */
+function SourceMapGenerator(aArgs) {
+ if (!aArgs) {
+ aArgs = {};
+ }
+ this._file = util.getArg(aArgs, 'file', null);
+ this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
+ this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
+ this._sources = new ArraySet();
+ this._names = new ArraySet();
+ this._mappings = new MappingList();
+ this._sourcesContents = null;
+}
+
+SourceMapGenerator.prototype._version = 3;
+
+/**
+ * Creates a new SourceMapGenerator based on a SourceMapConsumer
+ *
+ * @param aSourceMapConsumer The SourceMap.
+ */
+SourceMapGenerator.fromSourceMap =
+ function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
+ var sourceRoot = aSourceMapConsumer.sourceRoot;
+ var generator = new SourceMapGenerator({
+ file: aSourceMapConsumer.file,
+ sourceRoot: sourceRoot
+ });
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ var newMapping = {
+ generated: {
+ line: mapping.generatedLine,
+ column: mapping.generatedColumn
+ }
+ };
+
+ if (mapping.source != null) {
+ newMapping.source = mapping.source;
+ if (sourceRoot != null) {
+ newMapping.source = util.relative(sourceRoot, newMapping.source);
+ }
+
+ newMapping.original = {
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ };
+
+ if (mapping.name != null) {
+ newMapping.name = mapping.name;
+ }
+ }
+
+ generator.addMapping(newMapping);
+ });
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ generator.setSourceContent(sourceFile, content);
+ }
+ });
+ return generator;
+ };
+
+/**
+ * Add a single mapping from original source line and column to the generated
+ * source's line and column for this source map being created. The mapping
+ * object should have the following properties:
+ *
+ * - generated: An object with the generated line and column positions.
+ * - original: An object with the original line and column positions.
+ * - source: The original source file (relative to the sourceRoot).
+ * - name: An optional original token name for this mapping.
+ */
+SourceMapGenerator.prototype.addMapping =
+ function SourceMapGenerator_addMapping(aArgs) {
+ var generated = util.getArg(aArgs, 'generated');
+ var original = util.getArg(aArgs, 'original', null);
+ var source = util.getArg(aArgs, 'source', null);
+ var name = util.getArg(aArgs, 'name', null);
+
+ if (!this._skipValidation) {
+ this._validateMapping(generated, original, source, name);
+ }
+
+ if (source != null) {
+ source = String(source);
+ if (!this._sources.has(source)) {
+ this._sources.add(source);
+ }
+ }
+
+ if (name != null) {
+ name = String(name);
+ if (!this._names.has(name)) {
+ this._names.add(name);
+ }
+ }
+
+ this._mappings.add({
+ generatedLine: generated.line,
+ generatedColumn: generated.column,
+ originalLine: original != null && original.line,
+ originalColumn: original != null && original.column,
+ source: source,
+ name: name
+ });
+ };
+
+/**
+ * Set the source content for a source file.
+ */
+SourceMapGenerator.prototype.setSourceContent =
+ function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
+ var source = aSourceFile;
+ if (this._sourceRoot != null) {
+ source = util.relative(this._sourceRoot, source);
+ }
+
+ if (aSourceContent != null) {
+ // Add the source content to the _sourcesContents map.
+ // Create a new _sourcesContents map if the property is null.
+ if (!this._sourcesContents) {
+ this._sourcesContents = Object.create(null);
+ }
+ this._sourcesContents[util.toSetString(source)] = aSourceContent;
+ } else if (this._sourcesContents) {
+ // Remove the source file from the _sourcesContents map.
+ // If the _sourcesContents map is empty, set the property to null.
+ delete this._sourcesContents[util.toSetString(source)];
+ if (Object.keys(this._sourcesContents).length === 0) {
+ this._sourcesContents = null;
+ }
+ }
+ };
+
+/**
+ * Applies the mappings of a sub-source-map for a specific source file to the
+ * source map being generated. Each mapping to the supplied source file is
+ * rewritten using the supplied source map. Note: The resolution for the
+ * resulting mappings is the minimium of this map and the supplied map.
+ *
+ * @param aSourceMapConsumer The source map to be applied.
+ * @param aSourceFile Optional. The filename of the source file.
+ * If omitted, SourceMapConsumer's file property will be used.
+ * @param aSourceMapPath Optional. The dirname of the path to the source map
+ * to be applied. If relative, it is relative to the SourceMapConsumer.
+ * This parameter is needed when the two source maps aren't in the same
+ * directory, and the source map to be applied contains relative source
+ * paths. If so, those relative source paths need to be rewritten
+ * relative to the SourceMapGenerator.
+ */
+SourceMapGenerator.prototype.applySourceMap =
+ function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
+ var sourceFile = aSourceFile;
+ // If aSourceFile is omitted, we will use the file property of the SourceMap
+ if (aSourceFile == null) {
+ if (aSourceMapConsumer.file == null) {
+ throw new Error(
+ 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
+ 'or the source map\'s "file" property. Both were omitted.'
+ );
+ }
+ sourceFile = aSourceMapConsumer.file;
+ }
+ var sourceRoot = this._sourceRoot;
+ // Make "sourceFile" relative if an absolute Url is passed.
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ // Applying the SourceMap can add and remove items from the sources and
+ // the names array.
+ var newSources = new ArraySet();
+ var newNames = new ArraySet();
+
+ // Find mappings for the "sourceFile"
+ this._mappings.unsortedForEach(function (mapping) {
+ if (mapping.source === sourceFile && mapping.originalLine != null) {
+ // Check if it can be mapped by the source map, then update the mapping.
+ var original = aSourceMapConsumer.originalPositionFor({
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ });
+ if (original.source != null) {
+ // Copy mapping
+ mapping.source = original.source;
+ if (aSourceMapPath != null) {
+ mapping.source = util.join(aSourceMapPath, mapping.source)
+ }
+ if (sourceRoot != null) {
+ mapping.source = util.relative(sourceRoot, mapping.source);
+ }
+ mapping.originalLine = original.line;
+ mapping.originalColumn = original.column;
+ if (original.name != null) {
+ mapping.name = original.name;
+ }
+ }
+ }
+
+ var source = mapping.source;
+ if (source != null && !newSources.has(source)) {
+ newSources.add(source);
+ }
+
+ var name = mapping.name;
+ if (name != null && !newNames.has(name)) {
+ newNames.add(name);
+ }
+
+ }, this);
+ this._sources = newSources;
+ this._names = newNames;
+
+ // Copy sourcesContents of applied map.
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aSourceMapPath != null) {
+ sourceFile = util.join(aSourceMapPath, sourceFile);
+ }
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ this.setSourceContent(sourceFile, content);
+ }
+ }, this);
+ };
+
+/**
+ * A mapping can have one of the three levels of data:
+ *
+ * 1. Just the generated position.
+ * 2. The Generated position, original position, and original source.
+ * 3. Generated and original position, original source, as well as a name
+ * token.
+ *
+ * To maintain consistency, we validate that any new mapping being added falls
+ * in to one of these categories.
+ */
+SourceMapGenerator.prototype._validateMapping =
+ function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
+ aName) {
+ // When aOriginal is truthy but has empty values for .line and .column,
+ // it is most likely a programmer error. In this case we throw a very
+ // specific error message to try to guide them the right way.
+ // For example: https://github.com/Polymer/polymer-bundler/pull/519
+ if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
+ throw new Error(
+ 'original.line and original.column are not numbers -- you probably meant to omit ' +
+ 'the original mapping entirely and only map the generated position. If so, pass ' +
+ 'null for the original mapping instead of an object with empty or null values.'
+ );
+ }
+
+ if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
+ && aGenerated.line > 0 && aGenerated.column >= 0
+ && !aOriginal && !aSource && !aName) {
+ // Case 1.
+ return;
+ }
+ else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
+ && aOriginal && 'line' in aOriginal && 'column' in aOriginal
+ && aGenerated.line > 0 && aGenerated.column >= 0
+ && aOriginal.line > 0 && aOriginal.column >= 0
+ && aSource) {
+ // Cases 2 and 3.
+ return;
+ }
+ else {
+ throw new Error('Invalid mapping: ' + JSON.stringify({
+ generated: aGenerated,
+ source: aSource,
+ original: aOriginal,
+ name: aName
+ }));
+ }
+ };
+
+/**
+ * Serialize the accumulated mappings in to the stream of base 64 VLQs
+ * specified by the source map format.
+ */
+SourceMapGenerator.prototype._serializeMappings =
+ function SourceMapGenerator_serializeMappings() {
+ var previousGeneratedColumn = 0;
+ var previousGeneratedLine = 1;
+ var previousOriginalColumn = 0;
+ var previousOriginalLine = 0;
+ var previousName = 0;
+ var previousSource = 0;
+ var result = '';
+ var next;
+ var mapping;
+ var nameIdx;
+ var sourceIdx;
+
+ var mappings = this._mappings.toArray();
+ for (var i = 0, len = mappings.length; i < len; i++) {
+ mapping = mappings[i];
+ next = ''
+
+ if (mapping.generatedLine !== previousGeneratedLine) {
+ previousGeneratedColumn = 0;
+ while (mapping.generatedLine !== previousGeneratedLine) {
+ next += ';';
+ previousGeneratedLine++;
+ }
+ }
+ else {
+ if (i > 0) {
+ if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
+ continue;
+ }
+ next += ',';
+ }
+ }
+
+ next += base64VLQ.encode(mapping.generatedColumn
+ - previousGeneratedColumn);
+ previousGeneratedColumn = mapping.generatedColumn;
+
+ if (mapping.source != null) {
+ sourceIdx = this._sources.indexOf(mapping.source);
+ next += base64VLQ.encode(sourceIdx - previousSource);
+ previousSource = sourceIdx;
+
+ // lines are stored 0-based in SourceMap spec version 3
+ next += base64VLQ.encode(mapping.originalLine - 1
+ - previousOriginalLine);
+ previousOriginalLine = mapping.originalLine - 1;
+
+ next += base64VLQ.encode(mapping.originalColumn
+ - previousOriginalColumn);
+ previousOriginalColumn = mapping.originalColumn;
+
+ if (mapping.name != null) {
+ nameIdx = this._names.indexOf(mapping.name);
+ next += base64VLQ.encode(nameIdx - previousName);
+ previousName = nameIdx;
+ }
+ }
+
+ result += next;
+ }
+
+ return result;
+ };
+
+SourceMapGenerator.prototype._generateSourcesContent =
+ function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
+ return aSources.map(function (source) {
+ if (!this._sourcesContents) {
+ return null;
+ }
+ if (aSourceRoot != null) {
+ source = util.relative(aSourceRoot, source);
+ }
+ var key = util.toSetString(source);
+ return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
+ ? this._sourcesContents[key]
+ : null;
+ }, this);
+ };
+
+/**
+ * Externalize the source map.
+ */
+SourceMapGenerator.prototype.toJSON =
+ function SourceMapGenerator_toJSON() {
+ var map = {
+ version: this._version,
+ sources: this._sources.toArray(),
+ names: this._names.toArray(),
+ mappings: this._serializeMappings()
+ };
+ if (this._file != null) {
+ map.file = this._file;
+ }
+ if (this._sourceRoot != null) {
+ map.sourceRoot = this._sourceRoot;
+ }
+ if (this._sourcesContents) {
+ map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
+ }
+
+ return map;
+ };
+
+/**
+ * Render the source map being generated to a string.
+ */
+SourceMapGenerator.prototype.toString =
+ function SourceMapGenerator_toString() {
+ return JSON.stringify(this.toJSON());
+ };
+
+exports.SourceMapGenerator = SourceMapGenerator;
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-node.js b/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-node.js
new file mode 100644
index 0000000000..d196a53f8c
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-node.js
@@ -0,0 +1,413 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;
+var util = require('./util');
+
+// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
+// operating systems these days (capturing the result).
+var REGEX_NEWLINE = /(\r?\n)/;
+
+// Newline character code for charCodeAt() comparisons
+var NEWLINE_CODE = 10;
+
+// Private symbol for identifying `SourceNode`s when multiple versions of
+// the source-map library are loaded. This MUST NOT CHANGE across
+// versions!
+var isSourceNode = "$$$isSourceNode$$$";
+
+/**
+ * SourceNodes provide a way to abstract over interpolating/concatenating
+ * snippets of generated JavaScript source code while maintaining the line and
+ * column information associated with the original source code.
+ *
+ * @param aLine The original line number.
+ * @param aColumn The original column number.
+ * @param aSource The original source's filename.
+ * @param aChunks Optional. An array of strings which are snippets of
+ * generated JS, or other SourceNodes.
+ * @param aName The original identifier.
+ */
+function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
+ this.children = [];
+ this.sourceContents = {};
+ this.line = aLine == null ? null : aLine;
+ this.column = aColumn == null ? null : aColumn;
+ this.source = aSource == null ? null : aSource;
+ this.name = aName == null ? null : aName;
+ this[isSourceNode] = true;
+ if (aChunks != null) this.add(aChunks);
+}
+
+/**
+ * Creates a SourceNode from generated code and a SourceMapConsumer.
+ *
+ * @param aGeneratedCode The generated code
+ * @param aSourceMapConsumer The SourceMap for the generated code
+ * @param aRelativePath Optional. The path that relative sources in the
+ * SourceMapConsumer should be relative to.
+ */
+SourceNode.fromStringWithSourceMap =
+ function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
+ // The SourceNode we want to fill with the generated code
+ // and the SourceMap
+ var node = new SourceNode();
+
+ // All even indices of this array are one line of the generated code,
+ // while all odd indices are the newlines between two adjacent lines
+ // (since `REGEX_NEWLINE` captures its match).
+ // Processed fragments are accessed by calling `shiftNextLine`.
+ var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
+ var remainingLinesIndex = 0;
+ var shiftNextLine = function() {
+ var lineContents = getNextLine();
+ // The last line of a file might not have a newline.
+ var newLine = getNextLine() || "";
+ return lineContents + newLine;
+
+ function getNextLine() {
+ return remainingLinesIndex < remainingLines.length ?
+ remainingLines[remainingLinesIndex++] : undefined;
+ }
+ };
+
+ // We need to remember the position of "remainingLines"
+ var lastGeneratedLine = 1, lastGeneratedColumn = 0;
+
+ // The generate SourceNodes we need a code range.
+ // To extract it current and last mapping is used.
+ // Here we store the last mapping.
+ var lastMapping = null;
+
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ if (lastMapping !== null) {
+ // We add the code from "lastMapping" to "mapping":
+ // First check if there is a new line in between.
+ if (lastGeneratedLine < mapping.generatedLine) {
+ // Associate first line with "lastMapping"
+ addMappingWithCode(lastMapping, shiftNextLine());
+ lastGeneratedLine++;
+ lastGeneratedColumn = 0;
+ // The remaining code is added without mapping
+ } else {
+ // There is no new line in between.
+ // Associate the code between "lastGeneratedColumn" and
+ // "mapping.generatedColumn" with "lastMapping"
+ var nextLine = remainingLines[remainingLinesIndex];
+ var code = nextLine.substr(0, mapping.generatedColumn -
+ lastGeneratedColumn);
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -
+ lastGeneratedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ addMappingWithCode(lastMapping, code);
+ // No more remaining code, continue
+ lastMapping = mapping;
+ return;
+ }
+ }
+ // We add the generated code until the first mapping
+ // to the SourceNode without any mapping.
+ // Each line is added as separate string.
+ while (lastGeneratedLine < mapping.generatedLine) {
+ node.add(shiftNextLine());
+ lastGeneratedLine++;
+ }
+ if (lastGeneratedColumn < mapping.generatedColumn) {
+ var nextLine = remainingLines[remainingLinesIndex];
+ node.add(nextLine.substr(0, mapping.generatedColumn));
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ }
+ lastMapping = mapping;
+ }, this);
+ // We have processed all mappings.
+ if (remainingLinesIndex < remainingLines.length) {
+ if (lastMapping) {
+ // Associate the remaining code in the current line with "lastMapping"
+ addMappingWithCode(lastMapping, shiftNextLine());
+ }
+ // and add the remaining lines without any mapping
+ node.add(remainingLines.splice(remainingLinesIndex).join(""));
+ }
+
+ // Copy sourcesContent into SourceNode
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aRelativePath != null) {
+ sourceFile = util.join(aRelativePath, sourceFile);
+ }
+ node.setSourceContent(sourceFile, content);
+ }
+ });
+
+ return node;
+
+ function addMappingWithCode(mapping, code) {
+ if (mapping === null || mapping.source === undefined) {
+ node.add(code);
+ } else {
+ var source = aRelativePath
+ ? util.join(aRelativePath, mapping.source)
+ : mapping.source;
+ node.add(new SourceNode(mapping.originalLine,
+ mapping.originalColumn,
+ source,
+ code,
+ mapping.name));
+ }
+ }
+ };
+
+/**
+ * Add a chunk of generated JS to this source node.
+ *
+ * @param aChunk A string snippet of generated JS code, another instance of
+ * SourceNode, or an array where each member is one of those things.
+ */
+SourceNode.prototype.add = function SourceNode_add(aChunk) {
+ if (Array.isArray(aChunk)) {
+ aChunk.forEach(function (chunk) {
+ this.add(chunk);
+ }, this);
+ }
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
+ if (aChunk) {
+ this.children.push(aChunk);
+ }
+ }
+ else {
+ throw new TypeError(
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
+ );
+ }
+ return this;
+};
+
+/**
+ * Add a chunk of generated JS to the beginning of this source node.
+ *
+ * @param aChunk A string snippet of generated JS code, another instance of
+ * SourceNode, or an array where each member is one of those things.
+ */
+SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
+ if (Array.isArray(aChunk)) {
+ for (var i = aChunk.length-1; i >= 0; i--) {
+ this.prepend(aChunk[i]);
+ }
+ }
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
+ this.children.unshift(aChunk);
+ }
+ else {
+ throw new TypeError(
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
+ );
+ }
+ return this;
+};
+
+/**
+ * Walk over the tree of JS snippets in this node and its children. The
+ * walking function is called once for each snippet of JS and is passed that
+ * snippet and the its original associated source's line/column location.
+ *
+ * @param aFn The traversal function.
+ */
+SourceNode.prototype.walk = function SourceNode_walk(aFn) {
+ var chunk;
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ chunk = this.children[i];
+ if (chunk[isSourceNode]) {
+ chunk.walk(aFn);
+ }
+ else {
+ if (chunk !== '') {
+ aFn(chunk, { source: this.source,
+ line: this.line,
+ column: this.column,
+ name: this.name });
+ }
+ }
+ }
+};
+
+/**
+ * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
+ * each of `this.children`.
+ *
+ * @param aSep The separator.
+ */
+SourceNode.prototype.join = function SourceNode_join(aSep) {
+ var newChildren;
+ var i;
+ var len = this.children.length;
+ if (len > 0) {
+ newChildren = [];
+ for (i = 0; i < len-1; i++) {
+ newChildren.push(this.children[i]);
+ newChildren.push(aSep);
+ }
+ newChildren.push(this.children[i]);
+ this.children = newChildren;
+ }
+ return this;
+};
+
+/**
+ * Call String.prototype.replace on the very right-most source snippet. Useful
+ * for trimming whitespace from the end of a source node, etc.
+ *
+ * @param aPattern The pattern to replace.
+ * @param aReplacement The thing to replace the pattern with.
+ */
+SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
+ var lastChild = this.children[this.children.length - 1];
+ if (lastChild[isSourceNode]) {
+ lastChild.replaceRight(aPattern, aReplacement);
+ }
+ else if (typeof lastChild === 'string') {
+ this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
+ }
+ else {
+ this.children.push(''.replace(aPattern, aReplacement));
+ }
+ return this;
+};
+
+/**
+ * Set the source content for a source file. This will be added to the SourceMapGenerator
+ * in the sourcesContent field.
+ *
+ * @param aSourceFile The filename of the source file
+ * @param aSourceContent The content of the source file
+ */
+SourceNode.prototype.setSourceContent =
+ function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
+ this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
+ };
+
+/**
+ * Walk over the tree of SourceNodes. The walking function is called for each
+ * source file content and is passed the filename and source content.
+ *
+ * @param aFn The traversal function.
+ */
+SourceNode.prototype.walkSourceContents =
+ function SourceNode_walkSourceContents(aFn) {
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ if (this.children[i][isSourceNode]) {
+ this.children[i].walkSourceContents(aFn);
+ }
+ }
+
+ var sources = Object.keys(this.sourceContents);
+ for (var i = 0, len = sources.length; i < len; i++) {
+ aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
+ }
+ };
+
+/**
+ * Return the string representation of this source node. Walks over the tree
+ * and concatenates all the various snippets together to one string.
+ */
+SourceNode.prototype.toString = function SourceNode_toString() {
+ var str = "";
+ this.walk(function (chunk) {
+ str += chunk;
+ });
+ return str;
+};
+
+/**
+ * Returns the string representation of this source node along with a source
+ * map.
+ */
+SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
+ var generated = {
+ code: "",
+ line: 1,
+ column: 0
+ };
+ var map = new SourceMapGenerator(aArgs);
+ var sourceMappingActive = false;
+ var lastOriginalSource = null;
+ var lastOriginalLine = null;
+ var lastOriginalColumn = null;
+ var lastOriginalName = null;
+ this.walk(function (chunk, original) {
+ generated.code += chunk;
+ if (original.source !== null
+ && original.line !== null
+ && original.column !== null) {
+ if(lastOriginalSource !== original.source
+ || lastOriginalLine !== original.line
+ || lastOriginalColumn !== original.column
+ || lastOriginalName !== original.name) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ lastOriginalSource = original.source;
+ lastOriginalLine = original.line;
+ lastOriginalColumn = original.column;
+ lastOriginalName = original.name;
+ sourceMappingActive = true;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ generated: {
+ line: generated.line,
+ column: generated.column
+ }
+ });
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ }
+ for (var idx = 0, length = chunk.length; idx < length; idx++) {
+ if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
+ generated.line++;
+ generated.column = 0;
+ // Mappings end at eol
+ if (idx + 1 === length) {
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ } else {
+ generated.column++;
+ }
+ }
+ });
+ this.walkSourceContents(function (sourceFile, sourceContent) {
+ map.setSourceContent(sourceFile, sourceContent);
+ });
+
+ return { code: generated.code, map: map };
+};
+
+exports.SourceNode = SourceNode;
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/util.js b/tools/node_modules/babel-eslint/node_modules/source-map/lib/util.js
new file mode 100644
index 0000000000..44e0e45205
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/lib/util.js
@@ -0,0 +1,417 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+/**
+ * This is a helper function for getting values from parameter/options
+ * objects.
+ *
+ * @param args The object we are extracting values from
+ * @param name The name of the property we are getting.
+ * @param defaultValue An optional value to return if the property is missing
+ * from the object. If this is not specified and the property is missing, an
+ * error will be thrown.
+ */
+function getArg(aArgs, aName, aDefaultValue) {
+ if (aName in aArgs) {
+ return aArgs[aName];
+ } else if (arguments.length === 3) {
+ return aDefaultValue;
+ } else {
+ throw new Error('"' + aName + '" is a required argument.');
+ }
+}
+exports.getArg = getArg;
+
+var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
+var dataUrlRegexp = /^data:.+\,.+$/;
+
+function urlParse(aUrl) {
+ var match = aUrl.match(urlRegexp);
+ if (!match) {
+ return null;
+ }
+ return {
+ scheme: match[1],
+ auth: match[2],
+ host: match[3],
+ port: match[4],
+ path: match[5]
+ };
+}
+exports.urlParse = urlParse;
+
+function urlGenerate(aParsedUrl) {
+ var url = '';
+ if (aParsedUrl.scheme) {
+ url += aParsedUrl.scheme + ':';
+ }
+ url += '//';
+ if (aParsedUrl.auth) {
+ url += aParsedUrl.auth + '@';
+ }
+ if (aParsedUrl.host) {
+ url += aParsedUrl.host;
+ }
+ if (aParsedUrl.port) {
+ url += ":" + aParsedUrl.port
+ }
+ if (aParsedUrl.path) {
+ url += aParsedUrl.path;
+ }
+ return url;
+}
+exports.urlGenerate = urlGenerate;
+
+/**
+ * Normalizes a path, or the path portion of a URL:
+ *
+ * - Replaces consecutive slashes with one slash.
+ * - Removes unnecessary '.' parts.
+ * - Removes unnecessary '<dir>/..' parts.
+ *
+ * Based on code in the Node.js 'path' core module.
+ *
+ * @param aPath The path or url to normalize.
+ */
+function normalize(aPath) {
+ var path = aPath;
+ var url = urlParse(aPath);
+ if (url) {
+ if (!url.path) {
+ return aPath;
+ }
+ path = url.path;
+ }
+ var isAbsolute = exports.isAbsolute(path);
+
+ var parts = path.split(/\/+/);
+ for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
+ part = parts[i];
+ if (part === '.') {
+ parts.splice(i, 1);
+ } else if (part === '..') {
+ up++;
+ } else if (up > 0) {
+ if (part === '') {
+ // The first part is blank if the path is absolute. Trying to go
+ // above the root is a no-op. Therefore we can remove all '..' parts
+ // directly after the root.
+ parts.splice(i + 1, up);
+ up = 0;
+ } else {
+ parts.splice(i, 2);
+ up--;
+ }
+ }
+ }
+ path = parts.join('/');
+
+ if (path === '') {
+ path = isAbsolute ? '/' : '.';
+ }
+
+ if (url) {
+ url.path = path;
+ return urlGenerate(url);
+ }
+ return path;
+}
+exports.normalize = normalize;
+
+/**
+ * Joins two paths/URLs.
+ *
+ * @param aRoot The root path or URL.
+ * @param aPath The path or URL to be joined with the root.
+ *
+ * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
+ * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
+ * first.
+ * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
+ * is updated with the result and aRoot is returned. Otherwise the result
+ * is returned.
+ * - If aPath is absolute, the result is aPath.
+ * - Otherwise the two paths are joined with a slash.
+ * - Joining for example 'http://' and 'www.example.com' is also supported.
+ */
+function join(aRoot, aPath) {
+ if (aRoot === "") {
+ aRoot = ".";
+ }
+ if (aPath === "") {
+ aPath = ".";
+ }
+ var aPathUrl = urlParse(aPath);
+ var aRootUrl = urlParse(aRoot);
+ if (aRootUrl) {
+ aRoot = aRootUrl.path || '/';
+ }
+
+ // `join(foo, '//www.example.org')`
+ if (aPathUrl && !aPathUrl.scheme) {
+ if (aRootUrl) {
+ aPathUrl.scheme = aRootUrl.scheme;
+ }
+ return urlGenerate(aPathUrl);
+ }
+
+ if (aPathUrl || aPath.match(dataUrlRegexp)) {
+ return aPath;
+ }
+
+ // `join('http://', 'www.example.com')`
+ if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
+ aRootUrl.host = aPath;
+ return urlGenerate(aRootUrl);
+ }
+
+ var joined = aPath.charAt(0) === '/'
+ ? aPath
+ : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
+
+ if (aRootUrl) {
+ aRootUrl.path = joined;
+ return urlGenerate(aRootUrl);
+ }
+ return joined;
+}
+exports.join = join;
+
+exports.isAbsolute = function (aPath) {
+ return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
+};
+
+/**
+ * Make a path relative to a URL or another path.
+ *
+ * @param aRoot The root path or URL.
+ * @param aPath The path or URL to be made relative to aRoot.
+ */
+function relative(aRoot, aPath) {
+ if (aRoot === "") {
+ aRoot = ".";
+ }
+
+ aRoot = aRoot.replace(/\/$/, '');
+
+ // It is possible for the path to be above the root. In this case, simply
+ // checking whether the root is a prefix of the path won't work. Instead, we
+ // need to remove components from the root one by one, until either we find
+ // a prefix that fits, or we run out of components to remove.
+ var level = 0;
+ while (aPath.indexOf(aRoot + '/') !== 0) {
+ var index = aRoot.lastIndexOf("/");
+ if (index < 0) {
+ return aPath;
+ }
+
+ // If the only part of the root that is left is the scheme (i.e. http://,
+ // file:///, etc.), one or more slashes (/), or simply nothing at all, we
+ // have exhausted all components, so the path is not relative to the root.
+ aRoot = aRoot.slice(0, index);
+ if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
+ return aPath;
+ }
+
+ ++level;
+ }
+
+ // Make sure we add a "../" for each component we removed from the root.
+ return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
+}
+exports.relative = relative;
+
+var supportsNullProto = (function () {
+ var obj = Object.create(null);
+ return !('__proto__' in obj);
+}());
+
+function identity (s) {
+ return s;
+}
+
+/**
+ * Because behavior goes wacky when you set `__proto__` on objects, we
+ * have to prefix all the strings in our set with an arbitrary character.
+ *
+ * See https://github.com/mozilla/source-map/pull/31 and
+ * https://github.com/mozilla/source-map/issues/30
+ *
+ * @param String aStr
+ */
+function toSetString(aStr) {
+ if (isProtoString(aStr)) {
+ return '$' + aStr;
+ }
+
+ return aStr;
+}
+exports.toSetString = supportsNullProto ? identity : toSetString;
+
+function fromSetString(aStr) {
+ if (isProtoString(aStr)) {
+ return aStr.slice(1);
+ }
+
+ return aStr;
+}
+exports.fromSetString = supportsNullProto ? identity : fromSetString;
+
+function isProtoString(s) {
+ if (!s) {
+ return false;
+ }
+
+ var length = s.length;
+
+ if (length < 9 /* "__proto__".length */) {
+ return false;
+ }
+
+ if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 2) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
+ s.charCodeAt(length - 4) !== 116 /* 't' */ ||
+ s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
+ s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
+ s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
+ s.charCodeAt(length - 8) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 9) !== 95 /* '_' */) {
+ return false;
+ }
+
+ for (var i = length - 10; i >= 0; i--) {
+ if (s.charCodeAt(i) !== 36 /* '$' */) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/**
+ * Comparator between two mappings where the original positions are compared.
+ *
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
+ * mappings with the same original source/line/column, but different generated
+ * line and column the same. Useful when searching for a mapping with a
+ * stubbed out mapping.
+ */
+function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
+ var cmp = mappingA.source - mappingB.source;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0 || onlyCompareOriginal) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return mappingA.name - mappingB.name;
+}
+exports.compareByOriginalPositions = compareByOriginalPositions;
+
+/**
+ * Comparator between two mappings with deflated source and name indices where
+ * the generated positions are compared.
+ *
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
+ * mappings with the same generated line and column, but different
+ * source/name/original line and column the same. Useful when searching for a
+ * mapping with a stubbed out mapping.
+ */
+function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0 || onlyCompareGenerated) {
+ return cmp;
+ }
+
+ cmp = mappingA.source - mappingB.source;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return mappingA.name - mappingB.name;
+}
+exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
+
+function strcmp(aStr1, aStr2) {
+ if (aStr1 === aStr2) {
+ return 0;
+ }
+
+ if (aStr1 > aStr2) {
+ return 1;
+ }
+
+ return -1;
+}
+
+/**
+ * Comparator between two mappings with inflated source and name strings where
+ * the generated positions are compared.
+ */
+function compareByGeneratedPositionsInflated(mappingA, mappingB) {
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = strcmp(mappingA.source, mappingB.source);
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return strcmp(mappingA.name, mappingB.name);
+}
+exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
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
new file mode 100644
index 0000000000..9e2674cec8
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/package.json
@@ -0,0 +1,188 @@
+{
+ "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/source-map/source-map.js b/tools/node_modules/babel-eslint/node_modules/source-map/source-map.js
new file mode 100644
index 0000000000..bc88fe820c
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/source-map/source-map.js
@@ -0,0 +1,8 @@
+/*
+ * Copyright 2009-2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE.txt or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;
+exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;
+exports.SourceNode = require('./lib/source-node').SourceNode;
diff --git a/tools/node_modules/babel-eslint/node_modules/supports-color/browser.js b/tools/node_modules/babel-eslint/node_modules/supports-color/browser.js
index ae7c87b17c..62afa3a742 100644
--- a/tools/node_modules/babel-eslint/node_modules/supports-color/browser.js
+++ b/tools/node_modules/babel-eslint/node_modules/supports-color/browser.js
@@ -1,2 +1,5 @@
'use strict';
-module.exports = false;
+module.exports = {
+ stdout: false,
+ stderr: false
+};
diff --git a/tools/node_modules/babel-eslint/node_modules/supports-color/index.js b/tools/node_modules/babel-eslint/node_modules/supports-color/index.js
index 20a29230e8..1704131bdf 100644
--- a/tools/node_modules/babel-eslint/node_modules/supports-color/index.js
+++ b/tools/node_modules/babel-eslint/node_modules/supports-color/index.js
@@ -4,7 +4,22 @@ const hasFlag = require('has-flag');
const env = process.env;
-const support = level => {
+let forceColor;
+if (hasFlag('no-color') ||
+ hasFlag('no-colors') ||
+ hasFlag('color=false')) {
+ forceColor = false;
+} else if (hasFlag('color') ||
+ hasFlag('colors') ||
+ hasFlag('color=true') ||
+ hasFlag('color=always')) {
+ forceColor = true;
+}
+if ('FORCE_COLOR' in env) {
+ forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
+}
+
+function translateLevel(level) {
if (level === 0) {
return false;
}
@@ -15,12 +30,10 @@ const support = level => {
has256: level >= 2,
has16m: level >= 3
};
-};
+}
-let supportLevel = (() => {
- if (hasFlag('no-color') ||
- hasFlag('no-colors') ||
- hasFlag('color=false')) {
+function supportsColor(stream) {
+ if (forceColor === false) {
return 0;
}
@@ -34,30 +47,26 @@ let supportLevel = (() => {
return 2;
}
- if (hasFlag('color') ||
- hasFlag('colors') ||
- hasFlag('color=true') ||
- hasFlag('color=always')) {
- return 1;
- }
-
- if (process.stdout && !process.stdout.isTTY) {
+ if (stream && !stream.isTTY && forceColor !== true) {
return 0;
}
+ const min = forceColor ? 1 : 0;
+
if (process.platform === 'win32') {
// Node.js 7.5.0 is the first version of Node.js to include a patch to
// libuv that enables 256 color output on Windows. Anything earlier and it
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
- // release that supports 256 colors.
+ // release that supports 256 colors. Windows 10 build 14931 is the first release
+ // that supports 16m/TrueColor.
const osRelease = os.release().split('.');
if (
Number(process.versions.node.split('.')[0]) >= 8 &&
Number(osRelease[0]) >= 10 &&
Number(osRelease[2]) >= 10586
) {
- return 2;
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
}
return 1;
@@ -68,21 +77,23 @@ let supportLevel = (() => {
return 1;
}
- return 0;
+ return min;
}
if ('TEAMCITY_VERSION' in env) {
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
}
+ if (env.COLORTERM === 'truecolor') {
+ return 3;
+ }
+
if ('TERM_PROGRAM' in env) {
const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
switch (env.TERM_PROGRAM) {
case 'iTerm.app':
return version >= 3 ? 3 : 2;
- case 'Hyper':
- return 3;
case 'Apple_Terminal':
return 2;
// No default
@@ -93,7 +104,7 @@ let supportLevel = (() => {
return 2;
}
- if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
return 1;
}
@@ -102,14 +113,19 @@ let supportLevel = (() => {
}
if (env.TERM === 'dumb') {
- return 0;
+ return min;
}
- return 0;
-})();
+ return min;
+}
-if ('FORCE_COLOR' in env) {
- supportLevel = parseInt(env.FORCE_COLOR, 10) === 0 ? 0 : (supportLevel || 1);
+function getSupportLevel(stream) {
+ const level = supportsColor(stream);
+ return translateLevel(level);
}
-module.exports = process && support(supportLevel);
+module.exports = {
+ supportsColor: getSupportLevel,
+ stdout: getSupportLevel(process.stdout),
+ stderr: getSupportLevel(process.stderr)
+};
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
index f6daea6ce9..9e4eafa857 100644
--- a/tools/node_modules/babel-eslint/node_modules/supports-color/package.json
+++ b/tools/node_modules/babel-eslint/node_modules/supports-color/package.json
@@ -1,27 +1,4 @@
{
- "_from": "supports-color@^4.0.0",
- "_id": "supports-color@4.5.0",
- "_inBundle": false,
- "_integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
- "_location": "/babel-eslint/supports-color",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "supports-color@^4.0.0",
- "name": "supports-color",
- "escapedName": "supports-color",
- "rawSpec": "^4.0.0",
- "saveSpec": null,
- "fetchSpec": "^4.0.0"
- },
- "_requiredBy": [
- "/babel-eslint/chalk"
- ],
- "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
- "_shasum": "be7a0de484dec5c5cddf8b3d59125044912f635b",
- "_spec": "supports-color@^4.0.0",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/chalk",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -33,14 +10,14 @@
},
"bundleDependencies": false,
"dependencies": {
- "has-flag": "^2.0.0"
+ "has-flag": "^3.0.0"
},
"deprecated": false,
"description": "Detect whether a terminal supports color",
"devDependencies": {
- "ava": "*",
+ "ava": "^0.25.0",
"import-fresh": "^2.0.0",
- "xo": "*"
+ "xo": "^0.20.0"
},
"engines": {
"node": ">=4"
@@ -81,5 +58,5 @@
"scripts": {
"test": "xo && ava"
},
- "version": "4.5.0"
-}
+ "version": "5.5.0"
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/supports-color/readme.md b/tools/node_modules/babel-eslint/node_modules/supports-color/readme.md
index 3bef57db0e..f6e4019573 100644
--- a/tools/node_modules/babel-eslint/node_modules/supports-color/readme.md
+++ b/tools/node_modules/babel-eslint/node_modules/supports-color/readme.md
@@ -15,25 +15,25 @@ $ npm install supports-color
```js
const supportsColor = require('supports-color');
-if (supportsColor) {
- console.log('Terminal supports color');
+if (supportsColor.stdout) {
+ console.log('Terminal stdout supports color');
}
-if (supportsColor.has256) {
- console.log('Terminal supports 256 colors');
+if (supportsColor.stdout.has256) {
+ console.log('Terminal stdout supports 256 colors');
}
-if (supportsColor.has16m) {
- console.log('Terminal supports 16 million colors (truecolor)');
+if (supportsColor.stderr.has16m) {
+ console.log('Terminal stderr supports 16 million colors (truecolor)');
}
```
## API
-Returns an `Object`, or `false` if color is not supported.
+Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported.
-The returned object specifies a level of support for color through a `.level` property and a corresponding flag:
+The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag:
- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors)
- `.level = 2` and `.has256 = true`: 256 color support
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
index f1afc91ae7..2c80c24389 100644
--- 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
@@ -1,27 +1,4 @@
{
- "_from": "to-fast-properties@^2.0.0",
- "_id": "to-fast-properties@2.0.0",
- "_inBundle": false,
- "_integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
- "_location": "/babel-eslint/to-fast-properties",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "to-fast-properties@^2.0.0",
- "name": "to-fast-properties",
- "escapedName": "to-fast-properties",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/babel-eslint/@babel/types"
- ],
- "_resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
- "_shasum": "dc5e698cbd079265bc73e0377681a4e4e83f616e",
- "_spec": "to-fast-properties@^2.0.0",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp/node_modules/babel-eslint/node_modules/@babel/types",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -64,4 +41,4 @@
"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
new file mode 100644
index 0000000000..666f4b2f4e
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/trim-right/index.js
@@ -0,0 +1,10 @@
+'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/object-assign/license b/tools/node_modules/babel-eslint/node_modules/trim-right/license
index 654d0bfe94..654d0bfe94 100644
--- a/tools/node_modules/babel-eslint/node_modules/object-assign/license
+++ b/tools/node_modules/babel-eslint/node_modules/trim-right/license
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
new file mode 100644
index 0000000000..4ed056783b
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/trim-right/package.json
@@ -0,0 +1,46 @@
+{
+ "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
new file mode 100644
index 0000000000..0a4438acd7
--- /dev/null
+++ b/tools/node_modules/babel-eslint/node_modules/trim-right/readme.md
@@ -0,0 +1,30 @@
+# 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
index acd55ec475..73a82acccd 100644
--- a/tools/node_modules/babel-eslint/package.json
+++ b/tools/node_modules/babel-eslint/package.json
@@ -1,28 +1,4 @@
{
- "_from": "babel-eslint@latest",
- "_id": "babel-eslint@8.2.1",
- "_inBundle": false,
- "_integrity": "sha512-RzdVOyWKQRUnLXhwLk+eKb4oyW+BykZSkpYwFhM4tnfzAG5OWfvG0w/uyzMp5XKEU0jN82+JefHr39bG2+KhRQ==",
- "_location": "/babel-eslint",
- "_phantomChildren": {},
- "_requested": {
- "type": "tag",
- "registry": true,
- "raw": "babel-eslint@latest",
- "name": "babel-eslint",
- "escapedName": "babel-eslint",
- "rawSpec": "latest",
- "saveSpec": null,
- "fetchSpec": "latest"
- },
- "_requiredBy": [
- "#USER",
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-8.2.1.tgz",
- "_shasum": "136888f3c109edc65376c23ebf494f36a3e03951",
- "_spec": "babel-eslint@latest",
- "_where": "/home/mzasso/git/nodejs/node/tools/babel-eslint-tmp",
"author": {
"name": "Sebastian McKenzie",
"email": "sebmck@gmail.com"
@@ -32,32 +8,31 @@
},
"bundleDependencies": false,
"dependencies": {
- "@babel/code-frame": "7.0.0-beta.36",
- "@babel/traverse": "7.0.0-beta.36",
- "@babel/types": "7.0.0-beta.36",
- "babylon": "7.0.0-beta.36",
- "eslint-scope": "~3.7.1",
+ "@babel/code-frame": "^7.0.0",
+ "@babel/parser": "^7.0.0",
+ "@babel/traverse": "^7.0.0",
+ "@babel/types": "^7.0.0",
+ "eslint-scope": "3.7.1",
"eslint-visitor-keys": "^1.0.0"
},
"deprecated": false,
"description": "Custom parser for ESLint",
"devDependencies": {
- "babel-eslint": "^8.0.0",
+ "babel-eslint": "^8.2.6",
"dedent": "^0.7.0",
- "eslint": "^4.14.0",
+ "eslint": "^5.6.0",
"eslint-config-babel": "^7.0.1",
- "eslint-old": "npm:eslint@4.13.1",
"eslint-plugin-flowtype": "^2.30.3",
- "eslint-plugin-import": "^2.8.0",
+ "eslint-plugin-import": "^2.14.0",
"eslint-plugin-prettier": "^2.1.2",
"espree": "^3.5.2",
- "husky": "^0.14.0",
- "lint-staged": "^4.0.0",
- "mocha": "^4.0.0",
+ "husky": "^1.0.0-rc.13",
+ "lint-staged": "^7.2.2",
+ "mocha": "^5.0.1",
"prettier": "^1.4.4"
},
"engines": {
- "node": ">=4"
+ "node": ">=6"
},
"files": [
"lib"
@@ -72,18 +47,21 @@
},
"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 index.js babylon-to-espree test --fix",
- "lint": "eslint index.js babylon-to-espree test",
+ "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 && mocha --require test/fixtures/use-eslint-old.js"
+ "test-only": "mocha && mocha --require test/fixtures/preprocess-to-patch.js"
},
- "version": "8.2.1"
-}
+ "version": "10.0.1"
+} \ No newline at end of file