summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-10-15 11:30:25 -0700
committerRich Trott <rtrott@gmail.com>2016-10-18 15:28:21 -0700
commit2981f24f926da32d708c8bb39d90fff5aa73bc3f (patch)
treee154567c25398160dfe9ac8e27dd79c65a436272 /tools
parent150dc5c2e6a848aa49bb95f4e6c0cbf0da5d0e73 (diff)
downloadandroid-node-v8-2981f24f926da32d708c8bb39d90fff5aa73bc3f.tar.gz
android-node-v8-2981f24f926da32d708c8bb39d90fff5aa73bc3f.tar.bz2
android-node-v8-2981f24f926da32d708c8bb39d90fff5aa73bc3f.zip
tools: update ESLint to v3.8.0
Update ESLint to v3.8.0. * Installed with `npm install --production` to avoid installing unnecessary dev files * Used `dmn -f clean` to further eliminate unneeded files PR-URL: https://github.com/nodejs/node/pull/9112 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/eslint/CHANGELOG.md3412
-rw-r--r--tools/eslint/README.md1
-rwxr-xr-xtools/eslint/bin/eslint.js26
-rwxr-xr-xtools/eslint/conf/eslint.json1
-rw-r--r--tools/eslint/lib/ast-utils.js23
-rw-r--r--tools/eslint/lib/cli-engine.js51
-rw-r--r--tools/eslint/lib/cli.js37
-rw-r--r--tools/eslint/lib/code-path-analysis/code-path-analyzer.js12
-rw-r--r--tools/eslint/lib/code-path-analysis/code-path-state.js2
-rw-r--r--tools/eslint/lib/code-path-analysis/code-path.js2
-rw-r--r--tools/eslint/lib/code-path-analysis/debug-helpers.js34
-rw-r--r--tools/eslint/lib/code-path-analysis/fork-context.js4
-rw-r--r--tools/eslint/lib/config.js10
-rw-r--r--tools/eslint/lib/config/autoconfig.js2
-rw-r--r--tools/eslint/lib/config/config-file.js58
-rw-r--r--tools/eslint/lib/config/config-initializer.js18
-rw-r--r--tools/eslint/lib/config/config-ops.js2
-rw-r--r--tools/eslint/lib/config/environments.js2
-rw-r--r--tools/eslint/lib/config/plugins.js6
-rwxr-xr-xtools/eslint/lib/eslint.js38
-rw-r--r--tools/eslint/lib/formatters/checkstyle.js15
-rw-r--r--tools/eslint/lib/formatters/compact.js14
-rw-r--r--tools/eslint/lib/formatters/html.js6
-rw-r--r--tools/eslint/lib/formatters/jslint-xml.js13
-rw-r--r--tools/eslint/lib/formatters/junit.js16
-rw-r--r--tools/eslint/lib/formatters/stylish.js10
-rw-r--r--tools/eslint/lib/formatters/table.js6
-rw-r--r--tools/eslint/lib/formatters/tap.js8
-rw-r--r--tools/eslint/lib/formatters/unix.js13
-rw-r--r--tools/eslint/lib/formatters/visualstudio.js12
-rw-r--r--tools/eslint/lib/ignored-paths.js8
-rw-r--r--tools/eslint/lib/internal-rules/.eslintrc.yml3
-rw-r--r--tools/eslint/lib/internal-rules/internal-consistent-docs-description.js131
-rw-r--r--tools/eslint/lib/options.js4
-rw-r--r--tools/eslint/lib/rules.js2
-rw-r--r--tools/eslint/lib/rules/.eslintrc.yml1
-rw-r--r--tools/eslint/lib/rules/array-callback-return.js4
-rw-r--r--tools/eslint/lib/rules/arrow-parens.js2
-rw-r--r--tools/eslint/lib/rules/class-methods-use-this.js28
-rw-r--r--tools/eslint/lib/rules/comma-dangle.js244
-rw-r--r--tools/eslint/lib/rules/curly.js97
-rw-r--r--tools/eslint/lib/rules/dot-location.js22
-rw-r--r--tools/eslint/lib/rules/eol-last.js66
-rw-r--r--tools/eslint/lib/rules/func-call-spacing.js2
-rw-r--r--tools/eslint/lib/rules/func-name-matching.js149
-rw-r--r--tools/eslint/lib/rules/id-length.js4
-rw-r--r--tools/eslint/lib/rules/indent.js216
-rw-r--r--tools/eslint/lib/rules/init-declarations.js2
-rw-r--r--tools/eslint/lib/rules/keyword-spacing.js44
-rw-r--r--tools/eslint/lib/rules/line-comment-position.js2
-rw-r--r--tools/eslint/lib/rules/lines-around-directive.js9
-rw-r--r--tools/eslint/lib/rules/max-len.js7
-rw-r--r--tools/eslint/lib/rules/max-params.js2
-rw-r--r--tools/eslint/lib/rules/max-statements-per-line.js20
-rw-r--r--tools/eslint/lib/rules/max-statements.js2
-rw-r--r--tools/eslint/lib/rules/new-cap.js2
-rw-r--r--tools/eslint/lib/rules/newline-after-var.js2
-rw-r--r--tools/eslint/lib/rules/no-extra-bind.js13
-rw-r--r--tools/eslint/lib/rules/no-extra-parens.js17
-rw-r--r--tools/eslint/lib/rules/no-implicit-coercion.js35
-rw-r--r--tools/eslint/lib/rules/no-implicit-globals.js2
-rw-r--r--tools/eslint/lib/rules/no-inner-declarations.js2
-rw-r--r--tools/eslint/lib/rules/no-lonely-if.js46
-rw-r--r--tools/eslint/lib/rules/no-mixed-requires.js2
-rw-r--r--tools/eslint/lib/rules/no-multiple-empty-lines.js180
-rw-r--r--tools/eslint/lib/rules/no-redeclare.js2
-rw-r--r--tools/eslint/lib/rules/no-regex-spaces.js30
-rw-r--r--tools/eslint/lib/rules/no-restricted-properties.js149
-rw-r--r--tools/eslint/lib/rules/no-shadow.js2
-rw-r--r--tools/eslint/lib/rules/no-spaced-func.js2
-rw-r--r--tools/eslint/lib/rules/no-undef-init.js33
-rw-r--r--tools/eslint/lib/rules/no-unused-expressions.js2
-rw-r--r--tools/eslint/lib/rules/no-unused-vars.js38
-rw-r--r--tools/eslint/lib/rules/no-useless-computed-key.js23
-rw-r--r--tools/eslint/lib/rules/no-useless-escape.js53
-rw-r--r--tools/eslint/lib/rules/no-whitespace-before-property.js6
-rw-r--r--tools/eslint/lib/rules/object-shorthand.js37
-rw-r--r--tools/eslint/lib/rules/one-var-declaration-per-line.js9
-rw-r--r--tools/eslint/lib/rules/prefer-arrow-callback.js5
-rw-r--r--tools/eslint/lib/rules/prefer-numeric-literals.js21
-rw-r--r--tools/eslint/lib/rules/prefer-spread.js23
-rw-r--r--tools/eslint/lib/rules/prefer-template.js130
-rw-r--r--tools/eslint/lib/rules/quote-props.js106
-rw-r--r--tools/eslint/lib/rules/quotes.js24
-rw-r--r--tools/eslint/lib/rules/semi.js2
-rw-r--r--tools/eslint/lib/rules/sort-keys.js4
-rw-r--r--tools/eslint/lib/rules/space-before-function-paren.js40
-rw-r--r--tools/eslint/lib/rules/space-infix-ops.js2
-rw-r--r--tools/eslint/lib/rules/space-unary-ops.js14
-rw-r--r--tools/eslint/lib/rules/strict.js57
-rw-r--r--tools/eslint/lib/rules/valid-jsdoc.js6
-rw-r--r--tools/eslint/lib/rules/valid-typeof.js21
-rw-r--r--tools/eslint/lib/rules/wrap-iife.js111
-rw-r--r--tools/eslint/lib/rules/yoda.js67
-rw-r--r--tools/eslint/lib/testers/rule-tester.js68
-rw-r--r--tools/eslint/lib/timing.js2
-rw-r--r--tools/eslint/lib/util/glob-util.js4
-rw-r--r--tools/eslint/lib/util/module-resolver.js2
-rw-r--r--tools/eslint/lib/util/node-event-generator.js2
-rw-r--r--tools/eslint/lib/util/npm-util.js2
-rw-r--r--tools/eslint/lib/util/source-code-util.js4
-rw-r--r--tools/eslint/lib/util/xml-escape.js4
l---------tools/eslint/node_modules/acorn-jsx/node_modules/.bin/acorn1
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/.tern-project6
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/AUTHORS59
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/LICENSE (renamed from tools/eslint/node_modules/xregexp/LICENSE)4
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/README.md407
-rwxr-xr-xtools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/acorn65
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js55
-rwxr-xr-xtools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh6
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/.keep0
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js3112
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.js3142
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.es.js1261
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.js1273
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.es.js342
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.js360
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/package.json278
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.bin.js15
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.loose.js20
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.main.js11
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.walk.js11
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/bin/acorn.js58
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/expression.js701
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/identifier.js82
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/index.js67
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/location.js26
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/locutil.js42
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/expression.js514
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/index.js50
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/parseutil.js1
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/state.js160
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/statement.js425
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/tokenize.js108
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/lval.js216
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/node.js50
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/options.js121
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/parseutil.js109
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/state.js104
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/statement.js654
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokencontext.js110
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokenize.js696
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokentype.js147
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/util.js9
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/walk/index.js342
-rw-r--r--tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/whitespace.js13
-rw-r--r--tools/eslint/node_modules/acorn-jsx/package.json1
-rw-r--r--tools/eslint/node_modules/acorn/AUTHORS3
-rw-r--r--tools/eslint/node_modules/acorn/README.md13
-rwxr-xr-xtools/eslint/node_modules/acorn/bin/acorn14
-rwxr-xr-xtools/eslint/node_modules/acorn/bin/update_authors.sh2
-rw-r--r--tools/eslint/node_modules/acorn/dist/acorn.es.js394
-rw-r--r--tools/eslint/node_modules/acorn/dist/acorn.js393
-rw-r--r--tools/eslint/node_modules/acorn/dist/acorn_loose.es.js110
-rw-r--r--tools/eslint/node_modules/acorn/dist/acorn_loose.js458
-rw-r--r--tools/eslint/node_modules/acorn/dist/walk.es.js2
-rw-r--r--tools/eslint/node_modules/acorn/dist/walk.js2
-rw-r--r--tools/eslint/node_modules/acorn/package.json41
-rw-r--r--tools/eslint/node_modules/acorn/rollup/config.loose.js16
-rw-r--r--tools/eslint/node_modules/acorn/src/bin/acorn.js14
-rw-r--r--tools/eslint/node_modules/acorn/src/expression.js177
-rw-r--r--tools/eslint/node_modules/acorn/src/identifier.js1
-rw-r--r--tools/eslint/node_modules/acorn/src/index.js12
-rw-r--r--tools/eslint/node_modules/acorn/src/loose/expression.js70
-rw-r--r--tools/eslint/node_modules/acorn/src/loose/index.js8
-rw-r--r--tools/eslint/node_modules/acorn/src/loose/state.js3
-rw-r--r--tools/eslint/node_modules/acorn/src/loose/statement.js35
-rw-r--r--tools/eslint/node_modules/acorn/src/loose/tokenize.js2
-rw-r--r--tools/eslint/node_modules/acorn/src/lval.js9
-rw-r--r--tools/eslint/node_modules/acorn/src/options.js17
-rw-r--r--tools/eslint/node_modules/acorn/src/parseutil.js12
-rw-r--r--tools/eslint/node_modules/acorn/src/state.js16
-rw-r--r--tools/eslint/node_modules/acorn/src/statement.js136
-rw-r--r--tools/eslint/node_modules/acorn/src/tokenize.js5
-rw-r--r--tools/eslint/node_modules/acorn/src/walk/index.js2
-rw-r--r--tools/eslint/node_modules/acorn/src/whitespace.js2
-rw-r--r--tools/eslint/node_modules/ajv-keywords/.eslintrc.yml32
-rw-r--r--tools/eslint/node_modules/ajv-keywords/LICENSE21
-rw-r--r--tools/eslint/node_modules/ajv-keywords/README.md173
-rw-r--r--tools/eslint/node_modules/ajv-keywords/index.js33
-rw-r--r--tools/eslint/node_modules/ajv-keywords/keywords/index.js9
-rw-r--r--tools/eslint/node_modules/ajv-keywords/keywords/instanceof.js55
-rw-r--r--tools/eslint/node_modules/ajv-keywords/keywords/propertyNames.js48
-rw-r--r--tools/eslint/node_modules/ajv-keywords/keywords/range.js40
-rw-r--r--tools/eslint/node_modules/ajv-keywords/keywords/regexp.js33
-rw-r--r--tools/eslint/node_modules/ajv-keywords/keywords/typeof.js33
-rw-r--r--tools/eslint/node_modules/ajv-keywords/package.json103
-rw-r--r--tools/eslint/node_modules/ajv/.tonic_example.js20
-rw-r--r--tools/eslint/node_modules/ajv/LICENSE22
-rw-r--r--tools/eslint/node_modules/ajv/README.md1160
-rw-r--r--tools/eslint/node_modules/ajv/dist/ajv.bundle.js7919
-rw-r--r--tools/eslint/node_modules/ajv/dist/ajv.min.js6
-rw-r--r--tools/eslint/node_modules/ajv/dist/ajv.min.js.map1
-rw-r--r--tools/eslint/node_modules/ajv/dist/nodent.min.js8
-rw-r--r--tools/eslint/node_modules/ajv/dist/regenerator.min.js12
-rw-r--r--tools/eslint/node_modules/ajv/lib/ajv.d.ts262
-rw-r--r--tools/eslint/node_modules/ajv/lib/ajv.js416
-rw-r--r--tools/eslint/node_modules/ajv/lib/async.js214
-rw-r--r--tools/eslint/node_modules/ajv/lib/cache.js26
-rw-r--r--tools/eslint/node_modules/ajv/lib/compile/_rules.js28
-rw-r--r--tools/eslint/node_modules/ajv/lib/compile/equal.js34
-rw-r--r--tools/eslint/node_modules/ajv/lib/compile/formats.js164
-rw-r--r--tools/eslint/node_modules/ajv/lib/compile/index.js381
-rw-r--r--tools/eslint/node_modules/ajv/lib/compile/resolve.js267
-rw-r--r--tools/eslint/node_modules/ajv/lib/compile/rules.js40
-rw-r--r--tools/eslint/node_modules/ajv/lib/compile/schema_obj.js9
-rw-r--r--tools/eslint/node_modules/ajv/lib/compile/ucs2length.js20
-rw-r--r--tools/eslint/node_modules/ajv/lib/compile/util.js257
-rw-r--r--tools/eslint/node_modules/ajv/lib/compile/validation_error.js14
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/_limit.jst49
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/_limitItems.jst10
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/_limitLength.jst10
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/_limitProperties.jst10
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/allOf.jst26
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/anyOf.jst48
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/coerce.def67
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/custom.jst182
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/defaults.def32
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/definitions.def179
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/dependencies.jst69
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/enum.jst26
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/errors.def185
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/format.jst74
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/items.jst100
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/missing.def34
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/multipleOf.jst20
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/not.jst43
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/oneOf.jst44
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/pattern.jst14
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/properties.jst319
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/ref.jst86
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/required.jst95
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/uniqueItems.jst38
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/v5/_formatLimit.jst116
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/v5/constant.jst10
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/v5/patternRequired.jst28
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/v5/switch.jst73
-rw-r--r--tools/eslint/node_modules/ajv/lib/dot/validate.jst210
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/README.md3
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/_formatLimit.js176
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/_limit.js124
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/_limitItems.js76
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/_limitLength.js81
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/_limitProperties.js76
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/allOf.js36
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/anyOf.js65
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/constant.js53
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/custom.js210
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/dependencies.js147
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/enum.js65
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/format.js117
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/items.js143
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/multipleOf.js77
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/not.js83
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/oneOf.js76
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/pattern.js75
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/patternRequired.js52
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/properties.js445
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/ref.js122
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/required.js249
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/switch.js128
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/uniqueItems.js72
-rw-r--r--tools/eslint/node_modules/ajv/lib/dotjs/validate.js377
-rw-r--r--tools/eslint/node_modules/ajv/lib/keyword.js82
-rw-r--r--tools/eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json150
-rw-r--r--tools/eslint/node_modules/ajv/lib/refs/json-schema-v5.json328
-rw-r--r--tools/eslint/node_modules/ajv/lib/v5.js52
-rw-r--r--tools/eslint/node_modules/ajv/package.json164
-rw-r--r--tools/eslint/node_modules/ansi-escapes/package.json1
-rw-r--r--tools/eslint/node_modules/ansi-regex/package.json1
-rw-r--r--tools/eslint/node_modules/ansi-styles/package.json1
-rw-r--r--tools/eslint/node_modules/argparse/lib/action_container.js4
-rw-r--r--tools/eslint/node_modules/argparse/lib/argument_parser.js82
-rw-r--r--tools/eslint/node_modules/argparse/lib/help/added_formatters.js4
-rw-r--r--tools/eslint/node_modules/argparse/lib/help/formatter.js56
-rw-r--r--tools/eslint/node_modules/argparse/package.json31
-rw-r--r--tools/eslint/node_modules/array-union/package.json1
-rw-r--r--tools/eslint/node_modules/array-uniq/package.json1
-rw-r--r--tools/eslint/node_modules/arrify/package.json1
-rw-r--r--tools/eslint/node_modules/balanced-match/package.json1
-rw-r--r--tools/eslint/node_modules/bluebird/README.md51
-rw-r--r--tools/eslint/node_modules/bluebird/changelog.md1
-rw-r--r--tools/eslint/node_modules/bluebird/js/browser/bluebird.core.js3756
-rw-r--r--tools/eslint/node_modules/bluebird/js/browser/bluebird.core.min.js31
-rw-r--r--tools/eslint/node_modules/bluebird/js/browser/bluebird.js5598
-rw-r--r--tools/eslint/node_modules/bluebird/js/browser/bluebird.min.js31
-rw-r--r--tools/eslint/node_modules/bluebird/package.json137
-rw-r--r--tools/eslint/node_modules/brace-expansion/package.json1
-rw-r--r--tools/eslint/node_modules/caller-path/package.json1
-rw-r--r--tools/eslint/node_modules/callsites/package.json1
-rw-r--r--tools/eslint/node_modules/chalk/package.json1
-rw-r--r--tools/eslint/node_modules/circular-json/package.json1
-rw-r--r--tools/eslint/node_modules/cli-cursor/package.json1
-rw-r--r--tools/eslint/node_modules/cli-width/package.json1
-rw-r--r--tools/eslint/node_modules/co/LICENSE22
-rw-r--r--tools/eslint/node_modules/co/Readme.md212
-rw-r--r--tools/eslint/node_modules/co/index.js237
-rw-r--r--tools/eslint/node_modules/co/package.json106
-rw-r--r--tools/eslint/node_modules/code-point-at/package.json30
-rw-r--r--tools/eslint/node_modules/code-point-at/readme.md4
-rw-r--r--tools/eslint/node_modules/concat-map/package.json1
-rw-r--r--tools/eslint/node_modules/concat-stream/package.json1
-rw-r--r--tools/eslint/node_modules/core-util-is/package.json1
-rw-r--r--tools/eslint/node_modules/d/package.json1
-rw-r--r--tools/eslint/node_modules/debug/package.json1
-rw-r--r--tools/eslint/node_modules/deep-is/package.json1
-rw-r--r--tools/eslint/node_modules/del/package.json1
-rw-r--r--tools/eslint/node_modules/doctrine/lib/doctrine.js17
-rw-r--r--tools/eslint/node_modules/doctrine/lib/typed.js15
-rw-r--r--tools/eslint/node_modules/doctrine/package.json19
-rw-r--r--tools/eslint/node_modules/es5-ext/package.json1
-rw-r--r--tools/eslint/node_modules/es6-iterator/package.json1
-rw-r--r--tools/eslint/node_modules/es6-map/package.json1
-rw-r--r--tools/eslint/node_modules/es6-set/package.json1
-rw-r--r--tools/eslint/node_modules/es6-symbol/package.json1
-rw-r--r--tools/eslint/node_modules/es6-weak-map/package.json1
-rw-r--r--tools/eslint/node_modules/escape-string-regexp/package.json1
-rw-r--r--tools/eslint/node_modules/escope/package.json1
-rw-r--r--tools/eslint/node_modules/espree/README.md11
-rw-r--r--tools/eslint/node_modules/espree/espree.js28
-rw-r--r--tools/eslint/node_modules/espree/lib/token-translator.js8
-rw-r--r--tools/eslint/node_modules/espree/package.json40
-rw-r--r--tools/eslint/node_modules/esprima/package.json1
-rw-r--r--tools/eslint/node_modules/esrecurse/node_modules/estraverse/package.json1
-rw-r--r--tools/eslint/node_modules/esrecurse/package.json1
-rw-r--r--tools/eslint/node_modules/estraverse/package.json1
-rw-r--r--tools/eslint/node_modules/esutils/package.json1
-rw-r--r--tools/eslint/node_modules/event-emitter/package.json1
-rw-r--r--tools/eslint/node_modules/exit-hook/package.json1
-rw-r--r--tools/eslint/node_modules/fast-levenshtein/README.md36
-rw-r--r--tools/eslint/node_modules/fast-levenshtein/levenshtein.js173
-rw-r--r--tools/eslint/node_modules/fast-levenshtein/package.json37
-rw-r--r--tools/eslint/node_modules/figures/package.json1
-rw-r--r--tools/eslint/node_modules/file-entry-cache/package.json1
-rw-r--r--tools/eslint/node_modules/flat-cache/package.json1
-rw-r--r--tools/eslint/node_modules/fs.realpath/package.json1
-rw-r--r--tools/eslint/node_modules/generate-function/package.json1
-rw-r--r--tools/eslint/node_modules/generate-object-property/package.json1
-rw-r--r--tools/eslint/node_modules/glob/README.md3
-rw-r--r--tools/eslint/node_modules/glob/common.js7
-rw-r--r--tools/eslint/node_modules/glob/glob.js33
-rw-r--r--tools/eslint/node_modules/glob/package.json21
-rw-r--r--tools/eslint/node_modules/glob/sync.js40
-rw-r--r--tools/eslint/node_modules/globals/globals.json9
-rw-r--r--tools/eslint/node_modules/globals/package.json23
-rw-r--r--tools/eslint/node_modules/globby/package.json1
-rw-r--r--tools/eslint/node_modules/graceful-fs/graceful-fs.js37
-rw-r--r--tools/eslint/node_modules/graceful-fs/package.json19
-rw-r--r--tools/eslint/node_modules/graceful-fs/polyfills.js35
-rw-r--r--tools/eslint/node_modules/has-ansi/package.json1
-rwxr-xr-xtools/eslint/node_modules/ignore/README.md14
-rw-r--r--tools/eslint/node_modules/ignore/ignore.js8
-rw-r--r--tools/eslint/node_modules/ignore/package.json19
-rw-r--r--tools/eslint/node_modules/imurmurhash/package.json1
-rw-r--r--tools/eslint/node_modules/inflight/inflight.js34
-rw-r--r--tools/eslint/node_modules/inflight/package.json31
-rw-r--r--tools/eslint/node_modules/inherits/package.json1
-rw-r--r--tools/eslint/node_modules/inquirer/package.json1
-rw-r--r--tools/eslint/node_modules/is-fullwidth-code-point/package.json1
-rw-r--r--tools/eslint/node_modules/is-my-json-valid/index.js10
-rw-r--r--tools/eslint/node_modules/is-my-json-valid/package.json33
-rw-r--r--tools/eslint/node_modules/is-path-cwd/package.json1
-rw-r--r--tools/eslint/node_modules/is-path-in-cwd/package.json3
-rw-r--r--tools/eslint/node_modules/is-path-inside/package.json1
-rw-r--r--tools/eslint/node_modules/is-property/package.json1
-rw-r--r--tools/eslint/node_modules/is-resolvable/package.json1
-rw-r--r--tools/eslint/node_modules/isarray/package.json1
-rw-r--r--tools/eslint/node_modules/js-yaml/package.json1
-rw-r--r--tools/eslint/node_modules/json-stable-stringify/package.json2
-rw-r--r--tools/eslint/node_modules/jsonify/package.json1
-rw-r--r--tools/eslint/node_modules/jsonpointer/LICENSE.md (renamed from tools/eslint/node_modules/bluebird/LICENSE)4
-rw-r--r--tools/eslint/node_modules/jsonpointer/README.md27
-rw-r--r--tools/eslint/node_modules/jsonpointer/benchmark.js56
-rw-r--r--tools/eslint/node_modules/jsonpointer/jsonpointer.js129
-rw-r--r--tools/eslint/node_modules/jsonpointer/package.json55
-rw-r--r--tools/eslint/node_modules/levn/package.json1
-rw-r--r--tools/eslint/node_modules/lodash/README.md23
-rw-r--r--tools/eslint/node_modules/lodash/_Stack.js3
-rw-r--r--tools/eslint/node_modules/lodash/_arrayLikeKeys.js30
-rw-r--r--tools/eslint/node_modules/lodash/_arraySample.js15
-rw-r--r--tools/eslint/node_modules/lodash/_arraySampleSize.js17
-rw-r--r--tools/eslint/node_modules/lodash/_arrayShuffle.js15
-rw-r--r--tools/eslint/node_modules/lodash/_assignMergeValue.js7
-rw-r--r--tools/eslint/node_modules/lodash/_assignValue.js5
-rw-r--r--tools/eslint/node_modules/lodash/_baseAssignValue.js25
-rw-r--r--tools/eslint/node_modules/lodash/_baseClone.js8
-rw-r--r--tools/eslint/node_modules/lodash/_baseCreate.js20
-rw-r--r--tools/eslint/node_modules/lodash/_baseDelay.js2
-rw-r--r--tools/eslint/node_modules/lodash/_baseIndexOf.js18
-rw-r--r--tools/eslint/node_modules/lodash/_baseIsArguments.js27
-rw-r--r--tools/eslint/node_modules/lodash/_baseIsEqualDeep.js13
-rw-r--r--tools/eslint/node_modules/lodash/_baseIsNative.js3
-rw-r--r--tools/eslint/node_modules/lodash/_baseMerge.js17
-rw-r--r--tools/eslint/node_modules/lodash/_baseMergeDeep.js29
-rw-r--r--tools/eslint/node_modules/lodash/_basePickBy.js4
-rw-r--r--tools/eslint/node_modules/lodash/_baseRest.js26
-rw-r--r--tools/eslint/node_modules/lodash/_baseSample.js15
-rw-r--r--tools/eslint/node_modules/lodash/_baseSampleSize.js18
-rw-r--r--tools/eslint/node_modules/lodash/_baseSetData.js2
-rw-r--r--tools/eslint/node_modules/lodash/_baseSetToString.js22
-rw-r--r--tools/eslint/node_modules/lodash/_baseShuffle.js15
-rw-r--r--tools/eslint/node_modules/lodash/_baseToString.js6
-rw-r--r--tools/eslint/node_modules/lodash/_cacheHas.js2
-rw-r--r--tools/eslint/node_modules/lodash/_castRest.js14
-rw-r--r--tools/eslint/node_modules/lodash/_cloneBuffer.js19
-rw-r--r--tools/eslint/node_modules/lodash/_copyObject.js13
-rw-r--r--tools/eslint/node_modules/lodash/_countHolders.js2
-rw-r--r--tools/eslint/node_modules/lodash/_createFlow.js9
-rw-r--r--tools/eslint/node_modules/lodash/_createOver.js10
-rw-r--r--tools/eslint/node_modules/lodash/_createWrap.js2
-rw-r--r--tools/eslint/node_modules/lodash/_deburrLetter.js2
-rw-r--r--tools/eslint/node_modules/lodash/_defineProperty.js10
-rw-r--r--tools/eslint/node_modules/lodash/_equalArrays.js7
-rw-r--r--tools/eslint/node_modules/lodash/_escapeHtmlChar.js3
-rw-r--r--tools/eslint/node_modules/lodash/_flatRest.js16
-rw-r--r--tools/eslint/node_modules/lodash/_getTag.js3
-rw-r--r--tools/eslint/node_modules/lodash/_hasPath.js10
-rw-r--r--tools/eslint/node_modules/lodash/_hashClear.js1
-rw-r--r--tools/eslint/node_modules/lodash/_hashDelete.js4
-rw-r--r--tools/eslint/node_modules/lodash/_hashSet.js1
-rw-r--r--tools/eslint/node_modules/lodash/_insertWrapDetails.js8
-rw-r--r--tools/eslint/node_modules/lodash/_isHostObject.js20
-rw-r--r--tools/eslint/node_modules/lodash/_listCacheClear.js1
-rw-r--r--tools/eslint/node_modules/lodash/_listCacheDelete.js1
-rw-r--r--tools/eslint/node_modules/lodash/_listCacheSet.js1
-rw-r--r--tools/eslint/node_modules/lodash/_mapCacheClear.js1
-rw-r--r--tools/eslint/node_modules/lodash/_mapCacheDelete.js4
-rw-r--r--tools/eslint/node_modules/lodash/_mapCacheSet.js6
-rw-r--r--tools/eslint/node_modules/lodash/_memoizeCapped.js26
-rw-r--r--tools/eslint/node_modules/lodash/_overRest.js36
-rw-r--r--tools/eslint/node_modules/lodash/_setData.js26
-rw-r--r--tools/eslint/node_modules/lodash/_setToString.js14
-rw-r--r--tools/eslint/node_modules/lodash/_setWrapToString.js16
-rw-r--r--tools/eslint/node_modules/lodash/_shortOut.js37
-rw-r--r--tools/eslint/node_modules/lodash/_shuffleSelf.js28
-rw-r--r--tools/eslint/node_modules/lodash/_stackClear.js1
-rw-r--r--tools/eslint/node_modules/lodash/_stackDelete.js6
-rw-r--r--tools/eslint/node_modules/lodash/_stackSet.js12
-rw-r--r--tools/eslint/node_modules/lodash/_strictIndexOf.js23
-rw-r--r--tools/eslint/node_modules/lodash/_strictLastIndexOf.js21
-rw-r--r--tools/eslint/node_modules/lodash/_stringToPath.js4
-rw-r--r--tools/eslint/node_modules/lodash/_unescapeHtmlChar.js3
-rw-r--r--tools/eslint/node_modules/lodash/_unicodeSize.js2
-rw-r--r--tools/eslint/node_modules/lodash/after.js2
-rw-r--r--tools/eslint/node_modules/lodash/assign.js8
-rw-r--r--tools/eslint/node_modules/lodash/at.js7
-rw-r--r--tools/eslint/node_modules/lodash/before.js2
-rw-r--r--tools/eslint/node_modules/lodash/bindAll.js10
-rw-r--r--tools/eslint/node_modules/lodash/concat.js11
-rw-r--r--tools/eslint/node_modules/lodash/cond.js2
-rw-r--r--tools/eslint/node_modules/lodash/core.js239
-rw-r--r--tools/eslint/node_modules/lodash/core.min.js47
-rw-r--r--tools/eslint/node_modules/lodash/countBy.js9
-rw-r--r--tools/eslint/node_modules/lodash/debounce.js2
-rw-r--r--tools/eslint/node_modules/lodash/defer.js2
-rw-r--r--tools/eslint/node_modules/lodash/difference.js4
-rw-r--r--tools/eslint/node_modules/lodash/differenceBy.js5
-rw-r--r--tools/eslint/node_modules/lodash/differenceWith.js6
-rw-r--r--tools/eslint/node_modules/lodash/escape.js12
-rw-r--r--tools/eslint/node_modules/lodash/forEach.js2
-rw-r--r--tools/eslint/node_modules/lodash/fp/_convertBrowser.js2
-rw-r--r--tools/eslint/node_modules/lodash/fp/_mapping.js11
-rw-r--r--tools/eslint/node_modules/lodash/fp/rangeStep.js5
-rw-r--r--tools/eslint/node_modules/lodash/fp/rangeStepRight.js5
-rw-r--r--tools/eslint/node_modules/lodash/groupBy.js5
-rw-r--r--tools/eslint/node_modules/lodash/intersection.js4
-rw-r--r--tools/eslint/node_modules/lodash/intersectionBy.js5
-rw-r--r--tools/eslint/node_modules/lodash/intersectionWith.js6
-rw-r--r--tools/eslint/node_modules/lodash/isArguments.js22
-rw-r--r--tools/eslint/node_modules/lodash/isElement.js2
-rw-r--r--tools/eslint/node_modules/lodash/isEmpty.js19
-rw-r--r--tools/eslint/node_modules/lodash/isFunction.js7
-rw-r--r--tools/eslint/node_modules/lodash/isNative.js5
-rw-r--r--tools/eslint/node_modules/lodash/isObject.js2
-rw-r--r--tools/eslint/node_modules/lodash/isObjectLike.js2
-rw-r--r--tools/eslint/node_modules/lodash/isPlainObject.js4
-rw-r--r--tools/eslint/node_modules/lodash/keyBy.js5
-rw-r--r--tools/eslint/node_modules/lodash/lastIndexOf.js19
-rw-r--r--tools/eslint/node_modules/lodash/lodash.js923
-rw-r--r--tools/eslint/node_modules/lodash/lodash.min.js250
-rw-r--r--tools/eslint/node_modules/lodash/mapKeys.js5
-rw-r--r--tools/eslint/node_modules/lodash/mapValues.js5
-rw-r--r--tools/eslint/node_modules/lodash/memoize.js6
-rw-r--r--tools/eslint/node_modules/lodash/mergeWith.js2
-rw-r--r--tools/eslint/node_modules/lodash/negate.js2
-rw-r--r--tools/eslint/node_modules/lodash/omit.js7
-rw-r--r--tools/eslint/node_modules/lodash/overArgs.js3
-rw-r--r--tools/eslint/node_modules/lodash/package.json15
-rw-r--r--tools/eslint/node_modules/lodash/parseInt.js10
-rw-r--r--tools/eslint/node_modules/lodash/pick.js7
-rw-r--r--tools/eslint/node_modules/lodash/pullAt.js7
-rw-r--r--tools/eslint/node_modules/lodash/rearg.js9
-rw-r--r--tools/eslint/node_modules/lodash/rest.js2
-rw-r--r--tools/eslint/node_modules/lodash/sample.js12
-rw-r--r--tools/eslint/node_modules/lodash/sampleSize.js24
-rw-r--r--tools/eslint/node_modules/lodash/shuffle.js10
-rw-r--r--tools/eslint/node_modules/lodash/sortBy.js7
-rw-r--r--tools/eslint/node_modules/lodash/spread.js2
-rw-r--r--tools/eslint/node_modules/lodash/template.js3
-rw-r--r--tools/eslint/node_modules/lodash/throttle.js2
-rw-r--r--tools/eslint/node_modules/lodash/toString.js4
-rw-r--r--tools/eslint/node_modules/lodash/transform.js24
-rw-r--r--tools/eslint/node_modules/lodash/unescape.js4
-rw-r--r--tools/eslint/node_modules/lodash/uniq.js5
-rw-r--r--tools/eslint/node_modules/lodash/uniqBy.js4
-rw-r--r--tools/eslint/node_modules/lodash/uniqWith.js5
-rw-r--r--tools/eslint/node_modules/lodash/wrapperAt.js6
-rw-r--r--tools/eslint/node_modules/lodash/xorBy.js5
-rw-r--r--tools/eslint/node_modules/lodash/xorWith.js5
-rw-r--r--tools/eslint/node_modules/minimatch/package.json1
-rw-r--r--tools/eslint/node_modules/minimist/package.json1
-rw-r--r--tools/eslint/node_modules/mkdirp/package.json1
-rw-r--r--tools/eslint/node_modules/ms/package.json1
-rw-r--r--tools/eslint/node_modules/mute-stream/package.json1
-rw-r--r--tools/eslint/node_modules/natural-compare/package.json1
-rw-r--r--tools/eslint/node_modules/number-is-nan/package.json31
-rw-r--r--tools/eslint/node_modules/number-is-nan/readme.md4
-rw-r--r--tools/eslint/node_modules/object-assign/package.json1
-rw-r--r--tools/eslint/node_modules/once/package.json1
-rw-r--r--tools/eslint/node_modules/onetime/package.json1
-rw-r--r--tools/eslint/node_modules/optionator/README.md2
-rw-r--r--tools/eslint/node_modules/optionator/lib/coerce.js367
-rw-r--r--tools/eslint/node_modules/optionator/lib/help.js2
-rw-r--r--tools/eslint/node_modules/optionator/lib/index.js20
-rw-r--r--tools/eslint/node_modules/optionator/lib/parse-type.js143
-rw-r--r--tools/eslint/node_modules/optionator/lib/util.js4
-rw-r--r--tools/eslint/node_modules/optionator/package.json45
-rw-r--r--tools/eslint/node_modules/os-homedir/package.json36
-rw-r--r--tools/eslint/node_modules/os-homedir/readme.md10
-rw-r--r--tools/eslint/node_modules/path-is-absolute/index.js10
-rw-r--r--tools/eslint/node_modules/path-is-absolute/package.json31
-rw-r--r--tools/eslint/node_modules/path-is-absolute/readme.md30
-rw-r--r--tools/eslint/node_modules/path-is-inside/LICENSE.txt30
-rw-r--r--tools/eslint/node_modules/path-is-inside/README.md35
-rw-r--r--tools/eslint/node_modules/path-is-inside/package.json38
-rw-r--r--tools/eslint/node_modules/pify/package.json1
-rw-r--r--tools/eslint/node_modules/pinkie-promise/package.json1
-rw-r--r--tools/eslint/node_modules/pinkie/package.json1
-rw-r--r--tools/eslint/node_modules/pluralize/package.json1
-rw-r--r--tools/eslint/node_modules/prelude-ls/package.json3
-rw-r--r--tools/eslint/node_modules/process-nextick-args/package.json1
-rw-r--r--tools/eslint/node_modules/progress/package.json1
-rw-r--r--tools/eslint/node_modules/readable-stream/package.json1
-rw-r--r--tools/eslint/node_modules/readline2/package.json1
-rw-r--r--tools/eslint/node_modules/require-uncached/package.json1
-rw-r--r--tools/eslint/node_modules/resolve-from/package.json1
-rw-r--r--tools/eslint/node_modules/restore-cursor/package.json1
-rw-r--r--tools/eslint/node_modules/rimraf/package.json1
-rw-r--r--tools/eslint/node_modules/run-async/package.json1
-rw-r--r--tools/eslint/node_modules/rx-lite/package.json1
-rw-r--r--tools/eslint/node_modules/shelljs/package.json1
-rw-r--r--tools/eslint/node_modules/slice-ansi/package.json1
-rw-r--r--tools/eslint/node_modules/sprintf-js/package.json1
-rw-r--r--tools/eslint/node_modules/string-width/package.json1
-rw-r--r--tools/eslint/node_modules/string_decoder/package.json1
-rw-r--r--tools/eslint/node_modules/strip-ansi/package.json4
-rw-r--r--tools/eslint/node_modules/strip-bom/package.json1
-rw-r--r--tools/eslint/node_modules/strip-json-comments/package.json1
-rw-r--r--tools/eslint/node_modules/supports-color/package.json1
-rw-r--r--tools/eslint/node_modules/table/dist/alignString.js115
-rw-r--r--tools/eslint/node_modules/table/dist/alignString.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/alignTableData.js44
-rw-r--r--tools/eslint/node_modules/table/dist/alignTableData.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/calculateCellHeight.js46
-rw-r--r--tools/eslint/node_modules/table/dist/calculateCellHeight.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/calculateCellWidthIndex.js20
-rw-r--r--tools/eslint/node_modules/table/dist/calculateCellWidthIndex.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/calculateMaximumColumnWidthIndex.js46
-rw-r--r--tools/eslint/node_modules/table/dist/calculateMaximumColumnWidthIndex.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/calculateRowHeightIndex.js67
-rw-r--r--tools/eslint/node_modules/table/dist/calculateRowHeightIndex.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/createStream.js170
-rw-r--r--tools/eslint/node_modules/table/dist/createStream.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/drawBorder.js80
-rw-r--r--tools/eslint/node_modules/table/dist/drawBorder.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/drawRow.js9
-rw-r--r--tools/eslint/node_modules/table/dist/drawRow.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/drawTable.js59
-rw-r--r--tools/eslint/node_modules/table/dist/drawTable.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/getBorderCharacters.js197
-rw-r--r--tools/eslint/node_modules/table/dist/getBorderCharacters.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/index.js3
-rw-r--r--tools/eslint/node_modules/table/dist/index.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/makeConfig.js106
-rw-r--r--tools/eslint/node_modules/table/dist/makeConfig.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/makeStreamConfig.js99
-rw-r--r--tools/eslint/node_modules/table/dist/makeStreamConfig.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js83
-rw-r--r--tools/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/padTableData.js30
-rw-r--r--tools/eslint/node_modules/table/dist/padTableData.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/schemas/config.json4
-rw-r--r--tools/eslint/node_modules/table/dist/schemas/streamConfig.json2
-rw-r--r--tools/eslint/node_modules/table/dist/stringifyTableData.js20
-rw-r--r--tools/eslint/node_modules/table/dist/stringifyTableData.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/table.js21
-rw-r--r--tools/eslint/node_modules/table/dist/table.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/truncateTableData.js30
-rw-r--r--tools/eslint/node_modules/table/dist/truncateTableData.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/validateConfig.js71
-rw-r--r--tools/eslint/node_modules/table/dist/validateConfig.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/validateStreamConfig.js2
-rw-r--r--tools/eslint/node_modules/table/dist/validateStreamConfig.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/validateTableData.js64
-rw-r--r--tools/eslint/node_modules/table/dist/validateTableData.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/wrapString.js29
-rw-r--r--tools/eslint/node_modules/table/dist/wrapString.js.map2
-rw-r--r--tools/eslint/node_modules/table/dist/wrapWord.js53
-rw-r--r--tools/eslint/node_modules/table/dist/wrapWord.js.map2
-rw-r--r--tools/eslint/node_modules/table/package.json52
-rw-r--r--tools/eslint/node_modules/text-table/package.json1
-rw-r--r--tools/eslint/node_modules/through/package.json1
-rw-r--r--tools/eslint/node_modules/tryit/package.json1
-rw-r--r--tools/eslint/node_modules/tv4/LICENSE.txt8
-rw-r--r--tools/eslint/node_modules/tv4/README.md468
-rw-r--r--tools/eslint/node_modules/tv4/lang/de.js47
-rw-r--r--tools/eslint/node_modules/tv4/lang/fr.js55
-rw-r--r--tools/eslint/node_modules/tv4/lang/nb.js56
-rwxr-xr-xtools/eslint/node_modules/tv4/lang/pl-PL.js55
-rw-r--r--tools/eslint/node_modules/tv4/lang/pt-PT.js55
-rw-r--r--tools/eslint/node_modules/tv4/lang/sv-SE.js55
-rw-r--r--tools/eslint/node_modules/tv4/lang/zh-CN.js55
-rw-r--r--tools/eslint/node_modules/tv4/package.json123
-rw-r--r--tools/eslint/node_modules/tv4/tv4.async-jquery.js34
-rw-r--r--tools/eslint/node_modules/tv4/tv4.js1677
-rw-r--r--tools/eslint/node_modules/type-check/package.json1
-rw-r--r--tools/eslint/node_modules/typedarray/package.json1
-rw-r--r--tools/eslint/node_modules/user-home/package.json1
-rw-r--r--tools/eslint/node_modules/util-deprecate/package.json1
-rw-r--r--tools/eslint/node_modules/wordwrap/package.json1
-rw-r--r--tools/eslint/node_modules/wrappy/package.json1
-rw-r--r--tools/eslint/node_modules/write/package.json1
-rw-r--r--tools/eslint/node_modules/xregexp/README.md221
-rw-r--r--tools/eslint/node_modules/xregexp/package.json96
-rw-r--r--tools/eslint/node_modules/xregexp/src/addons/build.js186
-rw-r--r--tools/eslint/node_modules/xregexp/src/addons/matchrecursive.js188
-rw-r--r--tools/eslint/node_modules/xregexp/src/addons/unicode-base.js227
-rw-r--r--tools/eslint/node_modules/xregexp/src/addons/unicode-blocks.js1076
-rw-r--r--tools/eslint/node_modules/xregexp/src/addons/unicode-categories.js236
-rw-r--r--tools/eslint/node_modules/xregexp/src/addons/unicode-properties.js106
-rw-r--r--tools/eslint/node_modules/xregexp/src/addons/unicode-scripts.js560
-rw-r--r--tools/eslint/node_modules/xregexp/src/index.js11
-rw-r--r--tools/eslint/node_modules/xregexp/src/xregexp.js1834
-rw-r--r--tools/eslint/node_modules/xtend/package.json1
-rw-r--r--tools/eslint/package.json23
645 files changed, 40460 insertions, 25116 deletions
diff --git a/tools/eslint/CHANGELOG.md b/tools/eslint/CHANGELOG.md
deleted file mode 100644
index 30c87e65c9..0000000000
--- a/tools/eslint/CHANGELOG.md
+++ /dev/null
@@ -1,3412 +0,0 @@
-v3.5.0 - September 9, 2016
-
-* 08fa538 Update: fix false negative of `arrow-spacing` (fixes #7079) (#7080) (Toru Nagashima)
-* cec65e3 Update: add fixer for no-floating-decimal (fixes #7070) (#7081) (not-an-aardvark)
-* 2a3f699 Fix: Column number for no-multiple-empty-lines (fixes #7086) (#7088) (Ian VanSchooten)
-* 6947299 Docs: Add info about closing accepted issues to docs (fixes #6979) (#7089) (Kai Cataldo)
-* d30157a Docs: Add link to awesome-eslint in integrations page (#7090) (Vitor Balocco)
-* 457be1b Docs: Update so issues are not required (fixes #7015) (#7072) (Nicholas C. Zakas)
-* d9513b7 Fix: Allow linting of .hidden files/folders (fixes #4828) (#6844) (Ian VanSchooten)
-* 6d97c18 New: `max-len`: `ignoreStrings`+`ignoreTemplateLiterals` (fixes #5805) (#7049) (Jordan Harband)
-* 538d258 Update: make no-implicit-coercion support autofixing. (fixes #7056) (#7061) (Eli White)
-* 883316d Update: add fixer for prefer-arrow-callback (fixes #7002) (#7004) (not-an-aardvark)
-* 7502eed Update: auto-fix for `comma-style` (fixes #6941) (#6957) (Gyandeep Singh)
-* 645dda5 Update: add fixer for dot-notation (fixes #7014) (#7054) (not-an-aardvark)
-* 2657846 Fix: `no-console` ignores user-defined console (fixes #7010) (#7058) (Toru Nagashima)
-* 656bb6e Update: add fixer for newline-before-return (fixes #5958) (#7050) (Vitor Balocco)
-* 1f995c3 Fix: no-implicit-coercion string concat false positive (fixes #7057) (#7060) (Kai Cataldo)
-* 6718749 Docs: Clarify that `es6` env also sets `ecmaVersion` to 6 (#7067) (Jérémie Astori)
-* e118728 Update: add fixer for wrap-regex (fixes #7013) (#7048) (not-an-aardvark)
-* f4fcd1e Update: add more `indent` options for functions (fixes #6052) (#7043) (not-an-aardvark)
-* 657eee5 Update: add fixer for new-parens (fixes #6994) (#7047) (not-an-aardvark)
-* ff19aa9 Update: improve `max-statements-per-line` message (fixes #6287) (#7044) (Jordan Harband)
-* 3960617 New: `prefer-numeric-literals` rule (fixes #6068) (#7029) (Annie Zhang)
-* fa760f9 Chore: no-regex-spaces uses internal rule message format (fixes #7052) (#7053) (Kevin Partington)
-* 22c7e09 Update: no-magic-numbers false negative on reassigned vars (fixes #4616) (#7028) (not-an-aardvark)
-* be29599 Update: Throw error if whitespace found in plugin name (fixes #6854) (#6960) (Jesse Ostrander)
-* 4063a79 Fix: Rule message placeholders can be inside braces (fixes #6988) (#7041) (Kevin Partington)
-* 52e8d9c Docs: Clean up sort-vars (#7045) (Matthew Dunsdon)
-* 4126f12 Chore: Rule messages use internal rule message format (fixes #6977) (#6989) (Kevin Partington)
-* 46cb690 New: `no-restricted-properties` rule (fixes #3218) (#7017) (Eli White)
-* 00b3042 Update: Pass file path to parse function (fixes #5344) (#7024) (Annie Zhang)
-* 3f13325 Docs: Add kaicataldo and JamesHenry to our teams (#7039) (alberto)
-* 8e77f16 Update: `new-parens` false negative (fixes #6997) (#6999) (Toru Nagashima)
-* 326f457 Docs: Add missing 'to' in no-restricted-modules (#7022) (Oskar Risberg)
-* 8277357 New: `line-comment-position` rule (fixes #6077) (#6953) (alberto)
-* c1f0d76 New: `lines-around-directive` rule (fixes #6069) (#6998) (Kai Cataldo)
-* 61f1de0 Docs: Fix typo in no-debugger (#7019) (Denis Ciccale)
-* 256c4a2 Fix: Allow separate mode option for multiline and align (fixes #6691) (#6991) (Annie Zhang)
-* a989a7c Docs: Declaring dependency on eslint in shared config (fixes #6617) (#6985) (alberto)
-* 6869c60 Docs: Fix minor typo in no-extra-parens doc (#6992) (Jérémie Astori)
-* 28f1619 Docs: Update the example of SwitchCase (#6981) (fish)
-
-v3.4.0 - August 26, 2016
-
-* c210510 Update: add fixer for no-extra-parens (fixes #6944) (#6950) (not-an-aardvark)
-* ca3d448 Fix: `prefer-const` false negative about `eslintUsed` (fixes #5837) (#6971) (Toru Nagashima)
-* 1153955 Docs: Draft of JSCS migration guide (refs #5859) (#6942) (Nicholas C. Zakas)
-* 3e522be Fix: false negative of `indent` with `else if` statements (fixes #6956) (#6965) (not-an-aardvark)
-* 2dfb290 Docs: Distinguish examples in rules under Stylistic Issues part 7 (#6760) (Kenneth Williams)
-* 3c710c9 Fix: rename "AirBnB" => "Airbnb" init choice (fixes #6969) (Harrison Shoff)
-* 7660b39 Fix: `object-curly-spacing` for type annotations (fixes #6940) (#6945) (Toru Nagashima)
-* 21ab784 New: do not remove non visited files from cache. (fixes #6780) (#6921) (Roy Riojas)
-* 3a1763c Fix: enable `@scope/plugin/ruleId`-style specifier (refs #6362) (#6939) (Toru Nagashima)
-* d6fd064 Update: Add never option to multiline-ternary (fixes #6751) (#6905) (Kai Cataldo)
-* 0d268f1 New: `symbol-description` rule (fixes #6778) (#6825) (Jarek Rencz)
-* a063d4e Fix: no-cond-assign within a function expression (fixes #6908) (#6909) (Patrick McElhaney)
-* 16db93a Build: Tag docs, publish release notes (fixes #6892) (#6934) (Nicholas C. Zakas)
-* 0cf1d55 Chore: Fix object-shorthand errors (fixes #6958) (#6959) (Kai Cataldo)
-* 8851ddd Fix: Improve pref of globbing by inheriting glob.GlobSync (fixes #6710) (#6783) (Kael Zhang)
-* cf2242c Update: `requireStringLiterals` option for `valid-typeof` (fixes #6698) (#6923) (not-an-aardvark)
-* 8561389 Fix: `no-trailing-spaces` wrong fixing (fixes #6933) (#6937) (Toru Nagashima)
-* 6a92be5 Docs: Update semantic versioning policy (#6935) (alberto)
-* a5189a6 New: `class-methods-use-this` rule (fixes #5139) (#6881) (Gyandeep Singh)
-* 1563808 Update: add support for ecmaVersion 20xx (fixes #6750) (#6907) (Kai Cataldo)
-* d8b770c Docs: Change rule descriptions for consistent casing (#6915) (Brandon Mills)
-* c676322 Chore: Use object-shorthand batch 3 (refs #6407) (#6914) (Kai Cataldo)
-
-v3.3.1 - August 15, 2016
-
-* a2f06be Build: optimize rule page title for small browser tabs (fixes #6888) (#6904) (Vitor Balocco)
-* 02a00d6 Docs: clarify rule details for no-template-curly-in-string (#6900) (not-an-aardvark)
-* b9b3446 Fix: sort-keys ignores destructuring patterns (fixes #6896) (#6899) (Kai Cataldo)
-* 3fe3a4f Docs: Update options in `object-shorthand` (#6898) (Grant Snodgrass)
-* cd09c96 Chore: Use object-shorthand batch 2 (refs #6407) (#6897) (Kai Cataldo)
-* 2841008 Chore: Use object-shorthand batch 1 (refs #6407) (#6893) (Kai Cataldo)
-
-v3.3.0 - August 12, 2016
-
-* 683ac56 Build: Add CI release scripts (fixes #6884) (#6885) (Nicholas C. Zakas)
-* ebf8441 Update: `prefer-rest-params` relax for member accesses (fixes #5990) (#6871) (Toru Nagashima)
-* df01c4f Update: Add regex support for exceptions (fixes #5187) (#6883) (Annie Zhang)
-* 055742c Fix: `no-dupe-keys` type errors (fixes #6886) (#6889) (Toru Nagashima)
-* e456fd3 New: `sort-keys` rule (fixes #6076) (#6800) (Toru Nagashima)
-* 3e879fc Update: Rule "eqeqeq" to have more specific null handling (fixes #6543) (#6849) (Simon Sturmer)
-* e8cb7f9 Chore: use eslint-plugin-node (refs #6407) (#6862) (Toru Nagashima)
-* e37bbd8 Docs: Remove duplicate statement (#6878) (Richard Käll)
-* 11395ca Fix: `no-dupe-keys` false negative (fixes #6801) (#6863) (Toru Nagashima)
-* 1ecd2a3 Update: improve error message in `no-control-regex` (#6839) (Jordan Harband)
-* d610d6c Update: make `max-lines` report the actual number of lines (fixes #6766) (#6764) (Jarek Rencz)
-* b256c50 Chore: Fix glob for core js files for lint (fixes #6870) (#6872) (Gyandeep Singh)
-* f8ab8f1 New: func-call-spacing rule (fixes #6080) (#6749) (Brandon Mills)
-* be68f0b New: no-template-curly-in-string rule (fixes #6186) (#6767) (Jeroen Engels)
-* 80789ab Chore: don't throw if rule is in old format (fixes #6848) (#6850) (Vitor Balocco)
-* d47c505 Fix: `newline-after-var` false positive (fixes #6834) (#6847) (Toru Nagashima)
-* bf0afcb Update: validate void operator in no-constant-condition (fixes #5726) (#6837) (Vitor Balocco)
-* 5ef839e New: Add consistent and ..-as-needed to object-shorthand (fixes #5438) (#5439) (Martijn de Haan)
-* 7e1bf01 Fix: update peerDependencies of airbnb option for `--init` (fixes #6843) (#6846) (Vitor Balocco)
-* 8581f4f Fix: `no-invalid-this` false positive (fixes #6824) (#6827) (Toru Nagashima)
-* 90f78f4 Update: add `props` option to `no-self-assign` rule (fixes #6718) (#6721) (Toru Nagashima)
-* 30d71d6 Update: 'requireForBlockBody' modifier for 'arrow-parens' (fixes #6557) (#6558) (Nicolas Froidure)
-* cdded07 Chore: use native `Object.assign` (refs #6407) (#6832) (Gyandeep Singh)
-* 579ec49 Chore: Add link to rule change guidelines in "needs info" template (fixes #6829) (#6831) (Kevin Partington)
-* 117e7aa Docs: Remove incorrect "constructor" statement from `no-new-symbol` docs (#6830) (Jarek Rencz)
-* aef18b4 New: `no-unsafe-negation` rule (fixes #2716) (#6789) (Toru Nagashima)
-* d94e945 Docs: Update Getting Started w/ Readme installation instructions (#6823) (Kai Cataldo)
-* dfbc112 Upgrade: proxyquire to 1.7.10 (fixes #6821) (#6822) (alberto)
-* 4c5e911 Chore: enable `prefer-const` and apply it to our codebase (refs #6407) (#6805) (Toru Nagashima)
-* e524d16 Update: camelcase rule fix for import declarations (fixes #6755) (#6784) (Lorenzo Zottar)
-* 8f3509d Update: make `eslint:all` excluding deprecated rules (fixes #6734) (#6756) (Toru Nagashima)
-* 2b17459 New: `no-global-assign` rule (fixes #6586) (#6746) (alberto)
-
-v3.2.2 - August 1, 2016
-
-* 510ce4b Upgrade: file-entry-cache@^1.3.1 (fixes #6816, refs #6780) (#6819) (alberto)
-* 46b14cd Fix: ignore MemberExpression in VariableDeclarators (fixes #6795) (#6815) (Nicholas C. Zakas)
-
-v3.2.1 - August 1, 2016
-
-* 584577a Build: Pin file-entry-cache to avoid licence issue (refs #6816) (#6818) (alberto)
-* 38d0d23 Docs: clarify minor releases and suggest using `~ to version (#6804) (Henry Zhu)
-* 4ca809e Fix: Normalizes messages so all end with a period (fixes #6762) (#6807) (Patrick McElhaney)
-* c7488ac Fix: Make MemberExpression option opt-in (fixes #6797) (#6798) (Rich Trott)
-* 715e8fa Docs: Update issue closing policy (fixes #6765) (#6808) (Nicholas C. Zakas)
-* 288f7bf Build: Fix site generation (fixes #6791) (#6793) (Nicholas C. Zakas)
-* 261a9f3 Docs: Update JSCS status in README (#6802) (alberto)
-* 5ae0887 Docs: Update no-void.md (#6799) (Daniel Hritzkiv)
-
-v3.2.0 - July 29, 2016
-
-* 2438ee2 Upgrade: Update markdownlint dependency to 0.2.0 (fixes #6781) (#6782) (David Anson)
-* 4fc0018 Chore: dogfooding `no-var` rule and remove `var`s (refs #6407) (#6757) (Toru Nagashima)
-* b22eb5c New: `no-tabs` rule (fixes #6079) (#6772) (Gyandeep Singh)
-* ddea63a Chore: Updated no-control-regex tests to cover all cases (fixes #6438) (#6752) (Efe Gürkan YALAMAN)
-* 1025772 Docs: Add plugin example to disabling with comments guide (fixes #6742) (#6747) (Brandon Mills)
-* 628aae4 Docs: fix inconsistent spacing inside block comment (#6768) (Brian Jacobel)
-* 2983c32 Docs: Add options to func-names config comments (#6748) (Brandon Mills)
-* 2f94443 Docs: fix wrong path (#6763) (molee1905)
-* 6f3faa4 Revert "Build: Remove support for Node v5 (fixes #6743)" (#6758) (Nicholas C. Zakas)
-* 99dfd1c Docs: fix grammar issue in rule-changes page (#6761) (Vitor Balocco)
-* e825458 Fix: Rule no-unused-vars had missing period (fixes #6738) (#6739) (Brian Mock)
-* 71ae64c Docs: Clarify cache file deletion (fixes #4943) (#6712) (Nicholas C. Zakas)
-* 26c85dd Update: merge warnings of consecutive unreachable nodes (fixes #6583) (#6729) (Toru Nagashima)
-* 106e40b Fix: Correct grammar in object-curly-newline reports (fixes #6725) (#6728) (Vitor Balocco)
-* e00754c Chore: Dogfooding ES6 rules (refs #6407) (#6735) (alberto)
-* 181b26a Build: Remove support for Node v5 (fixes #6743) (#6744) (alberto)
-* 5320a6c Update: `no-use-before-define` false negative on for-in/of (fixes #6699) (#6719) (Toru Nagashima)
-* a2090cb Fix: space-infix-ops doesn't fail for type annotations(fixes #5211) (#6723) (Nicholas C. Zakas)
-* 9c36ecf Docs: Add @vitorbal and @platinumazure to development team (Ilya Volodin)
-* e09d1b8 Docs: describe all RuleTester options (fixes #4810, fixes #6709) (#6711) (Nicholas C. Zakas)
-* a157f47 Chore: Update CLIEngine option desc (fixes #5179) (#6713) (Nicholas C. Zakas)
-* a0727f9 Chore: fix `.gitignore` for vscode (refs #6383) (#6720) (Toru Nagashima)
-* 75d2d43 Docs: Clarify Closure type hint expectation (fixes #5231) (#6714) (Nicholas C. Zakas)
-* 95ea25a Update: Check indentation of multi-line chained properties (refs #1801) (#5940) (Rich Trott)
-* e7b1e1c Docs: Edit issue/PR waiting period docs (fixes #6009) (#6715) (Nicholas C. Zakas)
-* 053aa0c Update: Added 'allowSuper' option to `no-underscore-dangle` (fixes #6355) (#6662) (peteward44)
-* 8929045 Build: Automatically generate rule index (refs #2860) (#6658) (Ilya Volodin)
-* f916ae5 Docs: Fix multiline-ternary typos (#6704) (Cédric Malard)
-* c64b0c2 Chore: First ES6 refactoring (refs #6407) (#6570) (Nicholas C. Zakas)
-
-v3.1.1 - July 18, 2016
-
-* 565e584 Fix: `eslint:all` causes regression in 3.1.0 (fixes #6687) (#6696) (alberto)
-* cb90359 Fix: Allow named recursive functions (fixes #6616) (#6667) (alberto)
-* 3f206dd Fix: `balanced` false positive in `spaced-comment` (fixes #6689) (#6692) (Grant Snodgrass)
-* 57f1676 Docs: Add missing brackets from code examples (#6700) (Plusb Preco)
-* 124f066 Chore: Remove fixable key from multiline-ternary metadata (fixes #6683) (#6688) (Kai Cataldo)
-* 9f96086 Fix: Escape control characters in XML. (fixes #6673) (#6672) (George Chung)
-
-v3.1.0 - July 15, 2016
-
-* e8f8c6c Fix: incorrect exitCode when eslint is called with --stdin (fixes #6677) (#6682) (Steven Humphrey)
-* 38639bf Update: make `no-var` fixable (fixes #6639) (#6644) (Toru Nagashima)
-* dfc20e9 Fix: `no-unused-vars` false positive in loop (fixes #6646) (#6649) (Toru Nagashima)
-* 2ba75d5 Update: relax outerIIFEBody definition (fixes #6613) (#6653) (Stephen E. Baker)
-* 421e4bf Chore: combine multiple RegEx replaces with one (fixes #6669) (#6661) (Sakthipriyan Vairamani)
-* 089ee2c Docs: fix typos,wrong path,backticks (#6663) (molee1905)
-* ef827d2 Docs: Add another pre-commit hook to integrations (#6666) (David Alan Hjelle)
-* a343b3c Docs: Fix option typo in no-underscore-dangle (Fixes #6674) (#6675) (Luke Page)
-* 5985eb2 Chore: add internal rule that validates meta property (fixes #6383) (#6608) (Vitor Balocco)
-* 4adb15f Update: Add `balanced` option to `spaced-comment` (fixes #4133) (#6575) (Annie Zhang)
-* 1b13c25 Docs: fix incorrect example being mark as correct (#6660) (David Björklund)
-* a8b4e40 Fix: Install required eslint plugin for "standard" guide (fixes #6656) (#6657) (Feross Aboukhadijeh)
-* 720686b New: `endLine` and `endColumn` of the lint result. (refs #3307) (#6640) (Toru Nagashima)
-* 54faa46 Docs: Small tweaks to CLI documentation (fixes #6627) (#6642) (Kevin Partington)
-* e108850 Docs: Added examples and structure to `padded-blocks` (fixes #6628) (#6643) (alberto)
-* 350e1c0 Docs: Typo (#6650) (Peter Rood)
-* b837c92 Docs: Correct a term in max-len.md (fixes #6637) (#6641) (Vse Mozhet Byt)
-* baeb313 Fix: Warning behavior for executeOnText (fixes #6611) (#6632) (Nicholas C. Zakas)
-* e6004be Chore: Enable preferType in valid-jsdoc (refs #5188) (#6634) (Nicholas C. Zakas)
-* ca323cf Fix: Use default assertion messages (fixes #6532) (#6615) (Dmitrii Abramov)
-* 2bdf22c Fix: Do not throw exception if baseConfig is provided (fixes #6605) (#6625) (Kevin Partington)
-* e42cacb Upgrade: mock-fs to 3.10, fixes for Node 6.3 (fixes #6621) (#6624) (Tim Schaub)
-* 8a263ae New: multiline-ternary rule (fixes #6066) (#6590) (Kai Cataldo)
-* e951303 Update: Adding new `key-spacing` option (fixes #5613) (#5907) (Kyle Mendes)
-* 10c3e91 Docs: Remove reference from 3.0.0 migration guide (refs #6605) (#6618) (Kevin Partington)
-* 5010694 Docs: Removed non-existing resource (#6609) (Moritz Kröger)
-* 6d40d85 Docs: Note that PR requires ACCEPTED issue (refs #6568) (#6604) (Patrick McElhaney)
-
-v3.0.1 - July 5, 2016
-
-* 27700cf Fix: `no-unused-vars` false positive around callback (fixes #6576) (#6579) (Toru Nagashima)
-* 124d8a3 Docs: Pull request template (#6568) (Nicholas C. Zakas)
-* e9a2ed9 Docs: Fix rules\id-length exceptions typos (fixes #6397) (#6593) (GramParallelo)
-* a2cfa1b Fix: Make outerIIFEBody work correctly (fixes #6585) (#6596) (Nicholas C. Zakas)
-* 9c451a2 Docs: Use string severity in example (#6601) (Kenneth Williams)
-* 8308c0b Chore: remove path-is-absolute in favor of the built-in (fixes #6598) (#6600) (shinnn)
-* 7a63717 Docs: Add missing pull request step (fixes #6595) (#6597) (Nicholas C. Zakas)
-* de3ed84 Fix: make `no-unused-vars` ignore for-in (fixes #2342) (#6126) (Oleg Gaidarenko)
-* 6ef2cbe Fix: strip Unicode BOM of config files (fixes #6556) (#6580) (Toru Nagashima)
-* ee7fcfa Docs: Correct type of `outerIIFEBody` in `indent` (fixes #6581) (#6584) (alberto)
-* 25fc7b7 Fix: false negative of `max-len` (fixes #6564) (#6565) (not-an-aardvark)
-* f6b8452 Docs: Distinguish examples in rules under Stylistic Issues part 6 (#6567) (Kenneth Williams)
-
-v3.0.0 - July 1, 2016
-
-* 66de9d8 Docs: Update installation instructions on README (#6569) (Nicholas C. Zakas)
-* dc5b78b Breaking: Add `require-yield` rule to `eslint:recommended` (fixes #6550) (#6554) (Gyandeep Singh)
-* 7988427 Fix: lib/config.js tests pass if personal config exists (fixes #6559) (#6566) (Kevin Partington)
-* 4c05967 Docs: Update rule docs for new format (fixes #5417) (#6551) (Nicholas C. Zakas)
-* 70da5a8 Docs: Correct link to rules page (#fixes 6553) (#6561) (alberto)
-* e2b2030 Update: Check RegExp strings for `no-regex-spaces` (fixes #3586) (#6379) (Jackson Ray Hamilton)
-* 397e51b Update: Implement outerIIFEBody for indent rule (fixes #6259) (#6382) (David Shepherd)
-* 666da7c Docs: 3.0.0 migration guide (#6521) (Nicholas C. Zakas)
-* b9bf8fb Docs: Update Governance Policy (fixes #6452) (#6522) (Nicholas C. Zakas)
-* 1290657 Update: `no-unused-vars` ignores read it modifies itself (fixes #6348) (#6535) (Toru Nagashima)
-* d601f6b Fix: Delete cache only when executing on files (fixes #6459) (#6540) (Kai Cataldo)
-* e0d4b19 Breaking: Error thrown/printed if no config found (fixes #5987) (#6538) (Kevin Partington)
-* 18663d4 Fix: false negative of `no-useless-rename` (fixes #6502) (#6506) (Toru Nagashima)
-* 0a7936d Update: Add fixer for prefer-const (fixes #6448) (#6486) (Nick Heiner)
-* c60341f Chore: Update index and `meta` for `"eslint:recommended"` (refs #6403) (#6539) (Mark Pedrotti)
-* 73da28d Better wording for the error reported by the rule "no-else-return" #6411 (#6413) (Olivier Thomann)
-* e06a5b5 Update: Add fixer for arrow-parens (fixes #4766) (#6501) (madmed88)
-* 5f8f3e8 Docs: Remove Box as a sponsor (#6529) (Nicholas C. Zakas)
-* 7dfe0ad Docs: fix max-lines samples (fixes #6516) (#6515) (Dmitriy Shekhovtsov)
-* fa05119 Breaking: Update eslint:recommended (fixes #6403) (#6509) (Nicholas C. Zakas)
-* e96177b Docs: Add "Proposing a Rule Change" link to CONTRIBUTING.md (#6511) (Kevin Partington)
-* bea9096 Docs: Update pull request steps (fixes #6474) (#6510) (Nicholas C. Zakas)
-* 7bcf6e0 Docs: Consistent example headings & text pt3 (refs #5446) (#6492) (Guy Fraser)
-* 1a328d9 Docs: Consistent example headings & text pt4 (refs #5446) (#6493) (Guy Fraser)
-* ff5765e Docs: Consistent example headings & text pt2 (refs #5446)(#6491) (Guy Fraser)
-* 01384fa Docs: Fixing typos (refs #5446)(#6494) (Guy Fraser)
-* 4343ae8 Fix: false negative of `object-shorthand` (fixes #6429) (#6434) (Toru Nagashima)
-* b7d8c7d Docs: more accurate yoda-speak (#6497) (Tony Lukasavage)
-* 3b0ab0d Fix: add warnIgnored flag to CLIEngine.executeOnText (fixes #6302) (#6305) (Robert Levy)
-* c2c6cec Docs: Mark object-shorthand as fixable. (#6485) (Nick Heiner)
-* 5668236 Fix: Allow objectsInObjects exception when destructuring (fixes #6469) (#6470) (Adam Renklint)
-* 17ac0ae Fix: `strict` rule reports a syntax error for ES2016 (fixes #6405) (#6464) (Toru Nagashima)
-* 4545123 Docs: Rephrase documentation for `no-duplicate-imports` (#6463) (Simen Bekkhus)
-* 1b133e3 Docs: improve `no-native-reassign` and specifying globals (fixes #5358) (#6462) (Toru Nagashima)
-* b179373 Chore: Remove dead code in excuteOnFiles (fixes #6467) (#6466) (Andrew Hutchings)
-* 18fbc4b Chore: Simplify eslint process exit code (fixes #6368) (#6371) (alberto)
-* 58542e4 Breaking: Drop support for node < 4 (fixes #4483) (#6401) (alberto)
-* f50657e Breaking: use default for complexity in eslint:recommended (fixes #6021) (#6410) (alberto)
-* 3e690fb Fix: Exit init early if guide is chosen w/ no package.json (fixes #6476) (#6478) (Kai Cataldo)
-
-v2.13.1 - June 20, 2016
-
-* 434de7f Fix: wrong baseDir (fixes #6450) (#6457) (Toru Nagashima)
-* 3c9ce09 Fix: Keep indentation when fixing `padded-blocks` "never" (fixes #6454) (#6456) (Ed Lee)
-* a9d4cb2 Docs: Fix typo in max-params examples (#6471) (J. William Ashton)
-* 1e185b9 Fix: no-multiple-empty-lines errors when no line breaks (fixes #6449) (#6451) (strawbrary)
-
-v2.13.0 - June 17, 2016
-
-* cf223dd Fix: add test for a syntax error (fixes #6013) (#6378) (Toru Nagashima)
-* da30cf9 Update: Add fixer for object-shorthand (fixes #6412) (#6418) (Nick Heiner)
-* 2cd90eb Chore: Fix rule meta description inconsistencies (refs #5417) (#6422) (Mark Pedrotti)
-* d798b2c Added quotes around "classes" option key (#6441) (Guy Fraser)
-* 852b6df Docs: Delete empty table of links from Code Path Analysis (#6423) (Mark Pedrotti)
-* 5e9117e Chore: sort rules in eslint.json (fixes #6425) (#6426) (alberto)
-* c2b5277 Docs: Add gitter chat link to Reporting Bugs (#6430) (Mark Pedrotti)
-* 1316db0 Update: Add `never` option for `func-names` (fixes #6059) (#6392) (alberto)
-* 1c123e2 Update: Add autofix for `padded-blocks` (fixes #6320) (#6393) (alberto)
-* 8ec89c8 Fix: `--print-config` return config inside subdir (fixes #6329) (#6385) (alberto)
-* 4f73240 Fix: `object-curly-newline` multiline with comments (fixes #6381) (#6396) (Toru Nagashima)
-* 77697a7 Chore: Fake config hierarchy fixtures (fixes #6206) (#6402) (Gyandeep Singh)
-* 73a9a6d Docs: Fix links in Configuring ESLint (#6421) (Mark Pedrotti)
-* ed84c4c Fix: improve `newline-per-chained-call` message (fixes #6340) (#6360) (Toru Nagashima)
-* 9ea4e44 Docs: Update parser reference to `espree` instead of `esprima` (#6404) (alberto)
-* 7f57467 Docs: Make `fix` param clearer (fixes #6366) (#6367) (Nick Heiner)
-* fb49c7f Fix: nested `extends` with relative path (fixes #6358) (#6359) (Toru Nagashima)
-* 5122f73 Update: no-multiple-empty-lines fixer (fixes #6225) (#6226) (Ruurd Moelker)
-* 0e7ce72 Docs: Fix rest-spread-spacing's name (#6365) (cody)
-* cfdd524 Fix: allow semi as braceless body of statements (fixes #6386) (#6391) (alberto)
-* 6b08cfc Docs: key-spacing fixable documenation notes (fixes #6375) (#6376) (Ruurd Moelker)
-* 4b4be3b Docs: `max-lines` option: fix `skipComments` typo (#6374) (Jordan Harband)
-* 20ab4f6 Docs: Fix wrong link in object-curly-newline (#6373) (Grant Snodgrass)
-* 412ce8d Docs: Fix broken links in no-mixed-operators (#6372) (Grant Snodgrass)
-
-v2.12.0 - June 10, 2016
-
-* 54c30fb Update: Add explicit default option `always` for `eqeqeq` (refs #6144) (#6342) (alberto)
-* 2d63370 Update: max-len will warn indented comment lines (fixes #6322) (#6324) (Kai Cataldo)
-* dcd4ad7 Docs: clarify usage of inline disable comments (fixes #6335) (#6347) (Kai Cataldo)
-* c03300b Docs: Clarified how plugin rules look in plugin configs (fixes #6346) (#6351) (Kevin Partington)
-* 9c87709 Docs: Add semantic versioning policy (fixes #6244) (#6343) (Nicholas C. Zakas)
-* 5affab1 Docs: Describe values under Extending Configuration Files (refs #6240) (#6336) (Mark Pedrotti)
-* 2520f5a New: `max-lines` rule (fixes #6078) (#6321) (alberto)
-* 9bfbc64 Update: Option for object literals in `arrow-body-style` (fixes #5936) (#6216) (alberto)
-* 977cdd5 Chore: remove unused method from FileFinder (fixes #6344) (#6345) (alberto)
-* 477fbc1 Docs: Add section about customizing RuleTester (fixes #6227) (#6331) (Jeroen Engels)
-* 0e14016 New: `no-mixed-operators` rule (fixes #6023) (#6241) (Toru Nagashima)
-* 6e03c4b Update: Add never option to arrow-body-style (fixes #6317) (#6318) (Andrew Hyndman)
-* f804397 New: Add `eslint:all` option (fixes #6240) (#6248) (Robert Fletcher)
-* dfe05bf Docs: Link JSCS rules to their corresponding page. (#6334) (alberto)
-* 1cc4356 Docs: Remove reference to numeric config (fixes #6309) (#6327) (Kevin Partington)
-* 2d4efbe Docs: Describe options in rule under Strict Mode (#6312) (Mark Pedrotti)
-* c1953fa Docs: Typo fix 'and' -> 'any' (#6326) (Stephen Edgar)
-* d49ab4b Docs: Code conventions improvements (#6313) (Kevin Partington)
-* 316a507 Fix: one-var allows uninitialized vars in ForIn/ForOf (fixes #5744) (#6272) (Kai Cataldo)
-* 6cbee31 Docs: Typo fix 'colum' -> 'column' (#6306) (Andrew Cobby)
-* 2663569 New: `object-curly-newline` (fixes #6072) (#6223) (Toru Nagashima)
-* 72c2ea5 Update: callback-return allows for object methods (fixes #4711) (#6277) (Kai Cataldo)
-* 89580a4 Docs: Distinguish examples in rules under Stylistic Issues part 5 (#6291) (Kenneth Williams)
-* 1313804 New: rest-spread-spacing rule (fixes #5391) (#6278) (Kai Cataldo)
-* 61dfe68 Fix: `no-useless-rename` false positive in babel-eslint (fixes #6266) (#6290) (alberto)
-* c78c8cb Build: Remove commit check from appveyor (fixes #6292) (#6294) (alberto)
-* 3e38fc1 Chore: more tests for comments at the end of blocks (refs #6090) (#6273) (Kai Cataldo)
-* 38dccdd Docs: `--no-ignore` disables all forms of ignore (fixes #6260) (#6304) (alberto)
-* bb69380 Fix: no-useless-rename handles ExperimentalRestProperty (fixes #6284) (#6288) (Kevin Partington)
-* fca0679 Update: Improve perf not traversing default ignored dirs (fixes #5679) (#6276) (alberto)
-* 320e8b0 Docs: Describe options in rules under Possible Errors part 4 (#6270) (Mark Pedrotti)
-* 3e052c1 Docs: Mark no-useless-rename as fixable in rules index (#6297) (Dalton Santos)
-
-v2.11.1 - May 30, 2016
-
-* 64b0d0c Fix: failed to parse `/*eslint` comments by colon (fixes #6224) (#6258) (Toru Nagashima)
-* c8936eb Build: Don't check commit count (fixes #5935) (#6263) (Nicholas C. Zakas)
-* 113c1a8 Fix: `max-statements-per-line` false positive at exports (fixes #6264) (#6268) (Toru Nagashima)
-* 03beb27 Fix: `no-useless-rename` false positives (fixes #6266) (#6267) (alberto)
-* fe89037 Docs: Fix rule name in example (#6279) (Kenneth Williams)
-
-v2.11.0 - May 27, 2016
-
-* 77dd2b4 Fix: On --init, print message when package.json is invalid (fixes #6257) (#6261) (Kai Cataldo)
-* 7f60186 Fix: `--ignore-pattern` can't uningnore files (fixes #6127) (#6253) (alberto)
-* fea8fe6 New: no-useless-rename (fixes #6058) (#6249) (Kai Cataldo)
-* b4cff9d Fix: Incorrect object-property-newline behavior (fixes #6207) (#6213) (Rafał Ruciński)
-* 35b4656 Docs: Edit arrow-parens.md to show correct output value (#6245) (Adam Terlson)
-* ee0cd58 Fix: `newline-before-return` shouldn't disallow newlines (fixes #6176) (#6217) (alberto)
-* d4f5526 Fix: `vars-on-top` crashs at export declarations (fixes #6210) (#6220) (Toru Nagashima)
-* 088bda9 New: `unicode-bom` rule to allow or disallow BOM (fixes #5502) (#6230) (Andrew Johnston)
-* 14bfc03 Fix: `comma-dangle` wrong autofix (fixes #6233) (#6235) (Toru Nagashima)
-* cdd65d7 Docs: added examples for arrow-body-style (refs #5498) (#6242) (Tieme van Veen)
-* c10c07f Fix: lost code in autofixing (refs #6233) (#6234) (Toru Nagashima)
-* e6d5b1f Docs: Add rule deprecation section to user guide (fixes #5845) (#6201) (Kai Cataldo)
-* 777941e Upgrade: doctrine to 1.2.2 (fixes #6121) (#6231) (alberto)
-* 74c458d Update: key-spacing rule whitespace fixer (fixes #6167) (#6169) (Ruurd Moelker)
-* 04bd586 New: Disallow use of Object.prototype methods on objects (fixes #2693) (#6107) (Andrew Levine)
-* 53754ec Update: max in `max-statements-per-line` should be >=0 (fixes #6171) (#6172) (alberto)
-* 54d1201 Update: Add treatUndefinedAsUnspecified option (fixes #6026) (#6194) (Kenneth Williams)
-* 18152dd Update: Add checkLoops option to no-constant-condition (fixes #5477) (#6202) (Kai Cataldo)
-* 7644908 Fix: no-multiple-empty-lines BOF and EOF defaults (fixes #6179) (#6180) (Ruurd Moelker)
-* 72335eb Fix: `max-statements-per-line` false positive (fixes #6173, fixes #6153) (#6192) (Toru Nagashima)
-* 9fce04e Fix: `generator-star-spacing` false positive (fixes #6135) (#6168) (Toru Nagashima)
-
-v2.10.2 - May 16, 2016
-
-* bda5de5 Fix: Remove default parser from CLIEngine options (fixes #6182) (#6183) (alberto)
-* e59e5a0 Docs: Describe options in rules under Possible Errors part 3 (#6105) (Mark Pedrotti)
-* 842ab2e Build: Run phantomjs tests using karma (fixes #6128) (#6178) (alberto)
-
-v2.10.1 - May 14, 2016
-
-* 9397135 Fix: `valid-jsdoc` false positive at default parameters (fixes #6097) (#6170) (Toru Nagashima)
-* 2166ad4 Fix: warning & error count in `CLIEngine.getErrorResults` (fixes #6155) (#6157) (alberto)
-* 1e0a652 Fix: ignore empty statements in max-statements-per-line (fixes #6153) (#6156) (alberto)
-* f9ca0d6 Fix: `no-extra-parens` to check for nulls (fixes #6161) (#6164) (Gyandeep Singh)
-* d095ee3 Fix: Parser merge sequence in config (fixes #6158) (#6160) (Gyandeep Singh)
-* f33e49f Fix: `no-return-assign` to check for null tokens (fixes #6159) (#6162) (Gyandeep Singh)
-
-v2.10.0 - May 13, 2016
-
-* 098cd9c Docs: Distinguish examples in rules under Stylistic Issues part 4 (#6136) (Kenneth Williams)
-* 805742c Docs: Clarify JSX option usage (#6132) (Richard Collins)
-* 10b0933 Fix: Optimize no-irregular-whitespace for the common case (fixes #6116) (#6117) (Andres Suarez)
-* 36bec90 Docs: linkify URLs in development-environment.md (#6150) (chrisjshull)
-* 29c401a Docs: Convert rules in index under Removed from list to table (#6091) (Mark Pedrotti)
-* e13e696 Fix: `_` and `$` in isES5Constructor (fixes #6085) (#6094) (Kevin Locke)
-* 67916b9 Fix: `no-loop-func` crashed (fixes #6130) (#6138) (Toru Nagashima)
-* d311a62 Fix: Sort fixes consistently even if they overlap (fixes #6124) (#6133) (alberto)
-* 6294459 Docs: Correct syntax for default ignores and `.eslintignore` example (#6118) (alberto)
-* 067db14 Fix: Replace `assert.deepEqual` by `lodash.isEqual` (fixes #6111) (#6112) (alberto)
-* 52fdf04 Fix: `no-multiple-empty-lines` duplicate errors at BOF (fixes #6113) (#6114) (alberto)
-* e6f56da Docs: Document `--ignore-pattern` (#6120) (alberto)
-* ef739cd Fix: Merge various command line configs at the same time (fixes #6104) (#6108) (Ed Lee)
-* 767da6f Update: add returnAssign option to no-extra-parens (fixes #6036) (#6095) (Kai Cataldo)
-* 06f6252 Build: Use split instead of slice/indexOf for commit check (fixes #6109) (#6110) (Ed Lee)
-* c4fc39b Docs: Update headings of rules under Removed (refs #5774) (#6102) (Mark Pedrotti)
-* 716345f Build: Match rule id at beginning of heading (refs #5774) (#6089) (Mark Pedrotti)
-* 0734967 Update: Add an option to `prefer-const` (fixes #5692) (#6040) (Toru Nagashima)
-* 7941d5e Update: Add autofix for `lines-around-comment` (fixes #5956) (#6062) (alberto)
-* dc538aa Build: Pin proxyquire to ">=1.0.0 <1.7.5" (fixes #6096) (#6100) (alberto)
-* 04563ca Docs: Describe options in rules under Possible Errors part 2 (#6063) (Mark Pedrotti)
-* 5d390b2 Chore: Replace deprecated calls to context - batch 4 (fixes #6029) (#6087) (alberto)
-* 6df4b23 Fix: `no-return-assign` warning nested expressions (fixes #5913) (#6041) (Toru Nagashima)
-* 16fad58 Merge pull request #6088 from eslint/docs-one-var-per-line (alberto)
-* 0b67170 Docs: Correct default for `one-var-declaration-per-line` (fixes #6017) (#6022) (Ed Lee)
-* d40017f Fix: comma-style accounts for parens in array (fixes #6006) (#6038) (Kai Cataldo)
-* 992d9cf Docs: Fix typography/teriminology in indent doc (fixes #6045) (#6044) (Rich Trott)
-* 4ae39d2 Chore: Replace deprecated calls to context - batch 3 (refs #6029) (#6056) (alberto)
-* 8633e4d Update: multipass should not exit prematurely (fixes #5995) (#6048) (alberto)
-* 3c44c2c Update: Adds an avoidQuotes option for object-shorthand (fixes #3366) (#5870) (Chris Sauvé)
-* a9a4652 Fix: throw when rule uses `fix` but `meta.fixable` not set (fixes #5970) (#6043) (Vitor Balocco)
-* ad10106 Docs: Update comma-style docs (#6039) (Kai Cataldo)
-* 388d6f8 Fix: `no-sequences` false negative at arrow expressions (fixes #6082) (#6083) (Toru Nagashima)
-* 8e96064 Docs: Clarify rule example in README since we allow string error levels (#6061) (Kevin Partington)
-* a66bf19 Fix: `lines-around-comment` multiple errors on same line (fixes #5965) (#5994) (alberto)
-* a2cc54e Docs: Organize meta and describe visitor in Working with Rules (#5967) (Mark Pedrotti)
-* ef8cbff Fix: object-shorthand should only lint computed methods (fixes #6015) (#6024) (Kai Cataldo)
-* cd1b057 Chore: Replace deprecated calls to context - batch 2 (refs #6029) (#6049) (alberto)
-* a3a6e06 Update: no-irregal-whitespace in a regular expression (fixes #5840) (#6018) (Linda_pp)
-* 9b9d76c Chore: Replace deprecated calls to context - batch 1 (refs #6029) (#6034) (alberto)
-* dd8bf93 Fix: blockless else in max-statements-per-line (fixes #5926) (#5993) (Glen Mailer)
-* f84eb80 New: Add new rule `object-property-newline` (fixes #5667) (#5933) (Vitor Balocco)
-* d5f4104 Docs: mention parsing errors in strict mode (fixes #5485) (#5991) (Mark Pedrotti)
-* 249732e Docs: Move docs from eslint.github.io (fixes #5964) (#6012) (Nicholas C. Zakas)
-* 4c2de6c Docs: Add example of diff clarity to comma-dangle rule docs (#6035) (Vitor Balocco)
-* 3db2e89 Fix: Do not swallow exceptions in CLIEngine.getFormatter (fixes #5977) (#5978) (Gustav Nikolaj)
-* eb2fb44 Fix: Always ignore defaults unless explicitly passed (fixes #5547) (#5820) (Ian VanSchooten)
-* ab57e94 Docs: Add example of diff clarity to newline-per-chained-call (#5986) (Vitor Balocco)
-* 88bc014 Docs: Update readme info about jshint (#6027) (alberto)
-* a2c15cc Docs: put config example in code block (#6005) (Amos Wenger)
-* a5011cb Docs: Fix a wrong examples' header of `prefer-arrow-callback`. (#6020) (Toru Nagashima)
-* 1484ede Docs: Typo in nodejs-api (#6025) (alberto)
-* ade6a9b Docs: typo: "eslint-disable-line" not "eslint disable-line" (#6019) (Will Day)
-* 2f15354 Fix: Removed false positives of break and continue (fixes #5972) (#6000) (Onur Temizkan)
-
-v2.9.0 - April 29, 2016
-
-* a8a2cd8 Fix: Avoid autoconfig crashes from inline comments (fixes #5992) (#5999) (Ian VanSchooten)
-* 23b00e0 Upgrade: npm-license to 0.3.2 (fixes #5996) (#5998) (alberto)
-* 377167d Upgrade: ignore to 3.1.2 (fixes #5979) (#5988) (alberto)
-* 141b778 Fix: no-control-regex literal handling fixed. (fixes #5737) (#5943) (Efe Gürkan YALAMAN)
-* 577757d Fix: Clarify color option (fixes #5928) (#5974) (Grant Snodgrass)
-* e7e6581 Docs: Update CLA link (#5980) (Gustav Nikolaj)
-* 0be26bc Build: Add nodejs 6 to travis (fixes #5971) (#5973) (Gyandeep Singh)
-* e606523 New: Rule `no-unsafe-finally` (fixes #5808) (#5932) (Onur Temizkan)
-* 42d1ecc Chore: Add metadata to existing rules - Batch 7 (refs #5417) (#5969) (Vitor Balocco)
-* e2ad1ec Update: object-shorthand lints computed methods (fixes #5871) (#5963) (Chris Sauvé)
-* d24516a Chore: Add metadata to existing rules - Batch 6 (refs #5417) (#5966) (Vitor Balocco)
-* 1e7a3ef Fix: `id-match` false positive in property values (fixes #5885) (#5960) (Mike Sherov)
-* 51ddd4b Update: Use process @abstract when processing @return (fixes #5941) (#5945) (Simon Schick)
-* 52a4bea Update: Add autofix for `no-whitespace-before-property` (fixes #5927) (#5951) (alberto)
-* 46e058d Docs: Correct typo in configuring.md (#5957) (Nick S. Plekhanov)
-* 5f8abab Chore: Add metadata to existing rules - Batch 5 (refs #5417) (#5944) (Vitor Balocco)
-* 0562f77 Chore: Add missing newlines to test cases (fixes #5947) (Rich Trott)
-* fc78e78 Chore: Enable quote-props rule in eslint-config-eslint (refs #5188) (#5938) (Gyandeep Singh)
-* 43f6d05 Docs: Update docs to refer to column (#5937) (Sashko Stubailo)
-* 586478e Update: Add autofix for `comma-dangle` (fixes #3805) (#5925) (alberto)
-* a4f9c5a Docs: Distinguish examples in rules under Stylistic Issues part 3 (Kenneth Williams)
-* e7c0737 Chore: Enable no-console rule in eslint-config-eslint (refs #5188) (Kevin Partington)
-* 0023fe6 Build: Add “chore” to commit tags (fixes #5880) (#5929) (Mike Sherov)
-* 25d626a Upgrade: espree 3.1.4 (fixes #5923, fixes #5756) (Kai Cataldo)
-* a01b412 New: Add `no-useless-computed-key` rule (fixes #5402) (Burak Yigit Kaya)
-* 9afb9cb Chore: Remove workaround for espree and escope bugs (fixes #5852) (alberto)
-* 3ffc582 Chore: Update copyright and license info (alberto)
-* 249eb40 Docs: Clarify init sets up local installation (fixes #5874) (Kai Cataldo)
-* 6cd8c86 Docs: Describe options in rules under Possible Errors part 1 (Mark Pedrotti)
-* f842d18 Fix: `no-this-before-super` crash on unreachable paths (fixes #5894) (Toru Nagashima)
-* a02960b Docs: Fix missing delimiter in README links (Kevin Partington)
-* 3a9e72c Docs: Update developer guide with new standards (Nicholas C. Zakas)
-* cb78585 Update: Add `allowUnboundThis` to `prefer-arrow-callback` (fixes #4668) (Burak Yigit Kaya)
-* 02be29f Chore: Remove CLA check from bot (Nicholas C. Zakas)
-* 220713e Chore: Add metadata to existing rules - Batch 4 (refs #5417) (Vitor Balocco)
-* df53414 Chore: Include jQuery Foundation info (Nicholas C. Zakas)
-* f1b2992 Fix: `no-useless-escape` false positive in JSXAttribute (fixes #5882) (Toru Nagashima)
-* 74674ad Docs: Move `sort-imports` to 'ECMAScript 6' (Kenneth Williams)
-* ae69ddb Docs: Fix severity type in example (Kenneth Williams)
-* 19f6fff Update: Autofixing does multiple passes (refs #5329) (Nicholas C. Zakas)
-* 1e4b0ca Docs: Reduce length of paragraphs in rules index (Mark Pedrotti)
-* 8cfe1eb Docs: Fix a wrong option (Zach Orlovsky)
-* 8f6739f Docs: Add alberto as reviewer (alberto)
-* 2ae4938 Docs: Fix message for `inline-config` option (alberto)
-* 089900b Docs: Fix a wrong rule name in an example (Toru Nagashima)
-* c032b41 Docs: Fix emphasis (Toru Nagashima)
-* ae606f0 Docs: Update JSCS info in README (alberto)
-* a9c5323 Fix: Install ESLint on init if not installed (fixes #5833) (Kai Cataldo)
-* ed38358 Docs: Removed incorrect example (James M. Greene)
-* af3113c Docs: Fix config comments in indent docs (Brandon Mills)
-* 2b39461 Update: `commentPattern` option for `default-case` rule (fixes #5803) (Artyom Lvov)
-
-v2.8.0 - April 15, 2016
-
-* a8821a5 Docs: Distinguish examples in rules under Stylistic Issues part 2 (Kenneth Williams)
-* 76913b6 Update: Add metadata to existing rules - Batch 3 (refs #5417) (Vitor Balocco)
-* 34ad8d2 Fix: Check that module.paths exists (fixes #5791) (Nicholas C. Zakas)
-* 37239b1 Docs: Add new members of the team (Ilya Volodin)
-* fb3c2eb Update: allow template literals (fixes #5234) (Jonathan Haines)
-* 5a4a935 Update: Add metadata to existing rules - Batch 2 (refs #5417) (Vitor Balocco)
-* ea2e625 Fix: newline-before-return handles return as first token (fixes #5816) (Kevin Partington)
-* f8db9c9 Update: add nestedBinaryExpressions to no-extra-parens (fixes #3065) (Ilya Volodin)
-* 0045d57 Update: `allowNamedFunctions` in `prefer-arrow-callback` (fixes #5675) (alberto)
-* 19da72a Update: Add metadata to existing rules - Batch 1 (refs #5417) (Vitor Balocco)
-* cc14e43 Fix: `no-fallthrough` empty case with comment (fixes #5799) (alberto)
-* 13c8b14 Fix: LogicalExpression checks for short circuit (fixes #5693) (Vamshi krishna)
-* 73b225e Fix: Document and fix metadata (refs #5417) (Ilya Volodin)
-* 882d199 Docs: Improve options description in `no-redeclare` (alberto)
-* 6a71ceb Docs: Improve options description in `no-params-reassign` (alberto)
-* 24b6215 Update: Include 'typeof' in rule 'no-constant-condition' (fixes #5228) (Vamshi krishna)
-* a959063 Docs: Remove link to deprecated ESLintTester project (refs #3110) (Trey Thomas)
-* 6fd7d82 Update: Change order in `eslint --init` env options (fixes #5742) (alberto)
-* c59d909 Fix: Extra paren check around object arrow bodies (fixes #5789) (Brandon Mills)
-* 6f88546 Docs: Use double quotes for better Win compatibility (fixes #5796) (alberto)
-* 02743d5 Fix: catch self-assignment operators in `no-magic-number` (fixes #4400) (alberto)
-* c94e74e Docs: Make rule descriptions more consistent (Kenneth Williams)
-* 6028252 Docs: Distinguish examples in rules under Stylistic Issues part 1 (Mark Pedrotti)
-* ccd8ca9 Fix: Added property onlyDeclaration to id-match rule (fixes #3488) (Gajus Kuizinas)
-* 6703c02 Update: no-useless-escape / exact locations of errors (fixes #5751) (Onur Temizkan)
-* 3d84b91 Fix: ignore trailing whitespace in template literal (fixes #5786) (Kai Cataldo)
-* b0e6bc4 Update: add allowEmptyCatch option to no-empty (fixes #5800) (Kai Cataldo)
-* f1f1dd7 Docs: Add @pedrottimark as a committer (Brandon Mills)
-* 228f201 Update: `commentPattern` option for `no-fallthrough` rule (fixes #5757) (Artyom Lvov)
-* 41db670 Docs: Clarify disable inline comments (Kai Cataldo)
-* 9c9a295 Docs: Add note about shell vs node glob parameters in cli (alberto)
-* 5308ff9 Docs: Add code backticks to sentence in fixable rules (Mark Pedrotti)
-* 965ec06 Docs: fix the examples for space-before-function-paren. (Craig Silverstein)
-* 2b202fc Update: Add ignore option to space-before-function-parens (fixes #4127) (Craig Silverstein)
-* 24c12ba Fix: improve `constructor-super` errors for literals (fixes #5449) (Toru Nagashima)
-
-v2.7.0 - April 4, 2016
-
-* 134cb1f Revert "Update: adds nestedBinaryExpressions for no-extra-parens rule (fixes #3065)" (Ilya Volodin)
-* 7e80867 Docs: Update sentence in fixable rules (Mark Pedrotti)
-* 1b6d5a3 Update: adds nestedBinaryExpressions for no-extra-parens (fixes #3065) (Nick Fisher)
-* 4f93c32 Docs: Clarify `array-bracket-spacing` with newlines (fixes #5768) (alberto)
-* 161ddac Fix: remove `console.dir` (fixes #5770) (Toru Nagashima)
-* 0c33f6a Fix: indent rule uses wrong node for class indent level (fixes #5764) (Paul O’Shannessy)
-
-v2.6.0 - April 1, 2016
-
-* ce2accd Fix: vars-on-top now accepts exported variables (fixes #5711) (Olmo Kramer)
-* 7aacba7 Update: Deprecate option `maximum` in favor of `max` (fixes #5685) (Vitor Balocco)
-* 5fe6fca Fix: no-useless-escape \B regex escape (fixes #5750) (Onur Temizkan)
-* 9b73ffd Update: `destructuring` option of `prefer-const` rule (fixes #5594) (Toru Nagashima)
-* 8ac9206 Docs: Typo in `sort-imports` (alberto)
-* 12902c5 Fix: valid-jsdoc crash w/ Field & Array Type (fixes #5745) (fixes #5746) (Burak Yigit Kaya)
-* 2c8b65a Docs: Edit examples for a few rules (Mark Pedrotti)
-* d736bc2 Fix: Treat SwitchCase like a block in lines-around-comment (fixes #5718) (Scott O'Hara)
-* 24a61a4 Update: make `no-useless-escape` allowing line breaks (fixes #5689) (Toru Nagashima)
-* 4ecd45e Fix: Ensure proper lookup of config files (fixes #5175, fixes #5468) (Nicholas C. Zakas)
-* 088e26b Fix: Update doctrine to allow hyphens in JSDoc names (fixes #5612) (Kai Cataldo)
-* 692fd5d Upgrade: Old Chalk.JS deprecated method (fixes #5716) (Morris Singer)
-* f59d91d Update: no-param-reassign error msgs (fixes #5705) (Isaac Levy)
-* c1b16cd Fix: Object spread throws error in key-spacing rule. (fixes #5724) (Ziad El Khoury Hanna)
-* 3091613 Docs: Correct explanation about properties (James Monger)
-* cb0f0be Fix: Lint issue with `valid-jsdoc` rule (refs #5188) (Gyandeep Singh)
-* aba1954 Build: Ignore jsdoc folder internally (fixes #5714) (alberto)
-* a35f127 Fix: Lint for eslint project in regards to vars (refs #5188) (Gyandeep Singh)
-* d9ab4f0 Fix: Windows scoped package configs (fixes #5644) (Nicholas C. Zakas)
-* 8d0cd0d Update: Basic valid-jsdoc default parameter support (fixes #5658) (Tom Andrews)
-
-v2.5.3 - March 28, 2016
-
-* 8749ac5 Build: Disable bundling dependencies (fixes #5687) (Nicholas C. Zakas)
-
-v2.5.2 - March 28, 2016
-
-* 1cc7f8e Docs: Remove mention of minimatch for .eslintignore (Ian VanSchooten)
-* 5bd69a9 Docs: Reorder FAQ in README (alberto)
-* 98e6bd9 Fix: Correct default for indentation in `eslint --init` (fixes #5698) (alberto)
-* 679095e Fix: make the default of `options.cwd` in runtime (fixes #5694) (Toru Nagashima)
-* 4f06f2f Docs: Distinguish examples in rules under Best Practices part 2 (Mark Pedrotti)
-* 013a18e Build: Fix bundling script (fixes #5680) (Nicholas C. Zakas)
-* 8c5d954 Docs: Typo fix (István Donkó)
-* 09659d6 Docs: Use string severity (Kenneth Williams)
-* a4ae769 Docs: Manual changelog update for v2.5.1 (Nicholas C. Zakas)
-* c41fab9 Fix: don't use path.extname with undefined value (fixes #5678) (Myles Borins)
-
-v2.5.1 - March 25, 2016
-
-* Build: No functional changes, just republished with a working package.
-
-v2.5.0 - March 25, 2016
-
-* 7021aa9 Fix: lines-around-comment in ESLint repo, part 2 (refs #5188) (Kevin Partington)
-* 095c435 Docs: Remove ES2016 from experimental section of README (Kevin Partington)
-* 646f863 Build: Bundle dependencies in package.json (fixes #5013) (Nicholas C. Zakas)
-* ea06868 Docs: Clarify --ext does not apply to globs (fixes #5452) (Ian VanSchooten)
-* 569c478 Build: Fix phantomjs CI problems (fixes #5666) (alberto)
-* 6022426 Docs: Add link to chat room in README primary links (alberto)
-* 2fbb530 Docs: Add link to "Proposing a Rule Change" in README (alberto)
-* 25bf491 Upgrade: globals 9.x (fixes #5668) (Toru Nagashima)
-* d6f8409 New: Rule - No useless escape (fixes #5460) (Onur Temizkan)
-* 12a43f1 Docs: remove brace expansion from configuring.md (refs #5314) (Jonathan Haines)
-* 92d1749 New: max-statements-per-line (fixes #5424) (Kenneth Williams)
-* aaf324a Fix: missing support for json sub configs (fixes #5413) (Noam Okman)
-* 48ad5fe Update: Add 'caughtErrors' to rule no-unused-vars (fixes #3837) (vamshi)
-* ad90c2b Fix: incorrect config message (fixes #5653) (s0ph1e)
-* a551831 Docs: Distinguish examples in rules under Node.js and CommonJS (Mark Pedrotti)
-* 83cd651 Upgrade: chai to 3.5.0 (fixes #5647) (alberto)
-* 32748dc Fix: `radix` rule false positive at shadowed variables (fixes #5639) (Toru Nagashima)
-* 66db38d Fix: `--no-ignore` should not un-ignore default ignores (fixes #5547) (alberto)
-* e3e06f3 Docs: Distinguish examples in rules under Best Practices part 4 (Mark Pedrotti)
-* a9f0865 Docs: Update no-sequences rule docs for clarity (fixes #5536) (Kai Cataldo)
-* bae7b30 Docs: Add michaelficarra as committer (alberto)
-* e2990e7 Docs: Consistent wording in rules README (alberto)
-* 49b4d2a Docs: Update team list with new members (Ilya Volodin)
-* d0ae66c Update: Allow autoconfiguration for JSX code (fixes #5511) (Ian VanSchooten)
-* 38a0a64 Docs: Clarify `linebreak-style` docs (fixes #5628) (alberto)
-* 4b7305e Fix: Allow default ignored files to be unignored (fixes #5410) (Ian VanSchooten)
-* 4b05ce6 Update: Enforce repo coding conventions via ESLint (refs #5188) (Kevin Partington)
-* 051b255 Docs: Remove or rewrite references to former ecmaFeatures (Mark Pedrotti)
-* 9a22625 Fix: `prefer-const` false positive at non-blocked if (fixes #5610) (Toru Nagashima)
-* b1fd482 Fix: leading comments added from previous node (fixes #5531) (Kai Cataldo)
-* c335650 Docs: correct the no-confusing-arrow docs (Daniel Norman)
-* e94b77d Fix: Respect 'ignoreTrailingComments' in max-len rule (fixes #5563) (Vamshi Krishna)
-* 9289ef8 Fix: handle personal package.json without config (fixes #5496) (Denny Christochowitz)
-* 87d74b2 Fix: `prefer-const` got to not change scopes (refs #5284) (Toru Nagashima)
-* 5a881e7 Docs: Fix typo in code snippet for no-unmodified-loop-condition rule (Chris Rebert)
-* 03037c2 Update: Overrides for space-unary-ops (fixes #5060) (Afnan Fahim)
-* 24d986a Update: replace MD5 hashing of cache files with MurmurHash (fixes #5522) (Michael Ficarra)
-* f405030 Fix: Ensure allowing `await` as a property name (fixes #5564) (Toru Nagashima)
-* aefc90c Fix: `no-useless-constructor` clash (fixes #5573) (Toru Nagashima)
-* 9eaa20d Docs: Fix typo in CLI help message (ryym)
-* a7c3e67 Docs: Invalid json in `configuring.md` (alberto)
-* 4e50332 Docs: Make `prefer-template` examples consistent. (alberto)
-* cfc14a9 Fix: valid-jsdoc correctly checks type union (fixes #5260) (Kai Cataldo)
-* 689cb7d Fix: `quote-props` false positive on certain keys (fixes #5532) (Burak Yigit Kaya)
-* 167a03a Fix: `brace-style` erroneously ignoring certain errors (fixes #5197) (Burak Yigit Kaya)
-* 3133f28 Fix: object-curly-spacing doesn't know types (fixes #5537) (fixes #5538) (Burak Yigit Kaya)
-* d0ca171 Docs: Separate parser and config questions in issue template (Kevin Partington)
-* bc769ca Fix: Improve file path resolution (fixes #5314) (Ian VanSchooten)
-* 9ca8567 Docs: Distinguish examples in rules under Best Practices part 3 (Mark Pedrotti)
-* b9c69f1 Docs: Distinguish examples in rules under Variables part 2 (Mark Pedrotti)
-* c289414 New: `no-duplicate-imports` rule (fixes #3478) (Simen Bekkhus)
-
-v2.4.0 - March 11, 2016
-
-* 97b2466 Fix: estraverse/escope to work with unknowns (fixes #5476) (Nicholas C. Zakas)
-* 641b3f7 Fix: validate the type of severity level (fixes #5499) (Shinnosuke Watanabe)
-* 9ee8869 Docs: no-unused-expressions - add more edge unusable and usable examples (Brett Zamir)
-* 56bf864 Docs: Create parity between no-sequences examples (Brett Zamir)
-* 13ef1c7 New: add `--parser-options` to CLI (fixes #5495) (Jordan Harband)
-* ae1ee54 Docs: fix func-style arrow exception option (Craig Martin)
-* 91852fd Docs: no-lone-blocks - show non-problematic (and problematic) label (Brett Zamir)
-* b34458f Docs: Rearrange rules for better categories (and improve rule summaries) (Brett Zamir)
-* 1198b26 Docs: Minor README clarifications (Brett Zamir)
-* 03e6869 Fix: newline-before-return: bug with comment (fixes #5480) (mustafa)
-* ad100fd Fix: overindent in VariableDeclarator parens or brackets (fixes #5492) (David Greenspan)
-* 9b8e04b Docs: Replace all node references to Node.js which is the official name (Brett Zamir)
-* cc1f2f0 Docs: Minor fixes in no-new-func (Brett Zamir)
-* 6ab81d4 Docs: Distinguish examples in rules under Best Practices part 1 (Mark Pedrotti)
-* 9c6c70c Update: add `allowParens` option to `no-confusing-arrow` (fixes #5332) (Burak Yigit Kaya)
-* 979c096 Docs: Document linebreak-style as fixable. (Afnan Fahim)
-* 9f18a81 Fix: Ignore destructuring assignment in `object-shorthand` (fixes #5488) (alberto)
-* 5d9a798 Docs: README.md, prefer-const; change modified to reassigned (Michiel de Bruijne)
-* 38eb7f1 Fix: key-spacing checks ObjectExpression is multiline (fixes #5479) (Kevin Partington)
-* 9592c45 Fix: `no-unmodified-loop-condition` false positive (fixes #5445) (Toru Nagashima)
-
-v2.3.0 - March 4, 2016
-
-* 1b2c6e0 Update: Proposed no-magic-numbers option: ignoreJSXNumbers (fixes #5348) (Brandon Beeks)
-* 63c0b7d Docs: Fix incorrect environment ref. in Rules in Plugins. (fixes #5421) (Jesse McCarthy)
-* 124c447 Build: Add additional linebreak to docs (fixes #5464) (Ilya Volodin)
-* 0d3831b Docs: Add RuleTester parserOptions migration steps (Kevin Partington)
-* 50f4d5a Fix: extends chain (fixes #5411) (Toru Nagashima)
-* 0547072 Update: Replace getLast() with lodash.last() (fixes #5456) (Jordan Eldredge)
-* 8c29946 Docs: Distinguish examples in rules under Possible Errors part 1 (Mark Pedrotti)
-* 5319b4a Docs: Distinguish examples in rules under Possible Errors part 2 (Mark Pedrotti)
-* 1da2420 Fix: crash when SourceCode object was reused (fixes #5007) (Toru Nagashima)
-* 9e9daab New: newline-before-return rule (fixes #5009) (Kai Cataldo)
-* e1bbe45 Fix: Check space after anonymous generator star (fixes #5435) (alberto)
-* 119e0ed Docs: Distinguish examples in rules under Variables (Mark Pedrotti)
-* 905c049 Fix: `no-undef` false positive at new.target (fixes #5420) (Toru Nagashima)
-* 4a67b9a Update: Add ES7 support (fixes #5401) (Brandon Mills)
-* 89c757d Docs: Replace ecmaFeatures with parserOptions in working-with-rules (Kevin Partington)
-* 804c08e Docs: Add parserOptions to RuleTester section of working-with-rules (Kevin Partington)
-* 1982c50 Docs: Document string option for `no-unused-vars`. (alberto)
-* 4f82b2b Update: Support classes in `padded-blocks` (fixes #5092) (alberto)
-* ed5564f Docs: Specify results of `no-unused-var` with `args` (fixes #5334) (chinesedfan)
-* de0a4ef Fix: `getFormatter` throws an error when called as static (fixes #5378) (cowchimp)
-* 78f7ca9 Fix: Prevent crash from swallowing console.log (fixes #5381) (Ian VanSchooten)
-* 34b648d Fix: remove tests which have invalid syntax (fixes #5405) (Toru Nagashima)
-* 7de5ae4 Docs: Missing allow option in docs (Scott O'Hara)
-* cf14c71 Fix: `no-useless-constructor` rule crashes sometimes (fixes #5290) (Burak Yigit Kaya)
-* 70e3a02 Update: Allow string severity in config (fixes #3626) (Nicholas C. Zakas)
-* 13c7c19 Update: Exclude ES5 constructors from consistent-return (fixes #5379) (Kevin Locke)
-* 784d3bf Fix: Location info in `dot-notation` rule (fixes #5397) (Gyandeep Singh)
-* 6280b2d Update: Support switch statements in padded-blocks (fixes #5056) (alberto)
-* 25a5b2c Fix: Allow irregular whitespace in comments (fixes #5368) (Christophe Porteneuve)
-* 560c0d9 New: no-restricted-globals rule implementation (fixes #3966) (Benoît Zugmeyer)
-* c5bb478 Fix: `constructor-super` false positive after a loop (fixes #5394) (Toru Nagashima)
-* 6c0c4aa Docs: Add Issue template (fixes #5313) (Kai Cataldo)
-* 1170e67 Fix: indent rule doesn't handle constructor instantiation (fixes #5384) (Nate Cavanaugh)
-* 6bc9932 Fix: Avoid magic numbers in rule options (fixes #4182) (Brandon Beeks)
-* 694e1c1 Fix: Add tests to cover default magic number tests (fixes #5385) (Brandon Beeks)
-* 0b5349d Fix: .eslintignore paths should be absolute (fixes #5362) (alberto)
-* 8f6c2e7 Update: Better error message for plugins (refs #5221) (Nicholas C. Zakas)
-* 972d41b Update: Improve error message for rule-tester (fixes #5369) (Jeroen Engels)
-* fe3f6bd Fix: `no-self-assign` false positive at shorthand (fixes #5371) (Toru Nagashima)
-* 2376291 Docs: Missing space in `no-fallthrough` doc. (alberto)
-* 5aedb87 Docs: Add mysticatea as reviewer (Nicholas C. Zakas)
-* 1f9fd10 Update: no-invalid-regexp allows custom flags (fixes #5249) (Afnan Fahim)
-* f1eab9b Fix: Support for dash and slash in `valid-jsdoc` (fixes #1598) (Gyandeep Singh)
-* cd12a4b Fix:`newline-per-chained-call` should only warn on methods (fixes #5289) (Burak Yigit Kaya)
-* 0d1377d Docs: Add missing `symbol` type into valid list (Plusb Preco)
-* 6aa2380 Update: prefer-const; change modified to reassigned (fixes #5350) (Michiel de Bruijne)
-* d1d62c6 Fix: indent check for else keyword with Stroustrup style (fixes #5218) (Gyandeep Singh)
-* 7932f78 Build: Fix commit message validation (fixes #5340) (Nicholas C. Zakas)
-* 1c347f5 Fix: Cleanup temp files from tests (fixes #5338) (Nick)
-* 2f3e1ae Build: Change rules to warnings in perf test (fixes #5330) (Brandon Mills)
-* 36f40c2 Docs: Achieve consistent order of h2 in rule pages (Mark Pedrotti)
-
-v2.2.0 - February 19, 2016
-
-* 45a22b5 Docs: remove esprima-fb from suggested parsers (Henry Zhu)
-* a4d9cd3 Docs: Fix semi rule typo (Brandon Mills)
-* 9d005c0 Docs: Correct option name in `no-implicit-coercion` rule (Neil Kistner)
-* 2977248 Fix: Do not cache `.eslintrc.js` (fixes #5067) (Nick)
-* 211eb8f Fix: no-multi-spaces conflicts with smart tabs (fixes #2077) (Afnan Fahim)
-* 6dc9483 Fix: Crash in `constructor-super` (fixes #5319) (Burak Yigit Kaya)
-* 3f48875 Docs: Fix yield star spacing examples (Dmitriy Lazarev)
-* 4dab76e Docs: Update `preferType` heading to keep code format (fixes #5307) (chinesedfan)
-* 7020b82 Fix: `sort-imports` warned between default and members (fixes #5305) (Toru Nagashima)
-* 2f4cd1c Fix: `constructor-super` and `no-this-before-super` false (fixes #5261) (Toru Nagashima)
-* 59e9c5b New: eslint-disable-next-line (fixes #5206) (Kai Cataldo)
-* afb6708 Fix: `indent` rule forgot about some CallExpressions (fixes #5295) (Burak Yigit Kaya)
-* d18d406 Docs: Update PR creation bot message (fixes #5268) (Nicholas C. Zakas)
-* 0b1cd19 Fix: Ignore parser option if set to default parser (fixes #5241) (Kai Cataldo)
-
-v2.1.0 - February 15, 2016
-
-* 7981ef5 Build: Fix release script (Nicholas C. Zakas)
-* c9c34ea Fix: Skip computed members in `newline-per-chained-call` (fixes #5245) (Burak Yigit Kaya)
-* b32ddad Build: `npm run perf` command should check the exit code (fixes #5279) (Burak Yigit Kaya)
-* 6580d1c Docs: Fix incorrect `api.verify` JSDoc for `config` param (refs #5104) (Burak Yigit Kaya)
-* 1f47868 Docs: Update yield-star-spacing documentation for 2.0.0 (fixes #5272) (Burak Yigit Kaya)
-* 29da8aa Fix: `newline-after-var` crash on a switch statement (fixes #5277) (Toru Nagashima)
-* 86c5a20 Fix: `func-style` should ignore ExportDefaultDeclarations (fixes #5183) (Burak Yigit Kaya)
-* ba287aa Fix: Consolidate try/catches to top levels (fixes #5243) (Ian VanSchooten)
-* 3ef5da1 Docs: Update no-magic-numbers#ignorearrayindexes. (KazuakiM)
-* 0d6850e Update: Allow var declaration at end of block (fixes #5246) (alberto)
-* c1e3a73 Fix: Popular style init handles missing package.json keys (refs #5243) (Brandon Mills)
-* 68c6e22 Docs: fix default value of `keyword-spacing`'s overrides option. (Toru Nagashima)
-* 00fe46f Upgrade: inquirer (fixes #5265) (Bogdan Chadkin)
-* ef729d7 Docs: Remove option that is not being used in max-len rule (Thanos Lefteris)
-* 4a5ddd5 Docs: Fix rule config above examples for require-jsdoc (Thanos Lefteris)
-* c5cbc1b Docs: Add rule config above each example in jsx-quotes (Thanos Lefteris)
-* f0aceba Docs: Correct alphabetical ordering in rule list (Randy Coulman)
-* 1651ffa Docs: update migrating to 2.0.0 (fixes #5232) (Toru Nagashima)
-* 9078537 Fix: `indent` on variable declaration with separate array (fixes #5237) (Burak Yigit Kaya)
-* f8868b2 Docs: Typo fix in consistent-this rule doc fixes #5240 (Nicolas Froidure)
-* 44f6915 Fix: ESLint Bot mentions the wrong person for extra info (fixes #5229) (Burak Yigit Kaya)
-* c612a8e Fix: `no-empty-function` crash (fixes #5227) (Toru Nagashima)
-* ae663b6 Docs: Add links for issue documentation (Nicholas C. Zakas)
-* 717bede Build: Switch to using eslint-release (fixes #5223) (Nicholas C. Zakas)
-* 980e139 Fix: Combine all answers for processAnswers (fixes #5220) (Ian VanSchooten)
-* 1f2a1d5 Docs: Remove inline errors from doc examples (fixes #4104) (Burak Yigit Kaya)
-
-v2.0.0 - February 12, 2016
-
-* cc3a66b Docs: Issue message when more info is needed (Nicholas C. Zakas)
-* 2bc40fa Docs: Simplify hierarchy of headings in rule pages (Mark Pedrotti)
-* 1666254 Docs: Add note about only-whitespace rule for `--fix` (fixes #4774) (Burak Yigit Kaya)
-* 2fa09d2 Docs: Add `quotes` to related section of `prefer-template` (fixes #5192) (Burak Yigit Kaya)
-* 7b12995 Fix: `key-spacing` not enforcing no-space in minimum mode (fixes #5008) (Burak Yigit Kaya)
-* c1c4f4d Breaking: new `no-empty-function` rule (fixes #5161) (Toru Nagashima)
-
-v2.0.0-rc.1 - February 9, 2016
-
-* 4dad82a Update: Adding shared environment for node and browser (refs #5196) (Eli White)
-* b46c893 Fix: Config file relative paths (fixes #5164, fixes #5160) (Nicholas C. Zakas)
-* aa5b2ac Fix: no-whitespace-before-property fixes (fixes #5167) (Kai Cataldo)
-* 4e99924 Update: Replace several dependencies with lodash (fixes #5012) (Gajus Kuizinas)
-* 718dc68 Docs: Remove periods in rules' README for consistency. (alberto)
-* 7a47085 Docs: Correct `arrow-spacing` overview. (alberto)
-* a4cde1b Docs: Clarify global-require inside try/catch (fixes #3834) (Brandon Mills)
-* fd07925 Docs: Clarify docs for api.verify (fixes #5101, fixes #5104) (Burak Yigit Kaya)
-* 413247f New: Add a --print-config flag (fixes #5099) (Christopher Crouzet)
-* efeef42 Update: Implement auto fix for space-in-parens (fixes #5050) (alberto)
-* e07fdd4 Fix: code path analysis and labels (fixes #5171) (Toru Nagashima)
-* 2417bb2 Fix: `no-unmodified-loop-condition` false positive (fixes #5166) (Toru Nagashima)
-* fae1884 Fix: Allow same-line comments in padded-blocks (fixes #5055) (Brandon Mills)
-* a24d8ad Fix: Improve autoconfig logging (fixes #5119) (Ian VanSchooten)
-* e525923 Docs: Correct obvious inconsistencies in rules h2 elements (Mark Pedrotti)
-* 9675b5e Docs: `avoid-escape` does not allow backticks (fixes #5147) (alberto)
-* a03919a Fix: `no-unexpected-multiline` false positive (fixes #5148) (Feross Aboukhadijeh)
-* 74360d6 Docs: Note no-empty applies to empty block statements (fixes #5105) (alberto)
-* 6eeaa3f Build: Remove pending tests (fixes #5126) (Ian VanSchooten)
-* 02c83df Docs: Update docs/rules/no-plusplus.md (Sheldon Griffin)
-* 0c4de5c New: Added "table" formatter (fixes #4037) (Gajus Kuizinas)
-* 0a59926 Update: 'implied strict mode' ecmaFeature (fixes #4832) (Nick Evans)
-* 53a6eb3 Fix: Handle singular case in rule-tester error message (fixes #5141) (Bryan Smith)
-* 97ac91c Build: Increment eslint-config-eslint (Nicholas C. Zakas)
-
-v2.0.0-rc.0 - February 2, 2016
-
-* 973c499 Fix: `sort-imports` crash (fixes #5130) (Toru Nagashima)
-* e64b2c2 Breaking: remove `no-empty-label` (fixes #5042) (Toru Nagashima)
-* 79ebbc9 Breaking: update `eslint:recommended` (fixes #5103) (Toru Nagashima)
-* e1d7368 New: `no-extra-label` rule (fixes #5059) (Toru Nagashima)
-* c83b48c Fix: find ignore file only in cwd (fixes #5087) (Nicholas C. Zakas)
-* 3a24240 Docs: Fix jsdoc param names to match function param names (Thanos Lefteris)
-* 1d79746 Docs: Replace ecmaFeatures setting with link to config page (Thanos Lefteris)
-* e96ffd2 New: `template-curly-spacing` rule (fixes #5049) (Toru Nagashima)
-* 4b02902 Update: Extended no-console rule (fixes #5095) (EricHenry)
-* 757651e Docs: Remove reference to rules enabled by default (fixes #5100) (Brandon Mills)
-* 0d87f5d Docs: Clarify eslint-disable comments only affect rules (fixes #5005) (Brandon Mills)
-* 1e791a2 New: `no-self-assign` rule (fixes #4729) (Toru Nagashima)
-* c706eb9 Fix: reduced `no-loop-func` false positive (fixes #5044) (Toru Nagashima)
-* 3275e86 Update: Add extra aliases to consistent-this rule (fixes #4492) (Zachary Alexander Belford)
-* a227360 Docs: Replace joyent org with nodejs (Thanos Lefteris)
-* b2aedfe New: Rule to enforce newline after each call in the chain (fixes #4538) (Rajendra Patil)
-* d67bfdd New: `no-unused-labels` rule (fixes #5052) (Toru Nagashima)
-
-v2.0.0-beta.3 - January 29, 2016
-
-* 86a3e3d Update: Remove blank lines at beginning of files (fixes #5045) (Jared Sohn)
-* 4fea752 New: Autoconfiguration from source inspection (fixes #3567) (Ian VanSchooten)
-* 519f39f Breaking: Remove deprecated rules (fixes #5032) (Gyandeep Singh)
-* c75ee4a New: Add support for configs in plugins (fixes #3659) (Ilya Volodin)
-* 361377f Fix: `prefer-const` false positive reading before writing (fixes #5074) (Toru Nagashima)
-* ff2551d Build: Improve `npm run perf` command (fixes #5028) (Toru Nagashima)
-* bcca69b Update: add int32Hint option to `no-bitwise` rule (fixes #4873) (Maga D. Zandaqo)
-* e3f2683 Update: config extends dependency lookup (fixes #5023) (Nicholas C. Zakas)
-* a327a06 Fix: Indent rule for allman brace style scenario (fixes #5064) (Gyandeep Singh)
-* afdff6d Fix: `no-extra-bind` false positive (fixes #5058) (Toru Nagashima)
-* c1fad4f Update: add autofix support for spaced-comment (fixes #4969, fixes #5030) (Maga D. Zandaqo)
-* 889b942 Revert "Docs: Update readme for legend describing rules icons (refs #4355)" (Nicholas C. Zakas)
-* b0f21a0 Fix: `keyword-spacing` false positive in template strings (fixes #5043) (Toru Nagashima)
-* 53fa5d1 Fix: `prefer-const` false positive in a loop condition (fixes #5024) (Toru Nagashima)
-* 385d399 Docs: Update readme for legend describing rules icons (Kai Cataldo)
-* 505f1a6 Update: Allow parser to be relative to config (fixes #4985) (Nicholas C. Zakas)
-* 79e8a0b New: `one-var-declaration-per-line` rule (fixes #1622) (alberto)
-* 654e6e1 Update: Check extra Boolean calls in no-extra-boolean-cast (fixes #3650) (Andrew Sutton)
-
-v2.0.0-beta.2 - January 22, 2016
-
-* 3fa834f Docs: Fix formatter links (fixes #5006) (Gyandeep Singh)
-* 54b1bc8 Docs: Fix link in strict.md (fixes #5026) (Nick Evans)
-* e0c5cf7 Upgrade: Espree to 3.0.0 (fixes #5018) (Ilya Volodin)
-* 69f149d Docs: language tweaks (Andres Kalle)
-* 2b33c74 Update: valid-jsdoc to not require @return in constructors (fixes #4976) (Maga D. Zandaqo)
-* 6ac2e01 Docs: Fix description of exported comment (Mickael Jeanroy)
-* 29392f8 New: allow-multiline option on comma-dangle (fixes #4967) (Alberto Gimeno)
-* 05b8cb3 Update: Module overrides all 'strict' rule options (fixes #4936) (Nick Evans)
-* 8470474 New: Add metadata to few test rules (fixes #4494) (Ilya Volodin)
-* ba11c1b Docs: Add Algolia as sponsor to README (Nicholas C. Zakas)
-* b28a19d Breaking: Plugins envs and config removal (fixes #4782, fixes #4952) (Nicholas C. Zakas)
-* a456077 Docs: newline-after-var doesn't allow invalid options. (alberto)
-* 3e6a24e Breaking: Change `strict` default mode to "safe" (fixes #4961) (alberto)
-* 5b96265 Breaking: Update eslint:recommended (fixes #4953) (alberto)
-* 7457a4e Upgrade: glob to 6.x (fixes #4991) (Gyandeep Singh)
-* d3f4bdd Build: Cleanup for code coverage (fixes #4983) (Gyandeep Singh)
-* b8fbaa0 Fix: multiple message in TAP formatter (fixes #4975) (Simon Degraeve)
-* 990f8da Fix: `getNodeByRangeIndex` performance issue (fixes #4989) (Toru Nagashima)
-* 8ac1dac Build: Update markdownlint dependency to 0.1.0 (fixes #4988) (David Anson)
-* 5cd5429 Fix: function expression doc in call expression (fixes #4964) (Tim Schaub)
-* 4173baa Fix: `no-dupe-class-members` false positive (fixes #4981) (Toru Nagashima)
-* 12fe803 Breaking: Supports Unicode BOM (fixes #4878) (Toru Nagashima)
-* 1fc80e9 Build: Increment eslint-config-eslint (Nicholas C. Zakas)
-* e0a9024 Update: Report newline between template tag and literal (fixes #4210) (Rajendra Patil)
-* da3336c Update: Rules should get `sourceType` from Program node (fixes #4960) (Nick Evans)
-* a2ac359 Update: Make jsx-quotes fixable (refs #4377) (Gabriele Petronella)
-* ee1014d Fix: Incorrect error location for object-curly-spacing (fixes #4957) (alberto)
-* b52ed17 Fix: Incorrect error location for space-in-parens (fixes #4956) (alberto)
-* 9c1bafb Fix: Columns of parse errors are off by 1 (fixes #4896) (alberto)
-* 5e4841e New: 'id-blacklist' rule (fixes #3358) (Keith Cirkel)
-* 700b8bc Update: Add "allow" option to allow specific operators (fixes #3308) (Rajendra Patil)
-* d82eeb1 Update: Add describe around rule tester blocks (fixes #4907) (Ilya Volodin)
-* 2967402 Update: Add minimum value to integer values in schema (fixes #4941) (Ilya Volodin)
-* 7b632f8 Upgrade: Globals to ^8.18.0 (fixes #4728) (Gyandeep Singh)
-* 86e6e57 Fix: Incorrect error at EOF for no-multiple-empty-lines (fixes #4917) (alberto)
-* 7f058f3 Fix: Incorrect location for padded-blocks (fixes #4913) (alberto)
-* b3de8f7 Fix: Do not show ignore messages for default ignored files (fixes #4931) (Gyandeep Singh)
-* b1360da Update: Support multiLine and singleLine options (fixes #4697) (Rajendra Patil)
-* 82fbe09 Docs: Small semantic issue in documentation example (fixes #4937) (Marcelo Zarate)
-* 13a4e30 Docs: Formatting inconsistencies (fixes #4912) (alberto)
-* d487013 Update: Option to allow extra parens for cond assign (fixes #3317) (alberto)
-* 0f469b4 Fix: JSDoc for function expression on object property (fixes #4900) (Tim Schaub)
-* c2dee27 Update: Add module tests to no-extra-semi (fixes #4915) (Nicholas C. Zakas)
-* 5a633bf Update: Add `preferType` option to `valid-jsdoc` rule (fixes #3056) (Gyandeep Singh)
-* ebd01b7 Build: Fix version number on release (fixes #4921) (Nicholas C. Zakas)
-* 2d626a3 Docs: Fix typo in changelog (Nicholas C. Zakas)
-* c4c4139 Fix: global-require no longer warns if require is shadowed (fixes #4812) (Kevin Partington)
-* bbf7f27 New: provide config.parser via `parserName` on RuleContext (fixes #3670) (Ben Mosher)
-
-v2.0.0-beta.1 - January 11, 2016
-
-* 6c70d84 Build: Fix prerelease script (fixes #4919) (Nicholas C. Zakas)
-* d5c9435 New: 'sort-imports' rule (refs #3143) (Christian Schuller)
-* a8cfd56 Fix: remove duplicate of eslint-config-eslint (fixes #4909) (Toru Nagashima)
-* 19a9fbb Breaking: `space-before-blocks` ignores after keywords (fixes #1338) (Toru Nagashima)
-* c275b41 Fix: no-extra-parens ExpressionStatement restricted prods (fixes #4902) (Michael Ficarra)
-* b795850 Breaking: don't load ~/.eslintrc when using --config flag (fixes #4881) (alberto)
-* 3906481 Build: Add AppVeyor CI (fixes #4894) (Gyandeep Singh)
-* 6390862 Docs: Fix missing footnote (Yoshiya Hinosawa)
-* e5e06f8 Fix: Jsdoc comment for multi-line function expressions (fixes #4889) (Gyandeep Singh)
-* 7c9be60 Fix: Fix path errors in windows (fixes #4888) (Gyandeep Singh)
-* a1840e7 Fix: gray text was invisible on Solarized Dark theme (fixes #4886) (Jack Leigh)
-* fc9f528 Docs: Modify unnecessary flag docs in quote-props (Matija Marohnić)
-* 186e8f0 Update: Ignore camelcase in object destructuring (fixes #3185) (alberto)
-* 7c97201 Upgrade: doctrine version to 1.1.0 (fixes #4854) (Tim Schaub)
-* ceaf324 New: Add no-new-symbol rule (fixes #4862) (alberto)
-* e2f2b66 Breaking: Remove defaults from `eslint:recommended` (fixes #4809) (Ian VanSchooten)
-* 0b3c01e Docs: Specify default for func-style (fixes #4834) (Ian VanSchooten)
-* 008ea39 Docs: Document default for operator assignment (fixes #4835) (alberto)
-* b566f56 Docs: no-new-func typo (alberto)
-* 1569695 Update: Adds default 'that' for consistent-this (fixes #4833) (alberto)
-* f7b28b7 Docs: clarify `requireReturn` option for valid-jsdoc rule (fixes #4859) (Tim Schaub)
-* 407f329 Build: Fix prerelease script (Nicholas C. Zakas)
-* 688f277 Fix: Set proper exit code for Node > 0.10 (fixes #4691) (Nicholas C. Zakas)
-* 58715e9 Fix: Use single quotes in context.report messages (fixes #4845) (Joe Lencioni)
-* 5b7586b Fix: do not require a @return tag for @interface (fixes #4860) (Tim Schaub)
-* d43f26c Breaking: migrate from minimatch to node-ignore (fixes #2365) (Stefan Grönke)
-* c07ca39 Breaking: merges keyword spacing rules (fixes #3869) (Toru Nagashima)
-* 871f534 Upgrade: Optionator version to 0.8.1 (fixes #4851) (Eric Johnson)
-* 82d4cd9 Update: Add atomtest env (fixes #4848) (Andres Suarez)
-* 9c9beb5 Update: Add "ignore" override for operator-linebreak (fixes #4294) (Rajendra Patil)
-* 9c03abc Update: Add "allowCall" option (fixes #4011) (Rajendra Patil)
-* 29516f1 Docs: fix migration guide for no-arrow-condition rule (Peter Newnham)
-* 2ef7549 Docs: clarify remedy to some prefer-const errors (Turadg Aleahmad)
-* 1288ba4 Update: Add default limit to `complexity` (fixes #4808) (Ian VanSchooten)
-* d3e8179 Fix: env is rewritten by modules (fixes #4814) (Toru Nagashima)
-* fd72aba Docs: Example fix for `no-extra-parens` rule (fixes #3527) (Gyandeep Singh)
-* 315f272 Fix: Change max-warnings type to Int (fixes #4660) (George Zahariev)
-* 5050768 Update: Ask for `commonjs` under config init (fixes #3553) (Gyandeep Singh)
-* 4665256 New: Add no-whitespace-before-property rule (fixes #1086) (Kai Cataldo)
-* f500d7d Fix: allow extending @scope/eslint/file (fixes #4800) (André Cruz)
-* 5ab564e New: 'ignoreArrayIndexes' option for 'no-magic-numbers' (fixes #4370) (Christian Schuller)
-* 97cdb95 New: Add no-useless-constructor rule (fixes #4785) (alberto)
-* b9bcbaf Fix: Bug in no-extra-bind (fixes #4806) (Andres Kalle)
-* 246a6d2 Docs: Documentation fix (Andres Kalle)
-* 9ea6b36 Update: Ignore case in jsdoc tags (fixes #4576) (alberto)
-* acdda24 Fix: ignore argument parens in no-unexpected-multiline (fixes #4658) (alberto)
-* 4931f56 Update: optionally allow bitwise operators (fixes #4742) (Swaagie)
-
-v2.0.0-alpha-2 - December 23, 2015
-
-* Build: Add prerelease script (Nicholas C. Zakas)
-* Update: Allow to omit semi for one-line blocks (fixes #4385) (alberto)
-* Fix: Handle getters and setters in key-spacing (fixes #4792) (Brandon Mills)
-* Fix: ObjectRestSpread throws error in key-spacing rule (fixes #4763) (Ziad El Khoury Hanna)
-* Docs: Typo in generator-star (alberto)
-* Fix: Backtick behavior in quotes rule (fixes #3090) (Nicholas C. Zakas)
-* Fix: Empty schemas forbid any options (fixes #4789) (Brandon Mills)
-* Fix: Remove `isMarkedAsUsed` function name (fixes #4783) (Gyandeep Singh)
-* Fix: support arrow functions in no-return-assign (fixes #4743) (alberto)
-* Docs: Add license header to Working with Rules guide (Brandon Mills)
-* Fix: RuleTester to show parsing errors (fixes #4779) (Nicholas C. Zakas)
-* Docs: Escape underscores in no-path-concat (alberto)
-* Update: configuration for classes in space-before-blocks (fixes #4089) (alberto)
-* Docs: Typo in no-useless-concat (alberto)
-* Docs: fix typos, suggests (molee1905)
-* Docs: Typos in space-before-keywords and space-unary-ops (fixes #4771) (alberto)
-* Upgrade: beefy to ^2.0.0, fixes installation errors (fixes #4760) (Kai Cataldo)
-* Docs: Typo in no-unexpected-multiline (fixes #4756) (alberto)
-* Update: option to ignore top-level max statements (fixes #4309) (alberto)
-* Update: Implement auto fix for semi-spacing rule (fixes #3829) (alberto)
-* Fix: small typos in code examples (Plusb Preco)
-* Docs: Add section on file extensions to user-guide/configuring (adam)
-* Fix: Comma first issue in `indent` (fixes #4739, fixes #3456) (Gyandeep Singh)
-* Fix: no-constant-condition false positive (fixes #4737) (alberto)
-* Fix: Add source property for fatal errors (fixes #3325) (Gyandeep Singh)
-* New: Add a comment length option to the max-len rule (fixes #4665) (Ian)
-* Docs: RuleTester doesn't require any tests (fixes #4681) (alberto)
-* Fix: Remove path analysis from debug log (fixes #4631) (Ilya Volodin)
-* Fix: Set null to property ruleId when fatal is true (fixes #4722) (Sébastien Règne)
-* New: Visual Studio compatible formatter (fixes #4708) (rhpijnacker)
-* New: Add greasemonkey environment (fixes #4715) (silverwind)
-* Fix: always-multiline for comma-dangle import (fixes #4704) (Nicholas C. Zakas)
-* Fix: Check 1tbs non-block else (fixes #4692) (Nicholas C. Zakas)
-* Fix: Apply environment configs last (fixes #3915) (Nicholas C. Zakas)
-* New: `no-unmodified-loop-condition` rule (fixes #4523) (Toru Nagashima)
-* Breaking: deprecate `no-arrow-condition` rule (fixes #4417) (Luke Karrys)
-* Update: Add cwd option for cli-engine (fixes #4472) (Ilya Volodin)
-* New: Add no-confusing-arrow rule (refs #4417) (Luke Karrys)
-* Fix: ensure `ConfigOps.merge` do a deep copy (fixes #4682) (Toru Nagashima)
-* Fix: `no-invalid-this` allows this in static method (fixes #4669) (Toru Nagashima)
-* Fix: Export class syntax for `require-jsdoc` rule (fixes #4667) (Gyandeep Singh)
-* Update: Add "safe" mode to strict (fixes #3306) (Brandon Mills)
-
-v2.0.0-alpha-1 - December 11, 2015
-
-* Breaking: Correct links between variables and references (fixes #4615) (Toru Nagashima)
-* Fix: Update rule tests for parser options (fixes #4673) (Nicholas C. Zakas)
-* Breaking: Implement parserOptions (fixes #4641) (Nicholas C. Zakas)
-* Fix: max-len rule overestimates the width of some tabs (fixes #4661) (Nick Evans)
-* New: Add no-implicit-globals rule (fixes #4542) (Joshua Peek)
-* Update: `no-use-before-define` checks invalid initializer (fixes #4280) (Toru Nagashima)
-* Fix: Use oneValuePerFlag for --ignore-pattern option (fixes #4507) (George Zahariev)
-* New: `array-callback-return` rule (fixes #1128) (Toru Nagashima)
-* Upgrade: Handlebars to >= 4.0.5 for security reasons (fixes #4642) (Jacques Favreau)
-* Update: Add class body support to `indent` rule (fixes #4372) (Gyandeep Singh)
-* Breaking: Remove space-after-keyword newline check (fixes #4149) (Nicholas C. Zakas)
-* Breaking: Treat package.json like the rest of configs (fixes #4451) (Ilya Volodin)
-* Docs: writing mistake (molee1905)
-* Update: Add 'method' option to no-empty (fixes #4605) (Kai Cataldo)
-* Breaking: Remove autofix from eqeqeq (fixes #4578) (Ilya Volodin)
-* Breaking: Remove ES6 global variables from builtins (fixes #4085) (Brandon Mills)
-* Fix: Handle forbidden LineTerminators in no-extra-parens (fixes #4229) (Brandon Mills)
-* Update: Option to ignore constructor Fns object-shorthand (fixes #4487) (Kai Cataldo)
-* Fix: Check YieldExpression argument in no-extra-parens (fixes #4608) (Brandon Mills)
-* Fix: Do not cache `package.json` (fixes #4611) (Spain)
-* Build: Consume no-underscore-dangle allowAfterThis option (fixes #4599) (Kevin Partington)
-* New: Add no-restricted-imports rule (fixes #3196) (Guy Ellis)
-* Docs: no-extra-semi no longer refers to deprecated rule (fixes #4598) (Kevin Partington)
-* Fix: `consistent-return` checks the last (refs #3530, fixes #3373) (Toru Nagashima)
-* Update: add class option to `no-use-before-define` (fixes #3944) (Toru Nagashima)
-* Breaking: Simplify rule schemas (fixes #3625) (Nicholas C. Zakas)
-* Docs: Update docs/rules/no-plusplus.md (Xiangyun Chi)
-* Breaking: added bower_components to default ignore (fixes #3550) (Julian Laval)
-* Fix: `no-unreachable` with the code path (refs #3530, fixes #3939) (Toru Nagashima)
-* Fix: `no-this-before-super` with the code path analysis (refs #3530) (Toru Nagashima)
-* Fix: `no-fallthrough` with the code path analysis (refs #3530) (Toru Nagashima)
-* Fix: `constructor-super` with the code path analysis (refs #3530) (Toru Nagashima)
-* Breaking: Switch to Espree 3.0.0 (fixes #4334) (Nicholas C. Zakas)
-* Breaking: Freeze context object (fixes #4495) (Nicholas C. Zakas)
-* Docs: Add Code of Conduct (fixes #3095) (Nicholas C. Zakas)
-* Breaking: Remove warnings of readonly from `no-undef` (fixes #4504) (Toru Nagashima)
-* Update: allowAfterThis option in no-underscore-dangle (fixes #3435) (just-boris)
-* Fix: Adding options unit tests for --ignore-pattern (refs #4507) (Kevin Partington)
-* Breaking: Implement yield-star-spacing rule (fixes #4115) (Bryan Smith)
-* New: `prefer-rest-params` rule (fixes #4108) (Toru Nagashima)
-* Update: `prefer-const` begins to cover separating init (fixes #4474) (Toru Nagashima)
-* Fix: `no-eval` come to catch indirect eval (fixes #4399, fixes #4441) (Toru Nagashima)
-* Breaking: Default no-magic-numbers to none. (fixes #4193) (alberto)
-* Breaking: Allow empty arrow body (fixes #4411) (alberto)
-* New: Code Path Analysis (fixes #3530) (Toru Nagashima)
-
-v1.10.3 - December 1, 2015
-
-* Docs: Update strict rule docs (fixes #4583) (Nicholas C. Zakas)
-* Docs: Reference .eslintrc.* in contributing docs (fixes #4532) (Kai Cataldo)
-* Fix: Add for-of to `curly` rule (fixes #4571) (Kai Cataldo)
-* Fix: Ignore space before function in array start (fixes #4569) (alberto)
-
-v1.10.2 - November 27, 2015
-
-* Upgrade: escope@3.3.0 (refs #4485) (Nicholas C. Zakas)
-* Upgrade: Pinned down js-yaml to avoid breaking dep (fixes #4553) (alberto)
-* Fix: lines-around-comment with multiple comments (fixes #3509) (alberto)
-* Upgrade: doctrine@0.7.1 (fixes #4545) (Kevin Partington)
-* Fix: Bugfix for eqeqeq autofix (fixes #4540) (Kevin Partington)
-* Fix: Add for-in to `curly` rule (fixes #4436) (Kai Cataldo)
-* Fix: `valid-jsdoc` unneeded require check fix (fixes #4527) (Gyandeep Singh)
-* Fix: `brace-style` ASI fix for if-else condition (fixes #4520) (Gyandeep Singh)
-* Build: Add branch update during release process (fixes #4491) (Gyandeep Singh)
-* Build: Allow revert commits in commit messages (fixes #4452) (alberto)
-* Fix: Incorrect location in no-fallthrough (fixes #4516) (alberto)
-* Fix: `no-spaced-func` had been crashed (fixes #4508) (Toru Nagashima)
-* Fix: Add a RestProperty test of `no-undef` (fixes #3271) (Toru Nagashima)
-* Docs: Load badge from HTTPS (Brian J Brennan)
-* Build: Update eslint bot messages (fixes #4497) (Nicholas C. Zakas)
-
-v1.10.1 - November 20, 2015
-
-* Fix: Revert freezing context object (refs #4495) (Nicholas C. Zakas)
-* 1.10.0 (Nicholas C. Zakas)
-
-v1.10.0 - November 20, 2015
-
-* Docs: Remove dupes from changelog (Nicholas C. Zakas)
-* Update: --init to create extensioned files (fixes #4476) (Nicholas C. Zakas)
-* Docs: Update description of exported comment (fixes #3916) (Nicholas C. Zakas)
-* Docs: Move legacy rules to stylistic (files #4111) (Nicholas C. Zakas)
-* Docs: Clean up description of recommended rules (fixes #4365) (Nicholas C. Zakas)
-* Docs: Fix home directory config description (fixes #4398) (Nicholas C. Zakas)
-* Update: Add class support to `require-jsdoc` rule (fixes #4268) (Gyandeep Singh)
-* Update: return type error in `valid-jsdoc` rule (fixes #4443) (Gyandeep Singh)
-* Update: Display errors at the place where fix should go (fixes #4470) (nightwing)
-* Docs: Fix typo in default `cacheLocation` value (Andrew Hutchings)
-* Fix: Handle comments in block-spacing (fixes #4387) (alberto)
-* Update: Accept array for `ignorePattern` (fixes #3982) (Jesse McCarthy)
-* Update: replace label and break with IIFE and return (fixes #4459) (Ilya Panasenko)
-* Fix: space-before-keywords false positive (fixes #4449) (alberto)
-* Fix: Improves performance (refs #3530) (Toru Nagashima)
-* Fix: Autofix quotes produces invalid javascript (fixes #4380) (nightwing)
-* Docs: Update indent.md (Nathan Brown)
-* New: Disable comment config option (fixes #3901) (Matthew Riley MacPherson)
-* New: Config files with extensions (fixes #4045, fixes #4263) (Nicholas C. Zakas)
-* Revert "Update: Add JSX exceptions to no-extra-parens (fixes #4229)" (Brandon Mills)
-* Update: Add JSX exceptions to no-extra-parens (fixes #4229) (Brandon Mills)
-* Docs: Replace link to deprecated rule with newer rule (Andrew Marshall)
-* Fix: `no-extend-native` crashed at empty defineProperty (fixes #4438) (Toru Nagashima)
-* Fix: Support empty if blocks in lines-around-comment (fixes #4339) (alberto)
-* Fix: `curly` warns wrong location for `else` (fixes #4362) (Toru Nagashima)
-* Fix: `id-length` properties never option (fixes #4347) (Toru Nagashima)
-* Docs: missing close rbracket in example (@storkme)
-* Revert "Update: Allow empty arrow body (fixes #4411)" (Nicholas C. Zakas)
-* Fix: eqeqeq autofix avoids clashes with space-infix-ops (fixes #4423) (Kevin Partington)
-* Docs: Document semi-spacing behaviour (fixes #4404) (alberto)
-* Update: Allow empty arrow body (fixes #4411) (alberto)
-* Fix: Handle comments in comma-spacing (fixes #4389) (alberto)
-* Update: Refactor eslint.verify args (fixes #4395) (Nicholas C. Zakas)
-* Fix: no-undef-init should ignore const (fixes #4284) (Nicholas C. Zakas)
-* Fix: Add the missing "as-needed" docs to the radix rule (fixes #4364) (Michał Gołębiowski)
-* Fix: Display singular/plural version of "line" in message (fixes #4359) (Marius Schulz)
-* Update: Add Popular Style Guides (fixes #4320) (Jamund Ferguson)
-* Fix: eslint.report can be called w/o node if loc provided (fixes #4220) (Kevin Partington)
-* Update: no-implicit-coercion validate AssignmentExpression (fixes #4348) (Ilya Panasenko)
-
-v1.9.0 - November 6, 2015
-
-* Update: Make radix accept a "as-needed" option (fixes #4048) (Michał Gołębiowski)
-* Fix: Update the message to include number of lines (fixes #4342) (Brian Delahunty)
-* Docs: ASI causes problem whether semicolons are used or not (Thai Pangsakulyanont)
-* Fix: Fixer to not overlap ranges among fix objects (fixes #4321) (Gyandeep Singh)
-* Update: Add default to `max-nested-callbacks` (fixes #4297) (alberto)
-* Fix: Check comments in space-in-parens (fixes #4302) (alberto)
-* Update: Add quotes to error messages to improve clarity (fixes #4313) (alberto)
-* Fix: tests failing due to differences in temporary paths (fixes #4324) (alberto)
-* Fix: Make tests compatible with Windows (fixes #4315) (Ian VanSchooten)
-* Update: Extract glob and filesystem logic from cli-engine (fixes #4305) (Ian VanSchooten)
-* Build: Clarify commit-check messages (fixes #4256) (Ian VanSchooten)
-* Upgrade: Upgrade various dependencies (fixes #4303) (Gyandeep Singh)
-* Build: Add node 5 to travis build (fixes #4310) (Gyandeep Singh)
-* Fix: ensure using correct estraverse (fixes #3951) (Toru Nagashima)
-* Docs: update docs about using gitignore (Mateusz Derks)
-* Update: Detect and fix wrong linebreaks (fixes #3981) (alberto)
-* New: Add no-case-declarations rule (fixes #4278) (Erik Arvidsson)
-
-v1.8.0 - October 30, 2015
-
-* Fix: Check for node property before testing type (fixes #4298) (Ian VanSchooten)
-* Docs: Specify 'double' as default for quotes (fixes #4270) (Ian VanSchooten)
-* Fix: Missing errors in space-in-parens (fixes #4257, fixes #3996) (alberto)
-* Docs: fixed typo (Mathieu M-Gosselin)
-* Fix: `cacheLocation` handles paths in windows style. (fixes #4285) (royriojas)
-* Docs: fixed typo (mpal9000)
-* Update: Add support for class in `valid-jsdoc` rule (fixes #4279) (Gyandeep Singh)
-* Update: cache-file accepts a directory. (fixes #4241) (royriojas)
-* Update: Add `maxEOF` to no-multiple-empty-lines (fixes #4235) (Adrien Vergé)
-* Update: fix option for comma-spacing (fixes #4232) (HIPP Edgar (PRESTA EXT))
-* Docs: Fix use of wrong word in configuration doc (Jérémie Astori)
-* Fix: Prepare config before verifying SourceCode (fixes #4230) (Ian VanSchooten)
-* Update: RuleTester come to check AST was not modified (fixes #4156) (Toru Nagashima)
-* Fix: wrong count for 'no-multiple-empty-lines' on last line (fixes #4228) (alberto)
-* Update: Add `allow` option to `no-shadow` rule (fixes #3035) (Gyandeep Singh)
-* Doc: Correct the spelling of Alberto's surname (alberto)
-* Docs: Add alberto as a committer (Gyandeep Singh)
-* Build: Do not stub console in testing (fixes #1328) (Gyandeep Singh)
-* Fix: Check node exists before checking type (fixes #4231) (Ian VanSchooten)
-* Update: Option to exclude afterthoughts from no-plusplus (fixes #4093) (Brody McKee)
-* New: Add rule no-arrow-condition (fixes #3280) (Luke Karrys)
-* Update: Add linebreak style option to eol-last (fixes #4148) (alberto)
-* New: arrow-body-style rule (fixes #4109) (alberto)
-
-v1.7.3 - October 21, 2015
-
-* Fix: Support comma-first style in key-spacing (fixes #3877) (Brandon Mills)
-* Fix: no-magic-numbers: variable declarations (fixes #4192) (Ilya Panasenko)
-* Fix: Support ES6 shorthand in key-spacing (fixes #3678) (Brandon Mills)
-* Fix: `indent` array with memberExpression (fixes #4203) (Gyandeep Singh)
-* Fix: `indent` param function on sameline (fixes #4174) (Gyandeep Singh)
-* Fix: no-multiple-empty-lines fails when empty line at EOF (fixes #4214) (alberto)
-* Fix: `comma-dangle` false positive (fixes #4200) (Nicholas C. Zakas)
-* Fix: `valid-jsdoc` prefer problem (fixes #4205) (Nicholas C. Zakas)
-* Docs: Add missing single-quote (Kevin Lamping)
-* Fix: correct no-multiple-empty-lines at EOF (fixes #4140) (alberto)
-
-v1.7.2 - October 19, 2015
-
-* Fix: comma-dangle confused by parens (fixes #4195) (Nicholas C. Zakas)
-* Fix: no-mixed-spaces-and-tabs (fixes #4189, fixes #4190) (alberto)
-* Fix: no-extend-native disallow using Object.properties (fixes #4180) (Nathan Woltman)
-* Fix: no-magic-numbers should ignore Number.parseInt (fixes #4167) (Henry Zhu)
-
-v1.7.1 - October 16, 2015
-
-* Fix: id-match schema (fixes #4155) (Nicholas C. Zakas)
-* Fix: no-magic-numbers should ignore parseInt (fixes #4167) (Nicholas C. Zakas)
-* Fix: `indent` param function fix (fixes #4165, fixes #4164) (Gyandeep Singh)
-
-v1.7.0 - October 16, 2015
-
-* Fix: array-bracket-spacing for empty array (fixes #4141) (alberto)
-* Fix: `indent` arrow function check fix (fixes #4142) (Gyandeep Singh)
-* Update: Support .js files for config (fixes #3102) (Gyandeep Singh)
-* Fix: Make eslint-config-eslint work (fixes #4145) (Nicholas C. Zakas)
-* Fix: `prefer-arrow-callback` had been wrong at arguments (fixes #4095) (Toru Nagashima)
-* Docs: Update various rules docs (Nicholas C. Zakas)
-* New: Create eslint-config-eslint (fixes #3525) (Nicholas C. Zakas)
-* Update: RuleTester allows string errors in invalid cases (fixes #4117) (Kevin Partington)
-* Docs: Reference no-unexpected-multiline in semi (fixes #4114) (alberto)
-* Update: added exceptions to `lines-around-comment` rule. (fixes #2965) (Mathieu M-Gosselin)
-* Update: Add `matchDescription` option to `valid-jsdoc` (fixes #2449) (Gyandeep Singh)
-* Fix: check for objects or arrays in array-bracket-spacing (fixes #4083) (alberto)
-* Docs: Alphabetize Rules lists (Kenneth Chung)
-* Fix: message templates fail when no parameters are passed (fixes #4080) (Ilya Volodin)
-* Fix: `indent` multi-line function call (fixes #4073, fixes #4075) (Gyandeep Singh)
-* Docs: Improve comma-dangle documentation (Gilad Peleg)
-* Fix: no-mixed-tabs-and-spaces fails with some comments (fixes #4086) (alberto)
-* Fix: `semi` to check for do-while loops (fixes #4090) (Gyandeep Singh)
-* Build: Fix path related failures on Windows in tests (fixes #4061) (Burak Yigit Kaya)
-* Fix: `no-unused-vars` had been missing some parameters (fixes #4047) (Toru Nagashima)
-* Fix: no-mixed-spaces-and-tabs with comments and templates (fixes #4077) (alberto)
-* Update: Add `allow` option for `no-underscore-dangle` rule (fixes #2135) (Gyandeep Singh)
-* Update: `allowArrowFunctions` option for `func-style` rule (fixes #1897) (Gyandeep Singh)
-* Fix: Ignore template literals in no-mixed-tabs-and-spaces (fixes #4054) (Nicholas C. Zakas)
-* Build: Enable CodeClimate (fixes #4068) (Nicholas C. Zakas)
-* Fix: `no-cond-assign` had needed double parens in `for` (fixes #4023) (Toru Nagashima)
-* Update: Ignore end of function in newline-after-var (fixes #3682) (alberto)
-* Build: Performance perf to not ignore jshint file (refs #3765) (Gyandeep Singh)
-* Fix: id-match bug incorrectly errors on `NewExpression` (fixes #4042) (Burak Yigit Kaya)
-* Fix: `no-trailing-spaces` autofix to handle linebreaks (fixes #4050) (Gyandeep Singh)
-* Fix: renamed no-magic-number to no-magic-numbers (fixes #4053) (Vincent Lemeunier)
-* New: add "consistent" option to the "curly" rule (fixes #2390) (Benoît Zugmeyer)
-* Update: Option to ignore for loops in init-declarations (fixes #3641) (alberto)
-* Update: Add webextensions environment (fixes #4051) (Blake Winton)
-* Fix: no-cond-assign should report assignment location (fixes #4040) (alberto)
-* New: no-empty-pattern rule (fixes #3668) (alberto)
-* Upgrade: Upgrade globals to 8.11.0 (fixes #3599) (Burak Yigit Kaya)
-* Docs: Re-tag JSX code fences (fixes #4020) (Brandon Mills)
-* New: no-magic-number rule (fixes #4027) (Vincent Lemeunier)
-* Docs: Remove list of users from README (fixes #3881) (Brandon Mills)
-* Fix: `no-redeclare` and `no-sahadow` for builtin globals (fixes #3971) (Toru Nagashima)
-* Build: Add `.eslintignore` file for the project (fixes #3765) (Gyandeep Singh)
-
-v1.6.0 - October 2, 2015
-
-* Fix: cache is basically not working (fixes #4008) (Richard Hansen)
-* Fix: a test failure on Windows (fixes #3968) (Toru Nagashima)
-* Fix: `no-invalid-this` had been missing globals in node (fixes #3961) (Toru Nagashima)
-* Fix: `curly` with `multi` had false positive (fixes #3856) (Toru Nagashima)
-* Build: Add load performance check inside perf function (fixes #3994) (Gyandeep Singh)
-* Fix: space-before-keywords fails with super keyword (fixes #3946) (alberto)
-* Fix: CLI should not fail on account of ignored files (fixes #3978) (Dominic Barnes)
-* Fix: brace-style rule incorrectly flagging switch (fixes #4002) (Aparajita Fishman)
-* Update: Implement auto fix for space-unary-ops rule (fixes #3976) (alberto)
-* Update: Implement auto fix for computed-property-spacing (fixes #3975) (alberto)
-* Update: Implement auto fix for no-multi-spaces rule (fixes #3979) (alberto)
-* Fix: Report shorthand method names in complexity rule (fixes #3955) (Tijn Kersjes)
-* Docs: Add note about typeof check for isNaN (fixes #3985) (Daniel Lo Nigro)
-* Update: ESLint reports parsing errors with clear prefix. (fixes #3555) (Kevin Partington)
-* Build: Update markdownlint dependency (fixes #3954) (David Anson)
-* Update: `no-mixed-require` to have non boolean option (fixes #3922) (Gyandeep Singh)
-* Fix: trailing spaces auto fix to check for line breaks (fixes #3940) (Gyandeep Singh)
-* Update: Add `typeof` option to `no-undef` rule (fixes #3684) (Gyandeep Singh)
-* Docs: Fix explanation and typos for accessor-pairs (alberto)
-* Docs: Fix typos for camelcase (alberto)
-* Docs: Fix typos for max-statements (Danny Guo)
-* Update: Implement auto fix for object-curly-spacing (fixes #3857) (alberto)
-* Update: Implement auto fix for array-bracket-spacing rule (fixes #3858) (alberto)
-* Fix: Add schema to `global-require` rule (fixes #3923) (Gyandeep Singh)
-* Update: Apply lazy loading for rules (fixes #3930) (Gyandeep Singh)
-* Docs: Fix typo for arrow-spacing (Danny Guo)
-* Docs: Fix typos for wrap-regex (Danny Guo)
-* Docs: Fix explanation for space-before-keywords (Danny Guo)
-* Docs: Fix typos for operator-linebreak (Danny Guo)
-* Docs: Fix typos for callback-return (Danny Guo)
-* Fix: no-trailing-spaces autofix to account for blank lines (fixes #3912) (Gyandeep Singh)
-* Docs: Fix example in no-negated-condition.md (fixes #3908) (alberto)
-* Update:warn message use @return when prefer.returns=return (fixes #3889) (闲耘™)
-* Update: Implement auto fix for generator-star-spacing rule (fixes #3873) (alberto)
-* Update: Implement auto fix for arrow-spacing rule (fixes #3860) (alberto)
-* Update: Implement auto fix for block-spacing rule (fixes #3859) (alberto)
-* Fix: Support allman style for switch statement (fixes #3903) (Gyandeep Singh)
-* New: no-negated-condition rule (fixes #3740) (alberto)
-* Docs: Fix typo in blog post template (Nicholas C. Zakas)
-* Update: Add env 'nashorn' to support Java 8 Nashorn Engine (fixes #3874) (Benjamin Winterberg)
-* Docs: Prepare for rule doc linting (refs #2271) (Ian VanSchooten)
-
-v1.5.1 - September 22, 2015
-
-* Fix: valid-jsdoc fix for param with properties (fixes #3476) (Gyandeep Singh)
-* Fix: valid-jsdoc error with square braces (fixes #2270) (Gyandeep Singh)
-* Upgrade: `doctrine` to 0.7.0 (fixes #3891) (Gyandeep Singh)
-* Fix: `space-before-keywords` had been wrong on getters (fixes #3854) (Toru Nagashima)
-* Fix: `no-dupe-args` had been wrong for nested destructure (fixes #3867) (Toru Nagashima)
-* Docs: io.js is the new Node.js (thefourtheye)
-* Docs: Fix method signature on working-with-rules docs (fixes #3862) (alberto)
-* Docs: Add related ternary links (refs #3835) (Ian VanSchooten)
-* Fix: don’t ignore config if cwd is the home dir (fixes #3846) (Mathias Schreck)
-* Fix: `func-style` had been warning arrows with `this` (fixes #3819) (Toru Nagashima)
-* Fix: `space-before-keywords`; allow opening curly braces (fixes #3789) (Marko Raatikka)
-* Build: Fix broken .gitattributes generation (fixes #3566) (Nicholas C. Zakas)
-* Build: Fix formatter docs generation (fixes #3847) (Nicholas C. Zakas)
-
-v1.5.0 - September 18, 2015
-
-* Fix: invalidate cache when config changes. (fixes #3770) (royriojas)
-* Fix: function body indent issues (fixes #3614, fixes #3799) (Gyandeep Singh)
-* Update: Add configuration option to `space-before-blocks` (fixes #3758) (Phil Vargas)
-* Fix: space checking between tokens (fixes #2211) (Nicholas C. Zakas)
-* Fix: env-specified ecmaFeatures had been wrong (fixes #3735) (Toru Nagashima)
-* Docs: Change example wording from warnings to problems (fixes #3676) (Ian VanSchooten)
-* Build: Generate formatter example docs (fixes #3560) (Ian VanSchooten)
-* New: Add --debug flag to CLI (fixes #2692) (Nicholas C. Zakas)
-* Docs: Update no-undef-init docs (fixes #3170) (Nicholas C. Zakas)
-* Docs: Update no-unused-expressions docs (fixes #3685) (Nicholas C. Zakas)
-* Docs: Clarify node types in no-multi-spaces (fixes #3781) (Nicholas C. Zakas)
-* Docs: Update new-cap docs (fixes #3798) (Nicholas C. Zakas)
-* Fix: `space-before-blocks` had conflicted `arrow-spacing` (fixes #3769) (Toru Nagashima)
-* Fix: `comma-dangle` had not been checking imports/exports (fixes #3794) (Toru Nagashima)
-* Fix: tests fail due to differences in temporary paths. (fixes #3778) (royriojas)
-* Fix: Directory ignoring should work (fixes #3812) (Nicholas C. Zakas)
-* Fix: Ensure **/node_modules works in ignore files (fixes #3788) (Nicholas C. Zakas)
-* Update: Implement auto fix for `space-infix-ops` rule (fixes #3801) (Gyandeep Singh)
-* Fix: `no-warning-comments` can't be set via config comment (fixes #3619) (Burak Yigit Kaya)
-* Update: `key-spacing` should allow 1+ around colon (fixes #3363) (Burak Yigit Kaya)
-* Fix: false alarm of semi-spacing with semi set to never (fixes #1983) (Chen Yicai)
-* Fix: Ensure ./ works correctly with CLI (fixes #3792) (Nicholas C. Zakas)
-* Docs: add more examples + tests for block-scoped-var (fixes #3791) (JT)
-* Update: Implement auto fix for `indent` rule (fixes #3734) (Gyandeep Singh)
-* Fix: `space-before-keywords` fails to handle some cases (fixes #3756) (Marko Raatikka)
-* Docs: Add if-else example (fixes #3722) (Ian VanSchooten)
-* Fix: jsx-quotes exception for attributes without value (fixes #3793) (Mathias Schreck)
-* Docs: Fix closing code fence on cli docs (Ian VanSchooten)
-* Update: Implement auto fix for `space-before-blocks` rule (fixes #3776) (Gyandeep Singh)
-* Update: Implement auto fix for `space-after-keywords` rule (fixes #3773) (Gyandeep Singh)
-* Fix: `semi-spacing` had conflicted with `block-spacing` (fixes #3721) (Toru Nagashima)
-* Update: Implement auto fix for `space-before-keywords` rule (fixes #3771) (Gyandeep Singh)
-* Update: auto fix for space-before-function-paren rule (fixes #3766) (alberto)
-* Update: Implement auto fix for `no-extra-semi` rule (fixes #3745) (Gyandeep Singh)
-* Update: Refactors the traversing logic (refs #3530) (Toru Nagashima)
-* Update: Implement auto fix for `space-return-throw-case` (fixes #3732) (Gyandeep Singh)
-* Update: Implement auto fix for `no-spaced-func` rule (fixes #3728) (Gyandeep Singh)
-* Update: Implement auto fix for `eol-last` rule (fixes #3725) (Gyandeep Singh)
-* Update: Implement auto fix for `no-trailing-spaces` rule (fixes #3723) (Gyandeep Singh)
-
-v1.4.3 - September 15, 2015
-
-* Fix: Directory ignoring should work (fixes #3812) (Nicholas C. Zakas)
-* Fix: jsx-quotes exception for attributes without value (fixes #3793) (Mathias Schreck)
-
-v1.4.2 - September 15, 2015
-
-* Fix: Ensure **/node_modules works in ignore files (fixes #3788) (Nicholas C. Zakas)
-* Fix: Ensure ./ works correctly with CLI (fixes #3792) (Nicholas C. Zakas)
-
-v1.4.1 - September 11, 2015
-
-* Fix: CLIEngine default cache parameter name (fixes #3755) (Daniel G. Taylor)
-* Fix: Glob pattern from .eslintignore not applied (fixes #3750) (Burak Yigit Kaya)
-* Fix: Skip JSDoc from NewExpression (fixes #3744) (Nicholas C. Zakas)
-* Docs: Shorten and simplify autocomment for new issues (Nicholas C. Zakas)
-
-v1.4.0 - September 11, 2015
-
-* Docs: Add new formatters to API docs (Ian VanSchooten)
-* New: Implement autofixing (fixes #3134) (Nicholas C. Zakas)
-* Fix: Remove temporary `"allow-null"` (fixes #3705) (Toru Nagashima)
-* Fix: `no-unused-vars` had been crashed at `/*global $foo*/` (fixes #3714) (Toru Nagashima)
-* Build: check-commit now checks commit message length. (fixes #3706) (Kevin Partington)
-* Fix: make getScope acquire innermost scope (fixes #3700) (voideanvalue)
-* Docs: Fix spelling mistake (domharrington)
-* Fix: Allow whitespace in rule message parameters. (fixes #3690) (Kevin Partington)
-* Fix: Eqeqeq rule with no option does not warn on 'a == null' (fixes #3699) (fediev)
-* Fix: `no-unused-expressions` with `allowShortCircuit` false positive if left has no effect (fixes #3675) (Toru Nagashima)
-* Update: Add Node 4 to travis builds (fixes #3697) (Ian VanSchooten)
-* Fix: Not check for punctuator if on same line as last var (fixes #3694) (Gyandeep Singh)
-* Docs: Make `quotes` docs clearer (fixes #3646) (Nicholas C. Zakas)
-* Build: Increase mocha timeout (fixes #3692) (Nicholas C. Zakas)
-* Fix: `no-extra-bind` to flag all arrow funcs (fixes #3672) (Nicholas C. Zakas)
-* Docs: Update README with release and sponsor info (Nicholas C. Zakas)
-* Fix: `object-curly-spacing` had been crashing on an empty object pattern (fixes #3658) (Toru Nagashima)
-* Fix: `no-extra-parens` false positive at IIFE with member accessing (fixes #3653) (Toru Nagashima)
-* Fix: `comma-dangle` with `"always"`/`"always-multiline"` false positive after a rest element (fixes #3627) (Toru Nagashima)
-* New: `jsx-quotes` rule (fixes #2011) (Mathias Schreck)
-* Docs: Add linting for second half of rule docs (refs #2271) (Ian VanSchooten)
-* Fix: `no-unused-vars` had not shown correct locations for `/*global` (fixes #3617) (Toru Nagashima)
-* Fix: `space-after-keywords` not working for `catch` (fixes #3654) (Burak Yigit Kaya)
-* Fix: Incorrectly warning about ignored files (fixes #3649) (Burak Yigit Kaya)
-* Fix: Indent rule VariableDeclarator doesn't apply to arrow functions (fixes #3661) (Burak Yigit Kaya)
-* Upgrade: Consuming handlebars@^4.0.0 (fixes #3632) (Kevin Partington)
-* Docs: Fixing typos in plugin processor section. (fixes #3648) (Kevin Partington)
-* Fix: Invalid env keys would cause an unhandled exception.(fixes #3265) (Ray Booysen)
-* Docs: Fixing broken link in documentation (Ilya Volodin)
-* Update: Check for default assignment in no-unneeded-ternary (fixes #3232) (cjihrig)
-* Fix: `consistent-as-needed` mode with `keyword: true` (fixes #3636) (Alex Guerrero)
-* New: Implement cache in order to only operate on changed files since previous run. (fixes #2998) (Roy Riojas)
-* Update: Grouping related CLI options. (fixes #3612) (Kevin Partington)
-* Update: Using @override does not require @param or @returns (fixes #3629) (Whitney Young)
-* Docs: Use eslint-env in no-undef (fixes #3616) (Ian VanSchooten)
-* New: `require-jsdoc` rule (fixes #1842) (Gyandeep Singh)
-* New: Support glob path on command line (fixes #3402) (Burak Yigit Kaya)
-* Update: Short circuit and ternary support in no-unused-expressions (fixes #2733) (David Warkentin)
-* Docs: Replace to npmjs.com (Ryuichi Okumura)
-* Fix: `indent` should only indent chain calls if the first call is single line (fixes #3591) (Burak Yigit Kaya)
-* Fix: `quote-props` should not crash for object rest spread syntax (fixes #3595) (Joakim Carlstein)
-* Update: Use `globals` module for the `commonjs` globals (fixes #3606) (Sindre Sorhus)
-* New: `no-restricted-syntax` rule to forbid certain syntax (fixes #2422) (Burak Yigit Kaya)
-* Fix: `no-useless-concat` false positive at numbers (fixes #3575, fixes #3589) (Toru Nagashima)
-* New: Add --max-warnings flag to CLI (fixes #2769) (Kevin Partington)
-* New: Add `parser` as an option (fixes #3127) (Gyandeep Singh)
-* New: `space-before-keywords` rule (fixes #1631) (Marko Raatikka)
-* Update: Allowing inline comments to disable eslint rules (fixes #3472) (Whitney Young)
-* Docs: Including for(;;) as valid case in no-constant-condition (Kevin Partington)
-* Update: Add quotes around the label in `no-redeclare` error messages (fixes #3583) (Ian VanSchooten)
-* Docs: correct contributing URL (Dieter Luypaert)
-* Fix: line number for duplicate object keys error (fixes #3573) (Elliot Lynde)
-* New: global-require rule (fixes #2318) (Jamund Ferguson)
-
-v1.3.1 - August 29, 2015
-
-* Fix: `indent` to not crash on empty files (fixes #3570) (Gyandeep Singh)
-* Fix: Remove unused config file (fixes #2227) (Gyandeep Singh)
-
-v1.3.0 - August 28, 2015
-
-* Build: Autogenerate release blog post (fixes #3562) (Nicholas C. Zakas)
-* New: `no-useless-concat` rule (fixes #3506) (Henry Zhu)
-* Update: Add `keywords` flag to `consistent-as-needed` mode in `quote-props` (fixes #3532) (Burak Yigit Kaya)
-* Update: adds `numbers` option to quote-props (fixes #2914) (Jose Roberto Vidal)
-* Fix: `quote-props` rule should ignore computed and shorthand properties (fixes #3557) (fixes #3544) (Burak Yigit Kaya)
-* Docs: Add config comments for rule examples 'accessor-pairs' to 'no-extra-semi' (refs #2271) (Ian VanSchooten)
-* Update: Return to accept `undefined` type (fixes #3382) (Gyandeep Singh)
-* New: Added HTML formatter (fixes #3505) (Julian Laval)
-* Fix: check space after yield keyword in space-unary-ops (fixes #2707) (Mathias Schreck)
-* Docs: (curly) Fix broken code in example (Kent C. Dodds)
-* Update: Quote var name in `no-unused-vars` error messages (refs #3526) (Burak Yigit Kaya)
-* Update: Move methods to SourceCode (fixes #3516) (Nicholas C. Zakas)
-* Fix: Don't try too hard to find fault in `no-implicit-coercion` (refs #3402) (Burak Yigit Kaya)
-* Fix: Detect ternary operator in operator-linebreak rule (fixes #3274) (Burak Yigit Kaya)
-* Docs: Clearer plugin rule configuration (fixes #2022) (Nicholas C. Zakas)
-* Update: Add quotes around the label in `no-empty-label` error reports (fixes #3526) (Burak Yigit Kaya)
-* Docs: Turn off Liquid in example (Nicholas C. Zakas)
-* Docs: Mention CommonJS along with Node.js (fixes #3388) (Nicholas C. Zakas)
-* Docs: Make it clear which rules are recommended (fixes #3398) (Nicholas C. Zakas)
-* Docs: Add links to JSON Schema resources (fixes #3411) (Nicholas C. Zakas)
-* Docs: Add more info to migration guide (fixes #3439) (Nicholas C. Zakas)
-* Fix: ASI indentation issue (fixes #3514) (Burak Yigit Kaya)
-* Fix: Make `no-implicit-coercion` smarter about numerical expressions (fixes #3510) (Burak Yigit Kaya)
-* Fix: `prefer-template` had not been handling TemplateLiteral as literal node (fixes #3507) (Toru Nagashima)
-* Update: `newline-after-var` Allow comment + blank after var (fixes #2852) (Ian VanSchooten)
-* Update: Add `unnecessary` option to `quote-props` (fixes #3381) (Burak Yigit Kaya)
-* Fix: `indent` shouldn't check the last line unless it is a punctuator (fixes #3498) (Burak Yigit Kaya)
-* Fix: `indent` rule does not indent when doing multi-line chain calls (fixes #3279) (Burak Yigit Kaya)
-* Fix: sort-vars rule fails when memo is undefined (fixes #3474) (Burak Yigit Kaya)
-* Fix: `brace-style` doesn't report some closing brace errors (fixes #3486) (Burak Yigit Kaya)
-* Update: separate options for block and line comments in `spaced-comment` rule (fixes #2897) (Burak Yigit Kaya)
-* Fix: `indent` does not check FunctionDeclaration nodes properly (fixes #3173) (Burak Yigit Kaya)
-* Update: Added "properties" option to `id-length` rule to ignore property names. (fixes #3450) (Mathieu M-Gosselin)
-* Update: add new ignore pattern options to no-unused-vars (fixes #2321) (Mathias Schreck)
-* New: Protractor environment (fixes #3457) (James Whitney)
-* Docs: Added section to shareable config (Gregory Waxman)
-* Update: Allow pre-parsed code (fixes #1025, fixes #948) (Nicholas C. Zakas)
-
-v1.2.1 - August 20, 2015
-
-* Fix: "key-spacing" crashes eslint on object literal shorthand properties (fixes #3463) (Burak Yigit Kaya)
-* Fix: ignore leading space check for `null` elements in comma-spacing (fixes #3392) (Mathias Schreck)
-* Fix: `prefer-arrow-callback` false positive at recursive functions (fixes #3454) (Toru Nagashima)
-* Fix: one-var rule doesn’t have default options (fixes #3449) (Burak Yigit Kaya)
-* Fix: Refactor `no-duplicate-case` to be simpler and more efficient (fixes #3440) (Burak Yigit Kaya)
-* Docs: Fix trailing spaces in README (Nicholas C. Zakas)
-* Docs: Update gyandeeps and add byk (Nicholas C. Zakas)
-* Docs: Update plugins documentation for 1.0.0 (Nicholas C. Zakas)
-* Docs: `object-curly-spacing` doc is inaccurate about exceptions (Burak Yigit Kaya)
-* Fix: `object-curly-spacing` shows the incorrect column for opening brace (fixes #3438) (Burak Yigit Kaya)
-
-v1.2.0 - August 18, 2015
-
-* Update: add support for semicolon in comma-first setup in indent rule (fixes #3423) (Burak Yigit Kaya)
-* Docs: better JSDoc for indent rule (Burak Yigit Kaya)
-* Docs: Document the second argument of `CLIEngine.executeOnText()` (Sindre Sorhus)
-* New: `no-dupe-class-members` rule (fixes #3294) (Toru Nagashima)
-* Fix: exclude `AssignmentExpression` and `Property` nodes from extra indentation on first line (fixes #3391) (Burak Yigit Kaya)
-* Update: Separate indent options for var, let and const (fixes #3339) (Burak Yigit Kaya)
-* Fix: Add AssignmentPattern to space-infix-ops (fixes #3380) (Burak Yigit Kaya)
-* Docs: Fix typo: exception label (tienslebien)
-* Update: Clean up tests for CLI config support (refs #2543) (Gyandeep Singh)
-* New: `block-spacing` rule (fixes #3303) (Toru Nagashima)
-* Docs: Update docs for no-iterator (fixes #3405) (Nicholas C. Zakas)
-* Upgrade: bump `espree` dependency to `2.2.4` (fixes #3403) (Burak Yigit Kaya)
-* Fix: false positive on switch 'no duplicate case', (fixes #3408) (Cristian Carlesso)
-* Fix: `valid-jsdoc` test does not recognize aliases for `@param` (fixes #3399) (Burak Yigit Kaya)
-* New: enable `-c` flag to accept a shareable config (fixes #2543) (Shinnosuke Watanabe)
-* Fix: Apply plugin given in CLI (fixes #3383) (Ian VanSchooten)
-* New: Add commonjs environment (fixes #3377) (Nicholas C. Zakas)
-* Docs: Update no-unused-var docs (Nicholas C. Zakas)
-* Fix: trailing commas in object-curly-spacing for import/export (fixes #3324) (Henry Zhu)
-* Update: Make `baseConfig` to behave as other config options (fixes #3371) (Gyandeep Singh)
-* Docs: Add "Compatibility" section to linebreak-style (Vitor Balocco)
-* New: `prefer-arrow-callback` rule (fixes #3140) (Toru Nagashima)
-* Docs: Clarify what an unused var is (fixes #2342) (Nicholas C. Zakas)
-* Docs: Mention double-byte character limitation in max-len (fixes #2370) (Nicholas C. Zakas)
-* Fix: object curly spacing incorrectly warning for import with default and multiple named specifiers (fixes #3370) (Luke Karrys)
-* Fix: Indent rule errors with array of objects (fixes #3329) (Burak Yigit Kaya)
-* Update: Make it clear that `space-infix-ops` support `const` (fixes #3299) (Burak Yigit Kaya)
-* New: `prefer-template` rule (fixes #3014) (Toru Nagashima)
-* Docs: Clarify `no-process-env` docs (fixes #3318) (Nicholas C. Zakas)
-* Docs: Fix arrow name typo (fixes #3309) (Nicholas C. Zakas)
-* Update: Improve error message for `indent` rule violation (fixes #3340) (Burak Yigit Kaya)
-* Fix: radix rule does not apply for Number.parseInt (ES6) (fixes #3364) (Burak Yigit Kaya)
-* Fix: `key-spacing.align` doesn't pay attention to non-whitespace before key (fixes #3267) (Burak Yigit Kaya)
-* Fix: arrow-parens & destructuring/default params (fixes #3353) (Jamund Ferguson)
-* Update: Add support for Allman to brace-style rule, brackets on newline (fixes #3347) (Burak Yigit Kaya)
-* Fix: Regression no-catch-shadow (1.1.0) (fixes #3322) (Burak Yigit Kaya)
-* Docs: remove note outdated in 1.0.0 (Denis Sokolov)
-* Build: automatically convert line endings in release script (fixes #2642) (Burak Yigit Kaya)
-* Update: allow disabling new-cap on object methods (fixes #3172) (Burak Yigit Kaya)
-* Update: Improve checkstyle format (fixes #3183) (Burak Yigit Kaya)
-* Fix: Indent rule errors if an array literal starts a new statement (fixes #3328) (Burak Yigit Kaya)
-* Update: Improve validation error messages (fixes #3193) (Burak Yigit Kaya)
-* Docs: fix syntax error in space-before-function-paren (Fabrício Matté)
-* Fix: `indent` rule to check for last line correctly (fixes #3327) (Gyandeep Singh)
-* Fix: Inconsistent off-by-one errors with column numbers (fixes #3231) (Burak Yigit Kaya)
-* Fix: Keyword "else" must not be followed by a newline (fixes #3226) (Burak Yigit Kaya)
-* Fix: `id-length` does not work for most of the new ES6 patterns (fixes #3286) (Burak Yigit Kaya)
-* Fix: Spaced Comment Exceptions Not Working (fixes #3276) (Jamund Ferguson)
-
-v1.1.0 - August 7, 2015
-
-* Update: Added as-needed option to arrow-parens (fixes #3277) (Jamund Ferguson)
-* Fix: curly-spacing missing import case (fixes #3302) (Jamund Ferguson)
-* Fix: `eslint-env` in comments had not been setting `ecmaFeatures` (fixes #2134) (Toru Nagashima)
-* Fix: `es6` env had been missing `spread` and `newTarget` (fixes #3281) (Toru Nagashima)
-* Fix: Report no-spaced-func on last token before paren (fixes #3289) (Benjamin Woodruff)
-* Fix: Check for null elements in indent rule (fixes #3272) (Gyandeep Singh)
-* Docs: Use backticks for option heading (Gyandeep Singh)
-* Fix: `no-invalid-this` had been missing jsdoc comment (fixes #3287) (Toru Nagashima)
-* Fix: `indent` rule for multi-line objects and arrays (fixes #3236) (Gyandeep Singh)
-* Update: add new `multi-or-nest` option for the `curly` rule (fixes #1806) (Ivan Nikulin)
-* Fix: `no-cond-assign` had been missing simplest pattern (fixes #3249) (Toru Nagashima)
-* Fix: id-length rule doesn't catch violations in arrow function parameters (fixes #3275) (Burak Yigit Kaya)
-* New: Added grep-style formatter (fixes #2991) (Nobody Really)
-* Update: Split out generic AST methods into utility (fixes #962) (Gyandeep Singh)
-* Fix: `accessor-pairs` false positive (fixes #3262) (Toru Nagashima)
-* Fix: `context.getScope()` returns correct scope in blockBindings (fixes #3254) (Toru Nagashima)
-* Update: Expose `getErrorResults` as a static method on `CLIEngine` (fixes #3242) (Gyandeep Singh)
-* Update: Expose `getFormatter` as a static method on `CLIEngine` (fixes #3239) (Gyandeep Singh)
-* Docs: use correct encoding for id-match.md (fixes #3246) (Matthieu Larcher)
-* Docs: place id-match rule at correct place in README.md (fixes #3245) (Matthieu Larcher)
-* Docs: Update no-proto.md (Joe Zimmerman)
-* Docs: Fix typo in object-shorthand docs (Gunnar Lium)
-* Upgrade: inquirer dependency (fixes #3241) (Gyandeep Singh)
-* Fix: `indent` rule for objects and nested one line blocks (fixes #3238, fixes #3237) (Gyandeep Singh)
-* Docs: Fix wrong options in examples of key-spacing (keik)
-* Docs: Adds missing "not" to semi.md (Marius Schulz)
-* Docs: Update no-multi-spaces.md (Kenneth Powers)
-* Fix: `indent` to not error on same line nodes (fixes #3228) (Gyandeep Singh)
-* New: Jest environment (fixes #3212) (Darshak Parikh)
-
-v1.0.0 - July 31, 2015
-
-* Update: merge `no-reserved-keys` into `quote-props` (fixes #1539) (Jose Roberto Vidal)
-* Fix: `indent` error message (fixes #3220) (Gyandeep Singh)
-* Update: Add embertest env (fixes #3205) (ismay)
-* Docs: Correct documentation errors for `id-length` rule. (Jess Telford)
-* Breaking: `indent` rule to have node specific options (fixes #3210) (Gyandeep Singh)
-* Fix: space-after-keyword shouldn't allow newlines (fixes #3198) (Brandon Mills)
-* New: Add JSON formatter (fixes #3036) (Burak Yigit Kaya)
-* Breaking: Switch to RuleTester (fixes #3186) (Nicholas C. Zakas)
-* Breaking: remove duplicate warnings of `no-undef` from `block-scoped-var` (fixes #3201) (Toru Nagashima)
-* Fix: `init-declarations` ignores in for-in/of (fixes #3202) (Toru Nagashima)
-* Fix: `quotes` with `"backtick"` ignores ModuleSpecifier and LiteralPropertyName (fixes #3181) (Toru Nagashima)
-* Fix: space-in-parens in Template Strings (fixes #3182) (Ian VanSchooten)
-* Fix: Check for concatenation in no-throw-literal (fixes #3099, fixes #3101) (Ian VanSchooten)
-* Build: Remove `eslint-tester` from devDependencies (fixes #3189) (Gyandeep Singh)
-* Fix: Use new ESLintTester (fixes #3187) (Nicholas C. Zakas)
-* Update: `new-cap` supports fullnames (fixes #2584) (Toru Nagashima)
-* Fix: Non object rule options merge (fixes #3179) (Gyandeep Singh)
-* New: add id-match rule (fixes #2829) (Matthieu Larcher)
-* Fix: Rule options merge (fixes #3175) (Gyandeep Singh)
-* Fix: `spaced-comment` allows a mix of markers and exceptions (fixes #2895) (Toru Nagashima)
-* Fix: `block-scoped-var` issues (fixes #2253, fixes #2747, fixes #2967) (Toru Nagashima)
-* New: Add id-length rule (fixes #2784) (Burak Yigit Kaya)
-* Update: New parameters for quote-props rule (fixes #1283, fixes #1658) (Tomasz Olędzki)
-
-v1.0.0-rc-3 - July 24, 2015
-
-* Fix: Make Chai and Mocha as a dependency (fixes #3156) (Gyandeep Singh)
-* Fix: traverse `ExperimentalSpread/RestProperty.argument` (fixes #3157) (Toru Nagashima)
-* Fix: Check shareable config package prefix correctly (fixes #3146) (Gyandeep Singh)
-* Update: move redeclaration checking for builtins (fixes #3070) (Toru Nagashima)
-* Fix: `quotes` with `"backtick"` allows directive prologues (fixes #3132) (Toru Nagashima)
-* Fix: `ESLintTester` path in exposed API (fixes #3149) (Gyandeep Singh)
-* Docs: Remove AppVeyor badge (Gyandeep Singh)
-* Fix: Check no-new-func on CallExpressions (fixes #3145) (Benjamin Woodruff)
-
-v1.0.0-rc-2 - July 23, 2015
-
-* Docs: Mention eslint-tester in migration guide (Nicholas C. Zakas)
-* Docs: Mention variables defined in a global comment (fixes #3137) (William Becker)
-* Docs: add documentation about custom-formatters. (fixes #1260) (royriojas)
-* Fix: Multi-line variable declarations indent (fixes #3139) (Gyandeep Singh)
-* Fix: handles blocks in no-use-before-define (fixes #2960) (Jose Roberto Vidal)
-* Update: `props` option of `no-param-reassign` (fixes #1600) (Toru Nagashima)
-* New: Support shared configs named `@scope/eslint-config`, with shortcuts of `@scope` and `@scope/` (fixes #3123) (Jordan Harband)
-* New: Add ignorePattern, ignoreComments, and ignoreUrls options to max-len (fixes #2934, fixes #2221, fixes #1661) (Benjamin Woodruff)
-* Build: Increase Windows Mocha timeout (fixes #3133) (Ian VanSchooten)
-* Docs: incorrect syntax in the example for rule «one-var» (Alexander Burtsev)
-* Build: Check commit message format at end of tests (fixes #3058) (Ian VanSchooten)
-* Update: Move eslint-tester into repo (fixes #3110) (Nicholas C. Zakas)
-* Fix: Not load configs outside config with `root: true` (fixes #3109) (Gyandeep Singh)
-* Docs: Add config information to README (fixes #3074) (Nicholas C. Zakas)
-* Docs: Add mysticatea as committer (Nicholas C. Zakas)
-* Docs: Grammar fixes in rule descriptions (refs #3038) (Greg Cochard)
-* Fix: Update sort-vars to ignore Array and ObjectPattern (fixes #2954) (Harry Ho)
-* Fix: block-scoped-var rule incorrectly flagging break/continue with label (fixes #3082) (Aparajita Fishman)
-* Fix: spaces trigger wrong in `no-useless-call` and `prefer-spread` (fixes #3054) (Toru Nagashima)
-* Fix: `arrow-spacing` allow multi-spaces and line-endings (fixes #3079) (Toru Nagashima)
-* Fix: add missing loop scopes to one-var (fixes #3073) (Jose Roberto Vidal)
-* New: the `no-invalid-this` rule (fixes #2815) (Toru Nagashima)
-* Fix: allow empty loop body in no-extra-semi (fixes #3075) (Mathias Schreck)
-* Update: Add qunit to environments (fixes #2870) (Nicholas C. Zakas)
-* Fix: `space-before-blocks` to consider classes (fixes #3062) (Gyandeep Singh)
-* Fix: Include phantomjs globals (fixes #3064) (Linus Unnebäck)
-* Fix: no-else-return handles multiple else-if blocks (fixes #3015) (Jose Roberto Vidal)
-* Fix: `no-*-assgin` rules support destructuring (fixes #3029) (Toru Nagashima)
-* New: the `no-implicit-coercion` rule (fixes #1621) (Toru Nagashima)
-* Fix: Make no-implied-eval match more types of strings (fixes #2898) (Benjamin Woodruff)
-* Docs: Clarify that bot message is automatic (Ian VanSchooten)
-* Fix: Skip rest properties in no-dupe-keys (fixes 3042) (Nicholas C. Zakas)
-* Docs: New issue template (fixes #3048) (Nicholas C. Zakas)
-* Fix: strict rule supports classes (fixes #2977) (Toru Nagashima)
-* New: the `prefer-reflect` rule (fixes #2939) (Keith Cirkel)
-* Docs: make grammar consistent in rules index (Greg Cochard)
-* Docs: Fix unmatched paren in rule description (Greg Cochard)
-* Docs: Small typo fix in no-useless-call documentation (Paul O’Shannessy)
-* Build: readd phantomjs dependency with locked down version (fixes #3026) (Mathias Schreck)
-* Docs: Add IanVS as committer (Nicholas C. Zakas)
-* docs: additional computed-property-spacing documentation (fixes #2941) (Jamund Ferguson)
-* Docs: Add let and const examples for newline-after-var (fixes #3020) (James Whitney)
-* Build: Remove unnecessary phantomjs devDependency (fixes #3021) (Gyandeep Singh)
-* Update: added shared builtins list (fixes #2972) (Jose Roberto Vidal)
-
-v1.0.0-rc-1 - July 15, 2015
-
-* Upgrade: Espree to 2.2.0 (fixes #3011) (Nicholas C. Zakas)
-* Docs: fix a typo (bartmichu)
-* Fix: indent rule should recognize single line statements with ASI (fixes #3001, fixes #3000) (Mathias Schreck)
-* Update: Handle CRLF line endings in spaced-comment rule - 2 (fixes #3005) (Burak Yigit Kaya)
-* Fix: Indent rule error on empty block body (fixes #2999) (Gyandeep Singh)
-* New: the `no-class-assign` rule (fixes #2718) (Toru Nagashima)
-* New: the `no-const-assign` rule (fixes #2719) (Toru Nagashima)
-* Docs: Add 1.0.0 migration guide (fixes #2994) (Nicholas C. Zakas)
-* Docs: Update changelog for 0.24.1 (fixes #2976) (Nicholas C. Zakas)
-* Breaking: Remove deprecated rules (fixes #1898) (Ian VanSchooten)
-* Fix: multi-line + fat arrow indent (fixes #2239) (Gyandeep Singh)
-* Breaking: Create eslint:recommended and add to --init (fixes #2713) (Greg Cochard)
-* Fix: Indent rule (fixes #1797, fixes #1799, fixes #2248, fixes #2343, fixes #2278, fixes #1800) (Gyandeep Singh)
-* New: `context.getDeclaredVariables(node)` (fixes #2801) (Toru Nagashima)
-* New: the `no-useless-call` rule (fixes #1925) (Toru Nagashima)
-* New: the `prefer-spread` rule (fixes #2946) (Toru Nagashima)
-* Fix: `valid-jsdoc` counts `return` for arrow expressions (fixes #2952) (Toru Nagashima)
-* New: Add exported comment option (fixes #1200) (Jamund Ferguson)
-* Breaking: Default to --reset behavior (fixes #2100) (Brandon Mills)
-* New: Add arrow-parens and arrow-spacing rule (fixes #2628) (Jxck)
-* Fix: Shallow cloning issues in eslint config (fixes #2961) (Gyandeep Singh)
-* Add: Warn on missing rule definition or deprecation (fixes #1549) (Ian VanSchooten)
-* Update: adding some tests for no-redeclare to test named functions (fixes #2953) (Dominic Barnes)
-* New: Add support for root: true in config files (fixes #2736) (Ian VanSchooten)
-* Fix: workaround for leading and trailing comments in padded-block (fixes #2336 and fixes #2788) (Mathias Schreck)
-* Fix: object-shorthand computed props (fixes #2937) (Jamund Ferguson)
-* Fix: Remove invalid check inside `getJSDocComment` function (fixes #2938) (Gyandeep Singh)
-* Docs: Clarify when not to use space-before-blocks (Ian VanSchooten)
-* Update: `no-loop-func` allows block-scoped variables (fixes #2517) (Toru Nagashima)
-* Docs: remove mistaken "off by default" (Jan Schär)
-* Build: Add appveyor CI system (fixes #2923) (Gyandeep Singh)
-* Docs: Fix typo in the shareable configs doc (Siddharth Kannan)
-* Fix: max-len to report correct column number (fixes #2926) (Mathias Schreck)
-* Fix: add destructuring support to comma-dangle rule (fixes #2911) (Mathias Schreck)
-* Docs: clarification in no-unused-vars (Jan Schär)
-* Fix: `no-redeclare` checks module scopes (fixes #2903) (Toru Nagashima)
-* Docs: missing quotes in JSON (Jan Schär)
-* Breaking: Switch to 1-based columns (fixes #2284) (Nicholas C. Zakas)
-* Docs: array-bracket-spacing examples used space-in-brackets (Brandon Mills)
-* Docs: Add spaced-line-comment deprecation notice (Brandon Mills)
-* Docs: Add space-in-brackets deprecation notice (Brandon Mills)
-* Fix: Include execScript in no-implied-eval rule (fixes #2873) (Frederik Braun)
-* Fix: Support class syntax for line-around-comment rule (fixes #2894) (Gyandeep Singh)
-* Fix: lines-around-comment was crashing in some cases due to a missing check (fixes #2892) (Mathieu M-Gosselin)
-* New: Add init-declarations rule (fixes #2606) (cjihrig)
-* Docs: Fix typo in array-bracket-spacing rule (zallek)
-* Fix: Added missing export syntax support to the block-scoped-var rule. (fixes #2887) (Mathieu M-Gosselin)
-* Build: gensite target supports rule removal (refs #1898) (Brandon Mills)
-* Update: Handle CRLF line endings in spaced-comment rule (fixes #2884) (David Anson)
-* Update: Attach parent in getNodeByRangeIndex (fixes #2863) (Brandon Mills)
-* Docs: Fix typo (Bryan Smith)
-* New: Add serviceworker environment (fixes #2557) (Gyandeep Singh)
-* Fix: Yoda should ignore comparisons where both sides are constants (fixes #2867) (cjihrig)
-* Update: Loosens regex rules around intentional fall through comments (Fixes #2811) (greg5green)
-* Update: Add missing schema to rules (fixes #2858) (Ilya Volodin)
-* New: `require-yield` rule (fixes #2822) (Toru Nagashima)
-* New: add callback-return rule (fixes #994) (Jamund Ferguson)
-
-v0.24.1 - July 10, 2015
-
-* Docs: Clarify when not to use space-before-blocks (Ian VanSchooten)
-* Docs: remove mistaken "off by default" (Jan Schär)
-* Docs: remove mistaken "off by default" (Jan Schär)
-* Docs: Fix typo in the shareable configs doc (Siddharth Kannan)
-* Docs: clarification in no-unused-vars (Jan Schär)
-* Docs: missing quotes in JSON (Jan Schär)
-* Fix: Revert 1-based column changes in tests for patch (refs #2284) (Nicholas C. Zakas)
-* Fix: Shallow cloning issues in eslint config (fixes #2961) (Gyandeep Singh)
-* Fix: object-shorthand computed props (fixes #2937) (Jamund Ferguson)
-* Fix: Remove invalid check inside `getJSDocComment` function (fixes #2938) (Gyandeep Singh)
-* Fix: max-len to report correct column number (fixes #2926) (Mathias Schreck)
-* Fix: add destructuring support to comma-dangle rule (fixes #2911) (Mathias Schreck)
-* Fix: `no-redeclare` checks module scopes (fixes #2903) (Toru Nagashima)
-* Fix: Include execScript in no-implied-eval rule (fixes #2873) (Frederik Braun)
-* Fix: Support class syntax for line-around-comment rule (fixes #2894) (Gyandeep Singh)
-* Fix: lines-around-comment was crashing in some cases due to a missing check (fixes #2892) (Mathieu M-Gosselin)
-* Fix: Added missing export syntax support to the block-scoped-var rule. (fixes #2887) (Mathieu M-Gosselin)
-* Fix: Yoda should ignore comparisons where both sides are constants (fixes #2867) (cjihrig)
-* Docs: array-bracket-spacing examples used space-in-brackets (Brandon Mills)
-* Docs: Add spaced-line-comment deprecation notice (Brandon Mills)
-* Docs: Add space-in-brackets deprecation notice (Brandon Mills)
-
-v0.24.0 - June 26, 2015
-
-* Upgrade: eslint-tester to 0.8.1 (Nicholas C. Zakas)
-* Fix: no-dupe-args sparse array crash (fixes #2848) (Chris Walker)
-* Fix: space-after-keywords should ignore extra parens (fixes #2847) (Mathias Schreck)
-* New: add no-unexpected-multiline rule (fixes #746) (Glen Mailer)
-* Update: refactor handle-callback-err to improve performance (fixes #2841) (Mathias Schreck)
-* Fix: Add --init to the CLI options (fixes #2817) (Gyandeep Singh)
-* Update: Add `except-parens` option to `no-return-assign` rule (fixes #2809) (Toru Nagashima)
-* Fix: handle-callback-err missing arrow functions (fixes #2823) (Jamund Ferguson)
-* Fix: `no-extra-semi` in class bodies (fixes #2794) (Toru Nagashima)
-* Fix: Check type to be file when looking for config files (fixes #2790) (Gyandeep Singh)
-* Fix: valid-jsdoc to work for object getters (fixes #2407) (Gyandeep Singh)
-* Update: Add an option as an object to `generator-star-spacing` rule (fixes #2787) (Toru Nagashima)
-* Build: Update markdownlint dependency (David Anson)
-* Fix: context report message to handle more scenarios (fixes #2746) (Gyandeep Singh)
-* Update: Ignore JsDoc comments by default for `spaced-comment` (fixes #2766) (Gyandeep Singh)
-* Fix: one-var 'never' option for mixed initialization (Fixes #2786) (Ian VanSchooten)
-* Docs: Fix a minor typo in a prefer-const example (jviide)
-* Fix: comma-dangle always-multiline: no comma right before the last brace (fixes #2091) (Benoît Zugmeyer)
-* Fix: Allow blocked comments with markers and new-line (fixes #2777) (Gyandeep Singh)
-* Docs: small fix in quote-props examples (Jose Roberto Vidal)
-* Fix: object-shorthand rule should not warn for NFEs (fixes #2748) (Michael Ficarra)
-* Fix: arraysInObjects for object-curly-spacing (fixes #2752) (Jamund Ferguson)
-* Docs: Clarify --rule description (fixes #2773) (Nicholas C. Zakas)
-* Fix: object literals in arrow function bodies (fixes #2702) (Jose Roberto Vidal)
-* New: `constructor-super` rule (fixes #2720) (Toru Nagashima)
-* New: `no-this-before-super` rule (fixes #2721) (Toru Nagashima)
-* Fix: space-unary-ops flags expressions starting w/ keyword (fixes #2764) (Michael Ficarra)
-* Update: Add block options to `lines-around-comment` rule (fixes #2667) (Gyandeep Singh)
-* New: array-bracket-spacing (fixes #2226) (Jamund Ferguson)
-* Fix: No-shadow rule duplicating error messages (fixes #2706) (Aliaksei Shytkin)
-
-v0.23.0 - June 14, 2015
-
-* Build: Comment out auto publishing of release notes (refs #2640) (Ilya Volodin)
-* Fix: "extends" within package.json (fixes #2754) (Gyandeep Singh)
-* Upgrade: globals@8.0.0 (fixes #2759) (silverwind)
-* Docs: eol-last docs fix (fixes #2755) (Gyandeep Singh)
-* Docs: btmills is a reviewer (Nicholas C. Zakas)
-* Build: Revert lock io.js to v2.1.0 (refs #2745) (Brandon Mills)
-* New: computed-property-spacing (refs #2226) (Jamund Ferguson)
-* Build: Pin Sinon version (fixes #2742) (Ilya Volodin)
-* Fix: `prefer-const` treats `for-in`/`for-of` with the same way (Fixes #2739) (Toru Nagashima)
-* Docs: Add links to team members profile (Gyandeep Singh)
-* Docs: add team and ES7 info to readme (Nicholas C. Zakas)
-* Fix: don't try to strip "line:" prefix from parser errors with no such prefix (fixes #2698) (Tim Cuthbertson)
-* Fix: never ignore config comment options (fixes #2725) (Brandon Mills)
-* Update: Add clarification to spaced-comment (refs #2588) (Greg Cochard)
-* Update: Add markers to spaced-comment (fixes #2588) (Greg Cochard)
-* Fix: no-trailing-spaces now handles skipBlankLines (fixes #2575) (Greg Cochard)
-* Docs: Mark global-strict on by default (fixes #2629) (Ilya Volodin)
-* New: Allow extends to be an array (fixes #2699) (Justin Morris)
-* New: globals@7.1.0 (fixes #2682) (silverwind)
-* New: `prefer-const` rule (fixes #2333) (Toru Nagashima)
-* Fix: remove hard-coded list of unary keywords in space-unary-ops rule (fixes #2696) (Tim Cuthbertson)
-* Breaking: Automatically validate rule options (fixes #2595) (Brandon Mills)
-* Update: no-lone-blocks does not report block-level scopes (fixes #2119) (Jose Roberto Vidal)
-* Update: yoda onlyEquality option (fixes #2638) (Denis Sokolov)
-* Docs: update comment to align with source code it's referencing (Michael Ficarra)
-* Fix: Misconfigured default option for lines-around-comment rule (fixes #2677) (Gyandeep Singh)
-* Fix: `no-shadow` allows shadowing in the TDZ (fixes #2568) (Toru Nagashima)
-* New: spaced-comment rule (fixes #1088) (Gyandeep Singh)
-* Fix: Check unused vars in exported functions (fixes #2678) (Gyandeep Singh)
-* Build: Stringify payload of release notes (fixes #2640) (Greg Cochard)
-* Fix: Allowing u flag in regex to properly lint no-empty-character-class (fixes #2679) (Dominic Barnes)
-* Docs: deprecate no-wrap-func (fixes #2644) (Jose Roberto Vidal)
-* Docs: Fixing grammar: then -> than (E)
-* Fix: trailing commas in object-curly-spacing (fixes #2647) (Jamund Ferguson)
-* Docs: be consistent about deprecation status (Matthew Dapena-Tretter)
-* Docs: Fix mistakes in object-curly-spacing docs (Matthew Dapena-Tretter)
-* New: run processors when calling executeOnText (fixes #2331) (Mordy Tikotzky)
-* Update: move executeOnText() tests to the correct describe block (fixes #2648) (Mordy Tikotzky)
-* Update: add tests to assert that the preprocessor is running (fixes #2651) (Mordy Tikotzky)
-* Build: Lock io.js to v2.1.0 (fixes #2653) (Ilya Volodin)
-
-v0.22.1 - May 30, 2015
-
-* Build: Remove release notes auto-publish (refs #2640) (Ilya Volodin)
-
-v0.22.0 - May 30, 2015
-
-* Upgrade: escope 3.1.0 (fixes #2310, #2405) (Toru Nagashima)
-* Fix: “consistent-this” incorrectly flagging destructuring of `this` (fixes #2633) (David Aurelio)
-* Upgrade: eslint-tester to 0.7.0 (Ilya Volodin)
-* Update: allow shadowed references in no-alert (fixes #1105) (Mathias Schreck)
-* Fix: no-multiple-empty-lines and template strings (fixes #2605) (Jamund Ferguson)
-* New: object-curly-spacing (fixes #2225) (Jamund Ferguson)
-* Docs: minor fix for one-var rule (Jamund Ferguson)
-* Fix: Shared config being clobbered by other config (fixes #2592) (Dominic Barnes)
-* Update: adds "functions" option to no-extra-parens (fixes #2477) (Jose Roberto Vidal)
-* Docs: Fix json formatting for lines-around-comments rule (Gyandeep Singh)
-* Fix: Improve around function/class names of `no-shadow` (fixes #2556, #2552) (Toru Nagashima)
-* Fix: Improve code coverage (fixes #2590) (Ilya Volodin)
-* Fix: Allow scoped configs to have sub-configs (fixes #2594) (Greg Cochard)
-* Build: Add auto-update of release tag on github (fixes #2566) (Greg Cochard)
-* New: lines-around-comment (fixes #1344) (Jamund Ferguson)
-* Build: Unblock build by increasing code coverage (Ilya Volodin)
-* New: accessor-pairs rule to object initializations (fixes #1638) (Gyandeep Singh)
-* Fix: counting of variables statements in one-var (fixes #2570) (Mathias Schreck)
-* Build: Add sudo:false for Travis (fixes #2582) (Ilya Volodin)
-* New: Add rule schemas (refs #2179) (Brandon Mills)
-* Docs: Fix typo in shareable-configs example (fixes #2571) (Ted Piotrowski)
-* Build: Relax markdownlint rules by disabling style-only items (David Anson)
-* Fix: Object shorthand rule incorrectly flagging getters/setters (fixes #2563) (Brad Dougherty)
-* New: Add config validator (refs #2179) (Brandon Mills)
-* New: Add worker environment (fixes #2442) (Ilya Volodin)
-* New no-empty-character class (fixes #2508) (Jamund Ferguson)
-* New: Adds --ignore-pattern option. (fixes #1742) (Patrick McElhaney)
-
-v0.21.2 - May 18, 2015
-
-* 0.21.2 (Nicholas C. Zakas)
-* Fix: one-var exception for ForStatement.init (fixes #2505) (Brandon Mills)
-* Fix: Don't throw spurious shadow errors for classes (fixes #2545) (Jimmy Jia)
-* Fix: valid-jsdoc rule to support exported functions (fixes #2522) (Gyandeep Singh)
-* Fix: Allow scoped packages in configuration extends (fixes #2544) (Eric Isakson)
-* Docs: Add chatroom to FAQ (Nicholas C. Zakas)
-* Docs: Move Gitter badge (Nicholas C. Zakas)
-
-v0.21.1 - May 15, 2015
-
-* 0.21.1 (Nicholas C. Zakas)
-* Fix: loc obj in report fn expects column (fixes #2481) (Varun Verma)
-* Build: Make sure that all md files end with empty line (fixes #2520) (Ilya Volodin)
-* Added Gitter badge (The Gitter Badger)
-* Fix: forced no-shadow to check all scopes (fixes #2294) (Jose Roberto Vidal)
-* Fix: --init indent setting (fixes #2493) (Nicholas C. Zakas)
-* Docs: Mention bundling multiple shareable configs (Nicholas C. Zakas)
-* Fix: Not to override the required extended config object directly (fixes #2487) (Gyandeep Singh)
-* Build: Update markdownlint dependency (David Anson)
-* Docs: added recursive function example to no-unused-vars (Jose Roberto Vidal)
-* Docs: Fix typo (then -> than) (Vladimir Agafonkin)
-* Revert "Fix: sanitise Jekyll interpolation during site generation (fixes #2297)" (Nicholas C. Zakas)
-* Fix: dot-location should use correct dot token (fixes #2504) (Mathias Schreck)
-* Fix: Stop linebreak-style from crashing (fixes #2490) (James Whitney)
-* Fix: rule no-duplicate-case problem with CallExpressions. (fixes #2499) (Matthias Osswald)
-* Fix: Enable full support for eslint-env comments (refs #2134) (Ilya Volodin)
-* Build: Speed up site generation (fixes #2475) (Ilya Volodin)
-* Docs: Fixing trailing spaces (Fixes #2478) (Ilya Volodin)
-* Docs: Update README FAQs (Nicholas C. Zakas)
-* Fix: Allow comment before comma for comma-spacing rule (fixes #2408) (Gyandeep Singh)
-
-v0.21.0 - May 9, 2015
-
-* 0.21.0 (Nicholas C. Zakas)
-* New: Shareable configs (fixes #2415) (Nicholas C. Zakas)
-* Fix: Edge cases for no-wrap-func (fixes #2466) (Nicholas C. Zakas)
-* Docs: Update ecmaFeatures description (Nicholas C. Zakas)
-* New: Add dot-location rule. (fixes #1884) (Greg Cochard)
-* New: Add addPlugin method to CLI-engine (Fixes #1971) (Ilya Volodin)
-* Breaking: Do not check unset declaration types (Fixes #2448) (Ilya Volodin)
-* Fix: no-redeclare switch scoping (fixes #2337) (Nicholas C. Zakas)
-* Fix: Check extra scope in no-use-before-define (fixes #2372) (Nicholas C. Zakas)
-* Fix: Ensure baseConfig isn't changed (fixes #2380) (Nicholas C. Zakas)
-* Fix: Don't warn for member expression functions (fixes #2402) (Nicholas C. Zakas)
-* New: Adds skipBlankLines option to the no-trailing-spaces rule (fixes #2303) (Andrew Vaughan)
-* Fix: Adding exception for last line (Refs #2423) (Greg Cochard)
-* Fix: crash on 0 max (fixes #2423) (gcochard)
-* Fix object-shorthand arrow functions (fixes #2414) (Jamund Ferguson)
-* Fix: Improves detection of self-referential functions (fixes #2363) (Jose Roberto Vidal)
-* Update: key-spacing groups must be consecutive lines (fixes #1728) (Brandon Mills)
-* Docs: grammar fix in no-sync (Tony Lukasavage)
-* Docs: Update configuring.md to fix incorrect link. (Ans)
-* New: Check --stdin-filename by ignore settings (fixes #2432) (Aliaksei Shytkin)
-* Fix: `no-loop-func` rule allows functions at init part (fixes #2427) (Toru Nagashima)
-* New: Add init command (fixes #2302) (Ilya Volodin)
-* Fix: no-irregular-whitespace should work with irregular line breaks (fixes #2316) (Mathias Schreck)
-* Fix: generator-star-spacing with class methods (fixes #2351) (Brandon Mills)
-* New: no-unneeded-ternary rule to disallow boolean literals in conditional expressions (fixes #2391) (Gyandeep Singh)
-* Docs: Add `restParams` to `ecmaFeatures` options list (refs: #2346) (Bogdan Savluk)
-* Fix: space-in-brackets Cannot read property 'range' (fixes #2392) (Gyandeep Singh)
-* Docs: Sort the rules (Lukas Böcker)
-* Add: Exception option for `no-extend-native` and `no-native-reassign` (fixes #2355) (Gyandeep Singh)
-* Fix: space-in-brackets import declaration (fixes #2378) (Gyandeep Singh)
-* Update: Add uninitialized and initialized options (fixes #2206) (Ian VanSchooten)
-* Fix: brace-style to not warn about curly mix ifStatements (fixes #1739) (Gyandeep Singh)
-* Fix: npm run profile script should use espree (fixes #2150) (Mathias Schreck)
-* New: Add support for extending configurations (fixes #1637) (Espen Hovlandsdal)
-* Fix: Include string literal keys in object-shorthand (Fixes #2374) (Jamund Ferguson)
-* Docs: Specify language for all code fences, enable corresponding markdownlint rule. (David Anson)
-* New: linebreak-style rule (fixes #1255) (Erik Müller)
-* Update: Add "none" option to operator-linebreak rule (fixes #2295) (Casey Visco)
-* Fix: sanitise Jekyll interpolation during site generation (fixes #2297) (Michael Ficarra)
-
-v0.20.0 - April 24, 2015
-
-* 0.20.0 (Nicholas C. Zakas)
-* Fix: support arrow functions in no-extra-parens (fixes #2367) (Michael Ficarra)
-* Fix: Column position in space-infix-ops rule (fixes #2354) (Gyandeep Singh)
-* Fix: allow plugins to be namespaced (fixes #2360) (Seth Pollack)
-* Update: one-var: enable let & const (fixes #2301) (Joey Baker)
-* Docs: Add meteor to avaiable environments list (bartmichu)
-* Update: Use `Object.assign()` polyfill for all object merging (fixes #2348) (Sindre Sorhus)
-* Docs: Update markdownlint dependency, resolve/suppress new issues. (David Anson)
-* Fix: newline-after-var declare and export (fixes #2325) (Gyandeep Singh)
-* Docs: Some typos and grammar. (AlexKVal)
-* Fix: newline-after-var to ignore declare in for specifiers (fixes #2317) (Gyandeep Singh)
-* New: add --stdin-filename option (fixes #1950) (Mordy Tikotzky)
-* Fix: Load .eslintrc in $HOME only if no other .eslintrc is found (fixes #2279) (Jasper Woudenberg)
-* Fix: Add `v8` module to no-mixed-requires rule (fixes #2320) (Gyandeep Singh)
-* Fix: key-spacing with single properties (fixes #2311) (Brandon Mills)
-* Docs: `no-invalid-regexp`: add `ecmaFeatures` flags for `u`/`y` (Jordan Harband)
-* New: object-shorthand rule (refs: #1617) (Jamund Ferguson)
-* Update: backticks support for quotes rule (fixes #2153) (borislavjivkov)
-* Fix: space-in-brackets to work with modules (fixes #2216) (Nicholas C. Zakas)
-
-v0.19.0 - April 11, 2015
-
-* 0.19.0 (Nicholas C. Zakas)
-* Upgrade: Espree to 2.0.1 (Nicholas C. Zakas)
-* Docs: Update one-var documentation (fixes #2210) (Nicholas C. Zakas)
-* Update: Add test for no-undef (fixes #2214) (Nicholas C. Zakas)
-* Fix: Report better location for padded-blocks error (fixes #2224) (Nicholas C. Zakas)
-* Fix: Don't check concise methods in quote-props (fixes #2251) (Nicholas C. Zakas)
-* Fix: Consider tabs for space-in-parens rule (fixes #2191) (Josh Quintana)
-* Fix: block-scoped-var to work with classes (fixes #2280) (Nicholas C. Zakas)
-* Docs: Remove trailing spaces, enable corresponding markdownlint rule. (David Anson)
-* Fix: padded-blocks with ASI (fixes #2273) (Brandon Mills)
-* Fix: Handle comment lines in newline-after-var (fixed #2237) (Casey Visco)
-* Docs: Standardize on '*' for unordered lists, enable corresponding markdownlint rule. (David Anson)
-* Fix: no-undef and no-underscore-dangle to use double quotes (fixes #2258) (Gyandeep Singh)
-* Docs: Improve grammar and style in comma-dangle.md (Nate Eagleson)
-* Docs: Improve grammar and style in padded-blocks.md (Nate Eagleson)
-* Docs: Update URL in no-wrap-func.md to resolve 404 (Nate Eagleson)
-* Docs: Fix typo in command-line-interface.md (Nate Eagleson)
-* Docs: Fix typo in working-with-rules.md (Nate Eagleson)
-* Docs: Remove hard tabs from *.md, enable corresponding markdownlint rule. (David Anson)
-* Fix: Function id missing in parent scope when using ecmaFeature `modules` for rule block-scoped-var (fixes #2242) (Michael Ferris)
-* Fix: Ignore single lines for vertical alignment (fixes #2018) (Ian VanSchooten)
-* Fix: Allow inline comments in newline-after-var rule (fixes #2229) (Casey Visco)
-* Upgrade: Espree 2.0.0 and escope 3.0.0 (fixes #2234, fixes #2201, fixes (Nicholas C. Zakas)
-* Docs: Update --no-ignore warning (Brandon Mills)
-* Build: Remove jshint files (fixes #2222) (Jeff Tan)
-* Docs: no-empty fix comment change (refs #2188) (Gyandeep Singh)
-* Fix: duplicate semi and no-extra-semi errors (fixes #2207) (Brandon Mills)
-* Docs: Update processors description (Nicholas C. Zakas)
-* Fix: semi error on export declaration (fixes #2194) (Brandon Mills)
-* New: operator-linebreak rule (fixes #1405) (Benoît Zugmeyer)
-* Docs: Fixing broken links in documentation (Ilya Volodin)
-* Upgrade: Espree to 0.12.3 (fixes #2195) (Gyandeep Singh)
-* Fix: camelcase rule with {properties: never} shouldn't check assignment (fixes #2189) (Gyandeep Singh)
-* New: Allow modifying base config (fixes #2143) (Meo)
-* New: no-continue rule (fixes #1945) (borislavjivkov)
-* Fix: `no-empty` rule should allow any comments (fixes #2188) (Gyandeep Singh)
-* Docs: Fix spell in camelcase doc (fixes #2190) (Gyandeep Singh)
-* Fix: Require semicolon after import/export statements (fixes #2174) (Gyandeep Singh)
-* Build: Add linting of Markdown files to "npm test" script (fixes #2182) (David Anson)
-* Build: Fixing site generation (Ilya Volodin)
-* Build: Fix gensite task to work even if files are missing (Nicholas C. Zakas)
-
-v0.18.0 - March 28, 2015
-
-* 0.18.0 (Nicholas C. Zakas)
-* Fix: Mark variables as used in module scope (fixes #2137) (Nicholas C. Zakas)
-* Fix: arrow functions need wrapping (fixes #2113) (Nicholas C. Zakas)
-* Fix: Don't crash on empty array pattern item (fixes #2111) (Nicholas C. Zakas)
-* Fix: Don't error on destructured params (fixes #2051) (Nicholas C. Zakas)
-* Docs: Fixing broken links (Ilya Volodin)
-* Fix: no-constant-condition should not flag += (fixes #2155) (Nicholas C. Zakas)
-* Fix: Ensure piped in code will trigger correct errors (fixes #2154) (Nicholas C. Zakas)
-* Fix: block-scoped-var to handle imports (fixes #2087) (Nicholas C. Zakas)
-* Fix: no-dupe-args to work with destructuring (fixes #2148) (Nicholas C. Zakas)
-* Fix: key-spacing crash on computed properties (fixes #2120) (Brandon Mills)
-* Fix: indent crash on caseless switch (fixes #2144) (Brandon Mills)
-* Fix: Don't warn about destructured catch params (fixes #2125) (Nicholas C. Zakas)
-* Update: Omit setter param from no-unused-vars (fixes #2133) (Nicholas C. Zakas)
-* Docs: Cleaning dead links (Ilya Volodin)
-* Docs: Moving documentation out of the repository and modifying build scripts (Ilya Volodin)
-* Docs: Update link to Documentation (Kate Lizogubova)
-* Docs: Adding back deprecated space-unary-word-ops documentation (Ilya Volodin)
-* Fix: Unused recursive functions should be flagged (issue2095) (Nicholas C. Zakas)
-* Breaking: Remove JSX support from no-undef (fixes #2093) (Nicholas C. Zakas)
-* Fix: markVariableAsUsed() should work in Node.js env (fixes #2089) (Nicholas C. Zakas)
-* New: Add "always" and "never" options to "one-var" rule. (fixes #1619) (Danny Fritz)
-* New: newline-after-var rule (fixes #2057) (Gopal Venkatesan)
-* Fix: func-names with ES6 classes (fixes #2103) (Marsup)
-* Fix: Add "Error" to the "new-cap" rule exceptions (fixes #2098) (Mickaël Tricot)
-* Fix: vars-on-top conflict with ES6 import (fixes #2099) (Gyandeep Singh)
-* Docs: Fixed JSON syntax (Sajin)
-* New: space-before-function-paren rule (fixes #2028) (Brandon Mills)
-* Breaking: rule no-empty also checking for empty catch blocks. (fixes #1841) (Dieter Oberkofler)
-* Update: rule camelcase to allow snake_case in object literals. (fixes #1919) (Dieter Oberkofler)
-* New: Added option int32Hint for space-infix-ops (fixes #1295) (Kirill Efimov)
-* New: no-param-reassign rule (fixes #1599) (Nat Burns)
-
-v0.17.1 - March 17, 2015
-
-* 0.17.1 (Nicholas C. Zakas)
-* Fix: no-func-assign should not fail on import declarations (fixes #2060) (Igor Zalutsky)
-* Fix: block-scoped-var to work with destructuring (fixes #2059) (Nicholas C. Zakas)
-* Fix: no-redeclare should check Node.js scope (fixes #2064) (Nicholas C. Zakas)
-* Fix: space-before-function-parentheses generator methods (fixes #2082) (Brandon Mills)
-* Fix: Method name resolution in complexity rule (fixes #2049) (Nicholas C. Zakas)
-* Fix: no-unused-vars crash from escope workaround (fixes #2042) (Brandon Mills)
-* Fix: restrict dot-notation keywords to actual ES3 keywords (fixes #2075) (Michael Ficarra)
-* Fix: block-scoped-var to work with classes (fixes #2048) (Nicholas C. Zakas)
-* Docs: Update no-new documentation (fixes #2044) (Nicholas C. Zakas)
-* Fix: yoda range exceptions with this (fixes #2063) (Brandon Mills)
-* Docs: Fix documentation on configuring eslint with comments (Miguel Ping)
-* Fix: rule no-duplicate-case problem with MemberExpressions. (fixes #2038) (Dieter Oberkofler)
-* Fix: Exempt \0 from no-octal-escape (fixes #1923) (Michael Ficarra)
-
-v0.17.0 - March 14, 2015
-
-* 0.17.0 (Nicholas C. Zakas)
-* Fix: module import specifiers should be defined (refs #1978) (Nicholas C. Zakas)
-* Fix: Ignore super in no-undef (refs #1968) (Nicholas C. Zakas)
-* Upgrade: Espree to v0.12.0 (refs #1968) (Nicholas C. Zakas)
-* Fix: destructured arguments should work in block-scoped-var (fixes #1996) (Nicholas C. Zakas)
-* Fix: Line breaking with just carriage return (fixes #2005) (Nicholas C. Zakas)
-* Fix: location of new-cap error messages (fixes #2025) (Mathias Schreck)
-* Breaking: Stop checking JSX variable use, expose API instead (fixes #1911) (Glen Mailer)
-* Fix: Check spacing of class methods (fixes #1989) (Nicholas C. Zakas)
-* New: no-duplicate-case rule to disallow a duplicate case label (fixes #2015) (Dieter Oberkofler)
-* Clarify issue requirement for doc pull requests (Ian)
-* Add quotes around object key (Ian)
-* Fix: Add comma-dangle allow-multiline (fixes #1984) (Keith Cirkel)
-* Fix: Don't explode on default export function (fixes #1985) (Nicholas C. Zakas)
-* Update: Add AST node exceptions to comma-style. (fixes #1932) (Evan Simmons)
-* Docs: Add spread operator to available language options (Nicholas C. Zakas)
-* New: generator-star-spacing rule (fixes #1680, fixes #1949) (Brandon Mills)
-
-v0.16.2 - March 10, 2015
-
-* 0.16.2 (Nicholas C. Zakas)
-* Fix: Ensure globalReturn isn't on when node:false (fixes #1995) (Nicholas C. Zakas)
-* Downgrade: escope pegged to 2.0.6 (refs #2001) (Nicholas C. Zakas)
-* Upgrade: escope to 2.0.7 (fixes #1978) (Nicholas C. Zakas)
-* Docs: Update descriptive text for --no-ignore option. (David Anson)
-* Upgrade: estraverse to latest for ESTree support (fixes #1986) (Nicholas C. Zakas)
-* Fix: Global block-scope-var check should work (fixes #1980) (Nicholas C. Zakas)
-* Fix: Don't warn about parens around yield (fixes #1981) (Nicholas C. Zakas)
-
-v0.16.1 - March 8, 2015
-
-* 0.16.1 (Nicholas C. Zakas)
-* Fix: Node.js scoping in block-scoped-var (fixes #1969) (Nicholas C. Zakas)
-* Update: Enable ES6 scoping for more options (Nicholas C. Zakas)
-* Fix: Ensure all export nodes are traversable (fixes #1965) (Nicholas C. Zakas)
-* Fix: Ensure class names are marked as used (fixes #1967) (Nicholas C. Zakas)
-* Fix: remove typo that caused a crash (fixes #1963) (Fabricio C Zuardi)
-* Docs: Added missing "are" (Sean Wilkinson)
-
-v0.16.0 - March 7, 2015
-
-* 0.16.0 (Nicholas C. Zakas)
-* Fix: Pass correct sourceType to escope (fixes #1959) (Nicholas C. Zakas)
-* Fix: Scoping for Node.js (fixes #892) (Nicholas C. Zakas)
-* Fix: strict rule should honor module code (fixes #1956) (Nicholas C. Zakas)
-* New: Add es6 environment (fixes #1864, fixes #1944) (Nicholas C. Zakas)
-* Docs: Update ecmaFeatures list (fixes #1942) (Nicholas C. Zakas)
-* Fix: Make no-unused-vars ignore exports (fixes #1903) (Nicholas C. Zakas)
-* Upgrade: Espree to v1.11.0 (Nicholas C. Zakas)
-* Fix: Comment configuration of rule doesn't work (fixes #1792) (Jary)
-* Fix: Rest args should work in no-undef and block-scoped-var (fixes #1543) (Nicholas C. Zakas)
-* Breaking: change no-comma-dangle to comma-dangle (fixes #1350) (Mathias Schreck)
-* Update: space-before-function-parentheses to support generators (fixes #1929) (Brandon Mills)
-* New: Adding support for "// eslint-disable-line rule" style comments (Billy Matthews)
-* Fix: Use unversioned sinon file in browser test (fixes #1947) (Nicholas C. Zakas)
-* Docs: Add mention of compatible parsers (Nicholas C. Zakas)
-* Fix: Better error when given null as rule config (fixes #1760) (Glen Mailer)
-* Update: no-empty to check TryStatement.handler (fixes #1930) (Brandon Mills)
-* Fix: space-before-function-parentheses and object methods (fixes #1920) (Brandon Mills)
-* New: no-dupe-args rule (fixes #1880) (Jamund Ferguson)
-* Fix: comma-spacing should ignore JSX text (fixes #1916) (Brandon Mills)
-* Breaking: made eol-last less strict (fixes #1460) (Glen Mailer)
-* New: generator-star middle option (fixes #1808) (Jamund Ferguson)
-* Upgrade: Espree to 1.10.0 for classes support (Nicholas C. Zakas)
-* Docs: no-plusplus.md - auto semicolon insertion (Miroslav Obradović)
-* Docs: Use union types in TokenStore JSDoc (refs #1878) (Brandon Mills)
-* Fix: block-scoped-var to work with destructuring (fixes #1863) (Nicholas C. Zakas)
-* Docs: Update docs for token-related methods (fixes #1878) (Nicholas C. Zakas)
-* Update: Remove preferGlobal from package.json (fixes #1877) (Nicholas C. Zakas)
-* Fix: allow block bindings in no-inner-declarations (fixes #1893) (Roberto Vidal)
-* Fix: getScope and no-use-before-define for arrow functions (fixes #1895) (Brandon Mills)
-* Fix: Make no-inner-declarations look for arrow functions (fixes #1892) (Brandon Mills)
-* Breaking: Change no-space-before-semi to semi-spacing and add "after" option (fixes #1671) (Mathias Schreck)
-* Update: Add support for custom preprocessors (fixes #1817) (Ilya Volodin)
-
-v0.15.1 - February 26, 2015
-
-* 0.15.1 (Nicholas C. Zakas)
-* Build: Fix release task (Nicholas C. Zakas)
-* Fix: check all semicolons in no-space-before-semi (fixes #1885) (Mathias Schreck)
-* Fix: Refactor comma-spacing (fixes #1587, fixes #1845) (Roberto Vidal)
-* Fix: Allow globalReturn in consistent-return (fixes #1868) (Brandon Mills)
-* Fix: semi rule should check throw statements (fixes #1873) (Mathias Schreck)
-* Docs: Added HolidayCheck AG as user (0xPIT)
-* Upgrade: `chalk` to 1.0.0 (Sindre Sorhus)
-* Docs: Add CustomInk to the list of companies (Derek Lindahl)
-* Docs: Alphabetize project & company usage list (Derek Lindahl)
-* Docs: fix typo (Henry Zhu)
-* Docs: Fix typo (Brenard Cubacub)
-
-v0.15.0 - February 21, 2015
-
-* 0.15.0 (Nicholas C. Zakas)
-* Upgrade: Espree to 1.9.1 (fixes #1816, fixes #1805) (Nicholas C. Zakas)
-* Fix: make rules work with for-of statements (fixes #1859) (Mathias Schreck)
-* Fix: Enable globalReturn for Node.js environment (fixes #1158) (Nicholas C. Zakas)
-* Fix: Location of extra paren message (fixes #1814) (Nicholas C. Zakas)
-* Fix: Remove unnecessary file exists check (fixes #1831) (Nicholas C. Zakas)
-* Fix: Don't count else-if in max-depth (fixes #1835) (Nicholas C. Zakas)
-* Fix: Don't flag for-of statement (fixes #1852) (Nicholas C. Zakas)
-* Build: Test using io.js as well (Nicholas C. Zakas)
-* Change customformat value to path (suisho)
-* Docs: Add a missing word in the Contributing doc (Ben Linskey)
-* Docs: Fix typo in wrap-iife rule doc title (Ben Linskey)
-* Docs: Update pages to fix rendering of lists (David Anson)
-* Fix: new-cap should allow defining exceptions (fixes #1424) (Brian Di Palma)
-* Update: Add requireReturnDescription for valid-jsdoc (fixes #1833) (Brian Di Palma)
-* New: rule no-throw-literal added (fixes #1791) (Dieter Oberkofler)
-* New: multi-line option for the curly rule (fixes #1812) (Hugo Wood)
-* Docs: fix typo in configuring docs (mendenhallmagic)
-* Update: Backslashes in path (fixes #1818) (Jan Schär)
-* Docs: Update pages to fix rendering of lists and fenced code blocks (David Anson)
-* Docs: add webpack loader to the docs/integrations page (Maxime Thirouin)
-* Breaking: space-before-function-parentheses replaces space-after-function-name and checkFunctionKeyword (fixes #1618) (Mathias Schreck)
-
-v0.14.1 - February 8, 2015
-
-* 0.14.1 (Nicholas C. Zakas)
-* Fix: Exit code should be 1 for any number of errors (fixes #1795) (Nicholas C. Zakas)
-* Fix: Check indentation of first line (fixes #1796) (Nicholas C. Zakas)
-* Fix: strict rules shouldn't throw on arrow functions (fixes #1789) (Nicholas C. Zakas)
-
-v0.14.0 - February 7, 2015
-
-* 0.14.0 (Nicholas C. Zakas)
-* Update: Fix indentation of comment (Nicholas C. Zakas)
-* Fix: comma-spacing for template literals (fixes #1736) (Nicholas C. Zakas)
-* Build: Add Node.js 0.12 testing (Nicholas C. Zakas)
-* Breaking: Remove node from results (fixes #957) (Nicholas C. Zakas)
-* Breaking: Exit code is now error count (Nicholas C. Zakas)
-* Docs: Correct getFormatter() documentation (refs #1723) (Nicholas C. Zakas)
-* Update: Make rules work with arrow functions (fixes #1508, fixes #1509, fixes #1493) (Nicholas C. Zakas)
-* Fix: Ensure template string references count (fixes #1542) (Nicholas C. Zakas)
-* Fix: no-undef to work with arrow functions (fixes #1604) (Nicholas C. Zakas)
-* Upgrade: Espree to version 1.8.0 (Nicholas C. Zakas)
-* Fix: Don't throw error for arguments (fixes #1759) (Nicholas C. Zakas)
-* Fix: Don't warn on computed nonliteral properties (fixes #1762) (Nicholas C. Zakas)
-* New: Allow parser to be configured (fixes #1624) (Nicholas C. Zakas)
-* Docs: Added double quotes for JSON keys for comma-spacing and key-spacing rule (Dmitry Polovka)
-* New: Rule indent (fixes #1022) (Dmitriy Shekhovtsov)
-* Revert "New: Rule indent (fixes #1022)" (Nicholas C. Zakas)
-* Update: fix eslint indentations (fixes #1770) (Dmitriy Shekhovtsov)
-* Fix: Scoping issues for no-unused-vars (fixes #1741) (Nicholas C. Zakas)
-* Docs: Added `eslint-enable` inline (Ivan Fraixedes)
-* New: Add predefined Meteor globals (fixes #1763) (Johan Brook)
-* New: Rule indent (fixes #1022) (Dmitriy Shekhovtsov)
-* Update: Check all assignments for consistent-this (fixes #1513) (Timothy Jones)
-* Fix: Support exceptions in no-multi-spaces (fixes #1755) (Brandon Mills)
-* Docs: Forgotten parentheses in code snippet (Ivan Fraixedes)
-* Update: CLIEngine results include warning and error count (fixes #1732) (gyandeeps)
-* Fix: Scoping issues for no-unused-vars (fixes #1733) (Nicholas C. Zakas)
-* Update: Add getNodeByRangeIndex method (refs #1755) (Brandon Mills)
-* Update: Replace getTokenByRange(Index->Start) (refs #1721) (Brandon Mills)
-* Update: Fast-path for empty input (fixes #546) (Nicholas C. Zakas)
-* Fix: Allow single line else-if (fixes #1739) (Nicholas C. Zakas)
-* Fix: Don't crash when $HOME isn't set (fixes #1465) (Nicholas C. Zakas)
-* Fix: Make no-multi-spaces work for every case (fixes #1603, fixes #1659) (Nicholas C. Zakas)
-* Breaking: Show error and warning counts in stylish summary (fixes #1746) (Brandon Mills)
-* Docs: fixed typo in no-lone-blocks docs (Vitor Balocco)
-* Docs: fixed typo in consistent-return docs (Vitor Balocco)
-* Breaking: remove implied eval check from no-eval (fixes #1202) (Mathias Schreck)
-* Update: Improve CLIEngine.getFormatter() (refs #1723) (Nicholas C. Zakas)
-* Docs: Add Backbone plugin link (Ilya Volodin)
-* Docs: use npm's keyword route (Tom Vincent)
-* Build: Update sitegen script (Closes #1725) (Ilya Volodin)
-
-v0.13.0 - January 24, 2015
-
-* 0.13.0 (Nicholas C. Zakas)
-* Update: The rule spaced-line-comment now also allows tabs and not only spaces as whitespace. (fixes #1713) (Dieter Oberkofler)
-* Docs: add Jasmine rules and eslintplugin npm links (Tom Vincent)
-* Fix: Make no-redeclare work with let (fixes #917) (Nicholas C. Zakas)
-* Update: Add CLIEngine.getFormatter() (fixes #1653) (Nicholas C. Zakas)
-* Breaking: Update escope (fixes #1642) (Nicholas C. Zakas)
-* Update: Switch to using estraverse-fb (fixes #1712) (Nicholas C. Zakas)
-* Docs: Update README FAQ (Nicholas C. Zakas)
-* Update: no-warning-comments matches on whole word only (fixes #1709) (Nick Fisher)
-* Build: Add JSDoc generation (fixes #1363) (Nicholas C. Zakas)
-* Docs: Add more info about context (fixes #1330) (Nicholas C. Zakas)
-* Upgrade: Espree to 1.7.1 (fixes #1706) (Nicholas C. Zakas)
-* Docs: Make CLA notice more prominent (Nicholas C. Zakas)
-* Update: Added globals for: phantom,jquery, prototypejs, shelljs (fixes #1704) (Dmitriy Shekhovtsov)
-* Docs: Fixed example for the space-return-throw-case rule (mpal9000)
-* Fix: Except object literal methods from func-names (fixes #1699) (Brandon Mills)
-* Update: use global strict mode everywhere (fixes #1691) (Brandon Mills)
-* Update: Add allowPattern option for dot-notation rule (fixes #1679) (Tim Schaub)
-* Fix: Missing undeclared variables in JSX (fixes #1676) (Yannick Croissant)
-* Fix: no-unused-expressions rule incorrectly flagging yield (fixes #1672) (Rémi Gérard-Marchant)
-* Update: Combine strict mode rules (fixes #1246) (Brandon Mills)
-* Fix: disregards leading './' in ignore pattern or file name (fixes #1685) (Chris Montrois)
-* Upgrade: globals module to latest (fixes #1670) (Nicholas C. Zakas)
-* Fix: generator-star should allow params (fixes #1677) (Brandon Mills)
-* Fix: no-unused-vars for JSX (fixes #1673 and fixes #1534) (Yannick Croissant)
-* Docs: Add angularjs-eslint link into the integration doc (Emmanuel DEMEY)
-
-v0.12.0 - January 17, 2015
-
-* 0.12.0 (Nicholas C. Zakas)
-* Fix: Track JSX global variable correctly (fixes #1534) (Nicholas C. Zakas)
-* Fix: Property regex flag checking (fixes #1537) (Nicholas C. Zakas)
-* Docs: Add angularjs-eslint link into the integration doc (Emmanuel DEMEY)
-* Update: Expose ecmaFeatures on context (fixes #1648) (Nicholas C. Zakas)
-* Docs: Added Fitbit to the list of companies (Igor Zalutsky)
-* New: gen-star rule (refs #1617) (Jamund Ferguson)
-* New: no-var rule (refs #1617) (Jamund Ferguson)
-* Fix: Support JSX spread operator (fixes #1634) (Nicholas C. Zakas)
-* Docs: Document ecmaFeatures (Nicholas C. Zakas)
-* Upgrade: several dependencies (fixes #1377) (Nicholas C. Zakas)
-* Fix: Broken JSX test (Nicholas C. Zakas)
-* Fix: no-bitwise reports on bitwise assignment expressions (fixes #1643) (Mathias Schreck)
-* Fix: Find JSXIdentifier refs in no-unused-vars (fixes #1534) (Nicholas C. Zakas)
-* Update: Add a couple JSX tests (Nicholas C. Zakas)
-* Fix: quotes rule ignores JSX literals (fixes #1477) (Nicholas C. Zakas)
-* Fix: Don't warn on JSX literals with newlines (fixes #1533) (Nicholas C. Zakas)
-* Update: Fully enable JSX support (fixes #1640) (Nicholas C. Zakas)
-* Breaking: Allow parser feature flips (fixes #1602) (Nicholas C. Zakas)
-* Fix: Allow comments in key-spacing groups (fixes #1632) (Brandon Mills)
-* Fix: block-scoped-var reports labels (fixes #1630) (Michael Ficarra)
-* Docs: add newline to no-process-env (fixes #1627) (Tom Vincent)
-* Fix: Update optionator, --no in help (fixes #1134) (George Zahariev)
-* Fix: Allow individual newlines in space-in-brackets (fixes #1614) (Brandon Mills)
-* Docs: Correct alignment in example project tree (Tim Schaub)
-* Docs: Remove references to Esprima (Nicholas C. Zakas)
-* Docs: Remove illegal code fence (Nicholas C. Zakas)
-
-v0.11.0 - December 30, 2014
-
-* 0.11.0 (Nicholas C. Zakas)
-* Fix: Adding regexp literal exception (fixes #1589) (Greg Cochard)
-* Fix: padded-blocks incorrectly complained on comments (fixes #1416) (Mathias Schreck)
-* Fix: column location of key-spacing with additional tokens (fixes #1458) (Mathias Schreck)
-* Build: tag correct commit (refs #1606) (Mathias Schreck)
-* Upgrade: Updat Espree to 1.3.1 (Nicholas C. Zakas)
-* Fix: add es3 config option to dot-notation rule (fixes #1484) (Michael Ficarra)
-* Fix: valid-jsdoc should recognize @class (fixes #1585) (Nicholas C. Zakas)
-* Update: Switch to use Espree (fixes #1595) (Nicholas C. Zakas)
-* Fix: brace-style stroustrup should report on cuddled elseif (fixes #1583) (Ian Christian Myers)
-* New: Configuration via package.json (fixes #698) (Michael Mclaughlin)
-* Update: Set environments w/ globals (fixes #1577) (Elan Shanker)
-* Fix: yoda treats negative numbers as literals (fixes #1571) (Brandon Mills)
-* Fix: function arguments now count towards no-shadow check (fixes #1584) (Glen Mailer)
-* Fix: check if next statement is on newline when warning against extra semicolons. (fixes #1580) (Evan You)
-* Update: add yoda exception for range tests (fixes #1561) (Brandon Mills)
-* New: space-after-function-name (fixes #1340) (Roberto Vidal)
-
-v0.10.2 - December 12, 2014
-
-* 0.10.2 (Nicholas C. Zakas)
-* Fix: detect for...in in no-loop-func (fixes #1573) (Greg Cochard)
-* Update: simplify comma-spacing logic (fixes #1562) (Brandon Mills)
-* Fix: operator-assignment addition is non-commutative (fixes#1556) (Brandon Mills)
-* 0.10.1 (Nicholas C. Zakas)
-* Update: Add new-cap exception configurations. (Fixes #1487) - `newCapsAllowed` - `nonNewCapsAllowed` (Jordan Harband)
-
-v0.10.1 - December 6, 2014
-
-* 0.10.1 (Nicholas C. Zakas)
-* Docs: Fix v0.10.0 changelog (Nicholas C. Zakas)
-* Build: Ensure changelog works with large semver versions (Nicholas C. Zakas)
-* Fix: comma-spacing and comma-style to work with array literals (fixes #1492) (Nicholas C. Zakas)
-* Update: better operator regex in use-isnan rule (fixes #1551) (Michael Ficarra)
-* Fix: wrong op index in no-multi-spaces (fixes #1547) (Brandon Mills)
-* Fix: Restrict use-isnan violations to comparison operators. (Fixes #1535) (Jordan Harband)
-* Fix: comma-spacing has false positives when parenthesis are used (fixes #1457) (Jamund Ferguson)
-* Docs: alphabetize the "Stylistic Issues" section (Jeff Williams)
-* Build: make the "gensite" target work when DOCS_DIR does not exist (fixes #1530) (Jeff Williams)
-* Docs: badges should only refer to master branch (Mathias Schreck)
-* Fix: prevent crash on empty blocks in no-else-return (fixes #1527) (Mathias Schreck)
-* Build: Fix md to html conversion regex (fixes #1525) (Brandon Mills)
-* 0.10.0 (Nicholas C. Zakas)
-
-v0.10.0 - November 27, 2014
-
-* 0.10.0 (Nicholas C. Zakas)
-* Fix: Add Object and Function as exceptions in new-cap (refs #1487) (Nicholas C. Zakas)
-* Breaking: Allow extensionless files to be passed on CLI (fixes #1131) (Nicholas C. Zakas)
-* Fix: typo: iffe to iife, none to non (Michael Ficarra)
-* Update: refactor tokens API (refs #1212) (Brandon Mills)
-* New: Allow other file extensions (fixes #801) (Nicholas C. Zakas)
-* Update: Add Event to browser globals (fixes #1474) (Nicholas C. Zakas)
-* Fix: check function call arguments in comma-spacing (fixes #1515) (Mathias Schreck)
-* Update: Add no-cond-assign option to disallow nested assignments in conditionals (fixes #1444) (Jeff Williams)
-* Fix: crash in no-multi-spaces on empty array elements (fixes #1418) (Brandon Mills)
-* Fix: Don't explode on directory traversal (fixes #1452) (Nicholas C. Zakas)
-* Fix: no-fallthrough should work when semis are missing (fixes #1447) (Nicholas C. Zakas)
-* Fix: JSDoc parsing by updating doctrine (fixes #1442) (Nicholas C. Zakas)
-* Update: restore the "runs" global present in Jasmine 1.3 (fixes #1498) (Michał Gołębiowski)
-* Fix: ignore undefined identifiers in typeof (fixes #1482) (Mathias Schreck)
-* Fix: Ignoring empty comments. (fixes #1488) (Greg Cochard)
-* New: Add space-unary-ops rules (#1346) (Marcin Kumorek)
-* Update: Remove shebang workaround in spaced-line-comment (fixes #1433) (Michael Ficarra)
-* Docs: change 'and' to 'an' in docs/rules/valid-jsdoc.md (fixes #1441) (Michael Ficarra)
-* Update: Add `beforeAll` and `afterAll` to the Jasmine globals (fixes #1478) (Gyandeep Singh)
-* Update: Add exception options to space-in-parens (fixes #1368) (David Clark)
-* Build: Add check for license issues (fixes #782) (Brandon Mills)
-* Docs: update badges (Yoshua Wuyts)
-* Docs: Update pages to fix rendering of lists and fenced code blocks (David Anson)
-* Fix: env rules merging for command line config (fixes #1271) (Roberto Vidal)
-* Fix: Collect variables declare in switch-case.(fixes #1453) (chris)
-* Fix: remove extra capture group (Nate-Wilkins)
-* Update: allow distinct alignment groups in key-spacing (fixes #1439) (Brandon Mills)
-* Fix: message for numeric property names in quote-props (fixes #1459) (Brandon Mills)
-* Docs: Remove assumption about the rule config (Alexander Schmidt)
-* New: Add ability to time individual rules (fixes #1437) (Brandon Mills)
-* Fix: single quotes (Nate-Wilkins)
-* Docs: Fix broken code fences in key-spacing docs (Brandon Mills)
-* Docs: Explain .eslintignore features (fixes #1094) (Brandon Mills)
-* Breaking: ignore node_modules by default (fixes #1163) (Brandon Mills)
-* Fix: Adds clamping to getSource beforeCount (fixes #1427) (Greg Gianforcaro)
-* New: add no-inline-comment rule (fixes #1366) (Greg Cochard)
-* Fix: '.md' to '.html' with anchors (fixes #1415) (Nate-Wilkins)
-* Build: Filter and sort versions in gensite (fixes #1430) (Brandon Mills)
-* Build: Escape period in regex (fixes #1428) (Brandon Mills)
-* Revert "Fix: '.md' to '.html' with anchors (fixes #1415)" (Nicholas C. Zakas)
-* 0.9.2 (Nicholas C. Zakas)
-* New: Add operator-assignment rule (fixes #1420) (Brandon Mills)
-
-v0.9.2 - November 1, 2014
-
-* 0.9.2 (Nicholas C. Zakas)
-* Fix: '.md' to '.html' with anchors (fixes #1415) (Nate-Wilkins)
-* Fix: Allow line breaks in key-spacing rule (fixes #1407) (Brandon Mills)
-* Build: add coveralls integration (fixes #1411) (Mathias Schreck)
-* Fix: add severity flag for ignored file warning (fixes #1401) (Mathias Schreck)
-* Fix: Keep sinon at ~1.10.3 (fixes #1406) (Brandon Mills)
-* Fix: ! negates .eslintignore patterns (fixes #1093) (Brandon Mills)
-* Fix: let fs.stat throw if a file does not exist (fixes #1296) (Mathias Schreck)
-* Fix: check switch statements in space-before-blocks (fixes #1397) (Mathias Schreck)
-* Docs: fix rule name in example configuration (Mathias Schreck)
-* Fix: disable colors during test run (fixes #1395) (Mathias Schreck)
-* New: add isPathIgnored method to CLIEngine (fixes #1392) (Mathias Schreck)
-* Docs: changing eslint to ESLint and add missing backtick (Mathias Schreck)
-* Docs: Documents the functionality to load a custom formatter from a file (Adam Baldwin)
-* 0.9.1 (Nicholas C. Zakas)
-* Update: Option type for mixed tabs and spaces (fixes #1374) (Max Nordlund)
-* Fix: Nested occurrences of no-else-return now show multiple reports (fixes #1369) (Jordan Hawker)
-
-v0.9.1 - October 25, 2014
-
-* 0.9.1 (Nicholas C. Zakas)
-* Docs: fix link on governance model (azu)
-* Fix: plugins without rulesConfig causes crash (fixes #1388) (Mathias Schreck)
-* 0.9.0 (Nicholas C. Zakas)
-
-v0.9.0 - October 24, 2014
-
-* 0.9.0 (Nicholas C. Zakas)
-* New: Allow reading from STDIN (fixes #368) (Nicholas C. Zakas)
-* New: add --quiet option (fixes #905) (Mathias Schreck)
-* Update: Add support for plugin default configuration (fixes #1358) (Ilya Volodin)
-* Fix: Make sure shebang comment node is removed (fixes #1352) (Nicholas C. Zakas)
-* New: Adding in rule for irregular whitespace checking. (fixes #1024) (Jonathan Kingston)
-* Fix: space-in-parens should not throw for multiline statements (fixes #1351) (Jary)
-* Docs: Explain global vs. local plugins (fixes #1238) (Nicholas C. Zakas)
-* Docs: Add docs on Node.js API (fixes #1247) (Nicholas C. Zakas)
-* Docs: Add recommended keywords for plugins (fixes #1248) (Nicholas C. Zakas)
-* Update: Add CLIEngine#getConfigForFile (fixes #1309) (Nicholas C. Zakas)
-* Update: turn on comma-style for project (fixes #1316) (Nicholas C. Zakas)
-* Fix: Ensure messages are sorted by line (fixes #1343) (Nicholas C. Zakas)
-* Update: Added arraysInObjects and objectsInObjects options to space-in-brackets rule (fixes #1265, fixes #1302) (vegetableman)
-* Breaking: Removed comma spacing check from space-infix-ops (fixes #1361) (vegetableman)
-* Fix: addressed linting errors (Nicholas C. Zakas)
-* Docs: Add Contributor Model (fixes #1341) (Nicholas C. Zakas)
-* Docs: Add reference to CLA (Nicholas C. Zakas)
-* Build: add version numbers to docs (fixes #1170) (Mathias Schreck)
-* Fix: no-fallthrough incorrectly flagged falls through annotations (fixes #1353) (Mathias Schreck)
-* Build: separate site publishing form generation (fixes #1356) (Mathias Schreck)
-* New: Add key-spacing rule (fixes #1280) (Brandon Mills)
-* New: add spaced-line-comment rule (fixes #1345) (Greg Cochard)
-* Docs: added more Related Rules sections (fixes #1347) (Delapouite)
-* Fix: resolve linting issue in (fixes #1339) (Nicholas C. Zakas)
-* New: add space-before-blocks rule (fixes #1277) (Mathias Schreck)
-* Docs: Remove moot integration plugins (Sindre Sorhus)
-* New: add rule for multiple empty lines (fixes #1254) (Greg Cochard)
-* Fix: no-shadow rule should consider function expressions (fixes #1322) (Mathias Schreck)
-* Update: remove globals present only in Jasmine plugins (fixes #1326) (Michał Gołębiowski)
-* New: added no-multi-spaces rule (fixes #630) (vegetableman)
-* New: Added comma-spacing rule (Fixes #628, Fixes #1319) (vegetableman)
-* New: add rule for padded blocks (fixes #1278) (Mathias Schreck)
-* Docs: fix eqeqeq isNullCheck comment (Denis Sokolov)
-* Fix: no-comma-dangle violation in unit test and Makefile.js/lint not checking return codes (fixes #1306) (David Anson)
-* Fix: allow comma-last with object properties having line breaks (fixes #1314) (vegetableman)
-* New: Added comma-style rule (fixes #1282) (vegetableman)
-* Update: add space after function keyword check (fixes #1276) (Mathias Schreck)
-* Update: Add missing environments and fix sorting/grouping of rules (fixes #1307, fixes #1308) (David Anson)
-* Docs: Fix sorting of rules within each section (David Anson)
-* Docs: Correct a few misspelled words (David Anson)
-* Docs: Update multiple pages to fix rendering of fenced code blocks (David Anson)
-* New: Added no-process-env rule (fixes #657) (vegetableman)
-* Fix: add rule ensuring #1258 is fixed by recent rewrite (fixes #1258) (Michael Ficarra)
-* Update: split propertyName from singleValue in space-in-brackets (fixes #1253) (Michael Ficarra)
-* Update: add "as-needed" option to quote-props rule (fixes #1279) (Michael Ficarra)
-* Docs: fixed broken link and changed warning level to error level (vegetableman)
-* Docs: Added "the native web" to the list of companies that use ESLint. (Golo Roden)
-* Docs: Add BountySource badge to README (Nicholas C. Zakas)
-* 0.8.2 (Nicholas C. Zakas)
-
-v0.8.2 - September 20, 2014
-
-* 0.8.2 (Nicholas C. Zakas)
-* Docs: Updated contribution guidelines to add accepted/bounty issues descriptions (Nicholas C. Zakas)
-* Docs: Update README with links and FAQs (Nicholas C. Zakas)
-* Docs: add finally to space-after-keywords documentation (Mathias Schreck)
-* New: add ignoreCase option to sort-vars (fixes #1272) (Mathias Schreck)
-* Docs: fix typo (Barry Handelman)
-* Docs: Fix broken Markdown on configuration page (Nicholas C. Zakas)
-* Docs: Fix reference to wrong rule name (Harry Wolff)
-* Upgrade: Most dev dependencies (Nicholas C. Zakas)
-* Upgrade: shelljs to 0.3.0 (Nicholas C. Zakas)
-* Upgrade: doctrine to 0.5.2 (Nicholas C. Zakas)
-* Upgrade: esprima to 1.2.2 (Nicholas C. Zakas)
-* Upgrade: eslint-tester to latest (Nicholas C. Zakas)
-* Fix: Load .eslintrc in directory with $HOME as an ancestor (fixes #1266) (Beau Gunderson)
-* Fix: load .eslintrc from HOME (fixes #1262) (Beau Gunderson)
-* New: Add sharable rule settings (fixes #1233) (Ilya Volodin)
-* Upgrade: upgrade outdated dependencies (fixes #1251) (Mathias Schreck)
-* Docs: fix typo in no-ex-assign documentation (Michael Ficarra)
-* Docs: add intellij plugin to integrations (ido)
-* Docs: Changing NPM to npm (Peter deHaan)
-* Fix: strict should check function expressions (fixes #1244) (Brandon Mills)
-* Docs: fix vars-on-top documentation (fixes #1234) (Mathias Schreck)
-* 0.8.1 (Nicholas C. Zakas)
-* Docs: Fixed a typo in brace-style.md (Anton Antonov)
-
-v0.8.1 - September 9, 2014
-
-* 0.8.1 (Nicholas C. Zakas)
-* Fix: Ensure exit code is 1 when there's a syntax error (fixes #1239) (Nicholas C. Zakas)
-* Docs: fix up vars-on-top documentation (fixes #1234) (Michael Ficarra)
-* Fix: vars-on-top directive support (fixes #1235) (Michael Ficarra)
-* Fix: Avoid mutating node.range in max-len (fixes #1224) (Brandon Mills)
-* Docs: Typo, add missing quotation mark (Ádám Lippai)
-* Update: space-in-brackets to allow exceptions (fixes #1142) (Brandyn Bennett)
-* 0.8.0 (Nicholas C. Zakas)
-
-v0.8.0 - September 5, 2014
-
-* 0.8.0 (Nicholas C. Zakas)
-* Perf-related revert "Fix: Speed up tokens API (refs #1212)" (Nicholas C. Zakas)
-* Fix: no-fallthrough: continue affects control flow, too (fixes #1220) (Michael Ficarra)
-* Fix: rewrite no-unused-vars rule (refs #1212) (Michael Ficarra)
-* Fix: Error when there's a \r in .eslintrc (#1172) (Gyandeep Singh)
-* Added rule disallowing reserved words being used as keys (fixes #1144) (Emil Bay)
-* Fix: rewrite no-spaced-func rule (refs #1212) (Michael Ficarra)
-* Fix: Speed up getScope() (refs #1212) (Brandon Mills)
-* Fix: no-extra-strict behavior for named function expressions (fixes #1209) (Mathias Schreck)
-* Add Date.UTC to allowed capitalized functions (David Brockman Smoliansky)
-* New: Adding 'vars-on-top' rule (fixes #1148) (Gyandeep Singh)
-* Fix: Speed up tokens API (refs #1212) (Brandon Mills)
-* Docs: document plugin usage (fixes #1117) (Mathias Schreck)
-* New: accept plugins from cli (fixes #1113) (Mathias Schreck)
-* Docs: fix some typos. (Mathias Schreck)
-* New: Load plugins from configs (fixes #1115). (Mathias Schreck)
-* Fix: no-unused-expressions better directive detection (fixes #1195) (Michael Ficarra)
-* Fix: no-unused-expressions directive support (fixes #1185) (Michael Ficarra)
-* Update: Add 'allowSingleLine' option to brace-style (fixes #1089) (John Gozde)
-* Docs: Spell checking and one extra closing curly in code example (Juga Paazmaya)
-* Fix: mergeConfigs ensures the plugins property exists (fixes #1191). (Mathias Schreck)
-* Update: Declare ES6 collections (Map, Set, WeakMap, WeakSet) as built-in globals (fixes #1189) (Michał Gołębiowski)
-* New: Adding 'plugin' CLI option (fixes #1112) (Greg)
-* Fix: Correct a typo in the error message in tests (Michał Gołębiowski)
-* New: Add no-extra-bind rule to flag unnecessary bind calls (fixes #982) (Bence Dányi)
-* Fix: Useless bind call in cli-engine (fixes #1181) (Bence Dányi)
-* Docs: Updates `amd` description (fixes #1175) (James Whitney)
-* New: Adds support for the `jasmine` env (fixes #1176) (James Whitney)
-* Fix: for-in support to no-empty-label rule (fixes #1161) (Marc Harter)
-* docs: Update link (Mathias Bynens)
-* Fix: crash when loading empty eslintrc file (fixes #1164) (Michael Ficarra)
-* Fix: no-unused-var should respect compound assignments (fixes #1166) (Michael Ficarra)
-* Update: ES3 `ReservedWord`s (fixes #1151) Adds ES3 `ReservedWord`s to the list of keywords in the `dot-notation` rule (fixes #1151) (Emil Bay)
-* Update: Update comment parser to read rule slashes (fixes #1116) (Jary)
-* New: add no-void rule (fixes #1017). (Mike Sidorov)
-* New: Add rules.import() (fixes #1114) (Mathias Schreck)
-* New: Make mergeConfigs() merge plugin entries (fixes #1111) (Mathias Schreck)
-* Breaking: Change no-global-strict to global-strict and add "always" option (fixes #989) (Brandon Mills)
-* Fix: no-unreachable should check top-level statements (fixes #1138) (Brandon Mills)
-* Fix: Speed up no-unreachable (fixes #1135) (Brandon Mills)
-* New: advanced handle-callback-err configuration (fixes #1124) (Mathias Schreck)
-* New: Expose CLIEngine (fixes #1083) (Gyandeep Singh)
-* Docs: Add link to new Atom linter (fixes #1125) (Gil Pedersen)
-* Fix: space-after-keywords checks finally of TryStatement (fixes #1122) (Michael Ficarra)
-* Fix: space-after-keywords checks while of DoWhileStatement (fixes #1120) (Michael Ficarra)
-* Fix: space-after-keywords w/ "never" should allow else-if (fixes #1118) (Michael Ficarra)
-* Fix: dot-notation rule flags non-keyword reserved words (fixes #1102) (Michael Ficarra)
-* Update: Use xml-escape instead of inline helper (Ref #848) (jrajav)
-* Update: Added comments support to .eslintignore (fixes #1084) (Vitaly Puzrin)
-* Update: enabled 'no-trailing-spaces' rule by default (fixes #1051) (Vitaly Puzrin)
-* Breaking: Ignore children of all patterns by adding "/**" (Fixes #1069) (jrajav)
-* Fix: skip dot files and ignored dirs on traverse (fixes #1077, related to #814) (Vitaly Puzrin)
-* Docs: Added Gruntjs plugin on integrations page (Gyandeep Singh)
-* Fix: don't break node offsets if hasbang present (fixes #1078) (Vitaly Puzrin)
-* Build: Exclude readme/index from rules Resources generation (Fixes #1072) (jrajav)
-* Docs: Change eol-last examples to `<pre>` (Fixes #1068) (jrajav)
-* 0.7.4 (Nicholas C. Zakas)
-* New: space-in-parens rule (Closes #627) (jrajav)
-
-v0.7.4 - July 10, 2014
-
-* 0.7.4 (Nicholas C. Zakas)
-* Docs: Fix 'lintinging' typo and ref links (Tom Vincent)
-* Fix: Transform envs option to object in Config (Fixes #1064) (jrajav)
-* 0.7.3 (Nicholas C. Zakas)
-
-v0.7.3 - July 9, 2014
-
-* 0.7.3 (Nicholas C. Zakas)
-* Update: Address code review comment for strict rule (refs #1011) (Nicholas C. Zakas)
-* Docs: Update copyright policy (Nicholas C. Zakas)
-* Docs: Update documentation for max-len to include description of second option (fixes #1006) (Nicholas C. Zakas)
-* Fix: Avoid double warnings for strict rule (fixes #1011) (Nicholas C. Zakas)
-* Fix: Check envs for true/false (Fixes #1059) (jrajav)
-* 0.7.2 (Nicholas C. Zakas)
-
-v0.7.2 - July 8, 2014
-
-* 0.7.2 (Nicholas C. Zakas)
-* Fix: no-mixed-spaces-and-tabs incorrectly flagging multiline comments (fixes #1055) (Nicholas C. Zakas)
-* Fix: new-cap error that throws on non-string member (fixes #1056) (Nicholas C. Zakas)
-* Fix: Always make globals an object (Fixes #1049) (jrajav)
-* 0.7.1 (Nicholas C. Zakas)
-
-v0.7.1 - July 7, 2014
-
-* 0.7.1 (Nicholas C. Zakas)
-* Docs: Add Related Rules sections (Fixes #990) (jrajav)
-* Fix: Check output file isn't dir, fix tests (Fixes #1034) (jrajav)
-* Docs: Updated documentation for several rules (Nicholas C. Zakas)
-* Docs: Updated contributor guide and dev env setup guide (Nicholas C. Zakas)
-* Breaking: Implement configuration hierarchy (fixes #963) (Nicholas C. Zakas)
-* Update: greatly simplify eqeqeq's operator finding logic (fixes #1037) (Michael Ficarra)
-* New: Add getSourceLines() to core and rule context (fixed #1005) (Jary)
-* Build + Docs: Adding generated resource links to rule docs (Fixes #1021) (jrajav)
-* Fix: Ignore unused params for args: 'none' (Fixes #1026) (jrajav)
-* Fix: Point eqeqeq error at operator (Fixes #1029) (jrajav)
-* New: report output to a file (fixes #1027) (Gyandeep Singh)
-* Breaking: CLIEngine abstraction for CLI operations; formatters no longer are passed configs (fixes #935) (Nicholas C. Zakas)
-* Fix: Allow stdout to drain before exiting (fixes #317) (Nicholas C. Zakas)
-* New: add no-undefined rule (fixes #1020) (Michael Ficarra)
-* New: Added no-mixed-spaces-and-tabs rule (fixes #1003) (Jary)
-* New: Added no-trailing-spaces rule (fixes #995) (Vitaly Puzrin)
-* Update: Factor ignores out of Config (fixes #958) (jrajav)
-* Fix: rewrite eol-last rule (fixes #1007) (fixes #1008) (Michael Ficarra)
-* Fix: add additional IIFE exception in no-extra-parens (fixes #1004) (Michael Ficarra)
-* Docs: Removed reference to brace-style Stroustrup default (fixes #1000) (Caleb Troughton)
-* New: Added eol-last rule (Fixes #996) (Vitaly Puzrin)
-* Fix: Put rule severity in messages (Fixes #984); deprecates passing full config to Formatters (jrajav)
-* Fix: no-unused-vars to check only file globals (fixes #975) (Aliaksei Shytkin)
-* Build: Makefile - Check for rule ids in docs titles (Fixes #969) (Delapouite)
-* Docs: guard-for-in - added missing id in title (Fixes #969) (Delapouite)
-* Breaking: Change 'no-yoda' rule to 'yoda' and add "always" option (Fixes #959) (jrajav)
-* Fix: Fixes no-unused-vars to check /*globals*/ (Fixes #955) (jrajav)
-* Update: no-eval to also warn on setTimeout and setInterval (fixes #721) (Nicholas C. Zakas)
-* Remove: experimental match() method (Nicholas C. Zakas)
-* Update: space-in-brackets now always allows empty object and array literals to have no spaces (fixes #797) (Nicholas C. Zakas)
-* New: Allow the cli parameter "color" and "no-color" (fixes #954) (Tom Gallacher)
-* Fix: valid-jsdoc no more warning for multi-level params (Fixes #925) (Delapouite)
-* Update: Search parent directories for .eslintignore (Fixes #933) (jrajav)
-* Fix: Correct order of arguments passed to assert.equal (fixes #945) (Michał Gołębiowski)
-* Update: Write the summary in stylish formatter in yellow if no errors (fixes #906); test coloring of messages (Michał Gołębiowski)
-* Fix: Corrects configs merging into base config (Fixes #838) (jrajav)
-* Fix: Adding check if char is non-alphabetic to new-cap (Fixes #940) (jrajav)
-* Docs: Update about page description (fixes #936) (Nicholas C. Zakas)
-* Docs: Add '/', forgotten in first commit (Fixes #931) (jrajav)
-* Update: Rule `new-cap` checks capitalized functions (fixes #904) (Aliaksei Shytkin)
-* Docs: Mention allowed semicolons in "never" mode for 'semi' rule (fixes #931) (jrajav)
-* Docs: Mention Yeoman generator in dev setup (fixes #914) (Nicholas C. Zakas)
-* Build: Remove flaky perf test from Travis (Nicholas C. Zakas)
-* Breaking: Refactor .eslintignore functionality (refs #928, fixes #901, fixes #837, fixes #853) (Nicholas C. Zakas)
-* 0.6.2 (Nicholas C. Zakas)
-* Breaking: Remove JSON support for .eslintignore (fixes #883) (icebox)
-
-v0.6.2 - May 23, 2014
-
-* 0.6.2 (Nicholas C. Zakas)
-* Fix: Adding per-environment rule configs to docs and doc validation (Fixes #918) (jrajav)
-* Docs: Updated contribution guidelines (Nicholas C. Zakas)
-* Docs: Update description of eqeqeq to mention special cases (fixes #924) (Nicholas C. Zakas)
-* Fix: block-scoped-var CatchClause handling (fixes #922) (Michael Ficarra)
-* Fix: block-scoped-var respects decls in for and for-in (fixes #919) (Michael Ficarra)
-* Update: Implement eqeqeq option "allow-null" (fixes #910) (Michał Gołębiowski)
-* Fix: new-cap should allow non-alpha characters (fixes #897) (Michael Ficarra)
-* Update: Refactor ESLintTester to fix dependency hell (fixes #602) (Nicholas C. Zakas)
-* Fix: Merge configs with ancestors (Fixes #820) (jrajav)
-* Fix: no-fallthrough should respect block statements in case statements (fixes #893) (Nicholas C. Zakas)
-* Docs: Fix layout issue in configuration docs (fixes #889) (Nicholas C. Zakas)
-* Build: Enable default-case rule (fixes #881) (icebox)
-* Build: Enable space-after-keywords (fixes #884) (icebox)
-* Fix api double emit on comment nodes (fixes #876) (Aliaksei Shytkin)
-* 0.6.1 (Nicholas C. Zakas)
-
-v0.6.1 - May 17, 2014
-
-* 0.6.1 (Nicholas C. Zakas)
-* Upgrade: Optionator to 0.4.0 (fixes #885) (Nicholas C. Zakas)
-* 0.6.0 (Nicholas C. Zakas)
-
-v0.6.0 - May 17, 2014
-
-* 0.6.0 (Nicholas C. Zakas)
-* Fix: Remove -r alias for --rule (fixes #882) (Nicholas C. Zakas)
-* Docs: Update dev setup, contributing, default-case descriptions (Nicholas C. Zakas)
-* Update: valid-jsdoc now allows you to optionally turn off parameter description checks (fixes #822) (Nicholas C. Zakas)
-* Breaking: brace-style now disallows block statements where curlies are on the same line (fixes #758) (Nicholas C. Zakas)
-* Add linting Makefile.js (fixes #870) (icebox)
-* add rule flag, closes #692 (George Zahariev)
-* Add check between rules doc and index (fixes #865) (icebox)
-* Add Build Next mention in integrations README. (icebox)
-* document new IIFE exception for no-extra parens added as part of #655 (Michael Ficarra)
-* (fixes #622) Add rule ID on documentation pages (Delapouite)
-* fixes #655: add IIFE exception to no-extra-parens (Michael Ficarra)
-* add new rule "no-new-require" (Wil Moore III)
-* exit with non-zero status when tests fail (fixes #858) (Márton Salomváry)
-* removed unicode zero width space character from messages (fixes #857) (Márton Salomváry)
-* Change: --rulesdir now can be specified multiple times (fixes #830) (Nicholas C. Zakas)
-* Update: Node 0.8 no longer supported (fixes #734) (Nicholas C. Zakas)
-* Update: Add typed arrays into builtin environment globals (fixes #846) (Nicholas C. Zakas)
-* Fix: Add prototype methods to global scope (fixes #700) (Nicholas C. Zakas)
-* Rule: no-restricted-modules (fixes #791) (Christian)
-* Upgrade: Esprima to 1.2 (fixes #842) (Nicholas C. Zakas)
-* Docs: reporting level 2 is an error (fixes #843) (Brandon Mills)
-* Upgrade: Esprima to 1.2, switch to using Esprima comment attachment (fixes #730) (Nicholas C. Zakas)
-* Fix: Semi rule incorrectly flagging extra semicolon (fixes #840) (Nicholas C. Zakas)
-* Build: Update Travis to only test Node 0.10 (refs #734) (Nicholas C. Zakas)
-* Add "nofunc" option (fixes #829) (Conrad Zimmerman)
-* Rule: no-inner-declarations (fixes #587) (Brandon Mills)
-* Rule 'block-scoped-var': correct scope for functions, arguments (fixes #832) (Aliaksei Shytkin)
-* Rule: default-case (fixes #787) (Aliaksei Shytkin)
-* Ignored files are excluded unless --force is passed on the CLI (Nick Fisher)
-* Fixes a typo and a broken link in the documentation (Nick Fisher)
-* Replaces .some() with .indexOf() where appropriate (Nick Fisher)
-* Fix correct config merge for array values (fixes #819) (Aliaksei Shytkin)
-* Remove warning about ESLint being in Alpha (Nick Fisher)
-* Adds `space-after-keywords` rule (fixes #807) (Nick Fisher)
-* Rule: no-lonely-if (fixes #790) (Brandon Mills)
-* Add ignore comments in file (fixes #305) (Aliaksei Shytkin)
-* 0.5.1 (Nicholas C. Zakas)
-* Change: no-unused-vars default to 'all' (fixes #760) (Nicholas C. Zakas)
-
-v0.5.1 - April 17, 2014
-
-* 0.5.1 (Nicholas C. Zakas)
-* Fix general config not to be modified by comment config in files (fixes #806) (Aliaksei Shytkin)
-* SVG badges (Ryuichi Okumura)
-* fixes #804: clean up implementation of #803 (which fixed #781) (Michael Ficarra)
-* Build: Fix perf test to take median of three runs (fixes #781) (Nicholas C. Zakas)
-* Fix: --reset will now properly ignore default rules in environments.json (fixes #800) (Nicholas C. Zakas)
-* Docs: Updated contributor guidelines (Nicholas C. Zakas)
-* Added Mocha global variables for TDD style. Fixes #793. (Golo Roden)
-* Rule: no-sequences (fixes #561) (Brandon Mills)
-* Change .eslintingore to plain text (fixes #761) (Brandon Mills)
-* Change 'no-spaced-func' message (fixes #762) (Aliaksei Shytkin)
-* Rule 'block-scoped-var' works correct when object inits (fixes #783) (Aliaksei Shytkin)
-* Build: Always build docs site on top of origin/master (Nicholas C. Zakas)
-* 0.5.0 (Nicholas C. Zakas)
-
-v0.5.0 - April 10, 2014
-
-* 0.5.0 (Nicholas C. Zakas)
-* Build: Bump perf limit so Travis won't fail every time (fixes #780) (Nicholas C. Zakas)
-* Add tests to cover 100% of eslint.js (Aliaksei Shytkin)
-* Fix: Make sure no-path-concat doesn't flag non-concat operations (fixes #776) (Nicholas C. Zakas)
-* Rule 'no-unused-var' in functional expression with identifier (fixes #775) (Aliaksei Shytkin)
-* Rule: valid-typeof (Ian Christian Myers)
-* Add global cli flag (ref #692) (Brandon Mills)
-* update to latest Optionator (George Zahariev)
-* Add options for rule 'no-unused-vars' to check all arguments in functions (fixes #728) (Aliaksei Shytkin)
-* Fix: Cleanup package.json (Nicholas C. Zakas)
-* New: Experimental support for CSS Auron (fixes #765) (Nicholas C. Zakas)
-* Lint tests on build (fixes #764) (Aliaksei Shytkin)
-* Rule block-scoped-var works correct with object properties (fixes #755) (Aliaksei Shytkin)
-* Breaking: implement eslint-env and remove jshint/jslint environment comment support (fixes #759) (Aliaksei Shytkin)
-* readme: npm i -> npm install (Linus Unnebäck)
-* Add env flag to cli options summary (fixes #752) (Brandon Mills)
-* Fix: Give the perf test a better calculated budget (fixes #749) (Nicholas C. Zakas)
-* give the `env` flag type `[String]`, improve code (fixes #748) (George Zahariev)
-* fixes #735: add new, more efficient getTokens interfaces (Michael Ficarra)
-* Add --env cli flag (ref #692) (Brandon Mills)
-* Fixes #740 - Make sure callbacks exist before marking them as 'handled'. (mstuart)
-* fixes #743: wrap-regex rule warns on regex used in dynamic member access (Michael Ficarra)
-* replace tab indents with 4 spaces in lib/rules/handle-callback-err.js (Michael Ficarra)
-* Adding homepage and bugs links to package.json (Peter deHaan)
-* JSDoc for rules (Anton Rudeshko)
-* 0.4.5 (Nicholas C. Zakas)
-
-v0.4.5 - March 29, 2014
-
-* 0.4.5 (Nicholas C. Zakas)
-* Build: Add perf check into Travis build to better monitor performance regressions (fixes #732) (Nicholas C. Zakas)
-* Fix: Make sure semi reports correct location of missing semicolon (fixes #726) (Nicholas C. Zakas)
-* Add --no-eslintrc cli flag (ref #717) (Brandon Mills)
-* Fix #716 crash with reset flag (Brandon Mills)
-* Fixed JSON formatting and highlighting (Anton Rudeshko (Tesla))
-* fixes #723: block-scoped-var throws on unnamed function expression (Michael Ficarra)
-* Fix: Make stroustrup brace-style closing message make sense (fixes #719) (Nicholas C. Zakas)
-* no-comma-dangle reports correct line number (Andrey Popp)
-* Upgrade: Esprima to 1.1.1 and EScope to 1.0.1 (fixes #718) (Nicholas C. Zakas)
-* Add reset cli flag (refs #692) (Brandon Mills)
-* Relax eqeqeq null check (fixes #669) (Brandon Mills)
-* 0.4.4 (Nicholas C. Zakas)
-* New Rule: handle-callback-err (fixes #567) (Jamund Ferguson)
-
-v0.4.4 - March 25, 2014
-
-* 0.4.4 (Nicholas C. Zakas)
-* Fix no-used-vars to report FunctionExpression params (fixes #697). (Andrey Popp)
-* fixes #711: eslint reports wrong line number for files with shebang (Michael Ficarra)
-* Fix for no-unused-vars and MemberExpression (Andrey Popp)
-* added no-warning-comments rule (Alexander Schmidt)
-* fixes #699: brace-style does not check function expressions (Michael Ficarra)
-* rewrite block-scoped-var (Michael Ficarra)
-* recommend using hasOwnProperty from Object.prototype in guard-for-in docs (Michael Ficarra)
-* change conf/environments.json spacing to be simpler and more consistent (Michael Ficarra)
-* Update API to use context.getFilename() instead of .filename. (Loren Segal)
-* Small changes, JSDoc is clarified (Aliaksei Shytkin)
-* Move FileFinder to separate file (Aliaksei Shytkin)
-* Cache if file is not found (Aliaksei Shytkin)
-* Use cache on config files seach (Aliaksei Shytkin)
-* Added .eslintignore to load from parents folders (fixes #681) (Aliaksei Shytkin)
-* fix 'node-modules' typo in docs (Fred K. Schott)
-* Upgrade to the latest version of doctrine. (Brian Di Palma)
-* Document optional filename and default it to `input`. (Loren Segal)
-* Fix: Compatibility for Node 0.8 (Nicholas C. Zakas)
-* Update: Makefile.js now uses shelljs-nodecli (Nicholas C. Zakas)
-* #681 apply all .eslintignore exclusions (Aliaksei Shytkin)
-* Add RuleContext.filename property (for eslint/eslint#468). (Loren Segal)
-* 0.4.3 (Nicholas C. Zakas)
-
-v0.4.3 - March 18, 2014
-
-* 0.4.3 (Nicholas C. Zakas)
-* fixes #682: rewrite no-constant-condition rule (Michael Ficarra)
-* Fixes #673 allow configuration of @return errors via requireReturn - (fixes #673) (Brian Di Palma)
-* Tweaking inline code formatting for "if, while, dowhile" (Peter deHaan)
-* Fixes #677 getJSDocComment() should not search beyond FunctionExpression or FunctionDeclaration parent nodes. (Brian Di Palma)
-* Relaxed enforcement of camelcase rule (Ian Christian Myers)
-* Fixing issue #675. Incorrect triggering of no-else-return rule. (Brian Di Palma)
-* Added style option for wrap-iife (Mathias Schreck)
-* Fix: Issues with named function expressions in no-unused-vars and no-shadow (fixes #662) (Nicholas C. Zakas)
-* Update: camelcase rule now doesn't flag function calls (fixes #656) (Nicholas C. Zakas)
-* Updating documentation description for: no-space-before-semi rule, changing rules to exempt strings with semicolons and test for that condition. Fixes #629. (Jonathan Kingston)
-* Adding in rule no-space-before-semi to prevent spaces before semicolons. fixes #629 (Jonathan Kingston)
-* show NPM version (Paul Verest)
-* adapt code formatting (Mathias Schreck)
-* Added a TextMate 2 integration to the docs (Nate Silva)
-* 0.4.2 (Nicholas C. Zakas)
-
-v0.4.2 - March 3, 2014
-
-* 0.4.2 (Nicholas C. Zakas)
-* fixes #651: disable no-catch-shadow rule in node environment (Michael Ficarra)
-* Fixed context.report message parsing (Ian Christian Myers)
-* fixe #648: wrap-iife rule should actually check that IIFEs are wrapped (Michael Ficarra)
-* Added "stroustrup" option for brace-style (Ian Christian Myers)
-* 0.4.1 (Nicholas C. Zakas)
-
-v0.4.1 - February 27, 2014
-
-* 0.4.1 (Nicholas C. Zakas)
-* Created space-in-brackets rule (Ian Christian Myers)
-* Update: Allow valid-jsdoc to specify replacement tags (fixes #637) (Nicholas C. Zakas)
-* Fix: Ensure getJSDocComment() works for all function declarations (fixes #638) (Nicholas C. Zakas)
-* Added broccoli-eslint to integration docs (Christian)
-* fixes #634: getters/setters shouldn't trigger no-dupe-keys (Michael Ficarra)
-* Update: semi to also enforce not using semicolons (fixes #618) (Nicholas C. Zakas)
-* New Rule: no-constant-condition - removed SwitchStatement discriminant check - removed AssignmentExpression with right Identifier - fixed copy paste error - added DoWhileStatement, ForStatement based on discussion: https://github.com/eslint/eslint/pull/624 (fixes #621) (Christian)
-* New Rule: no-constant-condition (fixes #621) (Christian)
-* Adding mimosa-eslint to Build System list (dbashford)
-* Fix: Make sure semi flags return statements without a semicolon (fixes #616) (Nicholas C. Zakas)
-* Fix: stylish formatter blue text -> white text (fixes #607) (Nicholas C. Zakas)
-* Fix: radix rule should warn (not throw error) when parseInt() is called without arguments (fixes #611) (Nicholas C. Zakas)
-* Update README.md (Dmitry)
-* Adding JSDoc comments for TAP format helper functions (Jonathan Kingston)
-* Updating documentation to include TAP format option (Jonathan Kingston)
-* Fixing validation issues to TAP formatter (Jonathan Kingston)
-* Adding TAP formatter and basic tests (Jonathan Kingston)
-* Docs: Updated integrations page (Nicholas C. Zakas)
-* 0.4.0 (Nicholas C. Zakas)
-
-v0.4.0 - February 12, 2014
-
-* 0.4.0 (Nicholas C. Zakas)
-* Change: Switch :after to :exit (fixes #605) (Nicholas C. Zakas)
-* Fix: Make sure no-unused-vars doesn't get confused by nested functions (fixes #584) (Nicholas C. Zakas)
-* Update: .eslintrc to check more things (Nicholas C. Zakas)
-* Fix: Make sure JSDoc parser accepts JSDoc3-style optional parameters (Nicholas C. Zakas)
-* Docs: Update documentation with linking instructions for ESLintTester (Nicholas C. Zakas)
-* New Rule: valid-jsdoc (fixes #536) (Nicholas C. Zakas)
-* #595 improved func-names documentation (Kyle Nunery)
-* #595 added more func-names tests (Kyle Nunery)
-* #595 fix rule message and add more tests (Kyle Nunery)
-* use optionator for option parsing, not optimist (George Zahariev)
-* Include instructions for working with ESLintTester (Nicholas C. Zakas)
-* #595 remove needless 'function Foo() {}' in tests (Kyle Nunery)
-* #595 fix whitespace (Kyle Nunery)
-* #595 fix markdown for js code blocks (Kyle Nunery)
-* Adding information about Yeomen generator (Ilya Volodin)
-* #595 add docs for rule func-names (Kyle Nunery)
-* #595 add func-names rule (Kyle Nunery)
-* migrate variables array to map (Brandon Mills)
-* Perf: Move try-catch out of verify() function to allow V8 optimization (refs #574) (Nicholas C. Zakas)
-* Docs: Added instructions for running npm run profile (Nicholas C. Zakas)
-* refactor variable name lookup into a separate function (Brandon Mills)
-* optimize findVariable() in no-unused-vars (Brandon Mills)
-* move to tests/bench (Chris Dickinson)
-* add `npm run profile`. (Chris Dickinson)
-* #586 refactor based on https://github.com/eslint/eslint/pull/590#discussion_r9476367 (Christian)
-* #586 added no-unreachable jsdoc, documentation note on hoisting case (Christian)
-* #586 add hoisting check to no-unreachable (Christian)
-* readme: Remove stray asterisk (Timo Tijhof)
-* #580 Remove eslint.getAllComments(), related docs, related tests (Christian)
-* Added test for bug fix #582. Test Passes (Shmueli Englard)
-* Added curly braces to if statment (Shmueli Englard)
-* Added new test for fix to #582 (fixes 582) (Shmueli Englard)
-* Bug #582: Added check if node.value isn't a string just exit (Shmueli Englard)
-* Update Rule: implement curly options for single-statement bodies (fixes #511) (Nicholas C. Zakas)
-* New Rule: no-extra-boolean-cast (fixes #557) (Brandon Mills)
-* New Rule: no-sparse-arrays (fixes #499) (Nicholas C. Zakas)
-* Fix: no-spaced-func is now an error (Nicholas C. Zakas)
-* New Rule: no-process-exit (fixes #568) (Nicholas C. Zakas)
-* New Rule: no-labels (fixes #550) (Nicholas C. Zakas)
-* New Rule: no-lone-blocks (fixes #512) (Brandon Mills)
-* Added Emacs/Flycheck integration (Nikolai Prokoschenko)
-* Build: Add perf test (Nicholas C. Zakas)
-* Fix: no-cond-assign shouldn't throw error when there's a for loop with an empty conditional (fixes #53) (Nicholas C. Zakas)
-* Docs: Add docs for no-regex-spaces and all doc errors now break build (closes #562) (Nicholas C. Zakas)
-* Rename: regex-spaces to no-regex-spaces (Nicholas C. Zakas)
-* Docs: Add docs for no-underscore-dangle (refs #562) (Nicholas C. Zakas)
-* Docs: Add docs for no-undef-init (refs #562) (Nicholas C. Zakas)
-* Docs: Add docs for no-return-assign (refs #562) (Nicholas C. Zakas)
-* Fix: Misspelling in no-return-assign message (Nicholas C. Zakas)
-* Docs: Add docs for no-new-wrappers (refs #562) (Nicholas C. Zakas)
-* Docs: Add docs for no-new-object (refs #562) (Nicholas C. Zakas)
-* Docs: Add docs for no-implied-eval (refs #562) (Nicholas C. Zakas)
-* Docs: Updated documentation for developing rules (Nicholas C. Zakas)
-* Testing: Move ESLintTester to be external dependency (fixes #480) (Nicholas C. Zakas)
-* Docs: Add list of known integrations (Nicholas C. Zakas)
-* Fix #570 (dmp42)
-* document no-array-constructor rule (Michael Ficarra)
-* fixes #500: no-array-constructor should not flag 1-argument construction (Michael Ficarra)
-* fixes #501: no-array-constructor recognises CallExpression form (Michael Ficarra)
-* rename no-new-array rule to no-array-constructor; ref #501 (Michael Ficarra)
-* Fix: Make radix rule warn on invalid second parameter (fixes #563) (Nicholas C. Zakas)
-* Docs: Added no-floating-decimal docs (refs #562) (Nicholas C. Zakas)
-* New Rule: no-path-concat (fixes #540) (Nicholas C. Zakas)
-* Docs: Add some missing rule docs (refs #562) (Nicholas C. Zakas)
-* Fix: CLI should not output anything when there are no warnings (fixes #558) (Nicholas C. Zakas)
-* New Rule: no-yoda (fixes #504) (Nicholas C. Zakas)
-* New Rule: consistent-return (fixes #481) (Nicholas C. Zakas)
-* Rewrite configuration documentation to include information about globals (fixes #555) (Nicholas C. Zakas)
-* Allow YAML configuration files (fixes #491) (Nicholas C. Zakas)
-* 0.3.0 (Nicholas C. Zakas)
-
-v0.3.0 - January 20, 2014
-
-* 0.3.0 (Nicholas C. Zakas)
-* Config: Allow comments in JSON configuration files (fixes #492) (Nicholas C. Zakas)
-* Bug: max-len fix to report correct line number (fixes #552) (Nicholas C. Zakas)
-* Build: Use browserify to create browser-ready ESLint (fixes #119) (Nicholas C. Zakas)
-* Docs: Ensure all rules have entry on top-level rules index page (Nicholas C. Zakas)
-* Docs: Add docs for no-fallthrough rule (Nicholas C. Zakas)
-* Update README.md (Peter deHaan)
-* Update README.md (Peter deHaan)
-* Update package.json (Peter deHaan)
-* Docs: Added documentation for semi rule (Nicholas C. Zakas)
-* Build: Reset branch coverage target (Nicholas C. Zakas)
-* Update build system to generate eslint.org during release (Nicholas C. Zakas)
-* Updated setup doc (Nicholas C. Zakas)
-* Fix #525 & #528 (Mangled Deutz)
-* Improve no-negated-in-lhs description (David Bruant)
-* Fixing typo (David Bruant)
-* Update no-new.md (Tamas Fodor)
-* Update no-extra-semi.md (Tamas Fodor)
-* Fixing broken links in documentation (Ilya Volodin)
-* Update about page (Nicholas C. Zakas)
-* Site generation build step and documentation updates to support it (fixes #478) (Nicholas C. Zakas)
-* Change message for brace-style rule (fixes #490) (Nicholas C. Zakas)
-* Add question about ES6 support to FAQ (fixes #530) (Nicholas C. Zakas)
-* Set unlimited number of listeners for event emitter (fixes #524) (Nicholas C. Zakas)
-* Add support for comment events (fixes #531) Add :after events for comments (Nicholas C. Zakas)
-* Add :after events for comments (Nicholas C. Zakas)
-* Allow config files to have any name (fixes #486). (Aparajita Fishman)
-* List available formatters (fixes #533). (Aparajita Fishman)
-* Add support for comment events (fixes #531) (Nicholas C. Zakas)
-* Add Stylish formatter and make it default. Fixes #517 (Sindre Sorhus)
-* Fix missing code exit (Mangled Deutz)
-* Added unit test for calling Config.getConfig with no arguments. (Aparajita Fishman)
-* Typo (Mangled Deutz)
-* Fixed docs typo (Nicholas C. Zakas)
-* Mark functions as used when any method is called on them (Nicholas C. Zakas)
-* Fixed: Config.getConfig is called either with a file path or with no args (fixes #520) (Aparajita Fishman)
-* Fix minor bug in no-empty rule (Nicholas C. Zakas)
-* add more info for failure messages (Nicholas C. Zakas)
-* Add ruleId to all formatters output (fixes #472) (Nicholas C. Zakas)
-* Remove unused code (Nicholas C. Zakas)
-* Correctly handle case with both finally and catch in no-empty (Nicholas C. Zakas)
-* Update documentation for no-unused-vars (Nicholas C. Zakas)
-* Ensure that bound function expressions are reported as being used (fixes #510) (Nicholas C. Zakas)
-* Allow empty catch/finally blocks (fixes #514) and update documentation (fixes #513) (Nicholas C. Zakas)
-* Updated contribution guidelines (Nicholas C. Zakas)
-* Add default setting for no-cond-assign (Nicholas C. Zakas)
-* Add build step to check rule consistency (Nicholas C. Zakas)
-* update docs: explicit cli args are exempt from eslintignore exclusions (Michael Ficarra)
-* fixes #505: no-cond-assign should ignore doubly parenthesised tests (Michael Ficarra)
-* Renamed unnecessary-strict to no-extra-strict (Nicholas C. Zakas)
-* Fixed missing documentation links (Nicholas C. Zakas)
-* Add build task to check for missing docs and tests for rules (Nicholas C. Zakas)
-* Slight reorganization of rule groups (Nicholas C. Zakas)
-* Added one-var and sorted some rules (Nicholas C. Zakas)
-* Updated Travis badge for new location (Nicholas C. Zakas)
-* fixes #494: allow shebangs in processed JS files (Michael Ficarra)
-* fixes #496: lint ignored files when explicitly specified via the CLI (Michael Ficarra)
-* More tests (Ilya Volodin)
-* Upgrade Istanbul (Ilya Volodin)
-* fixes #495: holey arrays cause no-comma-dangle rule to throw (Michael Ficarra)
-* Documentation and minor changes (Ilya Volodin)
-* Adding missing package registration (Ilya Volodin)
-* Adding support for .eslintignore and .jshintignore (Closes #484) (Ilya Volodin)
-* fixes #482: brace-style bug with multiline conditions (Michael Ficarra)
-* Switching Travis to use ESLint (Closes #462) (Ilya Volodin)
-* 0.2.0 (Nicholas C. Zakas)
-
-v0.2.0 - January 1, 2014
-
-* 0.2.0 (Nicholas C. Zakas)
-* Bump code coverage checks (Nicholas C. Zakas)
-* Take care of unreachable code in case statement (Nicholas C. Zakas)
-* Updated rule messaging and added extra tests (Nicholas C. Zakas)
-* Fixing eslint errors and unittests (Ilya Volodin)
-* Rule: max-nested-callbacks (Ian Christian Myers)
-* Fix fall-through rule with nested switch statements (fixes #430) (Nicholas C. Zakas)
-* Fixed trailing comma (Nicholas C. Zakas)
-* Added more tests for func-style (Nicholas C. Zakas)
-* Fixed documentation for func-style (Nicholas C. Zakas)
-* Fixed linting error (Nicholas C. Zakas)
-* Rule to enforce function style (fixes #460) (Nicholas C. Zakas)
-* Rule is off by default. Updated documentation (Ilya Volodin)
-* Rule: sort variables. Closes #457 (Ilya Volodin)
-* Update architecture.md (Nicholas C. Zakas)
-* Change quotes option to avoid-escapes and update docs (fixes #199) (Brandon Payton)
-* Add allow-avoiding-escaped-quotes option to quotes rule (fixes #199) (Brandon Payton)
-* Update no-empty-class.md (Nicholas C. Zakas)
-* Updated titles on all rule documentation (fixes #348) (Nicholas C. Zakas)
-* Fixing eslint errors in codebase (Ilya Volodin)
-* fixes #464: space-infix-ops checks for VariableDeclarator init spacing (Michael Ficarra)
-* Add options to no-unused-vars. Fixes #367 (Ilya Volodin)
-* rename escape function to xmlEscape in checkstyle formatter (Michael Ficarra)
-* The semi rule now reports correct line number (Ian Christian Myers)
-* context.report now takes optional location (Ian Christian Myers)
-* fixes #454: escape values for XML in checkstyle formatter (Michael Ficarra)
-* Add color to Mocha test reporting (Ian Christian Myers)
-* Rule no-nested-ternary (Ian Christian Myers)
-* Fixing no-unused-var and no-redeclare (Ilya Volodin)
-* fixes #449: no-mixed-requires throws TypeError when grouping is enabled (Michael Ficarra)
-* Fixed reported line number for trailing comma error (Ian Christian Myers)
-* Update doc title for quote (Matthew DuVall)
-* fixes #446: join paths without additional delimiters (Michael Ficarra)
-* docs: add documentation for quotes rule (Matthew DuVall)
-* minor style changes to lib/rules/space-infix-ops.js as requested in #444 (Michael Ficarra)
-* remove "function invalid(){ return D }" from some tests (Michael Ficarra)
-* fixes #429: require spaces around infix operators; enabled by default (Michael Ficarra)
-* simplify fix for #442 (Michael Ficarra)
-* Fix broken test, ensure tests get run before a release is pushed (Nicholas C. Zakas)
-* 0.1.4 (Nicholas C. Zakas)
-
-v0.1.4 - December 5, 2013
-
-* 0.1.4 (Nicholas C. Zakas)
-* Add release scripts to package.json (Nicholas C. Zakas)
-* Fixed release error in Makefile (Nicholas C. Zakas)
-* Fix JSHint warnings (Nicholas C. Zakas)
-* Make sure 'default' isn't flagged by no-space-returns-throw rule (fixes #442) (Nicholas C. Zakas)
-* Fixing documentation (Ilya Volodin)
-* Fixing disabling rules with invalid comments Closes #435 (Ilya Volodin)
-* improve assertion on wrong number of errors (Christoph Neuroth)
-* fixes #431: no-unused-expressions should not flag statement level void (Michael Ficarra)
-* fixes #437: fragile no-extend-native rule (Michael Ficarra)
-* change space-* rule documentation headers to be more descriptive (Michael Ficarra)
-* Moved to tabs, added comments, a few more tests (Jamund Ferguson)
-* split GH-332 rule into space-unary-word-ops and space-return-throw-case (Michael Ficarra)
-* fixes #346: validate strings passed to the RegExp constructor (Michael Ficarra)
-* change some documentation extensions from js to md (Michael Ficarra)
-* fixes #332: unary word operators must be followed by whitespace (Michael Ficarra)
-* Add some docs (Jamund Ferguson)
-* DRYing cli tests and improving code coverage (Ilya Volodin)
-* fixes #371: add no-shadow-restricted-names rule (Michael Ficarra)
-* Added Support for Object.defineProperty() checking (Jamund Ferguson)
-* fixes #333: add rule to disallow gratuitously parenthesised expressions (Michael Ficarra)
-* improve rule test coverage (Michael Ficarra)
-* No Extend Native (Jamund Ferguson)
-* change getTokens 2nd/3rd arguments to count tokens, not characters (Michael Ficarra)
-* fixes #416: no-fallthrough flagging last case + reporting wrong line num (Michael Ficarra)
-* fixes #415: fix unnecessary-strict rule false positives (Michael Ficarra)
-* Add missing dependency (Nicholas C. Zakas)
-* Update docs related to running unit tests (Nicholas C. Zakas)
-* Add JSHint as missing dependency (Nicholas C. Zakas)
-* Switch to using ShellJS makefile (fixes #418) (Nicholas C. Zakas)
-* Updated documentation to reflect test changes (refs #417) (Nicholas C. Zakas)
-* Change to eslintTester.addRuleTest (fixes #417) (Nicholas C. Zakas)
-* Fix false positives for no-script-url (fixes #400) (Nicholas C. Zakas)
-* Fix lint warning (Nicholas C. Zakas)
-* Fixing ESLint warnings, introducing Makefile.js (not yet wired in) (Nicholas C. Zakas)
-* fixes #384: include builtin module list to avoid repl dependency (Michael Ficarra)
-* 0.1.3 (Nicholas C. Zakas)
-
-v0.1.3 - November 25, 2013
-
-* 0.1.3 (Nicholas C. Zakas)
-* Updated changelog (Nicholas C. Zakas)
-* Vows is gone. Mocha is now default (Ilya Volodin)
-* fixes #412: remove last remaining false positives in no-spaced-func (Michael Ficarra)
-* fixes #407: no-spaced-func rule flagging non-argument-list spaced parens (Michael Ficarra)
-* Add no-extra-semi to configuration (fixes #386) (Nicholas C. Zakas)
-* Converting formatter tests and core (Ilya Volodin)
-* Don't output anything when there are no errors in compact formatter (fixes #408) (Nicholas C. Zakas)
-* Removing Node 0.11 test - it fails all the time (Nicholas C. Zakas)
-* Completing conversion of rule's tests to mocha (Ilya Volodin)
-* added mocha conversion tests for strict, quote-props and one-var; enhanced one of the invalid one-var tests that was expecting two messages (Michael Paulukonis)
-
-
-v0.1.2 - November 23, 2013
-
-* 0.1.2 (Nicholas C. Zakas)
-* added mocha tests for radix and quotes; fixed some of the internals on quotes from vows annotations (Michael Paulukonis)
-* added tests for regex-spaces, strict, unnecessary-strict; fixed some types in overview/author notes in other tests. (Michael Paulukonis)
-* Converting unittests to mocha (Ilya Volodin)
-* mocha conversions of tests for 'use-isnan' and 'wrap-iife' (Michael Paulukonis)
-* added mocha tests semi.js and wrap-regex.js (Michael Paulukonis)
-* Converting more tests to mocha (Ilya Volodin)
-* Update CONTRIBUTING.md (Nicholas C. Zakas)
-* Cleaning up eslintTester (Ilya Volodin)
-* DRYing unittests and converting them to mocha (Ilya Volodin)
-* Reformatted Gruntfile (Nicholas C. Zakas)
-* Add tests to config load order: base, env, user. (icebox)
-* Fixing indent in gruntfile (Ilya Volodin)
-* Removing jake, adding Grunt, Travis now runs grunt (Ilya Volodin)
-* Add rules per environments to config. (icebox)
-* Add globals property to the environments. (icebox)
-* Fix error about IIFE if the function is in a new (Marsup)
-* Fix a broken link in the docs (Brian J Brennan)
-* Add test coverage for additional cases, fix open paren at beginning of expr (Matthew DuVall)
-* Fixing no-undef for eval use case (Ilya Volodin)
-* fixes #372: disallow negated left operand in `in` operator (Michael Ficarra)
-* Fixing no-self-compare rule to check for operator (Ilya Volodin)
-* bug: open parens in args causes no-spaced-func to trigger (Matthew DuVall)
-* fixes #369: restrict UnaryExpressions to delete in no-unused-expressions (Michael Ficarra)
-* Make sure delete operator isn't flagged as unused expression (fixes #364) (Nicholas C. Zakas)
-* Don't flag ++ or -- as unused expressions (fixes #366) (Nicholas C. Zakas)
-* Ensure that 'use strict' isn't flagged as an unused expression (fixes #361) (Nicholas C. Zakas)
-* Increase test coverage for strict-related rules (refs #361) (Nicholas C. Zakas)
-* Up code coverage numbers (Nicholas C. Zakas)
-* Fixes error in new-cap rule when 'new' is used without a constructor (fixes #360) (Nicholas C. Zakas)
-* added files array in package json (Christian)
-* removed unused jshint dependency (Christian)
-* Add test coverage for new Foo constructor usage (Matt DuVall)
-* Pull code coverage up by removing unused method (Matt DuVall)
-* recognise CallExpression variant of RegExp ctor in no-control-regex rule (Michael Ficarra)
-* Merge smart-eqeqeq into eqeqeq (Matt DuVall)
-* Catch additional cases for a.b, new F, iife (Matt DuVall)
-* 0.2.0-dev (Nicholas C. Zakas)
-* Version 0.1.0 (Nicholas C. Zakas)
-* rule: no-spaced-func disallow spaces between function identifier and application (Matt DuVall)
-
-v0.1.1 - November 09, 2013
-
-* Ensure mergeConfigs() doesn't thrown an error when keys are missing in base config (fixes #358) (Nicholas C. Zakas)
-
-v0.1.0 - November 03, 2013
-
-* Version 0.1.0 (Nicholas C. Zakas)
-* Updated Readme for v0.1.0 (Nicholas C. Zakas)
-* Bump code coverage verification to 95% across the board (Nicholas C. Zakas)
-* Fixed broken links (Nicholas C. Zakas)
-* Added information about runtime rules (Nicholas C. Zakas)
-* Added documentation about configuration files (Nicholas C. Zakas)
-* Added description of -v option (Nicholas C. Zakas)
-* Updated architecture documentation (Nicholas C. Zakas)
-* Fix bug in no-control-regex (fixes #347) (Nicholas C. Zakas)
-* Fix link to architecture doc in readme (azu)
-* Rule: No control characters in regular expressions (fixes #338) (Nicholas C. Zakas)
-* Add escaping \= test (Matt DuVall)
-* Add docs for rule (Matt DuVall)
-* rule: no-div-regex for catching ambiguous division operators in regexes (Matt DuVall)
-* Change context-var to block-scoped-var (Matt DuVall)
-* Implement config.globals (Oleg Grenrus)
-* Add 'config-declared global' test (Oleg Grenrus)
-* Adding ability to separate rules with comma (Ilya Volodin)
-* Added rule for missing 'use strict' (fixes #321) (Nicholas C. Zakas)
-* Fixing unittests and finishing code (Ilya Volodin)
-* Disabling/enabling rules through comments (Ilya Volodin)
-* Rename rule to context-var and add documentation (Matt DuVall)
-* Added link to no-global-strict doc in readme (Nicholas C. Zakas)
-* Add try-catch scoping with tests (Matt DuVall)
-* Fix linting error (Matt DuVall)
-* Store FunctionDeclarations in scope as they can be used as literals (Matt DuVall)
-* Fix to use getTokens and add test for MemberExpression usage (Matt DuVall)
-* rule: block-scope-var to check for variables declared in block-scope (Matt DuVall)
-* no-unused-expressions rule: add test and doc mention for `a && b()` (Michael Ficarra)
-* rule: wrap-regex for parens around regular expression literals (Matt DuVall)
-* fixes #308: implement no-unused-expressions rule; ref. jshint rule W030 (Michael Ficarra)
-* Updated change log script to filter out merge messages (Nicholas C. Zakas)
-* Updated changelog (Nicholas C. Zakas)
-* 0.1.0-dev (Nicholas C. Zakas)
-
-v0.0.9 - October 5, 2013
-
-* Version 0.0.9 release (Nicholas C. Zakas)
-* Added rule for no global strict mode (fixes #322) (Nicholas C. Zakas)
-* Change default on to be errors instead of warnings (fixes #326) (Nicholas C. Zakas)
-* Fixed bug where JSHint was using the wrong file in lint task (Nicholas C. Zakas)
-* Updated docs for no-unused vars rule. (Andrew de Andrade)
-* Removed console.log in tests. (Andrew de Andrade)
-* Added link to roadmap and JSHint feature parity list. (Andrew de Andrade)
-* Fixed warning when unused var declared as param in FunctionExpression/Declaration can be ignored because later param is used (Andrew de Andrade)
-* Rename test for smartereqeqeq.js to smarter-eqeqeq.js (Andrew de Andrade)
-* Keep test filename inline with rule name (Andrew de Andrade)
-* Added further instructions for multiline test cases. (Andrew de Andrade)
-* Protecting private method (Seth McLaughlin)
-* Updating look up algorithm for local config files (Seth McLaughlin)
-* Fixing ESLint errors (Ilya Volodin)
-* Implemented local default config file (Seth McLaughlin)
-* Upgrading escope version and fixing related bugs (Ilya Volodin)
-* Fixing assignment during initialization issue (Ilya Volodin)
-* add plain-English regexp description to no-empty-class rule (Michael Ficarra)
-* fixes #289: no-empty-class flags regexps with... flags (Michael Ficarra)
-* Rule: no-catch-shadow (Ian Christian Myers)
-* Update no-empty for compatibility with esprima@1.0.4 (fixes #290) (Mark Macdonald)
-* Fixing bug with _ in MemberExpression (Ilya Volodin)
-* Rule: no-func-assign (Ian Christian Myers)
-* Fix false warning from no-undef rule (fixes #283) (Mark Macdonald)
-* Adding eslint to jake (Ilya Volodin)
-* Rule no redeclare (Ilya Volodin)
-* Fixing no use before define issues (Ilya Volodin)
-* Rule: no-octal-escape (Ian Christian Myers)
-* Fix for `no-proto` and `no-iterator` false positive (Ian Christian Myers)
-* Rule: no-iterator (Ian Christian Myers)
-* Fixing type in guard-for-in documentation (Ilya Volodin)
-* Rule No use before define (Ilya Volodin)
-* Added documentation for the `no-new` rule (Ian Christian Myers)
-* Added documentation for the `no-eval` rule (Ian Christian Myers)
-* Added documentation for the `no-caller` rule (Ian Christian Myers)
-* Added documentation for the `no-bitwise` rule (Ian Christian Myers)
-* simplify no-empty-class rule (Michael Ficarra)
-* Fix `no-empty-class` false negatives (Ian Christian Myers)
-* Added documentation for the `no-alert` rule (Ian Christian Myers)
-* Added documentation for the `new-parens` rule (Ian Christian Myers)
-* Added documentation for the `max-params` rule (Ian Christian Myers)
-* Added documentation for `max-len` rule (Ian Christian Myers)
-* Created link from rules README.md to no-plusplus.md documentation (Ian Christian Myers)
-* Added documentation for `guard-for-in` rule (Ian Christian Myers)
-* Added documentation for `dot-notation` rule (Ian Christian Myers)
-* Added documentation for `curly` rule (Ian Christian Myers)
-* Updated `camelcase` rule documentation (Ian Christian Myers)
-* Added documentation for `complexity` rule (Ian Christian Myers)
-* Changed `no-dangle` documentation to `no-comma-dangle` (Ian Christian Myers)
-* Rule: no-empty-class (Ian Christian Myers)
-* Increased test coverage for max-depth (Ian Christian Myers)
-* Increased test coverage for no-shadow (Ian Christian Myers)
-* Increased test coverage on no-mixed-requires (Ian Christian Myers)
-* Added docs for eqeqeq and no-with (fixes #262) (Raphael Pigulla)
-* Create camelcase.md (Micah Eschbacher)
-* Fix issues with function in no-unused-vars (Ilya Volodin)
-* Rule: No shadow (Ilya Volodin)
-* fixes #252: semi rule errors on VariableDeclarations in ForInStatements (Michael Ficarra)
-* rule: max-len to lint maximum length of a line (Matt DuVall)
-* Fixes #249 (Raphael Pigulla)
-* Merge branch 'master' of https://github.com/beardtwizzle/eslint (Jonathan Mahoney)
-* Re-add lines that were accidentally deleted from config (Jonathan Mahoney)
-* Add support for pre-defined environment globals (re: #228) (Jonathan Mahoney)
-* Rule: no-else-return (Ian Christian Myers)
-* Re-add lines that were accidentally deleted from config (Jonathan Mahoney)
-* Add support for pre-defined environment globals (re: #228) (Jonathan Mahoney)
-* Fix no-unused-vars to report correct line numbers (Ilya Volodin)
-* Rule: no proto (Ilya Volodin)
-* Rule: No Script URL (Ilya Volodin)
-* Rule: max-depth (Ian Christian Myers)
-* Fix: Error severity for rules with options. (Ian Christian Myers)
-* Rule: No wrap func (Ilya Volodin)
-* bug: Fixes semi rule for VariableDeclaration in ForStatement (Matt DuVall)
-* Individual perf tests for rules (Ilya Volodin)
-* Fix loading rules from a rules directory (Ian Christian Myers)
-* Rule no-mixed-requires (fixes #221) (Raphael Pigulla)
-* bug: Add ForStatement for no-cond-assign check (Matthew DuVall)
-* JSLint XML formatter now escapes special characters in the evidence and reason attributes. (Ian Christian Myers)
-* Formatter: JSLint XML (Ian Christian Myers)
-* Refactored `max-statements` rule. (Ian Christian Myers)
-* Fix tests broken due to new rule message text (James Allardice)
-* Merge branch 'master' into match-jshint-messages (James Allardice)
-* Refactored `one-var` rule. (Ian Christian Myers)
-* split eslint.define into eslint.defineRule and eslint.defineRules (Michael Ficarra)
-* Removed unnecessary rules.js test. (Ian Christian Myers)
-* Rule: one-var (Ian Christian Myers)
-* Rule: No unused variables (Ilya Volodin)
-* expose interface for defining new rules at runtime without fs access (Michael Ficarra)
-* disallow 00 in no-octal rule (Michael Ficarra)
-* Increased test coverage for `lib/cli.js`. (Ian Christian Myers)
-* Increased test coverage for `lib/rules.js` (Ian Christian Myers)
-* Increased test coverage for jUnit formatter. (Ian Christian Myers)
-* scripts/bundle: output bundle+map to /build directory (Michael Ficarra)
-* add test for 0X... hex literals in no-octal tests (Michael Ficarra)
-* fixes #200: no-octals should not see leading-0 floats as violations (Michael Ficarra)
-* add back tests for loading rules from a directory (Michael Ficarra)
-* add back in ability to load rules from a directory (Michael Ficarra)
-* Increased test coverage for `complexity` rule. (Ian Christian Myers)
-* Increased test coverage for `max-params` rule. (Ian Christian Myers)
-* also output source map when generating bundle (Michael Ficarra)
-* Rule: unnecessary-strict (Ian Christian Myers)
-* Improve performance of getTokens (Ilya Volodin)
-* Performance jake task (Ilya Volodin)
-* don't force explicit listing of rules; generate listing for bundle (Michael Ficarra)
-* Rule: no-dupe-keys (Ian Christian Myers)
-* fixes #145: create a browser bundle (Michael Ficarra)
-* Fixing no-caller bug (Ilya Volodin)
-* Check for use of underscore library as an exception for var declarations (Matthew DuVall)
-* Merge branch 'master' of https://github.com/nzakas/eslint into no-underscore-dangle (Matthew DuVall)
-* Fixing spelling (Ilya Volodin)
-* Rule: no-empty-label (Ilya Volodin)
-* Add builtin globals to the global scope (fixes #185) (Mark Macdonald)
-* Rule: no-loop-func (Ilya Volodin)
-* Merge branch 'master' of https://github.com/nzakas/eslint into no-underscore-dangle (Matt DuVall)
-* Use proper node declarations and __proto__ exception (Matt DuVall)
-* Updating no-undef patch (see pull request #164) - Simplify parseBoolean() - Make knowledge of```/*jshint*/``` and ```/*global */``` internal to eslint object - Put user-declared globals in Program scope (Mark Macdonald)
-* Rule: no-eq-null (Ian Christian Myers)
-* fixed broken merge (Raphael Pigulla)
-* fixes #143 (Raphael Pigulla)
-* added consistent-this rule (Raphael Pigulla)
-* Rule: no-sync to encourage async usage (Matt DuVall)
-* Update eslint.json with no-underscore-dangle rule (Matt DuVall)
-* Rule: no-underscore-dangle for func/var declarations (Matt DuVall)
-* Warn on finding the bitwise NOT operator (James Allardice)
-* Updating no-undef patch (see pull request #164) 3. Move parsing of ```/*global */``` and ```/*jshint */``` to eslint.js (Mark Macdonald)
-* Warn on finding a bitwise shift operator (fixes #170) (James Allardice)
-* Fix broken test (James Allardice)
-* Add support for the do-while statement to the curly rule (closes #167) (James Allardice)
-* Removing nasty leading underscores (Patrick Brosset)
-* Added tests and test cases for a few files (Patrick Brosset)
-* CLI: -f now accepts a file path (Ian Christian Myers)
-* Updating no-undef patch (see pull request #164) 1. Move predefined globals to ```conf/environments.json``` 2. Move mixin() to ```lib/util.js``` (Mark Macdonald)
-* Match messages to JS[LH]int where appropriate, and ensure consistent message formatting (closes #163) (James Allardice)
-* Add support for the do-while statement to the curly rule (closes #167) (James Allardice)
-* Removing nasty leading underscores (Patrick Brosset)
-* Added tests and test cases for a few files (Patrick Brosset)
-* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
-* Added acceptance criteria for rules to docs (Nicholas C. Zakas)
-* Add no-undef (fixes #6) (Mark Macdonald)
-* Fixing no-self-compare (Ilya Volodin)
-* Rule: No multiline strings (Ilya Volodin)
-* CLI refactor to remove process.exit(), file not found now a regular error message, updated formatters to handle this case (Nicholas C. Zakas)
-* Rule: no-self-compare (Ilya Volodin)
-* Rule: No unnecessary semicolons (fixes #158) (Nicholas C. Zakas)
-* Fixed error in no-ex-assign when return statement as found in catch clause (Nicholas C. Zakas)
-* Rename no-exc-assign to no-ex-assign and add to config (Nicholas C. Zakas)
-* Renamed count-spaces to regex-spaces (Nicholas C. Zakas)
-* Documentation updates (Nicholas C. Zakas)
-* Put all rules into strict mode and update docs accordingly (Nicholas C. Zakas)
-* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
-* Ensure getScope() works properly when called from Program node (fixes #148) (Nicholas C. Zakas)
-* Rule: wrap-iife (Ilya Volodin)
-* add additional test for no-cond-assign rule (Stephen Murray)
-* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
-* Experimental support for Jake as a build system (fixes #151) (Nicholas C. Zakas)
-* fixes #152 (Stephen Murray)
-* add docs for no-exc-assign (Stephen Murray)
-* Merge branch 'master' of https://github.com/nzakas/eslint into no-new-object-array-literals (Matt DuVall)
-* Merge branch 'master' of https://github.com/nzakas/eslint into count-spaces (Matt DuVall)
-* Added a test for getting global scope from Program node (refs #148) (Nicholas C. Zakas)
-* Add positive test case for `object.Array` (Matthew DuVall)
-* Only support space characters for repetitions (Matthew DuVall)
-* fix line length per code conventions (Stephen Murray)
-* fix indentation per code conventions (Stephen Murray)
-* fixes #149 (Stephen Murray)
-* Rule: no-ternary (Ian Christian Myers)
-* Check that the return statement has an argument before checking its type (James Allardice)
-* Rule: count-spaces for multiple spaces in regular expressions (Matt DuVall)
-* Update eslint.json configuration file for literal rules (Matt DuVall)
-* Created no-label-var rule. (Ian Christian Myers)
-* Rule: no-new-array and no-new-object (Matt DuVall)
-* Added ability to retrieve scope using escope. (Ian Christian Myers)
-* Corrected unused arguments (Patrick Brosset)
-* Reporting function complexity on function:after and using array push/pop to handle nesting (Patrick Brosset)
-* Fixing style issues discovered while npm testing (Patrick Brosset)
-* First draft proposal for a cyclomatic complexity ESLint rule (Patrick Brosset)
-* Corrected file extension on no-plusplus rule documentation. (Ian Christian Myers)
-* Documentation for no-delete-var rule. Closes #129 (Ilya Volodin)
-* Rule: max-statements (Ian Christian Myers)
-* Better documentation for the `no-plusplus` rule. (Ian Christian Myers)
-* Rule: no-plusplus (Ian Christian Myers)
-* Rule: no assignment in return statement (Ilya Volodin)
-* Updating max-params rule name (Ilya Volodin)
-* Rule: Function has too many parameters (Ilya Volodin)
-* Removing merge originals (Ilya Volodin)
-* Rebasing on master (Ilya Volodin)
-* Rule: Variables should not be deleted (Ilya Volodin)
-* Fixes incorrect reporting of missing semicolon (Ian Christian Myers)
-* Rebase against master branch (Mathias Bynens)
-* Rule to warn on use of Math and JSON as functions (James Allardice)
-* Formatter: Checkstyle (Ian Christian Myers)
-* docs: Clean up structure (Mathias Bynens)
-* Merging no-native-reassign and no-redefine (Ilya Volodin)
-* Rule: no native reassignment (Ilya Volodin)
-* 0.0.8-dev (Nicholas C. Zakas)
-* v0.0.7 released (Nicholas C. Zakas)
-* Updated Tests, etc. (Jamund Ferguson)
-* Added jUnit Support (Fixes #16) (Jamund Ferguson)
-
-v0.0.7 - July 22, 2013
-
-* 0.0.7 (Nicholas C. Zakas)
-* Add code coverage checks to npm test and update rule tests to have better coverage (Nicholas C. Zakas)
-* Fixed CLI output on serial programatic executions (Ian Christian Myers)
-* Removes line length from code style convention docs (Josh Perez)
-* Adds escapeRegExp and fixes documentation (Josh Perez)
-* Add quotes rule and test coverage for configuration options (Matt DuVall)
-* Adds templating for lint messages and refactors rules to use it (Josh Perez)
-* Fixes lint rules for unchecked test file (Josh Perez)
-* Changes dotnotation rule to match JSHint style (Josh Perez)
-* Change configInfo to options and add test coverage (Matt DuVall)
-* Merge branch 'master' of https://github.com/nzakas/eslint into optional-args-for-rule (Matt DuVall)
-* Adds dot notation lint rule (Josh Perez)
-* Strip trailing underscores in camelcase rule - Fixes #94 (Patrick Brosset)
-* add mailing list link (Douglas Campos)
-* Strip leading underscores in camelcase rule - Fixes #94 (Patrick Brosset)
-* Created no-dangle rule. (Ian Christian Myers)
-* Fixed rule name (James Allardice)
-* Make sure the callee type is Identifier (James Allardice)
-* Add rule for implied eval via setTimeout/Interval (James Allardice)
-* Fix rule name in config (James Allardice)
-* Fixes #90 -- updates docstrings (Stephen Murray)
-* Fixes issue with fs.existsSync on NodeJS 0.6 (Ian Christian Myers)
-* Fixing -c config option. (Ian Christian Myers)
-* Allow arrays to be passed as multiple args to rule (Matt DuVall)
-* Test to make sure empty case with one line break is safe (Matt DuVall)
-* Rule: The Function constructor is eval (Ilya Volodin)
-* Enabled require("eslint") and exposed out CLI. (Ian Christian Myers)
-* Adds test and fix for issue #82 (Mark Macdonald)
-* Merge branch 'master' of https://github.com/nzakas/eslint into ok (Yusuke Suzuki)
-* Created brace-style rule. (Ian Christian Myers)
-* Formatters can now process multiple files at once (Jamund Ferguson)
-* Rule: Do not use 'new' for side effects (Ilya Volodin)
-* Adds smarter-eqeqeq rule (Josh Perez)
-* Add EditorConfig file for consistent editor/IDE behavior (Jed Hunsaker)
-* Fix the positive case for no-unreachable where there is no return statement at all, or if the return is at the end. Those cases should not return any errors. The error condition was not be checked before throwing the rule error. (Joel Feenstra)
-* Adds test and fix for no-octal on 0 literal (Mark Macdonald)
-* Don't report no-empty warnings when a parent is FunctionExpression / FunctionDeclaration (Yusuke Suzuki)
-* Add api.getAncestors (Yusuke Suzuki)
-* Ensure estraverse version 1.2.0 or later (Yusuke Suzuki)
-* Fixes no-alert lint rule for non identifier calls (Josh Perez)
-* Fixes exception when init is null (Josh Perez)
-* Fixes no-octal check to only check for numbers (Josh Perez)
-* 0.0.7-dev (Nicholas C. Zakas)
-* 0.0.6 (Nicholas C. Zakas)
-* Follow the rule naming conventions (James Allardice)
-* Add rule for missing radix argument to parseInt (James Allardice)
-* Allow return, falls-through comment, and throw for falls-through (Matt DuVall)
-* Merge branch 'master' of https://github.com/nzakas/eslint into rule-fall-through (Matt DuVall)
-* Globals are not good, declare len (Matt DuVall)
-* Rule to add no-fall-through (Matt DuVall)
-
-v0.0.6 - July 16, 2013
-
-* 0.0.6 (Nicholas C. Zakas)
-* Changed semi rule to use tokens instead of source (Nicholas C. Zakas)
-* Renaming new-parens rule (Ilya Volodin)
-* Renaming no-new-wrappers rule and adding tests (Ilya Volodin)
-* Add license URL (Nick Schonning)
-* Remove unused sinon requires (Nick Schonning)
-* Remove redundant JSHint directives (Nick Schonning)
-* Rule: Do not use constructor for wrapper objects (Ilya Volodin)
-* Test node 0.11 unstable but allow it to fail (Nick Schonning)
-* Rule: Constructor should use parentheses (Ilya Volodin)
-* Fix reference to "CSS Lint" in Contributing documentation (Brian McKenna)
-* Add git attributes file for line endings (Andy Hu)
-* Rename to create an 'index' file in GH web view (Evan Goer)
-* Avoid accidentally creating a markdown link (Evan Goer)
-* Add headings and correct internal links (Evan Goer)
-* Add wiki files to docs directory (Evan Goer)
-* Add rules for leading/trailing decimal points (James Allardice)
-* Add rule to prevent comparisons with value NaN (James Allardice)
-* Fixing jshint error (Ilya Volodin)
-* Rule: no octal literals (Ilya Volodin)
-* Rule: no undefined when initializing variables (Ilya Volodin)
-* Updated CONTRIBUTING.md (Nicholas C. Zakas)
-* Make sure namespaces are honored in new-cap (Nicholas C. Zakas)
-* Make sure no-empty also checks for ';;' (Nicholas C. Zakas)
-* Add CLI option to output version (Nicholas C. Zakas)
-* Updated contribution guidelines (Nicholas C. Zakas)
-* Fixing jshint complaints. (Joel Feenstra)
-* Converting to a switch statement and declaring variables. (Joel Feenstra)
-* Added .jshintrc file (until ESLint can lint itself) and cleaned up JSHint warnings (Nicholas C. Zakas)
-* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
-* A bit of cleanup (Nicholas C. Zakas)
-* Add unreachable code detection for switch cases and after continue/break. (Joel Feenstra)
-* Add support for detecting unreachable code after a throw or return statement. (Joel Feenstra)
-* Fix curly brace check when an if statement is the alternate. (Joel Feenstra)
-* Check for empty switch statements with no cases. (Matt DuVall)
-* Added CONTRIBUTING.md (Nicholas C. Zakas)
-* Added rule to check for missing semicolons (fixes #9) (Nicholas C. Zakas)
-* Verify that file paths exist before reading the file (Matt DuVall)
-* Added guard-for-in rule (fixes #1) (Nicholas C. Zakas)
-* Run linting with npm test as well (Nicholas C. Zakas)
-* Removed foo.txt (Nicholas C. Zakas)
-* Updated config file with new no-caller ID (Nicholas C. Zakas)
-* Changed name of no-arg to no-caller (Nicholas C. Zakas)
-* Increased test coverage (Nicholas C. Zakas)
-* Got npm test to work with istanbul, huzzah\! (Nicholas C. Zakas)
-* Moved /config to /conf (Nicholas C. Zakas)
-* Added script to auto-generate changelog (Nicholas C. Zakas)
-* Add `quote-props` rule (Mathias Bynens)
-* Cleaned up relationship between bin/eslint, lib/cli.js, and lib/eslint.js (Nicholas C. Zakas)
-* Add problem count to compact formatter (Nicholas C. Zakas)
-* Fix merge conflict (Nicholas C. Zakas)
-* Change reporters to formatters, add format command line option. Also added tests for compact format. (Nicholas C. Zakas)
-* Change reporters to formatters, add format command line option (Nicholas C. Zakas)
-* Start development of 0.0.6-dev (Nicholas C. Zakas)
diff --git a/tools/eslint/README.md b/tools/eslint/README.md
index f15d49b90a..4d84a7e3df 100644
--- a/tools/eslint/README.md
+++ b/tools/eslint/README.md
@@ -129,6 +129,7 @@ These folks keep the project moving and are resources for help.
* Kevin Partington ([@platinumazure](https://github.com/platinumazure))
* Vitor Balocco ([@vitorbal](https://github.com/vitorbal))
* James Henry ([@JamesHenry](https://github.com/JamesHenry))
+* Teddy Katz ([@not-an-aardvark](https://github.com/not-an-aardvark))
## Releases
diff --git a/tools/eslint/bin/eslint.js b/tools/eslint/bin/eslint.js
index 8bc431339f..d85d29d7a5 100755
--- a/tools/eslint/bin/eslint.js
+++ b/tools/eslint/bin/eslint.js
@@ -5,13 +5,15 @@
* @author Nicholas C. Zakas
*/
+/* eslint no-console:off, no-process-exit:off */
+
"use strict";
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
-var useStdIn = (process.argv.indexOf("--stdin") > -1),
+const useStdIn = (process.argv.indexOf("--stdin") > -1),
init = (process.argv.indexOf("--init") > -1),
debug = (process.argv.indexOf("--debug") > -1);
@@ -25,7 +27,7 @@ if (debug) {
//------------------------------------------------------------------------------
// now we can safely include the other modules that use debug
-var concat = require("concat-stream"),
+const concat = require("concat-stream"),
cli = require("../lib/cli"),
path = require("path"),
fs = require("fs");
@@ -34,15 +36,16 @@ var concat = require("concat-stream"),
// Execution
//------------------------------------------------------------------------------
-process.on("uncaughtException", function(err){
+process.on("uncaughtException", function(err) {
+
// lazy load
- var lodash = require("lodash");
+ const lodash = require("lodash");
if (typeof err.messageTemplate === "string" && err.messageTemplate.length > 0) {
- var template = lodash.template(fs.readFileSync(path.resolve(__dirname, "../messages/" + err.messageTemplate + ".txt"), "utf-8"));
+ const template = lodash.template(fs.readFileSync(path.resolve(__dirname, `../messages/${err.messageTemplate}.txt`), "utf-8"));
console.log("\nOops! Something went wrong! :(");
- console.log("\n" + template(err.messageData || {}));
+ console.log(`\n${template(err.messageData || {})}`);
} else {
console.log(err.message);
console.log(err.stack);
@@ -53,16 +56,11 @@ process.on("uncaughtException", function(err){
if (useStdIn) {
process.stdin.pipe(concat({ encoding: "string" }, function(text) {
- try {
- process.exitCode = cli.execute(process.argv, text);
- } catch (ex) {
- console.error(ex.message);
- console.error(ex.stack);
- process.exitCode = 1;
- }
+ process.exitCode = cli.execute(process.argv, text);
}));
} else if (init) {
- var configInit = require("../lib/config/config-initializer");
+ const configInit = require("../lib/config/config-initializer");
+
configInit.initializeConfig(function(err) {
if (err) {
process.exitCode = 1;
diff --git a/tools/eslint/conf/eslint.json b/tools/eslint/conf/eslint.json
index 4850d3dc46..4d54e3ab6d 100755
--- a/tools/eslint/conf/eslint.json
+++ b/tools/eslint/conf/eslint.json
@@ -158,6 +158,7 @@
"eqeqeq": "off",
"func-call-spacing": "off",
"func-names": "off",
+ "func-name-matching": "off",
"func-style": "off",
"generator-star-spacing": "off",
"global-require": "off",
diff --git a/tools/eslint/lib/ast-utils.js b/tools/eslint/lib/ast-utils.js
index 20c3fa2d32..9e171ea316 100644
--- a/tools/eslint/lib/ast-utils.js
+++ b/tools/eslint/lib/ast-utils.js
@@ -560,6 +560,7 @@ module.exports = {
/* falls through */
case "UnaryExpression":
+ case "AwaitExpression":
return 14;
case "UpdateExpression":
@@ -715,5 +716,27 @@ module.exports = {
}
return directives;
+ },
+
+
+ /**
+ * Determines whether this node is a decimal integer literal. If a node is a decimal integer literal, a dot added
+ after the node will be parsed as a decimal point, rather than a property-access dot.
+ * @param {ASTNode} node - The node to check.
+ * @returns {boolean} `true` if this node is a decimal integer.
+ * @example
+ *
+ * 5 // true
+ * 5. // false
+ * 5.0 // false
+ * 05 // false
+ * 0x5 // false
+ * 0b101 // false
+ * 0o5 // false
+ * 5e0 // false
+ * '5' // false
+ */
+ isDecimalInteger(node) {
+ return node.type === "Literal" && typeof node.value === "number" && /^(0|[1-9]\d*)$/.test(node.raw);
}
};
diff --git a/tools/eslint/lib/cli-engine.js b/tools/eslint/lib/cli-engine.js
index cca21096c0..b9019932fe 100644
--- a/tools/eslint/lib/cli-engine.js
+++ b/tools/eslint/lib/cli-engine.js
@@ -75,6 +75,8 @@ const debug = require("debug")("eslint:cli-engine");
* @property {LintMessage[]} messages All of the messages for the result.
* @property {number} errorCount Number or errors for the result.
* @property {number} warningCount Number or warnings for the result.
+ * @property {string=} [source] The source code of the file that was linted.
+ * @property {string=} [output] The source code of the file that was linted, with as many fixes applied as possible.
*/
//------------------------------------------------------------------------------
@@ -150,10 +152,10 @@ function multipassFix(text, config, options) {
do {
passNumber++;
- debug("Linting code for " + options.filename + " (pass " + passNumber + ")");
+ debug(`Linting code for ${options.filename} (pass ${passNumber})`);
messages = eslint.verify(text, config, options);
- debug("Generating fixed text for " + options.filename + " (pass " + passNumber + ")");
+ debug(`Generating fixed text for ${options.filename} (pass ${passNumber})`);
fixedResult = SourceCodeFixer.applyFixes(eslint.getSourceCode(), messages);
// stop if there are any syntax errors.
@@ -175,7 +177,7 @@ function multipassFix(text, config, options) {
/*
- * If the last result had fixes, we need to lint again to me sure we have
+ * If the last result had fixes, we need to lint again to be sure we have
* the most up-to-date information.
*/
if (fixedResult.fixed) {
@@ -198,7 +200,7 @@ function multipassFix(text, config, options) {
* @param {string} filename An optional string representing the texts filename.
* @param {boolean} fix Indicates if fixes should be processed.
* @param {boolean} allowInlineConfig Allow/ignore comments that change config.
- * @returns {Result} The results for linting on this text.
+ * @returns {LintResult} The results for linting on this text.
* @private
*/
function processText(text, configHelper, filename, fix, allowInlineConfig) {
@@ -218,7 +220,7 @@ function processText(text, configHelper, filename, fix, allowInlineConfig) {
}
filename = filename || "<text>";
- debug("Linting " + filename);
+ debug(`Linting ${filename}`);
const config = configHelper.getConfig(filePath);
if (config.plugins) {
@@ -279,6 +281,10 @@ function processText(text, configHelper, filename, fix, allowInlineConfig) {
result.output = fixedResult.output;
}
+ if (result.errorCount + result.warningCount > 0 && typeof result.output === "undefined") {
+ result.source = text;
+ }
+
return result;
}
@@ -288,7 +294,7 @@ function processText(text, configHelper, filename, fix, allowInlineConfig) {
* @param {string} filename The filename of the file being checked.
* @param {Object} configHelper The configuration options for ESLint.
* @param {Object} options The CLIEngine options object.
- * @returns {Result} The results for linting on this file.
+ * @returns {LintResult} The results for linting on this file.
* @private
*/
function processFile(filename, configHelper, options) {
@@ -304,7 +310,7 @@ function processFile(filename, configHelper, options) {
* Returns result with warning by ignore settings
* @param {string} filePath - File path of checked code
* @param {string} baseDir - Absolute path of base directory
- * @returns {Result} Result with single warning
+ * @returns {LintResult} Result with single warning
* @private
*/
function createIgnoreResult(filePath, baseDir) {
@@ -376,7 +382,7 @@ function getCacheFile(cacheFile, cwd) {
* @returns {string} the resolved path to the cacheFile
*/
function getCacheFileForDirectory() {
- return path.join(resolvedCacheFile, ".cache_" + hash(cwd));
+ return path.join(resolvedCacheFile, `.cache_${hash(cwd)}`);
}
let fileStats;
@@ -461,7 +467,7 @@ function CLIEngine(options) {
const cwd = this.options.cwd;
this.options.rulePaths.forEach(function(rulesdir) {
- debug("Loading rules from " + rulesdir);
+ debug(`Loading rules from ${rulesdir}`);
rules.load(rulesdir, cwd);
});
}
@@ -497,13 +503,13 @@ CLIEngine.getFormatter = function(format) {
formatterPath = path.resolve(cwd, format);
} else {
- formatterPath = "./formatters/" + format;
+ formatterPath = `./formatters/${format}`;
}
try {
return require(formatterPath);
} catch (ex) {
- ex.message = "There was a problem loading formatter: " + formatterPath + "\nError: " + ex.message;
+ ex.message = `There was a problem loading formatter: ${formatterPath}\nError: ${ex.message}`;
throw ex;
}
@@ -524,12 +530,13 @@ CLIEngine.getErrorResults = function(results) {
const filteredMessages = result.messages.filter(isErrorMessage);
if (filteredMessages.length > 0) {
- filtered.push({
- filePath: result.filePath,
- messages: filteredMessages,
- errorCount: filteredMessages.length,
- warningCount: 0
- });
+ filtered.push(
+ Object.assign(result, {
+ messages: filteredMessages,
+ errorCount: filteredMessages.length,
+ warningCount: 0
+ })
+ );
}
});
@@ -608,7 +615,7 @@ CLIEngine.prototype = {
const eslintVersion = pkg.version;
- prevConfig.hash = hash(eslintVersion + "_" + stringify(config));
+ prevConfig.hash = hash(`${eslintVersion}_${stringify(config)}`);
}
return prevConfig.hash;
@@ -645,7 +652,7 @@ CLIEngine.prototype = {
const changed = descriptor.changed || meta.hashOfConfig !== hashOfConfig;
if (!changed) {
- debug("Skipping file since hasn't changed: " + filename);
+ debug(`Skipping file since hasn't changed: ${filename}`);
/*
* Add the the cached results (always will be 0 error and
@@ -662,7 +669,7 @@ CLIEngine.prototype = {
fileCache.destroy();
}
- debug("Processing " + filename);
+ debug(`Processing ${filename}`);
const res = processFile(filename, configHelper, options);
@@ -674,7 +681,7 @@ CLIEngine.prototype = {
* next execution will also operate on this file
*/
if (res.errorCount > 0 || res.warningCount > 0) {
- debug("File has problems, skipping it: " + filename);
+ debug(`File has problems, skipping it: ${filename}`);
// remove the entry from the cache
fileCache.removeEntry(filename);
@@ -713,7 +720,7 @@ CLIEngine.prototype = {
fileCache.reconcile();
}
- debug("Linting complete in: " + (Date.now() - startTime) + "ms");
+ debug(`Linting complete in: ${Date.now() - startTime}ms`);
return {
results,
diff --git a/tools/eslint/lib/cli.js b/tools/eslint/lib/cli.js
index 593c354bc0..9fdcfc701e 100644
--- a/tools/eslint/lib/cli.js
+++ b/tools/eslint/lib/cli.js
@@ -135,15 +135,30 @@ const cli = {
if (currentOptions.version) { // version from package.json
- log.info("v" + require("../package.json").version);
+ log.info(`v${require("../package.json").version}`);
+ } else if (currentOptions.printConfig) {
+ if (files.length) {
+ log.error("The --print-config option must be used with exactly one file name.");
+ return 1;
+ } else if (text) {
+ log.error("The --print-config option is not available for piped-in code.");
+ return 1;
+ }
+
+ const engine = new CLIEngine(translateOptions(currentOptions));
+
+ const fileConfig = engine.getConfigForFile(currentOptions.printConfig);
+
+ log.info(JSON.stringify(fileConfig, null, " "));
+ return 0;
} else if (currentOptions.help || (!files.length && !text)) {
log.info(options.generateHelp());
} else {
- debug("Running on " + (text ? "text" : "files"));
+ debug(`Running on ${text ? "text" : "files"}`);
// disable --fix for piped-in code until we know how to do it correctly
if (text && currentOptions.fix) {
@@ -153,24 +168,6 @@ const cli = {
const engine = new CLIEngine(translateOptions(currentOptions));
- if (currentOptions.printConfig) {
- if (files.length !== 1) {
- log.error("The --print-config option requires a " +
- "single file as positional argument.");
- return 1;
- }
-
- if (text) {
- log.error("The --print-config option is not available for piped-in code.");
- return 1;
- }
-
- const fileConfig = engine.getConfigForFile(files[0]);
-
- log.info(JSON.stringify(fileConfig, null, " "));
- return 0;
- }
-
const report = text ? engine.executeOnText(text, currentOptions.stdinFilename, true) : engine.executeOnFiles(files);
if (currentOptions.fix) {
diff --git a/tools/eslint/lib/code-path-analysis/code-path-analyzer.js b/tools/eslint/lib/code-path-analysis/code-path-analyzer.js
index 1d3b632c62..655211430b 100644
--- a/tools/eslint/lib/code-path-analysis/code-path-analyzer.js
+++ b/tools/eslint/lib/code-path-analysis/code-path-analyzer.js
@@ -148,7 +148,7 @@ function forwardCurrentToHead(analyzer, node) {
headSegment = headSegments[i];
if (currentSegment !== headSegment && currentSegment) {
- debug.dump("onCodePathSegmentEnd " + currentSegment.id);
+ debug.dump(`onCodePathSegmentEnd ${currentSegment.id}`);
if (currentSegment.reachable) {
analyzer.emitter.emit(
@@ -168,7 +168,7 @@ function forwardCurrentToHead(analyzer, node) {
headSegment = headSegments[i];
if (currentSegment !== headSegment && headSegment) {
- debug.dump("onCodePathSegmentStart " + headSegment.id);
+ debug.dump(`onCodePathSegmentStart ${headSegment.id}`);
CodePathSegment.markUsed(headSegment);
if (headSegment.reachable) {
@@ -197,7 +197,7 @@ function leaveFromCurrentSegment(analyzer, node) {
for (let i = 0; i < currentSegments.length; ++i) {
const currentSegment = currentSegments[i];
- debug.dump("onCodePathSegmentEnd " + currentSegment.id);
+ debug.dump(`onCodePathSegmentEnd ${currentSegment.id}`);
if (currentSegment.reachable) {
analyzer.emitter.emit(
"onCodePathSegmentEnd",
@@ -353,7 +353,7 @@ function processCodePathToEnter(analyzer, node) {
state = CodePath.getState(codePath);
// Emits onCodePathStart events.
- debug.dump("onCodePathStart " + codePath.id);
+ debug.dump(`onCodePathStart ${codePath.id}`);
analyzer.emitter.emit("onCodePathStart", codePath, node);
break;
@@ -546,7 +546,7 @@ function postprocess(analyzer, node) {
leaveFromCurrentSegment(analyzer, node);
// Emits onCodePathEnd event of this code path.
- debug.dump("onCodePathEnd " + codePath.id);
+ debug.dump(`onCodePathEnd ${codePath.id}`);
analyzer.emitter.emit("onCodePathEnd", codePath, node);
debug.dumpDot(codePath);
@@ -643,7 +643,7 @@ CodePathAnalyzer.prototype = {
*/
onLooped(fromSegment, toSegment) {
if (fromSegment.reachable && toSegment.reachable) {
- debug.dump("onCodePathSegmentLoop " + fromSegment.id + " -> " + toSegment.id);
+ debug.dump(`onCodePathSegmentLoop ${fromSegment.id} -> ${toSegment.id}`);
this.emitter.emit(
"onCodePathSegmentLoop",
fromSegment,
diff --git a/tools/eslint/lib/code-path-analysis/code-path-state.js b/tools/eslint/lib/code-path-analysis/code-path-state.js
index 392e3898f6..3b0b1606e2 100644
--- a/tools/eslint/lib/code-path-analysis/code-path-state.js
+++ b/tools/eslint/lib/code-path-analysis/code-path-state.js
@@ -967,7 +967,7 @@ CodePathState.prototype = {
/* istanbul ignore next */
default:
- throw new Error("unknown type: \"" + type + "\"");
+ throw new Error(`unknown type: "${type}"`);
}
},
diff --git a/tools/eslint/lib/code-path-analysis/code-path.js b/tools/eslint/lib/code-path-analysis/code-path.js
index 1e7b76e5ab..96363423c2 100644
--- a/tools/eslint/lib/code-path-analysis/code-path.js
+++ b/tools/eslint/lib/code-path-analysis/code-path.js
@@ -49,7 +49,7 @@ function CodePath(id, upper, onLooped) {
Object.defineProperty(
this,
"internal",
- {value: new CodePathState(new IdGenerator(id + "_"), onLooped)});
+ {value: new CodePathState(new IdGenerator(`${id}_`), onLooped)});
// Adds this into `childCodePaths` of `upper`.
if (upper) {
diff --git a/tools/eslint/lib/code-path-analysis/debug-helpers.js b/tools/eslint/lib/code-path-analysis/debug-helpers.js
index ac163268b6..5e311eb352 100644
--- a/tools/eslint/lib/code-path-analysis/debug-helpers.js
+++ b/tools/eslint/lib/code-path-analysis/debug-helpers.js
@@ -64,10 +64,10 @@ module.exports = {
}
}
- debug(
- state.currentSegments.map(getId).join(",") + ") " +
- node.type + (leaving ? ":exit" : "")
- );
+ debug([
+ `${state.currentSegments.map(getId).join(",")})`,
+ `${node.type}${leaving ? ":exit" : ""}`
+ ].join(" "));
},
/**
@@ -99,7 +99,7 @@ module.exports = {
for (const id in traceMap) { // eslint-disable-line guard-for-in
const segment = traceMap[id];
- text += id + "[";
+ text += `${id}[`;
if (segment.reachable) {
text += "label=\"";
@@ -110,17 +110,17 @@ module.exports = {
if (segment.internal.nodes.length > 0) {
text += segment.internal.nodes.map(function(node) {
switch (node.type) {
- case "Identifier": return node.type + " (" + node.name + ")";
- case "Literal": return node.type + " (" + node.value + ")";
+ case "Identifier": return `${node.type} (${node.name})`;
+ case "Literal": return `${node.type} (${node.value})`;
default: return node.type;
}
}).join("\\n");
} else if (segment.internal.exitNodes.length > 0) {
text += segment.internal.exitNodes.map(function(node) {
switch (node.type) {
- case "Identifier": return node.type + ":exit (" + node.name + ")";
- case "Literal": return node.type + ":exit (" + node.value + ")";
- default: return node.type + ":exit";
+ case "Identifier": return `${node.type}:exit (${node.name})`;
+ case "Literal": return `${node.type}:exit (${node.value})`;
+ default: return `${node.type}:exit`;
}
}).join("\\n");
} else {
@@ -130,7 +130,7 @@ module.exports = {
text += "\"];\n";
}
- text += arrows + "\n";
+ text += `${arrows}\n`;
text += "}";
debug("DOT", text);
},
@@ -147,7 +147,7 @@ module.exports = {
const stack = [[codePath.initialSegment, 0]];
const done = traceMap || Object.create(null);
let lastId = codePath.initialSegment.id;
- let text = "initial->" + codePath.initialSegment.id;
+ let text = `initial->${codePath.initialSegment.id}`;
while (stack.length > 0) {
const item = stack.pop();
@@ -166,9 +166,9 @@ module.exports = {
}
if (lastId === segment.id) {
- text += "->" + nextSegment.id;
+ text += `->${nextSegment.id}`;
} else {
- text += ";\n" + segment.id + "->" + nextSegment.id;
+ text += `;\n${segment.id}->${nextSegment.id}`;
}
lastId = nextSegment.id;
@@ -180,7 +180,7 @@ module.exports = {
if (lastId === finalSegment.id) {
text += "->final";
} else {
- text += ";\n" + finalSegment.id + "->final";
+ text += `;\n${finalSegment.id}->final`;
}
lastId = null;
});
@@ -189,11 +189,11 @@ module.exports = {
if (lastId === finalSegment.id) {
text += "->thrown";
} else {
- text += ";\n" + finalSegment.id + "->thrown";
+ text += `;\n${finalSegment.id}->thrown`;
}
lastId = null;
});
- return text + ";";
+ return `${text};`;
}
};
diff --git a/tools/eslint/lib/code-path-analysis/fork-context.js b/tools/eslint/lib/code-path-analysis/fork-context.js
index f47249b998..6996af1dcc 100644
--- a/tools/eslint/lib/code-path-analysis/fork-context.js
+++ b/tools/eslint/lib/code-path-analysis/fork-context.js
@@ -187,7 +187,7 @@ ForkContext.prototype = {
* @returns {void}
*/
add(segments) {
- assert(segments.length >= this.count, segments.length + " >= " + this.count);
+ assert(segments.length >= this.count, `${segments.length} >= ${this.count}`);
this.segmentsList.push(mergeExtraSegments(this, segments));
},
@@ -200,7 +200,7 @@ ForkContext.prototype = {
* @returns {void}
*/
replaceHead(segments) {
- assert(segments.length >= this.count, segments.length + " >= " + this.count);
+ assert(segments.length >= this.count, `${segments.length} >= ${this.count}`);
this.segmentsList.splice(-1, 1, mergeExtraSegments(this, segments));
},
diff --git a/tools/eslint/lib/config.js b/tools/eslint/lib/config.js
index f3a03750cc..9ff203c16d 100644
--- a/tools/eslint/lib/config.js
+++ b/tools/eslint/lib/config.js
@@ -126,7 +126,7 @@ function getLocalConfig(thisConfig, directory) {
continue;
}
- debug("Loading " + localConfigFile);
+ debug(`Loading ${localConfigFile}`);
const localConfig = loadConfig(localConfigFile);
// Don't consider a local config file found if the config is null
@@ -140,7 +140,7 @@ function getLocalConfig(thisConfig, directory) {
}
found = true;
- debug("Using " + localConfigFile);
+ debug(`Using ${localConfigFile}`);
config = ConfigOps.merge(localConfig, config);
}
@@ -221,8 +221,8 @@ function Config(options) {
this.options = options;
if (useConfig) {
- debug("Using command line config " + useConfig);
- if (isResolvable(useConfig) || isResolvable("eslint-config-" + useConfig) || useConfig.charAt(0) === "@") {
+ debug(`Using command line config ${useConfig}`);
+ if (isResolvable(useConfig) || isResolvable(`eslint-config-${useConfig}`) || useConfig.charAt(0) === "@") {
this.useSpecificConfig = loadConfig(useConfig);
} else {
this.useSpecificConfig = loadConfig(path.resolve(this.options.cwd, useConfig));
@@ -241,7 +241,7 @@ Config.prototype.getConfig = function(filePath) {
let config,
userConfig;
- debug("Constructing config for " + (filePath ? filePath : "text"));
+ debug(`Constructing config for ${filePath ? filePath : "text"}`);
config = this.cache[directory];
diff --git a/tools/eslint/lib/config/autoconfig.js b/tools/eslint/lib/config/autoconfig.js
index 5f558bb177..dd25bcd491 100644
--- a/tools/eslint/lib/config/autoconfig.js
+++ b/tools/eslint/lib/config/autoconfig.js
@@ -295,7 +295,7 @@ Registry.prototype = {
const totalFilesLinting = filenames.length * ruleSets.length;
filenames.forEach(function(filename) {
- debug("Linting file: " + filename);
+ debug(`Linting file: ${filename}`);
ruleSetIdx = 0;
diff --git a/tools/eslint/lib/config/config-file.js b/tools/eslint/lib/config/config-file.js
index 67c5970de0..c11a55fad8 100644
--- a/tools/eslint/lib/config/config-file.js
+++ b/tools/eslint/lib/config/config-file.js
@@ -90,7 +90,7 @@ function isFilePath(filePath) {
* @private
*/
function loadYAMLConfigFile(filePath) {
- debug("Loading YAML config file: " + filePath);
+ debug(`Loading YAML config file: ${filePath}`);
// lazy load YAML to improve performance when not used
const yaml = require("js-yaml");
@@ -100,8 +100,8 @@ function loadYAMLConfigFile(filePath) {
// empty YAML file can be null, so always use
return yaml.safeLoad(readFile(filePath)) || {};
} catch (e) {
- debug("Error reading YAML file: " + filePath);
- e.message = "Cannot read config file: " + filePath + "\nError: " + e.message;
+ debug(`Error reading YAML file: ${filePath}`);
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
throw e;
}
}
@@ -114,13 +114,13 @@ function loadYAMLConfigFile(filePath) {
* @private
*/
function loadJSONConfigFile(filePath) {
- debug("Loading JSON config file: " + filePath);
+ debug(`Loading JSON config file: ${filePath}`);
try {
return JSON.parse(stripComments(readFile(filePath)));
} catch (e) {
- debug("Error reading JSON file: " + filePath);
- e.message = "Cannot read config file: " + filePath + "\nError: " + e.message;
+ debug(`Error reading JSON file: ${filePath}`);
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
throw e;
}
}
@@ -133,7 +133,7 @@ function loadJSONConfigFile(filePath) {
* @private
*/
function loadLegacyConfigFile(filePath) {
- debug("Loading config file: " + filePath);
+ debug(`Loading config file: ${filePath}`);
// lazy load YAML to improve performance when not used
const yaml = require("js-yaml");
@@ -141,8 +141,8 @@ function loadLegacyConfigFile(filePath) {
try {
return yaml.safeLoad(stripComments(readFile(filePath))) || /* istanbul ignore next */ {};
} catch (e) {
- debug("Error reading YAML file: " + filePath);
- e.message = "Cannot read config file: " + filePath + "\nError: " + e.message;
+ debug(`Error reading YAML file: ${filePath}`);
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
throw e;
}
}
@@ -155,12 +155,12 @@ function loadLegacyConfigFile(filePath) {
* @private
*/
function loadJSConfigFile(filePath) {
- debug("Loading JS config file: " + filePath);
+ debug(`Loading JS config file: ${filePath}`);
try {
return requireUncached(filePath);
} catch (e) {
- debug("Error reading JavaScript file: " + filePath);
- e.message = "Cannot read config file: " + filePath + "\nError: " + e.message;
+ debug(`Error reading JavaScript file: ${filePath}`);
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
throw e;
}
}
@@ -173,12 +173,12 @@ function loadJSConfigFile(filePath) {
* @private
*/
function loadPackageJSONConfigFile(filePath) {
- debug("Loading package.json config file: " + filePath);
+ debug(`Loading package.json config file: ${filePath}`);
try {
return loadJSONConfigFile(filePath).eslintConfig || null;
} catch (e) {
- debug("Error reading package.json file: " + filePath);
- e.message = "Cannot read config file: " + filePath + "\nError: " + e.message;
+ debug(`Error reading package.json file: ${filePath}`);
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
throw e;
}
}
@@ -233,7 +233,7 @@ function loadConfigFile(file) {
* @private
*/
function writeJSONConfigFile(config, filePath) {
- debug("Writing JSON config file: " + filePath);
+ debug(`Writing JSON config file: ${filePath}`);
const content = stringify(config, {cmp: sortByKey, space: 4});
@@ -248,7 +248,7 @@ function writeJSONConfigFile(config, filePath) {
* @private
*/
function writeYAMLConfigFile(config, filePath) {
- debug("Writing YAML config file: " + filePath);
+ debug(`Writing YAML config file: ${filePath}`);
// lazy load YAML to improve performance when not used
const yaml = require("js-yaml");
@@ -266,9 +266,9 @@ function writeYAMLConfigFile(config, filePath) {
* @private
*/
function writeJSConfigFile(config, filePath) {
- debug("Writing JS config file: " + filePath);
+ debug(`Writing JS config file: ${filePath}`);
- const content = "module.exports = " + stringify(config, {cmp: sortByKey, space: 4}) + ";";
+ const content = `module.exports = ${stringify(config, {cmp: sortByKey, space: 4})};`;
fs.writeFileSync(filePath, content, "utf8");
}
@@ -387,7 +387,7 @@ function applyExtends(config, filePath, relativeTo) {
}
try {
- debug("Loading " + parentPath);
+ debug(`Loading ${parentPath}`);
return ConfigOps.merge(load(parentPath, false, relativeTo), previousValue);
} catch (e) {
@@ -397,7 +397,7 @@ function applyExtends(config, filePath, relativeTo) {
* message so the user is able to see where it was referenced from,
* then re-throw.
*/
- e.message += "\nReferenced from: " + filePath;
+ e.message += `\nReferenced from: ${filePath}`;
throw e;
}
@@ -430,21 +430,21 @@ function normalizePackageName(name, prefix) {
* it's a scoped package
* package name is "eslint-config", or just a username
*/
- const scopedPackageShortcutRegex = new RegExp("^(@[^\/]+)(?:\/(?:" + prefix + ")?)?$"),
- scopedPackageNameRegex = new RegExp("^" + prefix + "(-|$)");
+ const scopedPackageShortcutRegex = new RegExp(`^(@[^\/]+)(?:\/(?:${prefix})?)?$`),
+ scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`);
if (scopedPackageShortcutRegex.test(name)) {
- name = name.replace(scopedPackageShortcutRegex, "$1/" + prefix);
+ name = name.replace(scopedPackageShortcutRegex, `$1/${prefix}`);
} else if (!scopedPackageNameRegex.test(name.split("/")[1])) {
/*
* for scoped packages, insert the eslint-config after the first / unless
* the path is already @scope/eslint or @scope/eslint-config-xxx
*/
- name = name.replace(/^@([^\/]+)\/(.*)$/, "@$1/" + prefix + "-$2");
+ name = name.replace(/^@([^\/]+)\/(.*)$/, `@$1/${prefix}-$2`);
}
- } else if (name.indexOf(prefix + "-") !== 0) {
- name = prefix + "-" + name;
+ } else if (name.indexOf(`${prefix}-`) !== 0) {
+ name = `${prefix}-${name}`;
}
return name;
@@ -469,12 +469,12 @@ function resolve(filePath, relativeTo) {
const configName = filePath.substr(filePath.lastIndexOf("/") + 1, filePath.length - filePath.lastIndexOf("/") - 1);
normalizedPackageName = normalizePackageName(packagePath, "eslint-plugin");
- debug("Attempting to resolve " + normalizedPackageName);
+ debug(`Attempting to resolve ${normalizedPackageName}`);
filePath = resolver.resolve(normalizedPackageName, getLookupPath(relativeTo));
return { filePath, configName };
} else {
normalizedPackageName = normalizePackageName(filePath, "eslint-config");
- debug("Attempting to resolve " + normalizedPackageName);
+ debug(`Attempting to resolve ${normalizedPackageName}`);
filePath = resolver.resolve(normalizedPackageName, getLookupPath(relativeTo));
return { filePath };
}
diff --git a/tools/eslint/lib/config/config-initializer.js b/tools/eslint/lib/config/config-initializer.js
index 202c3bfcd0..e3aef07bae 100644
--- a/tools/eslint/lib/config/config-initializer.js
+++ b/tools/eslint/lib/config/config-initializer.js
@@ -44,8 +44,8 @@ function writeFile(config, format) {
extname = ".json";
}
- ConfigFile.write(config, "./.eslintrc" + extname);
- log.info("Successfully created .eslintrc" + extname + " file in " + process.cwd());
+ ConfigFile.write(config, `./.eslintrc${extname}`);
+ log.info(`Successfully created .eslintrc${extname} file in ${process.cwd()}`);
if (config.installedESLint) {
log.info("ESLint was installed locally. We recommend using this local copy instead of your globally-installed copy.");
@@ -63,11 +63,11 @@ function installModules(config) {
// Create a list of modules which should be installed based on config
if (config.plugins) {
modules = modules.concat(config.plugins.map(function(name) {
- return "eslint-plugin-" + name;
+ return `eslint-plugin-${name}`;
}));
}
if (config.extends && config.extends.indexOf("eslint:") === -1) {
- modules.push("eslint-config-" + config.extends);
+ modules.push(`eslint-config-${config.extends}`);
}
// Determine which modules are already installed
@@ -93,7 +93,7 @@ function installModules(config) {
});
if (modulesToInstall.length > 0) {
- log.info("Installing " + modulesToInstall.join(", "));
+ log.info(`Installing ${modulesToInstall.join(", ")}`);
npmUtil.installSyncSaveDev(modulesToInstall);
}
}
@@ -150,7 +150,7 @@ function configureRules(answers, config) {
registry = registry.lintSourceCode(sourceCodes, newConfig, function(total) {
bar.tick((BAR_TOTAL - BAR_SOURCE_CODE_TOTAL) / total); // Subtract out ticks used at beginning
});
- debug("\nRegistry: " + util.inspect(registry.rules, {depth: null}));
+ debug(`\nRegistry: ${util.inspect(registry.rules, {depth: null})}`);
// Create a list of recommended rules, because we don't want to disable them
const recRules = Object.keys(recConfig.rules).filter(function(ruleId) {
@@ -198,9 +198,9 @@ function configureRules(answers, config) {
return (newConfig.rules[ruleId] !== 0);
}).length;
const resultMessage = [
- "\nEnabled " + enabledRules + " out of " + totalRules,
- "rules based on " + fileQty,
- "file" + ((fileQty === 1) ? "." : "s.")
+ `\nEnabled ${enabledRules} out of ${totalRules}`,
+ `rules based on ${fileQty}`,
+ `file${(fileQty === 1) ? "." : "s."}`
].join(" ");
log.info(resultMessage);
diff --git a/tools/eslint/lib/config/config-ops.js b/tools/eslint/lib/config/config-ops.js
index d0e791b548..42b0fe81b9 100644
--- a/tools/eslint/lib/config/config-ops.js
+++ b/tools/eslint/lib/config/config-ops.js
@@ -63,7 +63,7 @@ module.exports = {
const environment = Environments.get(name);
if (environment) {
- debug("Creating config for environment " + name);
+ debug(`Creating config for environment ${name}`);
if (environment.globals) {
Object.assign(envConfig.globals, environment.globals);
}
diff --git a/tools/eslint/lib/config/environments.js b/tools/eslint/lib/config/environments.js
index 072d07b63c..36b989068f 100644
--- a/tools/eslint/lib/config/environments.js
+++ b/tools/eslint/lib/config/environments.js
@@ -66,7 +66,7 @@ module.exports = {
importPlugin(plugin, pluginName) {
if (plugin.environments) {
Object.keys(plugin.environments).forEach(function(envName) {
- this.define(pluginName + "/" + envName, plugin.environments[envName]);
+ this.define(`${pluginName}/${envName}`, plugin.environments[envName]);
}, this);
}
},
diff --git a/tools/eslint/lib/config/plugins.js b/tools/eslint/lib/config/plugins.js
index 460dc89c8d..5073d564a0 100644
--- a/tools/eslint/lib/config/plugins.js
+++ b/tools/eslint/lib/config/plugins.js
@@ -115,7 +115,7 @@ module.exports = {
let plugin = null;
if (pluginName.match(/\s+/)) {
- const whitespaceError = new Error("Whitespace found in plugin name '" + pluginName + "'");
+ const whitespaceError = new Error(`Whitespace found in plugin name '${pluginName}'`);
whitespaceError.messageTemplate = "whitespace-found";
whitespaceError.messageData = {
@@ -128,8 +128,8 @@ module.exports = {
try {
plugin = require(longName);
} catch (err) {
- debug("Failed to load plugin " + longName + ".");
- err.message = "Failed to load plugin " + pluginName + ": " + err.message;
+ debug(`Failed to load plugin ${longName}.`);
+ err.message = `Failed to load plugin ${pluginName}: ${err.message}`;
err.messageTemplate = "plugin-missing";
err.messageData = {
pluginName: longName
diff --git a/tools/eslint/lib/eslint.js b/tools/eslint/lib/eslint.js
index 14362b2c20..fd7685f492 100755
--- a/tools/eslint/lib/eslint.js
+++ b/tools/eslint/lib/eslint.js
@@ -97,7 +97,7 @@ function parseJsonConfig(string, location, messages) {
items = {};
string = string.replace(/([a-zA-Z0-9\-\/]+):/g, "\"$1\":").replace(/(\]|[0-9])\s+(?=")/, "$1,");
try {
- items = JSON.parse("{" + string + "}");
+ items = JSON.parse(`{${string}}`);
} catch (ex) {
messages.push({
@@ -105,7 +105,7 @@ function parseJsonConfig(string, location, messages) {
fatal: true,
severity: 2,
source: null,
- message: "Failed to parse JSON from '" + string + "': " + ex.message,
+ message: `Failed to parse JSON from '${string}': ${ex.message}`,
line: location.start.line,
column: location.start.column + 1
});
@@ -350,7 +350,7 @@ function modifyConfigsFromComments(filename, ast, config, reportingConfig, messa
Object.keys(items).forEach(function(name) {
const ruleValue = items[name];
- validator.validateRuleOptions(name, ruleValue, filename + " line " + comment.loc.start.line);
+ validator.validateRuleOptions(name, ruleValue, `${filename} line ${comment.loc.start.line}`);
commentRules[name] = ruleValue;
});
break;
@@ -446,7 +446,7 @@ function prepareConfig(config) {
const rule = config.rules[k];
if (rule === null) {
- throw new Error("Invalid config for rule '" + k + "'\.");
+ throw new Error(`Invalid config for rule '${k}'\.`);
}
if (Array.isArray(rule)) {
copiedRules[k] = rule.slice();
@@ -527,7 +527,7 @@ function getRuleReplacementMessage(ruleId) {
if (ruleId in replacements.rules) {
const newRules = replacements.rules[ruleId];
- return "Rule \'" + ruleId + "\' was removed and replaced by: " + newRules.join(", ");
+ return `Rule '${ruleId}' was removed and replaced by: ${newRules.join(", ")}`;
}
return null;
@@ -585,7 +585,6 @@ module.exports = (function() {
let messages = [],
currentConfig = null,
currentScopes = null,
- scopeMap = null,
scopeManager = null,
currentFilename = null,
traverser = null,
@@ -655,7 +654,7 @@ module.exports = (function() {
fatal: true,
severity: 2,
source,
- message: "Parsing error: " + message,
+ message: `Parsing error: ${message}`,
line: ex.lineNumber,
column: ex.column
@@ -706,7 +705,6 @@ module.exports = (function() {
messages = [];
currentConfig = null;
currentScopes = null;
- scopeMap = null;
scopeManager = null;
traverser = null;
reportingConfig = [];
@@ -783,7 +781,7 @@ module.exports = (function() {
ast = parse(
stripUnicodeBOM(text).replace(/^#!([^\r\n]+)/, function(match, captured) {
shebang = captured;
- return "//" + captured;
+ return `//${captured}`;
}),
config,
currentFilename
@@ -823,7 +821,7 @@ module.exports = (function() {
if (replacementMsg) {
ruleCreator = createStubRule(replacementMsg);
} else {
- ruleCreator = createStubRule("Definition for rule '" + key + "' was not found");
+ ruleCreator = createStubRule(`Definition for rule '${key}' was not found`);
}
rules.define(key, ruleCreator);
}
@@ -847,7 +845,7 @@ module.exports = (function() {
);
});
} catch (ex) {
- ex.message = "Error while loading rule '" + key + "': " + ex.message;
+ ex.message = `Error while loading rule '${key}': ${ex.message}`;
throw ex;
}
});
@@ -871,24 +869,6 @@ module.exports = (function() {
currentScopes = scopeManager.scopes;
- /*
- * Index the scopes by the start range of their block for efficient
- * lookup in getScope.
- */
- scopeMap = [];
-
- currentScopes.forEach(function(scope, index) {
- const range = scope.block.range[0];
-
- /*
- * Sometimes two scopes are returned for a given node. This is
- * handled later in a known way, so just don't overwrite here.
- */
- if (!scopeMap[range]) {
- scopeMap[range] = index;
- }
- });
-
// augment global scope with declared global variables
addDeclaredGlobals(ast, currentScopes[0], currentConfig);
diff --git a/tools/eslint/lib/formatters/checkstyle.js b/tools/eslint/lib/formatters/checkstyle.js
index 1f4554c0fc..0beedcf689 100644
--- a/tools/eslint/lib/formatters/checkstyle.js
+++ b/tools/eslint/lib/formatters/checkstyle.js
@@ -38,15 +38,16 @@ module.exports = function(results) {
results.forEach(function(result) {
const messages = result.messages;
- output += "<file name=\"" + xmlEscape(result.filePath) + "\">";
+ output += `<file name="${xmlEscape(result.filePath)}">`;
messages.forEach(function(message) {
- output += "<error line=\"" + xmlEscape(message.line) + "\" " +
- "column=\"" + xmlEscape(message.column) + "\" " +
- "severity=\"" + xmlEscape(getMessageType(message)) + "\" " +
- "message=\"" + xmlEscape(message.message) +
- (message.ruleId ? " (" + message.ruleId + ")" : "") + "\" " +
- "source=\"" + (message.ruleId ? xmlEscape("eslint.rules." + message.ruleId) : "") + "\" />";
+ output += [
+ `<error line="${xmlEscape(message.line)}"`,
+ `column="${xmlEscape(message.column)}"`,
+ `severity="${xmlEscape(getMessageType(message))}"`,
+ `message="${xmlEscape(message.message)}${message.ruleId ? ` (${message.ruleId})` : ""}"`,
+ `source="${message.ruleId ? xmlEscape(`eslint.rules.${message.ruleId}`) : ""}" />`
+ ].join(" ");
});
output += "</file>";
diff --git a/tools/eslint/lib/formatters/compact.js b/tools/eslint/lib/formatters/compact.js
index 366ac8519a..9c7aeb87d7 100644
--- a/tools/eslint/lib/formatters/compact.js
+++ b/tools/eslint/lib/formatters/compact.js
@@ -40,12 +40,12 @@ module.exports = function(results) {
messages.forEach(function(message) {
- output += result.filePath + ": ";
- output += "line " + (message.line || 0);
- output += ", col " + (message.column || 0);
- output += ", " + getMessageType(message);
- output += " - " + message.message;
- output += message.ruleId ? " (" + message.ruleId + ")" : "";
+ output += `${result.filePath}: `;
+ output += `line ${message.line || 0}`;
+ output += `, col ${message.column || 0}`;
+ output += `, ${getMessageType(message)}`;
+ output += ` - ${message.message}`;
+ output += message.ruleId ? ` (${message.ruleId})` : "";
output += "\n";
});
@@ -53,7 +53,7 @@ module.exports = function(results) {
});
if (total > 0) {
- output += "\n" + total + " problem" + (total !== 1 ? "s" : "");
+ output += `\n${total} problem${total !== 1 ? "s" : ""}`;
}
return output;
diff --git a/tools/eslint/lib/formatters/html.js b/tools/eslint/lib/formatters/html.js
index a5c324bee3..66e89d372c 100644
--- a/tools/eslint/lib/formatters/html.js
+++ b/tools/eslint/lib/formatters/html.js
@@ -23,7 +23,7 @@ const resultTemplate = lodash.template(fs.readFileSync(path.join(__dirname, "htm
* @returns {string} The original word with an s on the end if count is not one.
*/
function pluralize(word, count) {
- return (count === 1 ? word : word + "s");
+ return (count === 1 ? word : `${word}s`);
}
/**
@@ -34,10 +34,10 @@ function pluralize(word, count) {
*/
function renderSummary(totalErrors, totalWarnings) {
const totalProblems = totalErrors + totalWarnings;
- let renderedText = totalProblems + " " + pluralize("problem", totalProblems);
+ let renderedText = `${totalProblems} ${pluralize("problem", totalProblems)}`;
if (totalProblems !== 0) {
- renderedText += " (" + totalErrors + " " + pluralize("error", totalErrors) + ", " + totalWarnings + " " + pluralize("warning", totalWarnings) + ")";
+ renderedText += ` (${totalErrors} ${pluralize("error", totalErrors)}, ${totalWarnings} ${pluralize("warning", totalWarnings)})`;
}
return renderedText;
}
diff --git a/tools/eslint/lib/formatters/jslint-xml.js b/tools/eslint/lib/formatters/jslint-xml.js
index 8ef2efcb7f..7cfa893d32 100644
--- a/tools/eslint/lib/formatters/jslint-xml.js
+++ b/tools/eslint/lib/formatters/jslint-xml.js
@@ -20,14 +20,15 @@ module.exports = function(results) {
results.forEach(function(result) {
const messages = result.messages;
- output += "<file name=\"" + result.filePath + "\">";
+ output += `<file name="${result.filePath}">`;
messages.forEach(function(message) {
- output += "<issue line=\"" + message.line + "\" " +
- "char=\"" + message.column + "\" " +
- "evidence=\"" + xmlEscape(message.source || "") + "\" " +
- "reason=\"" + xmlEscape(message.message || "") +
- (message.ruleId ? " (" + message.ruleId + ")" : "") + "\" />";
+ output += [
+ `<issue line="${message.line}"`,
+ `char="${message.column}"`,
+ `evidence="${xmlEscape(message.source || "")}"`,
+ `reason="${xmlEscape(message.message || "")}${message.ruleId ? ` (${message.ruleId})` : ""}" />`
+ ].join(" ");
});
output += "</file>";
diff --git a/tools/eslint/lib/formatters/junit.js b/tools/eslint/lib/formatters/junit.js
index 7b2aa7a0ce..0c29a72c46 100644
--- a/tools/eslint/lib/formatters/junit.js
+++ b/tools/eslint/lib/formatters/junit.js
@@ -40,21 +40,21 @@ module.exports = function(results) {
const messages = result.messages;
if (messages.length) {
- output += "<testsuite package=\"org.eslint\" time=\"0\" tests=\"" + messages.length + "\" errors=\"" + messages.length + "\" name=\"" + result.filePath + "\">\n";
+ output += `<testsuite package="org.eslint" time="0" tests="${messages.length}" errors="${messages.length}" name="${result.filePath}">\n`;
}
messages.forEach(function(message) {
const type = message.fatal ? "error" : "failure";
- output += "<testcase time=\"0\" name=\"org.eslint." + (message.ruleId || "unknown") + "\">";
- output += "<" + type + " message=\"" + xmlEscape(message.message || "") + "\">";
+ output += `<testcase time="0" name="org.eslint.${message.ruleId || "unknown"}">`;
+ output += `<${type} message="${xmlEscape(message.message || "")}">`;
output += "<![CDATA[";
- output += "line " + (message.line || 0) + ", col ";
- output += (message.column || 0) + ", " + getMessageType(message);
- output += " - " + xmlEscape(message.message || "");
- output += (message.ruleId ? " (" + message.ruleId + ")" : "");
+ output += `line ${message.line || 0}, col `;
+ output += `${message.column || 0}, ${getMessageType(message)}`;
+ output += ` - ${xmlEscape(message.message || "")}`;
+ output += (message.ruleId ? ` (${message.ruleId})` : "");
output += "]]>";
- output += "</" + type + ">";
+ output += `</${type}>`;
output += "</testcase>\n";
});
diff --git a/tools/eslint/lib/formatters/stylish.js b/tools/eslint/lib/formatters/stylish.js
index ee70bf5d74..578a146c01 100644
--- a/tools/eslint/lib/formatters/stylish.js
+++ b/tools/eslint/lib/formatters/stylish.js
@@ -18,7 +18,7 @@ const chalk = require("chalk"),
* @returns {string} The original word with an s on the end if count is not one.
*/
function pluralize(word, count) {
- return (count === 1 ? word : word + "s");
+ return (count === 1 ? word : `${word}s`);
}
//------------------------------------------------------------------------------
@@ -41,9 +41,9 @@ module.exports = function(results) {
}
total += messages.length;
- output += chalk.underline(result.filePath) + "\n";
+ output += `${chalk.underline(result.filePath)}\n`;
- output += table(
+ output += `${table(
messages.map(function(message) {
let messageType;
@@ -73,9 +73,9 @@ module.exports = function(results) {
}
).split("\n").map(function(el) {
return el.replace(/(\d+)\s+(\d+)/, function(m, p1, p2) {
- return chalk.dim(p1 + ":" + p2);
+ return chalk.dim(`${p1}:${p2}`);
});
- }).join("\n") + "\n\n";
+ }).join("\n")}\n\n`;
});
if (total > 0) {
diff --git a/tools/eslint/lib/formatters/table.js b/tools/eslint/lib/formatters/table.js
index 4fc5ad3953..cd09626cc7 100644
--- a/tools/eslint/lib/formatters/table.js
+++ b/tools/eslint/lib/formatters/table.js
@@ -97,7 +97,7 @@ function drawReport(results) {
return "";
}
- return "\n" + result.filePath + "\n\n" + drawTable(result.messages);
+ return `\n${result.filePath}\n\n${drawTable(result.messages)}`;
});
files = files.filter(function(content) {
@@ -129,7 +129,7 @@ module.exports = function(report) {
result = drawReport(report);
}
- result += "\n" + table([
+ result += `\n${table([
[
chalk.red(pluralize("Error", errorCount, true))
],
@@ -146,7 +146,7 @@ module.exports = function(report) {
drawHorizontalLine() {
return true;
}
- });
+ })}`;
return result;
};
diff --git a/tools/eslint/lib/formatters/tap.js b/tools/eslint/lib/formatters/tap.js
index df8668024f..568ac1e8b6 100644
--- a/tools/eslint/lib/formatters/tap.js
+++ b/tools/eslint/lib/formatters/tap.js
@@ -30,9 +30,9 @@ function getMessageType(message) {
*/
function outputDiagnostics(diagnostic) {
const prefix = " ";
- let output = prefix + "---\n";
+ let output = `${prefix}---\n`;
- output += prefix + yaml.safeDump(diagnostic).split("\n").join("\n" + prefix);
+ output += prefix + yaml.safeDump(diagnostic).split("\n").join(`\n${prefix}`);
output += "...\n";
return output;
}
@@ -42,7 +42,7 @@ function outputDiagnostics(diagnostic) {
//------------------------------------------------------------------------------
module.exports = function(results) {
- let output = "TAP version 13\n1.." + results.length + "\n";
+ let output = `TAP version 13\n1..${results.length}\n`;
results.forEach(function(result, id) {
const messages = result.messages;
@@ -77,7 +77,7 @@ module.exports = function(results) {
});
}
- output += testResult + " " + (id + 1) + " - " + result.filePath + "\n";
+ output += `${testResult} ${id + 1} - ${result.filePath}\n`;
// If we have an error include diagnostics
if (messages.length > 0) {
diff --git a/tools/eslint/lib/formatters/unix.js b/tools/eslint/lib/formatters/unix.js
index f11f30a065..867bbd5b49 100644
--- a/tools/eslint/lib/formatters/unix.js
+++ b/tools/eslint/lib/formatters/unix.js
@@ -39,12 +39,11 @@ module.exports = function(results) {
messages.forEach(function(message) {
- output += result.filePath + ":";
- output += (message.line || 0) + ":";
- output += (message.column || 0) + ":";
- output += " " + message.message + " ";
- output += "[" + getMessageType(message) +
- (message.ruleId ? "/" + message.ruleId : "") + "]";
+ output += `${result.filePath}:`;
+ output += `${message.line || 0}:`;
+ output += `${message.column || 0}:`;
+ output += ` ${message.message} `;
+ output += `[${getMessageType(message)}${message.ruleId ? `/${message.ruleId}` : ""}]`;
output += "\n";
});
@@ -52,7 +51,7 @@ module.exports = function(results) {
});
if (total > 0) {
- output += "\n" + total + " problem" + (total !== 1 ? "s" : "");
+ output += `\n${total} problem${total !== 1 ? "s" : ""}`;
}
return output;
diff --git a/tools/eslint/lib/formatters/visualstudio.js b/tools/eslint/lib/formatters/visualstudio.js
index e11474d5a4..134a04a513 100644
--- a/tools/eslint/lib/formatters/visualstudio.js
+++ b/tools/eslint/lib/formatters/visualstudio.js
@@ -42,11 +42,11 @@ module.exports = function(results) {
messages.forEach(function(message) {
output += result.filePath;
- output += "(" + (message.line || 0);
- output += message.column ? "," + message.column : "";
- output += "): " + getMessageType(message);
- output += message.ruleId ? " " + message.ruleId : "";
- output += " : " + message.message;
+ output += `(${message.line || 0}`;
+ output += message.column ? `,${message.column}` : "";
+ output += `): ${getMessageType(message)}`;
+ output += message.ruleId ? ` ${message.ruleId}` : "";
+ output += ` : ${message.message}`;
output += "\n";
});
@@ -56,7 +56,7 @@ module.exports = function(results) {
if (total === 0) {
output += "no problems";
} else {
- output += "\n" + total + " problem" + (total !== 1 ? "s" : "");
+ output += `\n${total} problem${total !== 1 ? "s" : ""}`;
}
return output;
diff --git a/tools/eslint/lib/ignored-paths.js b/tools/eslint/lib/ignored-paths.js
index 4e0953885c..bc2db8aaac 100644
--- a/tools/eslint/lib/ignored-paths.js
+++ b/tools/eslint/lib/ignored-paths.js
@@ -136,16 +136,16 @@ function IgnoredPaths(options) {
fs.statSync(options.ignorePath);
ignorePath = options.ignorePath;
} catch (e) {
- e.message = "Cannot read ignore file: " + options.ignorePath + "\nError: " + e.message;
+ e.message = `Cannot read ignore file: ${options.ignorePath}\nError: ${e.message}`;
throw e;
}
} else {
- debug("Looking for ignore file in " + options.cwd);
+ debug(`Looking for ignore file in ${options.cwd}`);
ignorePath = findIgnoreFile(options.cwd);
try {
fs.statSync(ignorePath);
- debug("Loaded ignore file " + ignorePath);
+ debug(`Loaded ignore file ${ignorePath}`);
} catch (e) {
debug("Could not find ignore file in cwd");
this.options = options;
@@ -153,7 +153,7 @@ function IgnoredPaths(options) {
}
if (ignorePath) {
- debug("Adding " + ignorePath);
+ debug(`Adding ${ignorePath}`);
this.baseDir = path.dirname(path.resolve(options.cwd, ignorePath));
addIgnoreFile(this.ig.custom, ignorePath);
addIgnoreFile(this.ig.default, ignorePath);
diff --git a/tools/eslint/lib/internal-rules/.eslintrc.yml b/tools/eslint/lib/internal-rules/.eslintrc.yml
new file mode 100644
index 0000000000..22d3a30ce3
--- /dev/null
+++ b/tools/eslint/lib/internal-rules/.eslintrc.yml
@@ -0,0 +1,3 @@
+rules:
+ internal-no-invalid-meta: "error"
+ internal-consistent-docs-description: "error"
diff --git a/tools/eslint/lib/internal-rules/internal-consistent-docs-description.js b/tools/eslint/lib/internal-rules/internal-consistent-docs-description.js
new file mode 100644
index 0000000000..3e4671aa7b
--- /dev/null
+++ b/tools/eslint/lib/internal-rules/internal-consistent-docs-description.js
@@ -0,0 +1,131 @@
+/**
+ * @fileoverview Internal rule to enforce meta.docs.description conventions.
+ * @author Vitor Balocco
+ */
+
+"use strict";
+
+const ALLOWED_FIRST_WORDS = [
+ "enforce",
+ "require",
+ "disallow"
+];
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Gets the property of the Object node passed in that has the name specified.
+ *
+ * @param {string} property Name of the property to return.
+ * @param {ASTNode} node The ObjectExpression node.
+ * @returns {ASTNode} The Property node or null if not found.
+ */
+function getPropertyFromObject(property, node) {
+ const properties = node.properties;
+
+ for (let i = 0; i < properties.length; i++) {
+ if (properties[i].key.name === property) {
+ return properties[i];
+ }
+ }
+
+ return null;
+}
+
+/**
+ * Verifies that the meta.docs.description property follows our internal conventions.
+ *
+ * @param {RuleContext} context The ESLint rule context.
+ * @param {ASTNode} exportsNode ObjectExpression node that the rule exports.
+ * @returns {void}
+ */
+function checkMetaDocsDescription(context, exportsNode) {
+ if (exportsNode.type !== "ObjectExpression") {
+
+ // if the exported node is not the correct format, "internal-no-invalid-meta" will already report this.
+ return;
+ }
+
+ const metaProperty = getPropertyFromObject("meta", exportsNode);
+ const metaDocs = metaProperty && getPropertyFromObject("docs", metaProperty.value);
+ const metaDocsDescription = metaDocs && getPropertyFromObject("description", metaDocs.value);
+
+ if (!metaDocsDescription) {
+
+ // if there is no `meta.docs.description` property, "internal-no-invalid-meta" will already report this.
+ return;
+ }
+
+ const description = metaDocsDescription.value.value;
+
+ if (typeof description !== "string") {
+ context.report({
+ node: metaDocsDescription.value,
+ message: "`meta.docs.description` should be a string."
+ });
+ return;
+ }
+
+ if (description === "") {
+ context.report({
+ node: metaDocsDescription.value,
+ message: "`meta.docs.description` should not be empty.",
+ });
+ return;
+ }
+
+ if (description.indexOf(" ") === 0) {
+ context.report({
+ node: metaDocsDescription.value,
+ message: "`meta.docs.description` should not start with whitespace."
+ });
+ return;
+ }
+
+ const firstWord = description.split(" ")[0];
+
+ if (ALLOWED_FIRST_WORDS.indexOf(firstWord) === -1) {
+ context.report({
+ node: metaDocsDescription.value,
+ message: "`meta.docs.description` should start with one of the following words: {{ allowedWords }}. Started with \"{{ firstWord }}\" instead.",
+ data: {
+ allowedWords: ALLOWED_FIRST_WORDS.join(", "),
+ firstWord
+ }
+ });
+ return;
+ }
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "enforce correct conventions of `meta.docs.description` property in core rules",
+ category: "Internal",
+ recommended: false
+ },
+
+ schema: []
+ },
+
+ create(context) {
+ return {
+ AssignmentExpression(node) {
+ if (node.left &&
+ node.right &&
+ node.left.type === "MemberExpression" &&
+ node.left.object.name === "module" &&
+ node.left.property.name === "exports") {
+
+ checkMetaDocsDescription(context, node.right);
+ }
+ }
+ };
+ }
+};
diff --git a/tools/eslint/lib/options.js b/tools/eslint/lib/options.js
index bbb2456a98..5669104c03 100644
--- a/tools/eslint/lib/options.js
+++ b/tools/eslint/lib/options.js
@@ -216,8 +216,8 @@ module.exports = optionator({
},
{
option: "print-config",
- type: "Boolean",
- description: "Print the configuration to be used"
+ type: "path::String",
+ description: "Print the configuration for the given file"
}
]
});
diff --git a/tools/eslint/lib/rules.js b/tools/eslint/lib/rules.js
index ee8695f48d..128a6bcd15 100644
--- a/tools/eslint/lib/rules.js
+++ b/tools/eslint/lib/rules.js
@@ -54,7 +54,7 @@ function load(rulesDir, cwd) {
function importPlugin(plugin, pluginName) {
if (plugin.rules) {
Object.keys(plugin.rules).forEach(function(ruleId) {
- const qualifiedRuleId = pluginName + "/" + ruleId,
+ const qualifiedRuleId = `${pluginName}/${ruleId}`,
rule = plugin.rules[ruleId];
define(qualifiedRuleId, rule);
diff --git a/tools/eslint/lib/rules/.eslintrc.yml b/tools/eslint/lib/rules/.eslintrc.yml
index fded5b8497..22d3a30ce3 100644
--- a/tools/eslint/lib/rules/.eslintrc.yml
+++ b/tools/eslint/lib/rules/.eslintrc.yml
@@ -1,2 +1,3 @@
rules:
internal-no-invalid-meta: "error"
+ internal-consistent-docs-description: "error"
diff --git a/tools/eslint/lib/rules/array-callback-return.js b/tools/eslint/lib/rules/array-callback-return.js
index d85ba0422d..1713125a7a 100644
--- a/tools/eslint/lib/rules/array-callback-return.js
+++ b/tools/eslint/lib/rules/array-callback-return.js
@@ -185,7 +185,9 @@ module.exports = {
shouldCheck:
TARGET_NODE_TYPE.test(node.type) &&
node.body.type === "BlockStatement" &&
- isCallbackOfArrayMethod(node)
+ isCallbackOfArrayMethod(node) &&
+ !node.async &&
+ !node.generator
};
},
diff --git a/tools/eslint/lib/rules/arrow-parens.js b/tools/eslint/lib/rules/arrow-parens.js
index d9b72b81fe..67bfdf541c 100644
--- a/tools/eslint/lib/rules/arrow-parens.js
+++ b/tools/eslint/lib/rules/arrow-parens.js
@@ -51,7 +51,7 @@ module.exports = {
* @returns {void}
*/
function parens(node) {
- const token = sourceCode.getFirstToken(node);
+ const token = sourceCode.getFirstToken(node, node.async ? 1 : 0);
// "as-needed", { "requireForBlockBody": true }: x => x
if (
diff --git a/tools/eslint/lib/rules/class-methods-use-this.js b/tools/eslint/lib/rules/class-methods-use-this.js
index 0802846ffa..d429c579b9 100644
--- a/tools/eslint/lib/rules/class-methods-use-this.js
+++ b/tools/eslint/lib/rules/class-methods-use-this.js
@@ -16,9 +16,23 @@ module.exports = {
category: "Best Practices",
recommended: false
},
- schema: []
+ schema: [{
+ type: "object",
+ properties: {
+ exceptMethods: {
+ type: "array",
+ items: {
+ type: "string"
+ }
+ }
+ },
+ additionalProperties: false
+ }]
},
create(context) {
+ const config = context.options[0] ? Object.assign({}, context.options[0]) : {};
+ const exceptMethods = new Set(config.exceptMethods || []);
+
const stack = [];
/**
@@ -42,6 +56,16 @@ module.exports = {
}
/**
+ * Check if the node is an instance method not excluded by config
+ * @param {ASTNode} node - node to check
+ * @returns {boolean} True if it is an instance method, and not excluded by config
+ * @private
+ */
+ function isIncludedInstanceMethod(node) {
+ return isInstanceMethod(node) && !exceptMethods.has(node.key.name);
+ }
+
+ /**
* Checks if we are leaving a function that is a method, and reports if 'this' has not been used.
* Static methods and the constructor are exempt.
* Then pops the context off the stack.
@@ -52,7 +76,7 @@ module.exports = {
function exitFunction(node) {
const methodUsesThis = stack.pop();
- if (isInstanceMethod(node.parent) && !methodUsesThis) {
+ if (isIncludedInstanceMethod(node.parent) && !methodUsesThis) {
context.report({
node,
message: "Expected 'this' to be used by class method '{{classMethod}}'.",
diff --git a/tools/eslint/lib/rules/comma-dangle.js b/tools/eslint/lib/rules/comma-dangle.js
index 621bc2f63e..763ee89fd5 100644
--- a/tools/eslint/lib/rules/comma-dangle.js
+++ b/tools/eslint/lib/rules/comma-dangle.js
@@ -11,16 +11,62 @@
const lodash = require("lodash");
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const DEFAULT_OPTIONS = Object.freeze({
+ arrays: "never",
+ objects: "never",
+ imports: "never",
+ exports: "never",
+ functions: "ignore",
+});
+
/**
* Checks whether or not a trailing comma is allowed in a given node.
- * `ArrayPattern` which has `RestElement` disallows it.
+ * If the `lastItem` is `RestElement` or `RestProperty`, it disallows trailing commas.
*
- * @param {ASTNode} node - A node to check.
* @param {ASTNode} lastItem - The node of the last element in the given node.
* @returns {boolean} `true` if a trailing comma is allowed.
*/
-function isTrailingCommaAllowed(node, lastItem) {
- return node.type !== "ArrayPattern" || lastItem.type !== "RestElement";
+function isTrailingCommaAllowed(lastItem) {
+ return !(
+ lastItem.type === "RestElement" ||
+ lastItem.type === "RestProperty" ||
+ lastItem.type === "ExperimentalRestProperty"
+ );
+}
+
+/**
+ * Normalize option value.
+ *
+ * @param {string|Object|undefined} optionValue - The 1st option value to normalize.
+ * @returns {Object} The normalized option value.
+ */
+function normalizeOptions(optionValue) {
+ if (typeof optionValue === "string") {
+ return {
+ arrays: optionValue,
+ objects: optionValue,
+ imports: optionValue,
+ exports: optionValue,
+
+ // For backward compatibility, always ignore functions.
+ functions: "ignore",
+ };
+ }
+ if (typeof optionValue === "object" && optionValue !== null) {
+ return {
+ arrays: optionValue.arrays || DEFAULT_OPTIONS.arrays,
+ objects: optionValue.objects || DEFAULT_OPTIONS.objects,
+ imports: optionValue.imports || DEFAULT_OPTIONS.imports,
+ exports: optionValue.exports || DEFAULT_OPTIONS.exports,
+ functions: optionValue.functions || DEFAULT_OPTIONS.functions,
+ };
+ }
+
+ return DEFAULT_OPTIONS;
}
//------------------------------------------------------------------------------
@@ -39,17 +85,113 @@ module.exports = {
schema: [
{
- enum: ["always", "always-multiline", "only-multiline", "never"]
- }
+ defs: {
+ value: {
+ enum: [
+ "always",
+ "always-multiline",
+ "only-multiline",
+ "never"
+ ]
+ },
+ valueWithIgnore: {
+ anyOf: [
+ {
+ $ref: "#/defs/value"
+ },
+ {
+ enum: ["ignore"]
+ }
+ ]
+ }
+ },
+ anyOf: [
+ {
+ $ref: "#/defs/value"
+ },
+ {
+ type: "object",
+ properties: {
+ arrays: {$refs: "#/defs/valueWithIgnore"},
+ objects: {$refs: "#/defs/valueWithIgnore"},
+ imports: {$refs: "#/defs/valueWithIgnore"},
+ exports: {$refs: "#/defs/valueWithIgnore"},
+ functions: {$refs: "#/defs/valueWithIgnore"}
+ },
+ additionalProperties: false
+ }
+ ]
+ },
]
},
create(context) {
- const mode = context.options[0];
+ const options = normalizeOptions(context.options[0]);
+ const sourceCode = context.getSourceCode();
const UNEXPECTED_MESSAGE = "Unexpected trailing comma.";
const MISSING_MESSAGE = "Missing trailing comma.";
/**
+ * Gets the last item of the given node.
+ * @param {ASTNode} node - The node to get.
+ * @returns {ASTNode|null} The last node or null.
+ */
+ function getLastItem(node) {
+ switch (node.type) {
+ case "ObjectExpression":
+ case "ObjectPattern":
+ return lodash.last(node.properties);
+ case "ArrayExpression":
+ case "ArrayPattern":
+ return lodash.last(node.elements);
+ case "ImportDeclaration":
+ case "ExportNamedDeclaration":
+ return lodash.last(node.specifiers);
+ case "FunctionDeclaration":
+ case "FunctionExpression":
+ case "ArrowFunctionExpression":
+ return lodash.last(node.params);
+ case "CallExpression":
+ case "NewExpression":
+ return lodash.last(node.arguments);
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Gets the trailing comma token of the given node.
+ * If the trailing comma does not exist, this returns the token which is
+ * the insertion point of the trailing comma token.
+ *
+ * @param {ASTNode} node - The node to get.
+ * @param {ASTNode} lastItem - The last item of the node.
+ * @returns {Token} The trailing comma token or the insertion point.
+ */
+ function getTrailingToken(node, lastItem) {
+ switch (node.type) {
+ case "ObjectExpression":
+ case "ObjectPattern":
+ case "ArrayExpression":
+ case "ArrayPattern":
+ case "CallExpression":
+ case "NewExpression":
+ return sourceCode.getLastToken(node, 1);
+ case "FunctionDeclaration":
+ case "FunctionExpression":
+ return sourceCode.getTokenBefore(node.body, 1);
+ default: {
+ const nextToken = sourceCode.getTokenAfter(lastItem);
+
+ if (nextToken.value === ",") {
+ return nextToken;
+ }
+ return sourceCode.getLastToken(lastItem);
+ }
+ }
+ }
+
+ /**
* Checks whether or not a given node is multiline.
* This rule handles a given node as multiline when the closing parenthesis
* and the last element are not on the same line.
@@ -58,26 +200,14 @@ module.exports = {
* @returns {boolean} `true` if the node is multiline.
*/
function isMultiline(node) {
- const lastItem = lodash.last(node.properties || node.elements || node.specifiers);
+ const lastItem = getLastItem(node);
if (!lastItem) {
return false;
}
- const sourceCode = context.getSourceCode();
- let penultimateToken = sourceCode.getLastToken(lastItem),
- lastToken = sourceCode.getTokenAfter(penultimateToken);
-
- // parentheses are a pain
- while (lastToken.value === ")") {
- penultimateToken = lastToken;
- lastToken = sourceCode.getTokenAfter(lastToken);
- }
-
- if (lastToken.value === ",") {
- penultimateToken = lastToken;
- lastToken = sourceCode.getTokenAfter(lastToken);
- }
+ const penultimateToken = getTrailingToken(node, lastItem);
+ const lastToken = sourceCode.getTokenAfter(penultimateToken);
return lastToken.loc.end.line !== penultimateToken.loc.end.line;
}
@@ -91,21 +221,13 @@ module.exports = {
* @returns {void}
*/
function forbidTrailingComma(node) {
- const lastItem = lodash.last(node.properties || node.elements || node.specifiers);
+ const lastItem = getLastItem(node);
if (!lastItem || (node.type === "ImportDeclaration" && lastItem.type !== "ImportSpecifier")) {
return;
}
- const sourceCode = context.getSourceCode();
- let trailingToken;
-
- // last item can be surrounded by parentheses for object and array literals
- if (node.type === "ObjectExpression" || node.type === "ArrayExpression") {
- trailingToken = sourceCode.getTokenBefore(sourceCode.getLastToken(node));
- } else {
- trailingToken = sourceCode.getTokenAfter(lastItem);
- }
+ const trailingToken = getTrailingToken(node, lastItem);
if (trailingToken.value === ",") {
context.report({
@@ -132,33 +254,25 @@ module.exports = {
* @returns {void}
*/
function forceTrailingComma(node) {
- const lastItem = lodash.last(node.properties || node.elements || node.specifiers);
+ const lastItem = getLastItem(node);
if (!lastItem || (node.type === "ImportDeclaration" && lastItem.type !== "ImportSpecifier")) {
return;
}
- if (!isTrailingCommaAllowed(node, lastItem)) {
+ if (!isTrailingCommaAllowed(lastItem)) {
forbidTrailingComma(node);
return;
}
- const sourceCode = context.getSourceCode();
- let penultimateToken = lastItem,
- trailingToken = sourceCode.getTokenAfter(lastItem);
-
- // Skip close parentheses.
- while (trailingToken.value === ")") {
- penultimateToken = trailingToken;
- trailingToken = sourceCode.getTokenAfter(trailingToken);
- }
+ const trailingToken = getTrailingToken(node, lastItem);
if (trailingToken.value !== ",") {
context.report({
node: lastItem,
- loc: lastItem.loc.end,
+ loc: trailingToken.loc.end,
message: MISSING_MESSAGE,
fix(fixer) {
- return fixer.insertTextAfter(penultimateToken, ",");
+ return fixer.insertTextAfter(trailingToken, ",");
}
});
}
@@ -198,26 +312,30 @@ module.exports = {
}
}
- // Chooses a checking function.
- let checkForTrailingComma;
-
- if (mode === "always") {
- checkForTrailingComma = forceTrailingComma;
- } else if (mode === "always-multiline") {
- checkForTrailingComma = forceTrailingCommaIfMultiline;
- } else if (mode === "only-multiline") {
- checkForTrailingComma = allowTrailingCommaIfMultiline;
- } else {
- checkForTrailingComma = forbidTrailingComma;
- }
+ const predicate = {
+ always: forceTrailingComma,
+ "always-multiline": forceTrailingCommaIfMultiline,
+ "only-multiline": allowTrailingCommaIfMultiline,
+ never: forbidTrailingComma,
+ ignore: lodash.noop,
+ };
return {
- ObjectExpression: checkForTrailingComma,
- ObjectPattern: checkForTrailingComma,
- ArrayExpression: checkForTrailingComma,
- ArrayPattern: checkForTrailingComma,
- ImportDeclaration: checkForTrailingComma,
- ExportNamedDeclaration: checkForTrailingComma
+ ObjectExpression: predicate[options.objects],
+ ObjectPattern: predicate[options.objects],
+
+ ArrayExpression: predicate[options.arrays],
+ ArrayPattern: predicate[options.arrays],
+
+ ImportDeclaration: predicate[options.imports],
+
+ ExportNamedDeclaration: predicate[options.exports],
+
+ FunctionDeclaration: predicate[options.functions],
+ FunctionExpression: predicate[options.functions],
+ ArrowFunctionExpression: predicate[options.functions],
+ CallExpression: predicate[options.functions],
+ NewExpression: predicate[options.functions],
};
}
};
diff --git a/tools/eslint/lib/rules/curly.js b/tools/eslint/lib/rules/curly.js
index 96a7c70155..02d74a1e03 100644
--- a/tools/eslint/lib/rules/curly.js
+++ b/tools/eslint/lib/rules/curly.js
@@ -9,6 +9,7 @@
//------------------------------------------------------------------------------
const astUtils = require("../ast-utils");
+const esUtils = require("esutils");
//------------------------------------------------------------------------------
// Rule Definition
@@ -48,7 +49,9 @@ module.exports = {
maxItems: 2
}
]
- }
+ },
+
+ fixable: "code"
},
create(context) {
@@ -137,12 +140,13 @@ module.exports = {
/**
* Reports "Expected { after ..." error
* @param {ASTNode} node The node to report.
+ * @param {ASTNode} bodyNode The body node that is incorrectly missing curly brackets
* @param {string} name The name to report.
* @param {string} suffix Additional string to add to the end of a report.
* @returns {void}
* @private
*/
- function reportExpectedBraceError(node, name, suffix) {
+ function reportExpectedBraceError(node, bodyNode, name, suffix) {
context.report({
node,
loc: (name !== "else" ? node : getElseKeyword(node)).loc.start,
@@ -150,19 +154,73 @@ module.exports = {
data: {
name,
suffix: (suffix ? ` ${suffix}` : "")
- }
+ },
+ fix: fixer => fixer.replaceText(bodyNode, `{${sourceCode.getText(bodyNode)}}`)
});
}
/**
+ * Determines if a semicolon needs to be inserted after removing a set of curly brackets, in order to avoid a SyntaxError.
+ * @param {Token} closingBracket The } token
+ * @returns {boolean} `true` if a semicolon needs to be inserted after the last statement in the block.
+ */
+ function needsSemicolon(closingBracket) {
+ const tokenBefore = sourceCode.getTokenBefore(closingBracket);
+ const tokenAfter = sourceCode.getTokenAfter(closingBracket);
+ const lastBlockNode = sourceCode.getNodeByRangeIndex(tokenBefore.range[0]);
+
+ if (tokenBefore.value === ";") {
+
+ // If the last statement already has a semicolon, don't add another one.
+ return false;
+ }
+
+ if (!tokenAfter) {
+
+ // If there are no statements after this block, there is no need to add a semicolon.
+ return false;
+ }
+
+ if (lastBlockNode.type === "BlockStatement" && lastBlockNode.parent.type !== "FunctionExpression" && lastBlockNode.parent.type !== "ArrowFunctionExpression") {
+
+ // If the last node surrounded by curly brackets is a BlockStatement (other than a FunctionExpression or an ArrowFunctionExpression),
+ // don't insert a semicolon. Otherwise, the semicolon would be parsed as a separate statement, which would cause
+ // a SyntaxError if it was followed by `else`.
+ return false;
+ }
+
+ if (tokenBefore.loc.end.line === tokenAfter.loc.start.line) {
+
+ // If the next token is on the same line, insert a semicolon.
+ return true;
+ }
+
+ if (/^[(\[\/`+-]/.test(tokenAfter.value)) {
+
+ // If the next token starts with a character that would disrupt ASI, insert a semicolon.
+ return true;
+ }
+
+ if (tokenBefore.type === "Punctuator" && (tokenBefore.value === "++" || tokenBefore.value === "--")) {
+
+ // If the last token is ++ or --, insert a semicolon to avoid disrupting ASI.
+ return true;
+ }
+
+ // Otherwise, do not insert a semicolon.
+ return false;
+ }
+
+ /**
* Reports "Unnecessary { after ..." error
* @param {ASTNode} node The node to report.
+ * @param {ASTNode} bodyNode The block statement that is incorrectly surrounded by parens
* @param {string} name The name to report.
* @param {string} suffix Additional string to add to the end of a report.
* @returns {void}
* @private
*/
- function reportUnnecessaryBraceError(node, name, suffix) {
+ function reportUnnecessaryBraceError(node, bodyNode, name, suffix) {
context.report({
node,
loc: (name !== "else" ? node : getElseKeyword(node)).loc.start,
@@ -170,6 +228,33 @@ module.exports = {
data: {
name,
suffix: (suffix ? ` ${suffix}` : "")
+ },
+ fix(fixer) {
+
+ // `do while` expressions sometimes need a space to be inserted after `do`.
+ // e.g. `do{foo()} while (bar)` should be corrected to `do foo() while (bar)`
+ const needsPrecedingSpace = node.type === "DoWhileStatement" &&
+ sourceCode.getTokenBefore(bodyNode).end === bodyNode.start &&
+ esUtils.code.isIdentifierPartES6(sourceCode.getText(bodyNode).charCodeAt(1));
+
+ const openingBracket = sourceCode.getFirstToken(bodyNode);
+ const closingBracket = sourceCode.getLastToken(bodyNode);
+ const lastTokenInBlock = sourceCode.getTokenBefore(closingBracket);
+
+ if (needsSemicolon(closingBracket)) {
+
+ /*
+ * If removing braces would cause a SyntaxError due to multiple statements on the same line (or
+ * change the semantics of the code due to ASI), don't perform a fix.
+ */
+ return null;
+ }
+
+ const resultingBodyText = sourceCode.getText().slice(openingBracket.range[1], lastTokenInBlock.range[0]) +
+ sourceCode.getText(lastTokenInBlock) +
+ sourceCode.getText().slice(lastTokenInBlock.range[1], closingBracket.range[0]);
+
+ return fixer.replaceText(bodyNode, (needsPrecedingSpace ? " " : "") + resultingBodyText);
}
});
}
@@ -218,9 +303,9 @@ module.exports = {
check() {
if (this.expected !== null && this.expected !== this.actual) {
if (this.expected) {
- reportExpectedBraceError(node, name, suffix);
+ reportExpectedBraceError(node, body, name, suffix);
} else {
- reportUnnecessaryBraceError(node, name, suffix);
+ reportUnnecessaryBraceError(node, body, name, suffix);
}
}
}
diff --git a/tools/eslint/lib/rules/dot-location.js b/tools/eslint/lib/rules/dot-location.js
index 3f2b1e4470..60f4af7013 100644
--- a/tools/eslint/lib/rules/dot-location.js
+++ b/tools/eslint/lib/rules/dot-location.js
@@ -23,7 +23,9 @@ module.exports = {
{
enum: ["object", "property"]
}
- ]
+ ],
+
+ fixable: "code"
},
create(context) {
@@ -44,14 +46,28 @@ module.exports = {
*/
function checkDotLocation(obj, prop, node) {
const dot = sourceCode.getTokenBefore(prop);
+ const textBeforeDot = sourceCode.getText().slice(obj.range[1], dot.range[0]);
+ const textAfterDot = sourceCode.getText().slice(dot.range[1], prop.range[0]);
if (dot.type === "Punctuator" && dot.value === ".") {
if (onObject) {
if (!astUtils.isTokenOnSameLine(obj, dot)) {
- context.report(node, dot.loc.start, "Expected dot to be on same line as object.");
+ const neededTextAfterObj = astUtils.isDecimalInteger(obj) ? " " : "";
+
+ context.report({
+ node,
+ loc: dot.loc.start,
+ message: "Expected dot to be on same line as object.",
+ fix: fixer => fixer.replaceTextRange([obj.range[1], prop.range[0]], `${neededTextAfterObj}.${textBeforeDot}${textAfterDot}`)
+ });
}
} else if (!astUtils.isTokenOnSameLine(dot, prop)) {
- context.report(node, dot.loc.start, "Expected dot to be on same line as property.");
+ context.report({
+ node,
+ loc: dot.loc.start,
+ message: "Expected dot to be on same line as property.",
+ fix: fixer => fixer.replaceTextRange([obj.range[1], prop.range[0]], `${textBeforeDot}${textAfterDot}.`)
+ });
}
}
}
diff --git a/tools/eslint/lib/rules/eol-last.js b/tools/eslint/lib/rules/eol-last.js
index ef15635cb5..1f3676b0e9 100644
--- a/tools/eslint/lib/rules/eol-last.js
+++ b/tools/eslint/lib/rules/eol-last.js
@@ -1,30 +1,33 @@
/**
- * @fileoverview Require file to end with single newline.
+ * @fileoverview Require or disallow newline at the end of files
* @author Nodeca Team <https://github.com/nodeca>
*/
"use strict";
//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+
+//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
module.exports = {
meta: {
docs: {
- description: "enforce at least one newline at the end of files",
+ description: "require or disallow newline at the end of files",
category: "Stylistic Issues",
recommended: false
},
-
fixable: "whitespace",
-
schema: [
{
- enum: ["unix", "windows"]
+ enum: ["always", "never", "unix", "windows"]
}
]
},
-
create(context) {
//--------------------------------------------------------------------------
@@ -32,31 +35,60 @@ module.exports = {
//--------------------------------------------------------------------------
return {
-
Program: function checkBadEOF(node) {
-
const sourceCode = context.getSourceCode(),
src = sourceCode.getText(),
- location = {column: 1},
- linebreakStyle = context.options[0] || "unix",
- linebreak = linebreakStyle === "unix" ? "\n" : "\r\n";
+ location = {
+ column: lodash.last(sourceCode.lines).length,
+ line: sourceCode.lines.length
+ },
+ LF = "\n",
+ CRLF = `\r${LF}`,
+ endsWithNewline = lodash.endsWith(src, LF);
+
+ let mode = context.options[0] || "always",
+ appendCRLF = false;
+
+ if (mode === "unix") {
+
+ // `"unix"` should behave exactly as `"always"`
+ mode = "always";
+ }
+ if (mode === "windows") {
- if (src[src.length - 1] !== "\n") {
+ // `"windows"` should behave exactly as `"always"`, but append CRLF in the fixer for backwards compatibility
+ mode = "always";
+ appendCRLF = true;
+ }
+ if (mode === "always" && !endsWithNewline) {
- // file is not newline-terminated
- location.line = src.split(/\n/g).length;
+ // File is not newline-terminated, but should be
context.report({
node,
loc: location,
message: "Newline required at end of file but not found.",
fix(fixer) {
- return fixer.insertTextAfterRange([0, src.length], linebreak);
+ return fixer.insertTextAfterRange([0, src.length], appendCRLF ? CRLF : LF);
+ }
+ });
+ } else if (mode === "never" && endsWithNewline) {
+
+ // File is newline-terminated, but shouldn't be
+ context.report({
+ node,
+ loc: location,
+ message: "Newline not allowed at end of file.",
+ fix(fixer) {
+ const finalEOLs = /(?:\r?\n)+$/,
+ match = finalEOLs.exec(sourceCode.text),
+ start = match.index,
+ end = sourceCode.text.length;
+
+ return fixer.replaceTextRange([start, end], "");
}
});
}
}
-
};
-
}
};
diff --git a/tools/eslint/lib/rules/func-call-spacing.js b/tools/eslint/lib/rules/func-call-spacing.js
index 36699ee52a..417f2bdf31 100644
--- a/tools/eslint/lib/rules/func-call-spacing.js
+++ b/tools/eslint/lib/rules/func-call-spacing.js
@@ -12,7 +12,7 @@
module.exports = {
meta: {
docs: {
- description: "require or disallow spacing between `function` identifiers and their invocations",
+ description: "require or disallow spacing between function identifiers and their invocations",
category: "Stylistic Issues",
recommended: false
},
diff --git a/tools/eslint/lib/rules/func-name-matching.js b/tools/eslint/lib/rules/func-name-matching.js
new file mode 100644
index 0000000000..d4d760cbe4
--- /dev/null
+++ b/tools/eslint/lib/rules/func-name-matching.js
@@ -0,0 +1,149 @@
+/**
+ * @fileoverview Rule to require function names to match the name of the variable or property to which they are assigned.
+ * @author Annie Zhang, Pavel Strashkin
+ */
+
+"use strict";
+
+//--------------------------------------------------------------------------
+// Requirements
+//--------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+const esutils = require("esutils");
+
+//--------------------------------------------------------------------------
+// Helpers
+//--------------------------------------------------------------------------
+
+/**
+ * Determines if a pattern is `module.exports` or `module["exports"]`
+ * @param {ASTNode} pattern The left side of the AssignmentExpression
+ * @returns {boolean} True if the pattern is `module.exports` or `module["exports"]`
+ */
+function isModuleExports(pattern) {
+ if (pattern.type === "MemberExpression" && pattern.object.type === "Identifier" && pattern.object.name === "module") {
+
+ // module.exports
+ if (pattern.property.type === "Identifier" && pattern.property.name === "exports") {
+ return true;
+ }
+
+ // module["exports"]
+ if (pattern.property.type === "Literal" && pattern.property.value === "exports") {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Determines if a string name is a valid identifier
+ * @param {string} name The string to be checked
+ * @param {int} ecmaVersion The ECMAScript version if specified in the parserOptions config
+ * @returns {boolean} True if the string is a valid identifier
+ */
+function isIdentifier(name, ecmaVersion) {
+ if (ecmaVersion >= 6) {
+ return esutils.keyword.isIdentifierES6(name);
+ }
+ return esutils.keyword.isIdentifierES5(name);
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+ meta: {
+ docs: {
+ description: "require function names to match the name of the variable or property to which they are assigned",
+ category: "Stylistic Issues",
+ recommended: false
+ },
+
+ schema: [
+ {
+ type: "object",
+ properties: {
+ includeCommonJSModuleExports: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
+ }
+ ]
+ },
+
+ create(context) {
+
+ const includeModuleExports = context.options[0] && context.options[0].includeCommonJSModuleExports;
+ const ecmaVersion = context.parserOptions && context.parserOptions.ecmaVersion ? context.parserOptions.ecmaVersion : 5;
+
+ /**
+ * Reports
+ * @param {ASTNode} node The node to report
+ * @param {string} name The variable or property name
+ * @param {string} funcName The function name
+ * @param {boolean} isProp True if the reported node is a property assignment
+ * @returns {void}
+ */
+ function report(node, name, funcName, isProp) {
+ context.report({
+ node,
+ message: isProp ? "Function name `{{funcName}}` should match property name `{{name}}`"
+ : "Function name `{{funcName}}` should match variable name `{{name}}`",
+ data: {
+ name,
+ funcName
+ }
+ });
+ }
+
+ //--------------------------------------------------------------------------
+ // Public
+ //--------------------------------------------------------------------------
+
+ return {
+
+ VariableDeclarator(node) {
+ if (!node.init || node.init.type !== "FunctionExpression") {
+ return;
+ }
+ if (node.init.id && node.id.name !== node.init.id.name) {
+ report(node, node.id.name, node.init.id.name, false);
+ }
+ },
+
+ AssignmentExpression(node) {
+ if (node.right.type !== "FunctionExpression" ||
+ (node.left.computed && node.left.property.type !== "Literal") ||
+ (!includeModuleExports && isModuleExports(node.left))
+ ) {
+ return;
+ }
+
+ const isProp = node.left.type === "MemberExpression" ? true : false;
+ const name = isProp ? astUtils.getStaticPropertyName(node.left) : node.left.name;
+
+ if (node.right.id && isIdentifier(name) && name !== node.right.id.name) {
+ report(node, name, node.right.id.name, isProp);
+ }
+ },
+
+ Property(node) {
+ if (node.value.type !== "FunctionExpression" || !node.value.id || node.computed && node.key.type !== "Literal") {
+ return;
+ }
+ if (node.key.type === "Identifier" && node.key.name !== node.value.id.name) {
+ report(node, node.key.name, node.value.id.name, true);
+ } else if (node.key.type === "Literal" &&
+ isIdentifier(node.key.value, ecmaVersion) &&
+ node.key.value !== node.value.id.name
+ ) {
+ report(node, node.key.value, node.value.id.name, true);
+ }
+ }
+ };
+ }
+};
diff --git a/tools/eslint/lib/rules/id-length.js b/tools/eslint/lib/rules/id-length.js
index d3a942cd04..1747552707 100644
--- a/tools/eslint/lib/rules/id-length.js
+++ b/tools/eslint/lib/rules/id-length.js
@@ -61,7 +61,9 @@ module.exports = {
return !parent.computed && (
// regular property assignment
- (parent.parent.left === parent || // or the last identifier in an ObjectPattern destructuring
+ (parent.parent.left === parent && parent.parent.type === "AssignmentExpression" ||
+
+ // or the last identifier in an ObjectPattern destructuring
parent.parent.type === "Property" && parent.parent.value === parent &&
parent.parent.parent.type === "ObjectPattern" && parent.parent.parent.parent.left === parent.parent.parent)
);
diff --git a/tools/eslint/lib/rules/indent.js b/tools/eslint/lib/rules/indent.js
index f723fbfca7..2b069011f9 100644
--- a/tools/eslint/lib/rules/indent.js
+++ b/tools/eslint/lib/rules/indent.js
@@ -121,8 +121,6 @@ module.exports = {
},
create(context) {
-
- const MESSAGE = "Expected indentation of {{needed}} {{type}} {{characters}} but found {{gotten}}.";
const DEFAULT_VARIABLE_INDENT = 1;
const DEFAULT_PARAMETER_INDENT = null; // For backwards compatibility, don't check parameter indentation unless specified in the config
const DEFAULT_FUNCTION_BODY_INDENT = 1;
@@ -192,92 +190,67 @@ module.exports = {
}
}
- const indentPattern = {
- normal: indentType === "space" ? /^ +/ : /^\t+/,
- excludeCommas: indentType === "space" ? /^[ ,]+/ : /^[\t,]+/
- };
-
const caseIndentStore = {};
/**
- * Reports a given indent violation and properly pluralizes the message
+ * Creates an error message for a line, given the expected/actual indentation.
+ * @param {int} expectedAmount The expected amount of indentation characters for this line
+ * @param {int} actualSpaces The actual number of indentation spaces that were found on this line
+ * @param {int} actualTabs The actual number of indentation tabs that were found on this line
+ * @returns {string} An error message for this line
+ */
+ function createErrorMessage(expectedAmount, actualSpaces, actualTabs) {
+ const expectedStatement = `${expectedAmount} ${indentType}${expectedAmount === 1 ? "" : "s"}`; // e.g. "2 tabs"
+ const foundSpacesWord = `space${actualSpaces === 1 ? "" : "s"}`; // e.g. "space"
+ const foundTabsWord = `tab${actualTabs === 1 ? "" : "s"}`; // e.g. "tabs"
+ let foundStatement;
+
+ if (actualSpaces > 0 && actualTabs > 0) {
+ foundStatement = `${actualSpaces} ${foundSpacesWord} and ${actualTabs} ${foundTabsWord}`; // e.g. "1 space and 2 tabs"
+ } else if (actualSpaces > 0) {
+
+ // Abbreviate the message if the expected indentation is also spaces.
+ // e.g. 'Expected 4 spaces but found 2' rather than 'Expected 4 spaces but found 2 spaces'
+ foundStatement = indentType === "space" ? actualSpaces : `${actualSpaces} ${foundSpacesWord}`;
+ } else if (actualTabs > 0) {
+ foundStatement = indentType === "tab" ? actualTabs : `${actualTabs} ${foundTabsWord}`;
+ } else {
+ foundStatement = "0";
+ }
+
+ return `Expected indentation of ${expectedStatement} but found ${foundStatement}.`;
+ }
+
+ /**
+ * Reports a given indent violation
* @param {ASTNode} node Node violating the indent rule
* @param {int} needed Expected indentation character count
- * @param {int} gotten Indentation character count in the actual node/code
+ * @param {int} gottenSpaces Indentation space count in the actual node/code
+ * @param {int} gottenTabs Indentation tab count in the actual node/code
* @param {Object=} loc Error line and column location
* @param {boolean} isLastNodeCheck Is the error for last node check
* @returns {void}
*/
- function report(node, needed, gotten, loc, isLastNodeCheck) {
- const msgContext = {
- needed,
- type: indentType,
- characters: needed === 1 ? "character" : "characters",
- gotten
- };
- const indentChar = indentType === "space" ? " " : "\t";
-
- /**
- * Responsible for fixing the indentation issue fix
- * @returns {Function} function to be executed by the fixer
- * @private
- */
- function getFixerFunction() {
- let rangeToFix = [];
+ function report(node, needed, gottenSpaces, gottenTabs, loc, isLastNodeCheck) {
- if (needed > gotten) {
- const spaces = indentChar.repeat(needed - gotten);
+ if (gottenSpaces && gottenTabs) {
- if (isLastNodeCheck === true) {
- rangeToFix = [
- node.range[1] - 1,
- node.range[1] - 1
- ];
- } else {
- rangeToFix = [
- node.range[0],
- node.range[0]
- ];
- }
+ // To avoid conflicts with `no-mixed-spaces-and-tabs`, don't report lines that have both spaces and tabs.
+ return;
+ }
- return function(fixer) {
- return fixer.insertTextBeforeRange(rangeToFix, spaces);
- };
- } else {
- if (isLastNodeCheck === true) {
- rangeToFix = [
- node.range[1] - (gotten - needed) - 1,
- node.range[1] - 1
- ];
- } else {
- rangeToFix = [
- node.range[0] - (gotten - needed),
- node.range[0]
- ];
- }
+ const desiredIndent = (indentType === "space" ? " " : "\t").repeat(needed);
- return function(fixer) {
- return fixer.removeRange(rangeToFix);
- };
- }
- }
+ const textRange = isLastNodeCheck
+ ? [node.range[1] - gottenSpaces - gottenTabs - 1, node.range[1] - 1]
+ : [node.range[0] - gottenSpaces - gottenTabs, node.range[0]];
- if (loc) {
- context.report({
- node,
- loc,
- message: MESSAGE,
- data: msgContext,
- fix: getFixerFunction()
- });
- } else {
- context.report({
- node,
- message: MESSAGE,
- data: msgContext,
- fix: getFixerFunction()
- });
- }
+ context.report({
+ node,
+ loc,
+ message: createErrorMessage(needed, gottenSpaces, gottenTabs),
+ fix: fixer => fixer.replaceTextRange(textRange, desiredIndent)
+ });
}
/**
@@ -285,15 +258,23 @@ module.exports = {
* @param {ASTNode|Token} node Node to examine
* @param {boolean} [byLastLine=false] get indent of node's last line
* @param {boolean} [excludeCommas=false] skip comma on start of line
- * @returns {int} Indent
+ * @returns {Object} The node's indent. Contains keys `space` and `tab`, representing the indent of each character. Also
+ contains keys `goodChar` and `badChar`, where `goodChar` is the amount of the user's desired indentation character, and
+ `badChar` is the amount of the other indentation character.
*/
- function getNodeIndent(node, byLastLine, excludeCommas) {
+ function getNodeIndent(node, byLastLine) {
const token = byLastLine ? sourceCode.getLastToken(node) : sourceCode.getFirstToken(node);
- const src = sourceCode.getText(token, token.loc.start.column);
- const regExp = excludeCommas ? indentPattern.excludeCommas : indentPattern.normal;
- const indent = regExp.exec(src);
-
- return indent ? indent[0].length : 0;
+ const srcCharsBeforeNode = sourceCode.getText(token, token.loc.start.column).split("");
+ const indentChars = srcCharsBeforeNode.slice(0, srcCharsBeforeNode.findIndex(char => char !== " " && char !== "\t"));
+ const spaces = indentChars.filter(char => char === " ").length;
+ const tabs = indentChars.filter(char => char === "\t").length;
+
+ return {
+ space: spaces,
+ tab: tabs,
+ goodChar: indentType === "space" ? spaces : tabs,
+ badChar: indentType === "space" ? tabs : spaces
+ };
}
/**
@@ -313,27 +294,29 @@ module.exports = {
/**
* Check indent for node
* @param {ASTNode} node Node to check
- * @param {int} indent needed indent
+ * @param {int} neededIndent needed indent
* @param {boolean} [excludeCommas=false] skip comma on start of line
* @returns {void}
*/
- function checkNodeIndent(node, indent, excludeCommas) {
- const nodeIndent = getNodeIndent(node, false, excludeCommas);
+ function checkNodeIndent(node, neededIndent) {
+ const actualIndent = getNodeIndent(node, false);
if (
- node.type !== "ArrayExpression" && node.type !== "ObjectExpression" &&
- nodeIndent !== indent && isNodeFirstInLine(node)
+ node.type !== "ArrayExpression" &&
+ node.type !== "ObjectExpression" &&
+ (actualIndent.goodChar !== neededIndent || actualIndent.badChar !== 0) &&
+ isNodeFirstInLine(node)
) {
- report(node, indent, nodeIndent);
+ report(node, neededIndent, actualIndent.space, actualIndent.tab);
}
if (node.type === "IfStatement" && node.alternate) {
const elseToken = sourceCode.getTokenBefore(node.alternate);
- checkNodeIndent(elseToken, indent, excludeCommas);
+ checkNodeIndent(elseToken, neededIndent);
if (!isNodeFirstInLine(node.alternate)) {
- checkNodeIndent(node.alternate, indent, excludeCommas);
+ checkNodeIndent(node.alternate, neededIndent);
}
}
}
@@ -345,8 +328,8 @@ module.exports = {
* @param {boolean} [excludeCommas=false] skip comma on start of line
* @returns {void}
*/
- function checkNodesIndent(nodes, indent, excludeCommas) {
- nodes.forEach(node => checkNodeIndent(node, indent, excludeCommas));
+ function checkNodesIndent(nodes, indent) {
+ nodes.forEach(node => checkNodeIndent(node, indent));
}
/**
@@ -359,11 +342,12 @@ module.exports = {
const lastToken = sourceCode.getLastToken(node);
const endIndent = getNodeIndent(lastToken, true);
- if (endIndent !== lastLineIndent && isNodeFirstInLine(node, true)) {
+ if ((endIndent.goodChar !== lastLineIndent || endIndent.badChar !== 0) && isNodeFirstInLine(node, true)) {
report(
node,
lastLineIndent,
- endIndent,
+ endIndent.space,
+ endIndent.tab,
{ line: lastToken.loc.start.line, column: lastToken.loc.start.column },
true
);
@@ -379,11 +363,12 @@ module.exports = {
function checkFirstNodeLineIndent(node, firstLineIndent) {
const startIndent = getNodeIndent(node, false);
- if (startIndent !== firstLineIndent && isNodeFirstInLine(node)) {
+ if ((startIndent.goodChar !== firstLineIndent || startIndent.badChar !== 0) && isNodeFirstInLine(node)) {
report(
node,
firstLineIndent,
- startIndent,
+ startIndent.space,
+ startIndent.tab,
{ line: node.loc.start.line, column: node.loc.start.column }
);
}
@@ -526,11 +511,11 @@ module.exports = {
calleeNode.parent.type === "ArrayExpression")) {
// If function is part of array or object, comma can be put at left
- indent = getNodeIndent(calleeNode, false, false);
+ indent = getNodeIndent(calleeNode, false, false).goodChar;
} else {
// If function is standalone, simple calculate indent
- indent = getNodeIndent(calleeNode);
+ indent = getNodeIndent(calleeNode).goodChar;
}
if (calleeNode.parent.type === "CallExpression") {
@@ -538,13 +523,13 @@ module.exports = {
if (calleeNode.type !== "FunctionExpression" && calleeNode.type !== "ArrowFunctionExpression") {
if (calleeParent && calleeParent.loc.start.line < node.loc.start.line) {
- indent = getNodeIndent(calleeParent);
+ indent = getNodeIndent(calleeParent).goodChar;
}
} else {
if (isArgBeforeCalleeNodeMultiline(calleeNode) &&
calleeParent.callee.loc.start.line === calleeParent.callee.loc.end.line &&
!isNodeFirstInLine(calleeNode)) {
- indent = getNodeIndent(calleeParent);
+ indent = getNodeIndent(calleeParent).goodChar;
}
}
}
@@ -644,7 +629,7 @@ module.exports = {
effectiveParent = parent.parent;
}
}
- nodeIndent = getNodeIndent(effectiveParent);
+ nodeIndent = getNodeIndent(effectiveParent).goodChar;
if (parentVarNode && parentVarNode.loc.start.line !== node.loc.start.line) {
if (parent.type !== "VariableDeclarator" || parentVarNode === parentVarNode.parent.declarations[0]) {
if (parent.type === "VariableDeclarator" && parentVarNode.loc.start.line === effectiveParent.loc.start.line) {
@@ -654,7 +639,8 @@ module.exports = {
parent.type === "ArrayExpression" ||
parent.type === "CallExpression" ||
parent.type === "ArrowFunctionExpression" ||
- parent.type === "NewExpression"
+ parent.type === "NewExpression" ||
+ parent.type === "LogicalExpression"
) {
nodeIndent = nodeIndent + indentSize;
}
@@ -667,7 +653,7 @@ module.exports = {
checkFirstNodeLineIndent(node, nodeIndent);
} else {
- nodeIndent = getNodeIndent(node);
+ nodeIndent = getNodeIndent(node).goodChar;
elementsIndent = nodeIndent + indentSize;
}
@@ -679,8 +665,7 @@ module.exports = {
elementsIndent += indentSize * options.VariableDeclarator[parentVarNode.parent.kind];
}
- // Comma can be placed before property name
- checkNodesIndent(elements, elementsIndent, true);
+ checkNodesIndent(elements, elementsIndent);
if (elements.length > 0) {
@@ -736,9 +721,9 @@ module.exports = {
];
if (node.parent && statementsWithProperties.indexOf(node.parent.type) !== -1 && isNodeBodyBlock(node)) {
- indent = getNodeIndent(node.parent);
+ indent = getNodeIndent(node.parent).goodChar;
} else {
- indent = getNodeIndent(node);
+ indent = getNodeIndent(node).goodChar;
}
if (node.type === "IfStatement" && node.consequent.type !== "BlockStatement") {
@@ -784,13 +769,12 @@ module.exports = {
*/
function checkIndentInVariableDeclarations(node) {
const elements = filterOutSameLineVars(node);
- const nodeIndent = getNodeIndent(node);
+ const nodeIndent = getNodeIndent(node).goodChar;
const lastElement = elements[elements.length - 1];
const elementsIndent = nodeIndent + indentSize * options.VariableDeclarator[node.kind];
- // Comma can be placed before declaration
- checkNodesIndent(elements, elementsIndent, true);
+ checkNodesIndent(elements, elementsIndent);
// Only check the last line if there is any token after the last item
if (sourceCode.getLastToken(node).loc.end.line <= lastElement.loc.end.line) {
@@ -802,7 +786,7 @@ module.exports = {
if (tokenBeforeLastElement.value === ",") {
// Special case for comma-first syntax where the semicolon is indented
- checkLastNodeLineIndent(node, getNodeIndent(tokenBeforeLastElement));
+ checkLastNodeLineIndent(node, getNodeIndent(tokenBeforeLastElement).goodChar);
} else {
checkLastNodeLineIndent(node, elementsIndent - indentSize);
}
@@ -834,7 +818,7 @@ module.exports = {
return caseIndentStore[switchNode.loc.start.line];
} else {
if (typeof switchIndent === "undefined") {
- switchIndent = getNodeIndent(switchNode);
+ switchIndent = getNodeIndent(switchNode).goodChar;
}
if (switchNode.cases.length > 0 && options.SwitchCase === 0) {
@@ -853,7 +837,7 @@ module.exports = {
if (node.body.length > 0) {
// Root nodes should have no indent
- checkNodesIndent(node.body, getNodeIndent(node));
+ checkNodesIndent(node.body, getNodeIndent(node).goodChar);
}
},
@@ -912,7 +896,7 @@ module.exports = {
return;
}
- const propertyIndent = getNodeIndent(node) + indentSize * options.MemberExpression;
+ const propertyIndent = getNodeIndent(node).goodChar + indentSize * options.MemberExpression;
const checkNodes = [node.property];
@@ -928,7 +912,7 @@ module.exports = {
SwitchStatement(node) {
// Switch is not a 'BlockStatement'
- const switchIndent = getNodeIndent(node);
+ const switchIndent = getNodeIndent(node).goodChar;
const caseIndent = expectedCaseIndent(node, switchIndent);
checkNodesIndent(node.cases, caseIndent);
@@ -955,7 +939,7 @@ module.exports = {
if (options.FunctionDeclaration.parameters === "first" && node.params.length) {
checkNodesIndent(node.params.slice(1), node.params[0].loc.start.column);
} else if (options.FunctionDeclaration.parameters !== null) {
- checkNodesIndent(node.params, indentSize * options.FunctionDeclaration.parameters);
+ checkNodesIndent(node.params, getNodeIndent(node).goodChar + indentSize * options.FunctionDeclaration.parameters);
}
},
@@ -966,7 +950,7 @@ module.exports = {
if (options.FunctionExpression.parameters === "first" && node.params.length) {
checkNodesIndent(node.params.slice(1), node.params[0].loc.start.column);
} else if (options.FunctionExpression.parameters !== null) {
- checkNodesIndent(node.params, indentSize * options.FunctionExpression.parameters);
+ checkNodesIndent(node.params, getNodeIndent(node).goodChar + indentSize * options.FunctionExpression.parameters);
}
}
};
diff --git a/tools/eslint/lib/rules/init-declarations.js b/tools/eslint/lib/rules/init-declarations.js
index c6f63840b5..1f53f3dfc4 100644
--- a/tools/eslint/lib/rules/init-declarations.js
+++ b/tools/eslint/lib/rules/init-declarations.js
@@ -45,7 +45,7 @@ function isInitialized(node) {
module.exports = {
meta: {
docs: {
- description: "require or disallow initialization in `var` declarations",
+ description: "require or disallow initialization in variable declarations",
category: "Variables",
recommended: false
},
diff --git a/tools/eslint/lib/rules/keyword-spacing.js b/tools/eslint/lib/rules/keyword-spacing.js
index 8e4b774b72..4a6a024552 100644
--- a/tools/eslint/lib/rules/keyword-spacing.js
+++ b/tools/eslint/lib/rules/keyword-spacing.js
@@ -23,7 +23,7 @@ const NEXT_TOKEN_M = /^[\{*]$/;
const TEMPLATE_OPEN_PAREN = /\$\{$/;
const TEMPLATE_CLOSE_PAREN = /^\}/;
const CHECK_TYPE = /^(?:JSXElement|RegularExpression|String|Template)$/;
-const KEYS = keywords.concat(["as", "await", "from", "get", "let", "of", "set", "yield"]);
+const KEYS = keywords.concat(["as", "async", "await", "from", "get", "let", "of", "set", "yield"]);
// check duplications.
(function() {
@@ -353,6 +353,23 @@ module.exports = {
}
/**
+ * Reports `async` or `function` keywords of a given node if usage of
+ * spacing around those keywords is invalid.
+ *
+ * @param {ASTNode} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingForFunction(node) {
+ const firstToken = node && sourceCode.getFirstToken(node);
+
+ if (firstToken &&
+ (firstToken.type === "Keyword" || firstToken.value === "async")
+ ) {
+ checkSpacingBefore(firstToken);
+ }
+ }
+
+ /**
* Reports `class` and `extends` keywords of a given node if usage of
* spacing around those keywords is invalid.
*
@@ -482,7 +499,13 @@ module.exports = {
if (node.static) {
checkSpacingAroundFirstToken(node);
}
- if (node.kind === "get" || node.kind === "set") {
+ if (node.kind === "get" ||
+ node.kind === "set" ||
+ (
+ (node.method || node.type === "MethodDefinition") &&
+ node.value.async
+ )
+ ) {
const token = sourceCode.getFirstToken(
node,
node.static ? 1 : 0
@@ -492,6 +515,17 @@ module.exports = {
}
}
+ /**
+ * Reports `await` keyword of a given node if usage of spacing before
+ * this keyword is invalid.
+ *
+ * @param {ASTNode} node - A node to report.
+ * @returns {void}
+ */
+ function checkSpacingForAwaitExpression(node) {
+ checkSpacingBefore(sourceCode.getFirstToken(node));
+ }
+
return {
// Statements
@@ -522,13 +556,15 @@ module.exports = {
ExportNamedDeclaration: checkSpacingForModuleDeclaration,
ExportDefaultDeclaration: checkSpacingAroundFirstToken,
ExportAllDeclaration: checkSpacingForModuleDeclaration,
- FunctionDeclaration: checkSpacingBeforeFirstToken,
+ FunctionDeclaration: checkSpacingForFunction,
ImportDeclaration: checkSpacingForModuleDeclaration,
VariableDeclaration: checkSpacingAroundFirstToken,
// Expressions
+ ArrowFunctionExpression: checkSpacingForFunction,
+ AwaitExpression: checkSpacingForAwaitExpression,
ClassExpression: checkSpacingForClass,
- FunctionExpression: checkSpacingBeforeFirstToken,
+ FunctionExpression: checkSpacingForFunction,
NewExpression: checkSpacingBeforeFirstToken,
Super: checkSpacingBeforeFirstToken,
ThisExpression: checkSpacingBeforeFirstToken,
diff --git a/tools/eslint/lib/rules/line-comment-position.js b/tools/eslint/lib/rules/line-comment-position.js
index cd4c9a9fd8..fa2384e88a 100644
--- a/tools/eslint/lib/rules/line-comment-position.js
+++ b/tools/eslint/lib/rules/line-comment-position.js
@@ -50,7 +50,7 @@ module.exports = {
ignorePattern,
applyDefaultPatterns = true;
- if (!options || typeof option === "string") {
+ if (!options || typeof options === "string") {
above = !options || options === "above";
} else {
diff --git a/tools/eslint/lib/rules/lines-around-directive.js b/tools/eslint/lib/rules/lines-around-directive.js
index 15a7779d7c..f0f0ebd0b9 100644
--- a/tools/eslint/lib/rules/lines-around-directive.js
+++ b/tools/eslint/lib/rules/lines-around-directive.js
@@ -37,7 +37,8 @@ module.exports = {
minProperties: 2
}
]
- }]
+ }],
+ fixable: "whitespace"
},
create(context) {
@@ -88,6 +89,12 @@ module.exports = {
expected: expected ? "Expected" : "Unexpected",
value: node.expression.value,
location
+ },
+ fix(fixer) {
+ if (expected) {
+ return location === "before" ? fixer.insertTextBefore(node, "\n") : fixer.insertTextAfter(node, "\n");
+ }
+ return fixer.removeRange(location === "before" ? [node.range[0] - 1, node.range[0]] : [node.range[1], node.range[1] + 1]);
}
});
}
diff --git a/tools/eslint/lib/rules/max-len.js b/tools/eslint/lib/rules/max-len.js
index 8ef12b4cd8..d1f6df2996 100644
--- a/tools/eslint/lib/rules/max-len.js
+++ b/tools/eslint/lib/rules/max-len.js
@@ -107,7 +107,7 @@ module.exports = {
extraCharacterCount += spaceCount - 1; // -1 for the replaced tab
});
- return line.length + extraCharacterCount;
+ return Array.from(line).length + extraCharacterCount;
}
// The options object must be the last option specified…
@@ -235,8 +235,9 @@ module.exports = {
* @private
*/
function groupByLineNumber(acc, node) {
- ensureArrayAndPush(acc, node.loc.start.line, node);
- ensureArrayAndPush(acc, node.loc.end.line, node);
+ for (let i = node.loc.start.line; i <= node.loc.end.line; ++i) {
+ ensureArrayAndPush(acc, i, node);
+ }
return acc;
}
diff --git a/tools/eslint/lib/rules/max-params.js b/tools/eslint/lib/rules/max-params.js
index 165362556c..fc84efcd40 100644
--- a/tools/eslint/lib/rules/max-params.js
+++ b/tools/eslint/lib/rules/max-params.js
@@ -12,7 +12,7 @@
module.exports = {
meta: {
docs: {
- description: "enforce a maximum number of parameters in `function` definitions",
+ description: "enforce a maximum number of parameters in function definitions",
category: "Stylistic Issues",
recommended: false
},
diff --git a/tools/eslint/lib/rules/max-statements-per-line.js b/tools/eslint/lib/rules/max-statements-per-line.js
index 1ee83fe0e7..888ec37eda 100644
--- a/tools/eslint/lib/rules/max-statements-per-line.js
+++ b/tools/eslint/lib/rules/max-statements-per-line.js
@@ -22,7 +22,7 @@ module.exports = {
properties: {
max: {
type: "integer",
- minimum: 0
+ minimum: 1
}
},
additionalProperties: false
@@ -185,23 +185,7 @@ module.exports = {
"ExportNamedDeclaration:exit": leaveStatement,
"ExportDefaultDeclaration:exit": leaveStatement,
"ExportAllDeclaration:exit": leaveStatement,
- "Program:exit": reportFirstExtraStatementAndClear,
-
- // For backward compatibility.
- // Empty blocks should be warned if `{max: 0}` was given.
- BlockStatement: function reportIfZero(node) {
- if (maxStatementsPerLine === 0 && node.body.length === 0) {
- context.report({
- node,
- message,
- data: {
- numberOfStatementsOnThisLine: 0,
- maxStatementsPerLine,
- statements: "statements",
- }
- });
- }
- }
+ "Program:exit": reportFirstExtraStatementAndClear
};
}
};
diff --git a/tools/eslint/lib/rules/max-statements.js b/tools/eslint/lib/rules/max-statements.js
index b2dc2b4d73..1232930c6e 100644
--- a/tools/eslint/lib/rules/max-statements.js
+++ b/tools/eslint/lib/rules/max-statements.js
@@ -12,7 +12,7 @@
module.exports = {
meta: {
docs: {
- description: "enforce a maximum number of statements allowed in `function` blocks",
+ description: "enforce a maximum number of statements allowed in function blocks",
category: "Stylistic Issues",
recommended: false
},
diff --git a/tools/eslint/lib/rules/new-cap.js b/tools/eslint/lib/rules/new-cap.js
index 17a697e95e..6fcd582a69 100644
--- a/tools/eslint/lib/rules/new-cap.js
+++ b/tools/eslint/lib/rules/new-cap.js
@@ -75,7 +75,7 @@ function calculateCapIsNewExceptions(config) {
module.exports = {
meta: {
docs: {
- description: "require constructor `function` names to begin with a capital letter",
+ description: "require constructor names to begin with a capital letter",
category: "Stylistic Issues",
recommended: false
},
diff --git a/tools/eslint/lib/rules/newline-after-var.js b/tools/eslint/lib/rules/newline-after-var.js
index bf837258d9..440652b1c1 100644
--- a/tools/eslint/lib/rules/newline-after-var.js
+++ b/tools/eslint/lib/rules/newline-after-var.js
@@ -12,7 +12,7 @@
module.exports = {
meta: {
docs: {
- description: "require or disallow an empty line after `var` declarations",
+ description: "require or disallow an empty line after variable declarations",
category: "Stylistic Issues",
recommended: false
},
diff --git a/tools/eslint/lib/rules/no-extra-bind.js b/tools/eslint/lib/rules/no-extra-bind.js
index 544a12b9f0..c2795998c6 100644
--- a/tools/eslint/lib/rules/no-extra-bind.js
+++ b/tools/eslint/lib/rules/no-extra-bind.js
@@ -22,7 +22,9 @@ module.exports = {
recommended: false
},
- schema: []
+ schema: [],
+
+ fixable: "code"
},
create(context) {
@@ -39,7 +41,14 @@ module.exports = {
context.report({
node: node.parent.parent,
message: "The function binding is unnecessary.",
- loc: node.parent.property.loc.start
+ loc: node.parent.property.loc.start,
+ fix(fixer) {
+ const firstTokenToRemove = context.getSourceCode()
+ .getTokensBetween(node.parent.object, node.parent.property)
+ .find(token => token.value !== ")");
+
+ return fixer.removeRange([firstTokenToRemove.range[0], node.parent.parent.range[1]]);
+ }
});
}
diff --git a/tools/eslint/lib/rules/no-extra-parens.js b/tools/eslint/lib/rules/no-extra-parens.js
index 1d355cf0a3..efa3d53bbd 100644
--- a/tools/eslint/lib/rules/no-extra-parens.js
+++ b/tools/eslint/lib/rules/no-extra-parens.js
@@ -367,15 +367,15 @@ module.exports = {
* @private
*/
function dryBinaryLogical(node) {
- if (!NESTED_BINARY) {
- const prec = precedence(node);
+ const prec = precedence(node);
+ const shouldSkipLeft = NESTED_BINARY && (node.left.type === "BinaryExpression" || node.left.type === "LogicalExpression");
+ const shouldSkipRight = NESTED_BINARY && (node.right.type === "BinaryExpression" || node.right.type === "LogicalExpression");
- if (hasExcessParens(node.left) && precedence(node.left) >= prec) {
- report(node.left);
- }
- if (hasExcessParens(node.right) && precedence(node.right) > prec) {
- report(node.right);
- }
+ if (!shouldSkipLeft && hasExcessParens(node.left) && precedence(node.left) >= prec) {
+ report(node.left);
+ }
+ if (!shouldSkipRight && hasExcessParens(node.right) && precedence(node.right) > prec) {
+ report(node.right);
}
}
@@ -587,6 +587,7 @@ module.exports = {
UnaryExpression: dryUnaryUpdate,
UpdateExpression: dryUnaryUpdate,
+ AwaitExpression: dryUnaryUpdate,
VariableDeclarator(node) {
if (node.init && hasExcessParens(node.init) &&
diff --git a/tools/eslint/lib/rules/no-implicit-coercion.js b/tools/eslint/lib/rules/no-implicit-coercion.js
index 3e665a2258..8e8db9879b 100644
--- a/tools/eslint/lib/rules/no-implicit-coercion.js
+++ b/tools/eslint/lib/rules/no-implicit-coercion.js
@@ -108,23 +108,13 @@ function getNonNumericOperand(node) {
}
/**
- * Checks whether a node is a string literal or not.
- * @param {ASTNode} node The node to check.
- * @returns {boolean} Whether or not the passed in node is a
- * string literal or not.
- */
-function isStringLiteral(node) {
- return astUtils.isStringLiteral(node) && node.type !== "TemplateLiteral";
-}
-
-/**
* Checks whether a node is an empty string literal or not.
* @param {ASTNode} node The node to check.
* @returns {boolean} Whether or not the passed in node is an
* empty string literal or not.
*/
function isEmptyString(node) {
- return isStringLiteral(node) && node.value === "";
+ return astUtils.isStringLiteral(node) && (node.value === "" || (node.type === "TemplateLiteral" && node.quasis.length === 1 && node.quasis[0].value.cooked === ""));
}
/**
@@ -134,8 +124,8 @@ function isEmptyString(node) {
*/
function isConcatWithEmptyString(node) {
return node.operator === "+" && (
- (isEmptyString(node.left) && !isStringLiteral(node.right)) ||
- (isEmptyString(node.right) && !isStringLiteral(node.left))
+ (isEmptyString(node.left) && !astUtils.isStringLiteral(node.right)) ||
+ (isEmptyString(node.right) && !astUtils.isStringLiteral(node.left))
);
}
@@ -202,19 +192,24 @@ module.exports = {
* Reports an error and autofixes the node
* @param {ASTNode} node - An ast node to report the error on.
* @param {string} recommendation - The recommended code for the issue
+ * @param {bool} shouldFix - Whether this report should fix the node
* @returns {void}
*/
- function report(node, recommendation) {
- context.report({
+ function report(node, recommendation, shouldFix) {
+ shouldFix = typeof shouldFix === "undefined" ? true : shouldFix;
+ const reportObj = {
node,
message: "use `{{recommendation}}` instead.",
data: {
recommendation
- },
- fix(fixer) {
- return fixer.replaceText(node, recommendation);
}
- });
+ };
+
+ if (shouldFix) {
+ reportObj.fix = fixer => fixer.replaceText(node, recommendation);
+ }
+
+ context.report(reportObj);
}
return {
@@ -234,7 +229,7 @@ module.exports = {
if (!operatorAllowed && options.boolean && isBinaryNegatingOfIndexOf(node)) {
const recommendation = `${sourceCode.getText(node.argument)} !== -1`;
- report(node, recommendation);
+ report(node, recommendation, false);
}
// +foo
diff --git a/tools/eslint/lib/rules/no-implicit-globals.js b/tools/eslint/lib/rules/no-implicit-globals.js
index ba01bd12c3..fd49f0c5ac 100644
--- a/tools/eslint/lib/rules/no-implicit-globals.js
+++ b/tools/eslint/lib/rules/no-implicit-globals.js
@@ -12,7 +12,7 @@
module.exports = {
meta: {
docs: {
- description: "disallow `var` and named `function` declarations in the global scope",
+ description: "disallow variable and `function` declarations in the global scope",
category: "Best Practices",
recommended: false
},
diff --git a/tools/eslint/lib/rules/no-inner-declarations.js b/tools/eslint/lib/rules/no-inner-declarations.js
index b50ad53410..e5a186133c 100644
--- a/tools/eslint/lib/rules/no-inner-declarations.js
+++ b/tools/eslint/lib/rules/no-inner-declarations.js
@@ -12,7 +12,7 @@
module.exports = {
meta: {
docs: {
- description: "disallow `function` or `var` declarations in nested blocks",
+ description: "disallow variable or `function` declarations in nested blocks",
category: "Possible Errors",
recommended: true
},
diff --git a/tools/eslint/lib/rules/no-lonely-if.js b/tools/eslint/lib/rules/no-lonely-if.js
index 3a1f0b9daa..19517bc3dc 100644
--- a/tools/eslint/lib/rules/no-lonely-if.js
+++ b/tools/eslint/lib/rules/no-lonely-if.js
@@ -16,10 +16,13 @@ module.exports = {
recommended: false
},
- schema: []
+ schema: [],
+
+ fixable: "code"
},
create(context) {
+ const sourceCode = context.getSourceCode();
return {
IfStatement(node) {
@@ -31,7 +34,46 @@ module.exports = {
parent.body.length === 1 && grandparent &&
grandparent.type === "IfStatement" &&
parent === grandparent.alternate) {
- context.report(node, "Unexpected if as the only statement in an else block.");
+ context.report({
+ node,
+ message: "Unexpected if as the only statement in an else block.",
+ fix(fixer) {
+ const openingElseCurly = sourceCode.getFirstToken(parent);
+ const closingElseCurly = sourceCode.getLastToken(parent);
+ const elseKeyword = sourceCode.getTokenBefore(openingElseCurly);
+ const tokenAfterElseBlock = sourceCode.getTokenAfter(closingElseCurly);
+ const lastIfToken = sourceCode.getLastToken(node.consequent);
+ const sourceText = sourceCode.getText();
+
+ if (sourceText.slice(openingElseCurly.range[1], node.range[0]).trim() || sourceText.slice(node.range[1], closingElseCurly.range[0]).trim()) {
+
+ // Don't fix if there are any non-whitespace characters interfering (e.g. comments)
+ return null;
+ }
+
+ if (
+ node.consequent.type !== "BlockStatement" && lastIfToken.value !== ";" && tokenAfterElseBlock &&
+ (
+ node.consequent.loc.end.line === tokenAfterElseBlock.loc.start.line ||
+ /^[(\[\/+`-]/.test(tokenAfterElseBlock.value) ||
+ lastIfToken.value === "++" ||
+ lastIfToken.value === "--"
+ )
+ ) {
+
+ /*
+ * If the `if` statement has no block, and is not followed by a semicolon, make sure that fixing
+ * the issue would not change semantics due to ASI. If this would happen, don't do a fix.
+ */
+ return null;
+ }
+
+ return fixer.replaceTextRange(
+ [openingElseCurly.range[0], closingElseCurly.range[1]],
+ (elseKeyword.range[1] === openingElseCurly.range[0] ? " " : "") + sourceCode.getText(node)
+ );
+ }
+ });
}
}
};
diff --git a/tools/eslint/lib/rules/no-mixed-requires.js b/tools/eslint/lib/rules/no-mixed-requires.js
index d1199daef3..89ba345c24 100644
--- a/tools/eslint/lib/rules/no-mixed-requires.js
+++ b/tools/eslint/lib/rules/no-mixed-requires.js
@@ -12,7 +12,7 @@
module.exports = {
meta: {
docs: {
- description: "disallow `require` calls to be mixed with regular `var` declarations",
+ description: "disallow `require` calls to be mixed with regular variable declarations",
category: "Node.js and CommonJS",
recommended: false
},
diff --git a/tools/eslint/lib/rules/no-multiple-empty-lines.js b/tools/eslint/lib/rules/no-multiple-empty-lines.js
index 679c4f69c7..9d44064d23 100644
--- a/tools/eslint/lib/rules/no-multiple-empty-lines.js
+++ b/tools/eslint/lib/rules/no-multiple-empty-lines.js
@@ -46,11 +46,8 @@ module.exports = {
// Use options.max or 2 as default
let max = 2,
- maxEOF,
- maxBOF;
-
- // store lines that appear empty but really aren't
- const notEmpty = [];
+ maxEOF = max,
+ maxBOF = max;
if (context.options.length) {
max = context.options[0].max;
@@ -59,159 +56,64 @@ module.exports = {
}
const sourceCode = context.getSourceCode();
+ const fullLines = sourceCode.text.match(/.*(\r\n|\r|\n|\u2028|\u2029)/g) || [];
+ const lineStartLocations = fullLines.reduce((startIndices, nextLine) => startIndices.concat(startIndices[startIndices.length - 1] + nextLine.length), [0]);
+
+ // Swallow the final newline, as some editors add it automatically and we don't want it to cause an issue
+ const allLines = sourceCode.lines[sourceCode.lines.length - 1] === "" ? sourceCode.lines.slice(0, -1) : sourceCode.lines;
+ const templateLiteralLines = new Set();
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
return {
-
TemplateLiteral(node) {
- let start = node.loc.start.line;
- const end = node.loc.end.line;
+ node.quasis.forEach(literalPart => {
- while (start <= end) {
- notEmpty.push(start);
- start++;
- }
- },
-
- "Program:exit": function checkBlankLines(node) {
- const lines = sourceCode.lines,
- fullLines = sourceCode.text.match(/.*(\r\n|\r|\n|\u2028|\u2029)/g) || [],
- linesRangeStart = [];
- let firstNonBlankLine = -1,
- trimmedLines = [],
- blankCounter = 0,
- currentLocation,
- lastLocation,
- firstOfEndingBlankLines,
- diff,
- rangeStart,
- rangeEnd;
-
- /**
- * Fix code.
- * @param {RuleFixer} fixer - The fixer of this context.
- * @returns {Object} The fixing information.
- */
- function fix(fixer) {
- return fixer.removeRange([rangeStart, rangeEnd]);
- }
-
- linesRangeStart.push(0);
- lines.forEach(function(str, i) {
- const length = i < fullLines.length ? fullLines[i].length : 0,
- trimmed = str.trim();
-
- if ((firstNonBlankLine === -1) && (trimmed !== "")) {
- firstNonBlankLine = i;
+ // Empty lines have a semantic meaning if they're inside template literals. Don't count these as empty lines.
+ for (let ignoredLine = literalPart.loc.start.line; ignoredLine < literalPart.loc.end.line; ignoredLine++) {
+ templateLiteralLines.add(ignoredLine);
}
-
- linesRangeStart.push(linesRangeStart[linesRangeStart.length - 1] + length);
- trimmedLines.push(trimmed);
- });
-
- // add the notEmpty lines in there with a placeholder
- notEmpty.forEach(function(x, i) {
- trimmedLines[i] = x;
});
+ },
+ "Program:exit"(node) {
+ return allLines
- if (typeof maxEOF === "undefined") {
+ // Given a list of lines, first get a list of line numbers that are non-empty.
+ .reduce((nonEmptyLineNumbers, line, index) => nonEmptyLineNumbers.concat(line.trim() || templateLiteralLines.has(index + 1) ? [index + 1] : []), [])
- /*
- * Swallow the final newline, as some editors add it
- * automatically and we don't want it to cause an issue
- */
- if (trimmedLines[trimmedLines.length - 1] === "") {
- trimmedLines = trimmedLines.slice(0, -1);
- }
+ // Add a value at the end to allow trailing empty lines to be checked.
+ .concat(allLines.length + 1)
- firstOfEndingBlankLines = trimmedLines.length;
- } else {
+ // Given two line numbers of non-empty lines, report the lines between if the difference is too large.
+ .reduce((lastLineNumber, lineNumber) => {
+ let message, maxAllowed;
- // save the number of the first of the last blank lines
- firstOfEndingBlankLines = trimmedLines.length;
- while (trimmedLines[firstOfEndingBlankLines - 1] === ""
- && firstOfEndingBlankLines > 0) {
- firstOfEndingBlankLines--;
- }
- }
-
- // Aggregate and count blank lines
- if (firstNonBlankLine > maxBOF) {
- diff = firstNonBlankLine - maxBOF;
- rangeStart = linesRangeStart[firstNonBlankLine - diff];
- rangeEnd = linesRangeStart[firstNonBlankLine];
- context.report({
- node,
- loc: node.loc.start,
- message: "Too many blank lines at the beginning of file. Max of {{maxBOF}} allowed.",
- data: {
- maxBOF
- },
- fix
- });
- }
- currentLocation = firstNonBlankLine - 1;
-
- lastLocation = currentLocation;
- currentLocation = trimmedLines.indexOf("", currentLocation + 1);
- while (currentLocation !== -1) {
- lastLocation = currentLocation;
- currentLocation = trimmedLines.indexOf("", currentLocation + 1);
- if (lastLocation === currentLocation - 1) {
- blankCounter++;
- } else {
- const location = {
- line: lastLocation + 1,
- column: 0
- };
-
- if (lastLocation < firstOfEndingBlankLines) {
-
- // within the file, not at the end
- if (blankCounter >= max) {
- diff = blankCounter - max + 1;
- rangeStart = linesRangeStart[location.line - diff];
- rangeEnd = linesRangeStart[location.line];
-
- context.report({
- node,
- loc: location,
- message: "More than {{max}} blank {{lines}} not allowed.",
- data: {
- max,
- lines: (max === 1 ? "line" : "lines")
- },
- fix
- });
- }
+ if (lastLineNumber === 0) {
+ message = "Too many blank lines at the beginning of file. Max of {{max}} allowed.";
+ maxAllowed = maxBOF;
+ } else if (lineNumber === allLines.length + 1) {
+ message = "Too many blank lines at the end of file. Max of {{max}} allowed.";
+ maxAllowed = maxEOF;
} else {
+ message = "More than {{max}} blank {{pluralizedLines}} not allowed.";
+ maxAllowed = max;
+ }
- // inside the last blank lines
- if (blankCounter > maxEOF) {
- diff = blankCounter - maxEOF + 1;
- rangeStart = linesRangeStart[location.line - diff];
- rangeEnd = linesRangeStart[location.line - 1];
- context.report({
- node,
- loc: location,
- message: "Too many blank lines at the end of file. Max of {{maxEOF}} allowed.",
- data: {
- maxEOF
- },
- fix
- });
- }
+ if (lineNumber - lastLineNumber - 1 > maxAllowed) {
+ context.report({
+ node,
+ loc: {start: {line: lastLineNumber + 1, column: 0}, end: {line: lineNumber, column: 0}},
+ message,
+ data: {max: maxAllowed, pluralizedLines: maxAllowed === 1 ? "line" : "lines"},
+ fix: fixer => fixer.removeRange([lineStartLocations[lastLineNumber], lineStartLocations[lineNumber - maxAllowed - 1]])
+ });
}
- // Finally, reset the blank counter
- blankCounter = 0;
- }
- }
+ return lineNumber;
+ }, 0);
}
};
-
}
};
diff --git a/tools/eslint/lib/rules/no-redeclare.js b/tools/eslint/lib/rules/no-redeclare.js
index 28e560382b..fcd4943460 100644
--- a/tools/eslint/lib/rules/no-redeclare.js
+++ b/tools/eslint/lib/rules/no-redeclare.js
@@ -12,7 +12,7 @@
module.exports = {
meta: {
docs: {
- description: "disallow `var` redeclaration",
+ description: "disallow variable redeclaration",
category: "Best Practices",
recommended: true
},
diff --git a/tools/eslint/lib/rules/no-regex-spaces.js b/tools/eslint/lib/rules/no-regex-spaces.js
index 0baa7d8bba..c6e26ac398 100644
--- a/tools/eslint/lib/rules/no-regex-spaces.js
+++ b/tools/eslint/lib/rules/no-regex-spaces.js
@@ -5,6 +5,8 @@
"use strict";
+const astUtils = require("../ast-utils");
+
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
@@ -17,7 +19,9 @@ module.exports = {
recommended: true
},
- schema: []
+ schema: [],
+
+ fixable: "code"
},
create(context) {
@@ -27,19 +31,27 @@ module.exports = {
* Validate regular expressions
* @param {ASTNode} node node to validate
* @param {string} value regular expression to validate
+ * @param {number} valueStart The start location of the regex/string literal. It will always be the case that
+ `sourceCode.getText().slice(valueStart, valueStart + value.length) === value`
* @returns {void}
* @private
*/
- function checkRegex(node, value) {
+ function checkRegex(node, value, valueStart) {
const multipleSpacesRegex = /( {2,})+?/,
regexResults = multipleSpacesRegex.exec(value);
if (regexResults !== null) {
+ const count = regexResults[0].length;
+
context.report({
node,
message: "Spaces are hard to count. Use {{{count}}}.",
- data: {
- count: regexResults[0].length
+ data: {count},
+ fix(fixer) {
+ return fixer.replaceTextRange(
+ [valueStart + regexResults.index, valueStart + regexResults.index + count],
+ ` {${count}}`
+ );
}
});
@@ -62,7 +74,7 @@ module.exports = {
nodeValue = token.value;
if (nodeType === "RegularExpression") {
- checkRegex(node, nodeValue);
+ checkRegex(node, nodeValue, token.start);
}
}
@@ -83,8 +95,12 @@ module.exports = {
* @private
*/
function checkFunction(node) {
- if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(node.arguments[0])) {
- checkRegex(node, node.arguments[0].value);
+ const scope = context.getScope();
+ const regExpVar = astUtils.getVariableByName(scope, "RegExp");
+ const shadowed = regExpVar && regExpVar.defs.length > 0;
+
+ if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(node.arguments[0]) && !shadowed) {
+ checkRegex(node, node.arguments[0].value, node.arguments[0].start + 1);
}
}
diff --git a/tools/eslint/lib/rules/no-restricted-properties.js b/tools/eslint/lib/rules/no-restricted-properties.js
index c0d0a380ab..f8bd47ba4b 100644
--- a/tools/eslint/lib/rules/no-restricted-properties.js
+++ b/tools/eslint/lib/rules/no-restricted-properties.js
@@ -15,29 +15,46 @@ module.exports = {
meta: {
docs: {
description: "disallow certain properties on certain objects",
- category: "Node.js and CommonJS",
+ category: "Best Practices",
recommended: false
},
schema: {
type: "array",
items: {
- type: "object",
- properties: {
- object: {
- type: "string"
+ anyOf: [ // `object` and `property` are both optional, but at least one of them must be provided.
+ {
+ type: "object",
+ properties: {
+ object: {
+ type: "string"
+ },
+ property: {
+ type: "string"
+ },
+ message: {
+ type: "string"
+ }
+ },
+ additionalProperties: false,
+ required: ["object"]
},
- property: {
- type: "string"
- },
- message: {
- type: "string"
+ {
+ type: "object",
+ properties: {
+ object: {
+ type: "string"
+ },
+ property: {
+ type: "string"
+ },
+ message: {
+ type: "string"
+ }
+ },
+ additionalProperties: false,
+ required: ["property"]
}
- },
- additionalProperties: false,
- required: [
- "object",
- "property"
]
},
uniqueItems: true
@@ -51,38 +68,96 @@ module.exports = {
return {};
}
- const restrictedProperties = restrictedCalls.reduce(function(restrictions, option) {
+ const restrictedProperties = new Map();
+ const globallyRestrictedObjects = new Map();
+ const globallyRestrictedProperties = new Map();
+
+ restrictedCalls.forEach(option => {
const objectName = option.object;
const propertyName = option.property;
- if (!restrictions.has(objectName)) {
- restrictions.set(objectName, new Map());
+ if (typeof objectName === "undefined") {
+ globallyRestrictedProperties.set(propertyName, {message: option.message});
+ } else if (typeof propertyName === "undefined") {
+ globallyRestrictedObjects.set(objectName, {message: option.message});
+ } else {
+ if (!restrictedProperties.has(objectName)) {
+ restrictedProperties.set(objectName, new Map());
+ }
+
+ restrictedProperties.get(objectName).set(propertyName, {
+ message: option.message
+ });
}
+ });
- restrictions.get(objectName).set(propertyName, {
- message: option.message
- });
+ /**
+ * Checks to see whether a property access is restricted, and reports it if so.
+ * @param {ASTNode} node The node to report
+ * @param {string} objectName The name of the object
+ * @param {string} propertyName The name of the property
+ * @returns {undefined}
+ */
+ function checkPropertyAccess(node, objectName, propertyName) {
+ if (propertyName === null) {
+ return;
+ }
+ const matchedObject = restrictedProperties.get(objectName);
+ const matchedObjectProperty = matchedObject ? matchedObject.get(propertyName) : globallyRestrictedObjects.get(objectName);
+ const globalMatchedProperty = globallyRestrictedProperties.get(propertyName);
- return restrictions;
- }, new Map());
+ if (matchedObjectProperty) {
+ const message = matchedObjectProperty.message ? ` ${matchedObjectProperty.message}` : "";
- return {
- MemberExpression(node) {
- const objectName = node.object && node.object.name;
- const propertyName = astUtils.getStaticPropertyName(node);
- const matchedObject = restrictedProperties.get(objectName);
- const matchedObjectProperty = matchedObject && matchedObject.get(propertyName);
-
- if (matchedObjectProperty) {
- const message = matchedObjectProperty.message ? " " + matchedObjectProperty.message : "";
-
- context.report(node, "'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}", {
- objectName,
- propertyName,
- message
+ context.report(node, "'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}", {
+ objectName,
+ propertyName,
+ message
+ });
+ } else if (globalMatchedProperty) {
+ const message = globalMatchedProperty.message ? ` ${globalMatchedProperty.message}` : "";
+
+ context.report(node, "'{{propertyName}}' is restricted from being used.{{message}}", {
+ propertyName,
+ message
+ });
+ }
+ }
+
+ /**
+ * Checks property accesses in a destructuring assignment expression, e.g. `var foo; ({foo} = bar);`
+ * @param {ASTNode} node An AssignmentExpression or AssignmentPattern node
+ * @returns {undefined}
+ */
+ function checkDestructuringAssignment(node) {
+ if (node.right.type === "Identifier") {
+ const objectName = node.right.name;
+
+ if (node.left.type === "ObjectPattern") {
+ node.left.properties.forEach(property => {
+ checkPropertyAccess(node.left, objectName, astUtils.getStaticPropertyName(property));
});
}
}
+ }
+
+ return {
+ MemberExpression(node) {
+ checkPropertyAccess(node, node.object && node.object.name, astUtils.getStaticPropertyName(node));
+ },
+ VariableDeclarator(node) {
+ if (node.init && node.init.type === "Identifier") {
+ const objectName = node.init.name;
+
+ if (node.id.type === "ObjectPattern") {
+ node.id.properties.forEach(property => {
+ checkPropertyAccess(node.id, objectName, astUtils.getStaticPropertyName(property));
+ });
+ }
+ }
+ },
+ AssignmentExpression: checkDestructuringAssignment,
+ AssignmentPattern: checkDestructuringAssignment
};
}
};
diff --git a/tools/eslint/lib/rules/no-shadow.js b/tools/eslint/lib/rules/no-shadow.js
index a31288749b..27ea10ef92 100644
--- a/tools/eslint/lib/rules/no-shadow.js
+++ b/tools/eslint/lib/rules/no-shadow.js
@@ -18,7 +18,7 @@ const astUtils = require("../ast-utils");
module.exports = {
meta: {
docs: {
- description: "disallow `var` declarations from shadowing variables in the outer scope",
+ description: "disallow variable declarations from shadowing variables declared in the outer scope",
category: "Variables",
recommended: false
},
diff --git a/tools/eslint/lib/rules/no-spaced-func.js b/tools/eslint/lib/rules/no-spaced-func.js
index 39a2f7f7ad..361c1e0cd7 100644
--- a/tools/eslint/lib/rules/no-spaced-func.js
+++ b/tools/eslint/lib/rules/no-spaced-func.js
@@ -13,7 +13,7 @@
module.exports = {
meta: {
docs: {
- description: "disallow spacing between `function` identifiers and their applications (deprecated)",
+ description: "disallow spacing between function identifiers and their applications (deprecated)",
category: "Stylistic Issues",
recommended: false,
replacedBy: ["func-call-spacing"]
diff --git a/tools/eslint/lib/rules/no-undef-init.js b/tools/eslint/lib/rules/no-undef-init.js
index 67efa87085..ca9f0272ba 100644
--- a/tools/eslint/lib/rules/no-undef-init.js
+++ b/tools/eslint/lib/rules/no-undef-init.js
@@ -5,6 +5,8 @@
"use strict";
+const astUtils = require("../ast-utils");
+
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
@@ -17,19 +19,38 @@ module.exports = {
recommended: false
},
- schema: []
+ schema: [],
+
+ fixable: "code"
},
create(context) {
+ const sourceCode = context.getSourceCode();
+
return {
VariableDeclarator(node) {
- const name = node.id.name,
- init = node.init && node.init.name;
-
- if (init === "undefined" && node.parent.kind !== "const") {
- context.report(node, "It's not necessary to initialize '{{name}}' to undefined.", { name });
+ const name = sourceCode.getText(node.id),
+ init = node.init && node.init.name,
+ scope = context.getScope(),
+ undefinedVar = astUtils.getVariableByName(scope, "undefined"),
+ shadowed = undefinedVar && undefinedVar.defs.length > 0;
+
+ if (init === "undefined" && node.parent.kind !== "const" && !shadowed) {
+ context.report({
+ node,
+ message: "It's not necessary to initialize '{{name}}' to undefined.",
+ data: {name},
+ fix(fixer) {
+ if (node.id.type === "ArrayPattern" || node.id.type === "ObjectPattern") {
+
+ // Don't fix destructuring assignment to `undefined`.
+ return null;
+ }
+ return fixer.removeRange([node.id.range[1], node.range[1]]);
+ }
+ });
}
}
};
diff --git a/tools/eslint/lib/rules/no-unused-expressions.js b/tools/eslint/lib/rules/no-unused-expressions.js
index b640895646..cdabca204a 100644
--- a/tools/eslint/lib/rules/no-unused-expressions.js
+++ b/tools/eslint/lib/rules/no-unused-expressions.js
@@ -101,7 +101,7 @@ module.exports = {
}
}
- return /^(?:Assignment|Call|New|Update|Yield)Expression$/.test(node.type) ||
+ return /^(?:Assignment|Call|New|Update|Yield|Await)Expression$/.test(node.type) ||
(node.type === "UnaryExpression" && ["delete", "void"].indexOf(node.operator) >= 0);
}
diff --git a/tools/eslint/lib/rules/no-unused-vars.js b/tools/eslint/lib/rules/no-unused-vars.js
index 398d85566f..683176e944 100644
--- a/tools/eslint/lib/rules/no-unused-vars.js
+++ b/tools/eslint/lib/rules/no-unused-vars.js
@@ -60,7 +60,8 @@ module.exports = {
create(context) {
- const MESSAGE = "'{{name}}' is defined but never used.";
+ const DEFINED_MESSAGE = "'{{name}}' is defined but never used.";
+ const ASSIGNED_MESSAGE = "'{{name}}' is assigned a value but never used.";
const config = {
vars: "all",
@@ -415,6 +416,33 @@ module.exports = {
}
/**
+ * Checks whether the given variable is the last parameter in the non-ignored parameters.
+ *
+ * @param {escope.Variable} variable - The variable to check.
+ * @returns {boolean} `true` if the variable is the last.
+ */
+ function isLastInNonIgnoredParameters(variable) {
+ const def = variable.defs[0];
+
+ // This is the last.
+ if (def.index === def.node.params.length - 1) {
+ return true;
+ }
+
+ // if all parameters preceded by this variable are ignored and unused, this is the last.
+ if (config.argsIgnorePattern) {
+ const params = context.getDeclaredVariables(def.node);
+ const posteriorParams = params.slice(params.indexOf(variable) + 1);
+
+ if (posteriorParams.every(v => v.references.length === 0 && config.argsIgnorePattern.test(v.name))) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
* Gets an array of variables without read references.
* @param {Scope} scope - an escope Scope object.
* @param {Variable[]} unusedVars - an array that saving result.
@@ -466,7 +494,7 @@ module.exports = {
if (type === "Parameter") {
// skip any setter argument
- if (def.node.parent.type === "Property" && def.node.parent.kind === "set") {
+ if ((def.node.parent.type === "Property" || def.node.parent.type === "MethodDefinition") && def.node.parent.kind === "set") {
continue;
}
@@ -481,7 +509,7 @@ module.exports = {
}
// if "args" option is "after-used", skip all but the last parameter
- if (config.args === "after-used" && def.index < def.node.params.length - 1) {
+ if (config.args === "after-used" && !isLastInNonIgnoredParameters(variable)) {
continue;
}
} else {
@@ -569,13 +597,13 @@ module.exports = {
context.report({
node: programNode,
loc: getLocation(unusedVar),
- message: MESSAGE,
+ message: DEFINED_MESSAGE,
data: unusedVar
});
} else if (unusedVar.defs.length > 0) {
context.report({
node: unusedVar.identifiers[0],
- message: MESSAGE,
+ message: unusedVar.references.some(ref => ref.isWrite()) ? ASSIGNED_MESSAGE : DEFINED_MESSAGE,
data: unusedVar
});
}
diff --git a/tools/eslint/lib/rules/no-useless-computed-key.js b/tools/eslint/lib/rules/no-useless-computed-key.js
index 34a8c9dc22..c1ab1d9acd 100644
--- a/tools/eslint/lib/rules/no-useless-computed-key.js
+++ b/tools/eslint/lib/rules/no-useless-computed-key.js
@@ -18,7 +18,9 @@ module.exports = {
recommended: false
},
- schema: []
+ schema: [],
+
+ fixable: "code"
},
create(context) {
const sourceCode = context.getSourceCode();
@@ -33,7 +35,24 @@ module.exports = {
nodeType = typeof key.value;
if (key.type === "Literal" && (nodeType === "string" || nodeType === "number")) {
- context.report(node, MESSAGE_UNNECESSARY_COMPUTED, { property: sourceCode.getText(key) });
+ context.report({
+ node,
+ message: MESSAGE_UNNECESSARY_COMPUTED,
+ data: { property: sourceCode.getText(key) },
+ fix(fixer) {
+ const leftSquareBracket = sourceCode.getFirstToken(node, node.value.generator || node.value.async ? 1 : 0);
+ const rightSquareBracket = sourceCode.getTokensBetween(node.key, node.value).find(token => token.value === "]");
+
+ const tokensBetween = sourceCode.getTokensBetween(leftSquareBracket, rightSquareBracket, 1);
+
+ if (tokensBetween.slice(0, -1).some((token, index) => sourceCode.getText().slice(token.range[1], tokensBetween[index + 1].range[0]).trim())) {
+
+ // If there are comments between the brackets and the property name, don't do a fix.
+ return null;
+ }
+ return fixer.replaceTextRange([leftSquareBracket.range[0], rightSquareBracket.range[1]], key.raw);
+ }
+ });
}
}
};
diff --git a/tools/eslint/lib/rules/no-useless-escape.js b/tools/eslint/lib/rules/no-useless-escape.js
index f7b2848fc3..629a52a7ec 100644
--- a/tools/eslint/lib/rules/no-useless-escape.js
+++ b/tools/eslint/lib/rules/no-useless-escape.js
@@ -76,23 +76,44 @@ module.exports = {
* @private
* @param {string[]} escapes - list of valid escapes
* @param {ASTNode} node - node to validate.
- * @param {string} elm - string slice to validate.
+ * @param {string} match - string slice to validate.
* @returns {void}
*/
- function validate(escapes, node, elm) {
- const escapeNotFound = escapes.indexOf(elm[0][1]) === -1;
- const isQuoteEscape = elm[0][1] === node.raw[0];
+ function validate(escapes, node, match) {
+ const isTemplateElement = node.type === "TemplateElement";
+ const escapedChar = match[0][1];
+ let isUnnecessaryEscape = escapes.indexOf(escapedChar) === -1;
+ let isQuoteEscape;
- if (escapeNotFound && !isQuoteEscape) {
+ if (isTemplateElement) {
+ isQuoteEscape = escapedChar === "`";
+
+ if (escapedChar === "$") {
+
+ // Warn if `\$` is not followed by `{`
+ isUnnecessaryEscape = match.input[match.index + 2] !== "{";
+ } else if (escapedChar === "{") {
+
+ /* Warn if `\{` is not preceded by `$`. If preceded by `$`, escaping
+ * is necessary and the rule should not warn. If preceded by `/$`, the rule
+ * will warn for the `/$` instead, as it is the first unnecessarily escaped character.
+ */
+ isUnnecessaryEscape = match.input[match.index - 1] !== "$";
+ }
+ } else {
+ isQuoteEscape = escapedChar === node.raw[0];
+ }
+
+ if (isUnnecessaryEscape && !isQuoteEscape) {
context.report({
node,
loc: {
line: node.loc.start.line,
- column: node.loc.start.column + elm.index
+ column: node.loc.start.column + match.index
},
message: "Unnecessary escape character: {{character}}.",
data: {
- character: elm[0]
+ character: match[0]
}
});
}
@@ -105,12 +126,18 @@ module.exports = {
* @returns {void}
*/
function check(node) {
- let nodeEscapes, match;
+ const isTemplateElement = node.type === "TemplateElement";
+ const value = isTemplateElement ? node.value.raw : node.raw;
const pattern = /\\[^\d]/g;
+ let nodeEscapes,
+ match;
- if (typeof node.value === "string") {
+ if (typeof node.value === "string" || isTemplateElement) {
- // JSXAttribute doesn't have any escape sequence: https://facebook.github.io/jsx/
+ /*
+ * JSXAttribute doesn't have any escape sequence: https://facebook.github.io/jsx/.
+ * In addition, backticks are not supported by JSX yet: https://github.com/facebook/jsx/issues/25.
+ */
if (node.parent.type === "JSXAttribute") {
return;
}
@@ -122,12 +149,14 @@ module.exports = {
return;
}
- while ((match = pattern.exec(node.raw))) {
+ while ((match = pattern.exec(value))) {
validate(nodeEscapes, node, match);
}
}
+
return {
- Literal: check
+ Literal: check,
+ TemplateElement: check
};
}
};
diff --git a/tools/eslint/lib/rules/no-whitespace-before-property.js b/tools/eslint/lib/rules/no-whitespace-before-property.js
index 8751f143f1..cb9af56579 100644
--- a/tools/eslint/lib/rules/no-whitespace-before-property.js
+++ b/tools/eslint/lib/rules/no-whitespace-before-property.js
@@ -62,6 +62,12 @@ module.exports = {
propName: sourceCode.getText(node.property)
},
fix(fixer) {
+ if (!node.computed && astUtils.isDecimalInteger(node.object)) {
+
+ // If the object is a number literal, fixing it to something like 5.toString() would cause a SyntaxError.
+ // Don't fix this case.
+ return null;
+ }
return fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], replacementText);
}
});
diff --git a/tools/eslint/lib/rules/object-shorthand.js b/tools/eslint/lib/rules/object-shorthand.js
index 912c606b11..3ef782461a 100644
--- a/tools/eslint/lib/rules/object-shorthand.js
+++ b/tools/eslint/lib/rules/object-shorthand.js
@@ -15,6 +15,11 @@ const OPTIONS = {
};
//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+const astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
module.exports = {
@@ -113,13 +118,13 @@ module.exports = {
}
/**
- * Determines if the property is not a getter and a setter.
+ * Determines if the property can have a shorthand form.
* @param {ASTNode} property Property AST node
- * @returns {boolean} True if the property is not a getter and a setter, false if it is.
+ * @returns {boolean} True if the property can have a shorthand form
* @private
**/
- function isNotGetterOrSetter(property) {
- return (property.kind !== "set" && property.kind !== "get");
+ function canHaveShorthand(property) {
+ return (property.kind !== "set" && property.kind !== "get" && property.type !== "SpreadProperty" && property.type !== "ExperimentalSpreadProperty");
}
/**
@@ -149,15 +154,17 @@ module.exports = {
* @returns {boolean} True if the key and value are named equally, false if not.
* @private
**/
- function isRedudant(property) {
- return (property.key && (
+ function isRedundant(property) {
+ const value = property.value;
- // A function expression
- property.value && property.value.id && property.value.id.name === property.key.name ||
+ if (value.type === "FunctionExpression") {
+ return !value.id; // Only anonymous should be shorthand method.
+ }
+ if (value.type === "Identifier") {
+ return astUtils.getStaticPropertyName(property) === value.name;
+ }
- // A property
- property.value && property.value.name === property.key.name
- ));
+ return false;
}
/**
@@ -168,8 +175,8 @@ module.exports = {
**/
function checkConsistency(node, checkRedundancy) {
- // We are excluding getters and setters as they are considered neither longform nor shorthand.
- const properties = node.properties.filter(isNotGetterOrSetter);
+ // We are excluding getters/setters and spread properties as they are considered neither longform nor shorthand.
+ const properties = node.properties.filter(canHaveShorthand);
// Do we still have properties left after filtering the getters and setters?
if (properties.length > 0) {
@@ -185,8 +192,8 @@ module.exports = {
} else if (checkRedundancy) {
// If all properties of the object contain a method or value with a name matching it's key,
- // all the keys are redudant.
- const canAlwaysUseShorthand = properties.every(isRedudant);
+ // all the keys are redundant.
+ const canAlwaysUseShorthand = properties.every(isRedundant);
if (canAlwaysUseShorthand) {
context.report(node, "Expected shorthand for all properties.");
diff --git a/tools/eslint/lib/rules/one-var-declaration-per-line.js b/tools/eslint/lib/rules/one-var-declaration-per-line.js
index cc821d2b90..eb0d5c3bf1 100644
--- a/tools/eslint/lib/rules/one-var-declaration-per-line.js
+++ b/tools/eslint/lib/rules/one-var-declaration-per-line.js
@@ -11,7 +11,7 @@
module.exports = {
meta: {
docs: {
- description: "require or disallow newlines around `var` declarations",
+ description: "require or disallow newlines around variable declarations",
category: "Stylistic Issues",
recommended: false
},
@@ -20,7 +20,9 @@ module.exports = {
{
enum: ["always", "initializations"]
}
- ]
+ ],
+
+ fixable: "whitespace"
},
create(context) {
@@ -63,7 +65,8 @@ module.exports = {
context.report({
node,
message: ERROR_MESSAGE,
- loc: current.loc.start
+ loc: current.loc.start,
+ fix: fixer => fixer.insertTextBefore(current, "\n")
});
}
}
diff --git a/tools/eslint/lib/rules/prefer-arrow-callback.js b/tools/eslint/lib/rules/prefer-arrow-callback.js
index dd2505cb53..034112093b 100644
--- a/tools/eslint/lib/rules/prefer-arrow-callback.js
+++ b/tools/eslint/lib/rules/prefer-arrow-callback.js
@@ -275,16 +275,17 @@ module.exports = {
const paramsLeftParen = node.params.length ? sourceCode.getTokenBefore(node.params[0]) : sourceCode.getTokenBefore(node.body, 1);
const paramsRightParen = sourceCode.getTokenBefore(node.body);
+ const asyncKeyword = node.async ? "async " : "";
const paramsFullText = sourceCode.text.slice(paramsLeftParen.range[0], paramsRightParen.range[1]);
if (callbackInfo.isLexicalThis) {
// If the callback function has `.bind(this)`, replace it with an arrow function and remove the binding.
- return fixer.replaceText(node.parent.parent, paramsFullText + " => " + sourceCode.getText(node.body));
+ return fixer.replaceText(node.parent.parent, `${asyncKeyword}${paramsFullText} => ${sourceCode.getText(node.body)}`);
}
// Otherwise, only replace the `function` keyword and parameters with the arrow function parameters.
- return fixer.replaceTextRange([node.start, node.body.start], paramsFullText + " => ");
+ return fixer.replaceTextRange([node.start, node.body.start], `${asyncKeyword}${paramsFullText} => `);
}
});
}
diff --git a/tools/eslint/lib/rules/prefer-numeric-literals.js b/tools/eslint/lib/rules/prefer-numeric-literals.js
index 1e3bed5915..ed84ce6a9f 100644
--- a/tools/eslint/lib/rules/prefer-numeric-literals.js
+++ b/tools/eslint/lib/rules/prefer-numeric-literals.js
@@ -17,7 +17,9 @@ module.exports = {
recommended: false
},
- schema: []
+ schema: [],
+
+ fixable: "code"
},
create(context) {
@@ -27,6 +29,12 @@ module.exports = {
16: "hexadecimal"
};
+ const prefixMap = {
+ 2: "0b",
+ 8: "0o",
+ 16: "0x"
+ };
+
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
@@ -53,6 +61,17 @@ module.exports = {
message: "Use {{radixName}} literals instead of parseInt().",
data: {
radixName
+ },
+ fix(fixer) {
+ const newPrefix = prefixMap[node.arguments[1].value];
+
+ if (+(newPrefix + node.arguments[0].value) !== parseInt(node.arguments[0].value, node.arguments[1].value)) {
+
+ // If the newly-produced literal would be invalid, (e.g. 0b1234),
+ // or it would yield an incorrect parseInt result for some other reason, don't make a fix.
+ return null;
+ }
+ return fixer.replaceText(node, prefixMap[node.arguments[1].value] + node.arguments[0].value);
}
});
}
diff --git a/tools/eslint/lib/rules/prefer-spread.js b/tools/eslint/lib/rules/prefer-spread.js
index 59fe7754a3..158d6777f9 100644
--- a/tools/eslint/lib/rules/prefer-spread.js
+++ b/tools/eslint/lib/rules/prefer-spread.js
@@ -23,7 +23,8 @@ function isVariadicApplyCalling(node) {
node.callee.property.name === "apply" &&
node.callee.computed === false &&
node.arguments.length === 2 &&
- node.arguments[1].type !== "ArrayExpression"
+ node.arguments[1].type !== "ArrayExpression" &&
+ node.arguments[1].type !== "SpreadElement"
);
}
@@ -78,7 +79,9 @@ module.exports = {
recommended: false
},
- schema: []
+ schema: [],
+
+ fixable: "code"
},
create(context) {
@@ -95,7 +98,21 @@ module.exports = {
const thisArg = node.arguments[0];
if (isValidThisArg(expectedThis, thisArg, sourceCode)) {
- context.report(node, "use the spread operator instead of the '.apply()'.");
+ context.report({
+ node,
+ message: "Use the spread operator instead of '.apply()'.",
+ fix(fixer) {
+ if (expectedThis && expectedThis.type !== "Identifier") {
+
+ // Don't fix cases where the `this` value could be a computed expression.
+ return null;
+ }
+
+ const propertyDot = sourceCode.getTokensBetween(applied, node.callee.property).find(token => token.value === ".");
+
+ return fixer.replaceTextRange([propertyDot.range[0], node.range[1]], `(...${sourceCode.getText(node.arguments[1])})`);
+ }
+ });
}
}
};
diff --git a/tools/eslint/lib/rules/prefer-template.js b/tools/eslint/lib/rules/prefer-template.js
index 48e598752d..28e69cd3c5 100644
--- a/tools/eslint/lib/rules/prefer-template.js
+++ b/tools/eslint/lib/rules/prefer-template.js
@@ -37,6 +37,20 @@ function getTopConcatBinaryExpression(node) {
}
/**
+* Checks whether or not a given binary expression has string literals.
+* @param {ASTNode} node - A node to check.
+* @returns {boolean} `true` if the node has string literals.
+*/
+function hasStringLiteral(node) {
+ if (isConcatenation(node)) {
+
+ // `left` is deeper than `right` normally.
+ return hasStringLiteral(node.right) || hasStringLiteral(node.left);
+ }
+ return astUtils.isStringLiteral(node);
+}
+
+/**
* Checks whether or not a given binary expression has non string literals.
* @param {ASTNode} node - A node to check.
* @returns {boolean} `true` if the node has non string literals.
@@ -50,6 +64,36 @@ function hasNonStringLiteral(node) {
return !astUtils.isStringLiteral(node);
}
+/**
+* Determines whether a given node will start with a template curly expression (`${}`) when being converted to a template literal.
+* @param {ASTNode} node The node that will be fixed to a template literal
+* @returns {boolean} `true` if the node will start with a template curly.
+*/
+function startsWithTemplateCurly(node) {
+ if (node.type === "BinaryExpression") {
+ return startsWithTemplateCurly(node.left);
+ }
+ if (node.type === "TemplateLiteral") {
+ return node.expressions.length && node.quasis.length && node.quasis[0].start === node.quasis[0].end;
+ }
+ return node.type !== "Literal" || typeof node.value !== "string";
+}
+
+/**
+* Determines whether a given node end with a template curly expression (`${}`) when being converted to a template literal.
+* @param {ASTNode} node The node that will be fixed to a template literal
+* @returns {boolean} `true` if the node will end with a template curly.
+*/
+function endsWithTemplateCurly(node) {
+ if (node.type === "BinaryExpression") {
+ return startsWithTemplateCurly(node.right);
+ }
+ if (node.type === "TemplateLiteral") {
+ return node.expressions.length && node.quasis.length && node.quasis[node.quasis.length - 1].start === node.quasis[node.quasis.length - 1].end;
+ }
+ return node.type !== "Literal" || typeof node.value !== "string";
+}
+
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
@@ -62,13 +106,87 @@ module.exports = {
recommended: false
},
- schema: []
+ schema: [],
+
+ fixable: "code"
},
create(context) {
+ const sourceCode = context.getSourceCode();
let done = Object.create(null);
/**
+ * Gets the non-token text between two nodes, ignoring any other tokens that appear between the two tokens.
+ * @param {ASTNode} node1 The first node
+ * @param {ASTNode} node2 The second node
+ * @returns {string} The text between the nodes, excluding other tokens
+ */
+ function getTextBetween(node1, node2) {
+ const allTokens = [node1].concat(sourceCode.getTokensBetween(node1, node2)).concat(node2);
+ const sourceText = sourceCode.getText();
+
+ return allTokens.slice(0, -1).reduce((accumulator, token, index) => accumulator + sourceText.slice(token.range[1], allTokens[index + 1].range[0]), "");
+ }
+
+ /**
+ * Returns a template literal form of the given node.
+ * @param {ASTNode} currentNode A node that should be converted to a template literal
+ * @param {string} textBeforeNode Text that should appear before the node
+ * @param {string} textAfterNode Text that should appear after the node
+ * @returns {string} A string form of this node, represented as a template literal
+ */
+ function getTemplateLiteral(currentNode, textBeforeNode, textAfterNode) {
+ if (currentNode.type === "Literal" && typeof currentNode.value === "string") {
+
+ // If the current node is a string literal, escape any instances of ${ or ` to prevent them from being interpreted
+ // as a template placeholder. However, if the code already contains a backslash before the ${ or `
+ // for some reason, don't add another backslash, because that would change the meaning of the code (it would cause
+ // an actual backslash character to appear before the dollar sign).
+ return `\`${currentNode.raw.slice(1, -1).replace(/\\*(\${|`)/g, matched => {
+ if (matched.lastIndexOf("\\") % 2) {
+ return `\\${matched}`;
+ }
+ return matched;
+
+ // Unescape any quotes that appear in the original Literal that no longer need to be escaped.
+ }).replace(new RegExp(`\\\\${currentNode.raw[0]}`, "g"), currentNode.raw[0])}\``;
+ }
+
+ if (currentNode.type === "TemplateLiteral") {
+ return sourceCode.getText(currentNode);
+ }
+
+ if (isConcatenation(currentNode) && hasStringLiteral(currentNode) && hasNonStringLiteral(currentNode)) {
+ const plusSign = sourceCode.getTokensBetween(currentNode.left, currentNode.right).find(token => token.value === "+");
+ const textBeforePlus = getTextBetween(currentNode.left, plusSign);
+ const textAfterPlus = getTextBetween(plusSign, currentNode.right);
+ const leftEndsWithCurly = endsWithTemplateCurly(currentNode.left);
+ const rightStartsWithCurly = startsWithTemplateCurly(currentNode.right);
+
+ if (leftEndsWithCurly) {
+
+ // If the left side of the expression ends with a template curly, add the extra text to the end of the curly bracket.
+ // `foo${bar}` /* comment */ + 'baz' --> `foo${bar /* comment */ }${baz}`
+ return getTemplateLiteral(currentNode.left, textBeforeNode, textBeforePlus + textAfterPlus).slice(0, -1) +
+ getTemplateLiteral(currentNode.right, null, textAfterNode).slice(1);
+ }
+ if (rightStartsWithCurly) {
+
+ // Otherwise, if the right side of the expression starts with a template curly, add the text there.
+ // 'foo' /* comment */ + `${bar}baz` --> `foo${ /* comment */ bar}baz`
+ return getTemplateLiteral(currentNode.left, textBeforeNode, null).slice(0, -1) +
+ getTemplateLiteral(currentNode.right, textBeforePlus + textAfterPlus, textAfterNode).slice(1);
+ }
+
+ // Otherwise, these nodes should not be combined into a template curly, since there is nowhere to put
+ // the text between them.
+ return `${getTemplateLiteral(currentNode.left, textBeforeNode, null)}${textBeforePlus}+${textAfterPlus}${getTemplateLiteral(currentNode.right, textAfterNode, null)}`;
+ }
+
+ return `\`\${${textBeforeNode || ""}${sourceCode.getText(currentNode)}${textAfterNode || ""}}\``;
+ }
+
+ /**
* Reports if a given node is string concatenation with non string literals.
*
* @param {ASTNode} node - A node to check.
@@ -88,9 +206,13 @@ module.exports = {
done[topBinaryExpr.range[0]] = true;
if (hasNonStringLiteral(topBinaryExpr)) {
- context.report(
- topBinaryExpr,
- "Unexpected string concatenation.");
+ context.report({
+ node: topBinaryExpr,
+ message: "Unexpected string concatenation.",
+ fix(fixer) {
+ return fixer.replaceText(topBinaryExpr, getTemplateLiteral(topBinaryExpr, null, null));
+ }
+ });
}
}
diff --git a/tools/eslint/lib/rules/quote-props.js b/tools/eslint/lib/rules/quote-props.js
index 88a634278e..2129ce6aa9 100644
--- a/tools/eslint/lib/rules/quote-props.js
+++ b/tools/eslint/lib/rules/quote-props.js
@@ -61,7 +61,9 @@ module.exports = {
maxItems: 2
}
]
- }
+ },
+
+ fixable: "code"
},
create(context) {
@@ -74,7 +76,8 @@ module.exports = {
MESSAGE_UNNECESSARY = "Unnecessarily quoted property '{{property}}' found.",
MESSAGE_UNQUOTED = "Unquoted property '{{property}}' found.",
MESSAGE_NUMERIC = "Unquoted number literal '{{property}}' used as key.",
- MESSAGE_RESERVED = "Unquoted reserved word '{{property}}' used as key.";
+ MESSAGE_RESERVED = "Unquoted reserved word '{{property}}' used as key.",
+ sourceCode = context.getSourceCode();
/**
@@ -101,6 +104,31 @@ module.exports = {
}
/**
+ * Returns a string representation of a property node with quotes removed
+ * @param {ASTNode} key Key AST Node, which may or may not be quoted
+ * @returns {string} A replacement string for this property
+ */
+ function getUnquotedKey(key) {
+ return key.type === "Identifier" ? key.name : key.value;
+ }
+
+ /**
+ * Returns a string representation of a property node with quotes added
+ * @param {ASTNode} key Key AST Node, which may or may not be quoted
+ * @returns {string} A replacement string for this property
+ */
+ function getQuotedKey(key) {
+ if (key.type === "Literal" && typeof key.value === "string") {
+
+ // If the key is already a string literal, don't replace the quotes with double quotes.
+ return sourceCode.getText(key);
+ }
+
+ // Otherwise, the key is either an identifier or a number literal.
+ return `"${key.type === "Identifier" ? key.name : key.value}"`;
+ }
+
+ /**
* Ensures that a property's key is quoted only when necessary
* @param {ASTNode} node Property AST node
* @returns {void}
@@ -131,12 +159,27 @@ module.exports = {
}
if (CHECK_UNNECESSARY && areQuotesRedundant(key.value, tokens, NUMBERS)) {
- context.report(node, MESSAGE_UNNECESSARY, {property: key.value});
+ context.report({
+ node,
+ message: MESSAGE_UNNECESSARY,
+ data: {property: key.value},
+ fix: fixer => fixer.replaceText(key, getUnquotedKey(key))
+ });
}
} else if (KEYWORDS && key.type === "Identifier" && isKeyword(key.name)) {
- context.report(node, MESSAGE_RESERVED, {property: key.name});
+ context.report({
+ node,
+ message: MESSAGE_RESERVED,
+ data: {property: key.name},
+ fix: fixer => fixer.replaceText(key, getQuotedKey(key))
+ });
} else if (NUMBERS && key.type === "Literal" && typeof key.value === "number") {
- context.report(node, MESSAGE_NUMERIC, {property: key.value});
+ context.report({
+ node,
+ message: MESSAGE_NUMERIC,
+ data: {property: key.value},
+ fix: fixer => fixer.replaceText(key, getQuotedKey(key))
+ });
}
}
@@ -149,8 +192,11 @@ module.exports = {
const key = node.key;
if (!node.method && !node.computed && !node.shorthand && !(key.type === "Literal" && typeof key.value === "string")) {
- context.report(node, MESSAGE_UNQUOTED, {
- property: key.name || key.value
+ context.report({
+ node,
+ message: MESSAGE_UNQUOTED,
+ data: {property: key.name || key.value},
+ fix: fixer => fixer.replaceText(key, getQuotedKey(key))
});
}
}
@@ -162,8 +208,9 @@ module.exports = {
* @returns {void}
*/
function checkConsistency(node, checkQuotesRedundancy) {
- let quotes = false,
- lackOfQuotes = false,
+ const quotedProps = [],
+ unquotedProps = [];
+ let keywordKeyName = null,
necessaryQuotes = false;
node.properties.forEach(function(property) {
@@ -176,7 +223,7 @@ module.exports = {
if (key.type === "Literal" && typeof key.value === "string") {
- quotes = true;
+ quotedProps.push(property);
if (checkQuotesRedundancy) {
try {
@@ -189,21 +236,40 @@ module.exports = {
necessaryQuotes = necessaryQuotes || !areQuotesRedundant(key.value, tokens) || KEYWORDS && isKeyword(tokens[0].value);
}
} else if (KEYWORDS && checkQuotesRedundancy && key.type === "Identifier" && isKeyword(key.name)) {
+ unquotedProps.push(property);
necessaryQuotes = true;
- context.report(node, "Properties should be quoted as '{{property}}' is a reserved word.", {property: key.name});
+ keywordKeyName = key.name;
} else {
- lackOfQuotes = true;
- }
-
- if (quotes && lackOfQuotes) {
- context.report(node, "Inconsistently quoted property '{{key}}' found.", {
- key: key.name || key.value
- });
+ unquotedProps.push(property);
}
});
- if (checkQuotesRedundancy && quotes && !necessaryQuotes) {
- context.report(node, "Properties shouldn't be quoted as all quotes are redundant.");
+ if (checkQuotesRedundancy && quotedProps.length && !necessaryQuotes) {
+ quotedProps.forEach(property => {
+ context.report({
+ node: property,
+ message: "Properties shouldn't be quoted as all quotes are redundant.",
+ fix: fixer => fixer.replaceText(property.key, getUnquotedKey(property.key))
+ });
+ });
+ } else if (unquotedProps.length && keywordKeyName) {
+ unquotedProps.forEach(property => {
+ context.report({
+ node: property,
+ message: "Properties should be quoted as '{{property}}' is a reserved word.",
+ data: {property: keywordKeyName},
+ fix: fixer => fixer.replaceText(property.key, getQuotedKey(property.key))
+ });
+ });
+ } else if (quotedProps.length && unquotedProps.length) {
+ unquotedProps.forEach(property => {
+ context.report({
+ node: property,
+ message: "Inconsistently quoted property '{{key}}' found.",
+ data: {key: property.key.name || property.key.value},
+ fix: fixer => fixer.replaceText(property.key, getQuotedKey(property.key))
+ });
+ });
}
}
diff --git a/tools/eslint/lib/rules/quotes.js b/tools/eslint/lib/rules/quotes.js
index 29ef600c42..90e68289e0 100644
--- a/tools/eslint/lib/rules/quotes.js
+++ b/tools/eslint/lib/rules/quotes.js
@@ -123,12 +123,26 @@ module.exports = {
/**
* Determines if a given node is part of JSX syntax.
- * @param {ASTNode} node The node to check.
- * @returns {boolean} True if the node is a JSX node, false if not.
+ *
+ * This function returns `true` in the following cases:
+ *
+ * - `<div className="foo"></div>` ... If the literal is an attribute value, the parent of the literal is `JSXAttribute`.
+ * - `<div>foo</div>` ... If the literal is a text content, the parent of the literal is `JSXElement`.
+ *
+ * In particular, this function returns `false` in the following cases:
+ *
+ * - `<div className={"foo"}></div>`
+ * - `<div>{"foo"}</div>`
+ *
+ * In both cases, inside of the braces is handled as normal JavaScript.
+ * The braces are `JSXExpressionContainer` nodes.
+ *
+ * @param {ASTNode} node The Literal node to check.
+ * @returns {boolean} True if the node is a part of JSX, false if not.
* @private
*/
- function isJSXElement(node) {
- return node.type.indexOf("JSX") === 0;
+ function isJSXLiteral(node) {
+ return node.parent.type === "JSXAttribute" || node.parent.type === "JSXElement";
}
/**
@@ -215,7 +229,7 @@ module.exports = {
if (settings && typeof val === "string") {
isValid = (quoteOption === "backtick" && isAllowedAsNonBacktick(node)) ||
- isJSXElement(node.parent) ||
+ isJSXLiteral(node) ||
astUtils.isSurroundedBy(rawVal, settings.quote);
if (!isValid && avoidEscape) {
diff --git a/tools/eslint/lib/rules/semi.js b/tools/eslint/lib/rules/semi.js
index 7fc80ab8da..2f28f1614d 100644
--- a/tools/eslint/lib/rules/semi.js
+++ b/tools/eslint/lib/rules/semi.js
@@ -53,7 +53,7 @@ module.exports = {
create(context) {
- const OPT_OUT_PATTERN = /[\[\(\/\+\-]/; // One of [(/+-
+ const OPT_OUT_PATTERN = /^[-[(\/+]$/; // One of [(/+-, but not ++ or --
const options = context.options[1];
const never = context.options[0] === "never",
exceptOneLine = options && options.omitLastInOneLineBlock === true,
diff --git a/tools/eslint/lib/rules/sort-keys.js b/tools/eslint/lib/rules/sort-keys.js
index b3aeb81d8e..e42375d6bc 100644
--- a/tools/eslint/lib/rules/sort-keys.js
+++ b/tools/eslint/lib/rules/sort-keys.js
@@ -1,5 +1,5 @@
/**
- * @fileoverview Rule to requires object keys to be sorted
+ * @fileoverview Rule to require object keys to be sorted
* @author Toru Nagashima
*/
@@ -74,7 +74,7 @@ const isValidOrders = {
module.exports = {
meta: {
docs: {
- description: "requires object keys to be sorted",
+ description: "require object keys to be sorted",
category: "Stylistic Issues",
recommended: false
},
diff --git a/tools/eslint/lib/rules/space-before-function-paren.js b/tools/eslint/lib/rules/space-before-function-paren.js
index 04c169a786..c62413a37c 100644
--- a/tools/eslint/lib/rules/space-before-function-paren.js
+++ b/tools/eslint/lib/rules/space-before-function-paren.js
@@ -32,6 +32,9 @@ module.exports = {
},
named: {
enum: ["always", "never", "ignore"]
+ },
+ asyncArrow: {
+ enum: ["always", "never", "ignore"]
}
},
additionalProperties: false
@@ -48,7 +51,9 @@ module.exports = {
let requireAnonymousFunctionSpacing = true,
forbidAnonymousFunctionSpacing = false,
requireNamedFunctionSpacing = true,
- forbidNamedFunctionSpacing = false;
+ forbidNamedFunctionSpacing = false,
+ requireArrowFunctionSpacing = false,
+ forbidArrowFunctionSpacing = false;
if (typeof configuration === "object") {
requireAnonymousFunctionSpacing = (
@@ -57,6 +62,8 @@ module.exports = {
requireNamedFunctionSpacing = (
!configuration.named || configuration.named === "always");
forbidNamedFunctionSpacing = configuration.named === "never";
+ requireArrowFunctionSpacing = configuration.asyncArrow === "always";
+ forbidArrowFunctionSpacing = configuration.asyncArrow === "never";
} else if (configuration === "never") {
requireAnonymousFunctionSpacing = false;
forbidAnonymousFunctionSpacing = true;
@@ -92,13 +99,31 @@ module.exports = {
* @returns {void}
*/
function validateSpacingBeforeParentheses(node) {
- const isNamed = isNamedFunction(node);
- let rightToken;
+ const isArrow = node.type === "ArrowFunctionExpression";
+ const isNamed = !isArrow && isNamedFunction(node);
+ const isAnonymousGenerator = node.generator && !isNamed;
+ const isNormalArrow = isArrow && !node.async;
+ const isArrowWithoutParens = isArrow && sourceCode.getFirstToken(node, 1).value !== "(";
+ let forbidSpacing, requireSpacing, rightToken;
- if (node.generator && !isNamed) {
+ // isAnonymousGenerator → `generator-star-spacing` should warn it. E.g. `function* () {}`
+ // isNormalArrow → ignore always.
+ // isArrowWithoutParens → ignore always. E.g. `async a => a`
+ if (isAnonymousGenerator || isNormalArrow || isArrowWithoutParens) {
return;
}
+ if (isArrow) {
+ forbidSpacing = forbidArrowFunctionSpacing;
+ requireSpacing = requireArrowFunctionSpacing;
+ } else if (isNamed) {
+ forbidSpacing = forbidNamedFunctionSpacing;
+ requireSpacing = requireNamedFunctionSpacing;
+ } else {
+ forbidSpacing = forbidAnonymousFunctionSpacing;
+ requireSpacing = requireAnonymousFunctionSpacing;
+ }
+
rightToken = sourceCode.getFirstToken(node);
while (rightToken.value !== "(") {
rightToken = sourceCode.getTokenAfter(rightToken);
@@ -107,7 +132,7 @@ module.exports = {
const location = leftToken.loc.end;
if (sourceCode.isSpaceBetweenTokens(leftToken, rightToken)) {
- if ((isNamed && forbidNamedFunctionSpacing) || (!isNamed && forbidAnonymousFunctionSpacing)) {
+ if (forbidSpacing) {
context.report({
node,
loc: location,
@@ -118,7 +143,7 @@ module.exports = {
});
}
} else {
- if ((isNamed && requireNamedFunctionSpacing) || (!isNamed && requireAnonymousFunctionSpacing)) {
+ if (requireSpacing) {
context.report({
node,
loc: location,
@@ -133,7 +158,8 @@ module.exports = {
return {
FunctionDeclaration: validateSpacingBeforeParentheses,
- FunctionExpression: validateSpacingBeforeParentheses
+ FunctionExpression: validateSpacingBeforeParentheses,
+ ArrowFunctionExpression: validateSpacingBeforeParentheses,
};
}
};
diff --git a/tools/eslint/lib/rules/space-infix-ops.js b/tools/eslint/lib/rules/space-infix-ops.js
index c99c328806..9831e8e2af 100644
--- a/tools/eslint/lib/rules/space-infix-ops.js
+++ b/tools/eslint/lib/rules/space-infix-ops.js
@@ -11,7 +11,7 @@
module.exports = {
meta: {
docs: {
- description: "require spacing around operators",
+ description: "require spacing around infix operators",
category: "Stylistic Issues",
recommended: false
},
diff --git a/tools/eslint/lib/rules/space-unary-ops.js b/tools/eslint/lib/rules/space-unary-ops.js
index da79c5c756..11c59c8274 100644
--- a/tools/eslint/lib/rules/space-unary-ops.js
+++ b/tools/eslint/lib/rules/space-unary-ops.js
@@ -177,6 +177,17 @@ module.exports = {
}
/**
+ * Verifies AwaitExpressions satisfy spacing requirements
+ * @param {ASTNode} node AwaitExpression AST node
+ * @returns {void}
+ */
+ function checkForSpacesAfterAwait(node) {
+ const tokens = sourceCode.getFirstTokens(node, 3);
+
+ checkUnaryWordOperatorForSpaces(node, tokens[0], tokens[1], "await");
+ }
+
+ /**
* Verifies UnaryExpression, UpdateExpression and NewExpression have spaces before or after the operator
* @param {ASTnode} node AST node
* @param {Object} firstToken First token in the expression
@@ -291,7 +302,8 @@ module.exports = {
UnaryExpression: checkForSpaces,
UpdateExpression: checkForSpaces,
NewExpression: checkForSpaces,
- YieldExpression: checkForSpacesAfterYield
+ YieldExpression: checkForSpacesAfterYield,
+ AwaitExpression: checkForSpacesAfterAwait
};
}
diff --git a/tools/eslint/lib/rules/strict.js b/tools/eslint/lib/rules/strict.js
index 6581ac1bfd..1591bd8714 100644
--- a/tools/eslint/lib/rules/strict.js
+++ b/tools/eslint/lib/rules/strict.js
@@ -88,7 +88,9 @@ module.exports = {
{
enum: ["never", "global", "function", "safe"]
}
- ]
+ ],
+
+ fixable: "code"
},
create(context) {
@@ -105,39 +107,58 @@ module.exports = {
}
/**
+ * Determines whether a reported error should be fixed, depending on the error type.
+ * @param {string} errorType The type of error
+ * @returns {boolean} `true` if the reported error should be fixed
+ */
+ function shouldFix(errorType) {
+ return errorType === "multiple" || errorType === "unnecessary" || errorType === "module" || errorType === "implied" || errorType === "unnecessaryInClasses";
+ }
+
+ /**
+ * Gets a fixer function to remove a given 'use strict' directive.
+ * @param {ASTNode} node The directive that should be removed
+ * @returns {Function} A fixer function
+ */
+ function getFixFunction(node) {
+ return fixer => fixer.remove(node);
+ }
+
+ /**
* Report a slice of an array of nodes with a given message.
* @param {ASTNode[]} nodes Nodes.
* @param {string} start Index to start from.
* @param {string} end Index to end before.
* @param {string} message Message to display.
+ * @param {boolean} fix `true` if the directive should be fixed (i.e. removed)
* @returns {void}
*/
- function reportSlice(nodes, start, end, message) {
- let i;
-
- for (i = start; i < end; i++) {
- context.report(nodes[i], message);
- }
+ function reportSlice(nodes, start, end, message, fix) {
+ nodes.slice(start, end).forEach(node => {
+ context.report({node, message, fix: fix ? getFixFunction(node) : null});
+ });
}
/**
* Report all nodes in an array with a given message.
* @param {ASTNode[]} nodes Nodes.
* @param {string} message Message to display.
+ * @param {boolean} fix `true` if the directive should be fixed (i.e. removed)
* @returns {void}
*/
- function reportAll(nodes, message) {
- reportSlice(nodes, 0, nodes.length, message);
+ function reportAll(nodes, message, fix) {
+ reportSlice(nodes, 0, nodes.length, message, fix);
}
/**
* Report all nodes in an array, except the first, with a given message.
* @param {ASTNode[]} nodes Nodes.
* @param {string} message Message to display.
+ * @param {boolean} fix `true` if the directive should be fixed (i.e. removed)
* @returns {void}
*/
- function reportAllExceptFirst(nodes, message) {
- reportSlice(nodes, 1, nodes.length, message);
+ function reportAllExceptFirst(nodes, message, fix) {
+ reportSlice(nodes, 1, nodes.length, message, fix);
}
/**
@@ -157,12 +178,12 @@ module.exports = {
if (!isSimpleParameterList(node.params)) {
context.report(useStrictDirectives[0], messages.nonSimpleParameterList);
} else if (isParentStrict) {
- context.report(useStrictDirectives[0], messages.unnecessary);
+ context.report({node: useStrictDirectives[0], message: messages.unnecessary, fix: getFixFunction(useStrictDirectives[0])});
} else if (isInClass) {
- context.report(useStrictDirectives[0], messages.unnecessaryInClasses);
+ context.report({node: useStrictDirectives[0], message: messages.unnecessaryInClasses, fix: getFixFunction(useStrictDirectives[0])});
}
- reportAllExceptFirst(useStrictDirectives, messages.multiple);
+ reportAllExceptFirst(useStrictDirectives, messages.multiple, true);
} else if (isParentGlobal) {
if (isSimpleParameterList(node.params)) {
context.report(node, messages.function);
@@ -198,10 +219,10 @@ module.exports = {
enterFunctionInFunctionMode(node, useStrictDirectives);
} else if (useStrictDirectives.length > 0) {
if (isSimpleParameterList(node.params)) {
- reportAll(useStrictDirectives, messages[mode]);
+ reportAll(useStrictDirectives, messages[mode], shouldFix(mode));
} else {
context.report(useStrictDirectives[0], messages.nonSimpleParameterList);
- reportAllExceptFirst(useStrictDirectives, messages.multiple);
+ reportAllExceptFirst(useStrictDirectives, messages.multiple, true);
}
}
}
@@ -218,9 +239,9 @@ module.exports = {
if (node.body.length > 0 && useStrictDirectives.length === 0) {
context.report(node, messages.global);
}
- reportAllExceptFirst(useStrictDirectives, messages.multiple);
+ reportAllExceptFirst(useStrictDirectives, messages.multiple, true);
} else {
- reportAll(useStrictDirectives, messages[mode]);
+ reportAll(useStrictDirectives, messages[mode], shouldFix(mode));
}
},
FunctionDeclaration: enterFunction,
diff --git a/tools/eslint/lib/rules/valid-jsdoc.js b/tools/eslint/lib/rules/valid-jsdoc.js
index d6ebd24a4a..09fc684719 100644
--- a/tools/eslint/lib/rules/valid-jsdoc.js
+++ b/tools/eslint/lib/rules/valid-jsdoc.js
@@ -165,7 +165,7 @@ module.exports = {
}
/**
- * Check if return tag type is void or undefined
+ * Validate type for a given JSDoc node
* @param {Object} jsdocNode JSDoc node
* @param {Object} type JSDoc tag
* @returns {void}
@@ -192,7 +192,9 @@ module.exports = {
elements = type.elements;
break;
case "FieldType": // Array.<{count: number, votes: number}>
- typesToCheck.push(getCurrentExpectedTypes(type.value));
+ if (type.value) {
+ typesToCheck.push(getCurrentExpectedTypes(type.value));
+ }
break;
default:
typesToCheck.push(getCurrentExpectedTypes(type));
diff --git a/tools/eslint/lib/rules/valid-typeof.js b/tools/eslint/lib/rules/valid-typeof.js
index b13e2aefdd..ed0a7c0179 100644
--- a/tools/eslint/lib/rules/valid-typeof.js
+++ b/tools/eslint/lib/rules/valid-typeof.js
@@ -34,6 +34,17 @@ module.exports = {
const VALID_TYPES = ["symbol", "undefined", "object", "boolean", "number", "string", "function"],
OPERATORS = ["==", "===", "!=", "!=="];
+ const requireStringLiterals = context.options[0] && context.options[0].requireStringLiterals;
+
+ /**
+ * Determines whether a node is a typeof expression.
+ * @param {ASTNode} node The node
+ * @returns {boolean} `true` if the node is a typeof expression
+ */
+ function isTypeofExpression(node) {
+ return node.type === "UnaryExpression" && node.operator === "typeof";
+ }
+
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
@@ -41,17 +52,19 @@ module.exports = {
return {
UnaryExpression(node) {
- if (node.operator === "typeof") {
+ if (isTypeofExpression(node)) {
const parent = context.getAncestors().pop();
if (parent.type === "BinaryExpression" && OPERATORS.indexOf(parent.operator) !== -1) {
const sibling = parent.left === node ? parent.right : parent.left;
- if (sibling.type === "Literal") {
- if (VALID_TYPES.indexOf(sibling.value) === -1) {
+ if (sibling.type === "Literal" || sibling.type === "TemplateLiteral" && !sibling.expressions.length) {
+ const value = sibling.type === "Literal" ? sibling.value : sibling.quasis[0].value.cooked;
+
+ if (VALID_TYPES.indexOf(value) === -1) {
context.report(sibling, "Invalid typeof comparison value.");
}
- } else if (context.options[0] && context.options[0].requireStringLiterals) {
+ } else if (requireStringLiterals && !isTypeofExpression(sibling)) {
context.report(sibling, "Typeof comparisons should be to string literals.");
}
}
diff --git a/tools/eslint/lib/rules/wrap-iife.js b/tools/eslint/lib/rules/wrap-iife.js
index c648af82d2..bbbc79ab1f 100644
--- a/tools/eslint/lib/rules/wrap-iife.js
+++ b/tools/eslint/lib/rules/wrap-iife.js
@@ -5,6 +5,8 @@
"use strict";
+const astUtils = require("../ast-utils");
+
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
@@ -20,13 +22,25 @@ module.exports = {
schema: [
{
enum: ["outside", "inside", "any"]
+ },
+ {
+ type: "object",
+ properties: {
+ functionPrototypeMethods: {
+ type: "boolean"
+ }
+ },
+ additionalProperties: false
}
- ]
+ ],
+
+ fixable: "code"
},
create(context) {
const style = context.options[0] || "outside";
+ const includeFunctionPrototypeMethods = (context.options[1] && context.options[1].functionPrototypeMethods) || false;
const sourceCode = context.getSourceCode();
@@ -44,20 +58,91 @@ module.exports = {
nextToken && nextToken.value === ")";
}
- return {
+ /**
+ * Get the function node from an IIFE
+ * @param {ASTNode} node node to evaluate
+ * @returns {ASTNode} node that is the function expression of the given IIFE, or null if none exist
+ */
+ function getFunctionNodeFromIIFE(node) {
+ const callee = node.callee;
+
+ if (callee.type === "FunctionExpression") {
+ return callee;
+ }
+
+ if (includeFunctionPrototypeMethods &&
+ callee.type === "MemberExpression" &&
+ callee.object.type === "FunctionExpression" &&
+ (astUtils.getStaticPropertyName(callee) === "call" || astUtils.getStaticPropertyName(callee) === "apply")
+ ) {
+ return callee.object;
+ }
+
+ return null;
+ }
+
+ return {
CallExpression(node) {
- if (node.callee.type === "FunctionExpression") {
- const callExpressionWrapped = wrapped(node),
- functionExpressionWrapped = wrapped(node.callee);
-
- if (!callExpressionWrapped && !functionExpressionWrapped) {
- context.report(node, "Wrap an immediate function invocation in parentheses.");
- } else if (style === "inside" && !functionExpressionWrapped) {
- context.report(node, "Wrap only the function expression in parens.");
- } else if (style === "outside" && !callExpressionWrapped) {
- context.report(node, "Move the invocation into the parens that contain the function.");
- }
+ const innerNode = getFunctionNodeFromIIFE(node);
+
+ if (!innerNode) {
+ return;
+ }
+
+ const callExpressionWrapped = wrapped(node),
+ functionExpressionWrapped = wrapped(innerNode);
+
+ if (!callExpressionWrapped && !functionExpressionWrapped) {
+ context.report({
+ node,
+ message: "Wrap an immediate function invocation in parentheses.",
+ fix(fixer) {
+ const nodeToSurround = style === "inside" ? innerNode : node;
+
+ return fixer.replaceText(nodeToSurround, `(${sourceCode.getText(nodeToSurround)})`);
+ }
+ });
+ } else if (style === "inside" && !functionExpressionWrapped) {
+ context.report({
+ node,
+ message: "Wrap only the function expression in parens.",
+ fix(fixer) {
+
+ /*
+ * The outer call expression will always be wrapped at this point.
+ * Replace the range between the end of the function expression and the end of the call expression.
+ * for example, in `(function(foo) {}(bar))`, the range `(bar))` should get replaced with `)(bar)`.
+ * Replace the parens from the outer expression, and parenthesize the function expression.
+ */
+ const parenAfter = sourceCode.getTokenAfter(node);
+
+ return fixer.replaceTextRange(
+ [innerNode.range[1], parenAfter.range[1]],
+ `)${sourceCode.getText().slice(innerNode.range[1], parenAfter.range[0])}`
+ );
+ }
+ });
+ } else if (style === "outside" && !callExpressionWrapped) {
+ context.report({
+ node,
+ message: "Move the invocation into the parens that contain the function.",
+ fix(fixer) {
+
+ /*
+ * The inner function expression will always be wrapped at this point.
+ * It's only necessary to replace the range between the end of the function expression
+ * and the call expression. For example, in `(function(foo) {})(bar)`, the range `)(bar)`
+ * should get replaced with `(bar))`.
+ */
+ const parenAfter = sourceCode.getTokenAfter(innerNode);
+
+ return fixer.replaceTextRange(
+ [parenAfter.range[0], node.range[1]],
+ `${sourceCode.getText().slice(parenAfter.range[1], node.range[1])})`
+ );
+ }
+ });
}
}
};
diff --git a/tools/eslint/lib/rules/yoda.js b/tools/eslint/lib/rules/yoda.js
index ab68db4e8a..e463a476ab 100644
--- a/tools/eslint/lib/rules/yoda.js
+++ b/tools/eslint/lib/rules/yoda.js
@@ -141,7 +141,9 @@ module.exports = {
},
additionalProperties: false
}
- ]
+ ],
+
+ fixable: "code"
},
create(context) {
@@ -219,46 +221,57 @@ module.exports = {
isParenWrapped());
}
+ const OPERATOR_FLIP_MAP = {
+ "===": "===",
+ "!==": "!==",
+ "==": "==",
+ "!=": "!=",
+ "<": ">",
+ ">": "<",
+ "<=": ">=",
+ ">=": "<="
+ };
+
+ /**
+ * Returns a string representation of a BinaryExpression node with its sides/operator flipped around.
+ * @param {ASTNode} node The BinaryExpression node
+ * @returns {string} A string representation of the node with the sides and operator flipped
+ */
+ function getFlippedString(node) {
+ const operatorToken = sourceCode.getTokensBetween(node.left, node.right).find(token => token.value === node.operator);
+ const textBeforeOperator = sourceCode.getText().slice(sourceCode.getTokenBefore(operatorToken).range[1], operatorToken.range[0]);
+ const textAfterOperator = sourceCode.getText().slice(operatorToken.range[1], sourceCode.getTokenAfter(operatorToken).range[0]);
+ const leftText = sourceCode.getText().slice(sourceCode.getFirstToken(node).range[0], sourceCode.getTokenBefore(operatorToken).range[1]);
+ const rightText = sourceCode.getText().slice(sourceCode.getTokenAfter(operatorToken).range[0], sourceCode.getLastToken(node).range[1]);
+
+ return rightText + textBeforeOperator + OPERATOR_FLIP_MAP[operatorToken.value] + textAfterOperator + leftText;
+ }
+
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
return {
- BinaryExpression: always ? function(node) {
-
- // Comparisons must always be yoda-style: if ("blue" === color)
- if (
- (node.right.type === "Literal" || looksLikeLiteral(node.right)) &&
- !(node.left.type === "Literal" || looksLikeLiteral(node.left)) &&
- !(!isEqualityOperator(node.operator) && onlyEquality) &&
- isComparisonOperator(node.operator) &&
- !(exceptRange && isRangeTest(context.getAncestors().pop()))
- ) {
- context.report({
- node,
- message: "Expected literal to be on the left side of {{operator}}.",
- data: {
- operator: node.operator
- }
- });
- }
-
- } : function(node) {
+ BinaryExpression(node) {
+ const expectedLiteral = always ? node.left : node.right;
+ const expectedNonLiteral = always ? node.right : node.left;
- // Comparisons must never be yoda-style (default)
+ // If `expectedLiteral` is not a literal, and `expectedNonLiteral` is a literal, raise an error.
if (
- (node.left.type === "Literal" || looksLikeLiteral(node.left)) &&
- !(node.right.type === "Literal" || looksLikeLiteral(node.right)) &&
+ (expectedNonLiteral.type === "Literal" || looksLikeLiteral(expectedNonLiteral)) &&
+ !(expectedLiteral.type === "Literal" || looksLikeLiteral(expectedLiteral)) &&
!(!isEqualityOperator(node.operator) && onlyEquality) &&
isComparisonOperator(node.operator) &&
!(exceptRange && isRangeTest(context.getAncestors().pop()))
) {
context.report({
node,
- message: "Expected literal to be on the right side of {{operator}}.",
+ message: "Expected literal to be on the {{expectedSide}} side of {{operator}}.",
data: {
- operator: node.operator
- }
+ operator: node.operator,
+ expectedSide: always ? "left" : "right"
+ },
+ fix: fixer => fixer.replaceText(node, getFlippedString(node))
});
}
diff --git a/tools/eslint/lib/testers/rule-tester.js b/tools/eslint/lib/testers/rule-tester.js
index 04e64cf662..25b8699359 100644
--- a/tools/eslint/lib/testers/rule-tester.js
+++ b/tools/eslint/lib/testers/rule-tester.js
@@ -182,13 +182,53 @@ RuleTester.resetDefaultConfig = function() {
};
// default separators for testing
-RuleTester.describe = (typeof describe === "function") ? describe : /* istanbul ignore next */ function(text, method) {
- return method.apply(this);
-};
+const DESCRIBE = Symbol("describe");
+const IT = Symbol("it");
+
+RuleTester[DESCRIBE] = RuleTester[IT] = null;
-RuleTester.it = (typeof it === "function") ? it : /* istanbul ignore next */ function(text, method) {
+/**
+ * This is `it` or `describe` if those don't exist.
+ * @this {Mocha}
+ * @param {string} text - The description of the test case.
+ * @param {Function} method - The logic of the test case.
+ * @returns {any} Returned value of `method`.
+ */
+function defaultHandler(text, method) {
return method.apply(this);
-};
+}
+
+// If people use `mocha test.js --watch` command, `describe` and `it` function
+// instances are different for each execution. So this should get fresh instance
+// always.
+Object.defineProperties(RuleTester, {
+ describe: {
+ get() {
+ return (
+ RuleTester[DESCRIBE] ||
+ (typeof describe === "function" ? describe : defaultHandler)
+ );
+ },
+ set(value) {
+ RuleTester[DESCRIBE] = value;
+ },
+ configurable: true,
+ enumerable: true,
+ },
+ it: {
+ get() {
+ return (
+ RuleTester[IT] ||
+ (typeof it === "function" ? it : defaultHandler)
+ );
+ },
+ set(value) {
+ RuleTester[IT] = value;
+ },
+ configurable: true,
+ enumerable: true,
+ },
+});
RuleTester.prototype = {
@@ -266,9 +306,9 @@ RuleTester.prototype = {
if (validateSchema.errors) {
throw new Error([
- "Schema for rule " + ruleName + " is invalid:"
+ `Schema for rule ${ruleName} is invalid:`
].concat(validateSchema.errors.map(function(error) {
- return "\t" + error.field + ": " + error.message;
+ return `\t${error.field}: ${error.message}`;
})).join("\n"));
}
}
@@ -373,7 +413,7 @@ RuleTester.prototype = {
*/
function testInvalidTemplate(ruleName, item) {
assert.ok(item.errors || item.errors === 0,
- "Did not specify errors for an invalid test of " + ruleName);
+ `Did not specify errors for an invalid test of ${ruleName}`);
const result = runRuleForItem(ruleName, item);
const messages = result.messages;
@@ -389,7 +429,7 @@ RuleTester.prototype = {
item.errors.length, item.errors.length === 1 ? "" : "s", messages.length, util.inspect(messages)));
for (let i = 0, l = item.errors.length; i < l; i++) {
- assert.ok(!("fatal" in messages[i]), "A fatal parsing error occurred: " + messages[i].message);
+ assert.ok(!("fatal" in messages[i]), `A fatal parsing error occurred: ${messages[i].message}`);
assert.equal(messages[i].ruleId, ruleName, "Error rule name should be the same as the name of the rule being tested");
if (typeof item.errors[i] === "string") {
@@ -408,23 +448,23 @@ RuleTester.prototype = {
}
if (item.errors[i].type) {
- assert.equal(messages[i].nodeType, item.errors[i].type, "Error type should be " + item.errors[i].type);
+ assert.equal(messages[i].nodeType, item.errors[i].type, `Error type should be ${item.errors[i].type}`);
}
if (item.errors[i].hasOwnProperty("line")) {
- assert.equal(messages[i].line, item.errors[i].line, "Error line should be " + item.errors[i].line);
+ assert.equal(messages[i].line, item.errors[i].line, `Error line should be ${item.errors[i].line}`);
}
if (item.errors[i].hasOwnProperty("column")) {
- assert.equal(messages[i].column, item.errors[i].column, "Error column should be " + item.errors[i].column);
+ assert.equal(messages[i].column, item.errors[i].column, `Error column should be ${item.errors[i].column}`);
}
if (item.errors[i].hasOwnProperty("endLine")) {
- assert.equal(messages[i].endLine, item.errors[i].endLine, "Error endLine should be " + item.errors[i].endLine);
+ assert.equal(messages[i].endLine, item.errors[i].endLine, `Error endLine should be ${item.errors[i].endLine}`);
}
if (item.errors[i].hasOwnProperty("endColumn")) {
- assert.equal(messages[i].endColumn, item.errors[i].endColumn, "Error endColumn should be " + item.errors[i].endColumn);
+ assert.equal(messages[i].endColumn, item.errors[i].endColumn, `Error endColumn should be ${item.errors[i].endColumn}`);
}
} else {
diff --git a/tools/eslint/lib/timing.js b/tools/eslint/lib/timing.js
index b9394af47c..627aa5f82f 100644
--- a/tools/eslint/lib/timing.js
+++ b/tools/eslint/lib/timing.js
@@ -66,7 +66,7 @@ function display(data) {
.slice(0, 10);
rows.forEach(function(row) {
- row.push((row[1] * 100 / total).toFixed(1) + "%");
+ row.push(`${(row[1] * 100 / total).toFixed(1)}%`);
row[1] = row[1].toFixed(3);
});
diff --git a/tools/eslint/lib/util/glob-util.js b/tools/eslint/lib/util/glob-util.js
index 03d1a2bdd9..cba2e694ad 100644
--- a/tools/eslint/lib/util/glob-util.js
+++ b/tools/eslint/lib/util/glob-util.js
@@ -50,9 +50,9 @@ function processPath(options) {
let suffix = "/**";
if (extensions.length === 1) {
- suffix += "/*." + extensions[0];
+ suffix += `/*.${extensions[0]}`;
} else {
- suffix += "/*.{" + extensions.join(",") + "}";
+ suffix += `/*.{${extensions.join(",")}}`;
}
/**
diff --git a/tools/eslint/lib/util/module-resolver.js b/tools/eslint/lib/util/module-resolver.js
index d59413c505..40c107a70e 100644
--- a/tools/eslint/lib/util/module-resolver.js
+++ b/tools/eslint/lib/util/module-resolver.js
@@ -71,7 +71,7 @@ ModuleResolver.prototype = {
const result = Module._findPath(name, lookupPaths); // eslint-disable-line no-underscore-dangle
if (!result) {
- throw new Error("Cannot find module '" + name + "'");
+ throw new Error(`Cannot find module '${name}'`);
}
return result;
diff --git a/tools/eslint/lib/util/node-event-generator.js b/tools/eslint/lib/util/node-event-generator.js
index 92253f6ca2..95d9132dd2 100644
--- a/tools/eslint/lib/util/node-event-generator.js
+++ b/tools/eslint/lib/util/node-event-generator.js
@@ -46,7 +46,7 @@ NodeEventGenerator.prototype = {
* @returns {void}
*/
leaveNode: function leaveNode(node) {
- this.emitter.emit(node.type + ":exit", node);
+ this.emitter.emit(`${node.type}:exit`, node);
}
};
diff --git a/tools/eslint/lib/util/npm-util.js b/tools/eslint/lib/util/npm-util.js
index a910419403..e9131595e7 100644
--- a/tools/eslint/lib/util/npm-util.js
+++ b/tools/eslint/lib/util/npm-util.js
@@ -53,7 +53,7 @@ function installSyncSaveDev(packages) {
if (Array.isArray(packages)) {
packages = packages.join(" ");
}
- shell.exec("npm i --save-dev " + packages, {stdio: "inherit"});
+ shell.exec(`npm i --save-dev ${packages}`, {stdio: "inherit"});
}
/**
diff --git a/tools/eslint/lib/util/source-code-util.js b/tools/eslint/lib/util/source-code-util.js
index c96552f8f6..8e660e0961 100644
--- a/tools/eslint/lib/util/source-code-util.js
+++ b/tools/eslint/lib/util/source-code-util.js
@@ -36,7 +36,7 @@ function getSourceCodeOfFile(filename, options) {
if (results && results.results[0] && results.results[0].messages[0] && results.results[0].messages[0].fatal) {
const msg = results.results[0].messages[0];
- throw new Error("(" + filename + ":" + msg.line + ":" + msg.column + ") " + msg.message);
+ throw new Error(`(${filename}:${msg.line}:${msg.column}) ${msg.message}`);
}
const sourceCode = eslint.getSourceCode();
@@ -89,7 +89,7 @@ function getSourceCodeOfFiles(patterns, options, cb) {
}, []);
if (filenames.length === 0) {
- debug("Did not find any files matching pattern(s): " + patterns);
+ debug(`Did not find any files matching pattern(s): ${patterns}`);
}
filenames.forEach(function(filename) {
const sourceCode = getSourceCodeOfFile(filename, opts);
diff --git a/tools/eslint/lib/util/xml-escape.js b/tools/eslint/lib/util/xml-escape.js
index 2c3abd39d5..698abaf38e 100644
--- a/tools/eslint/lib/util/xml-escape.js
+++ b/tools/eslint/lib/util/xml-escape.js
@@ -15,7 +15,7 @@
* @private
*/
module.exports = function(s) {
- return ("" + s).replace(/[<>&"'\x00-\x1F\x7F\u0080-\uFFFF]/g, function(c) { // eslint-disable-line no-control-regex
+ return (`${s}`).replace(/[<>&"'\x00-\x1F\x7F\u0080-\uFFFF]/g, function(c) { // eslint-disable-line no-control-regex
switch (c) {
case "<":
return "&lt;";
@@ -28,7 +28,7 @@ module.exports = function(s) {
case "'":
return "&apos;";
default:
- return "&#" + c.charCodeAt(0) + ";";
+ return `&#${c.charCodeAt(0)};`;
}
});
};
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/.bin/acorn b/tools/eslint/node_modules/acorn-jsx/node_modules/.bin/acorn
new file mode 120000
index 0000000000..cf76760386
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/.bin/acorn
@@ -0,0 +1 @@
+../acorn/bin/acorn \ No newline at end of file
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/.tern-project b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/.tern-project
new file mode 100644
index 0000000000..6718ce07e1
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/.tern-project
@@ -0,0 +1,6 @@
+{
+ "plugins": {
+ "node": true,
+ "es_modules": true
+ }
+} \ No newline at end of file
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/AUTHORS b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/AUTHORS
new file mode 100644
index 0000000000..1b2061cd4b
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/AUTHORS
@@ -0,0 +1,59 @@
+List of Acorn contributors. Updated before every release.
+
+Adrian Rakovsky
+Alistair Braidwood
+Amila Welihinda
+Andres Suarez
+Angelo
+Aparajita Fishman
+Arian Stolwijk
+Artem Govorov
+Brandon Mills
+Charles Hughes
+Conrad Irwin
+Daniel Tschinder
+David Bonnet
+Domenico Matteo
+ForbesLindesay
+Forbes Lindesay
+Gilad Peleg
+impinball
+Ingvar Stepanyan
+Jackson Ray Hamilton
+Jesse McCarthy
+Jiaxing Wang
+Joel Kemp
+Johannes Herr
+Jordan Klassen
+Jürg Lehni
+keeyipchan
+Keheliya Gallaba
+Kevin Irish
+Kevin Kwok
+krator
+Marijn Haverbeke
+Martin Carlberg
+Mathias Bynens
+Mathieu 'p01' Henri
+Matthew Bastien
+Max Schaefer
+Max Zerzouri
+Mihai Bazon
+Mike Rennie
+Nicholas C. Zakas
+Nick Fitzgerald
+Olivier Thomann
+Oskar Schöldström
+Paul Harper
+Peter Rust
+PlNG
+Prayag Verma
+ReadmeCritic
+r-e-d
+Richard Gibson
+Rich Harris
+Rich-Harris
+Sebastian McKenzie
+Timothy Gu
+Toru Nagashima
+zsjforcn
diff --git a/tools/eslint/node_modules/xregexp/LICENSE b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/LICENSE
index 5561edc5d2..a35ebf44fd 100644
--- a/tools/eslint/node_modules/xregexp/LICENSE
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/LICENSE
@@ -1,6 +1,4 @@
-The MIT License
-
-Copyright (c) 2007-2016 Steven Levithan <http://xregexp.com/>
+Copyright (C) 2012-2016 by various contributors (see AUTHORS)
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/eslint/node_modules/acorn-jsx/node_modules/acorn/README.md b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/README.md
new file mode 100644
index 0000000000..0c514d5e63
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/README.md
@@ -0,0 +1,407 @@
+# Acorn
+
+[![Build Status](https://travis-ci.org/ternjs/acorn.svg?branch=master)](https://travis-ci.org/ternjs/acorn)
+[![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.com/package/acorn)
+[Author funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?force)](https://marijnhaverbeke.nl/fund/)
+
+A tiny, fast JavaScript parser, written completely in JavaScript.
+
+## Community
+
+Acorn is open source software released under an
+[MIT license](https://github.com/ternjs/acorn/blob/master/LICENSE).
+
+You are welcome to
+[report bugs](https://github.com/ternjs/acorn/issues) or create pull
+requests on [github](https://github.com/ternjs/acorn). For questions
+and discussion, please use the
+[Tern discussion forum](https://discuss.ternjs.net).
+
+## Installation
+
+The easiest way to install acorn is with [`npm`][npm].
+
+[npm]: https://www.npmjs.com/
+
+```sh
+npm install acorn
+```
+
+Alternately, download the source.
+
+```sh
+git clone https://github.com/ternjs/acorn.git
+```
+
+## Components
+
+When run in a CommonJS (node.js) or AMD environment, exported values
+appear in the interfaces exposed by the individual files, as usual.
+When loaded in the browser (Acorn works in any JS-enabled browser more
+recent than IE5) without any kind of module management, a single
+global object `acorn` will be defined, and all the exported properties
+will be added to that.
+
+### Main parser
+
+This is implemented in `dist/acorn.js`, and is what you get when you
+`require("acorn")` in node.js.
+
+**parse**`(input, options)` is used to parse a JavaScript program.
+The `input` parameter is a string, `options` can be undefined or an
+object setting some of the options listed below. The return value will
+be an abstract syntax tree object as specified by the
+[ESTree spec][estree].
+
+When encountering a syntax error, the parser will raise a
+`SyntaxError` object with a meaningful message. The error object will
+have a `pos` property that indicates the character offset at which the
+error occurred, and a `loc` object that contains a `{line, column}`
+object referring to that same position.
+
+[estree]: https://github.com/estree/estree
+
+- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
+ either 3, 5, 6, or 7. This influences support for strict mode, the set
+ of reserved words, and support for new syntax features. Default is 6.
+
+ **NOTE**: Only 'stage 4' (finalized) ECMAScript 7 features are being
+ implemented by Acorn. That means that most of the draft standard is
+ not yet being parsed.
+
+- **sourceType**: Indicate the mode the code should be parsed in. Can be
+ either `"script"` or `"module"`.
+
+- **onInsertedSemicolon**: If given a callback, that callback will be
+ called whenever a missing semicolon is inserted by the parser. The
+ callback will be given the character offset of the point where the
+ semicolon is inserted as argument, and if `locations` is on, also a
+ `{line, column}` object representing this position.
+
+- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing
+ commas.
+
+- **allowReserved**: If `false`, using a reserved word will generate
+ an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher
+ versions. When given the value `"never"`, reserved words and
+ keywords can also not be used as property names (as in Internet
+ Explorer's old parser).
+
+- **allowReturnOutsideFunction**: By default, a return statement at
+ the top level raises an error. Set this to `true` to accept such
+ code.
+
+- **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.
+
+- **allowHashBang**: When this is enabled (off by default), if the
+ code starts with the characters `#!` (as in a shellscript), the
+ first line will be treated as a comment.
+
+- **locations**: When `true`, each node has a `loc` object attached
+ with `start` and `end` subobjects, each of which contains the
+ one-based line and zero-based column numbers in `{line, column}`
+ form. Default is `false`.
+
+- **onToken**: If a function is passed for this option, each found
+ token will be passed in same format as tokens returned from
+ `tokenizer().getToken()`.
+
+ If array is passed, each found token is pushed to it.
+
+ Note that you are not allowed to call the parser from the
+ callback—that will corrupt its internal state.
+
+- **onComment**: If a function is passed for this option, whenever a
+ comment is encountered the function will be called with the
+ following parameters:
+
+ - `block`: `true` if the comment is a block comment, false if it
+ is a line comment.
+ - `text`: The content of the comment.
+ - `start`: Character offset of the start of the comment.
+ - `end`: Character offset of the end of the comment.
+
+ When the `locations` options is on, the `{line, column}` locations
+ of the comment’s start and end are passed as two additional
+ parameters.
+
+ If array is passed for this option, each found comment is pushed
+ to it as object in Esprima format:
+
+ ```javascript
+ {
+ "type": "Line" | "Block",
+ "value": "comment text",
+ "start": Number,
+ "end": Number,
+ // If `locations` option is on:
+ "loc": {
+ "start": {line: Number, column: Number}
+ "end": {line: Number, column: Number}
+ },
+ // If `ranges` option is on:
+ "range": [Number, Number]
+ }
+ ```
+
+ Note that you are not allowed to call the parser from the
+ callback—that will corrupt its internal state.
+
+- **ranges**: 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`.
+
+- **program**: It is possible to parse multiple files into a single
+ AST by passing the tree produced by parsing the first file as the
+ `program` option in subsequent parses. This will add the toplevel
+ forms of the parsed file to the "Program" (top) node of an existing
+ parse tree.
+
+- **sourceFile**: When the `locations` option is `true`, you can pass
+ this option to add a `source` attribute in every node’s `loc`
+ object. Note that the contents of this option are not examined or
+ processed in any way; you are free to use whatever format you
+ choose.
+
+- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property
+ will be added (regardless of the `location` option) directly to the
+ nodes, rather than the `loc` object.
+
+- **preserveParens**: If this option is `true`, parenthesized expressions
+ are represented by (non-standard) `ParenthesizedExpression` nodes
+ that have a single `expression` property containing the expression
+ inside parentheses.
+
+[range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
+
+**parseExpressionAt**`(input, offset, options)` will parse a single
+expression in a string, and return its AST. It will not complain if
+there is more of the string left after the expression.
+
+**getLineInfo**`(input, offset)` can be used to get a `{line,
+column}` object for a given program string and character offset.
+
+**tokenizer**`(input, options)` returns an object with a `getToken`
+method that can be called repeatedly to get the next token, a `{start,
+end, type, value}` object (with added `loc` property when the
+`locations` option is enabled and `range` property when the `ranges`
+option is enabled). When the token's type is `tokTypes.eof`, you
+should stop calling the method, since it will keep returning that same
+token forever.
+
+In ES6 environment, returned result can be used as any other
+protocol-compliant iterable:
+
+```javascript
+for (let token of acorn.tokenizer(str)) {
+ // iterate over the tokens
+}
+
+// transform code to array of tokens:
+var tokens = [...acorn.tokenizer(str)];
+```
+
+**tokTypes** holds an object mapping names to the token type objects
+that end up in the `type` properties of tokens.
+
+#### Note on using with [Escodegen][escodegen]
+
+Escodegen supports generating comments from AST, attached in
+Esprima-specific format. In order to simulate same format in
+Acorn, consider following example:
+
+```javascript
+var comments = [], tokens = [];
+
+var ast = acorn.parse('var x = 42; // answer', {
+ // collect ranges for each node
+ ranges: true,
+ // collect comments in Esprima's format
+ onComment: comments,
+ // collect token ranges
+ onToken: tokens
+});
+
+// attach comments using collected information
+escodegen.attachComments(ast, comments, tokens);
+
+// generate code
+console.log(escodegen.generate(ast, {comment: true}));
+// > 'var x = 42; // answer'
+```
+
+[escodegen]: https://github.com/estools/escodegen
+
+### dist/acorn_loose.js ###
+
+This file implements an error-tolerant parser. It exposes a single
+function. The loose parser is accessible in node.js via `require("acorn/dist/acorn_loose")`.
+
+**parse_dammit**`(input, options)` takes the same arguments and
+returns the same syntax tree as the `parse` function in `acorn.js`,
+but never raises an error, and will do its best to parse syntactically
+invalid code in as meaningful a way as it can. It'll insert identifier
+nodes with name `"✖"` as placeholders in places where it can't make
+sense of the input. Depends on `acorn.js`, because it uses the same
+tokenizer.
+
+### dist/walk.js ###
+
+Implements an abstract syntax tree walker. Will store its interface in
+`acorn.walk` when loaded without a module system.
+
+**simple**`(node, visitors, base, state)` does a 'simple' walk over
+a tree. `node` should be the AST node to walk, and `visitors` an
+object with properties whose names correspond to node types in the
+[ESTree spec][estree]. The properties should contain functions
+that will be called with the node object and, if applicable the state
+at that point. The last two arguments are optional. `base` is a walker
+algorithm, and `state` is a start state. The default walker will
+simply visit all statements and expressions and not produce a
+meaningful state. (An example of a use of state is to track scope at
+each point in the tree.)
+
+**ancestor**`(node, visitors, base, state)` does a 'simple' walk over
+a tree, building up an array of ancestor nodes (including the current node)
+and passing the array to the callbacks as a third parameter.
+
+**recursive**`(node, state, functions, base)` does a 'recursive'
+walk, where the walker functions are responsible for continuing the
+walk on the child nodes of their target node. `state` is the start
+state, and `functions` should contain an object that maps node types
+to walker functions. Such functions are called with `(node, state, c)`
+arguments, and can cause the walk to continue on a sub-node by calling
+the `c` argument on it with `(node, state)` arguments. The optional
+`base` argument provides the fallback walker functions for node types
+that aren't handled in the `functions` object. If not given, the
+default walkers will be used.
+
+**make**`(functions, base)` builds a new walker object by using the
+walker functions in `functions` and filling in the missing ones by
+taking defaults from `base`.
+
+**findNodeAt**`(node, start, end, test, base, state)` tries to
+locate a node in a tree at the given start and/or end offsets, which
+satisfies the predicate `test`. `start` and `end` can be either `null`
+(as wildcard) or a number. `test` may be a string (indicating a node
+type) or a function that takes `(nodeType, node)` arguments and
+returns a boolean indicating whether this node is interesting. `base`
+and `state` are optional, and can be used to specify a custom walker.
+Nodes are tested from inner to outer, so if two nodes match the
+boundaries, the inner one will be preferred.
+
+**findNodeAround**`(node, pos, test, base, state)` is a lot like
+`findNodeAt`, but will match any node that exists 'around' (spanning)
+the given position.
+
+**findNodeAfter**`(node, pos, test, base, state)` is similar to
+`findNodeAround`, but will match all nodes *after* the given position
+(testing outer nodes before inner nodes).
+
+## Command line interface
+
+The `bin/acorn` utility can be used to parse a file from the command
+line. It accepts as arguments its input file and the following
+options:
+
+- `--ecma3|--ecma5|--ecma6|--ecma7`: Sets the ECMAScript version to parse. Default is
+ version 5.
+
+- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise.
+
+- `--locations`: Attaches a "loc" object to each node with "start" and
+ "end" subobjects, each of which contains the one-based line and
+ zero-based column numbers in `{line, column}` form.
+
+- `--allow-hash-bang`: If the code starts with the characters #! (as in a shellscript), the first line will be treated as a comment.
+
+- `--compact`: No whitespace is used in the AST output.
+
+- `--silent`: Do not output the AST, just return the exit status.
+
+- `--help`: Print the usage information and quit.
+
+The utility spits out the syntax tree as JSON data.
+
+## Build system
+
+Acorn is written in ECMAScript 6, as a set of small modules, in the
+project's `src` directory, and compiled down to bigger ECMAScript 3
+files in `dist` using [Browserify](http://browserify.org) and
+[Babel](http://babeljs.io/). If you are already using Babel, you can
+consider including the modules directly.
+
+The command-line test runner (`npm test`) uses the ES6 modules. The
+browser-based test page (`test/index.html`) uses the compiled modules.
+The `bin/build-acorn.js` script builds the latter from the former.
+
+If you are working on Acorn, you'll probably want to try the code out
+directly, without an intermediate build step. In your scripts, you can
+register the Babel require shim like this:
+
+ require("babel-core/register")
+
+That will allow you to directly `require` the ES6 modules.
+
+## Plugins
+
+Acorn is designed support allow plugins which, within reasonable
+bounds, redefine the way the parser works. Plugins can add new token
+types and new tokenizer contexts (if necessary), and extend methods in
+the parser object. This is not a clean, elegant API—using it requires
+an understanding of Acorn's internals, and plugins are likely to break
+whenever those internals are significantly changed. But still, it is
+_possible_, in this way, to create parsers for JavaScript dialects
+without forking all of Acorn. And in principle it is even possible to
+combine such plugins, so that if you have, for example, a plugin for
+parsing types and a plugin for parsing JSX-style XML literals, you
+could load them both and parse code with both JSX tags and types.
+
+A plugin should register itself by adding a property to
+`acorn.plugins`, which holds a function. Calling `acorn.parse`, a
+`plugins` option can be passed, holding an object mapping plugin names
+to configuration values (or just `true` for plugins that don't take
+options). After the parser object has been created, the initialization
+functions for the chosen plugins are called with `(parser,
+configValue)` arguments. They are expected to use the `parser.extend`
+method to extend parser methods. For example, the `readToken` method
+could be extended like this:
+
+```javascript
+parser.extend("readToken", function(nextMethod) {
+ return function(code) {
+ console.log("Reading a token!")
+ return nextMethod.call(this, code)
+ }
+})
+```
+
+The `nextMethod` argument passed to `extend`'s second argument is the
+previous value of this method, and should usually be called through to
+whenever the extended method does not handle the call itself.
+
+Similarly, the loose parser allows plugins to register themselves via
+`acorn.pluginsLoose`. The extension mechanism is the same as for the
+normal parser:
+
+```javascript
+looseParser.extend("readToken", function(nextMethod) {
+ return function() {
+ console.log("Reading a token in the loose parser!")
+ return nextMethod.call(this)
+ }
+})
+```
+
+### Existing plugins
+
+ - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx)
+ - [`acorn-es7-plugin`](https://github.com/MatAtBread/acorn-es7-plugin/): Parse [async/await syntax proposal](https://github.com/tc39/ecmascript-asyncawait)
+ - [`acorn-object-spread`](https://github.com/UXtemple/acorn-object-spread): Parse [object spread syntax proposal](https://github.com/sebmarkbage/ecmascript-rest-spread)
+ - [`acorn-es7`](https://www.npmjs.com/package/acorn-es7): Parse [decorator syntax proposal](https://github.com/wycats/javascript-decorators)
+ - [`acorn-objj`](https://www.npmjs.com/package/acorn-objj): [Objective-J](http://www.cappuccino-project.org/learn/objective-j.html) language parser built as Acorn plugin
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/acorn b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/acorn
new file mode 100755
index 0000000000..cf4acd5631
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/acorn
@@ -0,0 +1,65 @@
+#!/usr/bin/env node
+'use strict';
+
+var path = require('path');
+var fs = require('fs');
+var acorn = require('../dist/acorn.js');
+
+var infile;
+var forceFile;
+var silent = false;
+var compact = false;
+var tokenize = false;
+var options = {}
+
+function help(status) {
+ var print = (status == 0) ? console.log : console.error
+ print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7]")
+ print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]")
+ process.exit(status)
+}
+
+for (var i = 2; i < process.argv.length; ++i) {
+ var arg = process.argv[i]
+ if ((arg == "-" || arg[0] != "-") && !infile) infile = arg
+ else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i]
+ else if (arg == "--ecma3") options.ecmaVersion = 3
+ else if (arg == "--ecma5") options.ecmaVersion = 5
+ else if (arg == "--ecma6") options.ecmaVersion = 6
+ else if (arg == "--ecma7") options.ecmaVersion = 7
+ else if (arg == "--locations") options.locations = true
+ else if (arg == "--allow-hash-bang") options.allowHashBang = true
+ else if (arg == "--silent") silent = true
+ else if (arg == "--compact") compact = true
+ else if (arg == "--help") help(0)
+ else if (arg == "--tokenize") tokenize = true
+ else if (arg == "--module") options.sourceType = 'module'
+ else help(1)
+}
+
+function run(code) {
+ var result
+ if (!tokenize) {
+ try { result = acorn.parse(code, options) }
+ catch(e) { console.error(e.message); process.exit(1) }
+ } else {
+ result = []
+ var tokenizer = acorn.tokenizer(code, options), token
+ while (true) {
+ try { token = tokenizer.getToken() }
+ catch(e) { console.error(e.message); process.exit(1) }
+ result.push(token)
+ if (token.type == acorn.tokTypes.eof) break
+ }
+ }
+ if (!silent) console.log(JSON.stringify(result, null, compact ? null : 2))
+}
+
+if (forceFile || infile && infile != "-") {
+ run(fs.readFileSync(infile, "utf8"))
+} else {
+ var code = ""
+ process.stdin.resume()
+ process.stdin.on("data", function (chunk) { return code += chunk; })
+ process.stdin.on("end", function () { return run(code); })
+} \ No newline at end of file
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js
new file mode 100644
index 0000000000..100e8cf280
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js
@@ -0,0 +1,55 @@
+'use strict';
+
+// Which Unicode version should be used?
+var version = '9.0.0';
+
+var start = require('unicode-' + version + '/Binary_Property/ID_Start/code-points.js')
+ .filter(function(ch) { return ch > 0x7f; });
+var last = -1;
+var cont = [0x200c, 0x200d].concat(require('unicode-' + version + '/Binary_Property/ID_Continue/code-points.js')
+ .filter(function(ch) { return ch > 0x7f && search(start, ch, last + 1) == -1; }));
+
+function search(arr, ch, starting) {
+ for (var i = starting; arr[i] <= ch && i < arr.length; last = i++)
+ if (arr[i] === ch)
+ return i;
+ return -1;
+}
+
+function pad(str, width) {
+ while (str.length < width) str = "0" + str;
+ return str;
+}
+
+function esc(code) {
+ var hex = code.toString(16);
+ if (hex.length <= 2) return "\\x" + pad(hex, 2);
+ else return "\\u" + pad(hex, 4);
+}
+
+function generate(chars) {
+ var astral = [], re = "";
+ for (var i = 0, at = 0x10000; i < chars.length; i++) {
+ var from = chars[i], to = from;
+ while (i < chars.length - 1 && chars[i + 1] == to + 1) {
+ i++;
+ to++;
+ }
+ if (to <= 0xffff) {
+ if (from == to) re += esc(from);
+ else if (from + 1 == to) re += esc(from) + esc(to);
+ else re += esc(from) + "-" + esc(to);
+ } else {
+ astral.push(from - at, to - from);
+ at = to;
+ }
+ }
+ return {nonASCII: re, astral: astral};
+}
+
+var startData = generate(start), contData = generate(cont);
+
+console.log("let nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\"");
+console.log("let nonASCIIidentifierChars = \"" + contData.nonASCII + "\"");
+console.log("const astralIdentifierStartCodes = " + JSON.stringify(startData.astral));
+console.log("const astralIdentifierCodes = " + JSON.stringify(contData.astral));
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh
new file mode 100755
index 0000000000..466c8db586
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh
@@ -0,0 +1,6 @@
+# Combine existing list of authors with everyone known in git, sort, add header.
+tail --lines=+3 AUTHORS > AUTHORS.tmp
+git log --format='%aN' | grep -v abraidwood >> AUTHORS.tmp
+echo -e "List of Acorn contributors. Updated before every release.\n" > AUTHORS
+sort -u AUTHORS.tmp >> AUTHORS
+rm -f AUTHORS.tmp
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/.keep b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/.keep
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/.keep
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js
new file mode 100644
index 0000000000..4460957fd7
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js
@@ -0,0 +1,3112 @@
+// Reserved word lists for various dialects of the language
+
+var reservedWords = {
+ 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
+ 5: "class enum extends super const export import",
+ 6: "enum",
+ 7: "enum",
+ strict: "implements interface let package private protected public static yield",
+ strictBind: "eval arguments"
+}
+
+// And the keywords
+
+var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"
+
+var keywords = {
+ 5: ecma5AndLessKeywords,
+ 6: ecma5AndLessKeywords + " const class extends export import 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`.
+
+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\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"
+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\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\u0d01-\u0d03\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\u1cf8\u1cf9\u1dc0-\u1df5\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
+var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,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,449,56,264,8,2,36,18,0,50,29,881,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,0,32,6124,20,754,9486,1,3071,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,10591,541]
+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,838,7,2,7,17,9,57,21,2,13,19882,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
+ }
+}
+
+// Test whether a given character code starts an identifier.
+
+function isIdentifierStart(code, astral) {
+ if (code < 65) return code === 36
+ if (code < 91) return true
+ if (code < 97) return code === 95
+ if (code < 123) return true
+ if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))
+ if (astral === false) return false
+ return isInAstralSet(code, astralIdentifierStartCodes)
+}
+
+// Test whether a given character is part of an identifier.
+
+function isIdentifierChar(code, astral) {
+ if (code < 48) return code === 36
+ if (code < 58) return true
+ if (code < 65) return false
+ if (code < 91) return true
+ if (code < 97) return code === 95
+ if (code < 123) return true
+ if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code))
+ if (astral === false) return false
+ return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)
+}
+
+// ## Token types
+
+// The assignment of fine-grained, information-carrying type objects
+// allows the tokenizer to store the information it has about a
+// token in a way that is very cheap for the parser to look up.
+
+// All token type variables start with an underscore, to make them
+// easy to recognize.
+
+// The `beforeExpr` property is used to disambiguate between regular
+// expressions and divisions. It is set on all token types that can
+// be followed by an expression (thus, a slash after them would be a
+// regular expression).
+//
+// The `startsExpr` property is used to check if the token ends a
+// `yield` expression. It is set on all token types that either can
+// directly start an expression (like a quotation mark) or can
+// continue an expression (like the body of a string).
+//
+// `isLoop` marks a keyword as starting a loop, which is important
+// to know when parsing a label, in order to allow or disallow
+// continue jumps to that label.
+
+var TokenType = function TokenType(label, conf) {
+ if ( conf === void 0 ) conf = {};
+
+ this.label = label
+ this.keyword = conf.keyword
+ this.beforeExpr = !!conf.beforeExpr
+ this.startsExpr = !!conf.startsExpr
+ this.isLoop = !!conf.isLoop
+ this.isAssign = !!conf.isAssign
+ this.prefix = !!conf.prefix
+ this.postfix = !!conf.postfix
+ this.binop = conf.binop || null
+ this.updateContext = null
+};
+
+function binop(name, prec) {
+ return new TokenType(name, {beforeExpr: true, binop: prec})
+}
+var beforeExpr = {beforeExpr: true};
+var startsExpr = {startsExpr: true};
+// Map keyword names to token types.
+
+var keywordTypes = {}
+
+// Succinct definitions of keyword token types
+function kw(name, options) {
+ if ( options === void 0 ) options = {};
+
+ options.keyword = name
+ return keywordTypes[name] = new TokenType(name, options)
+}
+
+var tt = {
+ num: new TokenType("num", startsExpr),
+ regexp: new TokenType("regexp", startsExpr),
+ string: new TokenType("string", startsExpr),
+ name: new TokenType("name", startsExpr),
+ eof: new TokenType("eof"),
+
+ // Punctuation token types.
+ bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}),
+ bracketR: new TokenType("]"),
+ braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}),
+ braceR: new TokenType("}"),
+ parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}),
+ parenR: new TokenType(")"),
+ comma: new TokenType(",", beforeExpr),
+ semi: new TokenType(";", beforeExpr),
+ colon: new TokenType(":", beforeExpr),
+ dot: new TokenType("."),
+ question: new TokenType("?", beforeExpr),
+ arrow: new TokenType("=>", beforeExpr),
+ template: new TokenType("template"),
+ ellipsis: new TokenType("...", beforeExpr),
+ backQuote: new TokenType("`", startsExpr),
+ dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}),
+
+ // Operators. These carry several kinds of properties to help the
+ // parser use them properly (the presence of these properties is
+ // what categorizes them as operators).
+ //
+ // `binop`, when present, specifies that this operator is a binary
+ // operator, and will refer to its precedence.
+ //
+ // `prefix` and `postfix` mark the operator as a prefix or postfix
+ // unary operator.
+ //
+ // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
+ // binary operators with a very low precedence, that should result
+ // in AssignmentExpression nodes.
+
+ eq: new TokenType("=", {beforeExpr: true, isAssign: true}),
+ assign: new TokenType("_=", {beforeExpr: true, isAssign: true}),
+ incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}),
+ prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}),
+ logicalOR: binop("||", 1),
+ logicalAND: binop("&&", 2),
+ bitwiseOR: binop("|", 3),
+ bitwiseXOR: binop("^", 4),
+ bitwiseAND: binop("&", 5),
+ equality: binop("==/!=", 6),
+ relational: binop("</>", 7),
+ bitShift: binop("<</>>", 8),
+ plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),
+ modulo: binop("%", 10),
+ star: binop("*", 10),
+ slash: binop("/", 10),
+ starstar: new TokenType("**", {beforeExpr: true}),
+
+ // Keyword token types.
+ _break: kw("break"),
+ _case: kw("case", beforeExpr),
+ _catch: kw("catch"),
+ _continue: kw("continue"),
+ _debugger: kw("debugger"),
+ _default: kw("default", beforeExpr),
+ _do: kw("do", {isLoop: true, beforeExpr: true}),
+ _else: kw("else", beforeExpr),
+ _finally: kw("finally"),
+ _for: kw("for", {isLoop: true}),
+ _function: kw("function", startsExpr),
+ _if: kw("if"),
+ _return: kw("return", beforeExpr),
+ _switch: kw("switch"),
+ _throw: kw("throw", beforeExpr),
+ _try: kw("try"),
+ _var: kw("var"),
+ _const: kw("const"),
+ _while: kw("while", {isLoop: true}),
+ _with: kw("with"),
+ _new: kw("new", {beforeExpr: true, startsExpr: true}),
+ _this: kw("this", startsExpr),
+ _super: kw("super", startsExpr),
+ _class: kw("class"),
+ _extends: kw("extends", beforeExpr),
+ _export: kw("export"),
+ _import: kw("import"),
+ _null: kw("null", startsExpr),
+ _true: kw("true", startsExpr),
+ _false: kw("false", startsExpr),
+ _in: kw("in", {beforeExpr: true, binop: 7}),
+ _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}),
+ _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true})
+}
+
+// Matches a whole line break (where CRLF is considered a single
+// line break). Used to count lines.
+
+var lineBreak = /\r\n?|\n|\u2028|\u2029/
+var lineBreakG = new RegExp(lineBreak.source, "g")
+
+function isNewLine(code) {
+ return code === 10 || code === 13 || code === 0x2028 || code == 0x2029
+}
+
+var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/
+
+var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g
+
+function isArray(obj) {
+ return Object.prototype.toString.call(obj) === "[object Array]"
+}
+
+// Checks if an object has a property.
+
+function has(obj, propName) {
+ return Object.prototype.hasOwnProperty.call(obj, propName)
+}
+
+// These are used when `options.locations` is on, for the
+// `startLoc` and `endLoc` properties.
+
+var Position = function Position(line, col) {
+ this.line = line
+ this.column = col
+};
+
+Position.prototype.offset = function offset (n) {
+ return new Position(this.line, this.column + n)
+};
+
+var SourceLocation = function SourceLocation(p, start, end) {
+ this.start = start
+ this.end = end
+ if (p.sourceFile !== null) this.source = p.sourceFile
+};
+
+// The `getLineInfo` function is mostly useful when the
+// `locations` option is off (for performance reasons) and you
+// want to find the line/column position for a given character
+// offset. `input` should be the code string that the offset refers
+// into.
+
+function getLineInfo(input, offset) {
+ for (var line = 1, cur = 0;;) {
+ lineBreakG.lastIndex = cur
+ var match = lineBreakG.exec(input)
+ if (match && match.index < offset) {
+ ++line
+ cur = match.index + match[0].length
+ } else {
+ return new Position(line, offset - cur)
+ }
+ }
+}
+
+// A second optional argument can be given to further configure
+// the parser process. These options are recognized:
+
+var defaultOptions = {
+ // `ecmaVersion` indicates the ECMAScript version to parse. Must
+ // be either 3, or 5, or 6. This influences support for strict
+ // mode, the set of reserved words, support for getters and
+ // setters and other features. The default is 6.
+ ecmaVersion: 6,
+ // Source type ("script" or "module") for different semantics
+ sourceType: "script",
+ // `onInsertedSemicolon` can be a callback that will be called
+ // when a semicolon is automatically inserted. It will be passed
+ // th position of the comma as an offset, and if `locations` is
+ // enabled, it is given the location as a `{line, column}` object
+ // as second argument.
+ onInsertedSemicolon: null,
+ // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
+ // trailing commas.
+ onTrailingComma: null,
+ // By default, reserved words are only enforced if ecmaVersion >= 5.
+ // Set `allowReserved` to a boolean value to explicitly turn this on
+ // an off. When this option has the value "never", reserved words
+ // and keywords can also not be used as property names.
+ allowReserved: null,
+ // When enabled, a return at the top level is not considered an
+ // error.
+ allowReturnOutsideFunction: false,
+ // When enabled, import/export statements are not constrained to
+ // appearing at the top of the program.
+ allowImportExportEverywhere: false,
+ // When enabled, hashbang directive in the beginning of file
+ // is allowed and treated as a line comment.
+ allowHashBang: false,
+ // When `locations` is on, `loc` properties holding objects with
+ // `start` and `end` properties in `{line, column}` form (with
+ // line being 1-based and column 0-based) will be attached to the
+ // nodes.
+ locations: false,
+ // A function can be passed as `onToken` option, which will
+ // cause Acorn to call that function with object in the same
+ // format as tokens returned from `tokenizer().getToken()`. Note
+ // that you are not allowed to call the parser from the
+ // callback—that will corrupt its internal state.
+ onToken: null,
+ // A function can be passed as `onComment` option, which will
+ // cause Acorn to call that function with `(block, text, start,
+ // end)` parameters whenever a comment is skipped. `block` is a
+ // boolean indicating whether this is a block (`/* */`) comment,
+ // `text` is the content of the comment, and `start` and `end` are
+ // character offsets that denote the start and end of the comment.
+ // When the `locations` option is on, two more parameters are
+ // passed, the full `{line, column}` locations of the start and
+ // end of the comments. Note that you are not allowed to call the
+ // parser from the callback—that will corrupt its internal state.
+ onComment: null,
+ // Nodes have their start and end characters offsets recorded in
+ // `start` and `end` properties (directly on the node, rather than
+ // the `loc` object, which holds line/column data. To also add a
+ // [semi-standardized][range] `range` property holding a `[start,
+ // end]` array with the same numbers, set the `ranges` option to
+ // `true`.
+ //
+ // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
+ ranges: false,
+ // It is possible to parse multiple files into a single AST by
+ // passing the tree produced by parsing the first file as
+ // `program` option in subsequent parses. This will add the
+ // toplevel forms of the parsed file to the `Program` (top) node
+ // of an existing parse tree.
+ program: null,
+ // When `locations` is on, you can pass this to record the source
+ // file in every node's `loc` object.
+ sourceFile: null,
+ // This value, if given, is stored in every node, whether
+ // `locations` is on or off.
+ directSourceFile: null,
+ // When enabled, parenthesized expressions are represented by
+ // (non-standard) ParenthesizedExpression nodes
+ preserveParens: false,
+ plugins: {}
+}
+
+// Interpret and default an options object
+
+function getOptions(opts) {
+ var options = {}
+ for (var opt in defaultOptions)
+ options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]
+ if (options.allowReserved == null)
+ options.allowReserved = options.ecmaVersion < 5
+
+ if (isArray(options.onToken)) {
+ var tokens = options.onToken
+ options.onToken = function (token) { return tokens.push(token); }
+ }
+ if (isArray(options.onComment))
+ options.onComment = pushComment(options, options.onComment)
+
+ return options
+}
+
+function pushComment(options, array) {
+ return function (block, text, start, end, startLoc, endLoc) {
+ var comment = {
+ type: block ? 'Block' : 'Line',
+ value: text,
+ start: start,
+ end: end
+ }
+ if (options.locations)
+ comment.loc = new SourceLocation(this, startLoc, endLoc)
+ if (options.ranges)
+ comment.range = [start, end]
+ array.push(comment)
+ }
+}
+
+// Registered plugins
+var plugins = {}
+
+function keywordRegexp(words) {
+ return new RegExp("^(" + words.replace(/ /g, "|") + ")$")
+}
+
+var Parser = function Parser(options, input, startPos) {
+ this.options = options = getOptions(options)
+ this.sourceFile = options.sourceFile
+ this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5])
+ var reserved = options.allowReserved ? "" :
+ reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : "")
+ this.reservedWords = keywordRegexp(reserved)
+ var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict
+ this.reservedWordsStrict = keywordRegexp(reservedStrict)
+ this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + reservedWords.strictBind)
+ this.input = String(input)
+
+ // Used to signal to callers of `readWord1` whether the word
+ // contained any escape sequences. This is needed because words with
+ // escape sequences must not be interpreted as keywords.
+ this.containsEsc = false
+
+ // Load plugins
+ this.loadPlugins(options.plugins)
+
+ // Set up token state
+
+ // The current position of the tokenizer in the input.
+ if (startPos) {
+ this.pos = startPos
+ this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos))
+ this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length
+ } else {
+ this.pos = this.lineStart = 0
+ this.curLine = 1
+ }
+
+ // Properties of the current token:
+ // Its type
+ this.type = tt.eof
+ // For tokens that include more information than their type, the value
+ this.value = null
+ // Its start and end offset
+ this.start = this.end = this.pos
+ // And, if locations are used, the {line, column} object
+ // corresponding to those offsets
+ this.startLoc = this.endLoc = this.curPosition()
+
+ // Position information for the previous token
+ this.lastTokEndLoc = this.lastTokStartLoc = null
+ this.lastTokStart = this.lastTokEnd = this.pos
+
+ // The context stack is used to superficially track syntactic
+ // context to predict whether a regular expression is allowed in a
+ // given position.
+ this.context = this.initialContext()
+ this.exprAllowed = true
+
+ // Figure out if it's a module code.
+ this.strict = this.inModule = options.sourceType === "module"
+
+ // Used to signify the start of a potential arrow function
+ this.potentialArrowAt = -1
+
+ // Flags to track whether we are in a function, a generator.
+ this.inFunction = this.inGenerator = false
+ // Labels in scope.
+ this.labels = []
+
+ // If enabled, skip leading hashbang line.
+ if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!')
+ this.skipLineComment(2)
+};
+
+// DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them
+Parser.prototype.isKeyword = function isKeyword (word) { return this.keywords.test(word) };
+Parser.prototype.isReservedWord = function isReservedWord (word) { return this.reservedWords.test(word) };
+
+Parser.prototype.extend = function extend (name, f) {
+ this[name] = f(this[name])
+};
+
+Parser.prototype.loadPlugins = function loadPlugins (pluginConfigs) {
+ var this$1 = this;
+
+ for (var name in pluginConfigs) {
+ var plugin = plugins[name]
+ if (!plugin) throw new Error("Plugin '" + name + "' not found")
+ plugin(this$1, pluginConfigs[name])
+ }
+};
+
+Parser.prototype.parse = function parse () {
+ var node = this.options.program || this.startNode()
+ this.nextToken()
+ return this.parseTopLevel(node)
+};
+
+var pp = Parser.prototype
+
+// ## Parser utilities
+
+// Test whether a statement node is the string literal `"use strict"`.
+
+pp.isUseStrict = function(stmt) {
+ return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" &&
+ stmt.expression.type === "Literal" &&
+ stmt.expression.raw.slice(1, -1) === "use strict"
+}
+
+// Predicate that tests whether the next token is of the given
+// type, and if yes, consumes it as a side effect.
+
+pp.eat = function(type) {
+ if (this.type === type) {
+ this.next()
+ return true
+ } else {
+ return false
+ }
+}
+
+// Tests whether parsed token is a contextual keyword.
+
+pp.isContextual = function(name) {
+ return this.type === tt.name && this.value === name
+}
+
+// Consumes contextual keyword if possible.
+
+pp.eatContextual = function(name) {
+ return this.value === name && this.eat(tt.name)
+}
+
+// Asserts that following token is given contextual keyword.
+
+pp.expectContextual = function(name) {
+ if (!this.eatContextual(name)) this.unexpected()
+}
+
+// Test whether a semicolon can be inserted at the current position.
+
+pp.canInsertSemicolon = function() {
+ return this.type === tt.eof ||
+ this.type === tt.braceR ||
+ lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
+}
+
+pp.insertSemicolon = function() {
+ if (this.canInsertSemicolon()) {
+ if (this.options.onInsertedSemicolon)
+ this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc)
+ return true
+ }
+}
+
+// Consume a semicolon, or, failing that, see if we are allowed to
+// pretend that there is a semicolon at this position.
+
+pp.semicolon = function() {
+ if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected()
+}
+
+pp.afterTrailingComma = function(tokType) {
+ if (this.type == tokType) {
+ if (this.options.onTrailingComma)
+ this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc)
+ this.next()
+ return true
+ }
+}
+
+// Expect a token of a given type. If found, consume it, otherwise,
+// raise an unexpected token error.
+
+pp.expect = function(type) {
+ this.eat(type) || this.unexpected()
+}
+
+// Raise an unexpected token error.
+
+pp.unexpected = function(pos) {
+ this.raise(pos != null ? pos : this.start, "Unexpected token")
+}
+
+var DestructuringErrors = function DestructuringErrors() {
+ this.shorthandAssign = 0
+ this.trailingComma = 0
+};
+
+pp.checkPatternErrors = function(refDestructuringErrors, andThrow) {
+ var trailing = refDestructuringErrors && refDestructuringErrors.trailingComma
+ if (!andThrow) return !!trailing
+ if (trailing) this.raise(trailing, "Comma is not permitted after the rest element")
+}
+
+pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
+ var pos = refDestructuringErrors && refDestructuringErrors.shorthandAssign
+ if (!andThrow) return !!pos
+ if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns")
+}
+
+var pp$1 = Parser.prototype
+
+// ### Statement parsing
+
+// Parse a program. Initializes the parser, reads any number of
+// statements, and wraps them in a Program node. Optionally takes a
+// `program` argument. If present, the statements will be appended
+// to its body instead of creating a new node.
+
+pp$1.parseTopLevel = function(node) {
+ var this$1 = this;
+
+ var first = true
+ if (!node.body) node.body = []
+ while (this.type !== tt.eof) {
+ var stmt = this$1.parseStatement(true, true)
+ node.body.push(stmt)
+ if (first) {
+ if (this$1.isUseStrict(stmt)) this$1.setStrict(true)
+ first = false
+ }
+ }
+ this.next()
+ if (this.options.ecmaVersion >= 6) {
+ node.sourceType = this.options.sourceType
+ }
+ return this.finishNode(node, "Program")
+}
+
+var loopLabel = {kind: "loop"};
+var switchLabel = {kind: "switch"};
+pp$1.isLet = function() {
+ if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false
+ skipWhiteSpace.lastIndex = this.pos
+ var skip = skipWhiteSpace.exec(this.input)
+ var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next)
+ if (nextCh === 91 || nextCh == 123) return true // '{' and '['
+ if (isIdentifierStart(nextCh, true)) {
+ for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {}
+ var ident = this.input.slice(next, pos)
+ if (!this.isKeyword(ident)) return true
+ }
+ return false
+}
+
+// Parse a single statement.
+//
+// If expecting a statement and finding a slash operator, parse a
+// regular expression literal. This is to handle cases like
+// `if (foo) /blah/.exec(foo)`, where looking at the previous token
+// does not help.
+
+pp$1.parseStatement = function(declaration, topLevel) {
+ var starttype = this.type, node = this.startNode(), kind
+
+ if (this.isLet()) {
+ starttype = tt._var
+ kind = "let"
+ }
+
+ // Most types of statements are recognized by the keyword they
+ // start with. Many are trivial to parse, some require a bit of
+ // complexity.
+
+ switch (starttype) {
+ case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword)
+ case tt._debugger: return this.parseDebuggerStatement(node)
+ case tt._do: return this.parseDoStatement(node)
+ case tt._for: return this.parseForStatement(node)
+ case tt._function:
+ if (!declaration && this.options.ecmaVersion >= 6) this.unexpected()
+ return this.parseFunctionStatement(node)
+ case tt._class:
+ if (!declaration) this.unexpected()
+ return this.parseClass(node, true)
+ case tt._if: return this.parseIfStatement(node)
+ case tt._return: return this.parseReturnStatement(node)
+ case tt._switch: return this.parseSwitchStatement(node)
+ case tt._throw: return this.parseThrowStatement(node)
+ case tt._try: return this.parseTryStatement(node)
+ case tt._const: case tt._var:
+ kind = kind || this.value
+ if (!declaration && kind != "var") this.unexpected()
+ return this.parseVarStatement(node, kind)
+ case tt._while: return this.parseWhileStatement(node)
+ case tt._with: return this.parseWithStatement(node)
+ case tt.braceL: return this.parseBlock()
+ case tt.semi: return this.parseEmptyStatement(node)
+ case tt._export:
+ case tt._import:
+ if (!this.options.allowImportExportEverywhere) {
+ if (!topLevel)
+ this.raise(this.start, "'import' and 'export' may only appear at the top level")
+ if (!this.inModule)
+ this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")
+ }
+ return starttype === tt._import ? this.parseImport(node) : this.parseExport(node)
+
+ // If the statement does not start with a statement keyword or a
+ // brace, it's an ExpressionStatement or LabeledStatement. We
+ // simply start parsing an expression, and afterwards, if the
+ // next token is a colon and the expression was a simple
+ // Identifier node, we switch to interpreting it as a label.
+ default:
+ var maybeName = this.value, expr = this.parseExpression()
+ if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon))
+ return this.parseLabeledStatement(node, maybeName, expr)
+ else return this.parseExpressionStatement(node, expr)
+ }
+}
+
+pp$1.parseBreakContinueStatement = function(node, keyword) {
+ var this$1 = this;
+
+ var isBreak = keyword == "break"
+ this.next()
+ if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null
+ else if (this.type !== tt.name) this.unexpected()
+ else {
+ node.label = this.parseIdent()
+ this.semicolon()
+ }
+
+ // Verify that there is an actual destination to break or
+ // continue to.
+ for (var i = 0; i < this.labels.length; ++i) {
+ var lab = this$1.labels[i]
+ if (node.label == null || lab.name === node.label.name) {
+ if (lab.kind != null && (isBreak || lab.kind === "loop")) break
+ if (node.label && isBreak) break
+ }
+ }
+ if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword)
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
+}
+
+pp$1.parseDebuggerStatement = function(node) {
+ this.next()
+ this.semicolon()
+ return this.finishNode(node, "DebuggerStatement")
+}
+
+pp$1.parseDoStatement = function(node) {
+ this.next()
+ this.labels.push(loopLabel)
+ node.body = this.parseStatement(false)
+ this.labels.pop()
+ this.expect(tt._while)
+ node.test = this.parseParenExpression()
+ if (this.options.ecmaVersion >= 6)
+ this.eat(tt.semi)
+ else
+ this.semicolon()
+ return this.finishNode(node, "DoWhileStatement")
+}
+
+// Disambiguating between a `for` and a `for`/`in` or `for`/`of`
+// loop is non-trivial. Basically, we have to parse the init `var`
+// statement or expression, disallowing the `in` operator (see
+// the second parameter to `parseExpression`), and then check
+// whether the next token is `in` or `of`. When there is no init
+// part (semicolon immediately after the opening parenthesis), it
+// is a regular `for` loop.
+
+pp$1.parseForStatement = function(node) {
+ this.next()
+ this.labels.push(loopLabel)
+ this.expect(tt.parenL)
+ if (this.type === tt.semi) return this.parseFor(node, null)
+ var isLet = this.isLet()
+ if (this.type === tt._var || this.type === tt._const || isLet) {
+ var init$1 = this.startNode(), kind = isLet ? "let" : this.value
+ this.next()
+ this.parseVar(init$1, true, kind)
+ this.finishNode(init$1, "VariableDeclaration")
+ if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 &&
+ !(kind !== "var" && init$1.declarations[0].init))
+ return this.parseForIn(node, init$1)
+ return this.parseFor(node, init$1)
+ }
+ var refDestructuringErrors = new DestructuringErrors
+ var init = this.parseExpression(true, refDestructuringErrors)
+ if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
+ this.checkPatternErrors(refDestructuringErrors, true)
+ this.toAssignable(init)
+ this.checkLVal(init)
+ return this.parseForIn(node, init)
+ } else {
+ this.checkExpressionErrors(refDestructuringErrors, true)
+ }
+ return this.parseFor(node, init)
+}
+
+pp$1.parseFunctionStatement = function(node) {
+ this.next()
+ return this.parseFunction(node, true)
+}
+
+pp$1.parseIfStatement = function(node) {
+ this.next()
+ node.test = this.parseParenExpression()
+ node.consequent = this.parseStatement(false)
+ node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null
+ return this.finishNode(node, "IfStatement")
+}
+
+pp$1.parseReturnStatement = function(node) {
+ if (!this.inFunction && !this.options.allowReturnOutsideFunction)
+ this.raise(this.start, "'return' outside of function")
+ this.next()
+
+ // In `return` (and `break`/`continue`), the keywords with
+ // optional arguments, we eagerly look for a semicolon or the
+ // possibility to insert one.
+
+ if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null
+ else { node.argument = this.parseExpression(); this.semicolon() }
+ return this.finishNode(node, "ReturnStatement")
+}
+
+pp$1.parseSwitchStatement = function(node) {
+ var this$1 = this;
+
+ this.next()
+ node.discriminant = this.parseParenExpression()
+ node.cases = []
+ this.expect(tt.braceL)
+ this.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.
+
+ for (var cur, sawDefault = false; this.type != tt.braceR;) {
+ if (this$1.type === tt._case || this$1.type === tt._default) {
+ var isCase = this$1.type === tt._case
+ if (cur) this$1.finishNode(cur, "SwitchCase")
+ node.cases.push(cur = this$1.startNode())
+ cur.consequent = []
+ this$1.next()
+ if (isCase) {
+ cur.test = this$1.parseExpression()
+ } else {
+ if (sawDefault) this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses")
+ sawDefault = true
+ cur.test = null
+ }
+ this$1.expect(tt.colon)
+ } else {
+ if (!cur) this$1.unexpected()
+ cur.consequent.push(this$1.parseStatement(true))
+ }
+ }
+ if (cur) this.finishNode(cur, "SwitchCase")
+ this.next() // Closing brace
+ this.labels.pop()
+ return this.finishNode(node, "SwitchStatement")
+}
+
+pp$1.parseThrowStatement = function(node) {
+ this.next()
+ if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start)))
+ this.raise(this.lastTokEnd, "Illegal newline after throw")
+ node.argument = this.parseExpression()
+ this.semicolon()
+ return this.finishNode(node, "ThrowStatement")
+}
+
+// Reused empty array added for node fields that are always empty.
+
+var empty = []
+
+pp$1.parseTryStatement = function(node) {
+ this.next()
+ node.block = this.parseBlock()
+ node.handler = null
+ if (this.type === tt._catch) {
+ var clause = this.startNode()
+ this.next()
+ this.expect(tt.parenL)
+ clause.param = this.parseBindingAtom()
+ this.checkLVal(clause.param, true)
+ this.expect(tt.parenR)
+ clause.body = this.parseBlock()
+ node.handler = this.finishNode(clause, "CatchClause")
+ }
+ node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null
+ if (!node.handler && !node.finalizer)
+ this.raise(node.start, "Missing catch or finally clause")
+ return this.finishNode(node, "TryStatement")
+}
+
+pp$1.parseVarStatement = function(node, kind) {
+ this.next()
+ this.parseVar(node, false, kind)
+ this.semicolon()
+ return this.finishNode(node, "VariableDeclaration")
+}
+
+pp$1.parseWhileStatement = function(node) {
+ this.next()
+ node.test = this.parseParenExpression()
+ this.labels.push(loopLabel)
+ node.body = this.parseStatement(false)
+ this.labels.pop()
+ return this.finishNode(node, "WhileStatement")
+}
+
+pp$1.parseWithStatement = function(node) {
+ if (this.strict) this.raise(this.start, "'with' in strict mode")
+ this.next()
+ node.object = this.parseParenExpression()
+ node.body = this.parseStatement(false)
+ return this.finishNode(node, "WithStatement")
+}
+
+pp$1.parseEmptyStatement = function(node) {
+ this.next()
+ return this.finishNode(node, "EmptyStatement")
+}
+
+pp$1.parseLabeledStatement = function(node, maybeName, expr) {
+ var this$1 = this;
+
+ for (var i = 0; i < this.labels.length; ++i)
+ if (this$1.labels[i].name === maybeName) this$1.raise(expr.start, "Label '" + maybeName + "' is already declared")
+ var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null
+ for (var i$1 = this.labels.length - 1; i$1 >= 0; i$1--) {
+ var label = this$1.labels[i$1]
+ if (label.statementStart == node.start) {
+ label.statementStart = this$1.start
+ label.kind = kind
+ } else break
+ }
+ this.labels.push({name: maybeName, kind: kind, statementStart: this.start})
+ node.body = this.parseStatement(true)
+ this.labels.pop()
+ node.label = expr
+ return this.finishNode(node, "LabeledStatement")
+}
+
+pp$1.parseExpressionStatement = function(node, expr) {
+ node.expression = expr
+ this.semicolon()
+ return this.finishNode(node, "ExpressionStatement")
+}
+
+// Parse a semicolon-enclosed block of statements, handling `"use
+// strict"` declarations when `allowStrict` is true (used for
+// function bodies).
+
+pp$1.parseBlock = function(allowStrict) {
+ var this$1 = this;
+
+ var node = this.startNode(), first = true, oldStrict
+ node.body = []
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ var stmt = this$1.parseStatement(true)
+ node.body.push(stmt)
+ if (first && allowStrict && this$1.isUseStrict(stmt)) {
+ oldStrict = this$1.strict
+ this$1.setStrict(this$1.strict = true)
+ }
+ first = false
+ }
+ if (oldStrict === false) this.setStrict(false)
+ return this.finishNode(node, "BlockStatement")
+}
+
+// Parse a regular `for` loop. The disambiguation code in
+// `parseStatement` will already have parsed the init statement or
+// expression.
+
+pp$1.parseFor = function(node, init) {
+ node.init = init
+ this.expect(tt.semi)
+ node.test = this.type === tt.semi ? null : this.parseExpression()
+ this.expect(tt.semi)
+ node.update = this.type === tt.parenR ? null : this.parseExpression()
+ this.expect(tt.parenR)
+ node.body = this.parseStatement(false)
+ this.labels.pop()
+ return this.finishNode(node, "ForStatement")
+}
+
+// Parse a `for`/`in` and `for`/`of` loop, which are almost
+// same from parser's perspective.
+
+pp$1.parseForIn = function(node, init) {
+ var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement"
+ this.next()
+ node.left = init
+ node.right = this.parseExpression()
+ this.expect(tt.parenR)
+ node.body = this.parseStatement(false)
+ this.labels.pop()
+ return this.finishNode(node, type)
+}
+
+// Parse a list of variable declarations.
+
+pp$1.parseVar = function(node, isFor, kind) {
+ var this$1 = this;
+
+ node.declarations = []
+ node.kind = kind
+ for (;;) {
+ var decl = this$1.startNode()
+ this$1.parseVarId(decl)
+ if (this$1.eat(tt.eq)) {
+ decl.init = this$1.parseMaybeAssign(isFor)
+ } else if (kind === "const" && !(this$1.type === tt._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) {
+ this$1.unexpected()
+ } else if (decl.id.type != "Identifier" && !(isFor && (this$1.type === tt._in || this$1.isContextual("of")))) {
+ this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value")
+ } else {
+ decl.init = null
+ }
+ node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"))
+ if (!this$1.eat(tt.comma)) break
+ }
+ return node
+}
+
+pp$1.parseVarId = function(decl) {
+ decl.id = this.parseBindingAtom()
+ this.checkLVal(decl.id, true)
+}
+
+// Parse a function declaration or literal (depending on the
+// `isStatement` parameter).
+
+pp$1.parseFunction = function(node, isStatement, allowExpressionBody) {
+ this.initFunction(node)
+ if (this.options.ecmaVersion >= 6)
+ node.generator = this.eat(tt.star)
+ var oldInGen = this.inGenerator
+ this.inGenerator = node.generator
+ if (isStatement || this.type === tt.name)
+ node.id = this.parseIdent()
+ this.parseFunctionParams(node)
+ this.parseFunctionBody(node, allowExpressionBody)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+}
+
+pp$1.parseFunctionParams = function(node) {
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.parenR, false, false, true)
+}
+
+// Parse a class declaration or literal (depending on the
+// `isStatement` parameter).
+
+pp$1.parseClass = function(node, isStatement) {
+ var this$1 = this;
+
+ this.next()
+ this.parseClassId(node, isStatement)
+ this.parseClassSuper(node)
+ var classBody = this.startNode()
+ var hadConstructor = false
+ classBody.body = []
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ if (this$1.eat(tt.semi)) continue
+ var method = this$1.startNode()
+ var isGenerator = this$1.eat(tt.star)
+ var isMaybeStatic = this$1.type === tt.name && this$1.value === "static"
+ this$1.parsePropertyName(method)
+ method.static = isMaybeStatic && this$1.type !== tt.parenL
+ if (method.static) {
+ if (isGenerator) this$1.unexpected()
+ isGenerator = this$1.eat(tt.star)
+ this$1.parsePropertyName(method)
+ }
+ method.kind = "method"
+ var isGetSet = false
+ if (!method.computed) {
+ var key = method.key;
+ if (!isGenerator && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
+ isGetSet = true
+ method.kind = key.name
+ key = this$1.parsePropertyName(method)
+ }
+ if (!method.static && (key.type === "Identifier" && key.name === "constructor" ||
+ key.type === "Literal" && key.value === "constructor")) {
+ if (hadConstructor) this$1.raise(key.start, "Duplicate constructor in the same class")
+ if (isGetSet) this$1.raise(key.start, "Constructor can't have get/set modifier")
+ if (isGenerator) this$1.raise(key.start, "Constructor can't be a generator")
+ method.kind = "constructor"
+ hadConstructor = true
+ }
+ }
+ this$1.parseClassMethod(classBody, method, isGenerator)
+ if (isGetSet) {
+ var paramCount = method.kind === "get" ? 0 : 1
+ if (method.value.params.length !== paramCount) {
+ var start = method.value.start
+ if (method.kind === "get")
+ this$1.raiseRecoverable(start, "getter should have no params")
+ else
+ this$1.raiseRecoverable(start, "setter should have exactly one param")
+ }
+ if (method.kind === "set" && method.value.params[0].type === "RestElement")
+ this$1.raise(method.value.params[0].start, "Setter cannot use rest params")
+ }
+ }
+ node.body = this.finishNode(classBody, "ClassBody")
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
+}
+
+pp$1.parseClassMethod = function(classBody, method, isGenerator) {
+ method.value = this.parseMethod(isGenerator)
+ classBody.body.push(this.finishNode(method, "MethodDefinition"))
+}
+
+pp$1.parseClassId = function(node, isStatement) {
+ node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null
+}
+
+pp$1.parseClassSuper = function(node) {
+ node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null
+}
+
+// Parses module export declaration.
+
+pp$1.parseExport = function(node) {
+ var this$1 = this;
+
+ this.next()
+ // export * from '...'
+ if (this.eat(tt.star)) {
+ this.expectContextual("from")
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
+ this.semicolon()
+ return this.finishNode(node, "ExportAllDeclaration")
+ }
+ if (this.eat(tt._default)) { // export default ...
+ var parens = this.type == tt.parenL
+ var expr = this.parseMaybeAssign()
+ var needsSemi = true
+ if (!parens && (expr.type == "FunctionExpression" ||
+ expr.type == "ClassExpression")) {
+ needsSemi = false
+ if (expr.id) {
+ expr.type = expr.type == "FunctionExpression"
+ ? "FunctionDeclaration"
+ : "ClassDeclaration"
+ }
+ }
+ node.declaration = expr
+ if (needsSemi) this.semicolon()
+ return this.finishNode(node, "ExportDefaultDeclaration")
+ }
+ // export var|const|let|function|class ...
+ if (this.shouldParseExportStatement()) {
+ node.declaration = this.parseStatement(true)
+ node.specifiers = []
+ node.source = null
+ } else { // export { x, y as z } [from '...']
+ node.declaration = null
+ node.specifiers = this.parseExportSpecifiers()
+ if (this.eatContextual("from")) {
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
+ } else {
+ // check for keywords used as local names
+ for (var i = 0; i < node.specifiers.length; i++) {
+ if (this$1.keywords.test(node.specifiers[i].local.name) || this$1.reservedWords.test(node.specifiers[i].local.name)) {
+ this$1.unexpected(node.specifiers[i].local.start)
+ }
+ }
+
+ node.source = null
+ }
+ this.semicolon()
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+}
+
+pp$1.shouldParseExportStatement = function() {
+ return this.type.keyword || this.isLet()
+}
+
+// Parses a comma-separated list of module exports.
+
+pp$1.parseExportSpecifiers = function() {
+ var this$1 = this;
+
+ var nodes = [], first = true
+ // export { x, y as z } [from '...']
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (this$1.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ var node = this$1.startNode()
+ node.local = this$1.parseIdent(this$1.type === tt._default)
+ node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local
+ nodes.push(this$1.finishNode(node, "ExportSpecifier"))
+ }
+ return nodes
+}
+
+// Parses import declaration.
+
+pp$1.parseImport = function(node) {
+ this.next()
+ // import '...'
+ if (this.type === tt.string) {
+ node.specifiers = empty
+ node.source = this.parseExprAtom()
+ } else {
+ node.specifiers = this.parseImportSpecifiers()
+ this.expectContextual("from")
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
+ }
+ this.semicolon()
+ return this.finishNode(node, "ImportDeclaration")
+}
+
+// Parses a comma-separated list of module imports.
+
+pp$1.parseImportSpecifiers = function() {
+ var this$1 = this;
+
+ var nodes = [], first = true
+ if (this.type === tt.name) {
+ // import defaultObj, { x, y as z } from '...'
+ var node = this.startNode()
+ node.local = this.parseIdent()
+ this.checkLVal(node.local, true)
+ nodes.push(this.finishNode(node, "ImportDefaultSpecifier"))
+ if (!this.eat(tt.comma)) return nodes
+ }
+ if (this.type === tt.star) {
+ var node$1 = this.startNode()
+ this.next()
+ this.expectContextual("as")
+ node$1.local = this.parseIdent()
+ this.checkLVal(node$1.local, true)
+ nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"))
+ return nodes
+ }
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (this$1.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ var node$2 = this$1.startNode()
+ node$2.imported = this$1.parseIdent(true)
+ if (this$1.eatContextual("as")) {
+ node$2.local = this$1.parseIdent()
+ } else {
+ node$2.local = node$2.imported
+ if (this$1.isKeyword(node$2.local.name)) this$1.unexpected(node$2.local.start)
+ if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raise(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved")
+ }
+ this$1.checkLVal(node$2.local, true)
+ nodes.push(this$1.finishNode(node$2, "ImportSpecifier"))
+ }
+ return nodes
+}
+
+var pp$2 = Parser.prototype
+
+// Convert existing expression atom to assignable pattern
+// if possible.
+
+pp$2.toAssignable = function(node, isBinding) {
+ var this$1 = this;
+
+ if (this.options.ecmaVersion >= 6 && node) {
+ switch (node.type) {
+ case "Identifier":
+ case "ObjectPattern":
+ case "ArrayPattern":
+ break
+
+ case "ObjectExpression":
+ node.type = "ObjectPattern"
+ for (var i = 0; i < node.properties.length; i++) {
+ var prop = node.properties[i]
+ if (prop.kind !== "init") this$1.raise(prop.key.start, "Object pattern can't contain getter or setter")
+ this$1.toAssignable(prop.value, isBinding)
+ }
+ break
+
+ case "ArrayExpression":
+ node.type = "ArrayPattern"
+ this.toAssignableList(node.elements, isBinding)
+ break
+
+ case "AssignmentExpression":
+ if (node.operator === "=") {
+ node.type = "AssignmentPattern"
+ delete node.operator
+ // falls through to AssignmentPattern
+ } else {
+ this.raise(node.left.end, "Only '=' operator can be used for specifying default value.")
+ break
+ }
+
+ case "AssignmentPattern":
+ if (node.right.type === "YieldExpression")
+ this.raise(node.right.start, "Yield expression cannot be a default value")
+ break
+
+ case "ParenthesizedExpression":
+ node.expression = this.toAssignable(node.expression, isBinding)
+ break
+
+ case "MemberExpression":
+ if (!isBinding) break
+
+ default:
+ this.raise(node.start, "Assigning to rvalue")
+ }
+ }
+ return node
+}
+
+// Convert list of expression atoms to binding list.
+
+pp$2.toAssignableList = function(exprList, isBinding) {
+ var this$1 = this;
+
+ 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)
+ if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern")
+ this.unexpected(arg.start)
+ --end
+ }
+
+ if (isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier")
+ this.unexpected(last.argument.start)
+ }
+ for (var i = 0; i < end; i++) {
+ var elt = exprList[i]
+ if (elt) this$1.toAssignable(elt, isBinding)
+ }
+ return exprList
+}
+
+// Parses spread element.
+
+pp$2.parseSpread = function(refDestructuringErrors) {
+ var node = this.startNode()
+ this.next()
+ node.argument = this.parseMaybeAssign(false, refDestructuringErrors)
+ return this.finishNode(node, "SpreadElement")
+}
+
+pp$2.parseRest = function(allowNonIdent) {
+ var node = this.startNode()
+ this.next()
+
+ // RestElement inside of a function parameter must be an identifier
+ if (allowNonIdent) node.argument = this.type === tt.name ? this.parseIdent() : this.unexpected()
+ else node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected()
+
+ return this.finishNode(node, "RestElement")
+}
+
+// Parses lvalue (assignable) atom.
+
+pp$2.parseBindingAtom = function() {
+ if (this.options.ecmaVersion < 6) return this.parseIdent()
+ switch (this.type) {
+ case tt.name:
+ return this.parseIdent()
+
+ case tt.bracketL:
+ var node = this.startNode()
+ this.next()
+ node.elements = this.parseBindingList(tt.bracketR, true, true)
+ return this.finishNode(node, "ArrayPattern")
+
+ case tt.braceL:
+ return this.parseObj(true)
+
+ default:
+ this.unexpected()
+ }
+}
+
+pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowNonIdent) {
+ var this$1 = this;
+
+ var elts = [], first = true
+ while (!this.eat(close)) {
+ if (first) first = false
+ else this$1.expect(tt.comma)
+ if (allowEmpty && this$1.type === tt.comma) {
+ elts.push(null)
+ } else if (allowTrailingComma && this$1.afterTrailingComma(close)) {
+ break
+ } else if (this$1.type === tt.ellipsis) {
+ var rest = this$1.parseRest(allowNonIdent)
+ this$1.parseBindingListItem(rest)
+ elts.push(rest)
+ if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element")
+ this$1.expect(close)
+ break
+ } else {
+ var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc)
+ this$1.parseBindingListItem(elem)
+ elts.push(elem)
+ }
+ }
+ return elts
+}
+
+pp$2.parseBindingListItem = function(param) {
+ return param
+}
+
+// Parses assignment pattern around given atom if possible.
+
+pp$2.parseMaybeDefault = function(startPos, startLoc, left) {
+ left = left || this.parseBindingAtom()
+ if (this.options.ecmaVersion < 6 || !this.eat(tt.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.
+
+pp$2.checkLVal = function(expr, isBinding, checkClashes) {
+ var this$1 = this;
+
+ switch (expr.type) {
+ case "Identifier":
+ if (this.strict && this.reservedWordsStrictBind.test(expr.name))
+ this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode")
+ if (checkClashes) {
+ if (has(checkClashes, expr.name))
+ this.raiseRecoverable(expr.start, "Argument name clash")
+ checkClashes[expr.name] = true
+ }
+ break
+
+ case "MemberExpression":
+ if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression")
+ break
+
+ case "ObjectPattern":
+ for (var i = 0; i < expr.properties.length; i++)
+ this$1.checkLVal(expr.properties[i].value, isBinding, checkClashes)
+ break
+
+ case "ArrayPattern":
+ for (var i$1 = 0; i$1 < expr.elements.length; i$1++) {
+ var elem = expr.elements[i$1]
+ if (elem) this$1.checkLVal(elem, isBinding, checkClashes)
+ }
+ break
+
+ case "AssignmentPattern":
+ this.checkLVal(expr.left, isBinding, checkClashes)
+ break
+
+ case "RestElement":
+ this.checkLVal(expr.argument, isBinding, checkClashes)
+ break
+
+ case "ParenthesizedExpression":
+ this.checkLVal(expr.expression, isBinding, checkClashes)
+ break
+
+ default:
+ this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue")
+ }
+}
+
+var pp$3 = Parser.prototype
+
+// Check if property name clashes with already added.
+// Object/class getters and setters are not allowed to clash —
+// either with each other or with an init property — and in
+// strict mode, init properties are also not allowed to be repeated.
+
+pp$3.checkPropClash = function(prop, propHash) {
+ if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))
+ return
+ var key = prop.key;
+ var name
+ switch (key.type) {
+ case "Identifier": name = key.name; break
+ case "Literal": name = String(key.value); break
+ default: return
+ }
+ var kind = prop.kind;
+ if (this.options.ecmaVersion >= 6) {
+ if (name === "__proto__" && kind === "init") {
+ if (propHash.proto) this.raiseRecoverable(key.start, "Redefinition of __proto__ property")
+ propHash.proto = true
+ }
+ return
+ }
+ name = "$" + name
+ var other = propHash[name]
+ if (other) {
+ var isGetSet = kind !== "init"
+ if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init))
+ this.raiseRecoverable(key.start, "Redefinition of property")
+ } else {
+ other = propHash[name] = {
+ init: false,
+ get: false,
+ set: false
+ }
+ }
+ other[kind] = true
+}
+
+// ### Expression parsing
+
+// These nest, from the most general expression type at the top to
+// 'atomic', nondivisible expression types at the bottom. Most of
+// the functions will simply let the function(s) below them parse,
+// and, *if* the syntactic construct they handle is present, wrap
+// the AST node that the inner parser gave them in another node.
+
+// Parse a full expression. The optional arguments are used to
+// forbid the `in` operator (in for loops initalization expressions)
+// and provide reference for storing '=' operator inside shorthand
+// property assignment in contexts where both object expression
+// and object pattern might appear (so it's possible to raise
+// delayed syntax error at correct position).
+
+pp$3.parseExpression = function(noIn, refDestructuringErrors) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc
+ var expr = this.parseMaybeAssign(noIn, refDestructuringErrors)
+ if (this.type === tt.comma) {
+ var node = this.startNodeAt(startPos, startLoc)
+ node.expressions = [expr]
+ while (this.eat(tt.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors))
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+}
+
+// Parse an assignment expression. This includes applications of
+// operators like `+=`.
+
+pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) {
+ if (this.inGenerator && this.isContextual("yield")) return this.parseYield()
+
+ var ownDestructuringErrors = false
+ if (!refDestructuringErrors) {
+ refDestructuringErrors = new DestructuringErrors
+ ownDestructuringErrors = true
+ }
+ var startPos = this.start, startLoc = this.startLoc
+ if (this.type == tt.parenL || this.type == tt.name)
+ this.potentialArrowAt = this.start
+ var left = this.parseMaybeConditional(noIn, refDestructuringErrors)
+ if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc)
+ if (this.type.isAssign) {
+ this.checkPatternErrors(refDestructuringErrors, true)
+ if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors)
+ var node = this.startNodeAt(startPos, startLoc)
+ node.operator = this.value
+ node.left = this.type === tt.eq ? this.toAssignable(left) : left
+ refDestructuringErrors.shorthandAssign = 0 // reset because shorthand default was used correctly
+ this.checkLVal(left)
+ this.next()
+ node.right = this.parseMaybeAssign(noIn)
+ return this.finishNode(node, "AssignmentExpression")
+ } else {
+ if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true)
+ }
+ return left
+}
+
+// Parse a ternary conditional (`?:`) operator.
+
+pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc
+ var expr = this.parseExprOps(noIn, refDestructuringErrors)
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
+ if (this.eat(tt.question)) {
+ var node = this.startNodeAt(startPos, startLoc)
+ node.test = expr
+ node.consequent = this.parseMaybeAssign()
+ this.expect(tt.colon)
+ node.alternate = this.parseMaybeAssign(noIn)
+ return this.finishNode(node, "ConditionalExpression")
+ }
+ return expr
+}
+
+// Start the precedence parser.
+
+pp$3.parseExprOps = function(noIn, refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc
+ var expr = this.parseMaybeUnary(refDestructuringErrors, false)
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
+ return this.parseExprOp(expr, startPos, startLoc, -1, noIn)
+}
+
+// Parse binary operators with the operator precedence parsing
+// algorithm. `left` is the left-hand side of the operator.
+// `minPrec` provides context that allows the function to stop and
+// defer further parser to one of its callers when it encounters an
+// operator that has a lower precedence than the set it is parsing.
+
+pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
+ var prec = this.type.binop
+ if (prec != null && (!noIn || this.type !== tt._in)) {
+ if (prec > minPrec) {
+ var logical = this.type === tt.logicalOR || this.type === tt.logicalAND
+ var op = this.value
+ this.next()
+ var startPos = this.start, startLoc = this.startLoc
+ var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn)
+ var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical)
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn)
+ }
+ }
+ return left
+}
+
+pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) {
+ var node = this.startNodeAt(startPos, startLoc)
+ node.left = left
+ node.operator = op
+ node.right = right
+ return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression")
+}
+
+// Parse unary operators, both prefix and postfix.
+
+pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc, expr
+ if (this.type.prefix) {
+ var node = this.startNode(), update = this.type === tt.incDec
+ node.operator = this.value
+ node.prefix = true
+ this.next()
+ node.argument = this.parseMaybeUnary(null, true)
+ this.checkExpressionErrors(refDestructuringErrors, true)
+ if (update) this.checkLVal(node.argument)
+ else if (this.strict && node.operator === "delete" &&
+ node.argument.type === "Identifier")
+ this.raiseRecoverable(node.start, "Deleting local variable in strict mode")
+ else sawUnary = true
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
+ } else {
+ expr = this.parseExprSubscripts(refDestructuringErrors)
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
+ while (this.type.postfix && !this.canInsertSemicolon()) {
+ var node$1 = this$1.startNodeAt(startPos, startLoc)
+ node$1.operator = this$1.value
+ node$1.prefix = false
+ node$1.argument = expr
+ this$1.checkLVal(expr)
+ this$1.next()
+ expr = this$1.finishNode(node$1, "UpdateExpression")
+ }
+ }
+
+ if (!sawUnary && this.eat(tt.starstar))
+ return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false)
+ else
+ return expr
+}
+
+// Parse call, dot, and `[]`-subscript expressions.
+
+pp$3.parseExprSubscripts = function(refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc
+ var expr = this.parseExprAtom(refDestructuringErrors)
+ var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"
+ if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr
+ return this.parseSubscripts(expr, startPos, startLoc)
+}
+
+pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) {
+ var this$1 = this;
+
+ for (;;) {
+ if (this$1.eat(tt.dot)) {
+ var node = this$1.startNodeAt(startPos, startLoc)
+ node.object = base
+ node.property = this$1.parseIdent(true)
+ node.computed = false
+ base = this$1.finishNode(node, "MemberExpression")
+ } else if (this$1.eat(tt.bracketL)) {
+ var node$1 = this$1.startNodeAt(startPos, startLoc)
+ node$1.object = base
+ node$1.property = this$1.parseExpression()
+ node$1.computed = true
+ this$1.expect(tt.bracketR)
+ base = this$1.finishNode(node$1, "MemberExpression")
+ } else if (!noCalls && this$1.eat(tt.parenL)) {
+ var node$2 = this$1.startNodeAt(startPos, startLoc)
+ node$2.callee = base
+ node$2.arguments = this$1.parseExprList(tt.parenR, false)
+ base = this$1.finishNode(node$2, "CallExpression")
+ } else if (this$1.type === tt.backQuote) {
+ var node$3 = this$1.startNodeAt(startPos, startLoc)
+ node$3.tag = base
+ node$3.quasi = this$1.parseTemplate()
+ base = this$1.finishNode(node$3, "TaggedTemplateExpression")
+ } else {
+ return base
+ }
+ }
+}
+
+// Parse an atomic expression — either a single token that is an
+// expression, an expression started by a keyword like `function` or
+// `new`, or an expression wrapped in punctuation like `()`, `[]`,
+// or `{}`.
+
+pp$3.parseExprAtom = function(refDestructuringErrors) {
+ var node, canBeArrow = this.potentialArrowAt == this.start
+ switch (this.type) {
+ case tt._super:
+ if (!this.inFunction)
+ this.raise(this.start, "'super' outside of function or class")
+
+ case tt._this:
+ var type = this.type === tt._this ? "ThisExpression" : "Super"
+ node = this.startNode()
+ this.next()
+ return this.finishNode(node, type)
+
+ case tt.name:
+ var startPos = this.start, startLoc = this.startLoc
+ var id = this.parseIdent(this.type !== tt.name)
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow))
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id])
+ return id
+
+ case tt.regexp:
+ var value = this.value
+ node = this.parseLiteral(value.value)
+ node.regex = {pattern: value.pattern, flags: value.flags}
+ return node
+
+ case tt.num: case tt.string:
+ return this.parseLiteral(this.value)
+
+ case tt._null: case tt._true: case tt._false:
+ node = this.startNode()
+ node.value = this.type === tt._null ? null : this.type === tt._true
+ node.raw = this.type.keyword
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tt.parenL:
+ return this.parseParenAndDistinguishExpression(canBeArrow)
+
+ case tt.bracketL:
+ node = this.startNode()
+ this.next()
+ node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors)
+ return this.finishNode(node, "ArrayExpression")
+
+ case tt.braceL:
+ return this.parseObj(false, refDestructuringErrors)
+
+ case tt._function:
+ node = this.startNode()
+ this.next()
+ return this.parseFunction(node, false)
+
+ case tt._class:
+ return this.parseClass(this.startNode(), false)
+
+ case tt._new:
+ return this.parseNew()
+
+ case tt.backQuote:
+ return this.parseTemplate()
+
+ default:
+ this.unexpected()
+ }
+}
+
+pp$3.parseLiteral = function(value) {
+ var node = this.startNode()
+ node.value = value
+ node.raw = this.input.slice(this.start, this.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+}
+
+pp$3.parseParenExpression = function() {
+ this.expect(tt.parenL)
+ var val = this.parseExpression()
+ this.expect(tt.parenR)
+ return val
+}
+
+pp$3.parseParenAndDistinguishExpression = function(canBeArrow) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc, val
+ if (this.options.ecmaVersion >= 6) {
+ this.next()
+
+ var innerStartPos = this.start, innerStartLoc = this.startLoc
+ var exprList = [], first = true
+ var refDestructuringErrors = new DestructuringErrors, spreadStart, innerParenStart
+ while (this.type !== tt.parenR) {
+ first ? first = false : this$1.expect(tt.comma)
+ if (this$1.type === tt.ellipsis) {
+ spreadStart = this$1.start
+ exprList.push(this$1.parseParenItem(this$1.parseRest()))
+ break
+ } else {
+ if (this$1.type === tt.parenL && !innerParenStart) {
+ innerParenStart = this$1.start
+ }
+ exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem))
+ }
+ }
+ var innerEndPos = this.start, innerEndLoc = this.startLoc
+ this.expect(tt.parenR)
+
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {
+ this.checkPatternErrors(refDestructuringErrors, true)
+ if (innerParenStart) this.unexpected(innerParenStart)
+ return this.parseParenArrowList(startPos, startLoc, exprList)
+ }
+
+ if (!exprList.length) this.unexpected(this.lastTokStart)
+ if (spreadStart) this.unexpected(spreadStart)
+ this.checkExpressionErrors(refDestructuringErrors, true)
+
+ if (exprList.length > 1) {
+ val = this.startNodeAt(innerStartPos, innerStartLoc)
+ val.expressions = exprList
+ this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc)
+ } else {
+ val = exprList[0]
+ }
+ } else {
+ val = this.parseParenExpression()
+ }
+
+ if (this.options.preserveParens) {
+ var par = this.startNodeAt(startPos, startLoc)
+ par.expression = val
+ return this.finishNode(par, "ParenthesizedExpression")
+ } else {
+ return val
+ }
+}
+
+pp$3.parseParenItem = function(item) {
+ return item
+}
+
+pp$3.parseParenArrowList = function(startPos, startLoc, exprList) {
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList)
+}
+
+// New's precedence is slightly tricky. It must allow its argument to
+// be a `[]` or dot subscript expression, but not a call — at least,
+// not without wrapping it in parentheses. Thus, it uses the noCalls
+// argument to parseSubscripts to prevent it from consuming the
+// argument list.
+
+var empty$1 = []
+
+pp$3.parseNew = function() {
+ var node = this.startNode()
+ var meta = this.parseIdent(true)
+ if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) {
+ node.meta = meta
+ node.property = this.parseIdent(true)
+ if (node.property.name !== "target")
+ this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target")
+ if (!this.inFunction)
+ this.raiseRecoverable(node.start, "new.target can only be used in functions")
+ return this.finishNode(node, "MetaProperty")
+ }
+ var startPos = this.start, startLoc = this.startLoc
+ node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true)
+ if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false)
+ else node.arguments = empty$1
+ return this.finishNode(node, "NewExpression")
+}
+
+// Parse template expression.
+
+pp$3.parseTemplateElement = function() {
+ var elem = this.startNode()
+ elem.value = {
+ raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'),
+ cooked: this.value
+ }
+ this.next()
+ elem.tail = this.type === tt.backQuote
+ return this.finishNode(elem, "TemplateElement")
+}
+
+pp$3.parseTemplate = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.next()
+ node.expressions = []
+ var curElt = this.parseTemplateElement()
+ node.quasis = [curElt]
+ while (!curElt.tail) {
+ this$1.expect(tt.dollarBraceL)
+ node.expressions.push(this$1.parseExpression())
+ this$1.expect(tt.braceR)
+ node.quasis.push(curElt = this$1.parseTemplateElement())
+ }
+ this.next()
+ return this.finishNode(node, "TemplateLiteral")
+}
+
+// Parse an object literal or binding pattern.
+
+pp$3.parseObj = function(isPattern, refDestructuringErrors) {
+ var this$1 = this;
+
+ var node = this.startNode(), first = true, propHash = {}
+ node.properties = []
+ this.next()
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (this$1.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ var prop = this$1.startNode(), isGenerator, startPos, startLoc
+ if (this$1.options.ecmaVersion >= 6) {
+ prop.method = false
+ prop.shorthand = false
+ if (isPattern || refDestructuringErrors) {
+ startPos = this$1.start
+ startLoc = this$1.startLoc
+ }
+ if (!isPattern)
+ isGenerator = this$1.eat(tt.star)
+ }
+ this$1.parsePropertyName(prop)
+ this$1.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors)
+ this$1.checkPropClash(prop, propHash)
+ node.properties.push(this$1.finishNode(prop, "Property"))
+ }
+ return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
+}
+
+pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) {
+ if (this.eat(tt.colon)) {
+ prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors)
+ prop.kind = "init"
+ } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) {
+ if (isPattern) this.unexpected()
+ prop.kind = "init"
+ prop.method = true
+ prop.value = this.parseMethod(isGenerator)
+ } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
+ (prop.key.name === "get" || prop.key.name === "set") &&
+ (this.type != tt.comma && this.type != tt.braceR)) {
+ if (isGenerator || isPattern) this.unexpected()
+ prop.kind = prop.key.name
+ this.parsePropertyName(prop)
+ prop.value = this.parseMethod(false)
+ var paramCount = prop.kind === "get" ? 0 : 1
+ if (prop.value.params.length !== paramCount) {
+ var start = prop.value.start
+ if (prop.kind === "get")
+ this.raiseRecoverable(start, "getter should have no params")
+ else
+ this.raiseRecoverable(start, "setter should have exactly one param")
+ }
+ if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
+ this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
+ } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
+ if (this.keywords.test(prop.key.name) ||
+ (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) ||
+ (this.inGenerator && prop.key.name == "yield"))
+ this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property")
+ prop.kind = "init"
+ if (isPattern) {
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
+ } else if (this.type === tt.eq && refDestructuringErrors) {
+ if (!refDestructuringErrors.shorthandAssign)
+ refDestructuringErrors.shorthandAssign = this.start
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
+ } else {
+ prop.value = prop.key
+ }
+ prop.shorthand = true
+ } else this.unexpected()
+}
+
+pp$3.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(tt.bracketL)) {
+ prop.computed = true
+ prop.key = this.parseMaybeAssign()
+ this.expect(tt.bracketR)
+ return prop.key
+ } else {
+ prop.computed = false
+ }
+ }
+ return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true)
+}
+
+// Initialize empty function node.
+
+pp$3.initFunction = function(node) {
+ node.id = null
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false
+ node.expression = false
+ }
+}
+
+// Parse object or class method.
+
+pp$3.parseMethod = function(isGenerator) {
+ var node = this.startNode(), oldInGen = this.inGenerator
+ this.inGenerator = isGenerator
+ this.initFunction(node)
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.parenR, false, false)
+ if (this.options.ecmaVersion >= 6)
+ node.generator = isGenerator
+ this.parseFunctionBody(node, false)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, "FunctionExpression")
+}
+
+// Parse arrow function expression with given parameters.
+
+pp$3.parseArrowExpression = function(node, params) {
+ var oldInGen = this.inGenerator
+ this.inGenerator = false
+ this.initFunction(node)
+ node.params = this.toAssignableList(params, true)
+ this.parseFunctionBody(node, true)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, "ArrowFunctionExpression")
+}
+
+// Parse function body and check parameters.
+
+pp$3.parseFunctionBody = function(node, isArrowFunction) {
+ var isExpression = isArrowFunction && this.type !== tt.braceL
+
+ if (isExpression) {
+ node.body = this.parseMaybeAssign()
+ node.expression = true
+ } else {
+ // Start a new scope with regard to labels and the `inFunction`
+ // flag (restore them to their old value afterwards).
+ var oldInFunc = this.inFunction, oldLabels = this.labels
+ this.inFunction = true; this.labels = []
+ node.body = this.parseBlock(true)
+ node.expression = false
+ this.inFunction = oldInFunc; this.labels = oldLabels
+ }
+
+ // 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 useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null;
+ if (this.strict || useStrict) {
+ var oldStrict = this.strict
+ this.strict = true
+ if (node.id)
+ this.checkLVal(node.id, true)
+ this.checkParams(node, useStrict)
+ this.strict = oldStrict
+ } else if (isArrowFunction) {
+ this.checkParams(node, useStrict)
+ }
+}
+
+// Checks function params for various disallowed patterns such as using "eval"
+// or "arguments" and duplicate parameters.
+
+pp$3.checkParams = function(node, useStrict) {
+ var this$1 = this;
+
+ var nameHash = {}
+ for (var i = 0; i < node.params.length; i++) {
+ if (useStrict && this$1.options.ecmaVersion >= 7 && node.params[i].type !== "Identifier")
+ this$1.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list");
+ this$1.checkLVal(node.params[i], true, nameHash)
+ }
+}
+
+// Parses a comma-separated list of expressions, and returns them as
+// an array. `close` is the token type that ends the list, and
+// `allowEmpty` can be turned on to allow subsequent commas with
+// nothing in between them to be parsed as `null` (which is needed
+// for array literals).
+
+pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
+ var this$1 = this;
+
+ var elts = [], first = true
+ while (!this.eat(close)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (allowTrailingComma && this$1.afterTrailingComma(close)) break
+ } else first = false
+
+ var elt
+ if (allowEmpty && this$1.type === tt.comma)
+ elt = null
+ else if (this$1.type === tt.ellipsis) {
+ elt = this$1.parseSpread(refDestructuringErrors)
+ if (this$1.type === tt.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) {
+ refDestructuringErrors.trailingComma = this$1.lastTokStart
+ }
+ } else
+ elt = this$1.parseMaybeAssign(false, refDestructuringErrors)
+ elts.push(elt)
+ }
+ return elts
+}
+
+// Parse the next token as an identifier. If `liberal` is true (used
+// when parsing properties), it will also convert keywords into
+// identifiers.
+
+pp$3.parseIdent = function(liberal) {
+ var node = this.startNode()
+ if (liberal && this.options.allowReserved == "never") liberal = false
+ if (this.type === tt.name) {
+ if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) &&
+ (this.options.ecmaVersion >= 6 ||
+ this.input.slice(this.start, this.end).indexOf("\\") == -1))
+ this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved")
+ if (!liberal && this.inGenerator && this.value === "yield")
+ this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator")
+ node.name = this.value
+ } else if (liberal && this.type.keyword) {
+ node.name = this.type.keyword
+ } else {
+ this.unexpected()
+ }
+ this.next()
+ return this.finishNode(node, "Identifier")
+}
+
+// Parses yield expression inside generator.
+
+pp$3.parseYield = function() {
+ var node = this.startNode()
+ this.next()
+ if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) {
+ node.delegate = false
+ node.argument = null
+ } else {
+ node.delegate = this.eat(tt.star)
+ node.argument = this.parseMaybeAssign()
+ }
+ return this.finishNode(node, "YieldExpression")
+}
+
+var pp$4 = Parser.prototype
+
+// This function is used to raise exceptions on parse errors. It
+// takes an offset integer (into the current `input`) to indicate
+// the location of the error, attaches the position to the end
+// of the error message, and then raises a `SyntaxError` with that
+// message.
+
+pp$4.raise = function(pos, message) {
+ var loc = getLineInfo(this.input, pos)
+ message += " (" + loc.line + ":" + loc.column + ")"
+ var err = new SyntaxError(message)
+ err.pos = pos; err.loc = loc; err.raisedAt = this.pos
+ throw err
+}
+
+pp$4.raiseRecoverable = pp$4.raise
+
+pp$4.curPosition = function() {
+ if (this.options.locations) {
+ return new Position(this.curLine, this.pos - this.lineStart)
+ }
+}
+
+var Node = function Node(parser, pos, loc) {
+ this.type = ""
+ this.start = pos
+ this.end = 0
+ if (parser.options.locations)
+ this.loc = new SourceLocation(parser, loc)
+ if (parser.options.directSourceFile)
+ this.sourceFile = parser.options.directSourceFile
+ if (parser.options.ranges)
+ this.range = [pos, 0]
+};
+
+// Start an AST node, attaching a start offset.
+
+var pp$5 = Parser.prototype
+
+pp$5.startNode = function() {
+ return new Node(this, this.start, this.startLoc)
+}
+
+pp$5.startNodeAt = function(pos, loc) {
+ return new Node(this, pos, loc)
+}
+
+// Finish an AST node, adding `type` and `end` properties.
+
+function finishNodeAt(node, type, pos, loc) {
+ node.type = type
+ node.end = pos
+ if (this.options.locations)
+ node.loc.end = loc
+ if (this.options.ranges)
+ node.range[1] = pos
+ return node
+}
+
+pp$5.finishNode = function(node, type) {
+ return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)
+}
+
+// Finish node at given position
+
+pp$5.finishNodeAt = function(node, type, pos, loc) {
+ return finishNodeAt.call(this, node, type, pos, loc)
+}
+
+var TokContext = function TokContext(token, isExpr, preserveSpace, override) {
+ this.token = token
+ this.isExpr = !!isExpr
+ this.preserveSpace = !!preserveSpace
+ this.override = override
+};
+
+var types = {
+ b_stat: new TokContext("{", false),
+ b_expr: new TokContext("{", true),
+ b_tmpl: new TokContext("${", true),
+ p_stat: new TokContext("(", false),
+ p_expr: new TokContext("(", true),
+ q_tmpl: new TokContext("`", true, true, function (p) { return p.readTmplToken(); }),
+ f_expr: new TokContext("function", true)
+}
+
+var pp$6 = Parser.prototype
+
+pp$6.initialContext = function() {
+ return [types.b_stat]
+}
+
+pp$6.braceIsBlock = function(prevType) {
+ if (prevType === tt.colon) {
+ var parent = this.curContext()
+ if (parent === types.b_stat || parent === types.b_expr)
+ return !parent.isExpr
+ }
+ if (prevType === tt._return)
+ return lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
+ if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof || prevType === tt.parenR)
+ return true
+ if (prevType == tt.braceL)
+ return this.curContext() === types.b_stat
+ return !this.exprAllowed
+}
+
+pp$6.updateContext = function(prevType) {
+ var update, type = this.type
+ if (type.keyword && prevType == tt.dot)
+ this.exprAllowed = false
+ else if (update = type.updateContext)
+ update.call(this, prevType)
+ else
+ this.exprAllowed = type.beforeExpr
+}
+
+// Token-specific context update code
+
+tt.parenR.updateContext = tt.braceR.updateContext = function() {
+ if (this.context.length == 1) {
+ this.exprAllowed = true
+ return
+ }
+ var out = this.context.pop()
+ if (out === types.b_stat && this.curContext() === types.f_expr) {
+ this.context.pop()
+ this.exprAllowed = false
+ } else if (out === types.b_tmpl) {
+ this.exprAllowed = true
+ } else {
+ this.exprAllowed = !out.isExpr
+ }
+}
+
+tt.braceL.updateContext = function(prevType) {
+ this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr)
+ this.exprAllowed = true
+}
+
+tt.dollarBraceL.updateContext = function() {
+ this.context.push(types.b_tmpl)
+ this.exprAllowed = true
+}
+
+tt.parenL.updateContext = function(prevType) {
+ var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while
+ this.context.push(statementParens ? types.p_stat : types.p_expr)
+ this.exprAllowed = true
+}
+
+tt.incDec.updateContext = function() {
+ // tokExprAllowed stays unchanged
+}
+
+tt._function.updateContext = function(prevType) {
+ if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else &&
+ !((prevType === tt.colon || prevType === tt.braceL) && this.curContext() === types.b_stat))
+ this.context.push(types.f_expr)
+ this.exprAllowed = false
+}
+
+tt.backQuote.updateContext = function() {
+ if (this.curContext() === types.q_tmpl)
+ this.context.pop()
+ else
+ this.context.push(types.q_tmpl)
+ this.exprAllowed = false
+}
+
+// Object type used to represent tokens. Note that normally, tokens
+// simply exist as properties on the parser object. This is only
+// used for the onToken callback and the external tokenizer.
+
+var Token = function Token(p) {
+ this.type = p.type
+ this.value = p.value
+ this.start = p.start
+ this.end = p.end
+ if (p.options.locations)
+ this.loc = new SourceLocation(p, p.startLoc, p.endLoc)
+ if (p.options.ranges)
+ this.range = [p.start, p.end]
+};
+
+// ## Tokenizer
+
+var pp$7 = Parser.prototype
+
+// Are we running under Rhino?
+var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]"
+
+// Move to the next token
+
+pp$7.next = function() {
+ if (this.options.onToken)
+ this.options.onToken(new Token(this))
+
+ this.lastTokEnd = this.end
+ this.lastTokStart = this.start
+ this.lastTokEndLoc = this.endLoc
+ this.lastTokStartLoc = this.startLoc
+ this.nextToken()
+}
+
+pp$7.getToken = function() {
+ this.next()
+ return new Token(this)
+}
+
+// If we're in an ES6 environment, make parsers iterable
+if (typeof Symbol !== "undefined")
+ pp$7[Symbol.iterator] = function () {
+ var self = this
+ return {next: function () {
+ var token = self.getToken()
+ return {
+ done: token.type === tt.eof,
+ value: token
+ }
+ }}
+ }
+
+// Toggle strict mode. Re-reads the next number or string to please
+// pedantic tests (`"use strict"; 010;` should fail).
+
+pp$7.setStrict = function(strict) {
+ var this$1 = this;
+
+ this.strict = strict
+ if (this.type !== tt.num && this.type !== tt.string) return
+ this.pos = this.start
+ if (this.options.locations) {
+ while (this.pos < this.lineStart) {
+ this$1.lineStart = this$1.input.lastIndexOf("\n", this$1.lineStart - 2) + 1
+ --this$1.curLine
+ }
+ }
+ this.nextToken()
+}
+
+pp$7.curContext = function() {
+ return this.context[this.context.length - 1]
+}
+
+// Read a single token, updating the parser object's token-related
+// properties.
+
+pp$7.nextToken = function() {
+ var curContext = this.curContext()
+ if (!curContext || !curContext.preserveSpace) this.skipSpace()
+
+ this.start = this.pos
+ if (this.options.locations) this.startLoc = this.curPosition()
+ if (this.pos >= this.input.length) return this.finishToken(tt.eof)
+
+ if (curContext.override) return curContext.override(this)
+ else this.readToken(this.fullCharCodeAtPos())
+}
+
+pp$7.readToken = function(code) {
+ // Identifier or keyword. '\uXXXX' sequences are allowed in
+ // identifiers, so '\' also dispatches to that.
+ if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */)
+ return this.readWord()
+
+ return this.getTokenFromCode(code)
+}
+
+pp$7.fullCharCodeAtPos = function() {
+ var code = this.input.charCodeAt(this.pos)
+ if (code <= 0xd7ff || code >= 0xe000) return code
+ var next = this.input.charCodeAt(this.pos + 1)
+ return (code << 10) + next - 0x35fdc00
+}
+
+pp$7.skipBlockComment = function() {
+ var this$1 = this;
+
+ var startLoc = this.options.onComment && this.curPosition()
+ var start = this.pos, end = this.input.indexOf("*/", this.pos += 2)
+ if (end === -1) this.raise(this.pos - 2, "Unterminated comment")
+ this.pos = end + 2
+ if (this.options.locations) {
+ lineBreakG.lastIndex = start
+ var match
+ while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
+ ++this$1.curLine
+ this$1.lineStart = match.index + match[0].length
+ }
+ }
+ if (this.options.onComment)
+ this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos,
+ startLoc, this.curPosition())
+}
+
+pp$7.skipLineComment = function(startSkip) {
+ var this$1 = this;
+
+ var start = this.pos
+ var startLoc = this.options.onComment && this.curPosition()
+ var ch = this.input.charCodeAt(this.pos+=startSkip)
+ while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
+ ++this$1.pos
+ ch = this$1.input.charCodeAt(this$1.pos)
+ }
+ if (this.options.onComment)
+ this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos,
+ startLoc, this.curPosition())
+}
+
+// Called at the start of the parse and after every token. Skips
+// whitespace and comments, and.
+
+pp$7.skipSpace = function() {
+ var this$1 = this;
+
+ loop: while (this.pos < this.input.length) {
+ var ch = this$1.input.charCodeAt(this$1.pos)
+ switch (ch) {
+ case 32: case 160: // ' '
+ ++this$1.pos
+ break
+ case 13:
+ if (this$1.input.charCodeAt(this$1.pos + 1) === 10) {
+ ++this$1.pos
+ }
+ case 10: case 8232: case 8233:
+ ++this$1.pos
+ if (this$1.options.locations) {
+ ++this$1.curLine
+ this$1.lineStart = this$1.pos
+ }
+ break
+ case 47: // '/'
+ switch (this$1.input.charCodeAt(this$1.pos + 1)) {
+ case 42: // '*'
+ this$1.skipBlockComment()
+ break
+ case 47:
+ this$1.skipLineComment(2)
+ break
+ default:
+ break loop
+ }
+ break
+ default:
+ if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
+ ++this$1.pos
+ } else {
+ break loop
+ }
+ }
+ }
+}
+
+// Called at the end of every token. Sets `end`, `val`, and
+// maintains `context` and `exprAllowed`, and skips the space after
+// the token, so that the next one's `start` will point at the
+// right position.
+
+pp$7.finishToken = function(type, val) {
+ this.end = this.pos
+ if (this.options.locations) this.endLoc = this.curPosition()
+ var prevType = this.type
+ this.type = type
+ this.value = val
+
+ this.updateContext(prevType)
+}
+
+// ### Token reading
+
+// This is the function that is called to fetch the next token. It
+// is somewhat obscure, because it works in character codes rather
+// than characters, and because operator parsing has been inlined
+// into it.
+//
+// All in the name of speed.
+//
+pp$7.readToken_dot = function() {
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next >= 48 && next <= 57) return this.readNumber(true)
+ var next2 = this.input.charCodeAt(this.pos + 2)
+ if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.'
+ this.pos += 3
+ return this.finishToken(tt.ellipsis)
+ } else {
+ ++this.pos
+ return this.finishToken(tt.dot)
+ }
+}
+
+pp$7.readToken_slash = function() { // '/'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (this.exprAllowed) {++this.pos; return this.readRegexp()}
+ if (next === 61) return this.finishOp(tt.assign, 2)
+ return this.finishOp(tt.slash, 1)
+}
+
+pp$7.readToken_mult_modulo_exp = function(code) { // '%*'
+ var next = this.input.charCodeAt(this.pos + 1)
+ var size = 1
+ var tokentype = code === 42 ? tt.star : tt.modulo
+
+ // exponentiation operator ** and **=
+ if (this.options.ecmaVersion >= 7 && next === 42) {
+ ++size
+ tokentype = tt.starstar
+ next = this.input.charCodeAt(this.pos + 2)
+ }
+
+ if (next === 61) return this.finishOp(tt.assign, size + 1)
+ return this.finishOp(tokentype, size)
+}
+
+pp$7.readToken_pipe_amp = function(code) { // '|&'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2)
+ if (next === 61) return this.finishOp(tt.assign, 2)
+ return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1)
+}
+
+pp$7.readToken_caret = function() { // '^'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next === 61) return this.finishOp(tt.assign, 2)
+ return this.finishOp(tt.bitwiseXOR, 1)
+}
+
+pp$7.readToken_plus_min = function(code) { // '+-'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next === code) {
+ if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 &&
+ lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) {
+ // A `-->` line comment
+ this.skipLineComment(3)
+ this.skipSpace()
+ return this.nextToken()
+ }
+ return this.finishOp(tt.incDec, 2)
+ }
+ if (next === 61) return this.finishOp(tt.assign, 2)
+ return this.finishOp(tt.plusMin, 1)
+}
+
+pp$7.readToken_lt_gt = function(code) { // '<>'
+ var next = this.input.charCodeAt(this.pos + 1)
+ var size = 1
+ if (next === code) {
+ size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2
+ if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)
+ return this.finishOp(tt.bitShift, size)
+ }
+ if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 &&
+ this.input.charCodeAt(this.pos + 3) == 45) {
+ if (this.inModule) this.unexpected()
+ // `<!--`, an XML-style comment that should be interpreted as a line comment
+ this.skipLineComment(4)
+ this.skipSpace()
+ return this.nextToken()
+ }
+ if (next === 61) size = 2
+ return this.finishOp(tt.relational, size)
+}
+
+pp$7.readToken_eq_excl = function(code) { // '=!'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2)
+ if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>'
+ this.pos += 2
+ return this.finishToken(tt.arrow)
+ }
+ return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1)
+}
+
+pp$7.getTokenFromCode = function(code) {
+ switch (code) {
+ // The interpretation of a dot depends on whether it is followed
+ // by a digit or another two dots.
+ case 46: // '.'
+ return this.readToken_dot()
+
+ // Punctuation tokens.
+ case 40: ++this.pos; return this.finishToken(tt.parenL)
+ case 41: ++this.pos; return this.finishToken(tt.parenR)
+ case 59: ++this.pos; return this.finishToken(tt.semi)
+ case 44: ++this.pos; return this.finishToken(tt.comma)
+ case 91: ++this.pos; return this.finishToken(tt.bracketL)
+ case 93: ++this.pos; return this.finishToken(tt.bracketR)
+ case 123: ++this.pos; return this.finishToken(tt.braceL)
+ case 125: ++this.pos; return this.finishToken(tt.braceR)
+ case 58: ++this.pos; return this.finishToken(tt.colon)
+ case 63: ++this.pos; return this.finishToken(tt.question)
+
+ case 96: // '`'
+ if (this.options.ecmaVersion < 6) break
+ ++this.pos
+ return this.finishToken(tt.backQuote)
+
+ case 48: // '0'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next === 120 || next === 88) return this.readRadixNumber(16) // '0x', '0X' - hex number
+ if (this.options.ecmaVersion >= 6) {
+ if (next === 111 || next === 79) return this.readRadixNumber(8) // '0o', '0O' - octal number
+ if (next === 98 || next === 66) return this.readRadixNumber(2) // '0b', '0B' - binary number
+ }
+ // 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: // 1-9
+ return this.readNumber(false)
+
+ // Quotes produce strings.
+ case 34: case 39: // '"', "'"
+ return this.readString(code)
+
+ // Operators are parsed inline in tiny state machines. '=' (61) 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: // '/'
+ return this.readToken_slash()
+
+ case 37: case 42: // '%*'
+ return this.readToken_mult_modulo_exp(code)
+
+ case 124: case 38: // '|&'
+ return this.readToken_pipe_amp(code)
+
+ case 94: // '^'
+ return this.readToken_caret()
+
+ case 43: case 45: // '+-'
+ return this.readToken_plus_min(code)
+
+ case 60: case 62: // '<>'
+ return this.readToken_lt_gt(code)
+
+ case 61: case 33: // '=!'
+ return this.readToken_eq_excl(code)
+
+ case 126: // '~'
+ return this.finishOp(tt.prefix, 1)
+ }
+
+ this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'")
+}
+
+pp$7.finishOp = function(type, size) {
+ var str = this.input.slice(this.pos, this.pos + size)
+ this.pos += size
+ return this.finishToken(type, str)
+}
+
+// Parse a regular expression. Some context-awareness is necessary,
+// since a '/' inside a '[]' set does not end the expression.
+
+function tryCreateRegexp(src, flags, throwErrorAt, parser) {
+ try {
+ return new RegExp(src, flags)
+ } catch (e) {
+ if (throwErrorAt !== undefined) {
+ if (e instanceof SyntaxError) parser.raise(throwErrorAt, "Error parsing regular expression: " + e.message)
+ throw e
+ }
+ }
+}
+
+var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u")
+
+pp$7.readRegexp = function() {
+ var this$1 = this;
+
+ var escaped, inClass, start = this.pos
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) this$1.raise(start, "Unterminated regular expression")
+ var ch = this$1.input.charAt(this$1.pos)
+ if (lineBreak.test(ch)) this$1.raise(start, "Unterminated regular expression")
+ if (!escaped) {
+ if (ch === "[") inClass = true
+ else if (ch === "]" && inClass) inClass = false
+ else if (ch === "/" && !inClass) break
+ escaped = ch === "\\"
+ } else escaped = false
+ ++this$1.pos
+ }
+ var content = this.input.slice(start, this.pos)
+ ++this.pos
+ // Need to use `readWord1` because '\uXXXX' sequences are allowed
+ // here (don't ask).
+ var mods = this.readWord1()
+ var tmp = content, tmpFlags = ""
+ if (mods) {
+ var validFlags = /^[gim]*$/
+ if (this.options.ecmaVersion >= 6) validFlags = /^[gimuy]*$/
+ if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag")
+ if (mods.indexOf("u") >= 0) {
+ if (regexpUnicodeSupport) {
+ tmpFlags = "u"
+ } else {
+ // Replace each astral symbol and every Unicode escape sequence that
+ // possibly represents an astral symbol or a paired surrogate with a
+ // single ASCII symbol to avoid throwing on regular expressions that
+ // are only valid in combination with the `/u` flag.
+ // Note: replacing with the ASCII symbol `x` might cause false
+ // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
+ // perfectly valid pattern that is equivalent to `[a-b]`, but it would
+ // be replaced by `[x-b]` which throws an error.
+ tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (_match, code, offset) {
+ code = Number("0x" + code)
+ if (code > 0x10FFFF) this$1.raise(start + offset + 3, "Code point out of bounds")
+ return "x"
+ })
+ tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x")
+ tmpFlags = tmpFlags.replace("u", "")
+ }
+ }
+ }
+ // Detect invalid regular expressions.
+ var value = null
+ // Rhino's regular expression parser is flaky and throws uncatchable exceptions,
+ // so don't do detection if we are running under Rhino
+ if (!isRhino) {
+ tryCreateRegexp(tmp, tmpFlags, start, this)
+ // Get a regular expression object for this pattern-flag pair, or `null` in
+ // case the current environment doesn't support the flags it uses.
+ value = tryCreateRegexp(content, mods)
+ }
+ return this.finishToken(tt.regexp, {pattern: content, flags: mods, value: value})
+}
+
+// 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.
+
+pp$7.readInt = function(radix, len) {
+ var this$1 = this;
+
+ var start = this.pos, total = 0
+ for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
+ var code = this$1.input.charCodeAt(this$1.pos), val
+ if (code >= 97) val = code - 97 + 10 // a
+ else if (code >= 65) val = code - 65 + 10 // A
+ else if (code >= 48 && code <= 57) val = code - 48 // 0-9
+ else val = Infinity
+ if (val >= radix) break
+ ++this$1.pos
+ total = total * radix + val
+ }
+ if (this.pos === start || len != null && this.pos - start !== len) return null
+
+ return total
+}
+
+pp$7.readRadixNumber = function(radix) {
+ this.pos += 2 // 0x
+ var val = this.readInt(radix)
+ if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix)
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
+ return this.finishToken(tt.num, val)
+}
+
+// Read an integer, octal integer, or floating-point number.
+
+pp$7.readNumber = function(startsWithDot) {
+ var start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48
+ if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number")
+ var next = this.input.charCodeAt(this.pos)
+ if (next === 46) { // '.'
+ ++this.pos
+ this.readInt(10)
+ isFloat = true
+ next = this.input.charCodeAt(this.pos)
+ }
+ if (next === 69 || next === 101) { // 'eE'
+ next = this.input.charCodeAt(++this.pos)
+ if (next === 43 || next === 45) ++this.pos // '+-'
+ if (this.readInt(10) === null) this.raise(start, "Invalid number")
+ isFloat = true
+ }
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
+
+ var str = this.input.slice(start, this.pos), val
+ if (isFloat) val = parseFloat(str)
+ else if (!octal || str.length === 1) val = parseInt(str, 10)
+ else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number")
+ else val = parseInt(str, 8)
+ return this.finishToken(tt.num, val)
+}
+
+// Read a string value, interpreting backslash-escapes.
+
+pp$7.readCodePoint = function() {
+ var ch = this.input.charCodeAt(this.pos), code
+
+ if (ch === 123) {
+ if (this.options.ecmaVersion < 6) this.unexpected()
+ var codePos = ++this.pos
+ code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos)
+ ++this.pos
+ if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds")
+ } else {
+ code = this.readHexChar(4)
+ }
+ return code
+}
+
+function codePointToString(code) {
+ // UTF-16 Decoding
+ if (code <= 0xFFFF) return String.fromCharCode(code)
+ code -= 0x10000
+ return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
+}
+
+pp$7.readString = function(quote) {
+ var this$1 = this;
+
+ var out = "", chunkStart = ++this.pos
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated string constant")
+ var ch = this$1.input.charCodeAt(this$1.pos)
+ if (ch === quote) break
+ if (ch === 92) { // '\'
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ out += this$1.readEscapedChar(false)
+ chunkStart = this$1.pos
+ } else {
+ if (isNewLine(ch)) this$1.raise(this$1.start, "Unterminated string constant")
+ ++this$1.pos
+ }
+ }
+ out += this.input.slice(chunkStart, this.pos++)
+ return this.finishToken(tt.string, out)
+}
+
+// Reads template string tokens.
+
+pp$7.readTmplToken = function() {
+ var this$1 = this;
+
+ var out = "", chunkStart = this.pos
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated template")
+ var ch = this$1.input.charCodeAt(this$1.pos)
+ if (ch === 96 || ch === 36 && this$1.input.charCodeAt(this$1.pos + 1) === 123) { // '`', '${'
+ if (this$1.pos === this$1.start && this$1.type === tt.template) {
+ if (ch === 36) {
+ this$1.pos += 2
+ return this$1.finishToken(tt.dollarBraceL)
+ } else {
+ ++this$1.pos
+ return this$1.finishToken(tt.backQuote)
+ }
+ }
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ return this$1.finishToken(tt.template, out)
+ }
+ if (ch === 92) { // '\'
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ out += this$1.readEscapedChar(true)
+ chunkStart = this$1.pos
+ } else if (isNewLine(ch)) {
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ ++this$1.pos
+ switch (ch) {
+ case 13:
+ if (this$1.input.charCodeAt(this$1.pos) === 10) ++this$1.pos
+ case 10:
+ out += "\n"
+ break
+ default:
+ out += String.fromCharCode(ch)
+ break
+ }
+ if (this$1.options.locations) {
+ ++this$1.curLine
+ this$1.lineStart = this$1.pos
+ }
+ chunkStart = this$1.pos
+ } else {
+ ++this$1.pos
+ }
+ }
+}
+
+// Used to read escaped characters
+
+pp$7.readEscapedChar = function(inTemplate) {
+ var ch = this.input.charCodeAt(++this.pos)
+ ++this.pos
+ switch (ch) {
+ case 110: return "\n" // 'n' -> '\n'
+ case 114: return "\r" // 'r' -> '\r'
+ case 120: return String.fromCharCode(this.readHexChar(2)) // 'x'
+ case 117: return codePointToString(this.readCodePoint()) // 'u'
+ case 116: return "\t" // 't' -> '\t'
+ case 98: return "\b" // 'b' -> '\b'
+ case 118: return "\u000b" // 'v' -> '\u000b'
+ case 102: return "\f" // 'f' -> '\f'
+ case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos // '\r\n'
+ case 10: // ' \n'
+ if (this.options.locations) { this.lineStart = this.pos; ++this.curLine }
+ return ""
+ default:
+ if (ch >= 48 && ch <= 55) {
+ var octalStr = this.input.substr(this.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 (octalStr !== "0" && (this.strict || inTemplate)) {
+ this.raise(this.pos - 2, "Octal literal in strict mode")
+ }
+ this.pos += octalStr.length - 1
+ return String.fromCharCode(octal)
+ }
+ return String.fromCharCode(ch)
+ }
+}
+
+// Used to read character escape sequences ('\x', '\u', '\U').
+
+pp$7.readHexChar = function(len) {
+ var codePos = this.pos
+ var n = this.readInt(16, len)
+ if (n === null) this.raise(codePos, "Bad character escape sequence")
+ return n
+}
+
+// Read an identifier, and return it as a string. Sets `this.containsEsc`
+// to whether the word contained a '\u' escape.
+//
+// Incrementally adds only escaped chars, adding other chunks as-is
+// as a micro-optimization.
+
+pp$7.readWord1 = function() {
+ var this$1 = this;
+
+ this.containsEsc = false
+ var word = "", first = true, chunkStart = this.pos
+ var astral = this.options.ecmaVersion >= 6
+ while (this.pos < this.input.length) {
+ var ch = this$1.fullCharCodeAtPos()
+ if (isIdentifierChar(ch, astral)) {
+ this$1.pos += ch <= 0xffff ? 1 : 2
+ } else if (ch === 92) { // "\"
+ this$1.containsEsc = true
+ word += this$1.input.slice(chunkStart, this$1.pos)
+ var escStart = this$1.pos
+ if (this$1.input.charCodeAt(++this$1.pos) != 117) // "u"
+ this$1.raise(this$1.pos, "Expecting Unicode escape sequence \\uXXXX")
+ ++this$1.pos
+ var esc = this$1.readCodePoint()
+ if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral))
+ this$1.raise(escStart, "Invalid Unicode escape")
+ word += codePointToString(esc)
+ chunkStart = this$1.pos
+ } else {
+ break
+ }
+ first = false
+ }
+ return word + this.input.slice(chunkStart, this.pos)
+}
+
+// Read an identifier or keyword token. Will check for reserved
+// words when necessary.
+
+pp$7.readWord = function() {
+ var word = this.readWord1()
+ var type = tt.name
+ if ((this.options.ecmaVersion >= 6 || !this.containsEsc) && this.keywords.test(word))
+ type = keywordTypes[word]
+ return this.finishToken(type, word)
+}
+
+var version = "3.3.0"
+
+// The main exported interface (under `self.acorn` when in the
+// browser) is a `parse` function that takes a code string and
+// returns an abstract syntax tree as specified by [Mozilla parser
+// API][api].
+//
+// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
+
+function parse(input, options) {
+ return new Parser(options, input).parse()
+}
+
+// This function tries to parse a single expression at a given
+// offset in a string. Useful for parsing mixed-language formats
+// that embed JavaScript expressions.
+
+function parseExpressionAt(input, pos, options) {
+ var p = new Parser(options, input, pos)
+ p.nextToken()
+ return p.parseExpression()
+}
+
+// Acorn is organized as a tokenizer and a recursive-descent parser.
+// The `tokenizer` export provides an interface to the tokenizer.
+
+function tokenizer(input, options) {
+ return new Parser(options, input)
+}
+
+export { version, parse, parseExpressionAt, tokenizer, Parser, plugins, defaultOptions, Position, SourceLocation, getLineInfo, Node, TokenType, tt as tokTypes, TokContext, types as tokContexts, isIdentifierChar, isIdentifierStart, Token, isNewLine, lineBreak, lineBreakG }; \ No newline at end of file
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.js
new file mode 100644
index 0000000000..127dfb2da7
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.js
@@ -0,0 +1,3142 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (factory((global.acorn = global.acorn || {})));
+}(this, function (exports) { 'use strict';
+
+ // Reserved word lists for various dialects of the language
+
+ var reservedWords = {
+ 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
+ 5: "class enum extends super const export import",
+ 6: "enum",
+ 7: "enum",
+ strict: "implements interface let package private protected public static yield",
+ strictBind: "eval arguments"
+ }
+
+ // And the keywords
+
+ var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"
+
+ var keywords = {
+ 5: ecma5AndLessKeywords,
+ 6: ecma5AndLessKeywords + " const class extends export import 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`.
+
+ 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\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"
+ 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\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\u0d01-\u0d03\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\u1cf8\u1cf9\u1dc0-\u1df5\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
+ var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,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,449,56,264,8,2,36,18,0,50,29,881,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,0,32,6124,20,754,9486,1,3071,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,10591,541]
+ 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,838,7,2,7,17,9,57,21,2,13,19882,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
+ }
+ }
+
+ // Test whether a given character code starts an identifier.
+
+ function isIdentifierStart(code, astral) {
+ if (code < 65) return code === 36
+ if (code < 91) return true
+ if (code < 97) return code === 95
+ if (code < 123) return true
+ if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))
+ if (astral === false) return false
+ return isInAstralSet(code, astralIdentifierStartCodes)
+ }
+
+ // Test whether a given character is part of an identifier.
+
+ function isIdentifierChar(code, astral) {
+ if (code < 48) return code === 36
+ if (code < 58) return true
+ if (code < 65) return false
+ if (code < 91) return true
+ if (code < 97) return code === 95
+ if (code < 123) return true
+ if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code))
+ if (astral === false) return false
+ return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)
+ }
+
+ // ## Token types
+
+ // The assignment of fine-grained, information-carrying type objects
+ // allows the tokenizer to store the information it has about a
+ // token in a way that is very cheap for the parser to look up.
+
+ // All token type variables start with an underscore, to make them
+ // easy to recognize.
+
+ // The `beforeExpr` property is used to disambiguate between regular
+ // expressions and divisions. It is set on all token types that can
+ // be followed by an expression (thus, a slash after them would be a
+ // regular expression).
+ //
+ // The `startsExpr` property is used to check if the token ends a
+ // `yield` expression. It is set on all token types that either can
+ // directly start an expression (like a quotation mark) or can
+ // continue an expression (like the body of a string).
+ //
+ // `isLoop` marks a keyword as starting a loop, which is important
+ // to know when parsing a label, in order to allow or disallow
+ // continue jumps to that label.
+
+ var TokenType = function TokenType(label, conf) {
+ if ( conf === void 0 ) conf = {};
+
+ this.label = label
+ this.keyword = conf.keyword
+ this.beforeExpr = !!conf.beforeExpr
+ this.startsExpr = !!conf.startsExpr
+ this.isLoop = !!conf.isLoop
+ this.isAssign = !!conf.isAssign
+ this.prefix = !!conf.prefix
+ this.postfix = !!conf.postfix
+ this.binop = conf.binop || null
+ this.updateContext = null
+ };
+
+ function binop(name, prec) {
+ return new TokenType(name, {beforeExpr: true, binop: prec})
+ }
+ var beforeExpr = {beforeExpr: true};
+ var startsExpr = {startsExpr: true};
+ // Map keyword names to token types.
+
+ var keywordTypes = {}
+
+ // Succinct definitions of keyword token types
+ function kw(name, options) {
+ if ( options === void 0 ) options = {};
+
+ options.keyword = name
+ return keywordTypes[name] = new TokenType(name, options)
+ }
+
+ var tt = {
+ num: new TokenType("num", startsExpr),
+ regexp: new TokenType("regexp", startsExpr),
+ string: new TokenType("string", startsExpr),
+ name: new TokenType("name", startsExpr),
+ eof: new TokenType("eof"),
+
+ // Punctuation token types.
+ bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}),
+ bracketR: new TokenType("]"),
+ braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}),
+ braceR: new TokenType("}"),
+ parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}),
+ parenR: new TokenType(")"),
+ comma: new TokenType(",", beforeExpr),
+ semi: new TokenType(";", beforeExpr),
+ colon: new TokenType(":", beforeExpr),
+ dot: new TokenType("."),
+ question: new TokenType("?", beforeExpr),
+ arrow: new TokenType("=>", beforeExpr),
+ template: new TokenType("template"),
+ ellipsis: new TokenType("...", beforeExpr),
+ backQuote: new TokenType("`", startsExpr),
+ dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}),
+
+ // Operators. These carry several kinds of properties to help the
+ // parser use them properly (the presence of these properties is
+ // what categorizes them as operators).
+ //
+ // `binop`, when present, specifies that this operator is a binary
+ // operator, and will refer to its precedence.
+ //
+ // `prefix` and `postfix` mark the operator as a prefix or postfix
+ // unary operator.
+ //
+ // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
+ // binary operators with a very low precedence, that should result
+ // in AssignmentExpression nodes.
+
+ eq: new TokenType("=", {beforeExpr: true, isAssign: true}),
+ assign: new TokenType("_=", {beforeExpr: true, isAssign: true}),
+ incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}),
+ prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}),
+ logicalOR: binop("||", 1),
+ logicalAND: binop("&&", 2),
+ bitwiseOR: binop("|", 3),
+ bitwiseXOR: binop("^", 4),
+ bitwiseAND: binop("&", 5),
+ equality: binop("==/!=", 6),
+ relational: binop("</>", 7),
+ bitShift: binop("<</>>", 8),
+ plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),
+ modulo: binop("%", 10),
+ star: binop("*", 10),
+ slash: binop("/", 10),
+ starstar: new TokenType("**", {beforeExpr: true}),
+
+ // Keyword token types.
+ _break: kw("break"),
+ _case: kw("case", beforeExpr),
+ _catch: kw("catch"),
+ _continue: kw("continue"),
+ _debugger: kw("debugger"),
+ _default: kw("default", beforeExpr),
+ _do: kw("do", {isLoop: true, beforeExpr: true}),
+ _else: kw("else", beforeExpr),
+ _finally: kw("finally"),
+ _for: kw("for", {isLoop: true}),
+ _function: kw("function", startsExpr),
+ _if: kw("if"),
+ _return: kw("return", beforeExpr),
+ _switch: kw("switch"),
+ _throw: kw("throw", beforeExpr),
+ _try: kw("try"),
+ _var: kw("var"),
+ _const: kw("const"),
+ _while: kw("while", {isLoop: true}),
+ _with: kw("with"),
+ _new: kw("new", {beforeExpr: true, startsExpr: true}),
+ _this: kw("this", startsExpr),
+ _super: kw("super", startsExpr),
+ _class: kw("class"),
+ _extends: kw("extends", beforeExpr),
+ _export: kw("export"),
+ _import: kw("import"),
+ _null: kw("null", startsExpr),
+ _true: kw("true", startsExpr),
+ _false: kw("false", startsExpr),
+ _in: kw("in", {beforeExpr: true, binop: 7}),
+ _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}),
+ _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true})
+ }
+
+ // Matches a whole line break (where CRLF is considered a single
+ // line break). Used to count lines.
+
+ var lineBreak = /\r\n?|\n|\u2028|\u2029/
+ var lineBreakG = new RegExp(lineBreak.source, "g")
+
+ function isNewLine(code) {
+ return code === 10 || code === 13 || code === 0x2028 || code == 0x2029
+ }
+
+ var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/
+
+ var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g
+
+ function isArray(obj) {
+ return Object.prototype.toString.call(obj) === "[object Array]"
+ }
+
+ // Checks if an object has a property.
+
+ function has(obj, propName) {
+ return Object.prototype.hasOwnProperty.call(obj, propName)
+ }
+
+ // These are used when `options.locations` is on, for the
+ // `startLoc` and `endLoc` properties.
+
+ var Position = function Position(line, col) {
+ this.line = line
+ this.column = col
+ };
+
+ Position.prototype.offset = function offset (n) {
+ return new Position(this.line, this.column + n)
+ };
+
+ var SourceLocation = function SourceLocation(p, start, end) {
+ this.start = start
+ this.end = end
+ if (p.sourceFile !== null) this.source = p.sourceFile
+ };
+
+ // The `getLineInfo` function is mostly useful when the
+ // `locations` option is off (for performance reasons) and you
+ // want to find the line/column position for a given character
+ // offset. `input` should be the code string that the offset refers
+ // into.
+
+ function getLineInfo(input, offset) {
+ for (var line = 1, cur = 0;;) {
+ lineBreakG.lastIndex = cur
+ var match = lineBreakG.exec(input)
+ if (match && match.index < offset) {
+ ++line
+ cur = match.index + match[0].length
+ } else {
+ return new Position(line, offset - cur)
+ }
+ }
+ }
+
+ // A second optional argument can be given to further configure
+ // the parser process. These options are recognized:
+
+ var defaultOptions = {
+ // `ecmaVersion` indicates the ECMAScript version to parse. Must
+ // be either 3, or 5, or 6. This influences support for strict
+ // mode, the set of reserved words, support for getters and
+ // setters and other features. The default is 6.
+ ecmaVersion: 6,
+ // Source type ("script" or "module") for different semantics
+ sourceType: "script",
+ // `onInsertedSemicolon` can be a callback that will be called
+ // when a semicolon is automatically inserted. It will be passed
+ // th position of the comma as an offset, and if `locations` is
+ // enabled, it is given the location as a `{line, column}` object
+ // as second argument.
+ onInsertedSemicolon: null,
+ // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
+ // trailing commas.
+ onTrailingComma: null,
+ // By default, reserved words are only enforced if ecmaVersion >= 5.
+ // Set `allowReserved` to a boolean value to explicitly turn this on
+ // an off. When this option has the value "never", reserved words
+ // and keywords can also not be used as property names.
+ allowReserved: null,
+ // When enabled, a return at the top level is not considered an
+ // error.
+ allowReturnOutsideFunction: false,
+ // When enabled, import/export statements are not constrained to
+ // appearing at the top of the program.
+ allowImportExportEverywhere: false,
+ // When enabled, hashbang directive in the beginning of file
+ // is allowed and treated as a line comment.
+ allowHashBang: false,
+ // When `locations` is on, `loc` properties holding objects with
+ // `start` and `end` properties in `{line, column}` form (with
+ // line being 1-based and column 0-based) will be attached to the
+ // nodes.
+ locations: false,
+ // A function can be passed as `onToken` option, which will
+ // cause Acorn to call that function with object in the same
+ // format as tokens returned from `tokenizer().getToken()`. Note
+ // that you are not allowed to call the parser from the
+ // callback—that will corrupt its internal state.
+ onToken: null,
+ // A function can be passed as `onComment` option, which will
+ // cause Acorn to call that function with `(block, text, start,
+ // end)` parameters whenever a comment is skipped. `block` is a
+ // boolean indicating whether this is a block (`/* */`) comment,
+ // `text` is the content of the comment, and `start` and `end` are
+ // character offsets that denote the start and end of the comment.
+ // When the `locations` option is on, two more parameters are
+ // passed, the full `{line, column}` locations of the start and
+ // end of the comments. Note that you are not allowed to call the
+ // parser from the callback—that will corrupt its internal state.
+ onComment: null,
+ // Nodes have their start and end characters offsets recorded in
+ // `start` and `end` properties (directly on the node, rather than
+ // the `loc` object, which holds line/column data. To also add a
+ // [semi-standardized][range] `range` property holding a `[start,
+ // end]` array with the same numbers, set the `ranges` option to
+ // `true`.
+ //
+ // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
+ ranges: false,
+ // It is possible to parse multiple files into a single AST by
+ // passing the tree produced by parsing the first file as
+ // `program` option in subsequent parses. This will add the
+ // toplevel forms of the parsed file to the `Program` (top) node
+ // of an existing parse tree.
+ program: null,
+ // When `locations` is on, you can pass this to record the source
+ // file in every node's `loc` object.
+ sourceFile: null,
+ // This value, if given, is stored in every node, whether
+ // `locations` is on or off.
+ directSourceFile: null,
+ // When enabled, parenthesized expressions are represented by
+ // (non-standard) ParenthesizedExpression nodes
+ preserveParens: false,
+ plugins: {}
+ }
+
+ // Interpret and default an options object
+
+ function getOptions(opts) {
+ var options = {}
+ for (var opt in defaultOptions)
+ options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]
+ if (options.allowReserved == null)
+ options.allowReserved = options.ecmaVersion < 5
+
+ if (isArray(options.onToken)) {
+ var tokens = options.onToken
+ options.onToken = function (token) { return tokens.push(token); }
+ }
+ if (isArray(options.onComment))
+ options.onComment = pushComment(options, options.onComment)
+
+ return options
+ }
+
+ function pushComment(options, array) {
+ return function (block, text, start, end, startLoc, endLoc) {
+ var comment = {
+ type: block ? 'Block' : 'Line',
+ value: text,
+ start: start,
+ end: end
+ }
+ if (options.locations)
+ comment.loc = new SourceLocation(this, startLoc, endLoc)
+ if (options.ranges)
+ comment.range = [start, end]
+ array.push(comment)
+ }
+ }
+
+ // Registered plugins
+ var plugins = {}
+
+ function keywordRegexp(words) {
+ return new RegExp("^(" + words.replace(/ /g, "|") + ")$")
+ }
+
+ var Parser = function Parser(options, input, startPos) {
+ this.options = options = getOptions(options)
+ this.sourceFile = options.sourceFile
+ this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5])
+ var reserved = options.allowReserved ? "" :
+ reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : "")
+ this.reservedWords = keywordRegexp(reserved)
+ var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict
+ this.reservedWordsStrict = keywordRegexp(reservedStrict)
+ this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + reservedWords.strictBind)
+ this.input = String(input)
+
+ // Used to signal to callers of `readWord1` whether the word
+ // contained any escape sequences. This is needed because words with
+ // escape sequences must not be interpreted as keywords.
+ this.containsEsc = false
+
+ // Load plugins
+ this.loadPlugins(options.plugins)
+
+ // Set up token state
+
+ // The current position of the tokenizer in the input.
+ if (startPos) {
+ this.pos = startPos
+ this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos))
+ this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length
+ } else {
+ this.pos = this.lineStart = 0
+ this.curLine = 1
+ }
+
+ // Properties of the current token:
+ // Its type
+ this.type = tt.eof
+ // For tokens that include more information than their type, the value
+ this.value = null
+ // Its start and end offset
+ this.start = this.end = this.pos
+ // And, if locations are used, the {line, column} object
+ // corresponding to those offsets
+ this.startLoc = this.endLoc = this.curPosition()
+
+ // Position information for the previous token
+ this.lastTokEndLoc = this.lastTokStartLoc = null
+ this.lastTokStart = this.lastTokEnd = this.pos
+
+ // The context stack is used to superficially track syntactic
+ // context to predict whether a regular expression is allowed in a
+ // given position.
+ this.context = this.initialContext()
+ this.exprAllowed = true
+
+ // Figure out if it's a module code.
+ this.strict = this.inModule = options.sourceType === "module"
+
+ // Used to signify the start of a potential arrow function
+ this.potentialArrowAt = -1
+
+ // Flags to track whether we are in a function, a generator.
+ this.inFunction = this.inGenerator = false
+ // Labels in scope.
+ this.labels = []
+
+ // If enabled, skip leading hashbang line.
+ if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!')
+ this.skipLineComment(2)
+ };
+
+ // DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them
+ Parser.prototype.isKeyword = function isKeyword (word) { return this.keywords.test(word) };
+ Parser.prototype.isReservedWord = function isReservedWord (word) { return this.reservedWords.test(word) };
+
+ Parser.prototype.extend = function extend (name, f) {
+ this[name] = f(this[name])
+ };
+
+ Parser.prototype.loadPlugins = function loadPlugins (pluginConfigs) {
+ var this$1 = this;
+
+ for (var name in pluginConfigs) {
+ var plugin = plugins[name]
+ if (!plugin) throw new Error("Plugin '" + name + "' not found")
+ plugin(this$1, pluginConfigs[name])
+ }
+ };
+
+ Parser.prototype.parse = function parse () {
+ var node = this.options.program || this.startNode()
+ this.nextToken()
+ return this.parseTopLevel(node)
+ };
+
+ var pp = Parser.prototype
+
+ // ## Parser utilities
+
+ // Test whether a statement node is the string literal `"use strict"`.
+
+ pp.isUseStrict = function(stmt) {
+ return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" &&
+ stmt.expression.type === "Literal" &&
+ stmt.expression.raw.slice(1, -1) === "use strict"
+ }
+
+ // Predicate that tests whether the next token is of the given
+ // type, and if yes, consumes it as a side effect.
+
+ pp.eat = function(type) {
+ if (this.type === type) {
+ this.next()
+ return true
+ } else {
+ return false
+ }
+ }
+
+ // Tests whether parsed token is a contextual keyword.
+
+ pp.isContextual = function(name) {
+ return this.type === tt.name && this.value === name
+ }
+
+ // Consumes contextual keyword if possible.
+
+ pp.eatContextual = function(name) {
+ return this.value === name && this.eat(tt.name)
+ }
+
+ // Asserts that following token is given contextual keyword.
+
+ pp.expectContextual = function(name) {
+ if (!this.eatContextual(name)) this.unexpected()
+ }
+
+ // Test whether a semicolon can be inserted at the current position.
+
+ pp.canInsertSemicolon = function() {
+ return this.type === tt.eof ||
+ this.type === tt.braceR ||
+ lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
+ }
+
+ pp.insertSemicolon = function() {
+ if (this.canInsertSemicolon()) {
+ if (this.options.onInsertedSemicolon)
+ this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc)
+ return true
+ }
+ }
+
+ // Consume a semicolon, or, failing that, see if we are allowed to
+ // pretend that there is a semicolon at this position.
+
+ pp.semicolon = function() {
+ if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected()
+ }
+
+ pp.afterTrailingComma = function(tokType) {
+ if (this.type == tokType) {
+ if (this.options.onTrailingComma)
+ this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc)
+ this.next()
+ return true
+ }
+ }
+
+ // Expect a token of a given type. If found, consume it, otherwise,
+ // raise an unexpected token error.
+
+ pp.expect = function(type) {
+ this.eat(type) || this.unexpected()
+ }
+
+ // Raise an unexpected token error.
+
+ pp.unexpected = function(pos) {
+ this.raise(pos != null ? pos : this.start, "Unexpected token")
+ }
+
+ var DestructuringErrors = function DestructuringErrors() {
+ this.shorthandAssign = 0
+ this.trailingComma = 0
+ };
+
+ pp.checkPatternErrors = function(refDestructuringErrors, andThrow) {
+ var trailing = refDestructuringErrors && refDestructuringErrors.trailingComma
+ if (!andThrow) return !!trailing
+ if (trailing) this.raise(trailing, "Comma is not permitted after the rest element")
+ }
+
+ pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
+ var pos = refDestructuringErrors && refDestructuringErrors.shorthandAssign
+ if (!andThrow) return !!pos
+ if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns")
+ }
+
+ var pp$1 = Parser.prototype
+
+ // ### Statement parsing
+
+ // Parse a program. Initializes the parser, reads any number of
+ // statements, and wraps them in a Program node. Optionally takes a
+ // `program` argument. If present, the statements will be appended
+ // to its body instead of creating a new node.
+
+ pp$1.parseTopLevel = function(node) {
+ var this$1 = this;
+
+ var first = true
+ if (!node.body) node.body = []
+ while (this.type !== tt.eof) {
+ var stmt = this$1.parseStatement(true, true)
+ node.body.push(stmt)
+ if (first) {
+ if (this$1.isUseStrict(stmt)) this$1.setStrict(true)
+ first = false
+ }
+ }
+ this.next()
+ if (this.options.ecmaVersion >= 6) {
+ node.sourceType = this.options.sourceType
+ }
+ return this.finishNode(node, "Program")
+ }
+
+ var loopLabel = {kind: "loop"};
+ var switchLabel = {kind: "switch"};
+ pp$1.isLet = function() {
+ if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false
+ skipWhiteSpace.lastIndex = this.pos
+ var skip = skipWhiteSpace.exec(this.input)
+ var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next)
+ if (nextCh === 91 || nextCh == 123) return true // '{' and '['
+ if (isIdentifierStart(nextCh, true)) {
+ for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {}
+ var ident = this.input.slice(next, pos)
+ if (!this.isKeyword(ident)) return true
+ }
+ return false
+ }
+
+ // Parse a single statement.
+ //
+ // If expecting a statement and finding a slash operator, parse a
+ // regular expression literal. This is to handle cases like
+ // `if (foo) /blah/.exec(foo)`, where looking at the previous token
+ // does not help.
+
+ pp$1.parseStatement = function(declaration, topLevel) {
+ var starttype = this.type, node = this.startNode(), kind
+
+ if (this.isLet()) {
+ starttype = tt._var
+ kind = "let"
+ }
+
+ // Most types of statements are recognized by the keyword they
+ // start with. Many are trivial to parse, some require a bit of
+ // complexity.
+
+ switch (starttype) {
+ case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword)
+ case tt._debugger: return this.parseDebuggerStatement(node)
+ case tt._do: return this.parseDoStatement(node)
+ case tt._for: return this.parseForStatement(node)
+ case tt._function:
+ if (!declaration && this.options.ecmaVersion >= 6) this.unexpected()
+ return this.parseFunctionStatement(node)
+ case tt._class:
+ if (!declaration) this.unexpected()
+ return this.parseClass(node, true)
+ case tt._if: return this.parseIfStatement(node)
+ case tt._return: return this.parseReturnStatement(node)
+ case tt._switch: return this.parseSwitchStatement(node)
+ case tt._throw: return this.parseThrowStatement(node)
+ case tt._try: return this.parseTryStatement(node)
+ case tt._const: case tt._var:
+ kind = kind || this.value
+ if (!declaration && kind != "var") this.unexpected()
+ return this.parseVarStatement(node, kind)
+ case tt._while: return this.parseWhileStatement(node)
+ case tt._with: return this.parseWithStatement(node)
+ case tt.braceL: return this.parseBlock()
+ case tt.semi: return this.parseEmptyStatement(node)
+ case tt._export:
+ case tt._import:
+ if (!this.options.allowImportExportEverywhere) {
+ if (!topLevel)
+ this.raise(this.start, "'import' and 'export' may only appear at the top level")
+ if (!this.inModule)
+ this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")
+ }
+ return starttype === tt._import ? this.parseImport(node) : this.parseExport(node)
+
+ // If the statement does not start with a statement keyword or a
+ // brace, it's an ExpressionStatement or LabeledStatement. We
+ // simply start parsing an expression, and afterwards, if the
+ // next token is a colon and the expression was a simple
+ // Identifier node, we switch to interpreting it as a label.
+ default:
+ var maybeName = this.value, expr = this.parseExpression()
+ if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon))
+ return this.parseLabeledStatement(node, maybeName, expr)
+ else return this.parseExpressionStatement(node, expr)
+ }
+ }
+
+ pp$1.parseBreakContinueStatement = function(node, keyword) {
+ var this$1 = this;
+
+ var isBreak = keyword == "break"
+ this.next()
+ if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null
+ else if (this.type !== tt.name) this.unexpected()
+ else {
+ node.label = this.parseIdent()
+ this.semicolon()
+ }
+
+ // Verify that there is an actual destination to break or
+ // continue to.
+ for (var i = 0; i < this.labels.length; ++i) {
+ var lab = this$1.labels[i]
+ if (node.label == null || lab.name === node.label.name) {
+ if (lab.kind != null && (isBreak || lab.kind === "loop")) break
+ if (node.label && isBreak) break
+ }
+ }
+ if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword)
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
+ }
+
+ pp$1.parseDebuggerStatement = function(node) {
+ this.next()
+ this.semicolon()
+ return this.finishNode(node, "DebuggerStatement")
+ }
+
+ pp$1.parseDoStatement = function(node) {
+ this.next()
+ this.labels.push(loopLabel)
+ node.body = this.parseStatement(false)
+ this.labels.pop()
+ this.expect(tt._while)
+ node.test = this.parseParenExpression()
+ if (this.options.ecmaVersion >= 6)
+ this.eat(tt.semi)
+ else
+ this.semicolon()
+ return this.finishNode(node, "DoWhileStatement")
+ }
+
+ // Disambiguating between a `for` and a `for`/`in` or `for`/`of`
+ // loop is non-trivial. Basically, we have to parse the init `var`
+ // statement or expression, disallowing the `in` operator (see
+ // the second parameter to `parseExpression`), and then check
+ // whether the next token is `in` or `of`. When there is no init
+ // part (semicolon immediately after the opening parenthesis), it
+ // is a regular `for` loop.
+
+ pp$1.parseForStatement = function(node) {
+ this.next()
+ this.labels.push(loopLabel)
+ this.expect(tt.parenL)
+ if (this.type === tt.semi) return this.parseFor(node, null)
+ var isLet = this.isLet()
+ if (this.type === tt._var || this.type === tt._const || isLet) {
+ var init$1 = this.startNode(), kind = isLet ? "let" : this.value
+ this.next()
+ this.parseVar(init$1, true, kind)
+ this.finishNode(init$1, "VariableDeclaration")
+ if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 &&
+ !(kind !== "var" && init$1.declarations[0].init))
+ return this.parseForIn(node, init$1)
+ return this.parseFor(node, init$1)
+ }
+ var refDestructuringErrors = new DestructuringErrors
+ var init = this.parseExpression(true, refDestructuringErrors)
+ if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
+ this.checkPatternErrors(refDestructuringErrors, true)
+ this.toAssignable(init)
+ this.checkLVal(init)
+ return this.parseForIn(node, init)
+ } else {
+ this.checkExpressionErrors(refDestructuringErrors, true)
+ }
+ return this.parseFor(node, init)
+ }
+
+ pp$1.parseFunctionStatement = function(node) {
+ this.next()
+ return this.parseFunction(node, true)
+ }
+
+ pp$1.parseIfStatement = function(node) {
+ this.next()
+ node.test = this.parseParenExpression()
+ node.consequent = this.parseStatement(false)
+ node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null
+ return this.finishNode(node, "IfStatement")
+ }
+
+ pp$1.parseReturnStatement = function(node) {
+ if (!this.inFunction && !this.options.allowReturnOutsideFunction)
+ this.raise(this.start, "'return' outside of function")
+ this.next()
+
+ // In `return` (and `break`/`continue`), the keywords with
+ // optional arguments, we eagerly look for a semicolon or the
+ // possibility to insert one.
+
+ if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null
+ else { node.argument = this.parseExpression(); this.semicolon() }
+ return this.finishNode(node, "ReturnStatement")
+ }
+
+ pp$1.parseSwitchStatement = function(node) {
+ var this$1 = this;
+
+ this.next()
+ node.discriminant = this.parseParenExpression()
+ node.cases = []
+ this.expect(tt.braceL)
+ this.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.
+
+ for (var cur, sawDefault = false; this.type != tt.braceR;) {
+ if (this$1.type === tt._case || this$1.type === tt._default) {
+ var isCase = this$1.type === tt._case
+ if (cur) this$1.finishNode(cur, "SwitchCase")
+ node.cases.push(cur = this$1.startNode())
+ cur.consequent = []
+ this$1.next()
+ if (isCase) {
+ cur.test = this$1.parseExpression()
+ } else {
+ if (sawDefault) this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses")
+ sawDefault = true
+ cur.test = null
+ }
+ this$1.expect(tt.colon)
+ } else {
+ if (!cur) this$1.unexpected()
+ cur.consequent.push(this$1.parseStatement(true))
+ }
+ }
+ if (cur) this.finishNode(cur, "SwitchCase")
+ this.next() // Closing brace
+ this.labels.pop()
+ return this.finishNode(node, "SwitchStatement")
+ }
+
+ pp$1.parseThrowStatement = function(node) {
+ this.next()
+ if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start)))
+ this.raise(this.lastTokEnd, "Illegal newline after throw")
+ node.argument = this.parseExpression()
+ this.semicolon()
+ return this.finishNode(node, "ThrowStatement")
+ }
+
+ // Reused empty array added for node fields that are always empty.
+
+ var empty = []
+
+ pp$1.parseTryStatement = function(node) {
+ this.next()
+ node.block = this.parseBlock()
+ node.handler = null
+ if (this.type === tt._catch) {
+ var clause = this.startNode()
+ this.next()
+ this.expect(tt.parenL)
+ clause.param = this.parseBindingAtom()
+ this.checkLVal(clause.param, true)
+ this.expect(tt.parenR)
+ clause.body = this.parseBlock()
+ node.handler = this.finishNode(clause, "CatchClause")
+ }
+ node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null
+ if (!node.handler && !node.finalizer)
+ this.raise(node.start, "Missing catch or finally clause")
+ return this.finishNode(node, "TryStatement")
+ }
+
+ pp$1.parseVarStatement = function(node, kind) {
+ this.next()
+ this.parseVar(node, false, kind)
+ this.semicolon()
+ return this.finishNode(node, "VariableDeclaration")
+ }
+
+ pp$1.parseWhileStatement = function(node) {
+ this.next()
+ node.test = this.parseParenExpression()
+ this.labels.push(loopLabel)
+ node.body = this.parseStatement(false)
+ this.labels.pop()
+ return this.finishNode(node, "WhileStatement")
+ }
+
+ pp$1.parseWithStatement = function(node) {
+ if (this.strict) this.raise(this.start, "'with' in strict mode")
+ this.next()
+ node.object = this.parseParenExpression()
+ node.body = this.parseStatement(false)
+ return this.finishNode(node, "WithStatement")
+ }
+
+ pp$1.parseEmptyStatement = function(node) {
+ this.next()
+ return this.finishNode(node, "EmptyStatement")
+ }
+
+ pp$1.parseLabeledStatement = function(node, maybeName, expr) {
+ var this$1 = this;
+
+ for (var i = 0; i < this.labels.length; ++i)
+ if (this$1.labels[i].name === maybeName) this$1.raise(expr.start, "Label '" + maybeName + "' is already declared")
+ var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null
+ for (var i$1 = this.labels.length - 1; i$1 >= 0; i$1--) {
+ var label = this$1.labels[i$1]
+ if (label.statementStart == node.start) {
+ label.statementStart = this$1.start
+ label.kind = kind
+ } else break
+ }
+ this.labels.push({name: maybeName, kind: kind, statementStart: this.start})
+ node.body = this.parseStatement(true)
+ this.labels.pop()
+ node.label = expr
+ return this.finishNode(node, "LabeledStatement")
+ }
+
+ pp$1.parseExpressionStatement = function(node, expr) {
+ node.expression = expr
+ this.semicolon()
+ return this.finishNode(node, "ExpressionStatement")
+ }
+
+ // Parse a semicolon-enclosed block of statements, handling `"use
+ // strict"` declarations when `allowStrict` is true (used for
+ // function bodies).
+
+ pp$1.parseBlock = function(allowStrict) {
+ var this$1 = this;
+
+ var node = this.startNode(), first = true, oldStrict
+ node.body = []
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ var stmt = this$1.parseStatement(true)
+ node.body.push(stmt)
+ if (first && allowStrict && this$1.isUseStrict(stmt)) {
+ oldStrict = this$1.strict
+ this$1.setStrict(this$1.strict = true)
+ }
+ first = false
+ }
+ if (oldStrict === false) this.setStrict(false)
+ return this.finishNode(node, "BlockStatement")
+ }
+
+ // Parse a regular `for` loop. The disambiguation code in
+ // `parseStatement` will already have parsed the init statement or
+ // expression.
+
+ pp$1.parseFor = function(node, init) {
+ node.init = init
+ this.expect(tt.semi)
+ node.test = this.type === tt.semi ? null : this.parseExpression()
+ this.expect(tt.semi)
+ node.update = this.type === tt.parenR ? null : this.parseExpression()
+ this.expect(tt.parenR)
+ node.body = this.parseStatement(false)
+ this.labels.pop()
+ return this.finishNode(node, "ForStatement")
+ }
+
+ // Parse a `for`/`in` and `for`/`of` loop, which are almost
+ // same from parser's perspective.
+
+ pp$1.parseForIn = function(node, init) {
+ var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement"
+ this.next()
+ node.left = init
+ node.right = this.parseExpression()
+ this.expect(tt.parenR)
+ node.body = this.parseStatement(false)
+ this.labels.pop()
+ return this.finishNode(node, type)
+ }
+
+ // Parse a list of variable declarations.
+
+ pp$1.parseVar = function(node, isFor, kind) {
+ var this$1 = this;
+
+ node.declarations = []
+ node.kind = kind
+ for (;;) {
+ var decl = this$1.startNode()
+ this$1.parseVarId(decl)
+ if (this$1.eat(tt.eq)) {
+ decl.init = this$1.parseMaybeAssign(isFor)
+ } else if (kind === "const" && !(this$1.type === tt._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) {
+ this$1.unexpected()
+ } else if (decl.id.type != "Identifier" && !(isFor && (this$1.type === tt._in || this$1.isContextual("of")))) {
+ this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value")
+ } else {
+ decl.init = null
+ }
+ node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"))
+ if (!this$1.eat(tt.comma)) break
+ }
+ return node
+ }
+
+ pp$1.parseVarId = function(decl) {
+ decl.id = this.parseBindingAtom()
+ this.checkLVal(decl.id, true)
+ }
+
+ // Parse a function declaration or literal (depending on the
+ // `isStatement` parameter).
+
+ pp$1.parseFunction = function(node, isStatement, allowExpressionBody) {
+ this.initFunction(node)
+ if (this.options.ecmaVersion >= 6)
+ node.generator = this.eat(tt.star)
+ var oldInGen = this.inGenerator
+ this.inGenerator = node.generator
+ if (isStatement || this.type === tt.name)
+ node.id = this.parseIdent()
+ this.parseFunctionParams(node)
+ this.parseFunctionBody(node, allowExpressionBody)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+ }
+
+ pp$1.parseFunctionParams = function(node) {
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.parenR, false, false, true)
+ }
+
+ // Parse a class declaration or literal (depending on the
+ // `isStatement` parameter).
+
+ pp$1.parseClass = function(node, isStatement) {
+ var this$1 = this;
+
+ this.next()
+ this.parseClassId(node, isStatement)
+ this.parseClassSuper(node)
+ var classBody = this.startNode()
+ var hadConstructor = false
+ classBody.body = []
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ if (this$1.eat(tt.semi)) continue
+ var method = this$1.startNode()
+ var isGenerator = this$1.eat(tt.star)
+ var isMaybeStatic = this$1.type === tt.name && this$1.value === "static"
+ this$1.parsePropertyName(method)
+ method.static = isMaybeStatic && this$1.type !== tt.parenL
+ if (method.static) {
+ if (isGenerator) this$1.unexpected()
+ isGenerator = this$1.eat(tt.star)
+ this$1.parsePropertyName(method)
+ }
+ method.kind = "method"
+ var isGetSet = false
+ if (!method.computed) {
+ var key = method.key;
+ if (!isGenerator && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
+ isGetSet = true
+ method.kind = key.name
+ key = this$1.parsePropertyName(method)
+ }
+ if (!method.static && (key.type === "Identifier" && key.name === "constructor" ||
+ key.type === "Literal" && key.value === "constructor")) {
+ if (hadConstructor) this$1.raise(key.start, "Duplicate constructor in the same class")
+ if (isGetSet) this$1.raise(key.start, "Constructor can't have get/set modifier")
+ if (isGenerator) this$1.raise(key.start, "Constructor can't be a generator")
+ method.kind = "constructor"
+ hadConstructor = true
+ }
+ }
+ this$1.parseClassMethod(classBody, method, isGenerator)
+ if (isGetSet) {
+ var paramCount = method.kind === "get" ? 0 : 1
+ if (method.value.params.length !== paramCount) {
+ var start = method.value.start
+ if (method.kind === "get")
+ this$1.raiseRecoverable(start, "getter should have no params")
+ else
+ this$1.raiseRecoverable(start, "setter should have exactly one param")
+ }
+ if (method.kind === "set" && method.value.params[0].type === "RestElement")
+ this$1.raise(method.value.params[0].start, "Setter cannot use rest params")
+ }
+ }
+ node.body = this.finishNode(classBody, "ClassBody")
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
+ }
+
+ pp$1.parseClassMethod = function(classBody, method, isGenerator) {
+ method.value = this.parseMethod(isGenerator)
+ classBody.body.push(this.finishNode(method, "MethodDefinition"))
+ }
+
+ pp$1.parseClassId = function(node, isStatement) {
+ node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null
+ }
+
+ pp$1.parseClassSuper = function(node) {
+ node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null
+ }
+
+ // Parses module export declaration.
+
+ pp$1.parseExport = function(node) {
+ var this$1 = this;
+
+ this.next()
+ // export * from '...'
+ if (this.eat(tt.star)) {
+ this.expectContextual("from")
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
+ this.semicolon()
+ return this.finishNode(node, "ExportAllDeclaration")
+ }
+ if (this.eat(tt._default)) { // export default ...
+ var parens = this.type == tt.parenL
+ var expr = this.parseMaybeAssign()
+ var needsSemi = true
+ if (!parens && (expr.type == "FunctionExpression" ||
+ expr.type == "ClassExpression")) {
+ needsSemi = false
+ if (expr.id) {
+ expr.type = expr.type == "FunctionExpression"
+ ? "FunctionDeclaration"
+ : "ClassDeclaration"
+ }
+ }
+ node.declaration = expr
+ if (needsSemi) this.semicolon()
+ return this.finishNode(node, "ExportDefaultDeclaration")
+ }
+ // export var|const|let|function|class ...
+ if (this.shouldParseExportStatement()) {
+ node.declaration = this.parseStatement(true)
+ node.specifiers = []
+ node.source = null
+ } else { // export { x, y as z } [from '...']
+ node.declaration = null
+ node.specifiers = this.parseExportSpecifiers()
+ if (this.eatContextual("from")) {
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
+ } else {
+ // check for keywords used as local names
+ for (var i = 0; i < node.specifiers.length; i++) {
+ if (this$1.keywords.test(node.specifiers[i].local.name) || this$1.reservedWords.test(node.specifiers[i].local.name)) {
+ this$1.unexpected(node.specifiers[i].local.start)
+ }
+ }
+
+ node.source = null
+ }
+ this.semicolon()
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+ }
+
+ pp$1.shouldParseExportStatement = function() {
+ return this.type.keyword || this.isLet()
+ }
+
+ // Parses a comma-separated list of module exports.
+
+ pp$1.parseExportSpecifiers = function() {
+ var this$1 = this;
+
+ var nodes = [], first = true
+ // export { x, y as z } [from '...']
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (this$1.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ var node = this$1.startNode()
+ node.local = this$1.parseIdent(this$1.type === tt._default)
+ node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local
+ nodes.push(this$1.finishNode(node, "ExportSpecifier"))
+ }
+ return nodes
+ }
+
+ // Parses import declaration.
+
+ pp$1.parseImport = function(node) {
+ this.next()
+ // import '...'
+ if (this.type === tt.string) {
+ node.specifiers = empty
+ node.source = this.parseExprAtom()
+ } else {
+ node.specifiers = this.parseImportSpecifiers()
+ this.expectContextual("from")
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
+ }
+ this.semicolon()
+ return this.finishNode(node, "ImportDeclaration")
+ }
+
+ // Parses a comma-separated list of module imports.
+
+ pp$1.parseImportSpecifiers = function() {
+ var this$1 = this;
+
+ var nodes = [], first = true
+ if (this.type === tt.name) {
+ // import defaultObj, { x, y as z } from '...'
+ var node = this.startNode()
+ node.local = this.parseIdent()
+ this.checkLVal(node.local, true)
+ nodes.push(this.finishNode(node, "ImportDefaultSpecifier"))
+ if (!this.eat(tt.comma)) return nodes
+ }
+ if (this.type === tt.star) {
+ var node$1 = this.startNode()
+ this.next()
+ this.expectContextual("as")
+ node$1.local = this.parseIdent()
+ this.checkLVal(node$1.local, true)
+ nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"))
+ return nodes
+ }
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (this$1.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ var node$2 = this$1.startNode()
+ node$2.imported = this$1.parseIdent(true)
+ if (this$1.eatContextual("as")) {
+ node$2.local = this$1.parseIdent()
+ } else {
+ node$2.local = node$2.imported
+ if (this$1.isKeyword(node$2.local.name)) this$1.unexpected(node$2.local.start)
+ if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raise(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved")
+ }
+ this$1.checkLVal(node$2.local, true)
+ nodes.push(this$1.finishNode(node$2, "ImportSpecifier"))
+ }
+ return nodes
+ }
+
+ var pp$2 = Parser.prototype
+
+ // Convert existing expression atom to assignable pattern
+ // if possible.
+
+ pp$2.toAssignable = function(node, isBinding) {
+ var this$1 = this;
+
+ if (this.options.ecmaVersion >= 6 && node) {
+ switch (node.type) {
+ case "Identifier":
+ case "ObjectPattern":
+ case "ArrayPattern":
+ break
+
+ case "ObjectExpression":
+ node.type = "ObjectPattern"
+ for (var i = 0; i < node.properties.length; i++) {
+ var prop = node.properties[i]
+ if (prop.kind !== "init") this$1.raise(prop.key.start, "Object pattern can't contain getter or setter")
+ this$1.toAssignable(prop.value, isBinding)
+ }
+ break
+
+ case "ArrayExpression":
+ node.type = "ArrayPattern"
+ this.toAssignableList(node.elements, isBinding)
+ break
+
+ case "AssignmentExpression":
+ if (node.operator === "=") {
+ node.type = "AssignmentPattern"
+ delete node.operator
+ // falls through to AssignmentPattern
+ } else {
+ this.raise(node.left.end, "Only '=' operator can be used for specifying default value.")
+ break
+ }
+
+ case "AssignmentPattern":
+ if (node.right.type === "YieldExpression")
+ this.raise(node.right.start, "Yield expression cannot be a default value")
+ break
+
+ case "ParenthesizedExpression":
+ node.expression = this.toAssignable(node.expression, isBinding)
+ break
+
+ case "MemberExpression":
+ if (!isBinding) break
+
+ default:
+ this.raise(node.start, "Assigning to rvalue")
+ }
+ }
+ return node
+ }
+
+ // Convert list of expression atoms to binding list.
+
+ pp$2.toAssignableList = function(exprList, isBinding) {
+ var this$1 = this;
+
+ 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)
+ if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern")
+ this.unexpected(arg.start)
+ --end
+ }
+
+ if (isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier")
+ this.unexpected(last.argument.start)
+ }
+ for (var i = 0; i < end; i++) {
+ var elt = exprList[i]
+ if (elt) this$1.toAssignable(elt, isBinding)
+ }
+ return exprList
+ }
+
+ // Parses spread element.
+
+ pp$2.parseSpread = function(refDestructuringErrors) {
+ var node = this.startNode()
+ this.next()
+ node.argument = this.parseMaybeAssign(false, refDestructuringErrors)
+ return this.finishNode(node, "SpreadElement")
+ }
+
+ pp$2.parseRest = function(allowNonIdent) {
+ var node = this.startNode()
+ this.next()
+
+ // RestElement inside of a function parameter must be an identifier
+ if (allowNonIdent) node.argument = this.type === tt.name ? this.parseIdent() : this.unexpected()
+ else node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected()
+
+ return this.finishNode(node, "RestElement")
+ }
+
+ // Parses lvalue (assignable) atom.
+
+ pp$2.parseBindingAtom = function() {
+ if (this.options.ecmaVersion < 6) return this.parseIdent()
+ switch (this.type) {
+ case tt.name:
+ return this.parseIdent()
+
+ case tt.bracketL:
+ var node = this.startNode()
+ this.next()
+ node.elements = this.parseBindingList(tt.bracketR, true, true)
+ return this.finishNode(node, "ArrayPattern")
+
+ case tt.braceL:
+ return this.parseObj(true)
+
+ default:
+ this.unexpected()
+ }
+ }
+
+ pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowNonIdent) {
+ var this$1 = this;
+
+ var elts = [], first = true
+ while (!this.eat(close)) {
+ if (first) first = false
+ else this$1.expect(tt.comma)
+ if (allowEmpty && this$1.type === tt.comma) {
+ elts.push(null)
+ } else if (allowTrailingComma && this$1.afterTrailingComma(close)) {
+ break
+ } else if (this$1.type === tt.ellipsis) {
+ var rest = this$1.parseRest(allowNonIdent)
+ this$1.parseBindingListItem(rest)
+ elts.push(rest)
+ if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element")
+ this$1.expect(close)
+ break
+ } else {
+ var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc)
+ this$1.parseBindingListItem(elem)
+ elts.push(elem)
+ }
+ }
+ return elts
+ }
+
+ pp$2.parseBindingListItem = function(param) {
+ return param
+ }
+
+ // Parses assignment pattern around given atom if possible.
+
+ pp$2.parseMaybeDefault = function(startPos, startLoc, left) {
+ left = left || this.parseBindingAtom()
+ if (this.options.ecmaVersion < 6 || !this.eat(tt.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.
+
+ pp$2.checkLVal = function(expr, isBinding, checkClashes) {
+ var this$1 = this;
+
+ switch (expr.type) {
+ case "Identifier":
+ if (this.strict && this.reservedWordsStrictBind.test(expr.name))
+ this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode")
+ if (checkClashes) {
+ if (has(checkClashes, expr.name))
+ this.raiseRecoverable(expr.start, "Argument name clash")
+ checkClashes[expr.name] = true
+ }
+ break
+
+ case "MemberExpression":
+ if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression")
+ break
+
+ case "ObjectPattern":
+ for (var i = 0; i < expr.properties.length; i++)
+ this$1.checkLVal(expr.properties[i].value, isBinding, checkClashes)
+ break
+
+ case "ArrayPattern":
+ for (var i$1 = 0; i$1 < expr.elements.length; i$1++) {
+ var elem = expr.elements[i$1]
+ if (elem) this$1.checkLVal(elem, isBinding, checkClashes)
+ }
+ break
+
+ case "AssignmentPattern":
+ this.checkLVal(expr.left, isBinding, checkClashes)
+ break
+
+ case "RestElement":
+ this.checkLVal(expr.argument, isBinding, checkClashes)
+ break
+
+ case "ParenthesizedExpression":
+ this.checkLVal(expr.expression, isBinding, checkClashes)
+ break
+
+ default:
+ this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue")
+ }
+ }
+
+ var pp$3 = Parser.prototype
+
+ // Check if property name clashes with already added.
+ // Object/class getters and setters are not allowed to clash —
+ // either with each other or with an init property — and in
+ // strict mode, init properties are also not allowed to be repeated.
+
+ pp$3.checkPropClash = function(prop, propHash) {
+ if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))
+ return
+ var key = prop.key;
+ var name
+ switch (key.type) {
+ case "Identifier": name = key.name; break
+ case "Literal": name = String(key.value); break
+ default: return
+ }
+ var kind = prop.kind;
+ if (this.options.ecmaVersion >= 6) {
+ if (name === "__proto__" && kind === "init") {
+ if (propHash.proto) this.raiseRecoverable(key.start, "Redefinition of __proto__ property")
+ propHash.proto = true
+ }
+ return
+ }
+ name = "$" + name
+ var other = propHash[name]
+ if (other) {
+ var isGetSet = kind !== "init"
+ if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init))
+ this.raiseRecoverable(key.start, "Redefinition of property")
+ } else {
+ other = propHash[name] = {
+ init: false,
+ get: false,
+ set: false
+ }
+ }
+ other[kind] = true
+ }
+
+ // ### Expression parsing
+
+ // These nest, from the most general expression type at the top to
+ // 'atomic', nondivisible expression types at the bottom. Most of
+ // the functions will simply let the function(s) below them parse,
+ // and, *if* the syntactic construct they handle is present, wrap
+ // the AST node that the inner parser gave them in another node.
+
+ // Parse a full expression. The optional arguments are used to
+ // forbid the `in` operator (in for loops initalization expressions)
+ // and provide reference for storing '=' operator inside shorthand
+ // property assignment in contexts where both object expression
+ // and object pattern might appear (so it's possible to raise
+ // delayed syntax error at correct position).
+
+ pp$3.parseExpression = function(noIn, refDestructuringErrors) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc
+ var expr = this.parseMaybeAssign(noIn, refDestructuringErrors)
+ if (this.type === tt.comma) {
+ var node = this.startNodeAt(startPos, startLoc)
+ node.expressions = [expr]
+ while (this.eat(tt.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors))
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+ }
+
+ // Parse an assignment expression. This includes applications of
+ // operators like `+=`.
+
+ pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) {
+ if (this.inGenerator && this.isContextual("yield")) return this.parseYield()
+
+ var ownDestructuringErrors = false
+ if (!refDestructuringErrors) {
+ refDestructuringErrors = new DestructuringErrors
+ ownDestructuringErrors = true
+ }
+ var startPos = this.start, startLoc = this.startLoc
+ if (this.type == tt.parenL || this.type == tt.name)
+ this.potentialArrowAt = this.start
+ var left = this.parseMaybeConditional(noIn, refDestructuringErrors)
+ if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc)
+ if (this.type.isAssign) {
+ this.checkPatternErrors(refDestructuringErrors, true)
+ if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors)
+ var node = this.startNodeAt(startPos, startLoc)
+ node.operator = this.value
+ node.left = this.type === tt.eq ? this.toAssignable(left) : left
+ refDestructuringErrors.shorthandAssign = 0 // reset because shorthand default was used correctly
+ this.checkLVal(left)
+ this.next()
+ node.right = this.parseMaybeAssign(noIn)
+ return this.finishNode(node, "AssignmentExpression")
+ } else {
+ if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true)
+ }
+ return left
+ }
+
+ // Parse a ternary conditional (`?:`) operator.
+
+ pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc
+ var expr = this.parseExprOps(noIn, refDestructuringErrors)
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
+ if (this.eat(tt.question)) {
+ var node = this.startNodeAt(startPos, startLoc)
+ node.test = expr
+ node.consequent = this.parseMaybeAssign()
+ this.expect(tt.colon)
+ node.alternate = this.parseMaybeAssign(noIn)
+ return this.finishNode(node, "ConditionalExpression")
+ }
+ return expr
+ }
+
+ // Start the precedence parser.
+
+ pp$3.parseExprOps = function(noIn, refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc
+ var expr = this.parseMaybeUnary(refDestructuringErrors, false)
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
+ return this.parseExprOp(expr, startPos, startLoc, -1, noIn)
+ }
+
+ // Parse binary operators with the operator precedence parsing
+ // algorithm. `left` is the left-hand side of the operator.
+ // `minPrec` provides context that allows the function to stop and
+ // defer further parser to one of its callers when it encounters an
+ // operator that has a lower precedence than the set it is parsing.
+
+ pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
+ var prec = this.type.binop
+ if (prec != null && (!noIn || this.type !== tt._in)) {
+ if (prec > minPrec) {
+ var logical = this.type === tt.logicalOR || this.type === tt.logicalAND
+ var op = this.value
+ this.next()
+ var startPos = this.start, startLoc = this.startLoc
+ var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn)
+ var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical)
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn)
+ }
+ }
+ return left
+ }
+
+ pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) {
+ var node = this.startNodeAt(startPos, startLoc)
+ node.left = left
+ node.operator = op
+ node.right = right
+ return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression")
+ }
+
+ // Parse unary operators, both prefix and postfix.
+
+ pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc, expr
+ if (this.type.prefix) {
+ var node = this.startNode(), update = this.type === tt.incDec
+ node.operator = this.value
+ node.prefix = true
+ this.next()
+ node.argument = this.parseMaybeUnary(null, true)
+ this.checkExpressionErrors(refDestructuringErrors, true)
+ if (update) this.checkLVal(node.argument)
+ else if (this.strict && node.operator === "delete" &&
+ node.argument.type === "Identifier")
+ this.raiseRecoverable(node.start, "Deleting local variable in strict mode")
+ else sawUnary = true
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
+ } else {
+ expr = this.parseExprSubscripts(refDestructuringErrors)
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
+ while (this.type.postfix && !this.canInsertSemicolon()) {
+ var node$1 = this$1.startNodeAt(startPos, startLoc)
+ node$1.operator = this$1.value
+ node$1.prefix = false
+ node$1.argument = expr
+ this$1.checkLVal(expr)
+ this$1.next()
+ expr = this$1.finishNode(node$1, "UpdateExpression")
+ }
+ }
+
+ if (!sawUnary && this.eat(tt.starstar))
+ return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false)
+ else
+ return expr
+ }
+
+ // Parse call, dot, and `[]`-subscript expressions.
+
+ pp$3.parseExprSubscripts = function(refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc
+ var expr = this.parseExprAtom(refDestructuringErrors)
+ var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"
+ if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr
+ return this.parseSubscripts(expr, startPos, startLoc)
+ }
+
+ pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) {
+ var this$1 = this;
+
+ for (;;) {
+ if (this$1.eat(tt.dot)) {
+ var node = this$1.startNodeAt(startPos, startLoc)
+ node.object = base
+ node.property = this$1.parseIdent(true)
+ node.computed = false
+ base = this$1.finishNode(node, "MemberExpression")
+ } else if (this$1.eat(tt.bracketL)) {
+ var node$1 = this$1.startNodeAt(startPos, startLoc)
+ node$1.object = base
+ node$1.property = this$1.parseExpression()
+ node$1.computed = true
+ this$1.expect(tt.bracketR)
+ base = this$1.finishNode(node$1, "MemberExpression")
+ } else if (!noCalls && this$1.eat(tt.parenL)) {
+ var node$2 = this$1.startNodeAt(startPos, startLoc)
+ node$2.callee = base
+ node$2.arguments = this$1.parseExprList(tt.parenR, false)
+ base = this$1.finishNode(node$2, "CallExpression")
+ } else if (this$1.type === tt.backQuote) {
+ var node$3 = this$1.startNodeAt(startPos, startLoc)
+ node$3.tag = base
+ node$3.quasi = this$1.parseTemplate()
+ base = this$1.finishNode(node$3, "TaggedTemplateExpression")
+ } else {
+ return base
+ }
+ }
+ }
+
+ // Parse an atomic expression — either a single token that is an
+ // expression, an expression started by a keyword like `function` or
+ // `new`, or an expression wrapped in punctuation like `()`, `[]`,
+ // or `{}`.
+
+ pp$3.parseExprAtom = function(refDestructuringErrors) {
+ var node, canBeArrow = this.potentialArrowAt == this.start
+ switch (this.type) {
+ case tt._super:
+ if (!this.inFunction)
+ this.raise(this.start, "'super' outside of function or class")
+
+ case tt._this:
+ var type = this.type === tt._this ? "ThisExpression" : "Super"
+ node = this.startNode()
+ this.next()
+ return this.finishNode(node, type)
+
+ case tt.name:
+ var startPos = this.start, startLoc = this.startLoc
+ var id = this.parseIdent(this.type !== tt.name)
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow))
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id])
+ return id
+
+ case tt.regexp:
+ var value = this.value
+ node = this.parseLiteral(value.value)
+ node.regex = {pattern: value.pattern, flags: value.flags}
+ return node
+
+ case tt.num: case tt.string:
+ return this.parseLiteral(this.value)
+
+ case tt._null: case tt._true: case tt._false:
+ node = this.startNode()
+ node.value = this.type === tt._null ? null : this.type === tt._true
+ node.raw = this.type.keyword
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tt.parenL:
+ return this.parseParenAndDistinguishExpression(canBeArrow)
+
+ case tt.bracketL:
+ node = this.startNode()
+ this.next()
+ node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors)
+ return this.finishNode(node, "ArrayExpression")
+
+ case tt.braceL:
+ return this.parseObj(false, refDestructuringErrors)
+
+ case tt._function:
+ node = this.startNode()
+ this.next()
+ return this.parseFunction(node, false)
+
+ case tt._class:
+ return this.parseClass(this.startNode(), false)
+
+ case tt._new:
+ return this.parseNew()
+
+ case tt.backQuote:
+ return this.parseTemplate()
+
+ default:
+ this.unexpected()
+ }
+ }
+
+ pp$3.parseLiteral = function(value) {
+ var node = this.startNode()
+ node.value = value
+ node.raw = this.input.slice(this.start, this.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+ }
+
+ pp$3.parseParenExpression = function() {
+ this.expect(tt.parenL)
+ var val = this.parseExpression()
+ this.expect(tt.parenR)
+ return val
+ }
+
+ pp$3.parseParenAndDistinguishExpression = function(canBeArrow) {
+ var this$1 = this;
+
+ var startPos = this.start, startLoc = this.startLoc, val
+ if (this.options.ecmaVersion >= 6) {
+ this.next()
+
+ var innerStartPos = this.start, innerStartLoc = this.startLoc
+ var exprList = [], first = true
+ var refDestructuringErrors = new DestructuringErrors, spreadStart, innerParenStart
+ while (this.type !== tt.parenR) {
+ first ? first = false : this$1.expect(tt.comma)
+ if (this$1.type === tt.ellipsis) {
+ spreadStart = this$1.start
+ exprList.push(this$1.parseParenItem(this$1.parseRest()))
+ break
+ } else {
+ if (this$1.type === tt.parenL && !innerParenStart) {
+ innerParenStart = this$1.start
+ }
+ exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem))
+ }
+ }
+ var innerEndPos = this.start, innerEndLoc = this.startLoc
+ this.expect(tt.parenR)
+
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {
+ this.checkPatternErrors(refDestructuringErrors, true)
+ if (innerParenStart) this.unexpected(innerParenStart)
+ return this.parseParenArrowList(startPos, startLoc, exprList)
+ }
+
+ if (!exprList.length) this.unexpected(this.lastTokStart)
+ if (spreadStart) this.unexpected(spreadStart)
+ this.checkExpressionErrors(refDestructuringErrors, true)
+
+ if (exprList.length > 1) {
+ val = this.startNodeAt(innerStartPos, innerStartLoc)
+ val.expressions = exprList
+ this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc)
+ } else {
+ val = exprList[0]
+ }
+ } else {
+ val = this.parseParenExpression()
+ }
+
+ if (this.options.preserveParens) {
+ var par = this.startNodeAt(startPos, startLoc)
+ par.expression = val
+ return this.finishNode(par, "ParenthesizedExpression")
+ } else {
+ return val
+ }
+ }
+
+ pp$3.parseParenItem = function(item) {
+ return item
+ }
+
+ pp$3.parseParenArrowList = function(startPos, startLoc, exprList) {
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList)
+ }
+
+ // New's precedence is slightly tricky. It must allow its argument to
+ // be a `[]` or dot subscript expression, but not a call — at least,
+ // not without wrapping it in parentheses. Thus, it uses the noCalls
+ // argument to parseSubscripts to prevent it from consuming the
+ // argument list.
+
+ var empty$1 = []
+
+ pp$3.parseNew = function() {
+ var node = this.startNode()
+ var meta = this.parseIdent(true)
+ if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) {
+ node.meta = meta
+ node.property = this.parseIdent(true)
+ if (node.property.name !== "target")
+ this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target")
+ if (!this.inFunction)
+ this.raiseRecoverable(node.start, "new.target can only be used in functions")
+ return this.finishNode(node, "MetaProperty")
+ }
+ var startPos = this.start, startLoc = this.startLoc
+ node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true)
+ if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false)
+ else node.arguments = empty$1
+ return this.finishNode(node, "NewExpression")
+ }
+
+ // Parse template expression.
+
+ pp$3.parseTemplateElement = function() {
+ var elem = this.startNode()
+ elem.value = {
+ raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'),
+ cooked: this.value
+ }
+ this.next()
+ elem.tail = this.type === tt.backQuote
+ return this.finishNode(elem, "TemplateElement")
+ }
+
+ pp$3.parseTemplate = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.next()
+ node.expressions = []
+ var curElt = this.parseTemplateElement()
+ node.quasis = [curElt]
+ while (!curElt.tail) {
+ this$1.expect(tt.dollarBraceL)
+ node.expressions.push(this$1.parseExpression())
+ this$1.expect(tt.braceR)
+ node.quasis.push(curElt = this$1.parseTemplateElement())
+ }
+ this.next()
+ return this.finishNode(node, "TemplateLiteral")
+ }
+
+ // Parse an object literal or binding pattern.
+
+ pp$3.parseObj = function(isPattern, refDestructuringErrors) {
+ var this$1 = this;
+
+ var node = this.startNode(), first = true, propHash = {}
+ node.properties = []
+ this.next()
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (this$1.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ var prop = this$1.startNode(), isGenerator, startPos, startLoc
+ if (this$1.options.ecmaVersion >= 6) {
+ prop.method = false
+ prop.shorthand = false
+ if (isPattern || refDestructuringErrors) {
+ startPos = this$1.start
+ startLoc = this$1.startLoc
+ }
+ if (!isPattern)
+ isGenerator = this$1.eat(tt.star)
+ }
+ this$1.parsePropertyName(prop)
+ this$1.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors)
+ this$1.checkPropClash(prop, propHash)
+ node.properties.push(this$1.finishNode(prop, "Property"))
+ }
+ return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
+ }
+
+ pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) {
+ if (this.eat(tt.colon)) {
+ prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors)
+ prop.kind = "init"
+ } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) {
+ if (isPattern) this.unexpected()
+ prop.kind = "init"
+ prop.method = true
+ prop.value = this.parseMethod(isGenerator)
+ } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
+ (prop.key.name === "get" || prop.key.name === "set") &&
+ (this.type != tt.comma && this.type != tt.braceR)) {
+ if (isGenerator || isPattern) this.unexpected()
+ prop.kind = prop.key.name
+ this.parsePropertyName(prop)
+ prop.value = this.parseMethod(false)
+ var paramCount = prop.kind === "get" ? 0 : 1
+ if (prop.value.params.length !== paramCount) {
+ var start = prop.value.start
+ if (prop.kind === "get")
+ this.raiseRecoverable(start, "getter should have no params")
+ else
+ this.raiseRecoverable(start, "setter should have exactly one param")
+ }
+ if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
+ this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
+ } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
+ if (this.keywords.test(prop.key.name) ||
+ (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) ||
+ (this.inGenerator && prop.key.name == "yield"))
+ this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property")
+ prop.kind = "init"
+ if (isPattern) {
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
+ } else if (this.type === tt.eq && refDestructuringErrors) {
+ if (!refDestructuringErrors.shorthandAssign)
+ refDestructuringErrors.shorthandAssign = this.start
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
+ } else {
+ prop.value = prop.key
+ }
+ prop.shorthand = true
+ } else this.unexpected()
+ }
+
+ pp$3.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(tt.bracketL)) {
+ prop.computed = true
+ prop.key = this.parseMaybeAssign()
+ this.expect(tt.bracketR)
+ return prop.key
+ } else {
+ prop.computed = false
+ }
+ }
+ return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true)
+ }
+
+ // Initialize empty function node.
+
+ pp$3.initFunction = function(node) {
+ node.id = null
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false
+ node.expression = false
+ }
+ }
+
+ // Parse object or class method.
+
+ pp$3.parseMethod = function(isGenerator) {
+ var node = this.startNode(), oldInGen = this.inGenerator
+ this.inGenerator = isGenerator
+ this.initFunction(node)
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.parenR, false, false)
+ if (this.options.ecmaVersion >= 6)
+ node.generator = isGenerator
+ this.parseFunctionBody(node, false)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, "FunctionExpression")
+ }
+
+ // Parse arrow function expression with given parameters.
+
+ pp$3.parseArrowExpression = function(node, params) {
+ var oldInGen = this.inGenerator
+ this.inGenerator = false
+ this.initFunction(node)
+ node.params = this.toAssignableList(params, true)
+ this.parseFunctionBody(node, true)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, "ArrowFunctionExpression")
+ }
+
+ // Parse function body and check parameters.
+
+ pp$3.parseFunctionBody = function(node, isArrowFunction) {
+ var isExpression = isArrowFunction && this.type !== tt.braceL
+
+ if (isExpression) {
+ node.body = this.parseMaybeAssign()
+ node.expression = true
+ } else {
+ // Start a new scope with regard to labels and the `inFunction`
+ // flag (restore them to their old value afterwards).
+ var oldInFunc = this.inFunction, oldLabels = this.labels
+ this.inFunction = true; this.labels = []
+ node.body = this.parseBlock(true)
+ node.expression = false
+ this.inFunction = oldInFunc; this.labels = oldLabels
+ }
+
+ // 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 useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null;
+ if (this.strict || useStrict) {
+ var oldStrict = this.strict
+ this.strict = true
+ if (node.id)
+ this.checkLVal(node.id, true)
+ this.checkParams(node, useStrict)
+ this.strict = oldStrict
+ } else if (isArrowFunction) {
+ this.checkParams(node, useStrict)
+ }
+ }
+
+ // Checks function params for various disallowed patterns such as using "eval"
+ // or "arguments" and duplicate parameters.
+
+ pp$3.checkParams = function(node, useStrict) {
+ var this$1 = this;
+
+ var nameHash = {}
+ for (var i = 0; i < node.params.length; i++) {
+ if (useStrict && this$1.options.ecmaVersion >= 7 && node.params[i].type !== "Identifier")
+ this$1.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list");
+ this$1.checkLVal(node.params[i], true, nameHash)
+ }
+ }
+
+ // Parses a comma-separated list of expressions, and returns them as
+ // an array. `close` is the token type that ends the list, and
+ // `allowEmpty` can be turned on to allow subsequent commas with
+ // nothing in between them to be parsed as `null` (which is needed
+ // for array literals).
+
+ pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
+ var this$1 = this;
+
+ var elts = [], first = true
+ while (!this.eat(close)) {
+ if (!first) {
+ this$1.expect(tt.comma)
+ if (allowTrailingComma && this$1.afterTrailingComma(close)) break
+ } else first = false
+
+ var elt
+ if (allowEmpty && this$1.type === tt.comma)
+ elt = null
+ else if (this$1.type === tt.ellipsis) {
+ elt = this$1.parseSpread(refDestructuringErrors)
+ if (this$1.type === tt.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) {
+ refDestructuringErrors.trailingComma = this$1.lastTokStart
+ }
+ } else
+ elt = this$1.parseMaybeAssign(false, refDestructuringErrors)
+ elts.push(elt)
+ }
+ return elts
+ }
+
+ // Parse the next token as an identifier. If `liberal` is true (used
+ // when parsing properties), it will also convert keywords into
+ // identifiers.
+
+ pp$3.parseIdent = function(liberal) {
+ var node = this.startNode()
+ if (liberal && this.options.allowReserved == "never") liberal = false
+ if (this.type === tt.name) {
+ if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) &&
+ (this.options.ecmaVersion >= 6 ||
+ this.input.slice(this.start, this.end).indexOf("\\") == -1))
+ this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved")
+ if (!liberal && this.inGenerator && this.value === "yield")
+ this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator")
+ node.name = this.value
+ } else if (liberal && this.type.keyword) {
+ node.name = this.type.keyword
+ } else {
+ this.unexpected()
+ }
+ this.next()
+ return this.finishNode(node, "Identifier")
+ }
+
+ // Parses yield expression inside generator.
+
+ pp$3.parseYield = function() {
+ var node = this.startNode()
+ this.next()
+ if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) {
+ node.delegate = false
+ node.argument = null
+ } else {
+ node.delegate = this.eat(tt.star)
+ node.argument = this.parseMaybeAssign()
+ }
+ return this.finishNode(node, "YieldExpression")
+ }
+
+ var pp$4 = Parser.prototype
+
+ // This function is used to raise exceptions on parse errors. It
+ // takes an offset integer (into the current `input`) to indicate
+ // the location of the error, attaches the position to the end
+ // of the error message, and then raises a `SyntaxError` with that
+ // message.
+
+ pp$4.raise = function(pos, message) {
+ var loc = getLineInfo(this.input, pos)
+ message += " (" + loc.line + ":" + loc.column + ")"
+ var err = new SyntaxError(message)
+ err.pos = pos; err.loc = loc; err.raisedAt = this.pos
+ throw err
+ }
+
+ pp$4.raiseRecoverable = pp$4.raise
+
+ pp$4.curPosition = function() {
+ if (this.options.locations) {
+ return new Position(this.curLine, this.pos - this.lineStart)
+ }
+ }
+
+ var Node = function Node(parser, pos, loc) {
+ this.type = ""
+ this.start = pos
+ this.end = 0
+ if (parser.options.locations)
+ this.loc = new SourceLocation(parser, loc)
+ if (parser.options.directSourceFile)
+ this.sourceFile = parser.options.directSourceFile
+ if (parser.options.ranges)
+ this.range = [pos, 0]
+ };
+
+ // Start an AST node, attaching a start offset.
+
+ var pp$5 = Parser.prototype
+
+ pp$5.startNode = function() {
+ return new Node(this, this.start, this.startLoc)
+ }
+
+ pp$5.startNodeAt = function(pos, loc) {
+ return new Node(this, pos, loc)
+ }
+
+ // Finish an AST node, adding `type` and `end` properties.
+
+ function finishNodeAt(node, type, pos, loc) {
+ node.type = type
+ node.end = pos
+ if (this.options.locations)
+ node.loc.end = loc
+ if (this.options.ranges)
+ node.range[1] = pos
+ return node
+ }
+
+ pp$5.finishNode = function(node, type) {
+ return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)
+ }
+
+ // Finish node at given position
+
+ pp$5.finishNodeAt = function(node, type, pos, loc) {
+ return finishNodeAt.call(this, node, type, pos, loc)
+ }
+
+ var TokContext = function TokContext(token, isExpr, preserveSpace, override) {
+ this.token = token
+ this.isExpr = !!isExpr
+ this.preserveSpace = !!preserveSpace
+ this.override = override
+ };
+
+ var types = {
+ b_stat: new TokContext("{", false),
+ b_expr: new TokContext("{", true),
+ b_tmpl: new TokContext("${", true),
+ p_stat: new TokContext("(", false),
+ p_expr: new TokContext("(", true),
+ q_tmpl: new TokContext("`", true, true, function (p) { return p.readTmplToken(); }),
+ f_expr: new TokContext("function", true)
+ }
+
+ var pp$6 = Parser.prototype
+
+ pp$6.initialContext = function() {
+ return [types.b_stat]
+ }
+
+ pp$6.braceIsBlock = function(prevType) {
+ if (prevType === tt.colon) {
+ var parent = this.curContext()
+ if (parent === types.b_stat || parent === types.b_expr)
+ return !parent.isExpr
+ }
+ if (prevType === tt._return)
+ return lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
+ if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof || prevType === tt.parenR)
+ return true
+ if (prevType == tt.braceL)
+ return this.curContext() === types.b_stat
+ return !this.exprAllowed
+ }
+
+ pp$6.updateContext = function(prevType) {
+ var update, type = this.type
+ if (type.keyword && prevType == tt.dot)
+ this.exprAllowed = false
+ else if (update = type.updateContext)
+ update.call(this, prevType)
+ else
+ this.exprAllowed = type.beforeExpr
+ }
+
+ // Token-specific context update code
+
+ tt.parenR.updateContext = tt.braceR.updateContext = function() {
+ if (this.context.length == 1) {
+ this.exprAllowed = true
+ return
+ }
+ var out = this.context.pop()
+ if (out === types.b_stat && this.curContext() === types.f_expr) {
+ this.context.pop()
+ this.exprAllowed = false
+ } else if (out === types.b_tmpl) {
+ this.exprAllowed = true
+ } else {
+ this.exprAllowed = !out.isExpr
+ }
+ }
+
+ tt.braceL.updateContext = function(prevType) {
+ this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr)
+ this.exprAllowed = true
+ }
+
+ tt.dollarBraceL.updateContext = function() {
+ this.context.push(types.b_tmpl)
+ this.exprAllowed = true
+ }
+
+ tt.parenL.updateContext = function(prevType) {
+ var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while
+ this.context.push(statementParens ? types.p_stat : types.p_expr)
+ this.exprAllowed = true
+ }
+
+ tt.incDec.updateContext = function() {
+ // tokExprAllowed stays unchanged
+ }
+
+ tt._function.updateContext = function(prevType) {
+ if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else &&
+ !((prevType === tt.colon || prevType === tt.braceL) && this.curContext() === types.b_stat))
+ this.context.push(types.f_expr)
+ this.exprAllowed = false
+ }
+
+ tt.backQuote.updateContext = function() {
+ if (this.curContext() === types.q_tmpl)
+ this.context.pop()
+ else
+ this.context.push(types.q_tmpl)
+ this.exprAllowed = false
+ }
+
+ // Object type used to represent tokens. Note that normally, tokens
+ // simply exist as properties on the parser object. This is only
+ // used for the onToken callback and the external tokenizer.
+
+ var Token = function Token(p) {
+ this.type = p.type
+ this.value = p.value
+ this.start = p.start
+ this.end = p.end
+ if (p.options.locations)
+ this.loc = new SourceLocation(p, p.startLoc, p.endLoc)
+ if (p.options.ranges)
+ this.range = [p.start, p.end]
+ };
+
+ // ## Tokenizer
+
+ var pp$7 = Parser.prototype
+
+ // Are we running under Rhino?
+ var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]"
+
+ // Move to the next token
+
+ pp$7.next = function() {
+ if (this.options.onToken)
+ this.options.onToken(new Token(this))
+
+ this.lastTokEnd = this.end
+ this.lastTokStart = this.start
+ this.lastTokEndLoc = this.endLoc
+ this.lastTokStartLoc = this.startLoc
+ this.nextToken()
+ }
+
+ pp$7.getToken = function() {
+ this.next()
+ return new Token(this)
+ }
+
+ // If we're in an ES6 environment, make parsers iterable
+ if (typeof Symbol !== "undefined")
+ pp$7[Symbol.iterator] = function () {
+ var self = this
+ return {next: function () {
+ var token = self.getToken()
+ return {
+ done: token.type === tt.eof,
+ value: token
+ }
+ }}
+ }
+
+ // Toggle strict mode. Re-reads the next number or string to please
+ // pedantic tests (`"use strict"; 010;` should fail).
+
+ pp$7.setStrict = function(strict) {
+ var this$1 = this;
+
+ this.strict = strict
+ if (this.type !== tt.num && this.type !== tt.string) return
+ this.pos = this.start
+ if (this.options.locations) {
+ while (this.pos < this.lineStart) {
+ this$1.lineStart = this$1.input.lastIndexOf("\n", this$1.lineStart - 2) + 1
+ --this$1.curLine
+ }
+ }
+ this.nextToken()
+ }
+
+ pp$7.curContext = function() {
+ return this.context[this.context.length - 1]
+ }
+
+ // Read a single token, updating the parser object's token-related
+ // properties.
+
+ pp$7.nextToken = function() {
+ var curContext = this.curContext()
+ if (!curContext || !curContext.preserveSpace) this.skipSpace()
+
+ this.start = this.pos
+ if (this.options.locations) this.startLoc = this.curPosition()
+ if (this.pos >= this.input.length) return this.finishToken(tt.eof)
+
+ if (curContext.override) return curContext.override(this)
+ else this.readToken(this.fullCharCodeAtPos())
+ }
+
+ pp$7.readToken = function(code) {
+ // Identifier or keyword. '\uXXXX' sequences are allowed in
+ // identifiers, so '\' also dispatches to that.
+ if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */)
+ return this.readWord()
+
+ return this.getTokenFromCode(code)
+ }
+
+ pp$7.fullCharCodeAtPos = function() {
+ var code = this.input.charCodeAt(this.pos)
+ if (code <= 0xd7ff || code >= 0xe000) return code
+ var next = this.input.charCodeAt(this.pos + 1)
+ return (code << 10) + next - 0x35fdc00
+ }
+
+ pp$7.skipBlockComment = function() {
+ var this$1 = this;
+
+ var startLoc = this.options.onComment && this.curPosition()
+ var start = this.pos, end = this.input.indexOf("*/", this.pos += 2)
+ if (end === -1) this.raise(this.pos - 2, "Unterminated comment")
+ this.pos = end + 2
+ if (this.options.locations) {
+ lineBreakG.lastIndex = start
+ var match
+ while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
+ ++this$1.curLine
+ this$1.lineStart = match.index + match[0].length
+ }
+ }
+ if (this.options.onComment)
+ this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos,
+ startLoc, this.curPosition())
+ }
+
+ pp$7.skipLineComment = function(startSkip) {
+ var this$1 = this;
+
+ var start = this.pos
+ var startLoc = this.options.onComment && this.curPosition()
+ var ch = this.input.charCodeAt(this.pos+=startSkip)
+ while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
+ ++this$1.pos
+ ch = this$1.input.charCodeAt(this$1.pos)
+ }
+ if (this.options.onComment)
+ this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos,
+ startLoc, this.curPosition())
+ }
+
+ // Called at the start of the parse and after every token. Skips
+ // whitespace and comments, and.
+
+ pp$7.skipSpace = function() {
+ var this$1 = this;
+
+ loop: while (this.pos < this.input.length) {
+ var ch = this$1.input.charCodeAt(this$1.pos)
+ switch (ch) {
+ case 32: case 160: // ' '
+ ++this$1.pos
+ break
+ case 13:
+ if (this$1.input.charCodeAt(this$1.pos + 1) === 10) {
+ ++this$1.pos
+ }
+ case 10: case 8232: case 8233:
+ ++this$1.pos
+ if (this$1.options.locations) {
+ ++this$1.curLine
+ this$1.lineStart = this$1.pos
+ }
+ break
+ case 47: // '/'
+ switch (this$1.input.charCodeAt(this$1.pos + 1)) {
+ case 42: // '*'
+ this$1.skipBlockComment()
+ break
+ case 47:
+ this$1.skipLineComment(2)
+ break
+ default:
+ break loop
+ }
+ break
+ default:
+ if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
+ ++this$1.pos
+ } else {
+ break loop
+ }
+ }
+ }
+ }
+
+ // Called at the end of every token. Sets `end`, `val`, and
+ // maintains `context` and `exprAllowed`, and skips the space after
+ // the token, so that the next one's `start` will point at the
+ // right position.
+
+ pp$7.finishToken = function(type, val) {
+ this.end = this.pos
+ if (this.options.locations) this.endLoc = this.curPosition()
+ var prevType = this.type
+ this.type = type
+ this.value = val
+
+ this.updateContext(prevType)
+ }
+
+ // ### Token reading
+
+ // This is the function that is called to fetch the next token. It
+ // is somewhat obscure, because it works in character codes rather
+ // than characters, and because operator parsing has been inlined
+ // into it.
+ //
+ // All in the name of speed.
+ //
+ pp$7.readToken_dot = function() {
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next >= 48 && next <= 57) return this.readNumber(true)
+ var next2 = this.input.charCodeAt(this.pos + 2)
+ if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.'
+ this.pos += 3
+ return this.finishToken(tt.ellipsis)
+ } else {
+ ++this.pos
+ return this.finishToken(tt.dot)
+ }
+ }
+
+ pp$7.readToken_slash = function() { // '/'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (this.exprAllowed) {++this.pos; return this.readRegexp()}
+ if (next === 61) return this.finishOp(tt.assign, 2)
+ return this.finishOp(tt.slash, 1)
+ }
+
+ pp$7.readToken_mult_modulo_exp = function(code) { // '%*'
+ var next = this.input.charCodeAt(this.pos + 1)
+ var size = 1
+ var tokentype = code === 42 ? tt.star : tt.modulo
+
+ // exponentiation operator ** and **=
+ if (this.options.ecmaVersion >= 7 && next === 42) {
+ ++size
+ tokentype = tt.starstar
+ next = this.input.charCodeAt(this.pos + 2)
+ }
+
+ if (next === 61) return this.finishOp(tt.assign, size + 1)
+ return this.finishOp(tokentype, size)
+ }
+
+ pp$7.readToken_pipe_amp = function(code) { // '|&'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2)
+ if (next === 61) return this.finishOp(tt.assign, 2)
+ return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1)
+ }
+
+ pp$7.readToken_caret = function() { // '^'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next === 61) return this.finishOp(tt.assign, 2)
+ return this.finishOp(tt.bitwiseXOR, 1)
+ }
+
+ pp$7.readToken_plus_min = function(code) { // '+-'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next === code) {
+ if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 &&
+ lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) {
+ // A `-->` line comment
+ this.skipLineComment(3)
+ this.skipSpace()
+ return this.nextToken()
+ }
+ return this.finishOp(tt.incDec, 2)
+ }
+ if (next === 61) return this.finishOp(tt.assign, 2)
+ return this.finishOp(tt.plusMin, 1)
+ }
+
+ pp$7.readToken_lt_gt = function(code) { // '<>'
+ var next = this.input.charCodeAt(this.pos + 1)
+ var size = 1
+ if (next === code) {
+ size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2
+ if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)
+ return this.finishOp(tt.bitShift, size)
+ }
+ if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 &&
+ this.input.charCodeAt(this.pos + 3) == 45) {
+ if (this.inModule) this.unexpected()
+ // `<!--`, an XML-style comment that should be interpreted as a line comment
+ this.skipLineComment(4)
+ this.skipSpace()
+ return this.nextToken()
+ }
+ if (next === 61) size = 2
+ return this.finishOp(tt.relational, size)
+ }
+
+ pp$7.readToken_eq_excl = function(code) { // '=!'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2)
+ if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>'
+ this.pos += 2
+ return this.finishToken(tt.arrow)
+ }
+ return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1)
+ }
+
+ pp$7.getTokenFromCode = function(code) {
+ switch (code) {
+ // The interpretation of a dot depends on whether it is followed
+ // by a digit or another two dots.
+ case 46: // '.'
+ return this.readToken_dot()
+
+ // Punctuation tokens.
+ case 40: ++this.pos; return this.finishToken(tt.parenL)
+ case 41: ++this.pos; return this.finishToken(tt.parenR)
+ case 59: ++this.pos; return this.finishToken(tt.semi)
+ case 44: ++this.pos; return this.finishToken(tt.comma)
+ case 91: ++this.pos; return this.finishToken(tt.bracketL)
+ case 93: ++this.pos; return this.finishToken(tt.bracketR)
+ case 123: ++this.pos; return this.finishToken(tt.braceL)
+ case 125: ++this.pos; return this.finishToken(tt.braceR)
+ case 58: ++this.pos; return this.finishToken(tt.colon)
+ case 63: ++this.pos; return this.finishToken(tt.question)
+
+ case 96: // '`'
+ if (this.options.ecmaVersion < 6) break
+ ++this.pos
+ return this.finishToken(tt.backQuote)
+
+ case 48: // '0'
+ var next = this.input.charCodeAt(this.pos + 1)
+ if (next === 120 || next === 88) return this.readRadixNumber(16) // '0x', '0X' - hex number
+ if (this.options.ecmaVersion >= 6) {
+ if (next === 111 || next === 79) return this.readRadixNumber(8) // '0o', '0O' - octal number
+ if (next === 98 || next === 66) return this.readRadixNumber(2) // '0b', '0B' - binary number
+ }
+ // 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: // 1-9
+ return this.readNumber(false)
+
+ // Quotes produce strings.
+ case 34: case 39: // '"', "'"
+ return this.readString(code)
+
+ // Operators are parsed inline in tiny state machines. '=' (61) 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: // '/'
+ return this.readToken_slash()
+
+ case 37: case 42: // '%*'
+ return this.readToken_mult_modulo_exp(code)
+
+ case 124: case 38: // '|&'
+ return this.readToken_pipe_amp(code)
+
+ case 94: // '^'
+ return this.readToken_caret()
+
+ case 43: case 45: // '+-'
+ return this.readToken_plus_min(code)
+
+ case 60: case 62: // '<>'
+ return this.readToken_lt_gt(code)
+
+ case 61: case 33: // '=!'
+ return this.readToken_eq_excl(code)
+
+ case 126: // '~'
+ return this.finishOp(tt.prefix, 1)
+ }
+
+ this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'")
+ }
+
+ pp$7.finishOp = function(type, size) {
+ var str = this.input.slice(this.pos, this.pos + size)
+ this.pos += size
+ return this.finishToken(type, str)
+ }
+
+ // Parse a regular expression. Some context-awareness is necessary,
+ // since a '/' inside a '[]' set does not end the expression.
+
+ function tryCreateRegexp(src, flags, throwErrorAt, parser) {
+ try {
+ return new RegExp(src, flags)
+ } catch (e) {
+ if (throwErrorAt !== undefined) {
+ if (e instanceof SyntaxError) parser.raise(throwErrorAt, "Error parsing regular expression: " + e.message)
+ throw e
+ }
+ }
+ }
+
+ var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u")
+
+ pp$7.readRegexp = function() {
+ var this$1 = this;
+
+ var escaped, inClass, start = this.pos
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) this$1.raise(start, "Unterminated regular expression")
+ var ch = this$1.input.charAt(this$1.pos)
+ if (lineBreak.test(ch)) this$1.raise(start, "Unterminated regular expression")
+ if (!escaped) {
+ if (ch === "[") inClass = true
+ else if (ch === "]" && inClass) inClass = false
+ else if (ch === "/" && !inClass) break
+ escaped = ch === "\\"
+ } else escaped = false
+ ++this$1.pos
+ }
+ var content = this.input.slice(start, this.pos)
+ ++this.pos
+ // Need to use `readWord1` because '\uXXXX' sequences are allowed
+ // here (don't ask).
+ var mods = this.readWord1()
+ var tmp = content, tmpFlags = ""
+ if (mods) {
+ var validFlags = /^[gim]*$/
+ if (this.options.ecmaVersion >= 6) validFlags = /^[gimuy]*$/
+ if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag")
+ if (mods.indexOf("u") >= 0) {
+ if (regexpUnicodeSupport) {
+ tmpFlags = "u"
+ } else {
+ // Replace each astral symbol and every Unicode escape sequence that
+ // possibly represents an astral symbol or a paired surrogate with a
+ // single ASCII symbol to avoid throwing on regular expressions that
+ // are only valid in combination with the `/u` flag.
+ // Note: replacing with the ASCII symbol `x` might cause false
+ // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
+ // perfectly valid pattern that is equivalent to `[a-b]`, but it would
+ // be replaced by `[x-b]` which throws an error.
+ tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (_match, code, offset) {
+ code = Number("0x" + code)
+ if (code > 0x10FFFF) this$1.raise(start + offset + 3, "Code point out of bounds")
+ return "x"
+ })
+ tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x")
+ tmpFlags = tmpFlags.replace("u", "")
+ }
+ }
+ }
+ // Detect invalid regular expressions.
+ var value = null
+ // Rhino's regular expression parser is flaky and throws uncatchable exceptions,
+ // so don't do detection if we are running under Rhino
+ if (!isRhino) {
+ tryCreateRegexp(tmp, tmpFlags, start, this)
+ // Get a regular expression object for this pattern-flag pair, or `null` in
+ // case the current environment doesn't support the flags it uses.
+ value = tryCreateRegexp(content, mods)
+ }
+ return this.finishToken(tt.regexp, {pattern: content, flags: mods, value: value})
+ }
+
+ // 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.
+
+ pp$7.readInt = function(radix, len) {
+ var this$1 = this;
+
+ var start = this.pos, total = 0
+ for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
+ var code = this$1.input.charCodeAt(this$1.pos), val
+ if (code >= 97) val = code - 97 + 10 // a
+ else if (code >= 65) val = code - 65 + 10 // A
+ else if (code >= 48 && code <= 57) val = code - 48 // 0-9
+ else val = Infinity
+ if (val >= radix) break
+ ++this$1.pos
+ total = total * radix + val
+ }
+ if (this.pos === start || len != null && this.pos - start !== len) return null
+
+ return total
+ }
+
+ pp$7.readRadixNumber = function(radix) {
+ this.pos += 2 // 0x
+ var val = this.readInt(radix)
+ if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix)
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
+ return this.finishToken(tt.num, val)
+ }
+
+ // Read an integer, octal integer, or floating-point number.
+
+ pp$7.readNumber = function(startsWithDot) {
+ var start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48
+ if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number")
+ var next = this.input.charCodeAt(this.pos)
+ if (next === 46) { // '.'
+ ++this.pos
+ this.readInt(10)
+ isFloat = true
+ next = this.input.charCodeAt(this.pos)
+ }
+ if (next === 69 || next === 101) { // 'eE'
+ next = this.input.charCodeAt(++this.pos)
+ if (next === 43 || next === 45) ++this.pos // '+-'
+ if (this.readInt(10) === null) this.raise(start, "Invalid number")
+ isFloat = true
+ }
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
+
+ var str = this.input.slice(start, this.pos), val
+ if (isFloat) val = parseFloat(str)
+ else if (!octal || str.length === 1) val = parseInt(str, 10)
+ else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number")
+ else val = parseInt(str, 8)
+ return this.finishToken(tt.num, val)
+ }
+
+ // Read a string value, interpreting backslash-escapes.
+
+ pp$7.readCodePoint = function() {
+ var ch = this.input.charCodeAt(this.pos), code
+
+ if (ch === 123) {
+ if (this.options.ecmaVersion < 6) this.unexpected()
+ var codePos = ++this.pos
+ code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos)
+ ++this.pos
+ if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds")
+ } else {
+ code = this.readHexChar(4)
+ }
+ return code
+ }
+
+ function codePointToString(code) {
+ // UTF-16 Decoding
+ if (code <= 0xFFFF) return String.fromCharCode(code)
+ code -= 0x10000
+ return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
+ }
+
+ pp$7.readString = function(quote) {
+ var this$1 = this;
+
+ var out = "", chunkStart = ++this.pos
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated string constant")
+ var ch = this$1.input.charCodeAt(this$1.pos)
+ if (ch === quote) break
+ if (ch === 92) { // '\'
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ out += this$1.readEscapedChar(false)
+ chunkStart = this$1.pos
+ } else {
+ if (isNewLine(ch)) this$1.raise(this$1.start, "Unterminated string constant")
+ ++this$1.pos
+ }
+ }
+ out += this.input.slice(chunkStart, this.pos++)
+ return this.finishToken(tt.string, out)
+ }
+
+ // Reads template string tokens.
+
+ pp$7.readTmplToken = function() {
+ var this$1 = this;
+
+ var out = "", chunkStart = this.pos
+ for (;;) {
+ if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated template")
+ var ch = this$1.input.charCodeAt(this$1.pos)
+ if (ch === 96 || ch === 36 && this$1.input.charCodeAt(this$1.pos + 1) === 123) { // '`', '${'
+ if (this$1.pos === this$1.start && this$1.type === tt.template) {
+ if (ch === 36) {
+ this$1.pos += 2
+ return this$1.finishToken(tt.dollarBraceL)
+ } else {
+ ++this$1.pos
+ return this$1.finishToken(tt.backQuote)
+ }
+ }
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ return this$1.finishToken(tt.template, out)
+ }
+ if (ch === 92) { // '\'
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ out += this$1.readEscapedChar(true)
+ chunkStart = this$1.pos
+ } else if (isNewLine(ch)) {
+ out += this$1.input.slice(chunkStart, this$1.pos)
+ ++this$1.pos
+ switch (ch) {
+ case 13:
+ if (this$1.input.charCodeAt(this$1.pos) === 10) ++this$1.pos
+ case 10:
+ out += "\n"
+ break
+ default:
+ out += String.fromCharCode(ch)
+ break
+ }
+ if (this$1.options.locations) {
+ ++this$1.curLine
+ this$1.lineStart = this$1.pos
+ }
+ chunkStart = this$1.pos
+ } else {
+ ++this$1.pos
+ }
+ }
+ }
+
+ // Used to read escaped characters
+
+ pp$7.readEscapedChar = function(inTemplate) {
+ var ch = this.input.charCodeAt(++this.pos)
+ ++this.pos
+ switch (ch) {
+ case 110: return "\n" // 'n' -> '\n'
+ case 114: return "\r" // 'r' -> '\r'
+ case 120: return String.fromCharCode(this.readHexChar(2)) // 'x'
+ case 117: return codePointToString(this.readCodePoint()) // 'u'
+ case 116: return "\t" // 't' -> '\t'
+ case 98: return "\b" // 'b' -> '\b'
+ case 118: return "\u000b" // 'v' -> '\u000b'
+ case 102: return "\f" // 'f' -> '\f'
+ case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos // '\r\n'
+ case 10: // ' \n'
+ if (this.options.locations) { this.lineStart = this.pos; ++this.curLine }
+ return ""
+ default:
+ if (ch >= 48 && ch <= 55) {
+ var octalStr = this.input.substr(this.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 (octalStr !== "0" && (this.strict || inTemplate)) {
+ this.raise(this.pos - 2, "Octal literal in strict mode")
+ }
+ this.pos += octalStr.length - 1
+ return String.fromCharCode(octal)
+ }
+ return String.fromCharCode(ch)
+ }
+ }
+
+ // Used to read character escape sequences ('\x', '\u', '\U').
+
+ pp$7.readHexChar = function(len) {
+ var codePos = this.pos
+ var n = this.readInt(16, len)
+ if (n === null) this.raise(codePos, "Bad character escape sequence")
+ return n
+ }
+
+ // Read an identifier, and return it as a string. Sets `this.containsEsc`
+ // to whether the word contained a '\u' escape.
+ //
+ // Incrementally adds only escaped chars, adding other chunks as-is
+ // as a micro-optimization.
+
+ pp$7.readWord1 = function() {
+ var this$1 = this;
+
+ this.containsEsc = false
+ var word = "", first = true, chunkStart = this.pos
+ var astral = this.options.ecmaVersion >= 6
+ while (this.pos < this.input.length) {
+ var ch = this$1.fullCharCodeAtPos()
+ if (isIdentifierChar(ch, astral)) {
+ this$1.pos += ch <= 0xffff ? 1 : 2
+ } else if (ch === 92) { // "\"
+ this$1.containsEsc = true
+ word += this$1.input.slice(chunkStart, this$1.pos)
+ var escStart = this$1.pos
+ if (this$1.input.charCodeAt(++this$1.pos) != 117) // "u"
+ this$1.raise(this$1.pos, "Expecting Unicode escape sequence \\uXXXX")
+ ++this$1.pos
+ var esc = this$1.readCodePoint()
+ if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral))
+ this$1.raise(escStart, "Invalid Unicode escape")
+ word += codePointToString(esc)
+ chunkStart = this$1.pos
+ } else {
+ break
+ }
+ first = false
+ }
+ return word + this.input.slice(chunkStart, this.pos)
+ }
+
+ // Read an identifier or keyword token. Will check for reserved
+ // words when necessary.
+
+ pp$7.readWord = function() {
+ var word = this.readWord1()
+ var type = tt.name
+ if ((this.options.ecmaVersion >= 6 || !this.containsEsc) && this.keywords.test(word))
+ type = keywordTypes[word]
+ return this.finishToken(type, word)
+ }
+
+ var version = "3.3.0"
+
+ // The main exported interface (under `self.acorn` when in the
+ // browser) is a `parse` function that takes a code string and
+ // returns an abstract syntax tree as specified by [Mozilla parser
+ // API][api].
+ //
+ // [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
+
+ function parse(input, options) {
+ return new Parser(options, input).parse()
+ }
+
+ // This function tries to parse a single expression at a given
+ // offset in a string. Useful for parsing mixed-language formats
+ // that embed JavaScript expressions.
+
+ function parseExpressionAt(input, pos, options) {
+ var p = new Parser(options, input, pos)
+ p.nextToken()
+ return p.parseExpression()
+ }
+
+ // Acorn is organized as a tokenizer and a recursive-descent parser.
+ // The `tokenizer` export provides an interface to the tokenizer.
+
+ function tokenizer(input, options) {
+ return new Parser(options, input)
+ }
+
+ exports.version = version;
+ exports.parse = parse;
+ exports.parseExpressionAt = parseExpressionAt;
+ exports.tokenizer = tokenizer;
+ exports.Parser = Parser;
+ exports.plugins = plugins;
+ exports.defaultOptions = defaultOptions;
+ exports.Position = Position;
+ exports.SourceLocation = SourceLocation;
+ exports.getLineInfo = getLineInfo;
+ exports.Node = Node;
+ exports.TokenType = TokenType;
+ exports.tokTypes = tt;
+ exports.TokContext = TokContext;
+ exports.tokContexts = types;
+ exports.isIdentifierChar = isIdentifierChar;
+ exports.isIdentifierStart = isIdentifierStart;
+ exports.Token = Token;
+ exports.isNewLine = isNewLine;
+ exports.lineBreak = lineBreak;
+ exports.lineBreakG = lineBreakG;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+})); \ No newline at end of file
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.es.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.es.js
new file mode 100644
index 0000000000..cb114d8cbd
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.es.js
@@ -0,0 +1,1261 @@
+import acorn, { SourceLocation, tokTypes, tokenizer, Node, lineBreak, isNewLine, getLineInfo, Token, lineBreakG } from './acorn.js';
+
+// Registered plugins
+var pluginsLoose = {}
+
+var LooseParser = function LooseParser(input, options) {
+ if ( options === void 0 ) options = {};
+
+ this.toks = tokenizer(input, options)
+ this.options = this.toks.options
+ this.input = this.toks.input
+ this.tok = this.last = {type: tokTypes.eof, start: 0, end: 0}
+ if (this.options.locations) {
+ var here = this.toks.curPosition()
+ this.tok.loc = new SourceLocation(this.toks, here, here)
+ }
+ this.ahead = [] // Tokens ahead
+ this.context = [] // Indentation contexted
+ this.curIndent = 0
+ this.curLineStart = 0
+ this.nextLineStart = this.lineEnd(this.curLineStart) + 1
+ // Load plugins
+ this.options.pluginsLoose = options.pluginsLoose || {}
+ this.loadPlugins(this.options.pluginsLoose)
+};
+
+LooseParser.prototype.startNode = function startNode () {
+ return new Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
+};
+
+LooseParser.prototype.storeCurrentPos = function storeCurrentPos () {
+ return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start
+};
+
+LooseParser.prototype.startNodeAt = function startNodeAt (pos) {
+ if (this.options.locations) {
+ return new Node(this.toks, pos[0], pos[1])
+ } else {
+ return new Node(this.toks, pos)
+ }
+};
+
+LooseParser.prototype.finishNode = function finishNode (node, type) {
+ node.type = type
+ node.end = this.last.end
+ if (this.options.locations)
+ node.loc.end = this.last.loc.end
+ if (this.options.ranges)
+ node.range[1] = this.last.end
+ return node
+};
+
+LooseParser.prototype.dummyNode = function dummyNode (type) {
+ var dummy = this.startNode()
+ dummy.type = type
+ dummy.end = dummy.start
+ if (this.options.locations)
+ dummy.loc.end = dummy.loc.start
+ if (this.options.ranges)
+ dummy.range[1] = dummy.start
+ this.last = {type: tokTypes.name, start: dummy.start, end: dummy.start, loc: dummy.loc}
+ return dummy
+};
+
+LooseParser.prototype.dummyIdent = function dummyIdent () {
+ var dummy = this.dummyNode("Identifier")
+ dummy.name = "✖"
+ return dummy
+};
+
+LooseParser.prototype.dummyString = function dummyString () {
+ var dummy = this.dummyNode("Literal")
+ dummy.value = dummy.raw = "✖"
+ return dummy
+};
+
+LooseParser.prototype.eat = function eat (type) {
+ if (this.tok.type === type) {
+ this.next()
+ return true
+ } else {
+ return false
+ }
+};
+
+LooseParser.prototype.isContextual = function isContextual (name) {
+ return this.tok.type === tokTypes.name && this.tok.value === name
+};
+
+LooseParser.prototype.eatContextual = function eatContextual (name) {
+ return this.tok.value === name && this.eat(tokTypes.name)
+};
+
+LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon () {
+ return this.tok.type === tokTypes.eof || this.tok.type === tokTypes.braceR ||
+ lineBreak.test(this.input.slice(this.last.end, this.tok.start))
+};
+
+LooseParser.prototype.semicolon = function semicolon () {
+ return this.eat(tokTypes.semi)
+};
+
+LooseParser.prototype.expect = function expect (type) {
+ var this$1 = this;
+
+ if (this.eat(type)) return true
+ for (var i = 1; i <= 2; i++) {
+ if (this$1.lookAhead(i).type == type) {
+ for (var j = 0; j < i; j++) this$1.next()
+ return true
+ }
+ }
+};
+
+LooseParser.prototype.pushCx = function pushCx () {
+ this.context.push(this.curIndent)
+};
+
+LooseParser.prototype.popCx = function popCx () {
+ this.curIndent = this.context.pop()
+};
+
+LooseParser.prototype.lineEnd = function lineEnd (pos) {
+ while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) ++pos
+ return pos
+};
+
+LooseParser.prototype.indentationAfter = function indentationAfter (pos) {
+ var this$1 = this;
+
+ for (var count = 0;; ++pos) {
+ var ch = this$1.input.charCodeAt(pos)
+ if (ch === 32) ++count
+ else if (ch === 9) count += this$1.options.tabSize
+ else return count
+ }
+};
+
+LooseParser.prototype.closes = function closes (closeTok, indent, line, blockHeuristic) {
+ if (this.tok.type === closeTok || this.tok.type === tokTypes.eof) return true
+ return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() &&
+ (!blockHeuristic || this.nextLineStart >= this.input.length ||
+ this.indentationAfter(this.nextLineStart) < indent)
+};
+
+LooseParser.prototype.tokenStartsLine = function tokenStartsLine () {
+ var this$1 = this;
+
+ for (var p = this.tok.start - 1; p >= this.curLineStart; --p) {
+ var ch = this$1.input.charCodeAt(p)
+ if (ch !== 9 && ch !== 32) return false
+ }
+ return true
+};
+
+LooseParser.prototype.extend = function extend (name, f) {
+ this[name] = f(this[name])
+};
+
+LooseParser.prototype.loadPlugins = function loadPlugins (pluginConfigs) {
+ var this$1 = this;
+
+ for (var name in pluginConfigs) {
+ var plugin = pluginsLoose[name]
+ if (!plugin) throw new Error("Plugin '" + name + "' not found")
+ plugin(this$1, pluginConfigs[name])
+ }
+};
+
+var lp = LooseParser.prototype
+
+function isSpace(ch) {
+ return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || isNewLine(ch)
+}
+
+lp.next = function() {
+ var this$1 = this;
+
+ this.last = this.tok
+ if (this.ahead.length)
+ this.tok = this.ahead.shift()
+ else
+ this.tok = this.readToken()
+
+ if (this.tok.start >= this.nextLineStart) {
+ while (this.tok.start >= this.nextLineStart) {
+ this$1.curLineStart = this$1.nextLineStart
+ this$1.nextLineStart = this$1.lineEnd(this$1.curLineStart) + 1
+ }
+ this.curIndent = this.indentationAfter(this.curLineStart)
+ }
+}
+
+lp.readToken = function() {
+ var this$1 = this;
+
+ for (;;) {
+ try {
+ this$1.toks.next()
+ if (this$1.toks.type === tokTypes.dot &&
+ this$1.input.substr(this$1.toks.end, 1) === "." &&
+ this$1.options.ecmaVersion >= 6) {
+ this$1.toks.end++
+ this$1.toks.type = tokTypes.ellipsis
+ }
+ return new Token(this$1.toks)
+ } catch(e) {
+ if (!(e instanceof SyntaxError)) throw e
+
+ // Try to skip some text, based on the error message, and then continue
+ var msg = e.message, pos = e.raisedAt, replace = true
+ if (/unterminated/i.test(msg)) {
+ pos = this$1.lineEnd(e.pos + 1)
+ if (/string/.test(msg)) {
+ replace = {start: e.pos, end: pos, type: tokTypes.string, value: this$1.input.slice(e.pos + 1, pos)}
+ } else if (/regular expr/i.test(msg)) {
+ var re = this$1.input.slice(e.pos, pos)
+ try { re = new RegExp(re) } catch(e) {}
+ replace = {start: e.pos, end: pos, type: tokTypes.regexp, value: re}
+ } else if (/template/.test(msg)) {
+ replace = {start: e.pos, end: pos,
+ type: tokTypes.template,
+ value: this$1.input.slice(e.pos, pos)}
+ } else {
+ replace = false
+ }
+ } else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) {
+ while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) ++pos
+ } else if (/character escape|expected hexadecimal/i.test(msg)) {
+ while (pos < this.input.length) {
+ var ch = this$1.input.charCodeAt(pos++)
+ if (ch === 34 || ch === 39 || isNewLine(ch)) break
+ }
+ } else if (/unexpected character/i.test(msg)) {
+ pos++
+ replace = false
+ } else if (/regular expression/i.test(msg)) {
+ replace = true
+ } else {
+ throw e
+ }
+ this$1.resetTo(pos)
+ if (replace === true) replace = {start: pos, end: pos, type: tokTypes.name, value: "✖"}
+ if (replace) {
+ if (this$1.options.locations)
+ replace.loc = new SourceLocation(
+ this$1.toks,
+ getLineInfo(this$1.input, replace.start),
+ getLineInfo(this$1.input, replace.end))
+ return replace
+ }
+ }
+ }
+}
+
+lp.resetTo = function(pos) {
+ var this$1 = this;
+
+ this.toks.pos = pos
+ var ch = this.input.charAt(pos - 1)
+ this.toks.exprAllowed = !ch || /[\[\{\(,;:?\/*=+\-~!|&%^<>]/.test(ch) ||
+ /[enwfd]/.test(ch) &&
+ /\b(keywords|case|else|return|throw|new|in|(instance|type)of|delete|void)$/.test(this.input.slice(pos - 10, pos))
+
+ if (this.options.locations) {
+ this.toks.curLine = 1
+ this.toks.lineStart = lineBreakG.lastIndex = 0
+ var match
+ while ((match = lineBreakG.exec(this.input)) && match.index < pos) {
+ ++this$1.toks.curLine
+ this$1.toks.lineStart = match.index + match[0].length
+ }
+ }
+}
+
+lp.lookAhead = function(n) {
+ var this$1 = this;
+
+ while (n > this.ahead.length)
+ this$1.ahead.push(this$1.readToken())
+ return this.ahead[n - 1]
+}
+
+function isDummy(node) { return node.name == "✖" }
+
+var lp$1 = LooseParser.prototype
+
+lp$1.parseTopLevel = function() {
+ var this$1 = this;
+
+ var node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0)
+ node.body = []
+ while (this.tok.type !== tokTypes.eof) node.body.push(this$1.parseStatement())
+ this.last = this.tok
+ if (this.options.ecmaVersion >= 6) {
+ node.sourceType = this.options.sourceType
+ }
+ return this.finishNode(node, "Program")
+}
+
+lp$1.parseStatement = function() {
+ var this$1 = this;
+
+ var starttype = this.tok.type, node = this.startNode(), kind
+
+ if (this.toks.isLet()) {
+ starttype = tokTypes._var
+ kind = "let"
+ }
+
+ switch (starttype) {
+ case tokTypes._break: case tokTypes._continue:
+ this.next()
+ var isBreak = starttype === tokTypes._break
+ if (this.semicolon() || this.canInsertSemicolon()) {
+ node.label = null
+ } else {
+ node.label = this.tok.type === tokTypes.name ? this.parseIdent() : null
+ this.semicolon()
+ }
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
+
+ case tokTypes._debugger:
+ this.next()
+ this.semicolon()
+ return this.finishNode(node, "DebuggerStatement")
+
+ case tokTypes._do:
+ this.next()
+ node.body = this.parseStatement()
+ node.test = this.eat(tokTypes._while) ? this.parseParenExpression() : this.dummyIdent()
+ this.semicolon()
+ return this.finishNode(node, "DoWhileStatement")
+
+ case tokTypes._for:
+ this.next()
+ this.pushCx()
+ this.expect(tokTypes.parenL)
+ if (this.tok.type === tokTypes.semi) return this.parseFor(node, null)
+ var isLet = this.toks.isLet()
+ if (isLet || this.tok.type === tokTypes._var || this.tok.type === tokTypes._const) {
+ var init$1 = this.parseVar(true, isLet ? "let" : this.tok.value)
+ if (init$1.declarations.length === 1 && (this.tok.type === tokTypes._in || this.isContextual("of"))) {
+ return this.parseForIn(node, init$1)
+ }
+ return this.parseFor(node, init$1)
+ }
+ var init = this.parseExpression(true)
+ if (this.tok.type === tokTypes._in || this.isContextual("of"))
+ return this.parseForIn(node, this.toAssignable(init))
+ return this.parseFor(node, init)
+
+ case tokTypes._function:
+ this.next()
+ return this.parseFunction(node, true)
+
+ case tokTypes._if:
+ this.next()
+ node.test = this.parseParenExpression()
+ node.consequent = this.parseStatement()
+ node.alternate = this.eat(tokTypes._else) ? this.parseStatement() : null
+ return this.finishNode(node, "IfStatement")
+
+ case tokTypes._return:
+ this.next()
+ if (this.eat(tokTypes.semi) || this.canInsertSemicolon()) node.argument = null
+ else { node.argument = this.parseExpression(); this.semicolon() }
+ return this.finishNode(node, "ReturnStatement")
+
+ case tokTypes._switch:
+ var blockIndent = this.curIndent, line = this.curLineStart
+ this.next()
+ node.discriminant = this.parseParenExpression()
+ node.cases = []
+ this.pushCx()
+ this.expect(tokTypes.braceL)
+
+ var cur
+ while (!this.closes(tokTypes.braceR, blockIndent, line, true)) {
+ if (this$1.tok.type === tokTypes._case || this$1.tok.type === tokTypes._default) {
+ var isCase = this$1.tok.type === tokTypes._case
+ if (cur) this$1.finishNode(cur, "SwitchCase")
+ node.cases.push(cur = this$1.startNode())
+ cur.consequent = []
+ this$1.next()
+ if (isCase) cur.test = this$1.parseExpression()
+ else cur.test = null
+ this$1.expect(tokTypes.colon)
+ } else {
+ if (!cur) {
+ node.cases.push(cur = this$1.startNode())
+ cur.consequent = []
+ cur.test = null
+ }
+ cur.consequent.push(this$1.parseStatement())
+ }
+ }
+ if (cur) this.finishNode(cur, "SwitchCase")
+ this.popCx()
+ this.eat(tokTypes.braceR)
+ return this.finishNode(node, "SwitchStatement")
+
+ case tokTypes._throw:
+ this.next()
+ node.argument = this.parseExpression()
+ this.semicolon()
+ return this.finishNode(node, "ThrowStatement")
+
+ case tokTypes._try:
+ this.next()
+ node.block = this.parseBlock()
+ node.handler = null
+ if (this.tok.type === tokTypes._catch) {
+ var clause = this.startNode()
+ this.next()
+ this.expect(tokTypes.parenL)
+ clause.param = this.toAssignable(this.parseExprAtom(), true)
+ this.expect(tokTypes.parenR)
+ clause.body = this.parseBlock()
+ node.handler = this.finishNode(clause, "CatchClause")
+ }
+ node.finalizer = this.eat(tokTypes._finally) ? this.parseBlock() : null
+ if (!node.handler && !node.finalizer) return node.block
+ return this.finishNode(node, "TryStatement")
+
+ case tokTypes._var:
+ case tokTypes._const:
+ return this.parseVar(false, kind || this.tok.value)
+
+ case tokTypes._while:
+ this.next()
+ node.test = this.parseParenExpression()
+ node.body = this.parseStatement()
+ return this.finishNode(node, "WhileStatement")
+
+ case tokTypes._with:
+ this.next()
+ node.object = this.parseParenExpression()
+ node.body = this.parseStatement()
+ return this.finishNode(node, "WithStatement")
+
+ case tokTypes.braceL:
+ return this.parseBlock()
+
+ case tokTypes.semi:
+ this.next()
+ return this.finishNode(node, "EmptyStatement")
+
+ case tokTypes._class:
+ return this.parseClass(true)
+
+ case tokTypes._import:
+ return this.parseImport()
+
+ case tokTypes._export:
+ return this.parseExport()
+
+ default:
+ var expr = this.parseExpression()
+ if (isDummy(expr)) {
+ this.next()
+ if (this.tok.type === tokTypes.eof) return this.finishNode(node, "EmptyStatement")
+ return this.parseStatement()
+ } else if (starttype === tokTypes.name && expr.type === "Identifier" && this.eat(tokTypes.colon)) {
+ node.body = this.parseStatement()
+ node.label = expr
+ return this.finishNode(node, "LabeledStatement")
+ } else {
+ node.expression = expr
+ this.semicolon()
+ return this.finishNode(node, "ExpressionStatement")
+ }
+ }
+}
+
+lp$1.parseBlock = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.pushCx()
+ this.expect(tokTypes.braceL)
+ var blockIndent = this.curIndent, line = this.curLineStart
+ node.body = []
+ while (!this.closes(tokTypes.braceR, blockIndent, line, true))
+ node.body.push(this$1.parseStatement())
+ this.popCx()
+ this.eat(tokTypes.braceR)
+ return this.finishNode(node, "BlockStatement")
+}
+
+lp$1.parseFor = function(node, init) {
+ node.init = init
+ node.test = node.update = null
+ if (this.eat(tokTypes.semi) && this.tok.type !== tokTypes.semi) node.test = this.parseExpression()
+ if (this.eat(tokTypes.semi) && this.tok.type !== tokTypes.parenR) node.update = this.parseExpression()
+ this.popCx()
+ this.expect(tokTypes.parenR)
+ node.body = this.parseStatement()
+ return this.finishNode(node, "ForStatement")
+}
+
+lp$1.parseForIn = function(node, init) {
+ var type = this.tok.type === tokTypes._in ? "ForInStatement" : "ForOfStatement"
+ this.next()
+ node.left = init
+ node.right = this.parseExpression()
+ this.popCx()
+ this.expect(tokTypes.parenR)
+ node.body = this.parseStatement()
+ return this.finishNode(node, type)
+}
+
+lp$1.parseVar = function(noIn, kind) {
+ var this$1 = this;
+
+ var node = this.startNode()
+ node.kind = kind
+ this.next()
+ node.declarations = []
+ do {
+ var decl = this$1.startNode()
+ decl.id = this$1.options.ecmaVersion >= 6 ? this$1.toAssignable(this$1.parseExprAtom(), true) : this$1.parseIdent()
+ decl.init = this$1.eat(tokTypes.eq) ? this$1.parseMaybeAssign(noIn) : null
+ node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"))
+ } while (this.eat(tokTypes.comma))
+ if (!node.declarations.length) {
+ var decl$1 = this.startNode()
+ decl$1.id = this.dummyIdent()
+ node.declarations.push(this.finishNode(decl$1, "VariableDeclarator"))
+ }
+ if (!noIn) this.semicolon()
+ return this.finishNode(node, "VariableDeclaration")
+}
+
+lp$1.parseClass = function(isStatement) {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.next()
+ if (this.tok.type === tokTypes.name) node.id = this.parseIdent()
+ else if (isStatement) node.id = this.dummyIdent()
+ else node.id = null
+ node.superClass = this.eat(tokTypes._extends) ? this.parseExpression() : null
+ node.body = this.startNode()
+ node.body.body = []
+ this.pushCx()
+ var indent = this.curIndent + 1, line = this.curLineStart
+ this.eat(tokTypes.braceL)
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
+ while (!this.closes(tokTypes.braceR, indent, line)) {
+ if (this$1.semicolon()) continue
+ var method = this$1.startNode(), isGenerator
+ if (this$1.options.ecmaVersion >= 6) {
+ method.static = false
+ isGenerator = this$1.eat(tokTypes.star)
+ }
+ this$1.parsePropertyName(method)
+ if (isDummy(method.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(tokTypes.comma); continue }
+ if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" &&
+ (this$1.tok.type != tokTypes.parenL && this$1.tok.type != tokTypes.braceL)) {
+ method.static = true
+ isGenerator = this$1.eat(tokTypes.star)
+ this$1.parsePropertyName(method)
+ } else {
+ method.static = false
+ }
+ if (this$1.options.ecmaVersion >= 5 && method.key.type === "Identifier" &&
+ !method.computed && (method.key.name === "get" || method.key.name === "set") &&
+ this$1.tok.type !== tokTypes.parenL && this$1.tok.type !== tokTypes.braceL) {
+ method.kind = method.key.name
+ this$1.parsePropertyName(method)
+ method.value = this$1.parseMethod(false)
+ } else {
+ if (!method.computed && !method.static && !isGenerator && (
+ method.key.type === "Identifier" && method.key.name === "constructor" ||
+ method.key.type === "Literal" && method.key.value === "constructor")) {
+ method.kind = "constructor"
+ } else {
+ method.kind = "method"
+ }
+ method.value = this$1.parseMethod(isGenerator)
+ }
+ node.body.body.push(this$1.finishNode(method, "MethodDefinition"))
+ }
+ this.popCx()
+ if (!this.eat(tokTypes.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ this.semicolon()
+ this.finishNode(node.body, "ClassBody")
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
+}
+
+lp$1.parseFunction = function(node, isStatement) {
+ this.initFunction(node)
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = this.eat(tokTypes.star)
+ }
+ if (this.tok.type === tokTypes.name) node.id = this.parseIdent()
+ else if (isStatement) node.id = this.dummyIdent()
+ node.params = this.parseFunctionParams()
+ node.body = this.parseBlock()
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+}
+
+lp$1.parseExport = function() {
+ var node = this.startNode()
+ this.next()
+ if (this.eat(tokTypes.star)) {
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString()
+ return this.finishNode(node, "ExportAllDeclaration")
+ }
+ if (this.eat(tokTypes._default)) {
+ var expr = this.parseMaybeAssign()
+ if (expr.id) {
+ switch (expr.type) {
+ case "FunctionExpression": expr.type = "FunctionDeclaration"; break
+ case "ClassExpression": expr.type = "ClassDeclaration"; break
+ }
+ }
+ node.declaration = expr
+ this.semicolon()
+ return this.finishNode(node, "ExportDefaultDeclaration")
+ }
+ if (this.tok.type.keyword || this.toks.isLet()) {
+ node.declaration = this.parseStatement()
+ node.specifiers = []
+ node.source = null
+ } else {
+ node.declaration = null
+ node.specifiers = this.parseExportSpecifierList()
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : null
+ this.semicolon()
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+}
+
+lp$1.parseImport = function() {
+ var node = this.startNode()
+ this.next()
+ if (this.tok.type === tokTypes.string) {
+ node.specifiers = []
+ node.source = this.parseExprAtom()
+ node.kind = ''
+ } else {
+ var elt
+ if (this.tok.type === tokTypes.name && this.tok.value !== "from") {
+ elt = this.startNode()
+ elt.local = this.parseIdent()
+ this.finishNode(elt, "ImportDefaultSpecifier")
+ this.eat(tokTypes.comma)
+ }
+ node.specifiers = this.parseImportSpecifierList()
+ node.source = this.eatContextual("from") && this.tok.type == tokTypes.string ? this.parseExprAtom() : this.dummyString()
+ if (elt) node.specifiers.unshift(elt)
+ }
+ this.semicolon()
+ return this.finishNode(node, "ImportDeclaration")
+}
+
+lp$1.parseImportSpecifierList = function() {
+ var this$1 = this;
+
+ var elts = []
+ if (this.tok.type === tokTypes.star) {
+ var elt = this.startNode()
+ this.next()
+ elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent()
+ elts.push(this.finishNode(elt, "ImportNamespaceSpecifier"))
+ } else {
+ var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
+ this.pushCx()
+ this.eat(tokTypes.braceL)
+ if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
+ while (!this.closes(tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ var elt$1 = this$1.startNode()
+ if (this$1.eat(tokTypes.star)) {
+ elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : this$1.dummyIdent()
+ this$1.finishNode(elt$1, "ImportNamespaceSpecifier")
+ } else {
+ if (this$1.isContextual("from")) break
+ elt$1.imported = this$1.parseIdent()
+ if (isDummy(elt$1.imported)) break
+ elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : elt$1.imported
+ this$1.finishNode(elt$1, "ImportSpecifier")
+ }
+ elts.push(elt$1)
+ this$1.eat(tokTypes.comma)
+ }
+ this.eat(tokTypes.braceR)
+ this.popCx()
+ }
+ return elts
+}
+
+lp$1.parseExportSpecifierList = function() {
+ var this$1 = this;
+
+ var elts = []
+ var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
+ this.pushCx()
+ this.eat(tokTypes.braceL)
+ if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
+ while (!this.closes(tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ if (this$1.isContextual("from")) break
+ var elt = this$1.startNode()
+ elt.local = this$1.parseIdent()
+ if (isDummy(elt.local)) break
+ elt.exported = this$1.eatContextual("as") ? this$1.parseIdent() : elt.local
+ this$1.finishNode(elt, "ExportSpecifier")
+ elts.push(elt)
+ this$1.eat(tokTypes.comma)
+ }
+ this.eat(tokTypes.braceR)
+ this.popCx()
+ return elts
+}
+
+var lp$2 = LooseParser.prototype
+
+lp$2.checkLVal = function(expr) {
+ if (!expr) return expr
+ switch (expr.type) {
+ case "Identifier":
+ case "MemberExpression":
+ return expr
+
+ case "ParenthesizedExpression":
+ expr.expression = this.checkLVal(expr.expression)
+ return expr
+
+ default:
+ return this.dummyIdent()
+ }
+}
+
+lp$2.parseExpression = function(noIn) {
+ var this$1 = this;
+
+ var start = this.storeCurrentPos()
+ var expr = this.parseMaybeAssign(noIn)
+ if (this.tok.type === tokTypes.comma) {
+ var node = this.startNodeAt(start)
+ node.expressions = [expr]
+ while (this.eat(tokTypes.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn))
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+}
+
+lp$2.parseParenExpression = function() {
+ this.pushCx()
+ this.expect(tokTypes.parenL)
+ var val = this.parseExpression()
+ this.popCx()
+ this.expect(tokTypes.parenR)
+ return val
+}
+
+lp$2.parseMaybeAssign = function(noIn) {
+ if (this.toks.isContextual("yield")) {
+ var node = this.startNode()
+ this.next()
+ if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type != tokTypes.star && !this.tok.type.startsExpr)) {
+ node.delegate = false
+ node.argument = null
+ } else {
+ node.delegate = this.eat(tokTypes.star)
+ node.argument = this.parseMaybeAssign()
+ }
+ return this.finishNode(node, "YieldExpression")
+ }
+
+ var start = this.storeCurrentPos()
+ var left = this.parseMaybeConditional(noIn)
+ if (this.tok.type.isAssign) {
+ var node$1 = this.startNodeAt(start)
+ node$1.operator = this.tok.value
+ node$1.left = this.tok.type === tokTypes.eq ? this.toAssignable(left) : this.checkLVal(left)
+ this.next()
+ node$1.right = this.parseMaybeAssign(noIn)
+ return this.finishNode(node$1, "AssignmentExpression")
+ }
+ return left
+}
+
+lp$2.parseMaybeConditional = function(noIn) {
+ var start = this.storeCurrentPos()
+ var expr = this.parseExprOps(noIn)
+ if (this.eat(tokTypes.question)) {
+ var node = this.startNodeAt(start)
+ node.test = expr
+ node.consequent = this.parseMaybeAssign()
+ node.alternate = this.expect(tokTypes.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent()
+ return this.finishNode(node, "ConditionalExpression")
+ }
+ return expr
+}
+
+lp$2.parseExprOps = function(noIn) {
+ var start = this.storeCurrentPos()
+ var indent = this.curIndent, line = this.curLineStart
+ return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line)
+}
+
+lp$2.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) return left
+ var prec = this.tok.type.binop
+ if (prec != null && (!noIn || this.tok.type !== tokTypes._in)) {
+ if (prec > minPrec) {
+ var node = this.startNodeAt(start)
+ node.left = left
+ node.operator = this.tok.value
+ this.next()
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) {
+ node.right = this.dummyIdent()
+ } else {
+ var rightStart = this.storeCurrentPos()
+ node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line)
+ }
+ this.finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression")
+ return this.parseExprOp(node, start, minPrec, noIn, indent, line)
+ }
+ }
+ return left
+}
+
+lp$2.parseMaybeUnary = function(sawUnary) {
+ var this$1 = this;
+
+ var start = this.storeCurrentPos(), expr
+ if (this.tok.type.prefix) {
+ var node = this.startNode(), update = this.tok.type === tokTypes.incDec
+ if (!update) sawUnary = true
+ node.operator = this.tok.value
+ node.prefix = true
+ this.next()
+ node.argument = this.parseMaybeUnary(true)
+ if (update) node.argument = this.checkLVal(node.argument)
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
+ } else if (this.tok.type === tokTypes.ellipsis) {
+ var node$1 = this.startNode()
+ this.next()
+ node$1.argument = this.parseMaybeUnary(sawUnary)
+ expr = this.finishNode(node$1, "SpreadElement")
+ } else {
+ expr = this.parseExprSubscripts()
+ while (this.tok.type.postfix && !this.canInsertSemicolon()) {
+ var node$2 = this$1.startNodeAt(start)
+ node$2.operator = this$1.tok.value
+ node$2.prefix = false
+ node$2.argument = this$1.checkLVal(expr)
+ this$1.next()
+ expr = this$1.finishNode(node$2, "UpdateExpression")
+ }
+ }
+
+ if (!sawUnary && this.eat(tokTypes.starstar)) {
+ var node$3 = this.startNodeAt(start)
+ node$3.operator = "**"
+ node$3.left = expr
+ node$3.right = this.parseMaybeUnary(false)
+ return this.finishNode(node$3, "BinaryExpression")
+ }
+
+ return expr
+}
+
+lp$2.parseExprSubscripts = function() {
+ var start = this.storeCurrentPos()
+ return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart)
+}
+
+lp$2.parseSubscripts = function(base, start, noCalls, startIndent, line) {
+ var this$1 = this;
+
+ for (;;) {
+ if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine()) {
+ if (this$1.tok.type == tokTypes.dot && this$1.curIndent == startIndent)
+ --startIndent
+ else
+ return base
+ }
+
+ if (this$1.eat(tokTypes.dot)) {
+ var node = this$1.startNodeAt(start)
+ node.object = base
+ if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine())
+ node.property = this$1.dummyIdent()
+ else
+ node.property = this$1.parsePropertyAccessor() || this$1.dummyIdent()
+ node.computed = false
+ base = this$1.finishNode(node, "MemberExpression")
+ } else if (this$1.tok.type == tokTypes.bracketL) {
+ this$1.pushCx()
+ this$1.next()
+ var node$1 = this$1.startNodeAt(start)
+ node$1.object = base
+ node$1.property = this$1.parseExpression()
+ node$1.computed = true
+ this$1.popCx()
+ this$1.expect(tokTypes.bracketR)
+ base = this$1.finishNode(node$1, "MemberExpression")
+ } else if (!noCalls && this$1.tok.type == tokTypes.parenL) {
+ var node$2 = this$1.startNodeAt(start)
+ node$2.callee = base
+ node$2.arguments = this$1.parseExprList(tokTypes.parenR)
+ base = this$1.finishNode(node$2, "CallExpression")
+ } else if (this$1.tok.type == tokTypes.backQuote) {
+ var node$3 = this$1.startNodeAt(start)
+ node$3.tag = base
+ node$3.quasi = this$1.parseTemplate()
+ base = this$1.finishNode(node$3, "TaggedTemplateExpression")
+ } else {
+ return base
+ }
+ }
+}
+
+lp$2.parseExprAtom = function() {
+ var node
+ switch (this.tok.type) {
+ case tokTypes._this:
+ case tokTypes._super:
+ var type = this.tok.type === tokTypes._this ? "ThisExpression" : "Super"
+ node = this.startNode()
+ this.next()
+ return this.finishNode(node, type)
+
+ case tokTypes.name:
+ var start = this.storeCurrentPos()
+ var id = this.parseIdent()
+ return this.eat(tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id
+
+ case tokTypes.regexp:
+ node = this.startNode()
+ var val = this.tok.value
+ node.regex = {pattern: val.pattern, flags: val.flags}
+ node.value = val.value
+ node.raw = this.input.slice(this.tok.start, this.tok.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tokTypes.num: case tokTypes.string:
+ node = this.startNode()
+ node.value = this.tok.value
+ node.raw = this.input.slice(this.tok.start, this.tok.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tokTypes._null: case tokTypes._true: case tokTypes._false:
+ node = this.startNode()
+ node.value = this.tok.type === tokTypes._null ? null : this.tok.type === tokTypes._true
+ node.raw = this.tok.type.keyword
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tokTypes.parenL:
+ var parenStart = this.storeCurrentPos()
+ this.next()
+ var inner = this.parseExpression()
+ this.expect(tokTypes.parenR)
+ if (this.eat(tokTypes.arrow)) {
+ return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (isDummy(inner) ? [] : [inner]))
+ }
+ if (this.options.preserveParens) {
+ var par = this.startNodeAt(parenStart)
+ par.expression = inner
+ inner = this.finishNode(par, "ParenthesizedExpression")
+ }
+ return inner
+
+ case tokTypes.bracketL:
+ node = this.startNode()
+ node.elements = this.parseExprList(tokTypes.bracketR, true)
+ return this.finishNode(node, "ArrayExpression")
+
+ case tokTypes.braceL:
+ return this.parseObj()
+
+ case tokTypes._class:
+ return this.parseClass()
+
+ case tokTypes._function:
+ node = this.startNode()
+ this.next()
+ return this.parseFunction(node, false)
+
+ case tokTypes._new:
+ return this.parseNew()
+
+ case tokTypes.backQuote:
+ return this.parseTemplate()
+
+ default:
+ return this.dummyIdent()
+ }
+}
+
+lp$2.parseNew = function() {
+ var node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart
+ var meta = this.parseIdent(true)
+ if (this.options.ecmaVersion >= 6 && this.eat(tokTypes.dot)) {
+ node.meta = meta
+ node.property = this.parseIdent(true)
+ return this.finishNode(node, "MetaProperty")
+ }
+ var start = this.storeCurrentPos()
+ node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line)
+ if (this.tok.type == tokTypes.parenL) {
+ node.arguments = this.parseExprList(tokTypes.parenR)
+ } else {
+ node.arguments = []
+ }
+ return this.finishNode(node, "NewExpression")
+}
+
+lp$2.parseTemplateElement = function() {
+ var elem = this.startNode()
+ elem.value = {
+ raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, '\n'),
+ cooked: this.tok.value
+ }
+ this.next()
+ elem.tail = this.tok.type === tokTypes.backQuote
+ return this.finishNode(elem, "TemplateElement")
+}
+
+lp$2.parseTemplate = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.next()
+ node.expressions = []
+ var curElt = this.parseTemplateElement()
+ node.quasis = [curElt]
+ while (!curElt.tail) {
+ this$1.next()
+ node.expressions.push(this$1.parseExpression())
+ if (this$1.expect(tokTypes.braceR)) {
+ curElt = this$1.parseTemplateElement()
+ } else {
+ curElt = this$1.startNode()
+ curElt.value = {cooked: '', raw: ''}
+ curElt.tail = true
+ this$1.finishNode(curElt, "TemplateElement")
+ }
+ node.quasis.push(curElt)
+ }
+ this.expect(tokTypes.backQuote)
+ return this.finishNode(node, "TemplateLiteral")
+}
+
+lp$2.parseObj = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ node.properties = []
+ this.pushCx()
+ var indent = this.curIndent + 1, line = this.curLineStart
+ this.eat(tokTypes.braceL)
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
+ while (!this.closes(tokTypes.braceR, indent, line)) {
+ var prop = this$1.startNode(), isGenerator, start
+ if (this$1.options.ecmaVersion >= 6) {
+ start = this$1.storeCurrentPos()
+ prop.method = false
+ prop.shorthand = false
+ isGenerator = this$1.eat(tokTypes.star)
+ }
+ this$1.parsePropertyName(prop)
+ if (isDummy(prop.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(tokTypes.comma); continue }
+ if (this$1.eat(tokTypes.colon)) {
+ prop.kind = "init"
+ prop.value = this$1.parseMaybeAssign()
+ } else if (this$1.options.ecmaVersion >= 6 && (this$1.tok.type === tokTypes.parenL || this$1.tok.type === tokTypes.braceL)) {
+ prop.kind = "init"
+ prop.method = true
+ prop.value = this$1.parseMethod(isGenerator)
+ } else if (this$1.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
+ !prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
+ (this$1.tok.type != tokTypes.comma && this$1.tok.type != tokTypes.braceR)) {
+ prop.kind = prop.key.name
+ this$1.parsePropertyName(prop)
+ prop.value = this$1.parseMethod(false)
+ } else {
+ prop.kind = "init"
+ if (this$1.options.ecmaVersion >= 6) {
+ if (this$1.eat(tokTypes.eq)) {
+ var assign = this$1.startNodeAt(start)
+ assign.operator = "="
+ assign.left = prop.key
+ assign.right = this$1.parseMaybeAssign()
+ prop.value = this$1.finishNode(assign, "AssignmentExpression")
+ } else {
+ prop.value = prop.key
+ }
+ } else {
+ prop.value = this$1.dummyIdent()
+ }
+ prop.shorthand = true
+ }
+ node.properties.push(this$1.finishNode(prop, "Property"))
+ this$1.eat(tokTypes.comma)
+ }
+ this.popCx()
+ if (!this.eat(tokTypes.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ return this.finishNode(node, "ObjectExpression")
+}
+
+lp$2.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(tokTypes.bracketL)) {
+ prop.computed = true
+ prop.key = this.parseExpression()
+ this.expect(tokTypes.bracketR)
+ return
+ } else {
+ prop.computed = false
+ }
+ }
+ var key = (this.tok.type === tokTypes.num || this.tok.type === tokTypes.string) ? this.parseExprAtom() : this.parseIdent()
+ prop.key = key || this.dummyIdent()
+}
+
+lp$2.parsePropertyAccessor = function() {
+ if (this.tok.type === tokTypes.name || this.tok.type.keyword) return this.parseIdent()
+}
+
+lp$2.parseIdent = function() {
+ var name = this.tok.type === tokTypes.name ? this.tok.value : this.tok.type.keyword
+ if (!name) return this.dummyIdent()
+ var node = this.startNode()
+ this.next()
+ node.name = name
+ return this.finishNode(node, "Identifier")
+}
+
+lp$2.initFunction = function(node) {
+ node.id = null
+ node.params = []
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false
+ node.expression = false
+ }
+}
+
+// Convert existing expression atom to assignable pattern
+// if possible.
+
+lp$2.toAssignable = function(node, binding) {
+ var this$1 = this;
+
+ if (!node || node.type == "Identifier" || (node.type == "MemberExpression" && !binding)) {
+ // Okay
+ } else if (node.type == "ParenthesizedExpression") {
+ node.expression = this.toAssignable(node.expression, binding)
+ } else if (this.options.ecmaVersion < 6) {
+ return this.dummyIdent()
+ } else if (node.type == "ObjectExpression") {
+ node.type = "ObjectPattern"
+ var props = node.properties
+ for (var i = 0; i < props.length; i++)
+ props[i].value = this$1.toAssignable(props[i].value, binding)
+ } else if (node.type == "ArrayExpression") {
+ node.type = "ArrayPattern"
+ this.toAssignableList(node.elements, binding)
+ } else if (node.type == "SpreadElement") {
+ node.type = "RestElement"
+ node.argument = this.toAssignable(node.argument, binding)
+ } else if (node.type == "AssignmentExpression") {
+ node.type = "AssignmentPattern"
+ delete node.operator
+ } else {
+ return this.dummyIdent()
+ }
+ return node
+}
+
+lp$2.toAssignableList = function(exprList, binding) {
+ var this$1 = this;
+
+ for (var i = 0; i < exprList.length; i++)
+ exprList[i] = this$1.toAssignable(exprList[i], binding)
+ return exprList
+}
+
+lp$2.parseFunctionParams = function(params) {
+ params = this.parseExprList(tokTypes.parenR)
+ return this.toAssignableList(params, true)
+}
+
+lp$2.parseMethod = function(isGenerator) {
+ var node = this.startNode()
+ this.initFunction(node)
+ node.params = this.parseFunctionParams()
+ node.generator = isGenerator || false
+ node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== tokTypes.braceL
+ node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ return this.finishNode(node, "FunctionExpression")
+}
+
+lp$2.parseArrowExpression = function(node, params) {
+ this.initFunction(node)
+ node.params = this.toAssignableList(params, true)
+ node.expression = this.tok.type !== tokTypes.braceL
+ node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ return this.finishNode(node, "ArrowFunctionExpression")
+}
+
+lp$2.parseExprList = function(close, allowEmpty) {
+ var this$1 = this;
+
+ this.pushCx()
+ var indent = this.curIndent, line = this.curLineStart, elts = []
+ this.next() // Opening bracket
+ while (!this.closes(close, indent + 1, line)) {
+ if (this$1.eat(tokTypes.comma)) {
+ elts.push(allowEmpty ? null : this$1.dummyIdent())
+ continue
+ }
+ var elt = this$1.parseMaybeAssign()
+ if (isDummy(elt)) {
+ if (this$1.closes(close, indent, line)) break
+ this$1.next()
+ } else {
+ elts.push(elt)
+ }
+ this$1.eat(tokTypes.comma)
+ }
+ this.popCx()
+ if (!this.eat(close)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ return elts
+}
+
+acorn.defaultOptions.tabSize = 4
+
+function parse_dammit(input, options) {
+ var p = new LooseParser(input, options)
+ p.next()
+ return p.parseTopLevel()
+}
+
+acorn.parse_dammit = parse_dammit
+acorn.LooseParser = LooseParser
+acorn.pluginsLoose = pluginsLoose
+
+export { parse_dammit, LooseParser, pluginsLoose }; \ No newline at end of file
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.js
new file mode 100644
index 0000000000..26b9e48128
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.js
@@ -0,0 +1,1273 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('./acorn.js')) :
+ typeof define === 'function' && define.amd ? define(['exports', './acorn.js'], factory) :
+ (factory((global.acorn = global.acorn || {}, global.acorn.loose = global.acorn.loose || {}),global.acorn));
+}(this, function (exports,acorn) { 'use strict';
+
+ var acorn__default = 'default' in acorn ? acorn['default'] : acorn;
+
+ // Registered plugins
+ var pluginsLoose = {}
+
+ var LooseParser = function LooseParser(input, options) {
+ if ( options === void 0 ) options = {};
+
+ this.toks = acorn.tokenizer(input, options)
+ this.options = this.toks.options
+ this.input = this.toks.input
+ this.tok = this.last = {type: acorn.tokTypes.eof, start: 0, end: 0}
+ if (this.options.locations) {
+ var here = this.toks.curPosition()
+ this.tok.loc = new acorn.SourceLocation(this.toks, here, here)
+ }
+ this.ahead = [] // Tokens ahead
+ this.context = [] // Indentation contexted
+ this.curIndent = 0
+ this.curLineStart = 0
+ this.nextLineStart = this.lineEnd(this.curLineStart) + 1
+ // Load plugins
+ this.options.pluginsLoose = options.pluginsLoose || {}
+ this.loadPlugins(this.options.pluginsLoose)
+ };
+
+ LooseParser.prototype.startNode = function startNode () {
+ return new acorn.Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
+ };
+
+ LooseParser.prototype.storeCurrentPos = function storeCurrentPos () {
+ return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start
+ };
+
+ LooseParser.prototype.startNodeAt = function startNodeAt (pos) {
+ if (this.options.locations) {
+ return new acorn.Node(this.toks, pos[0], pos[1])
+ } else {
+ return new acorn.Node(this.toks, pos)
+ }
+ };
+
+ LooseParser.prototype.finishNode = function finishNode (node, type) {
+ node.type = type
+ node.end = this.last.end
+ if (this.options.locations)
+ node.loc.end = this.last.loc.end
+ if (this.options.ranges)
+ node.range[1] = this.last.end
+ return node
+ };
+
+ LooseParser.prototype.dummyNode = function dummyNode (type) {
+ var dummy = this.startNode()
+ dummy.type = type
+ dummy.end = dummy.start
+ if (this.options.locations)
+ dummy.loc.end = dummy.loc.start
+ if (this.options.ranges)
+ dummy.range[1] = dummy.start
+ this.last = {type: acorn.tokTypes.name, start: dummy.start, end: dummy.start, loc: dummy.loc}
+ return dummy
+ };
+
+ LooseParser.prototype.dummyIdent = function dummyIdent () {
+ var dummy = this.dummyNode("Identifier")
+ dummy.name = "✖"
+ return dummy
+ };
+
+ LooseParser.prototype.dummyString = function dummyString () {
+ var dummy = this.dummyNode("Literal")
+ dummy.value = dummy.raw = "✖"
+ return dummy
+ };
+
+ LooseParser.prototype.eat = function eat (type) {
+ if (this.tok.type === type) {
+ this.next()
+ return true
+ } else {
+ return false
+ }
+ };
+
+ LooseParser.prototype.isContextual = function isContextual (name) {
+ return this.tok.type === acorn.tokTypes.name && this.tok.value === name
+ };
+
+ LooseParser.prototype.eatContextual = function eatContextual (name) {
+ return this.tok.value === name && this.eat(acorn.tokTypes.name)
+ };
+
+ LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon () {
+ return this.tok.type === acorn.tokTypes.eof || this.tok.type === acorn.tokTypes.braceR ||
+ acorn.lineBreak.test(this.input.slice(this.last.end, this.tok.start))
+ };
+
+ LooseParser.prototype.semicolon = function semicolon () {
+ return this.eat(acorn.tokTypes.semi)
+ };
+
+ LooseParser.prototype.expect = function expect (type) {
+ var this$1 = this;
+
+ if (this.eat(type)) return true
+ for (var i = 1; i <= 2; i++) {
+ if (this$1.lookAhead(i).type == type) {
+ for (var j = 0; j < i; j++) this$1.next()
+ return true
+ }
+ }
+ };
+
+ LooseParser.prototype.pushCx = function pushCx () {
+ this.context.push(this.curIndent)
+ };
+
+ LooseParser.prototype.popCx = function popCx () {
+ this.curIndent = this.context.pop()
+ };
+
+ LooseParser.prototype.lineEnd = function lineEnd (pos) {
+ while (pos < this.input.length && !acorn.isNewLine(this.input.charCodeAt(pos))) ++pos
+ return pos
+ };
+
+ LooseParser.prototype.indentationAfter = function indentationAfter (pos) {
+ var this$1 = this;
+
+ for (var count = 0;; ++pos) {
+ var ch = this$1.input.charCodeAt(pos)
+ if (ch === 32) ++count
+ else if (ch === 9) count += this$1.options.tabSize
+ else return count
+ }
+ };
+
+ LooseParser.prototype.closes = function closes (closeTok, indent, line, blockHeuristic) {
+ if (this.tok.type === closeTok || this.tok.type === acorn.tokTypes.eof) return true
+ return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() &&
+ (!blockHeuristic || this.nextLineStart >= this.input.length ||
+ this.indentationAfter(this.nextLineStart) < indent)
+ };
+
+ LooseParser.prototype.tokenStartsLine = function tokenStartsLine () {
+ var this$1 = this;
+
+ for (var p = this.tok.start - 1; p >= this.curLineStart; --p) {
+ var ch = this$1.input.charCodeAt(p)
+ if (ch !== 9 && ch !== 32) return false
+ }
+ return true
+ };
+
+ LooseParser.prototype.extend = function extend (name, f) {
+ this[name] = f(this[name])
+ };
+
+ LooseParser.prototype.loadPlugins = function loadPlugins (pluginConfigs) {
+ var this$1 = this;
+
+ for (var name in pluginConfigs) {
+ var plugin = pluginsLoose[name]
+ if (!plugin) throw new Error("Plugin '" + name + "' not found")
+ plugin(this$1, pluginConfigs[name])
+ }
+ };
+
+ var lp = LooseParser.prototype
+
+ function isSpace(ch) {
+ return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || acorn.isNewLine(ch)
+ }
+
+ lp.next = function() {
+ var this$1 = this;
+
+ this.last = this.tok
+ if (this.ahead.length)
+ this.tok = this.ahead.shift()
+ else
+ this.tok = this.readToken()
+
+ if (this.tok.start >= this.nextLineStart) {
+ while (this.tok.start >= this.nextLineStart) {
+ this$1.curLineStart = this$1.nextLineStart
+ this$1.nextLineStart = this$1.lineEnd(this$1.curLineStart) + 1
+ }
+ this.curIndent = this.indentationAfter(this.curLineStart)
+ }
+ }
+
+ lp.readToken = function() {
+ var this$1 = this;
+
+ for (;;) {
+ try {
+ this$1.toks.next()
+ if (this$1.toks.type === acorn.tokTypes.dot &&
+ this$1.input.substr(this$1.toks.end, 1) === "." &&
+ this$1.options.ecmaVersion >= 6) {
+ this$1.toks.end++
+ this$1.toks.type = acorn.tokTypes.ellipsis
+ }
+ return new acorn.Token(this$1.toks)
+ } catch(e) {
+ if (!(e instanceof SyntaxError)) throw e
+
+ // Try to skip some text, based on the error message, and then continue
+ var msg = e.message, pos = e.raisedAt, replace = true
+ if (/unterminated/i.test(msg)) {
+ pos = this$1.lineEnd(e.pos + 1)
+ if (/string/.test(msg)) {
+ replace = {start: e.pos, end: pos, type: acorn.tokTypes.string, value: this$1.input.slice(e.pos + 1, pos)}
+ } else if (/regular expr/i.test(msg)) {
+ var re = this$1.input.slice(e.pos, pos)
+ try { re = new RegExp(re) } catch(e) {}
+ replace = {start: e.pos, end: pos, type: acorn.tokTypes.regexp, value: re}
+ } else if (/template/.test(msg)) {
+ replace = {start: e.pos, end: pos,
+ type: acorn.tokTypes.template,
+ value: this$1.input.slice(e.pos, pos)}
+ } else {
+ replace = false
+ }
+ } else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) {
+ while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) ++pos
+ } else if (/character escape|expected hexadecimal/i.test(msg)) {
+ while (pos < this.input.length) {
+ var ch = this$1.input.charCodeAt(pos++)
+ if (ch === 34 || ch === 39 || acorn.isNewLine(ch)) break
+ }
+ } else if (/unexpected character/i.test(msg)) {
+ pos++
+ replace = false
+ } else if (/regular expression/i.test(msg)) {
+ replace = true
+ } else {
+ throw e
+ }
+ this$1.resetTo(pos)
+ if (replace === true) replace = {start: pos, end: pos, type: acorn.tokTypes.name, value: "✖"}
+ if (replace) {
+ if (this$1.options.locations)
+ replace.loc = new acorn.SourceLocation(
+ this$1.toks,
+ acorn.getLineInfo(this$1.input, replace.start),
+ acorn.getLineInfo(this$1.input, replace.end))
+ return replace
+ }
+ }
+ }
+ }
+
+ lp.resetTo = function(pos) {
+ var this$1 = this;
+
+ this.toks.pos = pos
+ var ch = this.input.charAt(pos - 1)
+ this.toks.exprAllowed = !ch || /[\[\{\(,;:?\/*=+\-~!|&%^<>]/.test(ch) ||
+ /[enwfd]/.test(ch) &&
+ /\b(keywords|case|else|return|throw|new|in|(instance|type)of|delete|void)$/.test(this.input.slice(pos - 10, pos))
+
+ if (this.options.locations) {
+ this.toks.curLine = 1
+ this.toks.lineStart = acorn.lineBreakG.lastIndex = 0
+ var match
+ while ((match = acorn.lineBreakG.exec(this.input)) && match.index < pos) {
+ ++this$1.toks.curLine
+ this$1.toks.lineStart = match.index + match[0].length
+ }
+ }
+ }
+
+ lp.lookAhead = function(n) {
+ var this$1 = this;
+
+ while (n > this.ahead.length)
+ this$1.ahead.push(this$1.readToken())
+ return this.ahead[n - 1]
+ }
+
+ function isDummy(node) { return node.name == "✖" }
+
+ var lp$1 = LooseParser.prototype
+
+ lp$1.parseTopLevel = function() {
+ var this$1 = this;
+
+ var node = this.startNodeAt(this.options.locations ? [0, acorn.getLineInfo(this.input, 0)] : 0)
+ node.body = []
+ while (this.tok.type !== acorn.tokTypes.eof) node.body.push(this$1.parseStatement())
+ this.last = this.tok
+ if (this.options.ecmaVersion >= 6) {
+ node.sourceType = this.options.sourceType
+ }
+ return this.finishNode(node, "Program")
+ }
+
+ lp$1.parseStatement = function() {
+ var this$1 = this;
+
+ var starttype = this.tok.type, node = this.startNode(), kind
+
+ if (this.toks.isLet()) {
+ starttype = acorn.tokTypes._var
+ kind = "let"
+ }
+
+ switch (starttype) {
+ case acorn.tokTypes._break: case acorn.tokTypes._continue:
+ this.next()
+ var isBreak = starttype === acorn.tokTypes._break
+ if (this.semicolon() || this.canInsertSemicolon()) {
+ node.label = null
+ } else {
+ node.label = this.tok.type === acorn.tokTypes.name ? this.parseIdent() : null
+ this.semicolon()
+ }
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
+
+ case acorn.tokTypes._debugger:
+ this.next()
+ this.semicolon()
+ return this.finishNode(node, "DebuggerStatement")
+
+ case acorn.tokTypes._do:
+ this.next()
+ node.body = this.parseStatement()
+ node.test = this.eat(acorn.tokTypes._while) ? this.parseParenExpression() : this.dummyIdent()
+ this.semicolon()
+ return this.finishNode(node, "DoWhileStatement")
+
+ case acorn.tokTypes._for:
+ this.next()
+ this.pushCx()
+ this.expect(acorn.tokTypes.parenL)
+ if (this.tok.type === acorn.tokTypes.semi) return this.parseFor(node, null)
+ var isLet = this.toks.isLet()
+ if (isLet || this.tok.type === acorn.tokTypes._var || this.tok.type === acorn.tokTypes._const) {
+ var init$1 = this.parseVar(true, isLet ? "let" : this.tok.value)
+ if (init$1.declarations.length === 1 && (this.tok.type === acorn.tokTypes._in || this.isContextual("of"))) {
+ return this.parseForIn(node, init$1)
+ }
+ return this.parseFor(node, init$1)
+ }
+ var init = this.parseExpression(true)
+ if (this.tok.type === acorn.tokTypes._in || this.isContextual("of"))
+ return this.parseForIn(node, this.toAssignable(init))
+ return this.parseFor(node, init)
+
+ case acorn.tokTypes._function:
+ this.next()
+ return this.parseFunction(node, true)
+
+ case acorn.tokTypes._if:
+ this.next()
+ node.test = this.parseParenExpression()
+ node.consequent = this.parseStatement()
+ node.alternate = this.eat(acorn.tokTypes._else) ? this.parseStatement() : null
+ return this.finishNode(node, "IfStatement")
+
+ case acorn.tokTypes._return:
+ this.next()
+ if (this.eat(acorn.tokTypes.semi) || this.canInsertSemicolon()) node.argument = null
+ else { node.argument = this.parseExpression(); this.semicolon() }
+ return this.finishNode(node, "ReturnStatement")
+
+ case acorn.tokTypes._switch:
+ var blockIndent = this.curIndent, line = this.curLineStart
+ this.next()
+ node.discriminant = this.parseParenExpression()
+ node.cases = []
+ this.pushCx()
+ this.expect(acorn.tokTypes.braceL)
+
+ var cur
+ while (!this.closes(acorn.tokTypes.braceR, blockIndent, line, true)) {
+ if (this$1.tok.type === acorn.tokTypes._case || this$1.tok.type === acorn.tokTypes._default) {
+ var isCase = this$1.tok.type === acorn.tokTypes._case
+ if (cur) this$1.finishNode(cur, "SwitchCase")
+ node.cases.push(cur = this$1.startNode())
+ cur.consequent = []
+ this$1.next()
+ if (isCase) cur.test = this$1.parseExpression()
+ else cur.test = null
+ this$1.expect(acorn.tokTypes.colon)
+ } else {
+ if (!cur) {
+ node.cases.push(cur = this$1.startNode())
+ cur.consequent = []
+ cur.test = null
+ }
+ cur.consequent.push(this$1.parseStatement())
+ }
+ }
+ if (cur) this.finishNode(cur, "SwitchCase")
+ this.popCx()
+ this.eat(acorn.tokTypes.braceR)
+ return this.finishNode(node, "SwitchStatement")
+
+ case acorn.tokTypes._throw:
+ this.next()
+ node.argument = this.parseExpression()
+ this.semicolon()
+ return this.finishNode(node, "ThrowStatement")
+
+ case acorn.tokTypes._try:
+ this.next()
+ node.block = this.parseBlock()
+ node.handler = null
+ if (this.tok.type === acorn.tokTypes._catch) {
+ var clause = this.startNode()
+ this.next()
+ this.expect(acorn.tokTypes.parenL)
+ clause.param = this.toAssignable(this.parseExprAtom(), true)
+ this.expect(acorn.tokTypes.parenR)
+ clause.body = this.parseBlock()
+ node.handler = this.finishNode(clause, "CatchClause")
+ }
+ node.finalizer = this.eat(acorn.tokTypes._finally) ? this.parseBlock() : null
+ if (!node.handler && !node.finalizer) return node.block
+ return this.finishNode(node, "TryStatement")
+
+ case acorn.tokTypes._var:
+ case acorn.tokTypes._const:
+ return this.parseVar(false, kind || this.tok.value)
+
+ case acorn.tokTypes._while:
+ this.next()
+ node.test = this.parseParenExpression()
+ node.body = this.parseStatement()
+ return this.finishNode(node, "WhileStatement")
+
+ case acorn.tokTypes._with:
+ this.next()
+ node.object = this.parseParenExpression()
+ node.body = this.parseStatement()
+ return this.finishNode(node, "WithStatement")
+
+ case acorn.tokTypes.braceL:
+ return this.parseBlock()
+
+ case acorn.tokTypes.semi:
+ this.next()
+ return this.finishNode(node, "EmptyStatement")
+
+ case acorn.tokTypes._class:
+ return this.parseClass(true)
+
+ case acorn.tokTypes._import:
+ return this.parseImport()
+
+ case acorn.tokTypes._export:
+ return this.parseExport()
+
+ default:
+ var expr = this.parseExpression()
+ if (isDummy(expr)) {
+ this.next()
+ if (this.tok.type === acorn.tokTypes.eof) return this.finishNode(node, "EmptyStatement")
+ return this.parseStatement()
+ } else if (starttype === acorn.tokTypes.name && expr.type === "Identifier" && this.eat(acorn.tokTypes.colon)) {
+ node.body = this.parseStatement()
+ node.label = expr
+ return this.finishNode(node, "LabeledStatement")
+ } else {
+ node.expression = expr
+ this.semicolon()
+ return this.finishNode(node, "ExpressionStatement")
+ }
+ }
+ }
+
+ lp$1.parseBlock = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.pushCx()
+ this.expect(acorn.tokTypes.braceL)
+ var blockIndent = this.curIndent, line = this.curLineStart
+ node.body = []
+ while (!this.closes(acorn.tokTypes.braceR, blockIndent, line, true))
+ node.body.push(this$1.parseStatement())
+ this.popCx()
+ this.eat(acorn.tokTypes.braceR)
+ return this.finishNode(node, "BlockStatement")
+ }
+
+ lp$1.parseFor = function(node, init) {
+ node.init = init
+ node.test = node.update = null
+ if (this.eat(acorn.tokTypes.semi) && this.tok.type !== acorn.tokTypes.semi) node.test = this.parseExpression()
+ if (this.eat(acorn.tokTypes.semi) && this.tok.type !== acorn.tokTypes.parenR) node.update = this.parseExpression()
+ this.popCx()
+ this.expect(acorn.tokTypes.parenR)
+ node.body = this.parseStatement()
+ return this.finishNode(node, "ForStatement")
+ }
+
+ lp$1.parseForIn = function(node, init) {
+ var type = this.tok.type === acorn.tokTypes._in ? "ForInStatement" : "ForOfStatement"
+ this.next()
+ node.left = init
+ node.right = this.parseExpression()
+ this.popCx()
+ this.expect(acorn.tokTypes.parenR)
+ node.body = this.parseStatement()
+ return this.finishNode(node, type)
+ }
+
+ lp$1.parseVar = function(noIn, kind) {
+ var this$1 = this;
+
+ var node = this.startNode()
+ node.kind = kind
+ this.next()
+ node.declarations = []
+ do {
+ var decl = this$1.startNode()
+ decl.id = this$1.options.ecmaVersion >= 6 ? this$1.toAssignable(this$1.parseExprAtom(), true) : this$1.parseIdent()
+ decl.init = this$1.eat(acorn.tokTypes.eq) ? this$1.parseMaybeAssign(noIn) : null
+ node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"))
+ } while (this.eat(acorn.tokTypes.comma))
+ if (!node.declarations.length) {
+ var decl$1 = this.startNode()
+ decl$1.id = this.dummyIdent()
+ node.declarations.push(this.finishNode(decl$1, "VariableDeclarator"))
+ }
+ if (!noIn) this.semicolon()
+ return this.finishNode(node, "VariableDeclaration")
+ }
+
+ lp$1.parseClass = function(isStatement) {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.next()
+ if (this.tok.type === acorn.tokTypes.name) node.id = this.parseIdent()
+ else if (isStatement) node.id = this.dummyIdent()
+ else node.id = null
+ node.superClass = this.eat(acorn.tokTypes._extends) ? this.parseExpression() : null
+ node.body = this.startNode()
+ node.body.body = []
+ this.pushCx()
+ var indent = this.curIndent + 1, line = this.curLineStart
+ this.eat(acorn.tokTypes.braceL)
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
+ while (!this.closes(acorn.tokTypes.braceR, indent, line)) {
+ if (this$1.semicolon()) continue
+ var method = this$1.startNode(), isGenerator
+ if (this$1.options.ecmaVersion >= 6) {
+ method.static = false
+ isGenerator = this$1.eat(acorn.tokTypes.star)
+ }
+ this$1.parsePropertyName(method)
+ if (isDummy(method.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(acorn.tokTypes.comma); continue }
+ if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" &&
+ (this$1.tok.type != acorn.tokTypes.parenL && this$1.tok.type != acorn.tokTypes.braceL)) {
+ method.static = true
+ isGenerator = this$1.eat(acorn.tokTypes.star)
+ this$1.parsePropertyName(method)
+ } else {
+ method.static = false
+ }
+ if (this$1.options.ecmaVersion >= 5 && method.key.type === "Identifier" &&
+ !method.computed && (method.key.name === "get" || method.key.name === "set") &&
+ this$1.tok.type !== acorn.tokTypes.parenL && this$1.tok.type !== acorn.tokTypes.braceL) {
+ method.kind = method.key.name
+ this$1.parsePropertyName(method)
+ method.value = this$1.parseMethod(false)
+ } else {
+ if (!method.computed && !method.static && !isGenerator && (
+ method.key.type === "Identifier" && method.key.name === "constructor" ||
+ method.key.type === "Literal" && method.key.value === "constructor")) {
+ method.kind = "constructor"
+ } else {
+ method.kind = "method"
+ }
+ method.value = this$1.parseMethod(isGenerator)
+ }
+ node.body.body.push(this$1.finishNode(method, "MethodDefinition"))
+ }
+ this.popCx()
+ if (!this.eat(acorn.tokTypes.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ this.semicolon()
+ this.finishNode(node.body, "ClassBody")
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
+ }
+
+ lp$1.parseFunction = function(node, isStatement) {
+ this.initFunction(node)
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = this.eat(acorn.tokTypes.star)
+ }
+ if (this.tok.type === acorn.tokTypes.name) node.id = this.parseIdent()
+ else if (isStatement) node.id = this.dummyIdent()
+ node.params = this.parseFunctionParams()
+ node.body = this.parseBlock()
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+ }
+
+ lp$1.parseExport = function() {
+ var node = this.startNode()
+ this.next()
+ if (this.eat(acorn.tokTypes.star)) {
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString()
+ return this.finishNode(node, "ExportAllDeclaration")
+ }
+ if (this.eat(acorn.tokTypes._default)) {
+ var expr = this.parseMaybeAssign()
+ if (expr.id) {
+ switch (expr.type) {
+ case "FunctionExpression": expr.type = "FunctionDeclaration"; break
+ case "ClassExpression": expr.type = "ClassDeclaration"; break
+ }
+ }
+ node.declaration = expr
+ this.semicolon()
+ return this.finishNode(node, "ExportDefaultDeclaration")
+ }
+ if (this.tok.type.keyword || this.toks.isLet()) {
+ node.declaration = this.parseStatement()
+ node.specifiers = []
+ node.source = null
+ } else {
+ node.declaration = null
+ node.specifiers = this.parseExportSpecifierList()
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : null
+ this.semicolon()
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+ }
+
+ lp$1.parseImport = function() {
+ var node = this.startNode()
+ this.next()
+ if (this.tok.type === acorn.tokTypes.string) {
+ node.specifiers = []
+ node.source = this.parseExprAtom()
+ node.kind = ''
+ } else {
+ var elt
+ if (this.tok.type === acorn.tokTypes.name && this.tok.value !== "from") {
+ elt = this.startNode()
+ elt.local = this.parseIdent()
+ this.finishNode(elt, "ImportDefaultSpecifier")
+ this.eat(acorn.tokTypes.comma)
+ }
+ node.specifiers = this.parseImportSpecifierList()
+ node.source = this.eatContextual("from") && this.tok.type == acorn.tokTypes.string ? this.parseExprAtom() : this.dummyString()
+ if (elt) node.specifiers.unshift(elt)
+ }
+ this.semicolon()
+ return this.finishNode(node, "ImportDeclaration")
+ }
+
+ lp$1.parseImportSpecifierList = function() {
+ var this$1 = this;
+
+ var elts = []
+ if (this.tok.type === acorn.tokTypes.star) {
+ var elt = this.startNode()
+ this.next()
+ elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent()
+ elts.push(this.finishNode(elt, "ImportNamespaceSpecifier"))
+ } else {
+ var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
+ this.pushCx()
+ this.eat(acorn.tokTypes.braceL)
+ if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
+ while (!this.closes(acorn.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ var elt$1 = this$1.startNode()
+ if (this$1.eat(acorn.tokTypes.star)) {
+ elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : this$1.dummyIdent()
+ this$1.finishNode(elt$1, "ImportNamespaceSpecifier")
+ } else {
+ if (this$1.isContextual("from")) break
+ elt$1.imported = this$1.parseIdent()
+ if (isDummy(elt$1.imported)) break
+ elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : elt$1.imported
+ this$1.finishNode(elt$1, "ImportSpecifier")
+ }
+ elts.push(elt$1)
+ this$1.eat(acorn.tokTypes.comma)
+ }
+ this.eat(acorn.tokTypes.braceR)
+ this.popCx()
+ }
+ return elts
+ }
+
+ lp$1.parseExportSpecifierList = function() {
+ var this$1 = this;
+
+ var elts = []
+ var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
+ this.pushCx()
+ this.eat(acorn.tokTypes.braceL)
+ if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
+ while (!this.closes(acorn.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ if (this$1.isContextual("from")) break
+ var elt = this$1.startNode()
+ elt.local = this$1.parseIdent()
+ if (isDummy(elt.local)) break
+ elt.exported = this$1.eatContextual("as") ? this$1.parseIdent() : elt.local
+ this$1.finishNode(elt, "ExportSpecifier")
+ elts.push(elt)
+ this$1.eat(acorn.tokTypes.comma)
+ }
+ this.eat(acorn.tokTypes.braceR)
+ this.popCx()
+ return elts
+ }
+
+ var lp$2 = LooseParser.prototype
+
+ lp$2.checkLVal = function(expr) {
+ if (!expr) return expr
+ switch (expr.type) {
+ case "Identifier":
+ case "MemberExpression":
+ return expr
+
+ case "ParenthesizedExpression":
+ expr.expression = this.checkLVal(expr.expression)
+ return expr
+
+ default:
+ return this.dummyIdent()
+ }
+ }
+
+ lp$2.parseExpression = function(noIn) {
+ var this$1 = this;
+
+ var start = this.storeCurrentPos()
+ var expr = this.parseMaybeAssign(noIn)
+ if (this.tok.type === acorn.tokTypes.comma) {
+ var node = this.startNodeAt(start)
+ node.expressions = [expr]
+ while (this.eat(acorn.tokTypes.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn))
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+ }
+
+ lp$2.parseParenExpression = function() {
+ this.pushCx()
+ this.expect(acorn.tokTypes.parenL)
+ var val = this.parseExpression()
+ this.popCx()
+ this.expect(acorn.tokTypes.parenR)
+ return val
+ }
+
+ lp$2.parseMaybeAssign = function(noIn) {
+ if (this.toks.isContextual("yield")) {
+ var node = this.startNode()
+ this.next()
+ if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type != acorn.tokTypes.star && !this.tok.type.startsExpr)) {
+ node.delegate = false
+ node.argument = null
+ } else {
+ node.delegate = this.eat(acorn.tokTypes.star)
+ node.argument = this.parseMaybeAssign()
+ }
+ return this.finishNode(node, "YieldExpression")
+ }
+
+ var start = this.storeCurrentPos()
+ var left = this.parseMaybeConditional(noIn)
+ if (this.tok.type.isAssign) {
+ var node$1 = this.startNodeAt(start)
+ node$1.operator = this.tok.value
+ node$1.left = this.tok.type === acorn.tokTypes.eq ? this.toAssignable(left) : this.checkLVal(left)
+ this.next()
+ node$1.right = this.parseMaybeAssign(noIn)
+ return this.finishNode(node$1, "AssignmentExpression")
+ }
+ return left
+ }
+
+ lp$2.parseMaybeConditional = function(noIn) {
+ var start = this.storeCurrentPos()
+ var expr = this.parseExprOps(noIn)
+ if (this.eat(acorn.tokTypes.question)) {
+ var node = this.startNodeAt(start)
+ node.test = expr
+ node.consequent = this.parseMaybeAssign()
+ node.alternate = this.expect(acorn.tokTypes.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent()
+ return this.finishNode(node, "ConditionalExpression")
+ }
+ return expr
+ }
+
+ lp$2.parseExprOps = function(noIn) {
+ var start = this.storeCurrentPos()
+ var indent = this.curIndent, line = this.curLineStart
+ return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line)
+ }
+
+ lp$2.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) return left
+ var prec = this.tok.type.binop
+ if (prec != null && (!noIn || this.tok.type !== acorn.tokTypes._in)) {
+ if (prec > minPrec) {
+ var node = this.startNodeAt(start)
+ node.left = left
+ node.operator = this.tok.value
+ this.next()
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) {
+ node.right = this.dummyIdent()
+ } else {
+ var rightStart = this.storeCurrentPos()
+ node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line)
+ }
+ this.finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression")
+ return this.parseExprOp(node, start, minPrec, noIn, indent, line)
+ }
+ }
+ return left
+ }
+
+ lp$2.parseMaybeUnary = function(sawUnary) {
+ var this$1 = this;
+
+ var start = this.storeCurrentPos(), expr
+ if (this.tok.type.prefix) {
+ var node = this.startNode(), update = this.tok.type === acorn.tokTypes.incDec
+ if (!update) sawUnary = true
+ node.operator = this.tok.value
+ node.prefix = true
+ this.next()
+ node.argument = this.parseMaybeUnary(true)
+ if (update) node.argument = this.checkLVal(node.argument)
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
+ } else if (this.tok.type === acorn.tokTypes.ellipsis) {
+ var node$1 = this.startNode()
+ this.next()
+ node$1.argument = this.parseMaybeUnary(sawUnary)
+ expr = this.finishNode(node$1, "SpreadElement")
+ } else {
+ expr = this.parseExprSubscripts()
+ while (this.tok.type.postfix && !this.canInsertSemicolon()) {
+ var node$2 = this$1.startNodeAt(start)
+ node$2.operator = this$1.tok.value
+ node$2.prefix = false
+ node$2.argument = this$1.checkLVal(expr)
+ this$1.next()
+ expr = this$1.finishNode(node$2, "UpdateExpression")
+ }
+ }
+
+ if (!sawUnary && this.eat(acorn.tokTypes.starstar)) {
+ var node$3 = this.startNodeAt(start)
+ node$3.operator = "**"
+ node$3.left = expr
+ node$3.right = this.parseMaybeUnary(false)
+ return this.finishNode(node$3, "BinaryExpression")
+ }
+
+ return expr
+ }
+
+ lp$2.parseExprSubscripts = function() {
+ var start = this.storeCurrentPos()
+ return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart)
+ }
+
+ lp$2.parseSubscripts = function(base, start, noCalls, startIndent, line) {
+ var this$1 = this;
+
+ for (;;) {
+ if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine()) {
+ if (this$1.tok.type == acorn.tokTypes.dot && this$1.curIndent == startIndent)
+ --startIndent
+ else
+ return base
+ }
+
+ if (this$1.eat(acorn.tokTypes.dot)) {
+ var node = this$1.startNodeAt(start)
+ node.object = base
+ if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine())
+ node.property = this$1.dummyIdent()
+ else
+ node.property = this$1.parsePropertyAccessor() || this$1.dummyIdent()
+ node.computed = false
+ base = this$1.finishNode(node, "MemberExpression")
+ } else if (this$1.tok.type == acorn.tokTypes.bracketL) {
+ this$1.pushCx()
+ this$1.next()
+ var node$1 = this$1.startNodeAt(start)
+ node$1.object = base
+ node$1.property = this$1.parseExpression()
+ node$1.computed = true
+ this$1.popCx()
+ this$1.expect(acorn.tokTypes.bracketR)
+ base = this$1.finishNode(node$1, "MemberExpression")
+ } else if (!noCalls && this$1.tok.type == acorn.tokTypes.parenL) {
+ var node$2 = this$1.startNodeAt(start)
+ node$2.callee = base
+ node$2.arguments = this$1.parseExprList(acorn.tokTypes.parenR)
+ base = this$1.finishNode(node$2, "CallExpression")
+ } else if (this$1.tok.type == acorn.tokTypes.backQuote) {
+ var node$3 = this$1.startNodeAt(start)
+ node$3.tag = base
+ node$3.quasi = this$1.parseTemplate()
+ base = this$1.finishNode(node$3, "TaggedTemplateExpression")
+ } else {
+ return base
+ }
+ }
+ }
+
+ lp$2.parseExprAtom = function() {
+ var node
+ switch (this.tok.type) {
+ case acorn.tokTypes._this:
+ case acorn.tokTypes._super:
+ var type = this.tok.type === acorn.tokTypes._this ? "ThisExpression" : "Super"
+ node = this.startNode()
+ this.next()
+ return this.finishNode(node, type)
+
+ case acorn.tokTypes.name:
+ var start = this.storeCurrentPos()
+ var id = this.parseIdent()
+ return this.eat(acorn.tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id
+
+ case acorn.tokTypes.regexp:
+ node = this.startNode()
+ var val = this.tok.value
+ node.regex = {pattern: val.pattern, flags: val.flags}
+ node.value = val.value
+ node.raw = this.input.slice(this.tok.start, this.tok.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case acorn.tokTypes.num: case acorn.tokTypes.string:
+ node = this.startNode()
+ node.value = this.tok.value
+ node.raw = this.input.slice(this.tok.start, this.tok.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case acorn.tokTypes._null: case acorn.tokTypes._true: case acorn.tokTypes._false:
+ node = this.startNode()
+ node.value = this.tok.type === acorn.tokTypes._null ? null : this.tok.type === acorn.tokTypes._true
+ node.raw = this.tok.type.keyword
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case acorn.tokTypes.parenL:
+ var parenStart = this.storeCurrentPos()
+ this.next()
+ var inner = this.parseExpression()
+ this.expect(acorn.tokTypes.parenR)
+ if (this.eat(acorn.tokTypes.arrow)) {
+ return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (isDummy(inner) ? [] : [inner]))
+ }
+ if (this.options.preserveParens) {
+ var par = this.startNodeAt(parenStart)
+ par.expression = inner
+ inner = this.finishNode(par, "ParenthesizedExpression")
+ }
+ return inner
+
+ case acorn.tokTypes.bracketL:
+ node = this.startNode()
+ node.elements = this.parseExprList(acorn.tokTypes.bracketR, true)
+ return this.finishNode(node, "ArrayExpression")
+
+ case acorn.tokTypes.braceL:
+ return this.parseObj()
+
+ case acorn.tokTypes._class:
+ return this.parseClass()
+
+ case acorn.tokTypes._function:
+ node = this.startNode()
+ this.next()
+ return this.parseFunction(node, false)
+
+ case acorn.tokTypes._new:
+ return this.parseNew()
+
+ case acorn.tokTypes.backQuote:
+ return this.parseTemplate()
+
+ default:
+ return this.dummyIdent()
+ }
+ }
+
+ lp$2.parseNew = function() {
+ var node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart
+ var meta = this.parseIdent(true)
+ if (this.options.ecmaVersion >= 6 && this.eat(acorn.tokTypes.dot)) {
+ node.meta = meta
+ node.property = this.parseIdent(true)
+ return this.finishNode(node, "MetaProperty")
+ }
+ var start = this.storeCurrentPos()
+ node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line)
+ if (this.tok.type == acorn.tokTypes.parenL) {
+ node.arguments = this.parseExprList(acorn.tokTypes.parenR)
+ } else {
+ node.arguments = []
+ }
+ return this.finishNode(node, "NewExpression")
+ }
+
+ lp$2.parseTemplateElement = function() {
+ var elem = this.startNode()
+ elem.value = {
+ raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, '\n'),
+ cooked: this.tok.value
+ }
+ this.next()
+ elem.tail = this.tok.type === acorn.tokTypes.backQuote
+ return this.finishNode(elem, "TemplateElement")
+ }
+
+ lp$2.parseTemplate = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ this.next()
+ node.expressions = []
+ var curElt = this.parseTemplateElement()
+ node.quasis = [curElt]
+ while (!curElt.tail) {
+ this$1.next()
+ node.expressions.push(this$1.parseExpression())
+ if (this$1.expect(acorn.tokTypes.braceR)) {
+ curElt = this$1.parseTemplateElement()
+ } else {
+ curElt = this$1.startNode()
+ curElt.value = {cooked: '', raw: ''}
+ curElt.tail = true
+ this$1.finishNode(curElt, "TemplateElement")
+ }
+ node.quasis.push(curElt)
+ }
+ this.expect(acorn.tokTypes.backQuote)
+ return this.finishNode(node, "TemplateLiteral")
+ }
+
+ lp$2.parseObj = function() {
+ var this$1 = this;
+
+ var node = this.startNode()
+ node.properties = []
+ this.pushCx()
+ var indent = this.curIndent + 1, line = this.curLineStart
+ this.eat(acorn.tokTypes.braceL)
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
+ while (!this.closes(acorn.tokTypes.braceR, indent, line)) {
+ var prop = this$1.startNode(), isGenerator, start
+ if (this$1.options.ecmaVersion >= 6) {
+ start = this$1.storeCurrentPos()
+ prop.method = false
+ prop.shorthand = false
+ isGenerator = this$1.eat(acorn.tokTypes.star)
+ }
+ this$1.parsePropertyName(prop)
+ if (isDummy(prop.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(acorn.tokTypes.comma); continue }
+ if (this$1.eat(acorn.tokTypes.colon)) {
+ prop.kind = "init"
+ prop.value = this$1.parseMaybeAssign()
+ } else if (this$1.options.ecmaVersion >= 6 && (this$1.tok.type === acorn.tokTypes.parenL || this$1.tok.type === acorn.tokTypes.braceL)) {
+ prop.kind = "init"
+ prop.method = true
+ prop.value = this$1.parseMethod(isGenerator)
+ } else if (this$1.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
+ !prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
+ (this$1.tok.type != acorn.tokTypes.comma && this$1.tok.type != acorn.tokTypes.braceR)) {
+ prop.kind = prop.key.name
+ this$1.parsePropertyName(prop)
+ prop.value = this$1.parseMethod(false)
+ } else {
+ prop.kind = "init"
+ if (this$1.options.ecmaVersion >= 6) {
+ if (this$1.eat(acorn.tokTypes.eq)) {
+ var assign = this$1.startNodeAt(start)
+ assign.operator = "="
+ assign.left = prop.key
+ assign.right = this$1.parseMaybeAssign()
+ prop.value = this$1.finishNode(assign, "AssignmentExpression")
+ } else {
+ prop.value = prop.key
+ }
+ } else {
+ prop.value = this$1.dummyIdent()
+ }
+ prop.shorthand = true
+ }
+ node.properties.push(this$1.finishNode(prop, "Property"))
+ this$1.eat(acorn.tokTypes.comma)
+ }
+ this.popCx()
+ if (!this.eat(acorn.tokTypes.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ return this.finishNode(node, "ObjectExpression")
+ }
+
+ lp$2.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(acorn.tokTypes.bracketL)) {
+ prop.computed = true
+ prop.key = this.parseExpression()
+ this.expect(acorn.tokTypes.bracketR)
+ return
+ } else {
+ prop.computed = false
+ }
+ }
+ var key = (this.tok.type === acorn.tokTypes.num || this.tok.type === acorn.tokTypes.string) ? this.parseExprAtom() : this.parseIdent()
+ prop.key = key || this.dummyIdent()
+ }
+
+ lp$2.parsePropertyAccessor = function() {
+ if (this.tok.type === acorn.tokTypes.name || this.tok.type.keyword) return this.parseIdent()
+ }
+
+ lp$2.parseIdent = function() {
+ var name = this.tok.type === acorn.tokTypes.name ? this.tok.value : this.tok.type.keyword
+ if (!name) return this.dummyIdent()
+ var node = this.startNode()
+ this.next()
+ node.name = name
+ return this.finishNode(node, "Identifier")
+ }
+
+ lp$2.initFunction = function(node) {
+ node.id = null
+ node.params = []
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false
+ node.expression = false
+ }
+ }
+
+ // Convert existing expression atom to assignable pattern
+ // if possible.
+
+ lp$2.toAssignable = function(node, binding) {
+ var this$1 = this;
+
+ if (!node || node.type == "Identifier" || (node.type == "MemberExpression" && !binding)) {
+ // Okay
+ } else if (node.type == "ParenthesizedExpression") {
+ node.expression = this.toAssignable(node.expression, binding)
+ } else if (this.options.ecmaVersion < 6) {
+ return this.dummyIdent()
+ } else if (node.type == "ObjectExpression") {
+ node.type = "ObjectPattern"
+ var props = node.properties
+ for (var i = 0; i < props.length; i++)
+ props[i].value = this$1.toAssignable(props[i].value, binding)
+ } else if (node.type == "ArrayExpression") {
+ node.type = "ArrayPattern"
+ this.toAssignableList(node.elements, binding)
+ } else if (node.type == "SpreadElement") {
+ node.type = "RestElement"
+ node.argument = this.toAssignable(node.argument, binding)
+ } else if (node.type == "AssignmentExpression") {
+ node.type = "AssignmentPattern"
+ delete node.operator
+ } else {
+ return this.dummyIdent()
+ }
+ return node
+ }
+
+ lp$2.toAssignableList = function(exprList, binding) {
+ var this$1 = this;
+
+ for (var i = 0; i < exprList.length; i++)
+ exprList[i] = this$1.toAssignable(exprList[i], binding)
+ return exprList
+ }
+
+ lp$2.parseFunctionParams = function(params) {
+ params = this.parseExprList(acorn.tokTypes.parenR)
+ return this.toAssignableList(params, true)
+ }
+
+ lp$2.parseMethod = function(isGenerator) {
+ var node = this.startNode()
+ this.initFunction(node)
+ node.params = this.parseFunctionParams()
+ node.generator = isGenerator || false
+ node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== acorn.tokTypes.braceL
+ node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ return this.finishNode(node, "FunctionExpression")
+ }
+
+ lp$2.parseArrowExpression = function(node, params) {
+ this.initFunction(node)
+ node.params = this.toAssignableList(params, true)
+ node.expression = this.tok.type !== acorn.tokTypes.braceL
+ node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ return this.finishNode(node, "ArrowFunctionExpression")
+ }
+
+ lp$2.parseExprList = function(close, allowEmpty) {
+ var this$1 = this;
+
+ this.pushCx()
+ var indent = this.curIndent, line = this.curLineStart, elts = []
+ this.next() // Opening bracket
+ while (!this.closes(close, indent + 1, line)) {
+ if (this$1.eat(acorn.tokTypes.comma)) {
+ elts.push(allowEmpty ? null : this$1.dummyIdent())
+ continue
+ }
+ var elt = this$1.parseMaybeAssign()
+ if (isDummy(elt)) {
+ if (this$1.closes(close, indent, line)) break
+ this$1.next()
+ } else {
+ elts.push(elt)
+ }
+ this$1.eat(acorn.tokTypes.comma)
+ }
+ this.popCx()
+ if (!this.eat(close)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ return elts
+ }
+
+ acorn__default.defaultOptions.tabSize = 4
+
+ function parse_dammit(input, options) {
+ var p = new LooseParser(input, options)
+ p.next()
+ return p.parseTopLevel()
+ }
+
+ acorn__default.parse_dammit = parse_dammit
+ acorn__default.LooseParser = LooseParser
+ acorn__default.pluginsLoose = pluginsLoose
+
+ exports.parse_dammit = parse_dammit;
+ exports.LooseParser = LooseParser;
+ exports.pluginsLoose = pluginsLoose;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+})); \ No newline at end of file
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.es.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.es.js
new file mode 100644
index 0000000000..bef40937ac
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.es.js
@@ -0,0 +1,342 @@
+// AST walker module for Mozilla Parser API compatible trees
+
+// A simple walk is one where you simply specify callbacks to be
+// called on specific nodes. The last two arguments are optional. A
+// simple use would be
+//
+// walk.simple(myTree, {
+// Expression: function(node) { ... }
+// });
+//
+// to do something with all expressions. All Parser API node types
+// can be used to identify node types, as well as Expression,
+// Statement, and ScopeBody, which denote categories of nodes.
+//
+// The base argument can be used to pass a custom (recursive)
+// walker, and state can be used to give this walked an initial
+// state.
+
+function simple(node, visitors, base, state, override) {
+ if (!base) base = exports.base
+ ;(function c(node, st, override) {
+ var type = override || node.type, found = visitors[type]
+ base[type](node, st, c)
+ if (found) found(node, st)
+ })(node, state, override)
+}
+
+// An ancestor walk keeps an array of ancestor nodes (including the
+// current node) and passes them to the callback as third parameter
+// (and also as state parameter when no other state is present).
+function ancestor(node, visitors, base, state) {
+ if (!base) base = exports.base
+ var ancestors = []
+ ;(function c(node, st, override) {
+ var type = override || node.type, found = visitors[type]
+ var isNew = node != ancestors[ancestors.length - 1]
+ if (isNew) ancestors.push(node)
+ base[type](node, st, c)
+ if (found) found(node, st || ancestors, ancestors)
+ if (isNew) ancestors.pop()
+ })(node, state)
+}
+
+// A recursive walk is one where your functions override the default
+// walkers. They can modify and replace the state parameter that's
+// threaded through the walk, and can opt how and whether to walk
+// their child nodes (by calling their third argument on these
+// nodes).
+function recursive(node, state, funcs, base, override) {
+ var visitor = funcs ? exports.make(funcs, base) : base
+ ;(function c(node, st, override) {
+ visitor[override || node.type](node, st, c)
+ })(node, state, override)
+}
+
+function makeTest(test) {
+ if (typeof test == "string")
+ return function (type) { return type == test; }
+ else if (!test)
+ return function () { return true; }
+ else
+ return test
+}
+
+var Found = function Found(node, state) { this.node = node; this.state = state };
+
+// Find a node with a given start, end, and type (all are optional,
+// null can be used as wildcard). Returns a {node, state} object, or
+// undefined when it doesn't find a matching node.
+function findNodeAt(node, start, end, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ var type = override || node.type
+ if ((start == null || node.start <= start) &&
+ (end == null || node.end >= end))
+ base[type](node, st, c)
+ if ((start == null || node.start == start) &&
+ (end == null || node.end == end) &&
+ test(type, node))
+ throw new Found(node, st)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+}
+
+// Find the innermost node of a given type that contains the given
+// position. Interface similar to findNodeAt.
+function findNodeAround(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ var type = override || node.type
+ if (node.start > pos || node.end < pos) return
+ base[type](node, st, c)
+ if (test(type, node)) throw new Found(node, st)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+}
+
+// Find the outermost matching node after a given position.
+function findNodeAfter(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ if (node.end < pos) return
+ var type = override || node.type
+ if (node.start >= pos && test(type, node)) throw new Found(node, st)
+ base[type](node, st, c)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+}
+
+// Find the outermost matching node before a given position.
+function findNodeBefore(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ var max
+ ;(function c(node, st, override) {
+ if (node.start > pos) return
+ var type = override || node.type
+ if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
+ max = new Found(node, st)
+ base[type](node, st, c)
+ })(node, state)
+ return max
+}
+
+// Fallback to an Object.create polyfill for older environments.
+var create = Object.create || function(proto) {
+ function Ctor() {}
+ Ctor.prototype = proto
+ return new Ctor
+}
+
+// Used to create a custom walker. Will fill in all missing node
+// type properties with the defaults.
+function make(funcs, base) {
+ if (!base) base = exports.base
+ var visitor = create(base)
+ for (var type in funcs) visitor[type] = funcs[type]
+ return visitor
+}
+
+function skipThrough(node, st, c) { c(node, st) }
+function ignore(_node, _st, _c) {}
+
+// Node walkers.
+
+var base = {}
+
+base.Program = base.BlockStatement = function (node, st, c) {
+ for (var i = 0; i < node.body.length; ++i)
+ c(node.body[i], st, "Statement")
+}
+base.Statement = skipThrough
+base.EmptyStatement = ignore
+base.ExpressionStatement = base.ParenthesizedExpression =
+ function (node, st, c) { return c(node.expression, st, "Expression"); }
+base.IfStatement = function (node, st, c) {
+ c(node.test, st, "Expression")
+ c(node.consequent, st, "Statement")
+ if (node.alternate) c(node.alternate, st, "Statement")
+}
+base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }
+base.BreakStatement = base.ContinueStatement = ignore
+base.WithStatement = function (node, st, c) {
+ c(node.object, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.SwitchStatement = function (node, st, c) {
+ c(node.discriminant, st, "Expression")
+ for (var i = 0; i < node.cases.length; ++i) {
+ var cs = node.cases[i]
+ if (cs.test) c(cs.test, st, "Expression")
+ for (var j = 0; j < cs.consequent.length; ++j)
+ c(cs.consequent[j], st, "Statement")
+ }
+}
+base.ReturnStatement = base.YieldExpression = function (node, st, c) {
+ if (node.argument) c(node.argument, st, "Expression")
+}
+base.ThrowStatement = base.SpreadElement =
+ function (node, st, c) { return c(node.argument, st, "Expression"); }
+base.TryStatement = function (node, st, c) {
+ c(node.block, st, "Statement")
+ if (node.handler) c(node.handler, st)
+ if (node.finalizer) c(node.finalizer, st, "Statement")
+}
+base.CatchClause = function (node, st, c) {
+ c(node.param, st, "Pattern")
+ c(node.body, st, "ScopeBody")
+}
+base.WhileStatement = base.DoWhileStatement = function (node, st, c) {
+ c(node.test, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.ForStatement = function (node, st, c) {
+ if (node.init) c(node.init, st, "ForInit")
+ if (node.test) c(node.test, st, "Expression")
+ if (node.update) c(node.update, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.ForInStatement = base.ForOfStatement = function (node, st, c) {
+ c(node.left, st, "ForInit")
+ c(node.right, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.ForInit = function (node, st, c) {
+ if (node.type == "VariableDeclaration") c(node, st)
+ else c(node, st, "Expression")
+}
+base.DebuggerStatement = ignore
+
+base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }
+base.VariableDeclaration = function (node, st, c) {
+ for (var i = 0; i < node.declarations.length; ++i)
+ c(node.declarations[i], st)
+}
+base.VariableDeclarator = function (node, st, c) {
+ c(node.id, st, "Pattern")
+ if (node.init) c(node.init, st, "Expression")
+}
+
+base.Function = function (node, st, c) {
+ if (node.id) c(node.id, st, "Pattern")
+ for (var i = 0; i < node.params.length; i++)
+ c(node.params[i], st, "Pattern")
+ c(node.body, st, node.expression ? "ScopeExpression" : "ScopeBody")
+}
+// FIXME drop these node types in next major version
+// (They are awkward, and in ES6 every block can be a scope.)
+base.ScopeBody = function (node, st, c) { return c(node, st, "Statement"); }
+base.ScopeExpression = function (node, st, c) { return c(node, st, "Expression"); }
+
+base.Pattern = function (node, st, c) {
+ if (node.type == "Identifier")
+ c(node, st, "VariablePattern")
+ else if (node.type == "MemberExpression")
+ c(node, st, "MemberPattern")
+ else
+ c(node, st)
+}
+base.VariablePattern = ignore
+base.MemberPattern = skipThrough
+base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }
+base.ArrayPattern = function (node, st, c) {
+ for (var i = 0; i < node.elements.length; ++i) {
+ var elt = node.elements[i]
+ if (elt) c(elt, st, "Pattern")
+ }
+}
+base.ObjectPattern = function (node, st, c) {
+ for (var i = 0; i < node.properties.length; ++i)
+ c(node.properties[i].value, st, "Pattern")
+}
+
+base.Expression = skipThrough
+base.ThisExpression = base.Super = base.MetaProperty = ignore
+base.ArrayExpression = function (node, st, c) {
+ for (var i = 0; i < node.elements.length; ++i) {
+ var elt = node.elements[i]
+ if (elt) c(elt, st, "Expression")
+ }
+}
+base.ObjectExpression = function (node, st, c) {
+ for (var i = 0; i < node.properties.length; ++i)
+ c(node.properties[i], st)
+}
+base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration
+base.SequenceExpression = base.TemplateLiteral = function (node, st, c) {
+ for (var i = 0; i < node.expressions.length; ++i)
+ c(node.expressions[i], st, "Expression")
+}
+base.UnaryExpression = base.UpdateExpression = function (node, st, c) {
+ c(node.argument, st, "Expression")
+}
+base.BinaryExpression = base.LogicalExpression = function (node, st, c) {
+ c(node.left, st, "Expression")
+ c(node.right, st, "Expression")
+}
+base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) {
+ c(node.left, st, "Pattern")
+ c(node.right, st, "Expression")
+}
+base.ConditionalExpression = function (node, st, c) {
+ c(node.test, st, "Expression")
+ c(node.consequent, st, "Expression")
+ c(node.alternate, st, "Expression")
+}
+base.NewExpression = base.CallExpression = function (node, st, c) {
+ c(node.callee, st, "Expression")
+ if (node.arguments) for (var i = 0; i < node.arguments.length; ++i)
+ c(node.arguments[i], st, "Expression")
+}
+base.MemberExpression = function (node, st, c) {
+ c(node.object, st, "Expression")
+ if (node.computed) c(node.property, st, "Expression")
+}
+base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) {
+ if (node.declaration)
+ c(node.declaration, st, node.type == "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression")
+ if (node.source) c(node.source, st, "Expression")
+}
+base.ExportAllDeclaration = function (node, st, c) {
+ c(node.source, st, "Expression")
+}
+base.ImportDeclaration = function (node, st, c) {
+ for (var i = 0; i < node.specifiers.length; i++)
+ c(node.specifiers[i], st)
+ c(node.source, st, "Expression")
+}
+base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore
+
+base.TaggedTemplateExpression = function (node, st, c) {
+ c(node.tag, st, "Expression")
+ c(node.quasi, st)
+}
+base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }
+base.Class = function (node, st, c) {
+ if (node.id) c(node.id, st, "Pattern")
+ if (node.superClass) c(node.superClass, st, "Expression")
+ for (var i = 0; i < node.body.body.length; i++)
+ c(node.body.body[i], st)
+}
+base.MethodDefinition = base.Property = function (node, st, c) {
+ if (node.computed) c(node.key, st, "Expression")
+ c(node.value, st, "Expression")
+}
+
+export { simple, ancestor, recursive, findNodeAt, findNodeAround, findNodeAfter, findNodeBefore, make, base }; \ No newline at end of file
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.js
new file mode 100644
index 0000000000..56079ac13f
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.js
@@ -0,0 +1,360 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (factory((global.acorn = global.acorn || {}, global.acorn.walk = global.acorn.walk || {})));
+}(this, function (exports) { 'use strict';
+
+ // AST walker module for Mozilla Parser API compatible trees
+
+ // A simple walk is one where you simply specify callbacks to be
+ // called on specific nodes. The last two arguments are optional. A
+ // simple use would be
+ //
+ // walk.simple(myTree, {
+ // Expression: function(node) { ... }
+ // });
+ //
+ // to do something with all expressions. All Parser API node types
+ // can be used to identify node types, as well as Expression,
+ // Statement, and ScopeBody, which denote categories of nodes.
+ //
+ // The base argument can be used to pass a custom (recursive)
+ // walker, and state can be used to give this walked an initial
+ // state.
+
+ function simple(node, visitors, base, state, override) {
+ if (!base) base = exports.base
+ ;(function c(node, st, override) {
+ var type = override || node.type, found = visitors[type]
+ base[type](node, st, c)
+ if (found) found(node, st)
+ })(node, state, override)
+ }
+
+ // An ancestor walk keeps an array of ancestor nodes (including the
+ // current node) and passes them to the callback as third parameter
+ // (and also as state parameter when no other state is present).
+ function ancestor(node, visitors, base, state) {
+ if (!base) base = exports.base
+ var ancestors = []
+ ;(function c(node, st, override) {
+ var type = override || node.type, found = visitors[type]
+ var isNew = node != ancestors[ancestors.length - 1]
+ if (isNew) ancestors.push(node)
+ base[type](node, st, c)
+ if (found) found(node, st || ancestors, ancestors)
+ if (isNew) ancestors.pop()
+ })(node, state)
+ }
+
+ // A recursive walk is one where your functions override the default
+ // walkers. They can modify and replace the state parameter that's
+ // threaded through the walk, and can opt how and whether to walk
+ // their child nodes (by calling their third argument on these
+ // nodes).
+ function recursive(node, state, funcs, base, override) {
+ var visitor = funcs ? exports.make(funcs, base) : base
+ ;(function c(node, st, override) {
+ visitor[override || node.type](node, st, c)
+ })(node, state, override)
+ }
+
+ function makeTest(test) {
+ if (typeof test == "string")
+ return function (type) { return type == test; }
+ else if (!test)
+ return function () { return true; }
+ else
+ return test
+ }
+
+ var Found = function Found(node, state) { this.node = node; this.state = state };
+
+ // Find a node with a given start, end, and type (all are optional,
+ // null can be used as wildcard). Returns a {node, state} object, or
+ // undefined when it doesn't find a matching node.
+ function findNodeAt(node, start, end, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ var type = override || node.type
+ if ((start == null || node.start <= start) &&
+ (end == null || node.end >= end))
+ base[type](node, st, c)
+ if ((start == null || node.start == start) &&
+ (end == null || node.end == end) &&
+ test(type, node))
+ throw new Found(node, st)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+ }
+
+ // Find the innermost node of a given type that contains the given
+ // position. Interface similar to findNodeAt.
+ function findNodeAround(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ var type = override || node.type
+ if (node.start > pos || node.end < pos) return
+ base[type](node, st, c)
+ if (test(type, node)) throw new Found(node, st)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+ }
+
+ // Find the outermost matching node after a given position.
+ function findNodeAfter(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ if (node.end < pos) return
+ var type = override || node.type
+ if (node.start >= pos && test(type, node)) throw new Found(node, st)
+ base[type](node, st, c)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+ }
+
+ // Find the outermost matching node before a given position.
+ function findNodeBefore(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ var max
+ ;(function c(node, st, override) {
+ if (node.start > pos) return
+ var type = override || node.type
+ if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
+ max = new Found(node, st)
+ base[type](node, st, c)
+ })(node, state)
+ return max
+ }
+
+ // Fallback to an Object.create polyfill for older environments.
+ var create = Object.create || function(proto) {
+ function Ctor() {}
+ Ctor.prototype = proto
+ return new Ctor
+ }
+
+ // Used to create a custom walker. Will fill in all missing node
+ // type properties with the defaults.
+ function make(funcs, base) {
+ if (!base) base = exports.base
+ var visitor = create(base)
+ for (var type in funcs) visitor[type] = funcs[type]
+ return visitor
+ }
+
+ function skipThrough(node, st, c) { c(node, st) }
+ function ignore(_node, _st, _c) {}
+
+ // Node walkers.
+
+ var base = {}
+
+ base.Program = base.BlockStatement = function (node, st, c) {
+ for (var i = 0; i < node.body.length; ++i)
+ c(node.body[i], st, "Statement")
+ }
+ base.Statement = skipThrough
+ base.EmptyStatement = ignore
+ base.ExpressionStatement = base.ParenthesizedExpression =
+ function (node, st, c) { return c(node.expression, st, "Expression"); }
+ base.IfStatement = function (node, st, c) {
+ c(node.test, st, "Expression")
+ c(node.consequent, st, "Statement")
+ if (node.alternate) c(node.alternate, st, "Statement")
+ }
+ base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }
+ base.BreakStatement = base.ContinueStatement = ignore
+ base.WithStatement = function (node, st, c) {
+ c(node.object, st, "Expression")
+ c(node.body, st, "Statement")
+ }
+ base.SwitchStatement = function (node, st, c) {
+ c(node.discriminant, st, "Expression")
+ for (var i = 0; i < node.cases.length; ++i) {
+ var cs = node.cases[i]
+ if (cs.test) c(cs.test, st, "Expression")
+ for (var j = 0; j < cs.consequent.length; ++j)
+ c(cs.consequent[j], st, "Statement")
+ }
+ }
+ base.ReturnStatement = base.YieldExpression = function (node, st, c) {
+ if (node.argument) c(node.argument, st, "Expression")
+ }
+ base.ThrowStatement = base.SpreadElement =
+ function (node, st, c) { return c(node.argument, st, "Expression"); }
+ base.TryStatement = function (node, st, c) {
+ c(node.block, st, "Statement")
+ if (node.handler) c(node.handler, st)
+ if (node.finalizer) c(node.finalizer, st, "Statement")
+ }
+ base.CatchClause = function (node, st, c) {
+ c(node.param, st, "Pattern")
+ c(node.body, st, "ScopeBody")
+ }
+ base.WhileStatement = base.DoWhileStatement = function (node, st, c) {
+ c(node.test, st, "Expression")
+ c(node.body, st, "Statement")
+ }
+ base.ForStatement = function (node, st, c) {
+ if (node.init) c(node.init, st, "ForInit")
+ if (node.test) c(node.test, st, "Expression")
+ if (node.update) c(node.update, st, "Expression")
+ c(node.body, st, "Statement")
+ }
+ base.ForInStatement = base.ForOfStatement = function (node, st, c) {
+ c(node.left, st, "ForInit")
+ c(node.right, st, "Expression")
+ c(node.body, st, "Statement")
+ }
+ base.ForInit = function (node, st, c) {
+ if (node.type == "VariableDeclaration") c(node, st)
+ else c(node, st, "Expression")
+ }
+ base.DebuggerStatement = ignore
+
+ base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }
+ base.VariableDeclaration = function (node, st, c) {
+ for (var i = 0; i < node.declarations.length; ++i)
+ c(node.declarations[i], st)
+ }
+ base.VariableDeclarator = function (node, st, c) {
+ c(node.id, st, "Pattern")
+ if (node.init) c(node.init, st, "Expression")
+ }
+
+ base.Function = function (node, st, c) {
+ if (node.id) c(node.id, st, "Pattern")
+ for (var i = 0; i < node.params.length; i++)
+ c(node.params[i], st, "Pattern")
+ c(node.body, st, node.expression ? "ScopeExpression" : "ScopeBody")
+ }
+ // FIXME drop these node types in next major version
+ // (They are awkward, and in ES6 every block can be a scope.)
+ base.ScopeBody = function (node, st, c) { return c(node, st, "Statement"); }
+ base.ScopeExpression = function (node, st, c) { return c(node, st, "Expression"); }
+
+ base.Pattern = function (node, st, c) {
+ if (node.type == "Identifier")
+ c(node, st, "VariablePattern")
+ else if (node.type == "MemberExpression")
+ c(node, st, "MemberPattern")
+ else
+ c(node, st)
+ }
+ base.VariablePattern = ignore
+ base.MemberPattern = skipThrough
+ base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }
+ base.ArrayPattern = function (node, st, c) {
+ for (var i = 0; i < node.elements.length; ++i) {
+ var elt = node.elements[i]
+ if (elt) c(elt, st, "Pattern")
+ }
+ }
+ base.ObjectPattern = function (node, st, c) {
+ for (var i = 0; i < node.properties.length; ++i)
+ c(node.properties[i].value, st, "Pattern")
+ }
+
+ base.Expression = skipThrough
+ base.ThisExpression = base.Super = base.MetaProperty = ignore
+ base.ArrayExpression = function (node, st, c) {
+ for (var i = 0; i < node.elements.length; ++i) {
+ var elt = node.elements[i]
+ if (elt) c(elt, st, "Expression")
+ }
+ }
+ base.ObjectExpression = function (node, st, c) {
+ for (var i = 0; i < node.properties.length; ++i)
+ c(node.properties[i], st)
+ }
+ base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration
+ base.SequenceExpression = base.TemplateLiteral = function (node, st, c) {
+ for (var i = 0; i < node.expressions.length; ++i)
+ c(node.expressions[i], st, "Expression")
+ }
+ base.UnaryExpression = base.UpdateExpression = function (node, st, c) {
+ c(node.argument, st, "Expression")
+ }
+ base.BinaryExpression = base.LogicalExpression = function (node, st, c) {
+ c(node.left, st, "Expression")
+ c(node.right, st, "Expression")
+ }
+ base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) {
+ c(node.left, st, "Pattern")
+ c(node.right, st, "Expression")
+ }
+ base.ConditionalExpression = function (node, st, c) {
+ c(node.test, st, "Expression")
+ c(node.consequent, st, "Expression")
+ c(node.alternate, st, "Expression")
+ }
+ base.NewExpression = base.CallExpression = function (node, st, c) {
+ c(node.callee, st, "Expression")
+ if (node.arguments) for (var i = 0; i < node.arguments.length; ++i)
+ c(node.arguments[i], st, "Expression")
+ }
+ base.MemberExpression = function (node, st, c) {
+ c(node.object, st, "Expression")
+ if (node.computed) c(node.property, st, "Expression")
+ }
+ base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) {
+ if (node.declaration)
+ c(node.declaration, st, node.type == "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression")
+ if (node.source) c(node.source, st, "Expression")
+ }
+ base.ExportAllDeclaration = function (node, st, c) {
+ c(node.source, st, "Expression")
+ }
+ base.ImportDeclaration = function (node, st, c) {
+ for (var i = 0; i < node.specifiers.length; i++)
+ c(node.specifiers[i], st)
+ c(node.source, st, "Expression")
+ }
+ base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore
+
+ base.TaggedTemplateExpression = function (node, st, c) {
+ c(node.tag, st, "Expression")
+ c(node.quasi, st)
+ }
+ base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }
+ base.Class = function (node, st, c) {
+ if (node.id) c(node.id, st, "Pattern")
+ if (node.superClass) c(node.superClass, st, "Expression")
+ for (var i = 0; i < node.body.body.length; i++)
+ c(node.body.body[i], st)
+ }
+ base.MethodDefinition = base.Property = function (node, st, c) {
+ if (node.computed) c(node.key, st, "Expression")
+ c(node.value, st, "Expression")
+ }
+
+ exports.simple = simple;
+ exports.ancestor = ancestor;
+ exports.recursive = recursive;
+ exports.findNodeAt = findNodeAt;
+ exports.findNodeAround = findNodeAround;
+ exports.findNodeAfter = findNodeAfter;
+ exports.findNodeBefore = findNodeBefore;
+ exports.make = make;
+ exports.base = base;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+})); \ No newline at end of file
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/package.json b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/package.json
new file mode 100644
index 0000000000..a1c54791bb
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/package.json
@@ -0,0 +1,278 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "acorn@^3.0.4",
+ "scope": null,
+ "escapedName": "acorn",
+ "name": "acorn",
+ "rawSpec": "^3.0.4",
+ "spec": ">=3.0.4 <4.0.0",
+ "type": "range"
+ },
+ "/Users/trott/io.js/tools/node_modules/acorn-jsx"
+ ]
+ ],
+ "_from": "acorn@>=3.0.4 <4.0.0",
+ "_id": "acorn@3.3.0",
+ "_inCache": true,
+ "_location": "/acorn-jsx/acorn",
+ "_nodeVersion": "6.3.0",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/acorn-3.3.0.tgz_1469481913382_0.3856039580423385"
+ },
+ "_npmUser": {
+ "name": "marijn",
+ "email": "marijnh@gmail.com"
+ },
+ "_npmVersion": "3.10.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "acorn@^3.0.4",
+ "scope": null,
+ "escapedName": "acorn",
+ "name": "acorn",
+ "rawSpec": "^3.0.4",
+ "spec": ">=3.0.4 <4.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/acorn-jsx"
+ ],
+ "_resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
+ "_shasum": "45e37fb39e8da3f25baee3ff5369e2bb5f22017a",
+ "_shrinkwrap": null,
+ "_spec": "acorn@^3.0.4",
+ "_where": "/Users/trott/io.js/tools/node_modules/acorn-jsx",
+ "bin": {
+ "acorn": "./bin/acorn"
+ },
+ "bugs": {
+ "url": "https://github.com/ternjs/acorn/issues"
+ },
+ "contributors": [
+ {
+ "name": "List of Acorn contributors. Updated before every release."
+ },
+ {
+ "name": "Adrian Rakovsky"
+ },
+ {
+ "name": "Alistair Braidwood"
+ },
+ {
+ "name": "Amila Welihinda"
+ },
+ {
+ "name": "Andres Suarez"
+ },
+ {
+ "name": "Angelo"
+ },
+ {
+ "name": "Aparajita Fishman"
+ },
+ {
+ "name": "Arian Stolwijk"
+ },
+ {
+ "name": "Artem Govorov"
+ },
+ {
+ "name": "Brandon Mills"
+ },
+ {
+ "name": "Charles Hughes"
+ },
+ {
+ "name": "Conrad Irwin"
+ },
+ {
+ "name": "Daniel Tschinder"
+ },
+ {
+ "name": "David Bonnet"
+ },
+ {
+ "name": "Domenico Matteo"
+ },
+ {
+ "name": "ForbesLindesay"
+ },
+ {
+ "name": "Forbes Lindesay"
+ },
+ {
+ "name": "Gilad Peleg"
+ },
+ {
+ "name": "impinball"
+ },
+ {
+ "name": "Ingvar Stepanyan"
+ },
+ {
+ "name": "Jackson Ray Hamilton"
+ },
+ {
+ "name": "Jesse McCarthy"
+ },
+ {
+ "name": "Jiaxing Wang"
+ },
+ {
+ "name": "Joel Kemp"
+ },
+ {
+ "name": "Johannes Herr"
+ },
+ {
+ "name": "Jordan Klassen"
+ },
+ {
+ "name": "Jürg Lehni"
+ },
+ {
+ "name": "keeyipchan"
+ },
+ {
+ "name": "Keheliya Gallaba"
+ },
+ {
+ "name": "Kevin Irish"
+ },
+ {
+ "name": "Kevin Kwok"
+ },
+ {
+ "name": "krator"
+ },
+ {
+ "name": "Marijn Haverbeke"
+ },
+ {
+ "name": "Martin Carlberg"
+ },
+ {
+ "name": "Mathias Bynens"
+ },
+ {
+ "name": "Mathieu 'p01' Henri"
+ },
+ {
+ "name": "Matthew Bastien"
+ },
+ {
+ "name": "Max Schaefer"
+ },
+ {
+ "name": "Max Zerzouri"
+ },
+ {
+ "name": "Mihai Bazon"
+ },
+ {
+ "name": "Mike Rennie"
+ },
+ {
+ "name": "Nicholas C. Zakas"
+ },
+ {
+ "name": "Nick Fitzgerald"
+ },
+ {
+ "name": "Olivier Thomann"
+ },
+ {
+ "name": "Oskar Schöldström"
+ },
+ {
+ "name": "Paul Harper"
+ },
+ {
+ "name": "Peter Rust"
+ },
+ {
+ "name": "PlNG"
+ },
+ {
+ "name": "Prayag Verma"
+ },
+ {
+ "name": "ReadmeCritic"
+ },
+ {
+ "name": "r-e-d"
+ },
+ {
+ "name": "Richard Gibson"
+ },
+ {
+ "name": "Rich Harris"
+ },
+ {
+ "name": "Rich-Harris"
+ },
+ {
+ "name": "Sebastian McKenzie"
+ },
+ {
+ "name": "Timothy Gu"
+ },
+ {
+ "name": "Toru Nagashima"
+ },
+ {
+ "name": "zsjforcn"
+ }
+ ],
+ "dependencies": {},
+ "description": "ECMAScript parser",
+ "devDependencies": {
+ "rollup": "^0.34.1",
+ "rollup-plugin-buble": "^0.11.0",
+ "unicode-9.0.0": "^0.7.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "45e37fb39e8da3f25baee3ff5369e2bb5f22017a",
+ "tarball": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "gitHead": "693c5fe9257c3e114a7097dc9196d6e484e52809",
+ "homepage": "https://github.com/ternjs/acorn",
+ "jsnext:main": "dist/acorn.es.js",
+ "license": "MIT",
+ "main": "dist/acorn.js",
+ "maintainers": [
+ {
+ "name": "marijn",
+ "email": "marijnh@gmail.com"
+ },
+ {
+ "name": "rreverser",
+ "email": "me@rreverser.com"
+ }
+ ],
+ "name": "acorn",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ternjs/acorn.git"
+ },
+ "scripts": {
+ "build": "npm run build:main && npm run build:walk && npm run build:loose && npm run build:bin",
+ "build:bin": "rollup -c rollup/config.bin.js",
+ "build:loose": "rollup -c rollup/config.loose.js",
+ "build:main": "rollup -c rollup/config.main.js",
+ "build:walk": "rollup -c rollup/config.walk.js",
+ "prepublish": "npm test",
+ "pretest": "npm run build",
+ "test": "node test/run.js"
+ },
+ "version": "3.3.0"
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.bin.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.bin.js
new file mode 100644
index 0000000000..3726606e0d
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.bin.js
@@ -0,0 +1,15 @@
+import buble from 'rollup-plugin-buble'
+
+export default {
+ entry: 'src/bin/acorn.js',
+ dest: 'bin/acorn',
+ format: 'cjs',
+ banner: '#!/usr/bin/env node',
+ external: [ 'fs', 'path', 'acorn' ],
+ paths: {
+ acorn: '../dist/acorn.js'
+ },
+ plugins: [
+ buble()
+ ]
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.loose.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.loose.js
new file mode 100644
index 0000000000..11116950ee
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.loose.js
@@ -0,0 +1,20 @@
+import buble from 'rollup-plugin-buble'
+
+export default {
+ entry: 'src/loose/index.js',
+ moduleName: 'acorn.loose',
+ external: [ 'acorn' ],
+ paths: {
+ acorn: './acorn.js'
+ },
+ globals: {
+ acorn: 'acorn'
+ },
+ targets: [
+ { dest: 'dist/acorn_loose.js', format: 'umd' },
+ { dest: 'dist/acorn_loose.es.js', format: 'es' }
+ ],
+ plugins: [
+ buble()
+ ]
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.main.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.main.js
new file mode 100644
index 0000000000..730b79b2fe
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.main.js
@@ -0,0 +1,11 @@
+import buble from 'rollup-plugin-buble';
+
+export default {
+ entry: 'src/index.js',
+ moduleName: 'acorn',
+ plugins: [ buble() ],
+ targets: [
+ { dest: 'dist/acorn.js', format: 'umd' },
+ { dest: 'dist/acorn.es.js', format: 'es' }
+ ]
+};
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.walk.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.walk.js
new file mode 100644
index 0000000000..95f2a93db1
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.walk.js
@@ -0,0 +1,11 @@
+import buble from 'rollup-plugin-buble';
+
+export default {
+ entry: 'src/walk/index.js',
+ moduleName: 'acorn.walk',
+ plugins: [ buble() ],
+ targets: [
+ { dest: 'dist/walk.js', format: 'umd' },
+ { dest: 'dist/walk.es.js', format: 'es' }
+ ]
+};
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/bin/acorn.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/bin/acorn.js
new file mode 100644
index 0000000000..2d9cff7c60
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/bin/acorn.js
@@ -0,0 +1,58 @@
+import {basename} from "path"
+import {readFileSync as readFile} from "fs"
+import * as acorn from "acorn"
+
+let infile, forceFile, silent = false, compact = false, tokenize = false
+const options = {}
+
+function help(status) {
+ const print = (status == 0) ? console.log : console.error
+ print("usage: " + basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7]")
+ print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]")
+ process.exit(status)
+}
+
+for (let i = 2; i < process.argv.length; ++i) {
+ const arg = process.argv[i]
+ if ((arg == "-" || arg[0] != "-") && !infile) infile = arg
+ else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i]
+ else if (arg == "--ecma3") options.ecmaVersion = 3
+ else if (arg == "--ecma5") options.ecmaVersion = 5
+ else if (arg == "--ecma6") options.ecmaVersion = 6
+ else if (arg == "--ecma7") options.ecmaVersion = 7
+ else if (arg == "--locations") options.locations = true
+ else if (arg == "--allow-hash-bang") options.allowHashBang = true
+ else if (arg == "--silent") silent = true
+ else if (arg == "--compact") compact = true
+ else if (arg == "--help") help(0)
+ else if (arg == "--tokenize") tokenize = true
+ else if (arg == "--module") options.sourceType = 'module'
+ else help(1)
+}
+
+function run(code) {
+ let result
+ if (!tokenize) {
+ try { result = acorn.parse(code, options) }
+ catch(e) { console.error(e.message); process.exit(1) }
+ } else {
+ result = []
+ let tokenizer = acorn.tokenizer(code, options), token
+ while (true) {
+ try { token = tokenizer.getToken() }
+ catch(e) { console.error(e.message); process.exit(1) }
+ result.push(token)
+ if (token.type == acorn.tokTypes.eof) break
+ }
+ }
+ if (!silent) console.log(JSON.stringify(result, null, compact ? null : 2))
+}
+
+if (forceFile || infile && infile != "-") {
+ run(readFile(infile, "utf8"))
+} else {
+ let code = ""
+ process.stdin.resume()
+ process.stdin.on("data", chunk => code += chunk)
+ process.stdin.on("end", () => run(code))
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/expression.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/expression.js
new file mode 100644
index 0000000000..20b25cf055
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/expression.js
@@ -0,0 +1,701 @@
+// 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
+
+import {types as tt} from "./tokentype"
+import {Parser} from "./state"
+import {DestructuringErrors} from "./parseutil"
+
+const pp = Parser.prototype
+
+// Check if property name clashes with already added.
+// Object/class getters and setters are not allowed to clash —
+// either with each other or with an init property — and in
+// strict mode, init properties are also not allowed to be repeated.
+
+pp.checkPropClash = function(prop, propHash) {
+ if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))
+ return
+ let {key} = prop, name
+ switch (key.type) {
+ case "Identifier": name = key.name; break
+ case "Literal": name = String(key.value); break
+ default: return
+ }
+ let {kind} = prop
+ if (this.options.ecmaVersion >= 6) {
+ if (name === "__proto__" && kind === "init") {
+ if (propHash.proto) this.raiseRecoverable(key.start, "Redefinition of __proto__ property")
+ propHash.proto = true
+ }
+ return
+ }
+ name = "$" + name
+ let other = propHash[name]
+ if (other) {
+ let isGetSet = kind !== "init"
+ if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init))
+ this.raiseRecoverable(key.start, "Redefinition of property")
+ } else {
+ other = propHash[name] = {
+ init: false,
+ get: false,
+ set: false
+ }
+ }
+ other[kind] = true
+}
+
+// ### Expression parsing
+
+// These nest, from the most general expression type at the top to
+// 'atomic', nondivisible expression types at the bottom. Most of
+// the functions will simply let the function(s) below them parse,
+// and, *if* the syntactic construct they handle is present, wrap
+// the AST node that the inner parser gave them in another node.
+
+// Parse a full expression. The optional arguments are used to
+// forbid the `in` operator (in for loops initalization expressions)
+// and provide reference for storing '=' operator inside shorthand
+// property assignment in contexts where both object expression
+// and object pattern might appear (so it's possible to raise
+// delayed syntax error at correct position).
+
+pp.parseExpression = function(noIn, refDestructuringErrors) {
+ let startPos = this.start, startLoc = this.startLoc
+ let expr = this.parseMaybeAssign(noIn, refDestructuringErrors)
+ if (this.type === tt.comma) {
+ let node = this.startNodeAt(startPos, startLoc)
+ node.expressions = [expr]
+ while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors))
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+}
+
+// Parse an assignment expression. This includes applications of
+// operators like `+=`.
+
+pp.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) {
+ if (this.inGenerator && this.isContextual("yield")) return this.parseYield()
+
+ let ownDestructuringErrors = false
+ if (!refDestructuringErrors) {
+ refDestructuringErrors = new DestructuringErrors
+ ownDestructuringErrors = true
+ }
+ let startPos = this.start, startLoc = this.startLoc
+ if (this.type == tt.parenL || this.type == tt.name)
+ this.potentialArrowAt = this.start
+ let left = this.parseMaybeConditional(noIn, refDestructuringErrors)
+ if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc)
+ if (this.type.isAssign) {
+ this.checkPatternErrors(refDestructuringErrors, true)
+ if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors)
+ let node = this.startNodeAt(startPos, startLoc)
+ node.operator = this.value
+ node.left = this.type === tt.eq ? this.toAssignable(left) : left
+ refDestructuringErrors.shorthandAssign = 0 // reset because shorthand default was used correctly
+ this.checkLVal(left)
+ this.next()
+ node.right = this.parseMaybeAssign(noIn)
+ return this.finishNode(node, "AssignmentExpression")
+ } else {
+ if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true)
+ }
+ return left
+}
+
+// Parse a ternary conditional (`?:`) operator.
+
+pp.parseMaybeConditional = function(noIn, refDestructuringErrors) {
+ let startPos = this.start, startLoc = this.startLoc
+ let expr = this.parseExprOps(noIn, refDestructuringErrors)
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
+ if (this.eat(tt.question)) {
+ let node = this.startNodeAt(startPos, startLoc)
+ node.test = expr
+ node.consequent = this.parseMaybeAssign()
+ this.expect(tt.colon)
+ node.alternate = this.parseMaybeAssign(noIn)
+ return this.finishNode(node, "ConditionalExpression")
+ }
+ return expr
+}
+
+// Start the precedence parser.
+
+pp.parseExprOps = function(noIn, refDestructuringErrors) {
+ let startPos = this.start, startLoc = this.startLoc
+ let expr = this.parseMaybeUnary(refDestructuringErrors, false)
+ if (this.checkExpressionErrors(refDestructuringErrors)) 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.
+
+pp.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
+ let prec = this.type.binop
+ if (prec != null && (!noIn || this.type !== tt._in)) {
+ if (prec > minPrec) {
+ let logical = this.type === tt.logicalOR || this.type === tt.logicalAND
+ let op = this.value
+ this.next()
+ let startPos = this.start, startLoc = this.startLoc
+ let right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn)
+ let node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical)
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn)
+ }
+ }
+ return left
+}
+
+pp.buildBinary = function(startPos, startLoc, left, right, op, logical) {
+ let node = this.startNodeAt(startPos, startLoc)
+ node.left = left
+ node.operator = op
+ node.right = right
+ return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression")
+}
+
+// Parse unary operators, both prefix and postfix.
+
+pp.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {
+ let startPos = this.start, startLoc = this.startLoc, expr
+ if (this.type.prefix) {
+ let node = this.startNode(), update = this.type === tt.incDec
+ node.operator = this.value
+ node.prefix = true
+ this.next()
+ node.argument = this.parseMaybeUnary(null, true)
+ this.checkExpressionErrors(refDestructuringErrors, true)
+ if (update) this.checkLVal(node.argument)
+ else if (this.strict && node.operator === "delete" &&
+ node.argument.type === "Identifier")
+ this.raiseRecoverable(node.start, "Deleting local variable in strict mode")
+ else sawUnary = true
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
+ } else {
+ expr = this.parseExprSubscripts(refDestructuringErrors)
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
+ while (this.type.postfix && !this.canInsertSemicolon()) {
+ let node = this.startNodeAt(startPos, startLoc)
+ node.operator = this.value
+ node.prefix = false
+ node.argument = expr
+ this.checkLVal(expr)
+ this.next()
+ expr = this.finishNode(node, "UpdateExpression")
+ }
+ }
+
+ if (!sawUnary && this.eat(tt.starstar))
+ return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false)
+ else
+ return expr
+}
+
+// Parse call, dot, and `[]`-subscript expressions.
+
+pp.parseExprSubscripts = function(refDestructuringErrors) {
+ let startPos = this.start, startLoc = this.startLoc
+ let expr = this.parseExprAtom(refDestructuringErrors)
+ let skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"
+ if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr
+ return this.parseSubscripts(expr, startPos, startLoc)
+}
+
+pp.parseSubscripts = function(base, startPos, startLoc, noCalls) {
+ for (;;) {
+ if (this.eat(tt.dot)) {
+ let node = this.startNodeAt(startPos, startLoc)
+ node.object = base
+ node.property = this.parseIdent(true)
+ node.computed = false
+ base = this.finishNode(node, "MemberExpression")
+ } else if (this.eat(tt.bracketL)) {
+ let node = this.startNodeAt(startPos, startLoc)
+ node.object = base
+ node.property = this.parseExpression()
+ node.computed = true
+ this.expect(tt.bracketR)
+ base = this.finishNode(node, "MemberExpression")
+ } else if (!noCalls && this.eat(tt.parenL)) {
+ let node = this.startNodeAt(startPos, startLoc)
+ node.callee = base
+ node.arguments = this.parseExprList(tt.parenR, false)
+ base = this.finishNode(node, "CallExpression")
+ } else if (this.type === tt.backQuote) {
+ let node = this.startNodeAt(startPos, startLoc)
+ node.tag = base
+ node.quasi = this.parseTemplate()
+ base = this.finishNode(node, "TaggedTemplateExpression")
+ } else {
+ return base
+ }
+ }
+}
+
+// Parse an atomic expression — either a single token that is an
+// expression, an expression started by a keyword like `function` or
+// `new`, or an expression wrapped in punctuation like `()`, `[]`,
+// or `{}`.
+
+pp.parseExprAtom = function(refDestructuringErrors) {
+ let node, canBeArrow = this.potentialArrowAt == this.start
+ switch (this.type) {
+ case tt._super:
+ if (!this.inFunction)
+ this.raise(this.start, "'super' outside of function or class")
+
+ case tt._this:
+ let type = this.type === tt._this ? "ThisExpression" : "Super"
+ node = this.startNode()
+ this.next()
+ return this.finishNode(node, type)
+
+ case tt.name:
+ let startPos = this.start, startLoc = this.startLoc
+ let id = this.parseIdent(this.type !== tt.name)
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow))
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id])
+ return id
+
+ case tt.regexp:
+ let value = this.value
+ node = this.parseLiteral(value.value)
+ node.regex = {pattern: value.pattern, flags: value.flags}
+ return node
+
+ case tt.num: case tt.string:
+ return this.parseLiteral(this.value)
+
+ case tt._null: case tt._true: case tt._false:
+ node = this.startNode()
+ node.value = this.type === tt._null ? null : this.type === tt._true
+ node.raw = this.type.keyword
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tt.parenL:
+ return this.parseParenAndDistinguishExpression(canBeArrow)
+
+ case tt.bracketL:
+ node = this.startNode()
+ this.next()
+ node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors)
+ return this.finishNode(node, "ArrayExpression")
+
+ case tt.braceL:
+ return this.parseObj(false, refDestructuringErrors)
+
+ case tt._function:
+ node = this.startNode()
+ this.next()
+ return this.parseFunction(node, false)
+
+ case tt._class:
+ return this.parseClass(this.startNode(), false)
+
+ case tt._new:
+ return this.parseNew()
+
+ case tt.backQuote:
+ return this.parseTemplate()
+
+ default:
+ this.unexpected()
+ }
+}
+
+pp.parseLiteral = function(value) {
+ let node = this.startNode()
+ node.value = value
+ node.raw = this.input.slice(this.start, this.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+}
+
+pp.parseParenExpression = function() {
+ this.expect(tt.parenL)
+ let val = this.parseExpression()
+ this.expect(tt.parenR)
+ return val
+}
+
+pp.parseParenAndDistinguishExpression = function(canBeArrow) {
+ let startPos = this.start, startLoc = this.startLoc, val
+ if (this.options.ecmaVersion >= 6) {
+ this.next()
+
+ let innerStartPos = this.start, innerStartLoc = this.startLoc
+ let exprList = [], first = true
+ let refDestructuringErrors = new DestructuringErrors, spreadStart, innerParenStart
+ while (this.type !== tt.parenR) {
+ first ? first = false : this.expect(tt.comma)
+ if (this.type === tt.ellipsis) {
+ spreadStart = this.start
+ exprList.push(this.parseParenItem(this.parseRest()))
+ break
+ } else {
+ if (this.type === tt.parenL && !innerParenStart) {
+ innerParenStart = this.start
+ }
+ exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem))
+ }
+ }
+ let innerEndPos = this.start, innerEndLoc = this.startLoc
+ this.expect(tt.parenR)
+
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {
+ this.checkPatternErrors(refDestructuringErrors, true)
+ if (innerParenStart) this.unexpected(innerParenStart)
+ return this.parseParenArrowList(startPos, startLoc, exprList)
+ }
+
+ if (!exprList.length) this.unexpected(this.lastTokStart)
+ if (spreadStart) this.unexpected(spreadStart)
+ this.checkExpressionErrors(refDestructuringErrors, true)
+
+ if (exprList.length > 1) {
+ val = this.startNodeAt(innerStartPos, innerStartLoc)
+ val.expressions = exprList
+ this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc)
+ } else {
+ val = exprList[0]
+ }
+ } else {
+ val = this.parseParenExpression()
+ }
+
+ if (this.options.preserveParens) {
+ let par = this.startNodeAt(startPos, startLoc)
+ par.expression = val
+ return this.finishNode(par, "ParenthesizedExpression")
+ } else {
+ return val
+ }
+}
+
+pp.parseParenItem = function(item) {
+ return item
+}
+
+pp.parseParenArrowList = function(startPos, startLoc, exprList) {
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList)
+}
+
+// New's precedence is slightly tricky. It must allow its argument to
+// be a `[]` or dot subscript expression, but not a call — at least,
+// not without wrapping it in parentheses. Thus, it uses the noCalls
+// argument to parseSubscripts to prevent it from consuming the
+// argument list.
+
+const empty = []
+
+pp.parseNew = function() {
+ let node = this.startNode()
+ let meta = this.parseIdent(true)
+ if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) {
+ node.meta = meta
+ node.property = this.parseIdent(true)
+ if (node.property.name !== "target")
+ this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target")
+ if (!this.inFunction)
+ this.raiseRecoverable(node.start, "new.target can only be used in functions")
+ return this.finishNode(node, "MetaProperty")
+ }
+ let startPos = this.start, startLoc = this.startLoc
+ node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true)
+ if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false)
+ else node.arguments = empty
+ return this.finishNode(node, "NewExpression")
+}
+
+// Parse template expression.
+
+pp.parseTemplateElement = function() {
+ let elem = this.startNode()
+ elem.value = {
+ raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'),
+ cooked: this.value
+ }
+ this.next()
+ elem.tail = this.type === tt.backQuote
+ return this.finishNode(elem, "TemplateElement")
+}
+
+pp.parseTemplate = function() {
+ let node = this.startNode()
+ this.next()
+ node.expressions = []
+ let curElt = this.parseTemplateElement()
+ node.quasis = [curElt]
+ while (!curElt.tail) {
+ this.expect(tt.dollarBraceL)
+ node.expressions.push(this.parseExpression())
+ this.expect(tt.braceR)
+ node.quasis.push(curElt = this.parseTemplateElement())
+ }
+ this.next()
+ return this.finishNode(node, "TemplateLiteral")
+}
+
+// Parse an object literal or binding pattern.
+
+pp.parseObj = function(isPattern, refDestructuringErrors) {
+ let node = this.startNode(), first = true, propHash = {}
+ node.properties = []
+ this.next()
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this.expect(tt.comma)
+ if (this.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ let prop = this.startNode(), isGenerator, startPos, startLoc
+ if (this.options.ecmaVersion >= 6) {
+ prop.method = false
+ prop.shorthand = false
+ if (isPattern || refDestructuringErrors) {
+ startPos = this.start
+ startLoc = this.startLoc
+ }
+ if (!isPattern)
+ isGenerator = this.eat(tt.star)
+ }
+ this.parsePropertyName(prop)
+ this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors)
+ this.checkPropClash(prop, propHash)
+ node.properties.push(this.finishNode(prop, "Property"))
+ }
+ return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
+}
+
+pp.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) {
+ if (this.eat(tt.colon)) {
+ prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors)
+ prop.kind = "init"
+ } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) {
+ if (isPattern) this.unexpected()
+ prop.kind = "init"
+ prop.method = true
+ prop.value = this.parseMethod(isGenerator)
+ } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
+ (prop.key.name === "get" || prop.key.name === "set") &&
+ (this.type != tt.comma && this.type != tt.braceR)) {
+ if (isGenerator || isPattern) this.unexpected()
+ prop.kind = prop.key.name
+ this.parsePropertyName(prop)
+ prop.value = this.parseMethod(false)
+ let paramCount = prop.kind === "get" ? 0 : 1
+ if (prop.value.params.length !== paramCount) {
+ let start = prop.value.start
+ if (prop.kind === "get")
+ this.raiseRecoverable(start, "getter should have no params")
+ else
+ this.raiseRecoverable(start, "setter should have exactly one param")
+ }
+ if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
+ this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
+ } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
+ if (this.keywords.test(prop.key.name) ||
+ (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) ||
+ (this.inGenerator && prop.key.name == "yield"))
+ this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property")
+ prop.kind = "init"
+ if (isPattern) {
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
+ } else if (this.type === tt.eq && refDestructuringErrors) {
+ if (!refDestructuringErrors.shorthandAssign)
+ refDestructuringErrors.shorthandAssign = this.start
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
+ } else {
+ prop.value = prop.key
+ }
+ prop.shorthand = true
+ } else this.unexpected()
+}
+
+pp.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(tt.bracketL)) {
+ prop.computed = true
+ prop.key = this.parseMaybeAssign()
+ this.expect(tt.bracketR)
+ return prop.key
+ } else {
+ prop.computed = false
+ }
+ }
+ return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true)
+}
+
+// Initialize empty function node.
+
+pp.initFunction = function(node) {
+ node.id = null
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false
+ node.expression = false
+ }
+}
+
+// Parse object or class method.
+
+pp.parseMethod = function(isGenerator) {
+ let node = this.startNode(), oldInGen = this.inGenerator
+ this.inGenerator = isGenerator
+ this.initFunction(node)
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.parenR, false, false)
+ if (this.options.ecmaVersion >= 6)
+ node.generator = isGenerator
+ this.parseFunctionBody(node, false)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, "FunctionExpression")
+}
+
+// Parse arrow function expression with given parameters.
+
+pp.parseArrowExpression = function(node, params) {
+ let oldInGen = this.inGenerator
+ this.inGenerator = false
+ this.initFunction(node)
+ node.params = this.toAssignableList(params, true)
+ this.parseFunctionBody(node, true)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, "ArrowFunctionExpression")
+}
+
+// Parse function body and check parameters.
+
+pp.parseFunctionBody = function(node, isArrowFunction) {
+ let isExpression = isArrowFunction && this.type !== tt.braceL
+
+ if (isExpression) {
+ node.body = this.parseMaybeAssign()
+ node.expression = true
+ } else {
+ // Start a new scope with regard to labels and the `inFunction`
+ // flag (restore them to their old value afterwards).
+ let oldInFunc = this.inFunction, oldLabels = this.labels
+ this.inFunction = true; this.labels = []
+ node.body = this.parseBlock(true)
+ node.expression = false
+ this.inFunction = oldInFunc; this.labels = oldLabels
+ }
+
+ // 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`.
+ let useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null;
+ if (this.strict || useStrict) {
+ let oldStrict = this.strict
+ this.strict = true
+ if (node.id)
+ this.checkLVal(node.id, true)
+ this.checkParams(node, useStrict)
+ this.strict = oldStrict
+ } else if (isArrowFunction) {
+ this.checkParams(node, useStrict)
+ }
+}
+
+// Checks function params for various disallowed patterns such as using "eval"
+// or "arguments" and duplicate parameters.
+
+pp.checkParams = function(node, useStrict) {
+ let nameHash = {}
+ for (let i = 0; i < node.params.length; i++) {
+ if (useStrict && this.options.ecmaVersion >= 7 && node.params[i].type !== "Identifier")
+ this.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list");
+ this.checkLVal(node.params[i], true, nameHash)
+ }
+}
+
+// Parses a comma-separated list of expressions, and returns them as
+// an array. `close` is the token type that ends the list, and
+// `allowEmpty` can be turned on to allow subsequent commas with
+// nothing in between them to be parsed as `null` (which is needed
+// for array literals).
+
+pp.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
+ let elts = [], first = true
+ while (!this.eat(close)) {
+ if (!first) {
+ this.expect(tt.comma)
+ if (allowTrailingComma && this.afterTrailingComma(close)) break
+ } else first = false
+
+ let elt
+ if (allowEmpty && this.type === tt.comma)
+ elt = null
+ else if (this.type === tt.ellipsis) {
+ elt = this.parseSpread(refDestructuringErrors)
+ if (this.type === tt.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) {
+ refDestructuringErrors.trailingComma = this.lastTokStart
+ }
+ } else
+ elt = this.parseMaybeAssign(false, refDestructuringErrors)
+ elts.push(elt)
+ }
+ return elts
+}
+
+// Parse the next token as an identifier. If `liberal` is true (used
+// when parsing properties), it will also convert keywords into
+// identifiers.
+
+pp.parseIdent = function(liberal) {
+ let node = this.startNode()
+ if (liberal && this.options.allowReserved == "never") liberal = false
+ if (this.type === tt.name) {
+ if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) &&
+ (this.options.ecmaVersion >= 6 ||
+ this.input.slice(this.start, this.end).indexOf("\\") == -1))
+ this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved")
+ if (!liberal && this.inGenerator && this.value === "yield")
+ this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator")
+ node.name = this.value
+ } else if (liberal && this.type.keyword) {
+ node.name = this.type.keyword
+ } else {
+ this.unexpected()
+ }
+ this.next()
+ return this.finishNode(node, "Identifier")
+}
+
+// Parses yield expression inside generator.
+
+pp.parseYield = function() {
+ let node = this.startNode()
+ this.next()
+ if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) {
+ node.delegate = false
+ node.argument = null
+ } else {
+ node.delegate = this.eat(tt.star)
+ node.argument = this.parseMaybeAssign()
+ }
+ return this.finishNode(node, "YieldExpression")
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/identifier.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/identifier.js
new file mode 100644
index 0000000000..e4a7415ac1
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/identifier.js
@@ -0,0 +1,82 @@
+// Reserved word lists for various dialects of the language
+
+export const reservedWords = {
+ 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
+ 5: "class enum extends super const export import",
+ 6: "enum",
+ 7: "enum",
+ strict: "implements interface let package private protected public static yield",
+ strictBind: "eval arguments"
+}
+
+// And the keywords
+
+var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"
+
+export const keywords = {
+ 5: ecma5AndLessKeywords,
+ 6: ecma5AndLessKeywords + " const class extends export import 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`.
+
+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\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"
+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\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\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\u0d01-\u0d03\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\u1cf8\u1cf9\u1dc0-\u1df5\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"
+
+const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]")
+const 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
+const astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,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,449,56,264,8,2,36,18,0,50,29,881,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,0,32,6124,20,754,9486,1,3071,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,10591,541]
+const 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,838,7,2,7,17,9,57,21,2,13,19882,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) {
+ let pos = 0x10000
+ for (let i = 0; i < set.length; i += 2) {
+ pos += set[i]
+ if (pos > code) return false
+ pos += set[i + 1]
+ if (pos >= code) return true
+ }
+}
+
+// Test whether a given character code starts an identifier.
+
+export function isIdentifierStart(code, astral) {
+ if (code < 65) return code === 36
+ if (code < 91) return true
+ if (code < 97) return code === 95
+ if (code < 123) return true
+ if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))
+ if (astral === false) return false
+ return isInAstralSet(code, astralIdentifierStartCodes)
+}
+
+// Test whether a given character is part of an identifier.
+
+export function isIdentifierChar(code, astral) {
+ if (code < 48) return code === 36
+ if (code < 58) return true
+ if (code < 65) return false
+ if (code < 91) return true
+ if (code < 97) return code === 95
+ if (code < 123) return true
+ if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code))
+ if (astral === false) return false
+ return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/index.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/index.js
new file mode 100644
index 0000000000..0a59bdf791
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/index.js
@@ -0,0 +1,67 @@
+// Acorn is a tiny, fast JavaScript parser written in JavaScript.
+//
+// Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and
+// various contributors and released under an MIT license.
+//
+// Git repositories for Acorn are available at
+//
+// http://marijnhaverbeke.nl/git/acorn
+// https://github.com/ternjs/acorn.git
+//
+// Please use the [github bug tracker][ghbt] to report issues.
+//
+// [ghbt]: https://github.com/ternjs/acorn/issues
+//
+// This file defines the main parser interface. The library also comes
+// with a [error-tolerant parser][dammit] and an
+// [abstract syntax tree walker][walk], defined in other files.
+//
+// [dammit]: acorn_loose.js
+// [walk]: util/walk.js
+
+import {Parser} from "./state"
+import "./parseutil"
+import "./statement"
+import "./lval"
+import "./expression"
+import "./location"
+
+export {Parser, plugins} from "./state"
+export {defaultOptions} from "./options"
+export {Position, SourceLocation, getLineInfo} from "./locutil"
+export {Node} from "./node"
+export {TokenType, types as tokTypes} from "./tokentype"
+export {TokContext, types as tokContexts} from "./tokencontext"
+export {isIdentifierChar, isIdentifierStart} from "./identifier"
+export {Token} from "./tokenize"
+export {isNewLine, lineBreak, lineBreakG} from "./whitespace"
+
+export const version = "3.3.0"
+
+// The main exported interface (under `self.acorn` when in the
+// browser) is a `parse` function that takes a code string and
+// returns an abstract syntax tree as specified by [Mozilla parser
+// API][api].
+//
+// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
+
+export function parse(input, options) {
+ return new Parser(options, input).parse()
+}
+
+// This function tries to parse a single expression at a given
+// offset in a string. Useful for parsing mixed-language formats
+// that embed JavaScript expressions.
+
+export function parseExpressionAt(input, pos, options) {
+ let p = new Parser(options, input, pos)
+ p.nextToken()
+ return p.parseExpression()
+}
+
+// Acorn is organized as a tokenizer and a recursive-descent parser.
+// The `tokenizer` export provides an interface to the tokenizer.
+
+export function tokenizer(input, options) {
+ return new Parser(options, input)
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/location.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/location.js
new file mode 100644
index 0000000000..99e71234cc
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/location.js
@@ -0,0 +1,26 @@
+import {Parser} from "./state"
+import {Position, getLineInfo} from "./locutil"
+
+const pp = Parser.prototype
+
+// This function is used to raise exceptions on parse errors. It
+// takes an offset integer (into the current `input`) to indicate
+// the location of the error, attaches the position to the end
+// of the error message, and then raises a `SyntaxError` with that
+// message.
+
+pp.raise = function(pos, message) {
+ let loc = getLineInfo(this.input, pos)
+ message += " (" + loc.line + ":" + loc.column + ")"
+ let err = new SyntaxError(message)
+ err.pos = pos; err.loc = loc; err.raisedAt = this.pos
+ throw err
+}
+
+pp.raiseRecoverable = pp.raise
+
+pp.curPosition = function() {
+ if (this.options.locations) {
+ return new Position(this.curLine, this.pos - this.lineStart)
+ }
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/locutil.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/locutil.js
new file mode 100644
index 0000000000..5a9465e017
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/locutil.js
@@ -0,0 +1,42 @@
+import {lineBreakG} from "./whitespace"
+
+// These are used when `options.locations` is on, for the
+// `startLoc` and `endLoc` properties.
+
+export class Position {
+ constructor(line, col) {
+ this.line = line
+ this.column = col
+ }
+
+ offset(n) {
+ return new Position(this.line, this.column + n)
+ }
+}
+
+export class SourceLocation {
+ constructor(p, start, end) {
+ this.start = start
+ this.end = end
+ if (p.sourceFile !== null) this.source = p.sourceFile
+ }
+}
+
+// The `getLineInfo` function is mostly useful when the
+// `locations` option is off (for performance reasons) and you
+// want to find the line/column position for a given character
+// offset. `input` should be the code string that the offset refers
+// into.
+
+export function getLineInfo(input, offset) {
+ for (let line = 1, cur = 0;;) {
+ lineBreakG.lastIndex = cur
+ let match = lineBreakG.exec(input)
+ if (match && match.index < offset) {
+ ++line
+ cur = match.index + match[0].length
+ } else {
+ return new Position(line, offset - cur)
+ }
+ }
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/expression.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/expression.js
new file mode 100644
index 0000000000..52f409e5c9
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/expression.js
@@ -0,0 +1,514 @@
+import {LooseParser} from "./state"
+import {isDummy} from "./parseutil"
+import {tokTypes as tt} from "acorn"
+
+const lp = LooseParser.prototype
+
+lp.checkLVal = function(expr) {
+ if (!expr) return expr
+ switch (expr.type) {
+ case "Identifier":
+ case "MemberExpression":
+ return expr
+
+ case "ParenthesizedExpression":
+ expr.expression = this.checkLVal(expr.expression)
+ return expr
+
+ default:
+ return this.dummyIdent()
+ }
+}
+
+lp.parseExpression = function(noIn) {
+ let start = this.storeCurrentPos()
+ let expr = this.parseMaybeAssign(noIn)
+ if (this.tok.type === tt.comma) {
+ let node = this.startNodeAt(start)
+ node.expressions = [expr]
+ while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn))
+ return this.finishNode(node, "SequenceExpression")
+ }
+ return expr
+}
+
+lp.parseParenExpression = function() {
+ this.pushCx()
+ this.expect(tt.parenL)
+ let val = this.parseExpression()
+ this.popCx()
+ this.expect(tt.parenR)
+ return val
+}
+
+lp.parseMaybeAssign = function(noIn) {
+ if (this.toks.isContextual("yield")) {
+ let node = this.startNode()
+ this.next()
+ if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type != tt.star && !this.tok.type.startsExpr)) {
+ node.delegate = false
+ node.argument = null
+ } else {
+ node.delegate = this.eat(tt.star)
+ node.argument = this.parseMaybeAssign()
+ }
+ return this.finishNode(node, "YieldExpression")
+ }
+
+ let start = this.storeCurrentPos()
+ let left = this.parseMaybeConditional(noIn)
+ if (this.tok.type.isAssign) {
+ let node = this.startNodeAt(start)
+ node.operator = this.tok.value
+ node.left = this.tok.type === tt.eq ? this.toAssignable(left) : this.checkLVal(left)
+ this.next()
+ node.right = this.parseMaybeAssign(noIn)
+ return this.finishNode(node, "AssignmentExpression")
+ }
+ return left
+}
+
+lp.parseMaybeConditional = function(noIn) {
+ let start = this.storeCurrentPos()
+ let expr = this.parseExprOps(noIn)
+ if (this.eat(tt.question)) {
+ let node = this.startNodeAt(start)
+ node.test = expr
+ node.consequent = this.parseMaybeAssign()
+ node.alternate = this.expect(tt.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent()
+ return this.finishNode(node, "ConditionalExpression")
+ }
+ return expr
+}
+
+lp.parseExprOps = function(noIn) {
+ let start = this.storeCurrentPos()
+ let indent = this.curIndent, line = this.curLineStart
+ return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line)
+}
+
+lp.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) return left
+ let prec = this.tok.type.binop
+ if (prec != null && (!noIn || this.tok.type !== tt._in)) {
+ if (prec > minPrec) {
+ let node = this.startNodeAt(start)
+ node.left = left
+ node.operator = this.tok.value
+ this.next()
+ if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) {
+ node.right = this.dummyIdent()
+ } else {
+ let rightStart = this.storeCurrentPos()
+ node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line)
+ }
+ this.finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression")
+ return this.parseExprOp(node, start, minPrec, noIn, indent, line)
+ }
+ }
+ return left
+}
+
+lp.parseMaybeUnary = function(sawUnary) {
+ let start = this.storeCurrentPos(), expr
+ if (this.tok.type.prefix) {
+ let node = this.startNode(), update = this.tok.type === tt.incDec
+ if (!update) sawUnary = true
+ node.operator = this.tok.value
+ node.prefix = true
+ this.next()
+ node.argument = this.parseMaybeUnary(true)
+ if (update) node.argument = this.checkLVal(node.argument)
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
+ } else if (this.tok.type === tt.ellipsis) {
+ let node = this.startNode()
+ this.next()
+ node.argument = this.parseMaybeUnary(sawUnary)
+ expr = this.finishNode(node, "SpreadElement")
+ } else {
+ expr = this.parseExprSubscripts()
+ while (this.tok.type.postfix && !this.canInsertSemicolon()) {
+ let node = this.startNodeAt(start)
+ node.operator = this.tok.value
+ node.prefix = false
+ node.argument = this.checkLVal(expr)
+ this.next()
+ expr = this.finishNode(node, "UpdateExpression")
+ }
+ }
+
+ if (!sawUnary && this.eat(tt.starstar)) {
+ let node = this.startNodeAt(start)
+ node.operator = "**"
+ node.left = expr
+ node.right = this.parseMaybeUnary(false)
+ return this.finishNode(node, "BinaryExpression")
+ }
+
+ return expr
+}
+
+lp.parseExprSubscripts = function() {
+ let start = this.storeCurrentPos()
+ return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart)
+}
+
+lp.parseSubscripts = function(base, start, noCalls, startIndent, line) {
+ for (;;) {
+ if (this.curLineStart != line && this.curIndent <= startIndent && this.tokenStartsLine()) {
+ if (this.tok.type == tt.dot && this.curIndent == startIndent)
+ --startIndent
+ else
+ return base
+ }
+
+ if (this.eat(tt.dot)) {
+ let node = this.startNodeAt(start)
+ node.object = base
+ if (this.curLineStart != line && this.curIndent <= startIndent && this.tokenStartsLine())
+ node.property = this.dummyIdent()
+ else
+ node.property = this.parsePropertyAccessor() || this.dummyIdent()
+ node.computed = false
+ base = this.finishNode(node, "MemberExpression")
+ } else if (this.tok.type == tt.bracketL) {
+ this.pushCx()
+ this.next()
+ let node = this.startNodeAt(start)
+ node.object = base
+ node.property = this.parseExpression()
+ node.computed = true
+ this.popCx()
+ this.expect(tt.bracketR)
+ base = this.finishNode(node, "MemberExpression")
+ } else if (!noCalls && this.tok.type == tt.parenL) {
+ let node = this.startNodeAt(start)
+ node.callee = base
+ node.arguments = this.parseExprList(tt.parenR)
+ base = this.finishNode(node, "CallExpression")
+ } else if (this.tok.type == tt.backQuote) {
+ let node = this.startNodeAt(start)
+ node.tag = base
+ node.quasi = this.parseTemplate()
+ base = this.finishNode(node, "TaggedTemplateExpression")
+ } else {
+ return base
+ }
+ }
+}
+
+lp.parseExprAtom = function() {
+ let node
+ switch (this.tok.type) {
+ case tt._this:
+ case tt._super:
+ let type = this.tok.type === tt._this ? "ThisExpression" : "Super"
+ node = this.startNode()
+ this.next()
+ return this.finishNode(node, type)
+
+ case tt.name:
+ let start = this.storeCurrentPos()
+ let id = this.parseIdent()
+ return this.eat(tt.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id
+
+ case tt.regexp:
+ node = this.startNode()
+ let val = this.tok.value
+ node.regex = {pattern: val.pattern, flags: val.flags}
+ node.value = val.value
+ node.raw = this.input.slice(this.tok.start, this.tok.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tt.num: case tt.string:
+ node = this.startNode()
+ node.value = this.tok.value
+ node.raw = this.input.slice(this.tok.start, this.tok.end)
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tt._null: case tt._true: case tt._false:
+ node = this.startNode()
+ node.value = this.tok.type === tt._null ? null : this.tok.type === tt._true
+ node.raw = this.tok.type.keyword
+ this.next()
+ return this.finishNode(node, "Literal")
+
+ case tt.parenL:
+ let parenStart = this.storeCurrentPos()
+ this.next()
+ let inner = this.parseExpression()
+ this.expect(tt.parenR)
+ if (this.eat(tt.arrow)) {
+ return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (isDummy(inner) ? [] : [inner]))
+ }
+ if (this.options.preserveParens) {
+ let par = this.startNodeAt(parenStart)
+ par.expression = inner
+ inner = this.finishNode(par, "ParenthesizedExpression")
+ }
+ return inner
+
+ case tt.bracketL:
+ node = this.startNode()
+ node.elements = this.parseExprList(tt.bracketR, true)
+ return this.finishNode(node, "ArrayExpression")
+
+ case tt.braceL:
+ return this.parseObj()
+
+ case tt._class:
+ return this.parseClass()
+
+ case tt._function:
+ node = this.startNode()
+ this.next()
+ return this.parseFunction(node, false)
+
+ case tt._new:
+ return this.parseNew()
+
+ case tt.backQuote:
+ return this.parseTemplate()
+
+ default:
+ return this.dummyIdent()
+ }
+}
+
+lp.parseNew = function() {
+ let node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart
+ let meta = this.parseIdent(true)
+ if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) {
+ node.meta = meta
+ node.property = this.parseIdent(true)
+ return this.finishNode(node, "MetaProperty")
+ }
+ let start = this.storeCurrentPos()
+ node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line)
+ if (this.tok.type == tt.parenL) {
+ node.arguments = this.parseExprList(tt.parenR)
+ } else {
+ node.arguments = []
+ }
+ return this.finishNode(node, "NewExpression")
+}
+
+lp.parseTemplateElement = function() {
+ let elem = this.startNode()
+ elem.value = {
+ raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, '\n'),
+ cooked: this.tok.value
+ }
+ this.next()
+ elem.tail = this.tok.type === tt.backQuote
+ return this.finishNode(elem, "TemplateElement")
+}
+
+lp.parseTemplate = function() {
+ let node = this.startNode()
+ this.next()
+ node.expressions = []
+ let curElt = this.parseTemplateElement()
+ node.quasis = [curElt]
+ while (!curElt.tail) {
+ this.next()
+ node.expressions.push(this.parseExpression())
+ if (this.expect(tt.braceR)) {
+ curElt = this.parseTemplateElement()
+ } else {
+ curElt = this.startNode()
+ curElt.value = {cooked: '', raw: ''}
+ curElt.tail = true
+ this.finishNode(curElt, "TemplateElement")
+ }
+ node.quasis.push(curElt)
+ }
+ this.expect(tt.backQuote)
+ return this.finishNode(node, "TemplateLiteral")
+}
+
+lp.parseObj = function() {
+ let node = this.startNode()
+ node.properties = []
+ this.pushCx()
+ let indent = this.curIndent + 1, line = this.curLineStart
+ this.eat(tt.braceL)
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
+ while (!this.closes(tt.braceR, indent, line)) {
+ let prop = this.startNode(), isGenerator, start
+ if (this.options.ecmaVersion >= 6) {
+ start = this.storeCurrentPos()
+ prop.method = false
+ prop.shorthand = false
+ isGenerator = this.eat(tt.star)
+ }
+ this.parsePropertyName(prop)
+ if (isDummy(prop.key)) { if (isDummy(this.parseMaybeAssign())) this.next(); this.eat(tt.comma); continue }
+ if (this.eat(tt.colon)) {
+ prop.kind = "init"
+ prop.value = this.parseMaybeAssign()
+ } else if (this.options.ecmaVersion >= 6 && (this.tok.type === tt.parenL || this.tok.type === tt.braceL)) {
+ prop.kind = "init"
+ prop.method = true
+ prop.value = this.parseMethod(isGenerator)
+ } else if (this.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
+ !prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
+ (this.tok.type != tt.comma && this.tok.type != tt.braceR)) {
+ prop.kind = prop.key.name
+ this.parsePropertyName(prop)
+ prop.value = this.parseMethod(false)
+ } else {
+ prop.kind = "init"
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(tt.eq)) {
+ let assign = this.startNodeAt(start)
+ assign.operator = "="
+ assign.left = prop.key
+ assign.right = this.parseMaybeAssign()
+ prop.value = this.finishNode(assign, "AssignmentExpression")
+ } else {
+ prop.value = prop.key
+ }
+ } else {
+ prop.value = this.dummyIdent()
+ }
+ prop.shorthand = true
+ }
+ node.properties.push(this.finishNode(prop, "Property"))
+ this.eat(tt.comma)
+ }
+ this.popCx()
+ if (!this.eat(tt.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ return this.finishNode(node, "ObjectExpression")
+}
+
+lp.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(tt.bracketL)) {
+ prop.computed = true
+ prop.key = this.parseExpression()
+ this.expect(tt.bracketR)
+ return
+ } else {
+ prop.computed = false
+ }
+ }
+ let key = (this.tok.type === tt.num || this.tok.type === tt.string) ? this.parseExprAtom() : this.parseIdent()
+ prop.key = key || this.dummyIdent()
+}
+
+lp.parsePropertyAccessor = function() {
+ if (this.tok.type === tt.name || this.tok.type.keyword) return this.parseIdent()
+}
+
+lp.parseIdent = function() {
+ let name = this.tok.type === tt.name ? this.tok.value : this.tok.type.keyword
+ if (!name) return this.dummyIdent()
+ let node = this.startNode()
+ this.next()
+ node.name = name
+ return this.finishNode(node, "Identifier")
+}
+
+lp.initFunction = function(node) {
+ node.id = null
+ node.params = []
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false
+ node.expression = false
+ }
+}
+
+// Convert existing expression atom to assignable pattern
+// if possible.
+
+lp.toAssignable = function(node, binding) {
+ if (!node || node.type == "Identifier" || (node.type == "MemberExpression" && !binding)) {
+ // Okay
+ } else if (node.type == "ParenthesizedExpression") {
+ node.expression = this.toAssignable(node.expression, binding)
+ } else if (this.options.ecmaVersion < 6) {
+ return this.dummyIdent()
+ } else if (node.type == "ObjectExpression") {
+ node.type = "ObjectPattern"
+ let props = node.properties
+ for (let i = 0; i < props.length; i++)
+ props[i].value = this.toAssignable(props[i].value, binding)
+ } else if (node.type == "ArrayExpression") {
+ node.type = "ArrayPattern"
+ this.toAssignableList(node.elements, binding)
+ } else if (node.type == "SpreadElement") {
+ node.type = "RestElement"
+ node.argument = this.toAssignable(node.argument, binding)
+ } else if (node.type == "AssignmentExpression") {
+ node.type = "AssignmentPattern"
+ delete node.operator
+ } else {
+ return this.dummyIdent()
+ }
+ return node
+}
+
+lp.toAssignableList = function(exprList, binding) {
+ for (let i = 0; i < exprList.length; i++)
+ exprList[i] = this.toAssignable(exprList[i], binding)
+ return exprList
+}
+
+lp.parseFunctionParams = function(params) {
+ params = this.parseExprList(tt.parenR)
+ return this.toAssignableList(params, true)
+}
+
+lp.parseMethod = function(isGenerator) {
+ let node = this.startNode()
+ this.initFunction(node)
+ node.params = this.parseFunctionParams()
+ node.generator = isGenerator || false
+ node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== tt.braceL
+ node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ return this.finishNode(node, "FunctionExpression")
+}
+
+lp.parseArrowExpression = function(node, params) {
+ this.initFunction(node)
+ node.params = this.toAssignableList(params, true)
+ node.expression = this.tok.type !== tt.braceL
+ node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ return this.finishNode(node, "ArrowFunctionExpression")
+}
+
+lp.parseExprList = function(close, allowEmpty) {
+ this.pushCx()
+ let indent = this.curIndent, line = this.curLineStart, elts = []
+ this.next() // Opening bracket
+ while (!this.closes(close, indent + 1, line)) {
+ if (this.eat(tt.comma)) {
+ elts.push(allowEmpty ? null : this.dummyIdent())
+ continue
+ }
+ let elt = this.parseMaybeAssign()
+ if (isDummy(elt)) {
+ if (this.closes(close, indent, line)) break
+ this.next()
+ } else {
+ elts.push(elt)
+ }
+ this.eat(tt.comma)
+ }
+ this.popCx()
+ if (!this.eat(close)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ return elts
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/index.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/index.js
new file mode 100644
index 0000000000..e9e940e75f
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/index.js
@@ -0,0 +1,50 @@
+// Acorn: Loose parser
+//
+// This module provides an alternative parser (`parse_dammit`) that
+// exposes that same interface as `parse`, but will try to parse
+// anything as JavaScript, repairing syntax error the best it can.
+// There are circumstances in which it will raise an error and give
+// up, but they are very rare. The resulting AST will be a mostly
+// valid JavaScript AST (as per the [Mozilla parser API][api], except
+// that:
+//
+// - Return outside functions is allowed
+//
+// - Label consistency (no conflicts, break only to existing labels)
+// is not enforced.
+//
+// - Bogus Identifier nodes with a name of `"✖"` are inserted whenever
+// the parser got too confused to return anything meaningful.
+//
+// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
+//
+// The expected use for this is to *first* try `acorn.parse`, and only
+// if that fails switch to `parse_dammit`. The loose parser might
+// parse badly indented code incorrectly, so **don't** use it as
+// your default parser.
+//
+// Quite a lot of acorn.js is duplicated here. The alternative was to
+// add a *lot* of extra cruft to that file, making it less readable
+// and slower. Copying and editing the code allowed me to make
+// invasive changes and simplifications without creating a complicated
+// tangle.
+
+import acorn from "acorn"
+import {LooseParser, pluginsLoose} from "./state"
+import "./tokenize"
+import "./statement"
+import "./expression"
+
+export {LooseParser, pluginsLoose} from "./state"
+
+acorn.defaultOptions.tabSize = 4
+
+export function parse_dammit(input, options) {
+ let p = new LooseParser(input, options)
+ p.next()
+ return p.parseTopLevel()
+}
+
+acorn.parse_dammit = parse_dammit
+acorn.LooseParser = LooseParser
+acorn.pluginsLoose = pluginsLoose
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/parseutil.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/parseutil.js
new file mode 100644
index 0000000000..c5ee096a1d
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/parseutil.js
@@ -0,0 +1 @@
+export function isDummy(node) { return node.name == "✖" } \ No newline at end of file
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/state.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/state.js
new file mode 100644
index 0000000000..5101bc4de2
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/state.js
@@ -0,0 +1,160 @@
+import {tokenizer, SourceLocation, tokTypes as tt, Node, lineBreak, isNewLine} from "acorn"
+
+// Registered plugins
+export const pluginsLoose = {}
+
+export class LooseParser {
+ constructor(input, options = {}) {
+ this.toks = tokenizer(input, options)
+ this.options = this.toks.options
+ this.input = this.toks.input
+ this.tok = this.last = {type: tt.eof, start: 0, end: 0}
+ if (this.options.locations) {
+ let here = this.toks.curPosition()
+ this.tok.loc = new SourceLocation(this.toks, here, here)
+ }
+ this.ahead = [] // Tokens ahead
+ this.context = [] // Indentation contexted
+ this.curIndent = 0
+ this.curLineStart = 0
+ this.nextLineStart = this.lineEnd(this.curLineStart) + 1
+ // Load plugins
+ this.options.pluginsLoose = options.pluginsLoose || {}
+ this.loadPlugins(this.options.pluginsLoose)
+ }
+
+ startNode() {
+ return new Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
+ }
+
+ storeCurrentPos() {
+ return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start
+ }
+
+ startNodeAt(pos) {
+ if (this.options.locations) {
+ return new Node(this.toks, pos[0], pos[1])
+ } else {
+ return new Node(this.toks, pos)
+ }
+ }
+
+ finishNode(node, type) {
+ node.type = type
+ node.end = this.last.end
+ if (this.options.locations)
+ node.loc.end = this.last.loc.end
+ if (this.options.ranges)
+ node.range[1] = this.last.end
+ return node
+ }
+
+ dummyNode(type) {
+ let dummy = this.startNode()
+ dummy.type = type
+ dummy.end = dummy.start
+ if (this.options.locations)
+ dummy.loc.end = dummy.loc.start
+ if (this.options.ranges)
+ dummy.range[1] = dummy.start
+ this.last = {type: tt.name, start: dummy.start, end: dummy.start, loc: dummy.loc}
+ return dummy
+ }
+
+ dummyIdent() {
+ let dummy = this.dummyNode("Identifier")
+ dummy.name = "✖"
+ return dummy
+ }
+
+ dummyString() {
+ let dummy = this.dummyNode("Literal")
+ dummy.value = dummy.raw = "✖"
+ return dummy
+ }
+
+ eat(type) {
+ if (this.tok.type === type) {
+ this.next()
+ return true
+ } else {
+ return false
+ }
+ }
+
+ isContextual(name) {
+ return this.tok.type === tt.name && this.tok.value === name
+ }
+
+ eatContextual(name) {
+ return this.tok.value === name && this.eat(tt.name)
+ }
+
+ canInsertSemicolon() {
+ return this.tok.type === tt.eof || this.tok.type === tt.braceR ||
+ lineBreak.test(this.input.slice(this.last.end, this.tok.start))
+ }
+
+ semicolon() {
+ return this.eat(tt.semi)
+ }
+
+ expect(type) {
+ if (this.eat(type)) return true
+ for (let i = 1; i <= 2; i++) {
+ if (this.lookAhead(i).type == type) {
+ for (let j = 0; j < i; j++) this.next()
+ return true
+ }
+ }
+ }
+
+ pushCx() {
+ this.context.push(this.curIndent)
+ }
+
+ popCx() {
+ this.curIndent = this.context.pop()
+ }
+
+ lineEnd(pos) {
+ while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) ++pos
+ return pos
+ }
+
+ indentationAfter(pos) {
+ for (let count = 0;; ++pos) {
+ let ch = this.input.charCodeAt(pos)
+ if (ch === 32) ++count
+ else if (ch === 9) count += this.options.tabSize
+ else return count
+ }
+ }
+
+ closes(closeTok, indent, line, blockHeuristic) {
+ if (this.tok.type === closeTok || this.tok.type === tt.eof) return true
+ return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() &&
+ (!blockHeuristic || this.nextLineStart >= this.input.length ||
+ this.indentationAfter(this.nextLineStart) < indent)
+ }
+
+ tokenStartsLine() {
+ for (let p = this.tok.start - 1; p >= this.curLineStart; --p) {
+ let ch = this.input.charCodeAt(p)
+ if (ch !== 9 && ch !== 32) return false
+ }
+ return true
+ }
+
+ extend(name, f) {
+ this[name] = f(this[name])
+ }
+
+ loadPlugins(pluginConfigs) {
+ for (let name in pluginConfigs) {
+ let plugin = pluginsLoose[name]
+ if (!plugin) throw new Error("Plugin '" + name + "' not found")
+ plugin(this, pluginConfigs[name])
+ }
+ }
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/statement.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/statement.js
new file mode 100644
index 0000000000..4da72189eb
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/statement.js
@@ -0,0 +1,425 @@
+import {LooseParser} from "./state"
+import {isDummy} from "./parseutil"
+import {getLineInfo, tokTypes as tt} from "acorn"
+
+const lp = LooseParser.prototype
+
+lp.parseTopLevel = function() {
+ let node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0)
+ node.body = []
+ while (this.tok.type !== tt.eof) node.body.push(this.parseStatement())
+ this.last = this.tok
+ if (this.options.ecmaVersion >= 6) {
+ node.sourceType = this.options.sourceType
+ }
+ return this.finishNode(node, "Program")
+}
+
+lp.parseStatement = function() {
+ let starttype = this.tok.type, node = this.startNode(), kind
+
+ if (this.toks.isLet()) {
+ starttype = tt._var
+ kind = "let"
+ }
+
+ switch (starttype) {
+ case tt._break: case tt._continue:
+ this.next()
+ let isBreak = starttype === tt._break
+ if (this.semicolon() || this.canInsertSemicolon()) {
+ node.label = null
+ } else {
+ node.label = this.tok.type === tt.name ? this.parseIdent() : null
+ this.semicolon()
+ }
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
+
+ case tt._debugger:
+ this.next()
+ this.semicolon()
+ return this.finishNode(node, "DebuggerStatement")
+
+ case tt._do:
+ this.next()
+ node.body = this.parseStatement()
+ node.test = this.eat(tt._while) ? this.parseParenExpression() : this.dummyIdent()
+ this.semicolon()
+ return this.finishNode(node, "DoWhileStatement")
+
+ case tt._for:
+ this.next()
+ this.pushCx()
+ this.expect(tt.parenL)
+ if (this.tok.type === tt.semi) return this.parseFor(node, null)
+ let isLet = this.toks.isLet()
+ if (isLet || this.tok.type === tt._var || this.tok.type === tt._const) {
+ let init = this.parseVar(true, isLet ? "let" : this.tok.value)
+ if (init.declarations.length === 1 && (this.tok.type === tt._in || this.isContextual("of"))) {
+ return this.parseForIn(node, init)
+ }
+ return this.parseFor(node, init)
+ }
+ let init = this.parseExpression(true)
+ if (this.tok.type === tt._in || this.isContextual("of"))
+ return this.parseForIn(node, this.toAssignable(init))
+ return this.parseFor(node, init)
+
+ case tt._function:
+ this.next()
+ return this.parseFunction(node, true)
+
+ case tt._if:
+ this.next()
+ node.test = this.parseParenExpression()
+ node.consequent = this.parseStatement()
+ node.alternate = this.eat(tt._else) ? this.parseStatement() : null
+ return this.finishNode(node, "IfStatement")
+
+ case tt._return:
+ this.next()
+ if (this.eat(tt.semi) || this.canInsertSemicolon()) node.argument = null
+ else { node.argument = this.parseExpression(); this.semicolon() }
+ return this.finishNode(node, "ReturnStatement")
+
+ case tt._switch:
+ let blockIndent = this.curIndent, line = this.curLineStart
+ this.next()
+ node.discriminant = this.parseParenExpression()
+ node.cases = []
+ this.pushCx()
+ this.expect(tt.braceL)
+
+ let cur
+ while (!this.closes(tt.braceR, blockIndent, line, true)) {
+ if (this.tok.type === tt._case || this.tok.type === tt._default) {
+ let isCase = this.tok.type === tt._case
+ if (cur) this.finishNode(cur, "SwitchCase")
+ node.cases.push(cur = this.startNode())
+ cur.consequent = []
+ this.next()
+ if (isCase) cur.test = this.parseExpression()
+ else cur.test = null
+ this.expect(tt.colon)
+ } else {
+ if (!cur) {
+ node.cases.push(cur = this.startNode())
+ cur.consequent = []
+ cur.test = null
+ }
+ cur.consequent.push(this.parseStatement())
+ }
+ }
+ if (cur) this.finishNode(cur, "SwitchCase")
+ this.popCx()
+ this.eat(tt.braceR)
+ return this.finishNode(node, "SwitchStatement")
+
+ case tt._throw:
+ this.next()
+ node.argument = this.parseExpression()
+ this.semicolon()
+ return this.finishNode(node, "ThrowStatement")
+
+ case tt._try:
+ this.next()
+ node.block = this.parseBlock()
+ node.handler = null
+ if (this.tok.type === tt._catch) {
+ let clause = this.startNode()
+ this.next()
+ this.expect(tt.parenL)
+ clause.param = this.toAssignable(this.parseExprAtom(), true)
+ this.expect(tt.parenR)
+ clause.body = this.parseBlock()
+ node.handler = this.finishNode(clause, "CatchClause")
+ }
+ node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null
+ if (!node.handler && !node.finalizer) return node.block
+ return this.finishNode(node, "TryStatement")
+
+ case tt._var:
+ case tt._const:
+ return this.parseVar(false, kind || this.tok.value)
+
+ case tt._while:
+ this.next()
+ node.test = this.parseParenExpression()
+ node.body = this.parseStatement()
+ return this.finishNode(node, "WhileStatement")
+
+ case tt._with:
+ this.next()
+ node.object = this.parseParenExpression()
+ node.body = this.parseStatement()
+ return this.finishNode(node, "WithStatement")
+
+ case tt.braceL:
+ return this.parseBlock()
+
+ case tt.semi:
+ this.next()
+ return this.finishNode(node, "EmptyStatement")
+
+ case tt._class:
+ return this.parseClass(true)
+
+ case tt._import:
+ return this.parseImport()
+
+ case tt._export:
+ return this.parseExport()
+
+ default:
+ let expr = this.parseExpression()
+ if (isDummy(expr)) {
+ this.next()
+ if (this.tok.type === tt.eof) return this.finishNode(node, "EmptyStatement")
+ return this.parseStatement()
+ } else if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) {
+ node.body = this.parseStatement()
+ node.label = expr
+ return this.finishNode(node, "LabeledStatement")
+ } else {
+ node.expression = expr
+ this.semicolon()
+ return this.finishNode(node, "ExpressionStatement")
+ }
+ }
+}
+
+lp.parseBlock = function() {
+ let node = this.startNode()
+ this.pushCx()
+ this.expect(tt.braceL)
+ let blockIndent = this.curIndent, line = this.curLineStart
+ node.body = []
+ while (!this.closes(tt.braceR, blockIndent, line, true))
+ node.body.push(this.parseStatement())
+ this.popCx()
+ this.eat(tt.braceR)
+ return this.finishNode(node, "BlockStatement")
+}
+
+lp.parseFor = function(node, init) {
+ node.init = init
+ node.test = node.update = null
+ if (this.eat(tt.semi) && this.tok.type !== tt.semi) node.test = this.parseExpression()
+ if (this.eat(tt.semi) && this.tok.type !== tt.parenR) node.update = this.parseExpression()
+ this.popCx()
+ this.expect(tt.parenR)
+ node.body = this.parseStatement()
+ return this.finishNode(node, "ForStatement")
+}
+
+lp.parseForIn = function(node, init) {
+ let type = this.tok.type === tt._in ? "ForInStatement" : "ForOfStatement"
+ this.next()
+ node.left = init
+ node.right = this.parseExpression()
+ this.popCx()
+ this.expect(tt.parenR)
+ node.body = this.parseStatement()
+ return this.finishNode(node, type)
+}
+
+lp.parseVar = function(noIn, kind) {
+ let node = this.startNode()
+ node.kind = kind
+ this.next()
+ node.declarations = []
+ do {
+ let decl = this.startNode()
+ decl.id = this.options.ecmaVersion >= 6 ? this.toAssignable(this.parseExprAtom(), true) : this.parseIdent()
+ decl.init = this.eat(tt.eq) ? this.parseMaybeAssign(noIn) : null
+ node.declarations.push(this.finishNode(decl, "VariableDeclarator"))
+ } while (this.eat(tt.comma))
+ if (!node.declarations.length) {
+ let decl = this.startNode()
+ decl.id = this.dummyIdent()
+ node.declarations.push(this.finishNode(decl, "VariableDeclarator"))
+ }
+ if (!noIn) this.semicolon()
+ return this.finishNode(node, "VariableDeclaration")
+}
+
+lp.parseClass = function(isStatement) {
+ let node = this.startNode()
+ this.next()
+ if (this.tok.type === tt.name) node.id = this.parseIdent()
+ else if (isStatement) node.id = this.dummyIdent()
+ else node.id = null
+ node.superClass = this.eat(tt._extends) ? this.parseExpression() : null
+ node.body = this.startNode()
+ node.body.body = []
+ this.pushCx()
+ let indent = this.curIndent + 1, line = this.curLineStart
+ this.eat(tt.braceL)
+ if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
+ while (!this.closes(tt.braceR, indent, line)) {
+ if (this.semicolon()) continue
+ let method = this.startNode(), isGenerator
+ if (this.options.ecmaVersion >= 6) {
+ method.static = false
+ isGenerator = this.eat(tt.star)
+ }
+ this.parsePropertyName(method)
+ if (isDummy(method.key)) { if (isDummy(this.parseMaybeAssign())) this.next(); this.eat(tt.comma); continue }
+ if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" &&
+ (this.tok.type != tt.parenL && this.tok.type != tt.braceL)) {
+ method.static = true
+ isGenerator = this.eat(tt.star)
+ this.parsePropertyName(method)
+ } else {
+ method.static = false
+ }
+ if (this.options.ecmaVersion >= 5 && method.key.type === "Identifier" &&
+ !method.computed && (method.key.name === "get" || method.key.name === "set") &&
+ this.tok.type !== tt.parenL && this.tok.type !== tt.braceL) {
+ method.kind = method.key.name
+ this.parsePropertyName(method)
+ method.value = this.parseMethod(false)
+ } else {
+ if (!method.computed && !method.static && !isGenerator && (
+ method.key.type === "Identifier" && method.key.name === "constructor" ||
+ method.key.type === "Literal" && method.key.value === "constructor")) {
+ method.kind = "constructor"
+ } else {
+ method.kind = "method"
+ }
+ method.value = this.parseMethod(isGenerator)
+ }
+ node.body.body.push(this.finishNode(method, "MethodDefinition"))
+ }
+ this.popCx()
+ if (!this.eat(tt.braceR)) {
+ // If there is no closing brace, make the node span to the start
+ // of the next token (this is useful for Tern)
+ this.last.end = this.tok.start
+ if (this.options.locations) this.last.loc.end = this.tok.loc.start
+ }
+ this.semicolon()
+ this.finishNode(node.body, "ClassBody")
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
+}
+
+lp.parseFunction = function(node, isStatement) {
+ this.initFunction(node)
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = this.eat(tt.star)
+ }
+ if (this.tok.type === tt.name) node.id = this.parseIdent()
+ else if (isStatement) node.id = this.dummyIdent()
+ node.params = this.parseFunctionParams()
+ node.body = this.parseBlock()
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+}
+
+lp.parseExport = function() {
+ let node = this.startNode()
+ this.next()
+ if (this.eat(tt.star)) {
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString()
+ return this.finishNode(node, "ExportAllDeclaration")
+ }
+ if (this.eat(tt._default)) {
+ let expr = this.parseMaybeAssign()
+ if (expr.id) {
+ switch (expr.type) {
+ case "FunctionExpression": expr.type = "FunctionDeclaration"; break
+ case "ClassExpression": expr.type = "ClassDeclaration"; break
+ }
+ }
+ node.declaration = expr
+ this.semicolon()
+ return this.finishNode(node, "ExportDefaultDeclaration")
+ }
+ if (this.tok.type.keyword || this.toks.isLet()) {
+ node.declaration = this.parseStatement()
+ node.specifiers = []
+ node.source = null
+ } else {
+ node.declaration = null
+ node.specifiers = this.parseExportSpecifierList()
+ node.source = this.eatContextual("from") ? this.parseExprAtom() : null
+ this.semicolon()
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+}
+
+lp.parseImport = function() {
+ let node = this.startNode()
+ this.next()
+ if (this.tok.type === tt.string) {
+ node.specifiers = []
+ node.source = this.parseExprAtom()
+ node.kind = ''
+ } else {
+ let elt
+ if (this.tok.type === tt.name && this.tok.value !== "from") {
+ elt = this.startNode()
+ elt.local = this.parseIdent()
+ this.finishNode(elt, "ImportDefaultSpecifier")
+ this.eat(tt.comma)
+ }
+ node.specifiers = this.parseImportSpecifierList()
+ node.source = this.eatContextual("from") && this.tok.type == tt.string ? this.parseExprAtom() : this.dummyString()
+ if (elt) node.specifiers.unshift(elt)
+ }
+ this.semicolon()
+ return this.finishNode(node, "ImportDeclaration")
+}
+
+lp.parseImportSpecifierList = function() {
+ let elts = []
+ if (this.tok.type === tt.star) {
+ let elt = this.startNode()
+ this.next()
+ elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent()
+ elts.push(this.finishNode(elt, "ImportNamespaceSpecifier"))
+ } else {
+ let indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
+ this.pushCx()
+ this.eat(tt.braceL)
+ if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
+ while (!this.closes(tt.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ let elt = this.startNode()
+ if (this.eat(tt.star)) {
+ elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent()
+ this.finishNode(elt, "ImportNamespaceSpecifier")
+ } else {
+ if (this.isContextual("from")) break
+ elt.imported = this.parseIdent()
+ if (isDummy(elt.imported)) break
+ elt.local = this.eatContextual("as") ? this.parseIdent() : elt.imported
+ this.finishNode(elt, "ImportSpecifier")
+ }
+ elts.push(elt)
+ this.eat(tt.comma)
+ }
+ this.eat(tt.braceR)
+ this.popCx()
+ }
+ return elts
+}
+
+lp.parseExportSpecifierList = function() {
+ let elts = []
+ let indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
+ this.pushCx()
+ this.eat(tt.braceL)
+ if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
+ while (!this.closes(tt.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ if (this.isContextual("from")) break
+ let elt = this.startNode()
+ elt.local = this.parseIdent()
+ if (isDummy(elt.local)) break
+ elt.exported = this.eatContextual("as") ? this.parseIdent() : elt.local
+ this.finishNode(elt, "ExportSpecifier")
+ elts.push(elt)
+ this.eat(tt.comma)
+ }
+ this.eat(tt.braceR)
+ this.popCx()
+ return elts
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/tokenize.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/tokenize.js
new file mode 100644
index 0000000000..ce5a49a3f4
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/tokenize.js
@@ -0,0 +1,108 @@
+import {tokTypes as tt, Token, isNewLine, SourceLocation, getLineInfo, lineBreakG} from "acorn"
+import {LooseParser} from "./state"
+
+const lp = LooseParser.prototype
+
+function isSpace(ch) {
+ return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || isNewLine(ch)
+}
+
+lp.next = function() {
+ this.last = this.tok
+ if (this.ahead.length)
+ this.tok = this.ahead.shift()
+ else
+ this.tok = this.readToken()
+
+ if (this.tok.start >= this.nextLineStart) {
+ while (this.tok.start >= this.nextLineStart) {
+ this.curLineStart = this.nextLineStart
+ this.nextLineStart = this.lineEnd(this.curLineStart) + 1
+ }
+ this.curIndent = this.indentationAfter(this.curLineStart)
+ }
+}
+
+lp.readToken = function() {
+ for (;;) {
+ try {
+ this.toks.next()
+ if (this.toks.type === tt.dot &&
+ this.input.substr(this.toks.end, 1) === "." &&
+ this.options.ecmaVersion >= 6) {
+ this.toks.end++
+ this.toks.type = tt.ellipsis
+ }
+ return new Token(this.toks)
+ } catch(e) {
+ if (!(e instanceof SyntaxError)) throw e
+
+ // Try to skip some text, based on the error message, and then continue
+ let msg = e.message, pos = e.raisedAt, replace = true
+ if (/unterminated/i.test(msg)) {
+ pos = this.lineEnd(e.pos + 1)
+ if (/string/.test(msg)) {
+ replace = {start: e.pos, end: pos, type: tt.string, value: this.input.slice(e.pos + 1, pos)}
+ } else if (/regular expr/i.test(msg)) {
+ let re = this.input.slice(e.pos, pos)
+ try { re = new RegExp(re) } catch(e) {}
+ replace = {start: e.pos, end: pos, type: tt.regexp, value: re}
+ } else if (/template/.test(msg)) {
+ replace = {start: e.pos, end: pos,
+ type: tt.template,
+ value: this.input.slice(e.pos, pos)}
+ } else {
+ replace = false
+ }
+ } else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) {
+ while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) ++pos
+ } else if (/character escape|expected hexadecimal/i.test(msg)) {
+ while (pos < this.input.length) {
+ let ch = this.input.charCodeAt(pos++)
+ if (ch === 34 || ch === 39 || isNewLine(ch)) break
+ }
+ } else if (/unexpected character/i.test(msg)) {
+ pos++
+ replace = false
+ } else if (/regular expression/i.test(msg)) {
+ replace = true
+ } else {
+ throw e
+ }
+ this.resetTo(pos)
+ if (replace === true) replace = {start: pos, end: pos, type: tt.name, value: "✖"}
+ if (replace) {
+ if (this.options.locations)
+ replace.loc = new SourceLocation(
+ this.toks,
+ getLineInfo(this.input, replace.start),
+ getLineInfo(this.input, replace.end))
+ return replace
+ }
+ }
+ }
+}
+
+lp.resetTo = function(pos) {
+ this.toks.pos = pos
+ let ch = this.input.charAt(pos - 1)
+ this.toks.exprAllowed = !ch || /[\[\{\(,;:?\/*=+\-~!|&%^<>]/.test(ch) ||
+ /[enwfd]/.test(ch) &&
+ /\b(keywords|case|else|return|throw|new|in|(instance|type)of|delete|void)$/.test(this.input.slice(pos - 10, pos))
+
+ if (this.options.locations) {
+ this.toks.curLine = 1
+ this.toks.lineStart = lineBreakG.lastIndex = 0
+ let match
+ while ((match = lineBreakG.exec(this.input)) && match.index < pos) {
+ ++this.toks.curLine
+ this.toks.lineStart = match.index + match[0].length
+ }
+ }
+}
+
+lp.lookAhead = function(n) {
+ while (n > this.ahead.length)
+ this.ahead.push(this.readToken())
+ return this.ahead[n - 1]
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/lval.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/lval.js
new file mode 100644
index 0000000000..a6bc3b7ad2
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/lval.js
@@ -0,0 +1,216 @@
+import {types as tt} from "./tokentype"
+import {Parser} from "./state"
+import {has} from "./util"
+
+const pp = Parser.prototype
+
+// Convert existing expression atom to assignable pattern
+// if possible.
+
+pp.toAssignable = function(node, isBinding) {
+ if (this.options.ecmaVersion >= 6 && node) {
+ switch (node.type) {
+ case "Identifier":
+ case "ObjectPattern":
+ case "ArrayPattern":
+ break
+
+ case "ObjectExpression":
+ node.type = "ObjectPattern"
+ for (let i = 0; i < node.properties.length; i++) {
+ let prop = node.properties[i]
+ if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter")
+ this.toAssignable(prop.value, isBinding)
+ }
+ break
+
+ case "ArrayExpression":
+ node.type = "ArrayPattern"
+ this.toAssignableList(node.elements, isBinding)
+ break
+
+ case "AssignmentExpression":
+ if (node.operator === "=") {
+ node.type = "AssignmentPattern"
+ delete node.operator
+ // falls through to AssignmentPattern
+ } else {
+ this.raise(node.left.end, "Only '=' operator can be used for specifying default value.")
+ break
+ }
+
+ case "AssignmentPattern":
+ if (node.right.type === "YieldExpression")
+ this.raise(node.right.start, "Yield expression cannot be a default value")
+ break
+
+ case "ParenthesizedExpression":
+ node.expression = this.toAssignable(node.expression, isBinding)
+ break
+
+ case "MemberExpression":
+ if (!isBinding) break
+
+ default:
+ this.raise(node.start, "Assigning to rvalue")
+ }
+ }
+ return node
+}
+
+// Convert list of expression atoms to binding list.
+
+pp.toAssignableList = function(exprList, isBinding) {
+ let end = exprList.length
+ if (end) {
+ let last = exprList[end - 1]
+ if (last && last.type == "RestElement") {
+ --end
+ } else if (last && last.type == "SpreadElement") {
+ last.type = "RestElement"
+ let arg = last.argument
+ this.toAssignable(arg, isBinding)
+ if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern")
+ this.unexpected(arg.start)
+ --end
+ }
+
+ if (isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier")
+ this.unexpected(last.argument.start)
+ }
+ for (let i = 0; i < end; i++) {
+ let elt = exprList[i]
+ if (elt) this.toAssignable(elt, isBinding)
+ }
+ return exprList
+}
+
+// Parses spread element.
+
+pp.parseSpread = function(refDestructuringErrors) {
+ let node = this.startNode()
+ this.next()
+ node.argument = this.parseMaybeAssign(false, refDestructuringErrors)
+ return this.finishNode(node, "SpreadElement")
+}
+
+pp.parseRest = function(allowNonIdent) {
+ let node = this.startNode()
+ this.next()
+
+ // RestElement inside of a function parameter must be an identifier
+ if (allowNonIdent) node.argument = this.type === tt.name ? this.parseIdent() : this.unexpected()
+ else node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected()
+
+ return this.finishNode(node, "RestElement")
+}
+
+// Parses lvalue (assignable) atom.
+
+pp.parseBindingAtom = function() {
+ if (this.options.ecmaVersion < 6) return this.parseIdent()
+ switch (this.type) {
+ case tt.name:
+ return this.parseIdent()
+
+ case tt.bracketL:
+ let node = this.startNode()
+ this.next()
+ node.elements = this.parseBindingList(tt.bracketR, true, true)
+ return this.finishNode(node, "ArrayPattern")
+
+ case tt.braceL:
+ return this.parseObj(true)
+
+ default:
+ this.unexpected()
+ }
+}
+
+pp.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowNonIdent) {
+ let elts = [], first = true
+ while (!this.eat(close)) {
+ if (first) first = false
+ else this.expect(tt.comma)
+ if (allowEmpty && this.type === tt.comma) {
+ elts.push(null)
+ } else if (allowTrailingComma && this.afterTrailingComma(close)) {
+ break
+ } else if (this.type === tt.ellipsis) {
+ let rest = this.parseRest(allowNonIdent)
+ this.parseBindingListItem(rest)
+ elts.push(rest)
+ if (this.type === tt.comma) this.raise(this.start, "Comma is not permitted after the rest element")
+ this.expect(close)
+ break
+ } else {
+ let elem = this.parseMaybeDefault(this.start, this.startLoc)
+ this.parseBindingListItem(elem)
+ elts.push(elem)
+ }
+ }
+ return elts
+}
+
+pp.parseBindingListItem = function(param) {
+ return param
+}
+
+// Parses assignment pattern around given atom if possible.
+
+pp.parseMaybeDefault = function(startPos, startLoc, left) {
+ left = left || this.parseBindingAtom()
+ if (this.options.ecmaVersion < 6 || !this.eat(tt.eq)) return left
+ let 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.
+
+pp.checkLVal = function(expr, isBinding, checkClashes) {
+ switch (expr.type) {
+ case "Identifier":
+ if (this.strict && this.reservedWordsStrictBind.test(expr.name))
+ this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode")
+ if (checkClashes) {
+ if (has(checkClashes, expr.name))
+ this.raiseRecoverable(expr.start, "Argument name clash")
+ checkClashes[expr.name] = true
+ }
+ break
+
+ case "MemberExpression":
+ if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression")
+ break
+
+ case "ObjectPattern":
+ for (let i = 0; i < expr.properties.length; i++)
+ this.checkLVal(expr.properties[i].value, isBinding, checkClashes)
+ break
+
+ case "ArrayPattern":
+ for (let i = 0; i < expr.elements.length; i++) {
+ let elem = expr.elements[i]
+ if (elem) this.checkLVal(elem, isBinding, checkClashes)
+ }
+ break
+
+ case "AssignmentPattern":
+ this.checkLVal(expr.left, isBinding, checkClashes)
+ break
+
+ case "RestElement":
+ this.checkLVal(expr.argument, isBinding, checkClashes)
+ break
+
+ case "ParenthesizedExpression":
+ this.checkLVal(expr.expression, isBinding, checkClashes)
+ break
+
+ default:
+ this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue")
+ }
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/node.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/node.js
new file mode 100644
index 0000000000..76b5b09825
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/node.js
@@ -0,0 +1,50 @@
+import {Parser} from "./state"
+import {SourceLocation} from "./locutil"
+
+export class Node {
+ constructor(parser, pos, loc) {
+ this.type = ""
+ this.start = pos
+ this.end = 0
+ if (parser.options.locations)
+ this.loc = new SourceLocation(parser, loc)
+ if (parser.options.directSourceFile)
+ this.sourceFile = parser.options.directSourceFile
+ if (parser.options.ranges)
+ this.range = [pos, 0]
+ }
+}
+
+// Start an AST node, attaching a start offset.
+
+const pp = Parser.prototype
+
+pp.startNode = function() {
+ return new Node(this, this.start, this.startLoc)
+}
+
+pp.startNodeAt = function(pos, loc) {
+ return new Node(this, pos, loc)
+}
+
+// Finish an AST node, adding `type` and `end` properties.
+
+function finishNodeAt(node, type, pos, loc) {
+ node.type = type
+ node.end = pos
+ if (this.options.locations)
+ node.loc.end = loc
+ if (this.options.ranges)
+ node.range[1] = pos
+ return node
+}
+
+pp.finishNode = function(node, type) {
+ return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)
+}
+
+// Finish node at given position
+
+pp.finishNodeAt = function(node, type, pos, loc) {
+ return finishNodeAt.call(this, node, type, pos, loc)
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/options.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/options.js
new file mode 100644
index 0000000000..3a1b0df3ad
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/options.js
@@ -0,0 +1,121 @@
+import {has, isArray} from "./util"
+import {SourceLocation} from "./locutil"
+
+// A second optional argument can be given to further configure
+// the parser process. These options are recognized:
+
+export const defaultOptions = {
+ // `ecmaVersion` indicates the ECMAScript version to parse. Must
+ // be either 3, or 5, or 6. This influences support for strict
+ // mode, the set of reserved words, support for getters and
+ // setters and other features. The default is 6.
+ ecmaVersion: 6,
+ // Source type ("script" or "module") for different semantics
+ sourceType: "script",
+ // `onInsertedSemicolon` can be a callback that will be called
+ // when a semicolon is automatically inserted. It will be passed
+ // th position of the comma as an offset, and if `locations` is
+ // enabled, it is given the location as a `{line, column}` object
+ // as second argument.
+ onInsertedSemicolon: null,
+ // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
+ // trailing commas.
+ onTrailingComma: null,
+ // By default, reserved words are only enforced if ecmaVersion >= 5.
+ // Set `allowReserved` to a boolean value to explicitly turn this on
+ // an off. When this option has the value "never", reserved words
+ // and keywords can also not be used as property names.
+ allowReserved: null,
+ // When enabled, a return at the top level is not considered an
+ // error.
+ allowReturnOutsideFunction: false,
+ // When enabled, import/export statements are not constrained to
+ // appearing at the top of the program.
+ allowImportExportEverywhere: false,
+ // When enabled, hashbang directive in the beginning of file
+ // is allowed and treated as a line comment.
+ allowHashBang: false,
+ // When `locations` is on, `loc` properties holding objects with
+ // `start` and `end` properties in `{line, column}` form (with
+ // line being 1-based and column 0-based) will be attached to the
+ // nodes.
+ locations: false,
+ // A function can be passed as `onToken` option, which will
+ // cause Acorn to call that function with object in the same
+ // format as tokens returned from `tokenizer().getToken()`. Note
+ // that you are not allowed to call the parser from the
+ // callback—that will corrupt its internal state.
+ onToken: null,
+ // A function can be passed as `onComment` option, which will
+ // cause Acorn to call that function with `(block, text, start,
+ // end)` parameters whenever a comment is skipped. `block` is a
+ // boolean indicating whether this is a block (`/* */`) comment,
+ // `text` is the content of the comment, and `start` and `end` are
+ // character offsets that denote the start and end of the comment.
+ // When the `locations` option is on, two more parameters are
+ // passed, the full `{line, column}` locations of the start and
+ // end of the comments. Note that you are not allowed to call the
+ // parser from the callback—that will corrupt its internal state.
+ onComment: null,
+ // Nodes have their start and end characters offsets recorded in
+ // `start` and `end` properties (directly on the node, rather than
+ // the `loc` object, which holds line/column data. To also add a
+ // [semi-standardized][range] `range` property holding a `[start,
+ // end]` array with the same numbers, set the `ranges` option to
+ // `true`.
+ //
+ // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
+ ranges: false,
+ // It is possible to parse multiple files into a single AST by
+ // passing the tree produced by parsing the first file as
+ // `program` option in subsequent parses. This will add the
+ // toplevel forms of the parsed file to the `Program` (top) node
+ // of an existing parse tree.
+ program: null,
+ // When `locations` is on, you can pass this to record the source
+ // file in every node's `loc` object.
+ sourceFile: null,
+ // This value, if given, is stored in every node, whether
+ // `locations` is on or off.
+ directSourceFile: null,
+ // When enabled, parenthesized expressions are represented by
+ // (non-standard) ParenthesizedExpression nodes
+ preserveParens: false,
+ plugins: {}
+}
+
+// Interpret and default an options object
+
+export function getOptions(opts) {
+ let options = {}
+ for (let opt in defaultOptions)
+ options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]
+ if (options.allowReserved == null)
+ options.allowReserved = options.ecmaVersion < 5
+
+ if (isArray(options.onToken)) {
+ let tokens = options.onToken
+ options.onToken = (token) => tokens.push(token)
+ }
+ if (isArray(options.onComment))
+ options.onComment = pushComment(options, options.onComment)
+
+ return options
+}
+
+function pushComment(options, array) {
+ return function (block, text, start, end, startLoc, endLoc) {
+ let comment = {
+ type: block ? 'Block' : 'Line',
+ value: text,
+ start: start,
+ end: end
+ }
+ if (options.locations)
+ comment.loc = new SourceLocation(this, startLoc, endLoc)
+ if (options.ranges)
+ comment.range = [start, end]
+ array.push(comment)
+ }
+}
+
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/parseutil.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/parseutil.js
new file mode 100644
index 0000000000..04eda2244f
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/parseutil.js
@@ -0,0 +1,109 @@
+import {types as tt} from "./tokentype"
+import {Parser} from "./state"
+import {lineBreak} from "./whitespace"
+
+const pp = Parser.prototype
+
+// ## Parser utilities
+
+// Test whether a statement node is the string literal `"use strict"`.
+
+pp.isUseStrict = function(stmt) {
+ return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" &&
+ stmt.expression.type === "Literal" &&
+ stmt.expression.raw.slice(1, -1) === "use strict"
+}
+
+// Predicate that tests whether the next token is of the given
+// type, and if yes, consumes it as a side effect.
+
+pp.eat = function(type) {
+ if (this.type === type) {
+ this.next()
+ return true
+ } else {
+ return false
+ }
+}
+
+// Tests whether parsed token is a contextual keyword.
+
+pp.isContextual = function(name) {
+ return this.type === tt.name && this.value === name
+}
+
+// Consumes contextual keyword if possible.
+
+pp.eatContextual = function(name) {
+ return this.value === name && this.eat(tt.name)
+}
+
+// Asserts that following token is given contextual keyword.
+
+pp.expectContextual = function(name) {
+ if (!this.eatContextual(name)) this.unexpected()
+}
+
+// Test whether a semicolon can be inserted at the current position.
+
+pp.canInsertSemicolon = function() {
+ return this.type === tt.eof ||
+ this.type === tt.braceR ||
+ lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
+}
+
+pp.insertSemicolon = function() {
+ if (this.canInsertSemicolon()) {
+ if (this.options.onInsertedSemicolon)
+ this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc)
+ return true
+ }
+}
+
+// Consume a semicolon, or, failing that, see if we are allowed to
+// pretend that there is a semicolon at this position.
+
+pp.semicolon = function() {
+ if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected()
+}
+
+pp.afterTrailingComma = function(tokType) {
+ if (this.type == tokType) {
+ if (this.options.onTrailingComma)
+ this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc)
+ this.next()
+ return true
+ }
+}
+
+// Expect a token of a given type. If found, consume it, otherwise,
+// raise an unexpected token error.
+
+pp.expect = function(type) {
+ this.eat(type) || this.unexpected()
+}
+
+// Raise an unexpected token error.
+
+pp.unexpected = function(pos) {
+ this.raise(pos != null ? pos : this.start, "Unexpected token")
+}
+
+export class DestructuringErrors {
+ constructor() {
+ this.shorthandAssign = 0
+ this.trailingComma = 0
+ }
+}
+
+pp.checkPatternErrors = function(refDestructuringErrors, andThrow) {
+ let trailing = refDestructuringErrors && refDestructuringErrors.trailingComma
+ if (!andThrow) return !!trailing
+ if (trailing) this.raise(trailing, "Comma is not permitted after the rest element")
+}
+
+pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
+ let pos = refDestructuringErrors && refDestructuringErrors.shorthandAssign
+ if (!andThrow) return !!pos
+ if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns")
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/state.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/state.js
new file mode 100644
index 0000000000..bddad5f730
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/state.js
@@ -0,0 +1,104 @@
+import {reservedWords, keywords} from "./identifier"
+import {types as tt} from "./tokentype"
+import {lineBreak} from "./whitespace"
+import {getOptions} from "./options"
+
+// Registered plugins
+export const plugins = {}
+
+function keywordRegexp(words) {
+ return new RegExp("^(" + words.replace(/ /g, "|") + ")$")
+}
+
+export class Parser {
+ constructor(options, input, startPos) {
+ this.options = options = getOptions(options)
+ this.sourceFile = options.sourceFile
+ this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5])
+ let reserved = options.allowReserved ? "" :
+ reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : "")
+ this.reservedWords = keywordRegexp(reserved)
+ let reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict
+ this.reservedWordsStrict = keywordRegexp(reservedStrict)
+ this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + reservedWords.strictBind)
+ this.input = String(input)
+
+ // Used to signal to callers of `readWord1` whether the word
+ // contained any escape sequences. This is needed because words with
+ // escape sequences must not be interpreted as keywords.
+ this.containsEsc = false
+
+ // Load plugins
+ this.loadPlugins(options.plugins)
+
+ // Set up token state
+
+ // The current position of the tokenizer in the input.
+ if (startPos) {
+ this.pos = startPos
+ this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos))
+ this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length
+ } else {
+ this.pos = this.lineStart = 0
+ this.curLine = 1
+ }
+
+ // Properties of the current token:
+ // Its type
+ this.type = tt.eof
+ // For tokens that include more information than their type, the value
+ this.value = null
+ // Its start and end offset
+ this.start = this.end = this.pos
+ // And, if locations are used, the {line, column} object
+ // corresponding to those offsets
+ this.startLoc = this.endLoc = this.curPosition()
+
+ // Position information for the previous token
+ this.lastTokEndLoc = this.lastTokStartLoc = null
+ this.lastTokStart = this.lastTokEnd = this.pos
+
+ // The context stack is used to superficially track syntactic
+ // context to predict whether a regular expression is allowed in a
+ // given position.
+ this.context = this.initialContext()
+ this.exprAllowed = true
+
+ // Figure out if it's a module code.
+ this.strict = this.inModule = options.sourceType === "module"
+
+ // Used to signify the start of a potential arrow function
+ this.potentialArrowAt = -1
+
+ // Flags to track whether we are in a function, a generator.
+ this.inFunction = this.inGenerator = false
+ // Labels in scope.
+ this.labels = []
+
+ // If enabled, skip leading hashbang line.
+ if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!')
+ this.skipLineComment(2)
+ }
+
+ // DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them
+ isKeyword(word) { return this.keywords.test(word) }
+ isReservedWord(word) { return this.reservedWords.test(word) }
+
+ extend(name, f) {
+ this[name] = f(this[name])
+ }
+
+ loadPlugins(pluginConfigs) {
+ for (let name in pluginConfigs) {
+ let plugin = plugins[name]
+ if (!plugin) throw new Error("Plugin '" + name + "' not found")
+ plugin(this, pluginConfigs[name])
+ }
+ }
+
+ parse() {
+ let node = this.options.program || this.startNode()
+ this.nextToken()
+ return this.parseTopLevel(node)
+ }
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/statement.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/statement.js
new file mode 100644
index 0000000000..ab5ece0307
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/statement.js
@@ -0,0 +1,654 @@
+import {types as tt} from "./tokentype"
+import {Parser} from "./state"
+import {lineBreak, skipWhiteSpace} from "./whitespace"
+import {isIdentifierStart, isIdentifierChar} from "./identifier"
+import {DestructuringErrors} from "./parseutil"
+
+const pp = Parser.prototype
+
+// ### Statement parsing
+
+// Parse a program. Initializes the parser, reads any number of
+// statements, and wraps them in a Program node. Optionally takes a
+// `program` argument. If present, the statements will be appended
+// to its body instead of creating a new node.
+
+pp.parseTopLevel = function(node) {
+ let first = true
+ if (!node.body) node.body = []
+ while (this.type !== tt.eof) {
+ let stmt = this.parseStatement(true, true)
+ node.body.push(stmt)
+ if (first) {
+ if (this.isUseStrict(stmt)) this.setStrict(true)
+ first = false
+ }
+ }
+ this.next()
+ if (this.options.ecmaVersion >= 6) {
+ node.sourceType = this.options.sourceType
+ }
+ return this.finishNode(node, "Program")
+}
+
+const loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}
+
+pp.isLet = function() {
+ if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false
+ skipWhiteSpace.lastIndex = this.pos
+ let skip = skipWhiteSpace.exec(this.input)
+ let next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next)
+ if (nextCh === 91 || nextCh == 123) return true // '{' and '['
+ if (isIdentifierStart(nextCh, true)) {
+ for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {}
+ let ident = this.input.slice(next, pos)
+ if (!this.isKeyword(ident)) return true
+ }
+ return false
+}
+
+// Parse a single statement.
+//
+// If expecting a statement and finding a slash operator, parse a
+// regular expression literal. This is to handle cases like
+// `if (foo) /blah/.exec(foo)`, where looking at the previous token
+// does not help.
+
+pp.parseStatement = function(declaration, topLevel) {
+ let starttype = this.type, node = this.startNode(), kind
+
+ if (this.isLet()) {
+ starttype = tt._var
+ kind = "let"
+ }
+
+ // Most types of statements are recognized by the keyword they
+ // start with. Many are trivial to parse, some require a bit of
+ // complexity.
+
+ switch (starttype) {
+ case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword)
+ case tt._debugger: return this.parseDebuggerStatement(node)
+ case tt._do: return this.parseDoStatement(node)
+ case tt._for: return this.parseForStatement(node)
+ case tt._function:
+ if (!declaration && this.options.ecmaVersion >= 6) this.unexpected()
+ return this.parseFunctionStatement(node)
+ case tt._class:
+ if (!declaration) this.unexpected()
+ return this.parseClass(node, true)
+ case tt._if: return this.parseIfStatement(node)
+ case tt._return: return this.parseReturnStatement(node)
+ case tt._switch: return this.parseSwitchStatement(node)
+ case tt._throw: return this.parseThrowStatement(node)
+ case tt._try: return this.parseTryStatement(node)
+ case tt._const: case tt._var:
+ kind = kind || this.value
+ if (!declaration && kind != "var") this.unexpected()
+ return this.parseVarStatement(node, kind)
+ case tt._while: return this.parseWhileStatement(node)
+ case tt._with: return this.parseWithStatement(node)
+ case tt.braceL: return this.parseBlock()
+ case tt.semi: return this.parseEmptyStatement(node)
+ case tt._export:
+ case tt._import:
+ if (!this.options.allowImportExportEverywhere) {
+ if (!topLevel)
+ this.raise(this.start, "'import' and 'export' may only appear at the top level")
+ if (!this.inModule)
+ this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")
+ }
+ return starttype === tt._import ? this.parseImport(node) : this.parseExport(node)
+
+ // If the statement does not start with a statement keyword or a
+ // brace, it's an ExpressionStatement or LabeledStatement. We
+ // simply start parsing an expression, and afterwards, if the
+ // next token is a colon and the expression was a simple
+ // Identifier node, we switch to interpreting it as a label.
+ default:
+ let maybeName = this.value, expr = this.parseExpression()
+ if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon))
+ return this.parseLabeledStatement(node, maybeName, expr)
+ else return this.parseExpressionStatement(node, expr)
+ }
+}
+
+pp.parseBreakContinueStatement = function(node, keyword) {
+ let isBreak = keyword == "break"
+ this.next()
+ if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null
+ else if (this.type !== tt.name) this.unexpected()
+ else {
+ node.label = this.parseIdent()
+ this.semicolon()
+ }
+
+ // Verify that there is an actual destination to break or
+ // continue to.
+ for (var i = 0; i < this.labels.length; ++i) {
+ let lab = this.labels[i]
+ if (node.label == null || lab.name === node.label.name) {
+ if (lab.kind != null && (isBreak || lab.kind === "loop")) break
+ if (node.label && isBreak) break
+ }
+ }
+ if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword)
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
+}
+
+pp.parseDebuggerStatement = function(node) {
+ this.next()
+ this.semicolon()
+ return this.finishNode(node, "DebuggerStatement")
+}
+
+pp.parseDoStatement = function(node) {
+ this.next()
+ this.labels.push(loopLabel)
+ node.body = this.parseStatement(false)
+ this.labels.pop()
+ this.expect(tt._while)
+ node.test = this.parseParenExpression()
+ if (this.options.ecmaVersion >= 6)
+ this.eat(tt.semi)
+ else
+ this.semicolon()
+ return this.finishNode(node, "DoWhileStatement")
+}
+
+// Disambiguating between a `for` and a `for`/`in` or `for`/`of`
+// loop is non-trivial. Basically, we have to parse the init `var`
+// statement or expression, disallowing the `in` operator (see
+// the second parameter to `parseExpression`), and then check
+// whether the next token is `in` or `of`. When there is no init
+// part (semicolon immediately after the opening parenthesis), it
+// is a regular `for` loop.
+
+pp.parseForStatement = function(node) {
+ this.next()
+ this.labels.push(loopLabel)
+ this.expect(tt.parenL)
+ if (this.type === tt.semi) return this.parseFor(node, null)
+ let isLet = this.isLet()
+ if (this.type === tt._var || this.type === tt._const || isLet) {
+ let init = this.startNode(), kind = isLet ? "let" : this.value
+ this.next()
+ this.parseVar(init, true, kind)
+ this.finishNode(init, "VariableDeclaration")
+ if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init.declarations.length === 1 &&
+ !(kind !== "var" && init.declarations[0].init))
+ return this.parseForIn(node, init)
+ return this.parseFor(node, init)
+ }
+ let refDestructuringErrors = new DestructuringErrors
+ let init = this.parseExpression(true, refDestructuringErrors)
+ if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
+ this.checkPatternErrors(refDestructuringErrors, true)
+ this.toAssignable(init)
+ this.checkLVal(init)
+ return this.parseForIn(node, init)
+ } else {
+ this.checkExpressionErrors(refDestructuringErrors, true)
+ }
+ return this.parseFor(node, init)
+}
+
+pp.parseFunctionStatement = function(node) {
+ this.next()
+ return this.parseFunction(node, true)
+}
+
+pp.parseIfStatement = function(node) {
+ this.next()
+ node.test = this.parseParenExpression()
+ node.consequent = this.parseStatement(false)
+ node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null
+ return this.finishNode(node, "IfStatement")
+}
+
+pp.parseReturnStatement = function(node) {
+ if (!this.inFunction && !this.options.allowReturnOutsideFunction)
+ this.raise(this.start, "'return' outside of function")
+ this.next()
+
+ // In `return` (and `break`/`continue`), the keywords with
+ // optional arguments, we eagerly look for a semicolon or the
+ // possibility to insert one.
+
+ if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null
+ else { node.argument = this.parseExpression(); this.semicolon() }
+ return this.finishNode(node, "ReturnStatement")
+}
+
+pp.parseSwitchStatement = function(node) {
+ this.next()
+ node.discriminant = this.parseParenExpression()
+ node.cases = []
+ this.expect(tt.braceL)
+ this.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.
+
+ for (var cur, sawDefault = false; this.type != tt.braceR;) {
+ if (this.type === tt._case || this.type === tt._default) {
+ let isCase = this.type === tt._case
+ if (cur) this.finishNode(cur, "SwitchCase")
+ node.cases.push(cur = this.startNode())
+ cur.consequent = []
+ this.next()
+ if (isCase) {
+ cur.test = this.parseExpression()
+ } else {
+ if (sawDefault) this.raiseRecoverable(this.lastTokStart, "Multiple default clauses")
+ sawDefault = true
+ cur.test = null
+ }
+ this.expect(tt.colon)
+ } else {
+ if (!cur) this.unexpected()
+ cur.consequent.push(this.parseStatement(true))
+ }
+ }
+ if (cur) this.finishNode(cur, "SwitchCase")
+ this.next() // Closing brace
+ this.labels.pop()
+ return this.finishNode(node, "SwitchStatement")
+}
+
+pp.parseThrowStatement = function(node) {
+ this.next()
+ if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start)))
+ this.raise(this.lastTokEnd, "Illegal newline after throw")
+ node.argument = this.parseExpression()
+ this.semicolon()
+ return this.finishNode(node, "ThrowStatement")
+}
+
+// Reused empty array added for node fields that are always empty.
+
+const empty = []
+
+pp.parseTryStatement = function(node) {
+ this.next()
+ node.block = this.parseBlock()
+ node.handler = null
+ if (this.type === tt._catch) {
+ let clause = this.startNode()
+ this.next()
+ this.expect(tt.parenL)
+ clause.param = this.parseBindingAtom()
+ this.checkLVal(clause.param, true)
+ this.expect(tt.parenR)
+ clause.body = this.parseBlock()
+ node.handler = this.finishNode(clause, "CatchClause")
+ }
+ node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null
+ if (!node.handler && !node.finalizer)
+ this.raise(node.start, "Missing catch or finally clause")
+ return this.finishNode(node, "TryStatement")
+}
+
+pp.parseVarStatement = function(node, kind) {
+ this.next()
+ this.parseVar(node, false, kind)
+ this.semicolon()
+ return this.finishNode(node, "VariableDeclaration")
+}
+
+pp.parseWhileStatement = function(node) {
+ this.next()
+ node.test = this.parseParenExpression()
+ this.labels.push(loopLabel)
+ node.body = this.parseStatement(false)
+ this.labels.pop()
+ return this.finishNode(node, "WhileStatement")
+}
+
+pp.parseWithStatement = function(node) {
+ if (this.strict) this.raise(this.start, "'with' in strict mode")
+ this.next()
+ node.object = this.parseParenExpression()
+ node.body = this.parseStatement(false)
+ return this.finishNode(node, "WithStatement")
+}
+
+pp.parseEmptyStatement = function(node) {
+ this.next()
+ return this.finishNode(node, "EmptyStatement")
+}
+
+pp.parseLabeledStatement = function(node, maybeName, expr) {
+ for (let i = 0; i < this.labels.length; ++i)
+ if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared")
+ let kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null
+ for (let i = this.labels.length - 1; i >= 0; i--) {
+ let label = this.labels[i]
+ if (label.statementStart == node.start) {
+ label.statementStart = this.start
+ label.kind = kind
+ } else break
+ }
+ this.labels.push({name: maybeName, kind: kind, statementStart: this.start})
+ node.body = this.parseStatement(true)
+ this.labels.pop()
+ node.label = expr
+ return this.finishNode(node, "LabeledStatement")
+}
+
+pp.parseExpressionStatement = function(node, expr) {
+ node.expression = expr
+ this.semicolon()
+ return this.finishNode(node, "ExpressionStatement")
+}
+
+// Parse a semicolon-enclosed block of statements, handling `"use
+// strict"` declarations when `allowStrict` is true (used for
+// function bodies).
+
+pp.parseBlock = function(allowStrict) {
+ let node = this.startNode(), first = true, oldStrict
+ node.body = []
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ let stmt = this.parseStatement(true)
+ node.body.push(stmt)
+ if (first && allowStrict && this.isUseStrict(stmt)) {
+ oldStrict = this.strict
+ this.setStrict(this.strict = true)
+ }
+ first = false
+ }
+ if (oldStrict === false) this.setStrict(false)
+ return this.finishNode(node, "BlockStatement")
+}
+
+// Parse a regular `for` loop. The disambiguation code in
+// `parseStatement` will already have parsed the init statement or
+// expression.
+
+pp.parseFor = function(node, init) {
+ node.init = init
+ this.expect(tt.semi)
+ node.test = this.type === tt.semi ? null : this.parseExpression()
+ this.expect(tt.semi)
+ node.update = this.type === tt.parenR ? null : this.parseExpression()
+ this.expect(tt.parenR)
+ node.body = this.parseStatement(false)
+ this.labels.pop()
+ return this.finishNode(node, "ForStatement")
+}
+
+// Parse a `for`/`in` and `for`/`of` loop, which are almost
+// same from parser's perspective.
+
+pp.parseForIn = function(node, init) {
+ let type = this.type === tt._in ? "ForInStatement" : "ForOfStatement"
+ this.next()
+ node.left = init
+ node.right = this.parseExpression()
+ this.expect(tt.parenR)
+ node.body = this.parseStatement(false)
+ this.labels.pop()
+ return this.finishNode(node, type)
+}
+
+// Parse a list of variable declarations.
+
+pp.parseVar = function(node, isFor, kind) {
+ node.declarations = []
+ node.kind = kind
+ for (;;) {
+ let decl = this.startNode()
+ this.parseVarId(decl)
+ if (this.eat(tt.eq)) {
+ decl.init = this.parseMaybeAssign(isFor)
+ } else if (kind === "const" && !(this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) {
+ this.unexpected()
+ } else if (decl.id.type != "Identifier" && !(isFor && (this.type === tt._in || this.isContextual("of")))) {
+ this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value")
+ } else {
+ decl.init = null
+ }
+ node.declarations.push(this.finishNode(decl, "VariableDeclarator"))
+ if (!this.eat(tt.comma)) break
+ }
+ return node
+}
+
+pp.parseVarId = function(decl) {
+ decl.id = this.parseBindingAtom()
+ this.checkLVal(decl.id, true)
+}
+
+// Parse a function declaration or literal (depending on the
+// `isStatement` parameter).
+
+pp.parseFunction = function(node, isStatement, allowExpressionBody) {
+ this.initFunction(node)
+ if (this.options.ecmaVersion >= 6)
+ node.generator = this.eat(tt.star)
+ var oldInGen = this.inGenerator
+ this.inGenerator = node.generator
+ if (isStatement || this.type === tt.name)
+ node.id = this.parseIdent()
+ this.parseFunctionParams(node)
+ this.parseFunctionBody(node, allowExpressionBody)
+ this.inGenerator = oldInGen
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
+}
+
+pp.parseFunctionParams = function(node) {
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.parenR, false, false, true)
+}
+
+// Parse a class declaration or literal (depending on the
+// `isStatement` parameter).
+
+pp.parseClass = function(node, isStatement) {
+ this.next()
+ this.parseClassId(node, isStatement)
+ this.parseClassSuper(node)
+ let classBody = this.startNode()
+ let hadConstructor = false
+ classBody.body = []
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ if (this.eat(tt.semi)) continue
+ let method = this.startNode()
+ let isGenerator = this.eat(tt.star)
+ let isMaybeStatic = this.type === tt.name && this.value === "static"
+ this.parsePropertyName(method)
+ method.static = isMaybeStatic && this.type !== tt.parenL
+ if (method.static) {
+ if (isGenerator) this.unexpected()
+ isGenerator = this.eat(tt.star)
+ this.parsePropertyName(method)
+ }
+ method.kind = "method"
+ let isGetSet = false
+ if (!method.computed) {
+ let {key} = method
+ if (!isGenerator && key.type === "Identifier" && this.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
+ isGetSet = true
+ method.kind = key.name
+ key = this.parsePropertyName(method)
+ }
+ if (!method.static && (key.type === "Identifier" && key.name === "constructor" ||
+ key.type === "Literal" && key.value === "constructor")) {
+ if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class")
+ if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier")
+ if (isGenerator) this.raise(key.start, "Constructor can't be a generator")
+ method.kind = "constructor"
+ hadConstructor = true
+ }
+ }
+ this.parseClassMethod(classBody, method, isGenerator)
+ if (isGetSet) {
+ let paramCount = method.kind === "get" ? 0 : 1
+ if (method.value.params.length !== paramCount) {
+ let start = method.value.start
+ if (method.kind === "get")
+ this.raiseRecoverable(start, "getter should have no params")
+ else
+ this.raiseRecoverable(start, "setter should have exactly one param")
+ }
+ if (method.kind === "set" && method.value.params[0].type === "RestElement")
+ this.raise(method.value.params[0].start, "Setter cannot use rest params")
+ }
+ }
+ node.body = this.finishNode(classBody, "ClassBody")
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
+}
+
+pp.parseClassMethod = function(classBody, method, isGenerator) {
+ method.value = this.parseMethod(isGenerator)
+ classBody.body.push(this.finishNode(method, "MethodDefinition"))
+}
+
+pp.parseClassId = function(node, isStatement) {
+ node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null
+}
+
+pp.parseClassSuper = function(node) {
+ node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null
+}
+
+// Parses module export declaration.
+
+pp.parseExport = function(node) {
+ this.next()
+ // export * from '...'
+ if (this.eat(tt.star)) {
+ this.expectContextual("from")
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
+ this.semicolon()
+ return this.finishNode(node, "ExportAllDeclaration")
+ }
+ if (this.eat(tt._default)) { // export default ...
+ let parens = this.type == tt.parenL
+ let expr = this.parseMaybeAssign()
+ let needsSemi = true
+ if (!parens && (expr.type == "FunctionExpression" ||
+ expr.type == "ClassExpression")) {
+ needsSemi = false
+ if (expr.id) {
+ expr.type = expr.type == "FunctionExpression"
+ ? "FunctionDeclaration"
+ : "ClassDeclaration"
+ }
+ }
+ node.declaration = expr
+ if (needsSemi) this.semicolon()
+ return this.finishNode(node, "ExportDefaultDeclaration")
+ }
+ // export var|const|let|function|class ...
+ if (this.shouldParseExportStatement()) {
+ node.declaration = this.parseStatement(true)
+ node.specifiers = []
+ node.source = null
+ } else { // export { x, y as z } [from '...']
+ node.declaration = null
+ node.specifiers = this.parseExportSpecifiers()
+ if (this.eatContextual("from")) {
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
+ } else {
+ // check for keywords used as local names
+ for (let i = 0; i < node.specifiers.length; i++) {
+ if (this.keywords.test(node.specifiers[i].local.name) || this.reservedWords.test(node.specifiers[i].local.name)) {
+ this.unexpected(node.specifiers[i].local.start)
+ }
+ }
+
+ node.source = null
+ }
+ this.semicolon()
+ }
+ return this.finishNode(node, "ExportNamedDeclaration")
+}
+
+pp.shouldParseExportStatement = function() {
+ return this.type.keyword || this.isLet()
+}
+
+// Parses a comma-separated list of module exports.
+
+pp.parseExportSpecifiers = function() {
+ let nodes = [], first = true
+ // export { x, y as z } [from '...']
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this.expect(tt.comma)
+ if (this.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ let node = this.startNode()
+ node.local = this.parseIdent(this.type === tt._default)
+ node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local
+ nodes.push(this.finishNode(node, "ExportSpecifier"))
+ }
+ return nodes
+}
+
+// Parses import declaration.
+
+pp.parseImport = function(node) {
+ this.next()
+ // import '...'
+ if (this.type === tt.string) {
+ node.specifiers = empty
+ node.source = this.parseExprAtom()
+ } else {
+ node.specifiers = this.parseImportSpecifiers()
+ this.expectContextual("from")
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
+ }
+ this.semicolon()
+ return this.finishNode(node, "ImportDeclaration")
+}
+
+// Parses a comma-separated list of module imports.
+
+pp.parseImportSpecifiers = function() {
+ let nodes = [], first = true
+ if (this.type === tt.name) {
+ // import defaultObj, { x, y as z } from '...'
+ let node = this.startNode()
+ node.local = this.parseIdent()
+ this.checkLVal(node.local, true)
+ nodes.push(this.finishNode(node, "ImportDefaultSpecifier"))
+ if (!this.eat(tt.comma)) return nodes
+ }
+ if (this.type === tt.star) {
+ let node = this.startNode()
+ this.next()
+ this.expectContextual("as")
+ node.local = this.parseIdent()
+ this.checkLVal(node.local, true)
+ nodes.push(this.finishNode(node, "ImportNamespaceSpecifier"))
+ return nodes
+ }
+ this.expect(tt.braceL)
+ while (!this.eat(tt.braceR)) {
+ if (!first) {
+ this.expect(tt.comma)
+ if (this.afterTrailingComma(tt.braceR)) break
+ } else first = false
+
+ let node = this.startNode()
+ node.imported = this.parseIdent(true)
+ if (this.eatContextual("as")) {
+ node.local = this.parseIdent()
+ } else {
+ node.local = node.imported
+ if (this.isKeyword(node.local.name)) this.unexpected(node.local.start)
+ if (this.reservedWordsStrict.test(node.local.name)) this.raise(node.local.start, "The keyword '" + node.local.name + "' is reserved")
+ }
+ this.checkLVal(node.local, true)
+ nodes.push(this.finishNode(node, "ImportSpecifier"))
+ }
+ return nodes
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokencontext.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokencontext.js
new file mode 100644
index 0000000000..911a51563d
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokencontext.js
@@ -0,0 +1,110 @@
+// 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
+
+import {Parser} from "./state"
+import {types as tt} from "./tokentype"
+import {lineBreak} from "./whitespace"
+
+export class TokContext {
+ constructor(token, isExpr, preserveSpace, override) {
+ this.token = token
+ this.isExpr = !!isExpr
+ this.preserveSpace = !!preserveSpace
+ this.override = override
+ }
+}
+
+export const types = {
+ b_stat: new TokContext("{", false),
+ b_expr: new TokContext("{", true),
+ b_tmpl: new TokContext("${", true),
+ p_stat: new TokContext("(", false),
+ p_expr: new TokContext("(", true),
+ q_tmpl: new TokContext("`", true, true, p => p.readTmplToken()),
+ f_expr: new TokContext("function", true)
+}
+
+const pp = Parser.prototype
+
+pp.initialContext = function() {
+ return [types.b_stat]
+}
+
+pp.braceIsBlock = function(prevType) {
+ if (prevType === tt.colon) {
+ let parent = this.curContext()
+ if (parent === types.b_stat || parent === types.b_expr)
+ return !parent.isExpr
+ }
+ if (prevType === tt._return)
+ return lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
+ if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof || prevType === tt.parenR)
+ return true
+ if (prevType == tt.braceL)
+ return this.curContext() === types.b_stat
+ return !this.exprAllowed
+}
+
+pp.updateContext = function(prevType) {
+ let update, type = this.type
+ if (type.keyword && prevType == tt.dot)
+ this.exprAllowed = false
+ else if (update = type.updateContext)
+ update.call(this, prevType)
+ else
+ this.exprAllowed = type.beforeExpr
+}
+
+// Token-specific context update code
+
+tt.parenR.updateContext = tt.braceR.updateContext = function() {
+ if (this.context.length == 1) {
+ this.exprAllowed = true
+ return
+ }
+ let out = this.context.pop()
+ if (out === types.b_stat && this.curContext() === types.f_expr) {
+ this.context.pop()
+ this.exprAllowed = false
+ } else if (out === types.b_tmpl) {
+ this.exprAllowed = true
+ } else {
+ this.exprAllowed = !out.isExpr
+ }
+}
+
+tt.braceL.updateContext = function(prevType) {
+ this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr)
+ this.exprAllowed = true
+}
+
+tt.dollarBraceL.updateContext = function() {
+ this.context.push(types.b_tmpl)
+ this.exprAllowed = true
+}
+
+tt.parenL.updateContext = function(prevType) {
+ let statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while
+ this.context.push(statementParens ? types.p_stat : types.p_expr)
+ this.exprAllowed = true
+}
+
+tt.incDec.updateContext = function() {
+ // tokExprAllowed stays unchanged
+}
+
+tt._function.updateContext = function(prevType) {
+ if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else &&
+ !((prevType === tt.colon || prevType === tt.braceL) && this.curContext() === types.b_stat))
+ this.context.push(types.f_expr)
+ this.exprAllowed = false
+}
+
+tt.backQuote.updateContext = function() {
+ if (this.curContext() === types.q_tmpl)
+ this.context.pop()
+ else
+ this.context.push(types.q_tmpl)
+ this.exprAllowed = false
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokenize.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokenize.js
new file mode 100644
index 0000000000..ed97d19fb6
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokenize.js
@@ -0,0 +1,696 @@
+import {isIdentifierStart, isIdentifierChar} from "./identifier"
+import {types as tt, keywords as keywordTypes} from "./tokentype"
+import {Parser} from "./state"
+import {SourceLocation} from "./locutil"
+import {lineBreak, lineBreakG, isNewLine, nonASCIIwhitespace} from "./whitespace"
+
+// 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.
+
+export class Token {
+ constructor(p) {
+ this.type = p.type
+ this.value = p.value
+ this.start = p.start
+ this.end = p.end
+ if (p.options.locations)
+ this.loc = new SourceLocation(p, p.startLoc, p.endLoc)
+ if (p.options.ranges)
+ this.range = [p.start, p.end]
+ }
+}
+
+// ## Tokenizer
+
+const pp = Parser.prototype
+
+// Are we running under Rhino?
+const isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]"
+
+// Move to the next token
+
+pp.next = function() {
+ if (this.options.onToken)
+ this.options.onToken(new Token(this))
+
+ this.lastTokEnd = this.end
+ this.lastTokStart = this.start
+ this.lastTokEndLoc = this.endLoc
+ this.lastTokStartLoc = this.startLoc
+ this.nextToken()
+}
+
+pp.getToken = function() {
+ this.next()
+ return new Token(this)
+}
+
+// If we're in an ES6 environment, make parsers iterable
+if (typeof Symbol !== "undefined")
+ pp[Symbol.iterator] = function () {
+ let self = this
+ return {next: function () {
+ let token = self.getToken()
+ return {
+ done: token.type === tt.eof,
+ value: token
+ }
+ }}
+ }
+
+// Toggle strict mode. Re-reads the next number or string to please
+// pedantic tests (`"use strict"; 010;` should fail).
+
+pp.setStrict = function(strict) {
+ this.strict = strict
+ if (this.type !== tt.num && this.type !== tt.string) return
+ this.pos = this.start
+ if (this.options.locations) {
+ while (this.pos < this.lineStart) {
+ this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1
+ --this.curLine
+ }
+ }
+ this.nextToken()
+}
+
+pp.curContext = function() {
+ return this.context[this.context.length - 1]
+}
+
+// Read a single token, updating the parser object's token-related
+// properties.
+
+pp.nextToken = function() {
+ let curContext = this.curContext()
+ if (!curContext || !curContext.preserveSpace) this.skipSpace()
+
+ this.start = this.pos
+ if (this.options.locations) this.startLoc = this.curPosition()
+ if (this.pos >= this.input.length) return this.finishToken(tt.eof)
+
+ if (curContext.override) return curContext.override(this)
+ else this.readToken(this.fullCharCodeAtPos())
+}
+
+pp.readToken = function(code) {
+ // Identifier or keyword. '\uXXXX' sequences are allowed in
+ // identifiers, so '\' also dispatches to that.
+ if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */)
+ return this.readWord()
+
+ return this.getTokenFromCode(code)
+}
+
+pp.fullCharCodeAtPos = function() {
+ let code = this.input.charCodeAt(this.pos)
+ if (code <= 0xd7ff || code >= 0xe000) return code
+ let next = this.input.charCodeAt(this.pos + 1)
+ return (code << 10) + next - 0x35fdc00
+}
+
+pp.skipBlockComment = function() {
+ let startLoc = this.options.onComment && this.curPosition()
+ let start = this.pos, end = this.input.indexOf("*/", this.pos += 2)
+ if (end === -1) this.raise(this.pos - 2, "Unterminated comment")
+ this.pos = end + 2
+ if (this.options.locations) {
+ lineBreakG.lastIndex = start
+ let match
+ while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
+ ++this.curLine
+ this.lineStart = match.index + match[0].length
+ }
+ }
+ if (this.options.onComment)
+ this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos,
+ startLoc, this.curPosition())
+}
+
+pp.skipLineComment = function(startSkip) {
+ let start = this.pos
+ let startLoc = this.options.onComment && this.curPosition()
+ let ch = this.input.charCodeAt(this.pos+=startSkip)
+ while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
+ ++this.pos
+ ch = this.input.charCodeAt(this.pos)
+ }
+ if (this.options.onComment)
+ this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos,
+ startLoc, this.curPosition())
+}
+
+// Called at the start of the parse and after every token. Skips
+// whitespace and comments, and.
+
+pp.skipSpace = function() {
+ loop: while (this.pos < this.input.length) {
+ let ch = this.input.charCodeAt(this.pos)
+ switch (ch) {
+ case 32: case 160: // ' '
+ ++this.pos
+ break
+ case 13:
+ if (this.input.charCodeAt(this.pos + 1) === 10) {
+ ++this.pos
+ }
+ case 10: case 8232: case 8233:
+ ++this.pos
+ if (this.options.locations) {
+ ++this.curLine
+ this.lineStart = this.pos
+ }
+ break
+ case 47: // '/'
+ switch (this.input.charCodeAt(this.pos + 1)) {
+ case 42: // '*'
+ this.skipBlockComment()
+ break
+ case 47:
+ this.skipLineComment(2)
+ break
+ default:
+ break loop
+ }
+ break
+ default:
+ if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
+ ++this.pos
+ } else {
+ break loop
+ }
+ }
+ }
+}
+
+// Called at the end of every token. Sets `end`, `val`, and
+// maintains `context` and `exprAllowed`, and skips the space after
+// the token, so that the next one's `start` will point at the
+// right position.
+
+pp.finishToken = function(type, val) {
+ this.end = this.pos
+ if (this.options.locations) this.endLoc = this.curPosition()
+ let prevType = this.type
+ this.type = type
+ this.value = val
+
+ this.updateContext(prevType)
+}
+
+// ### Token reading
+
+// This is the function that is called to fetch the next token. It
+// is somewhat obscure, because it works in character codes rather
+// than characters, and because operator parsing has been inlined
+// into it.
+//
+// All in the name of speed.
+//
+pp.readToken_dot = function() {
+ let next = this.input.charCodeAt(this.pos + 1)
+ if (next >= 48 && next <= 57) return this.readNumber(true)
+ let next2 = this.input.charCodeAt(this.pos + 2)
+ if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.'
+ this.pos += 3
+ return this.finishToken(tt.ellipsis)
+ } else {
+ ++this.pos
+ return this.finishToken(tt.dot)
+ }
+}
+
+pp.readToken_slash = function() { // '/'
+ let next = this.input.charCodeAt(this.pos + 1)
+ if (this.exprAllowed) {++this.pos; return this.readRegexp()}
+ if (next === 61) return this.finishOp(tt.assign, 2)
+ return this.finishOp(tt.slash, 1)
+}
+
+pp.readToken_mult_modulo_exp = function(code) { // '%*'
+ let next = this.input.charCodeAt(this.pos + 1)
+ let size = 1
+ let tokentype = code === 42 ? tt.star : tt.modulo
+
+ // exponentiation operator ** and **=
+ if (this.options.ecmaVersion >= 7 && next === 42) {
+ ++size
+ tokentype = tt.starstar
+ next = this.input.charCodeAt(this.pos + 2)
+ }
+
+ if (next === 61) return this.finishOp(tt.assign, size + 1)
+ return this.finishOp(tokentype, size)
+}
+
+pp.readToken_pipe_amp = function(code) { // '|&'
+ let next = this.input.charCodeAt(this.pos + 1)
+ if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2)
+ if (next === 61) return this.finishOp(tt.assign, 2)
+ return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1)
+}
+
+pp.readToken_caret = function() { // '^'
+ let next = this.input.charCodeAt(this.pos + 1)
+ if (next === 61) return this.finishOp(tt.assign, 2)
+ return this.finishOp(tt.bitwiseXOR, 1)
+}
+
+pp.readToken_plus_min = function(code) { // '+-'
+ let next = this.input.charCodeAt(this.pos + 1)
+ if (next === code) {
+ if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 &&
+ lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) {
+ // A `-->` line comment
+ this.skipLineComment(3)
+ this.skipSpace()
+ return this.nextToken()
+ }
+ return this.finishOp(tt.incDec, 2)
+ }
+ if (next === 61) return this.finishOp(tt.assign, 2)
+ return this.finishOp(tt.plusMin, 1)
+}
+
+pp.readToken_lt_gt = function(code) { // '<>'
+ let next = this.input.charCodeAt(this.pos + 1)
+ let size = 1
+ if (next === code) {
+ size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2
+ if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)
+ return this.finishOp(tt.bitShift, size)
+ }
+ if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 &&
+ this.input.charCodeAt(this.pos + 3) == 45) {
+ if (this.inModule) this.unexpected()
+ // `<!--`, an XML-style comment that should be interpreted as a line comment
+ this.skipLineComment(4)
+ this.skipSpace()
+ return this.nextToken()
+ }
+ if (next === 61) size = 2
+ return this.finishOp(tt.relational, size)
+}
+
+pp.readToken_eq_excl = function(code) { // '=!'
+ let next = this.input.charCodeAt(this.pos + 1)
+ if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2)
+ if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>'
+ this.pos += 2
+ return this.finishToken(tt.arrow)
+ }
+ return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1)
+}
+
+pp.getTokenFromCode = function(code) {
+ switch (code) {
+ // The interpretation of a dot depends on whether it is followed
+ // by a digit or another two dots.
+ case 46: // '.'
+ return this.readToken_dot()
+
+ // Punctuation tokens.
+ case 40: ++this.pos; return this.finishToken(tt.parenL)
+ case 41: ++this.pos; return this.finishToken(tt.parenR)
+ case 59: ++this.pos; return this.finishToken(tt.semi)
+ case 44: ++this.pos; return this.finishToken(tt.comma)
+ case 91: ++this.pos; return this.finishToken(tt.bracketL)
+ case 93: ++this.pos; return this.finishToken(tt.bracketR)
+ case 123: ++this.pos; return this.finishToken(tt.braceL)
+ case 125: ++this.pos; return this.finishToken(tt.braceR)
+ case 58: ++this.pos; return this.finishToken(tt.colon)
+ case 63: ++this.pos; return this.finishToken(tt.question)
+
+ case 96: // '`'
+ if (this.options.ecmaVersion < 6) break
+ ++this.pos
+ return this.finishToken(tt.backQuote)
+
+ case 48: // '0'
+ let next = this.input.charCodeAt(this.pos + 1)
+ if (next === 120 || next === 88) return this.readRadixNumber(16) // '0x', '0X' - hex number
+ if (this.options.ecmaVersion >= 6) {
+ if (next === 111 || next === 79) return this.readRadixNumber(8) // '0o', '0O' - octal number
+ if (next === 98 || next === 66) return this.readRadixNumber(2) // '0b', '0B' - binary number
+ }
+ // 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: // 1-9
+ return this.readNumber(false)
+
+ // Quotes produce strings.
+ case 34: case 39: // '"', "'"
+ return this.readString(code)
+
+ // Operators are parsed inline in tiny state machines. '=' (61) 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: // '/'
+ return this.readToken_slash()
+
+ case 37: case 42: // '%*'
+ return this.readToken_mult_modulo_exp(code)
+
+ case 124: case 38: // '|&'
+ return this.readToken_pipe_amp(code)
+
+ case 94: // '^'
+ return this.readToken_caret()
+
+ case 43: case 45: // '+-'
+ return this.readToken_plus_min(code)
+
+ case 60: case 62: // '<>'
+ return this.readToken_lt_gt(code)
+
+ case 61: case 33: // '=!'
+ return this.readToken_eq_excl(code)
+
+ case 126: // '~'
+ return this.finishOp(tt.prefix, 1)
+ }
+
+ this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'")
+}
+
+pp.finishOp = function(type, size) {
+ let str = this.input.slice(this.pos, this.pos + size)
+ this.pos += size
+ return this.finishToken(type, str)
+}
+
+// Parse a regular expression. Some context-awareness is necessary,
+// since a '/' inside a '[]' set does not end the expression.
+
+function tryCreateRegexp(src, flags, throwErrorAt, parser) {
+ try {
+ return new RegExp(src, flags)
+ } catch (e) {
+ if (throwErrorAt !== undefined) {
+ if (e instanceof SyntaxError) parser.raise(throwErrorAt, "Error parsing regular expression: " + e.message)
+ throw e
+ }
+ }
+}
+
+var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u")
+
+pp.readRegexp = function() {
+ let escaped, inClass, start = this.pos
+ for (;;) {
+ if (this.pos >= this.input.length) this.raise(start, "Unterminated regular expression")
+ let ch = this.input.charAt(this.pos)
+ if (lineBreak.test(ch)) this.raise(start, "Unterminated regular expression")
+ if (!escaped) {
+ if (ch === "[") inClass = true
+ else if (ch === "]" && inClass) inClass = false
+ else if (ch === "/" && !inClass) break
+ escaped = ch === "\\"
+ } else escaped = false
+ ++this.pos
+ }
+ let content = this.input.slice(start, this.pos)
+ ++this.pos
+ // Need to use `readWord1` because '\uXXXX' sequences are allowed
+ // here (don't ask).
+ let mods = this.readWord1()
+ let tmp = content, tmpFlags = ""
+ if (mods) {
+ let validFlags = /^[gim]*$/
+ if (this.options.ecmaVersion >= 6) validFlags = /^[gimuy]*$/
+ if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag")
+ if (mods.indexOf("u") >= 0) {
+ if (regexpUnicodeSupport) {
+ tmpFlags = "u"
+ } else {
+ // Replace each astral symbol and every Unicode escape sequence that
+ // possibly represents an astral symbol or a paired surrogate with a
+ // single ASCII symbol to avoid throwing on regular expressions that
+ // are only valid in combination with the `/u` flag.
+ // Note: replacing with the ASCII symbol `x` might cause false
+ // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
+ // perfectly valid pattern that is equivalent to `[a-b]`, but it would
+ // be replaced by `[x-b]` which throws an error.
+ tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, (_match, code, offset) => {
+ code = Number("0x" + code)
+ if (code > 0x10FFFF) this.raise(start + offset + 3, "Code point out of bounds")
+ return "x"
+ })
+ tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x")
+ tmpFlags = tmpFlags.replace("u", "")
+ }
+ }
+ }
+ // Detect invalid regular expressions.
+ let value = null
+ // Rhino's regular expression parser is flaky and throws uncatchable exceptions,
+ // so don't do detection if we are running under Rhino
+ if (!isRhino) {
+ tryCreateRegexp(tmp, tmpFlags, start, this)
+ // Get a regular expression object for this pattern-flag pair, or `null` in
+ // case the current environment doesn't support the flags it uses.
+ value = tryCreateRegexp(content, mods)
+ }
+ return this.finishToken(tt.regexp, {pattern: content, flags: mods, value: value})
+}
+
+// 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.
+
+pp.readInt = function(radix, len) {
+ let start = this.pos, total = 0
+ for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
+ let code = this.input.charCodeAt(this.pos), val
+ if (code >= 97) val = code - 97 + 10 // a
+ else if (code >= 65) val = code - 65 + 10 // A
+ else if (code >= 48 && code <= 57) val = code - 48 // 0-9
+ else val = Infinity
+ if (val >= radix) break
+ ++this.pos
+ total = total * radix + val
+ }
+ if (this.pos === start || len != null && this.pos - start !== len) return null
+
+ return total
+}
+
+pp.readRadixNumber = function(radix) {
+ this.pos += 2 // 0x
+ let val = this.readInt(radix)
+ if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix)
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
+ return this.finishToken(tt.num, val)
+}
+
+// Read an integer, octal integer, or floating-point number.
+
+pp.readNumber = function(startsWithDot) {
+ let start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48
+ if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number")
+ let next = this.input.charCodeAt(this.pos)
+ if (next === 46) { // '.'
+ ++this.pos
+ this.readInt(10)
+ isFloat = true
+ next = this.input.charCodeAt(this.pos)
+ }
+ if (next === 69 || next === 101) { // 'eE'
+ next = this.input.charCodeAt(++this.pos)
+ if (next === 43 || next === 45) ++this.pos // '+-'
+ if (this.readInt(10) === null) this.raise(start, "Invalid number")
+ isFloat = true
+ }
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
+
+ let str = this.input.slice(start, this.pos), val
+ if (isFloat) val = parseFloat(str)
+ else if (!octal || str.length === 1) val = parseInt(str, 10)
+ else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number")
+ else val = parseInt(str, 8)
+ return this.finishToken(tt.num, val)
+}
+
+// Read a string value, interpreting backslash-escapes.
+
+pp.readCodePoint = function() {
+ let ch = this.input.charCodeAt(this.pos), code
+
+ if (ch === 123) {
+ if (this.options.ecmaVersion < 6) this.unexpected()
+ let codePos = ++this.pos
+ code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos)
+ ++this.pos
+ if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds")
+ } else {
+ code = this.readHexChar(4)
+ }
+ return code
+}
+
+function codePointToString(code) {
+ // UTF-16 Decoding
+ if (code <= 0xFFFF) return String.fromCharCode(code)
+ code -= 0x10000
+ return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
+}
+
+pp.readString = function(quote) {
+ let out = "", chunkStart = ++this.pos
+ for (;;) {
+ if (this.pos >= this.input.length) this.raise(this.start, "Unterminated string constant")
+ let ch = this.input.charCodeAt(this.pos)
+ if (ch === quote) break
+ if (ch === 92) { // '\'
+ out += this.input.slice(chunkStart, this.pos)
+ out += this.readEscapedChar(false)
+ chunkStart = this.pos
+ } else {
+ if (isNewLine(ch)) this.raise(this.start, "Unterminated string constant")
+ ++this.pos
+ }
+ }
+ out += this.input.slice(chunkStart, this.pos++)
+ return this.finishToken(tt.string, out)
+}
+
+// Reads template string tokens.
+
+pp.readTmplToken = function() {
+ let out = "", chunkStart = this.pos
+ for (;;) {
+ if (this.pos >= this.input.length) this.raise(this.start, "Unterminated template")
+ let ch = this.input.charCodeAt(this.pos)
+ if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) { // '`', '${'
+ if (this.pos === this.start && this.type === tt.template) {
+ if (ch === 36) {
+ this.pos += 2
+ return this.finishToken(tt.dollarBraceL)
+ } else {
+ ++this.pos
+ return this.finishToken(tt.backQuote)
+ }
+ }
+ out += this.input.slice(chunkStart, this.pos)
+ return this.finishToken(tt.template, out)
+ }
+ if (ch === 92) { // '\'
+ out += this.input.slice(chunkStart, this.pos)
+ out += this.readEscapedChar(true)
+ chunkStart = this.pos
+ } else if (isNewLine(ch)) {
+ out += this.input.slice(chunkStart, this.pos)
+ ++this.pos
+ switch (ch) {
+ case 13:
+ if (this.input.charCodeAt(this.pos) === 10) ++this.pos
+ case 10:
+ out += "\n"
+ break
+ default:
+ out += String.fromCharCode(ch)
+ break
+ }
+ if (this.options.locations) {
+ ++this.curLine
+ this.lineStart = this.pos
+ }
+ chunkStart = this.pos
+ } else {
+ ++this.pos
+ }
+ }
+}
+
+// Used to read escaped characters
+
+pp.readEscapedChar = function(inTemplate) {
+ let ch = this.input.charCodeAt(++this.pos)
+ ++this.pos
+ switch (ch) {
+ case 110: return "\n" // 'n' -> '\n'
+ case 114: return "\r" // 'r' -> '\r'
+ case 120: return String.fromCharCode(this.readHexChar(2)) // 'x'
+ case 117: return codePointToString(this.readCodePoint()) // 'u'
+ case 116: return "\t" // 't' -> '\t'
+ case 98: return "\b" // 'b' -> '\b'
+ case 118: return "\u000b" // 'v' -> '\u000b'
+ case 102: return "\f" // 'f' -> '\f'
+ case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos // '\r\n'
+ case 10: // ' \n'
+ if (this.options.locations) { this.lineStart = this.pos; ++this.curLine }
+ return ""
+ default:
+ if (ch >= 48 && ch <= 55) {
+ let octalStr = this.input.substr(this.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 (octalStr !== "0" && (this.strict || inTemplate)) {
+ this.raise(this.pos - 2, "Octal literal in strict mode")
+ }
+ this.pos += octalStr.length - 1
+ return String.fromCharCode(octal)
+ }
+ return String.fromCharCode(ch)
+ }
+}
+
+// Used to read character escape sequences ('\x', '\u', '\U').
+
+pp.readHexChar = function(len) {
+ let codePos = this.pos
+ let n = this.readInt(16, len)
+ if (n === null) this.raise(codePos, "Bad character escape sequence")
+ return n
+}
+
+// Read an identifier, and return it as a string. Sets `this.containsEsc`
+// to whether the word contained a '\u' escape.
+//
+// Incrementally adds only escaped chars, adding other chunks as-is
+// as a micro-optimization.
+
+pp.readWord1 = function() {
+ this.containsEsc = false
+ let word = "", first = true, chunkStart = this.pos
+ let astral = this.options.ecmaVersion >= 6
+ while (this.pos < this.input.length) {
+ let ch = this.fullCharCodeAtPos()
+ if (isIdentifierChar(ch, astral)) {
+ this.pos += ch <= 0xffff ? 1 : 2
+ } else if (ch === 92) { // "\"
+ this.containsEsc = true
+ word += this.input.slice(chunkStart, this.pos)
+ let escStart = this.pos
+ if (this.input.charCodeAt(++this.pos) != 117) // "u"
+ this.raise(this.pos, "Expecting Unicode escape sequence \\uXXXX")
+ ++this.pos
+ let esc = this.readCodePoint()
+ if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral))
+ this.raise(escStart, "Invalid Unicode escape")
+ word += codePointToString(esc)
+ chunkStart = this.pos
+ } else {
+ break
+ }
+ first = false
+ }
+ return word + this.input.slice(chunkStart, this.pos)
+}
+
+// Read an identifier or keyword token. Will check for reserved
+// words when necessary.
+
+pp.readWord = function() {
+ let word = this.readWord1()
+ let type = tt.name
+ if ((this.options.ecmaVersion >= 6 || !this.containsEsc) && this.keywords.test(word))
+ type = keywordTypes[word]
+ return this.finishToken(type, word)
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokentype.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokentype.js
new file mode 100644
index 0000000000..7c36e2d49d
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokentype.js
@@ -0,0 +1,147 @@
+// ## Token types
+
+// The assignment of fine-grained, information-carrying type objects
+// allows the tokenizer to store the information it has about a
+// token in a way that is very cheap for the parser to look up.
+
+// All token type variables start with an underscore, to make them
+// easy to recognize.
+
+// The `beforeExpr` property is used to disambiguate between regular
+// expressions and divisions. It is set on all token types that can
+// be followed by an expression (thus, a slash after them would be a
+// regular expression).
+//
+// The `startsExpr` property is used to check if the token ends a
+// `yield` expression. It is set on all token types that either can
+// directly start an expression (like a quotation mark) or can
+// continue an expression (like the body of a string).
+//
+// `isLoop` marks a keyword as starting a loop, which is important
+// to know when parsing a label, in order to allow or disallow
+// continue jumps to that label.
+
+export class TokenType {
+ constructor(label, conf = {}) {
+ this.label = label
+ this.keyword = conf.keyword
+ this.beforeExpr = !!conf.beforeExpr
+ this.startsExpr = !!conf.startsExpr
+ this.isLoop = !!conf.isLoop
+ this.isAssign = !!conf.isAssign
+ this.prefix = !!conf.prefix
+ this.postfix = !!conf.postfix
+ this.binop = conf.binop || null
+ this.updateContext = null
+ }
+}
+
+function binop(name, prec) {
+ return new TokenType(name, {beforeExpr: true, binop: prec})
+}
+const beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}
+
+// Map keyword names to token types.
+
+export const keywords = {}
+
+// Succinct definitions of keyword token types
+function kw(name, options = {}) {
+ options.keyword = name
+ return keywords[name] = new TokenType(name, options)
+}
+
+export const types = {
+ num: new TokenType("num", startsExpr),
+ regexp: new TokenType("regexp", startsExpr),
+ string: new TokenType("string", startsExpr),
+ name: new TokenType("name", startsExpr),
+ eof: new TokenType("eof"),
+
+ // Punctuation token types.
+ bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}),
+ bracketR: new TokenType("]"),
+ braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}),
+ braceR: new TokenType("}"),
+ parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}),
+ parenR: new TokenType(")"),
+ comma: new TokenType(",", beforeExpr),
+ semi: new TokenType(";", beforeExpr),
+ colon: new TokenType(":", beforeExpr),
+ dot: new TokenType("."),
+ question: new TokenType("?", beforeExpr),
+ arrow: new TokenType("=>", beforeExpr),
+ template: new TokenType("template"),
+ ellipsis: new TokenType("...", beforeExpr),
+ backQuote: new TokenType("`", startsExpr),
+ dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}),
+
+ // Operators. These carry several kinds of properties to help the
+ // parser use them properly (the presence of these properties is
+ // what categorizes them as operators).
+ //
+ // `binop`, when present, specifies that this operator is a binary
+ // operator, and will refer to its precedence.
+ //
+ // `prefix` and `postfix` mark the operator as a prefix or postfix
+ // unary operator.
+ //
+ // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
+ // binary operators with a very low precedence, that should result
+ // in AssignmentExpression nodes.
+
+ eq: new TokenType("=", {beforeExpr: true, isAssign: true}),
+ assign: new TokenType("_=", {beforeExpr: true, isAssign: true}),
+ incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}),
+ prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}),
+ logicalOR: binop("||", 1),
+ logicalAND: binop("&&", 2),
+ bitwiseOR: binop("|", 3),
+ bitwiseXOR: binop("^", 4),
+ bitwiseAND: binop("&", 5),
+ equality: binop("==/!=", 6),
+ relational: binop("</>", 7),
+ bitShift: binop("<</>>", 8),
+ plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),
+ modulo: binop("%", 10),
+ star: binop("*", 10),
+ slash: binop("/", 10),
+ starstar: new TokenType("**", {beforeExpr: true}),
+
+ // Keyword token types.
+ _break: kw("break"),
+ _case: kw("case", beforeExpr),
+ _catch: kw("catch"),
+ _continue: kw("continue"),
+ _debugger: kw("debugger"),
+ _default: kw("default", beforeExpr),
+ _do: kw("do", {isLoop: true, beforeExpr: true}),
+ _else: kw("else", beforeExpr),
+ _finally: kw("finally"),
+ _for: kw("for", {isLoop: true}),
+ _function: kw("function", startsExpr),
+ _if: kw("if"),
+ _return: kw("return", beforeExpr),
+ _switch: kw("switch"),
+ _throw: kw("throw", beforeExpr),
+ _try: kw("try"),
+ _var: kw("var"),
+ _const: kw("const"),
+ _while: kw("while", {isLoop: true}),
+ _with: kw("with"),
+ _new: kw("new", {beforeExpr: true, startsExpr: true}),
+ _this: kw("this", startsExpr),
+ _super: kw("super", startsExpr),
+ _class: kw("class"),
+ _extends: kw("extends", beforeExpr),
+ _export: kw("export"),
+ _import: kw("import"),
+ _null: kw("null", startsExpr),
+ _true: kw("true", startsExpr),
+ _false: kw("false", startsExpr),
+ _in: kw("in", {beforeExpr: true, binop: 7}),
+ _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}),
+ _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}),
+ _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true})
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/util.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/util.js
new file mode 100644
index 0000000000..3517f8d212
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/util.js
@@ -0,0 +1,9 @@
+export function isArray(obj) {
+ return Object.prototype.toString.call(obj) === "[object Array]"
+}
+
+// Checks if an object has a property.
+
+export function has(obj, propName) {
+ return Object.prototype.hasOwnProperty.call(obj, propName)
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/walk/index.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/walk/index.js
new file mode 100644
index 0000000000..68604a88ab
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/walk/index.js
@@ -0,0 +1,342 @@
+// AST walker module for Mozilla Parser API compatible trees
+
+// A simple walk is one where you simply specify callbacks to be
+// called on specific nodes. The last two arguments are optional. A
+// simple use would be
+//
+// walk.simple(myTree, {
+// Expression: function(node) { ... }
+// });
+//
+// to do something with all expressions. All Parser API node types
+// can be used to identify node types, as well as Expression,
+// Statement, and ScopeBody, which denote categories of nodes.
+//
+// The base argument can be used to pass a custom (recursive)
+// walker, and state can be used to give this walked an initial
+// state.
+
+export function simple(node, visitors, base, state, override) {
+ if (!base) base = exports.base
+ ;(function c(node, st, override) {
+ let type = override || node.type, found = visitors[type]
+ base[type](node, st, c)
+ if (found) found(node, st)
+ })(node, state, override)
+}
+
+// An ancestor walk keeps an array of ancestor nodes (including the
+// current node) and passes them to the callback as third parameter
+// (and also as state parameter when no other state is present).
+export function ancestor(node, visitors, base, state) {
+ if (!base) base = exports.base
+ let ancestors = []
+ ;(function c(node, st, override) {
+ let type = override || node.type, found = visitors[type]
+ let isNew = node != ancestors[ancestors.length - 1]
+ if (isNew) ancestors.push(node)
+ base[type](node, st, c)
+ if (found) found(node, st || ancestors, ancestors)
+ if (isNew) ancestors.pop()
+ })(node, state)
+}
+
+// A recursive walk is one where your functions override the default
+// walkers. They can modify and replace the state parameter that's
+// threaded through the walk, and can opt how and whether to walk
+// their child nodes (by calling their third argument on these
+// nodes).
+export function recursive(node, state, funcs, base, override) {
+ let visitor = funcs ? exports.make(funcs, base) : base
+ ;(function c(node, st, override) {
+ visitor[override || node.type](node, st, c)
+ })(node, state, override)
+}
+
+function makeTest(test) {
+ if (typeof test == "string")
+ return type => type == test
+ else if (!test)
+ return () => true
+ else
+ return test
+}
+
+class Found {
+ constructor(node, state) { this.node = node; this.state = state }
+}
+
+// Find a node with a given start, end, and type (all are optional,
+// null can be used as wildcard). Returns a {node, state} object, or
+// undefined when it doesn't find a matching node.
+export function findNodeAt(node, start, end, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ let type = override || node.type
+ if ((start == null || node.start <= start) &&
+ (end == null || node.end >= end))
+ base[type](node, st, c)
+ if ((start == null || node.start == start) &&
+ (end == null || node.end == end) &&
+ test(type, node))
+ throw new Found(node, st)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+}
+
+// Find the innermost node of a given type that contains the given
+// position. Interface similar to findNodeAt.
+export function findNodeAround(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ let type = override || node.type
+ if (node.start > pos || node.end < pos) return
+ base[type](node, st, c)
+ if (test(type, node)) throw new Found(node, st)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+}
+
+// Find the outermost matching node after a given position.
+export function findNodeAfter(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ try {
+ ;(function c(node, st, override) {
+ if (node.end < pos) return
+ let type = override || node.type
+ if (node.start >= pos && test(type, node)) throw new Found(node, st)
+ base[type](node, st, c)
+ })(node, state)
+ } catch (e) {
+ if (e instanceof Found) return e
+ throw e
+ }
+}
+
+// Find the outermost matching node before a given position.
+export function findNodeBefore(node, pos, test, base, state) {
+ test = makeTest(test)
+ if (!base) base = exports.base
+ let max
+ ;(function c(node, st, override) {
+ if (node.start > pos) return
+ let type = override || node.type
+ if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
+ max = new Found(node, st)
+ base[type](node, st, c)
+ })(node, state)
+ return max
+}
+
+// Fallback to an Object.create polyfill for older environments.
+const create = Object.create || function(proto) {
+ function Ctor() {}
+ Ctor.prototype = proto
+ return new Ctor
+}
+
+// Used to create a custom walker. Will fill in all missing node
+// type properties with the defaults.
+export function make(funcs, base) {
+ if (!base) base = exports.base
+ let visitor = create(base)
+ for (var type in funcs) visitor[type] = funcs[type]
+ return visitor
+}
+
+function skipThrough(node, st, c) { c(node, st) }
+function ignore(_node, _st, _c) {}
+
+// Node walkers.
+
+export const base = {}
+
+base.Program = base.BlockStatement = (node, st, c) => {
+ for (let i = 0; i < node.body.length; ++i)
+ c(node.body[i], st, "Statement")
+}
+base.Statement = skipThrough
+base.EmptyStatement = ignore
+base.ExpressionStatement = base.ParenthesizedExpression =
+ (node, st, c) => c(node.expression, st, "Expression")
+base.IfStatement = (node, st, c) => {
+ c(node.test, st, "Expression")
+ c(node.consequent, st, "Statement")
+ if (node.alternate) c(node.alternate, st, "Statement")
+}
+base.LabeledStatement = (node, st, c) => c(node.body, st, "Statement")
+base.BreakStatement = base.ContinueStatement = ignore
+base.WithStatement = (node, st, c) => {
+ c(node.object, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.SwitchStatement = (node, st, c) => {
+ c(node.discriminant, st, "Expression")
+ for (let i = 0; i < node.cases.length; ++i) {
+ let cs = node.cases[i]
+ if (cs.test) c(cs.test, st, "Expression")
+ for (let j = 0; j < cs.consequent.length; ++j)
+ c(cs.consequent[j], st, "Statement")
+ }
+}
+base.ReturnStatement = base.YieldExpression = (node, st, c) => {
+ if (node.argument) c(node.argument, st, "Expression")
+}
+base.ThrowStatement = base.SpreadElement =
+ (node, st, c) => c(node.argument, st, "Expression")
+base.TryStatement = (node, st, c) => {
+ c(node.block, st, "Statement")
+ if (node.handler) c(node.handler, st)
+ if (node.finalizer) c(node.finalizer, st, "Statement")
+}
+base.CatchClause = (node, st, c) => {
+ c(node.param, st, "Pattern")
+ c(node.body, st, "ScopeBody")
+}
+base.WhileStatement = base.DoWhileStatement = (node, st, c) => {
+ c(node.test, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.ForStatement = (node, st, c) => {
+ if (node.init) c(node.init, st, "ForInit")
+ if (node.test) c(node.test, st, "Expression")
+ if (node.update) c(node.update, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.ForInStatement = base.ForOfStatement = (node, st, c) => {
+ c(node.left, st, "ForInit")
+ c(node.right, st, "Expression")
+ c(node.body, st, "Statement")
+}
+base.ForInit = (node, st, c) => {
+ if (node.type == "VariableDeclaration") c(node, st)
+ else c(node, st, "Expression")
+}
+base.DebuggerStatement = ignore
+
+base.FunctionDeclaration = (node, st, c) => c(node, st, "Function")
+base.VariableDeclaration = (node, st, c) => {
+ for (let i = 0; i < node.declarations.length; ++i)
+ c(node.declarations[i], st)
+}
+base.VariableDeclarator = (node, st, c) => {
+ c(node.id, st, "Pattern")
+ if (node.init) c(node.init, st, "Expression")
+}
+
+base.Function = (node, st, c) => {
+ if (node.id) c(node.id, st, "Pattern")
+ for (let i = 0; i < node.params.length; i++)
+ c(node.params[i], st, "Pattern")
+ c(node.body, st, node.expression ? "ScopeExpression" : "ScopeBody")
+}
+// FIXME drop these node types in next major version
+// (They are awkward, and in ES6 every block can be a scope.)
+base.ScopeBody = (node, st, c) => c(node, st, "Statement")
+base.ScopeExpression = (node, st, c) => c(node, st, "Expression")
+
+base.Pattern = (node, st, c) => {
+ if (node.type == "Identifier")
+ c(node, st, "VariablePattern")
+ else if (node.type == "MemberExpression")
+ c(node, st, "MemberPattern")
+ else
+ c(node, st)
+}
+base.VariablePattern = ignore
+base.MemberPattern = skipThrough
+base.RestElement = (node, st, c) => c(node.argument, st, "Pattern")
+base.ArrayPattern = (node, st, c) => {
+ for (let i = 0; i < node.elements.length; ++i) {
+ let elt = node.elements[i]
+ if (elt) c(elt, st, "Pattern")
+ }
+}
+base.ObjectPattern = (node, st, c) => {
+ for (let i = 0; i < node.properties.length; ++i)
+ c(node.properties[i].value, st, "Pattern")
+}
+
+base.Expression = skipThrough
+base.ThisExpression = base.Super = base.MetaProperty = ignore
+base.ArrayExpression = (node, st, c) => {
+ for (let i = 0; i < node.elements.length; ++i) {
+ let elt = node.elements[i]
+ if (elt) c(elt, st, "Expression")
+ }
+}
+base.ObjectExpression = (node, st, c) => {
+ for (let i = 0; i < node.properties.length; ++i)
+ c(node.properties[i], st)
+}
+base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration
+base.SequenceExpression = base.TemplateLiteral = (node, st, c) => {
+ for (let i = 0; i < node.expressions.length; ++i)
+ c(node.expressions[i], st, "Expression")
+}
+base.UnaryExpression = base.UpdateExpression = (node, st, c) => {
+ c(node.argument, st, "Expression")
+}
+base.BinaryExpression = base.LogicalExpression = (node, st, c) => {
+ c(node.left, st, "Expression")
+ c(node.right, st, "Expression")
+}
+base.AssignmentExpression = base.AssignmentPattern = (node, st, c) => {
+ c(node.left, st, "Pattern")
+ c(node.right, st, "Expression")
+}
+base.ConditionalExpression = (node, st, c) => {
+ c(node.test, st, "Expression")
+ c(node.consequent, st, "Expression")
+ c(node.alternate, st, "Expression")
+}
+base.NewExpression = base.CallExpression = (node, st, c) => {
+ c(node.callee, st, "Expression")
+ if (node.arguments) for (let i = 0; i < node.arguments.length; ++i)
+ c(node.arguments[i], st, "Expression")
+}
+base.MemberExpression = (node, st, c) => {
+ c(node.object, st, "Expression")
+ if (node.computed) c(node.property, st, "Expression")
+}
+base.ExportNamedDeclaration = base.ExportDefaultDeclaration = (node, st, c) => {
+ if (node.declaration)
+ c(node.declaration, st, node.type == "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression")
+ if (node.source) c(node.source, st, "Expression")
+}
+base.ExportAllDeclaration = (node, st, c) => {
+ c(node.source, st, "Expression")
+}
+base.ImportDeclaration = (node, st, c) => {
+ for (let i = 0; i < node.specifiers.length; i++)
+ c(node.specifiers[i], st)
+ c(node.source, st, "Expression")
+}
+base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore
+
+base.TaggedTemplateExpression = (node, st, c) => {
+ c(node.tag, st, "Expression")
+ c(node.quasi, st)
+}
+base.ClassDeclaration = base.ClassExpression = (node, st, c) => c(node, st, "Class")
+base.Class = (node, st, c) => {
+ if (node.id) c(node.id, st, "Pattern")
+ if (node.superClass) c(node.superClass, st, "Expression")
+ for (let i = 0; i < node.body.body.length; i++)
+ c(node.body.body[i], st)
+}
+base.MethodDefinition = base.Property = (node, st, c) => {
+ if (node.computed) c(node.key, st, "Expression")
+ c(node.value, st, "Expression")
+}
diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/whitespace.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/whitespace.js
new file mode 100644
index 0000000000..ee1214a218
--- /dev/null
+++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/whitespace.js
@@ -0,0 +1,13 @@
+// Matches a whole line break (where CRLF is considered a single
+// line break). Used to count lines.
+
+export const lineBreak = /\r\n?|\n|\u2028|\u2029/
+export const lineBreakG = new RegExp(lineBreak.source, "g")
+
+export function isNewLine(code) {
+ return code === 10 || code === 13 || code === 0x2028 || code == 0x2029
+}
+
+export const nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/
+
+export const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g
diff --git a/tools/eslint/node_modules/acorn-jsx/package.json b/tools/eslint/node_modules/acorn-jsx/package.json
index ecb4920524..86e73e53a1 100644
--- a/tools/eslint/node_modules/acorn-jsx/package.json
+++ b/tools/eslint/node_modules/acorn-jsx/package.json
@@ -16,7 +16,6 @@
"_from": "acorn-jsx@>=3.0.0 <4.0.0",
"_id": "acorn-jsx@3.0.1",
"_inCache": true,
- "_installable": true,
"_location": "/acorn-jsx",
"_nodeVersion": "6.0.0",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/acorn/AUTHORS b/tools/eslint/node_modules/acorn/AUTHORS
index 1b2061cd4b..314d7086cf 100644
--- a/tools/eslint/node_modules/acorn/AUTHORS
+++ b/tools/eslint/node_modules/acorn/AUTHORS
@@ -14,7 +14,6 @@ Conrad Irwin
Daniel Tschinder
David Bonnet
Domenico Matteo
-ForbesLindesay
Forbes Lindesay
Gilad Peleg
impinball
@@ -52,8 +51,8 @@ ReadmeCritic
r-e-d
Richard Gibson
Rich Harris
-Rich-Harris
Sebastian McKenzie
+Simen Bekkhus
Timothy Gu
Toru Nagashima
zsjforcn
diff --git a/tools/eslint/node_modules/acorn/README.md b/tools/eslint/node_modules/acorn/README.md
index 0c514d5e63..82dc28717a 100644
--- a/tools/eslint/node_modules/acorn/README.md
+++ b/tools/eslint/node_modules/acorn/README.md
@@ -62,15 +62,16 @@ object referring to that same position.
[estree]: https://github.com/estree/estree
- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
- either 3, 5, 6, or 7. This influences support for strict mode, the set
- of reserved words, and support for new syntax features. Default is 6.
+ either 3, 5, 6 (2015), 7 (2016), or 8 (2017). This influences support for strict
+ mode, the set of reserved words, and support for new syntax features.
+ Default is 7.
- **NOTE**: Only 'stage 4' (finalized) ECMAScript 7 features are being
- implemented by Acorn. That means that most of the draft standard is
- not yet being parsed.
+ **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
+ implemented by Acorn.
- **sourceType**: Indicate the mode the code should be parsed in. Can be
- either `"script"` or `"module"`.
+ either `"script"` or `"module"`. This influences global strict mode
+ and parsing of `import` and `export` declarations.
- **onInsertedSemicolon**: If given a callback, that callback will be
called whenever a missing semicolon is inserted by the parser. The
diff --git a/tools/eslint/node_modules/acorn/bin/acorn b/tools/eslint/node_modules/acorn/bin/acorn
index cf4acd5631..78ebd4f0ea 100755
--- a/tools/eslint/node_modules/acorn/bin/acorn
+++ b/tools/eslint/node_modules/acorn/bin/acorn
@@ -14,7 +14,7 @@ var options = {}
function help(status) {
var print = (status == 0) ? console.log : console.error
- print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7]")
+ print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7|...|--ecma2015|--ecma2016|...]")
print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]")
process.exit(status)
}
@@ -23,10 +23,6 @@ for (var i = 2; i < process.argv.length; ++i) {
var arg = process.argv[i]
if ((arg == "-" || arg[0] != "-") && !infile) infile = arg
else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i]
- else if (arg == "--ecma3") options.ecmaVersion = 3
- else if (arg == "--ecma5") options.ecmaVersion = 5
- else if (arg == "--ecma6") options.ecmaVersion = 6
- else if (arg == "--ecma7") options.ecmaVersion = 7
else if (arg == "--locations") options.locations = true
else if (arg == "--allow-hash-bang") options.allowHashBang = true
else if (arg == "--silent") silent = true
@@ -34,7 +30,13 @@ for (var i = 2; i < process.argv.length; ++i) {
else if (arg == "--help") help(0)
else if (arg == "--tokenize") tokenize = true
else if (arg == "--module") options.sourceType = 'module'
- else help(1)
+ else {
+ var match = arg.match(/^--ecma(\d+)$/)
+ if (match)
+ options.ecmaVersion = +match[1]
+ else
+ help(1)
+ }
}
function run(code) {
diff --git a/tools/eslint/node_modules/acorn/bin/update_authors.sh b/tools/eslint/node_modules/acorn/bin/update_authors.sh
index 466c8db586..e08f57273c 100755
--- a/tools/eslint/node_modules/acorn/bin/update_authors.sh
+++ b/tools/eslint/node_modules/acorn/bin/update_authors.sh
@@ -1,6 +1,6 @@
# Combine existing list of authors with everyone known in git, sort, add header.
tail --lines=+3 AUTHORS > AUTHORS.tmp
-git log --format='%aN' | grep -v abraidwood >> AUTHORS.tmp
+git log --format='%aN' | grep -v abraidwood | grep -v Rich-Harris | grep -v ForbesLindesay >> AUTHORS.tmp
echo -e "List of Acorn contributors. Updated before every release.\n" > AUTHORS
sort -u AUTHORS.tmp >> AUTHORS
rm -f AUTHORS.tmp
diff --git a/tools/eslint/node_modules/acorn/dist/acorn.es.js b/tools/eslint/node_modules/acorn/dist/acorn.es.js
index 4460957fd7..adb3dd30f3 100644
--- a/tools/eslint/node_modules/acorn/dist/acorn.es.js
+++ b/tools/eslint/node_modules/acorn/dist/acorn.es.js
@@ -4,7 +4,6 @@ var reservedWords = {
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
5: "class enum extends super const export import",
6: "enum",
- 7: "enum",
strict: "implements interface let package private protected public static yield",
strictBind: "eval arguments"
}
@@ -238,7 +237,7 @@ 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
+ return code === 10 || code === 13 || code === 0x2028 || code === 0x2029
}
var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/
@@ -297,11 +296,13 @@ function getLineInfo(input, offset) {
var defaultOptions = {
// `ecmaVersion` indicates the ECMAScript version to parse. Must
- // be either 3, or 5, or 6. This influences support for strict
- // mode, the set of reserved words, support for getters and
- // setters and other features. The default is 6.
- ecmaVersion: 6,
- // Source type ("script" or "module") for different semantics
+ // be either 3, 5, 6 (2015), 7 (2016), or 8 (2017). This influences support
+ // for strict mode, the set of reserved words, and support for
+ // new syntax features. The default is 7.
+ ecmaVersion: 7,
+ // `sourceType` indicates the mode the code should be parsed in.
+ // Can be either `"script"` or `"module"`. This influences global
+ // strict mode and parsing of `import` and `export` declarations.
sourceType: "script",
// `onInsertedSemicolon` can be a callback that will be called
// when a semicolon is automatically inserted. It will be passed
@@ -379,8 +380,13 @@ var defaultOptions = {
function getOptions(opts) {
var options = {}
+
for (var opt in defaultOptions)
options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]
+
+ if (options.ecmaVersion >= 2015)
+ options.ecmaVersion -= 2009
+
if (options.allowReserved == null)
options.allowReserved = options.ecmaVersion < 5
@@ -421,8 +427,12 @@ var Parser = function Parser(options, input, startPos) {
this.options = options = getOptions(options)
this.sourceFile = options.sourceFile
this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5])
- var reserved = options.allowReserved ? "" :
- reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : "")
+ var reserved = ""
+ if (!options.allowReserved) {
+ for (var v = options.ecmaVersion;; v--)
+ if (reserved = reservedWords[v]) break
+ if (options.sourceType == "module") reserved += " await"
+ }
this.reservedWords = keywordRegexp(reserved)
var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict
this.reservedWordsStrict = keywordRegexp(reservedStrict)
@@ -442,7 +452,7 @@ var Parser = function Parser(options, input, startPos) {
// The current position of the tokenizer in the input.
if (startPos) {
this.pos = startPos
- this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos))
+ this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1
this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length
} else {
this.pos = this.lineStart = 0
@@ -476,8 +486,10 @@ var Parser = function Parser(options, input, startPos) {
// Used to signify the start of a potential arrow function
this.potentialArrowAt = -1
- // Flags to track whether we are in a function, a generator.
- this.inFunction = this.inGenerator = false
+ // Flags to track whether we are in a function, a generator, an async function.
+ this.inFunction = this.inGenerator = this.inAsync = false
+ // Positions to delayed-check that yield/await does not exist in default parameters.
+ this.yieldPos = this.awaitPos = 0
// Labels in scope.
this.labels = []
@@ -575,11 +587,12 @@ pp.semicolon = function() {
if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected()
}
-pp.afterTrailingComma = function(tokType) {
+pp.afterTrailingComma = function(tokType, notNext) {
if (this.type == tokType) {
if (this.options.onTrailingComma)
this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc)
- this.next()
+ if (!notNext)
+ this.next()
return true
}
}
@@ -614,6 +627,13 @@ pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns")
}
+pp.checkYieldAwaitInDefaultParams = function() {
+ if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos))
+ this.raise(this.yieldPos, "Yield expression cannot be a default value")
+ if (this.awaitPos)
+ this.raise(this.awaitPos, "Await expression cannot be a default value")
+}
+
var pp$1 = Parser.prototype
// ### Statement parsing
@@ -626,10 +646,10 @@ var pp$1 = Parser.prototype
pp$1.parseTopLevel = function(node) {
var this$1 = this;
- var first = true
+ var first = true, exports = {}
if (!node.body) node.body = []
while (this.type !== tt.eof) {
- var stmt = this$1.parseStatement(true, true)
+ var stmt = this$1.parseStatement(true, true, exports)
node.body.push(stmt)
if (first) {
if (this$1.isUseStrict(stmt)) this$1.setStrict(true)
@@ -659,6 +679,21 @@ pp$1.isLet = function() {
return false
}
+// check 'async [no LineTerminator here] function'
+// - 'async /*foo*/ function' is OK.
+// - 'async /*\n*/ function' is invalid.
+pp$1.isAsyncFunction = function() {
+ if (this.type !== tt.name || this.options.ecmaVersion < 8 || this.value != "async")
+ return false
+
+ skipWhiteSpace.lastIndex = this.pos
+ var skip = skipWhiteSpace.exec(this.input)
+ var next = this.pos + skip[0].length
+ return !lineBreak.test(this.input.slice(this.pos, next)) &&
+ this.input.slice(next, next + 8) === "function" &&
+ (next + 8 == this.input.length || !isIdentifierChar(this.input.charAt(next + 8)))
+}
+
// Parse a single statement.
//
// If expecting a statement and finding a slash operator, parse a
@@ -666,7 +701,7 @@ pp$1.isLet = function() {
// `if (foo) /blah/.exec(foo)`, where looking at the previous token
// does not help.
-pp$1.parseStatement = function(declaration, topLevel) {
+pp$1.parseStatement = function(declaration, topLevel, exports) {
var starttype = this.type, node = this.startNode(), kind
if (this.isLet()) {
@@ -685,7 +720,7 @@ pp$1.parseStatement = function(declaration, topLevel) {
case tt._for: return this.parseForStatement(node)
case tt._function:
if (!declaration && this.options.ecmaVersion >= 6) this.unexpected()
- return this.parseFunctionStatement(node)
+ return this.parseFunctionStatement(node, false)
case tt._class:
if (!declaration) this.unexpected()
return this.parseClass(node, true)
@@ -710,7 +745,7 @@ pp$1.parseStatement = function(declaration, topLevel) {
if (!this.inModule)
this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")
}
- return starttype === tt._import ? this.parseImport(node) : this.parseExport(node)
+ return starttype === tt._import ? this.parseImport(node) : this.parseExport(node, exports)
// If the statement does not start with a statement keyword or a
// brace, it's an ExpressionStatement or LabeledStatement. We
@@ -718,6 +753,11 @@ pp$1.parseStatement = function(declaration, topLevel) {
// next token is a colon and the expression was a simple
// Identifier node, we switch to interpreting it as a label.
default:
+ if (this.isAsyncFunction() && declaration) {
+ this.next()
+ return this.parseFunctionStatement(node, true)
+ }
+
var maybeName = this.value, expr = this.parseExpression()
if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon))
return this.parseLabeledStatement(node, maybeName, expr)
@@ -807,16 +847,21 @@ pp$1.parseForStatement = function(node) {
return this.parseFor(node, init)
}
-pp$1.parseFunctionStatement = function(node) {
+pp$1.parseFunctionStatement = function(node, isAsync) {
this.next()
- return this.parseFunction(node, true)
+ return this.parseFunction(node, true, false, isAsync)
+}
+
+pp$1.isFunction = function() {
+ return this.type === tt._function || this.isAsyncFunction()
}
pp$1.parseIfStatement = function(node) {
this.next()
node.test = this.parseParenExpression()
- node.consequent = this.parseStatement(false)
- node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null
+ // allow function declarations in branches, but only in non-strict mode
+ node.consequent = this.parseStatement(!this.strict && this.isFunction())
+ node.alternate = this.eat(tt._else) ? this.parseStatement(!this.strict && this.isFunction()) : null
return this.finishNode(node, "IfStatement")
}
@@ -1047,23 +1092,38 @@ pp$1.parseVarId = function(decl) {
// Parse a function declaration or literal (depending on the
// `isStatement` parameter).
-pp$1.parseFunction = function(node, isStatement, allowExpressionBody) {
+pp$1.parseFunction = function(node, isStatement, allowExpressionBody, isAsync) {
this.initFunction(node)
- if (this.options.ecmaVersion >= 6)
+ if (this.options.ecmaVersion >= 6 && !isAsync)
node.generator = this.eat(tt.star)
- var oldInGen = this.inGenerator
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+
+ if (isStatement)
+ node.id = this.parseIdent()
+
+ var oldInGen = this.inGenerator, oldInAsync = this.inAsync, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos
this.inGenerator = node.generator
- if (isStatement || this.type === tt.name)
+ this.inAsync = node.async
+ this.yieldPos = 0
+ this.awaitPos = 0
+
+ if (!isStatement && this.type === tt.name)
node.id = this.parseIdent()
this.parseFunctionParams(node)
this.parseFunctionBody(node, allowExpressionBody)
+
this.inGenerator = oldInGen
+ this.inAsync = oldInAsync
+ this.yieldPos = oldYieldPos
+ this.awaitPos = oldAwaitPos
return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
}
pp$1.parseFunctionParams = function(node) {
this.expect(tt.parenL)
- node.params = this.parseBindingList(tt.parenR, false, false, true)
+ node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8, true)
+ this.checkYieldAwaitInDefaultParams()
}
// Parse a class declaration or literal (depending on the
@@ -1083,6 +1143,7 @@ pp$1.parseClass = function(node, isStatement) {
if (this$1.eat(tt.semi)) continue
var method = this$1.startNode()
var isGenerator = this$1.eat(tt.star)
+ var isAsync = false
var isMaybeStatic = this$1.type === tt.name && this$1.value === "static"
this$1.parsePropertyName(method)
method.static = isMaybeStatic && this$1.type !== tt.parenL
@@ -1091,11 +1152,17 @@ pp$1.parseClass = function(node, isStatement) {
isGenerator = this$1.eat(tt.star)
this$1.parsePropertyName(method)
}
+ if (this$1.options.ecmaVersion >= 8 && !isGenerator && !method.computed &&
+ method.key.type === "Identifier" && method.key.name === "async" && this$1.type !== tt.parenL &&
+ !this$1.canInsertSemicolon()) {
+ isAsync = true
+ this$1.parsePropertyName(method)
+ }
method.kind = "method"
var isGetSet = false
if (!method.computed) {
var key = method.key;
- if (!isGenerator && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
+ if (!isGenerator && !isAsync && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
isGetSet = true
method.kind = key.name
key = this$1.parsePropertyName(method)
@@ -1105,11 +1172,12 @@ pp$1.parseClass = function(node, isStatement) {
if (hadConstructor) this$1.raise(key.start, "Duplicate constructor in the same class")
if (isGetSet) this$1.raise(key.start, "Constructor can't have get/set modifier")
if (isGenerator) this$1.raise(key.start, "Constructor can't be a generator")
+ if (isAsync) this$1.raise(key.start, "Constructor can't be an async method")
method.kind = "constructor"
hadConstructor = true
}
}
- this$1.parseClassMethod(classBody, method, isGenerator)
+ this$1.parseClassMethod(classBody, method, isGenerator, isAsync)
if (isGetSet) {
var paramCount = method.kind === "get" ? 0 : 1
if (method.value.params.length !== paramCount) {
@@ -1118,17 +1186,18 @@ pp$1.parseClass = function(node, isStatement) {
this$1.raiseRecoverable(start, "getter should have no params")
else
this$1.raiseRecoverable(start, "setter should have exactly one param")
+ } else {
+ if (method.kind === "set" && method.value.params[0].type === "RestElement")
+ this$1.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params")
}
- if (method.kind === "set" && method.value.params[0].type === "RestElement")
- this$1.raise(method.value.params[0].start, "Setter cannot use rest params")
}
}
node.body = this.finishNode(classBody, "ClassBody")
return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
}
-pp$1.parseClassMethod = function(classBody, method, isGenerator) {
- method.value = this.parseMethod(isGenerator)
+pp$1.parseClassMethod = function(classBody, method, isGenerator, isAsync) {
+ method.value = this.parseMethod(isGenerator, isAsync)
classBody.body.push(this.finishNode(method, "MethodDefinition"))
}
@@ -1142,7 +1211,7 @@ pp$1.parseClassSuper = function(node) {
// Parses module export declaration.
-pp$1.parseExport = function(node) {
+pp$1.parseExport = function(node, exports) {
var this$1 = this;
this.next()
@@ -1154,6 +1223,7 @@ pp$1.parseExport = function(node) {
return this.finishNode(node, "ExportAllDeclaration")
}
if (this.eat(tt._default)) { // export default ...
+ this.checkExport(exports, "default", this.lastTokStart)
var parens = this.type == tt.parenL
var expr = this.parseMaybeAssign()
var needsSemi = true
@@ -1173,11 +1243,15 @@ pp$1.parseExport = function(node) {
// export var|const|let|function|class ...
if (this.shouldParseExportStatement()) {
node.declaration = this.parseStatement(true)
+ if (node.declaration.type === "VariableDeclaration")
+ this.checkVariableExport(exports, node.declaration.declarations)
+ else
+ this.checkExport(exports, node.declaration.id.name, node.declaration.id.start)
node.specifiers = []
node.source = null
} else { // export { x, y as z } [from '...']
node.declaration = null
- node.specifiers = this.parseExportSpecifiers()
+ node.specifiers = this.parseExportSpecifiers(exports)
if (this.eatContextual("from")) {
node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
} else {
@@ -1195,13 +1269,48 @@ pp$1.parseExport = function(node) {
return this.finishNode(node, "ExportNamedDeclaration")
}
+pp$1.checkExport = function(exports, name, pos) {
+ if (!exports) return
+ if (Object.prototype.hasOwnProperty.call(exports, name))
+ this.raiseRecoverable(pos, "Duplicate export '" + name + "'")
+ exports[name] = true
+}
+
+pp$1.checkPatternExport = function(exports, pat) {
+ var this$1 = this;
+
+ var type = pat.type
+ if (type == "Identifier")
+ this.checkExport(exports, pat.name, pat.start)
+ else if (type == "ObjectPattern")
+ for (var i = 0; i < pat.properties.length; ++i)
+ this$1.checkPatternExport(exports, pat.properties[i].value)
+ else if (type == "ArrayPattern")
+ for (var i$1 = 0; i$1 < pat.elements.length; ++i$1) {
+ var elt = pat.elements[i$1]
+ if (elt) this$1.checkPatternExport(exports, elt)
+ }
+ else if (type == "AssignmentPattern")
+ this.checkPatternExport(exports, pat.left)
+ else if (type == "ParenthesizedExpression")
+ this.checkPatternExport(exports, pat.expression)
+}
+
+pp$1.checkVariableExport = function(exports, decls) {
+ var this$1 = this;
+
+ if (!exports) return
+ for (var i = 0; i < decls.length; i++)
+ this$1.checkPatternExport(exports, decls[i].id)
+}
+
pp$1.shouldParseExportStatement = function() {
- return this.type.keyword || this.isLet()
+ return this.type.keyword || this.isLet() || this.isAsyncFunction()
}
// Parses a comma-separated list of module exports.
-pp$1.parseExportSpecifiers = function() {
+pp$1.parseExportSpecifiers = function(exports) {
var this$1 = this;
var nodes = [], first = true
@@ -1216,6 +1325,7 @@ pp$1.parseExportSpecifiers = function() {
var node = this$1.startNode()
node.local = this$1.parseIdent(this$1.type === tt._default)
node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local
+ this$1.checkExport(exports, node.exported.name, node.exported.start)
nodes.push(this$1.finishNode(node, "ExportSpecifier"))
}
return nodes
@@ -1275,7 +1385,7 @@ pp$1.parseImportSpecifiers = function() {
} else {
node$2.local = node$2.imported
if (this$1.isKeyword(node$2.local.name)) this$1.unexpected(node$2.local.start)
- if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raise(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved")
+ if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raiseRecoverable(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved")
}
this$1.checkLVal(node$2.local, true)
nodes.push(this$1.finishNode(node$2, "ImportSpecifier"))
@@ -1293,7 +1403,11 @@ pp$2.toAssignable = function(node, isBinding) {
if (this.options.ecmaVersion >= 6 && node) {
switch (node.type) {
- case "Identifier":
+ case "Identifier":
+ if (this.inAsync && node.name === "await")
+ this.raise(node.start, "Can not use 'await' as identifier inside an async function")
+ break
+
case "ObjectPattern":
case "ArrayPattern":
break
@@ -1316,6 +1430,7 @@ pp$2.toAssignable = function(node, isBinding) {
if (node.operator === "=") {
node.type = "AssignmentPattern"
delete node.operator
+ this.toAssignable(node.left, isBinding)
// falls through to AssignmentPattern
} else {
this.raise(node.left.end, "Only '=' operator can be used for specifying default value.")
@@ -1323,8 +1438,6 @@ pp$2.toAssignable = function(node, isBinding) {
}
case "AssignmentPattern":
- if (node.right.type === "YieldExpression")
- this.raise(node.right.start, "Yield expression cannot be a default value")
break
case "ParenthesizedExpression":
@@ -1669,7 +1782,10 @@ pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {
var this$1 = this;
var startPos = this.start, startLoc = this.startLoc, expr
- if (this.type.prefix) {
+ if (this.inAsync && this.isContextual("await")) {
+ expr = this.parseAwait(refDestructuringErrors)
+ sawUnary = true
+ } else if (this.type.prefix) {
var node = this.startNode(), update = this.type === tt.incDec
node.operator = this.value
node.prefix = true
@@ -1716,6 +1832,7 @@ pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) {
var this$1 = this;
for (;;) {
+ var maybeAsyncArrow = this$1.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && !this$1.canInsertSemicolon()
if (this$1.eat(tt.dot)) {
var node = this$1.startNodeAt(startPos, startLoc)
node.object = base
@@ -1730,9 +1847,23 @@ pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) {
this$1.expect(tt.bracketR)
base = this$1.finishNode(node$1, "MemberExpression")
} else if (!noCalls && this$1.eat(tt.parenL)) {
+ var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this$1.yieldPos, oldAwaitPos = this$1.awaitPos
+ this$1.yieldPos = 0
+ this$1.awaitPos = 0
+ var exprList = this$1.parseExprList(tt.parenR, this$1.options.ecmaVersion >= 8, false, refDestructuringErrors)
+ if (maybeAsyncArrow && !this$1.canInsertSemicolon() && this$1.eat(tt.arrow)) {
+ this$1.checkPatternErrors(refDestructuringErrors, true)
+ this$1.checkYieldAwaitInDefaultParams()
+ this$1.yieldPos = oldYieldPos
+ this$1.awaitPos = oldAwaitPos
+ return this$1.parseArrowExpression(this$1.startNodeAt(startPos, startLoc), exprList, true)
+ }
+ this$1.checkExpressionErrors(refDestructuringErrors, true)
+ this$1.yieldPos = oldYieldPos || this$1.yieldPos
+ this$1.awaitPos = oldAwaitPos || this$1.awaitPos
var node$2 = this$1.startNodeAt(startPos, startLoc)
node$2.callee = base
- node$2.arguments = this$1.parseExprList(tt.parenR, false)
+ node$2.arguments = exprList
base = this$1.finishNode(node$2, "CallExpression")
} else if (this$1.type === tt.backQuote) {
var node$3 = this$1.startNodeAt(startPos, startLoc)
@@ -1766,8 +1897,18 @@ pp$3.parseExprAtom = function(refDestructuringErrors) {
case tt.name:
var startPos = this.start, startLoc = this.startLoc
var id = this.parseIdent(this.type !== tt.name)
- if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow))
- return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id])
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && !this.canInsertSemicolon() && this.eat(tt._function))
+ return this.parseFunction(this.startNodeAt(startPos, startLoc), false, false, true)
+ if (canBeArrow && !this.canInsertSemicolon()) {
+ if (this.eat(tt.arrow))
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false)
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === tt.name) {
+ id = this.parseIdent()
+ if (this.canInsertSemicolon() || !this.eat(tt.arrow))
+ this.unexpected()
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true)
+ }
+ }
return id
case tt.regexp:
@@ -1835,18 +1976,24 @@ pp$3.parseParenExpression = function() {
pp$3.parseParenAndDistinguishExpression = function(canBeArrow) {
var this$1 = this;
- var startPos = this.start, startLoc = this.startLoc, val
+ var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8
if (this.options.ecmaVersion >= 6) {
this.next()
var innerStartPos = this.start, innerStartLoc = this.startLoc
- var exprList = [], first = true
- var refDestructuringErrors = new DestructuringErrors, spreadStart, innerParenStart
+ var exprList = [], first = true, lastIsComma = false
+ var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart, innerParenStart
+ this.yieldPos = 0
+ this.awaitPos = 0
while (this.type !== tt.parenR) {
first ? first = false : this$1.expect(tt.comma)
- if (this$1.type === tt.ellipsis) {
+ if (allowTrailingComma && this$1.afterTrailingComma(tt.parenR, true)) {
+ lastIsComma = true
+ break
+ } else if (this$1.type === tt.ellipsis) {
spreadStart = this$1.start
exprList.push(this$1.parseParenItem(this$1.parseRest()))
+ if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element")
break
} else {
if (this$1.type === tt.parenL && !innerParenStart) {
@@ -1860,13 +2007,18 @@ pp$3.parseParenAndDistinguishExpression = function(canBeArrow) {
if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {
this.checkPatternErrors(refDestructuringErrors, true)
+ this.checkYieldAwaitInDefaultParams()
if (innerParenStart) this.unexpected(innerParenStart)
+ this.yieldPos = oldYieldPos
+ this.awaitPos = oldAwaitPos
return this.parseParenArrowList(startPos, startLoc, exprList)
}
- if (!exprList.length) this.unexpected(this.lastTokStart)
+ if (!exprList.length || lastIsComma) this.unexpected(this.lastTokStart)
if (spreadStart) this.unexpected(spreadStart)
this.checkExpressionErrors(refDestructuringErrors, true)
+ this.yieldPos = oldYieldPos || this.yieldPos
+ this.awaitPos = oldAwaitPos || this.awaitPos
if (exprList.length > 1) {
val = this.startNodeAt(innerStartPos, innerStartLoc)
@@ -1918,7 +2070,7 @@ pp$3.parseNew = function() {
}
var startPos = this.start, startLoc = this.startLoc
node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true)
- if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false)
+ if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false)
else node.arguments = empty$1
return this.finishNode(node, "NewExpression")
}
@@ -1968,7 +2120,7 @@ pp$3.parseObj = function(isPattern, refDestructuringErrors) {
if (this$1.afterTrailingComma(tt.braceR)) break
} else first = false
- var prop = this$1.startNode(), isGenerator, startPos, startLoc
+ var prop = this$1.startNode(), isGenerator, isAsync, startPos, startLoc
if (this$1.options.ecmaVersion >= 6) {
prop.method = false
prop.shorthand = false
@@ -1980,14 +2132,25 @@ pp$3.parseObj = function(isPattern, refDestructuringErrors) {
isGenerator = this$1.eat(tt.star)
}
this$1.parsePropertyName(prop)
- this$1.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors)
+ if (!isPattern && this$1.options.ecmaVersion >= 8 && !isGenerator && !prop.computed &&
+ prop.key.type === "Identifier" && prop.key.name === "async" && this$1.type !== tt.parenL &&
+ this$1.type !== tt.colon && !this$1.canInsertSemicolon()) {
+ isAsync = true
+ this$1.parsePropertyName(prop, refDestructuringErrors)
+ } else {
+ isAsync = false
+ }
+ this$1.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors)
this$1.checkPropClash(prop, propHash)
node.properties.push(this$1.finishNode(prop, "Property"))
}
return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
}
-pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) {
+pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors) {
+ if ((isGenerator || isAsync) && this.type === tt.colon)
+ this.unexpected()
+
if (this.eat(tt.colon)) {
prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors)
prop.kind = "init"
@@ -1995,11 +2158,11 @@ pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, start
if (isPattern) this.unexpected()
prop.kind = "init"
prop.method = true
- prop.value = this.parseMethod(isGenerator)
+ prop.value = this.parseMethod(isGenerator, isAsync)
} else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
(prop.key.name === "get" || prop.key.name === "set") &&
(this.type != tt.comma && this.type != tt.braceR)) {
- if (isGenerator || isPattern) this.unexpected()
+ if (isGenerator || isAsync || isPattern) this.unexpected()
prop.kind = prop.key.name
this.parsePropertyName(prop)
prop.value = this.parseMethod(false)
@@ -2010,13 +2173,15 @@ pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, start
this.raiseRecoverable(start, "getter should have no params")
else
this.raiseRecoverable(start, "setter should have exactly one param")
+ } else {
+ if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
+ this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
}
- if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
- this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
} else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
if (this.keywords.test(prop.key.name) ||
- (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) ||
- (this.inGenerator && prop.key.name == "yield"))
+ (this.strict ? this.reservedWordsStrict : this.reservedWords).test(prop.key.name) ||
+ (this.inGenerator && prop.key.name == "yield") ||
+ (this.inAsync && prop.key.name == "await"))
this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property")
prop.kind = "init"
if (isPattern) {
@@ -2054,32 +2219,59 @@ pp$3.initFunction = function(node) {
node.generator = false
node.expression = false
}
+ if (this.options.ecmaVersion >= 8)
+ node.async = false
}
// Parse object or class method.
-pp$3.parseMethod = function(isGenerator) {
- var node = this.startNode(), oldInGen = this.inGenerator
- this.inGenerator = isGenerator
+pp$3.parseMethod = function(isGenerator, isAsync) {
+ var node = this.startNode(), oldInGen = this.inGenerator, oldInAsync = this.inAsync, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos
+
this.initFunction(node)
- this.expect(tt.parenL)
- node.params = this.parseBindingList(tt.parenR, false, false)
if (this.options.ecmaVersion >= 6)
node.generator = isGenerator
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+
+ this.inGenerator = node.generator
+ this.inAsync = node.async
+ this.yieldPos = 0
+ this.awaitPos = 0
+
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8)
+ this.checkYieldAwaitInDefaultParams()
this.parseFunctionBody(node, false)
+
this.inGenerator = oldInGen
+ this.inAsync = oldInAsync
+ this.yieldPos = oldYieldPos
+ this.awaitPos = oldAwaitPos
return this.finishNode(node, "FunctionExpression")
}
// Parse arrow function expression with given parameters.
-pp$3.parseArrowExpression = function(node, params) {
- var oldInGen = this.inGenerator
- this.inGenerator = false
+pp$3.parseArrowExpression = function(node, params, isAsync) {
+ var oldInGen = this.inGenerator, oldInAsync = this.inAsync, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos
+
this.initFunction(node)
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+
+ this.inGenerator = false
+ this.inAsync = node.async
+ this.yieldPos = 0
+ this.awaitPos = 0
+
node.params = this.toAssignableList(params, true)
this.parseFunctionBody(node, true)
+
this.inGenerator = oldInGen
+ this.inAsync = oldInAsync
+ this.yieldPos = oldYieldPos
+ this.awaitPos = oldAwaitPos
return this.finishNode(node, "ArrowFunctionExpression")
}
@@ -2104,31 +2296,36 @@ pp$3.parseFunctionBody = function(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 useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null;
+ var useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null
+ if (useStrict && this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params))
+ this.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list")
+
if (this.strict || useStrict) {
var oldStrict = this.strict
this.strict = true
if (node.id)
this.checkLVal(node.id, true)
- this.checkParams(node, useStrict)
+ this.checkParams(node)
this.strict = oldStrict
- } else if (isArrowFunction) {
- this.checkParams(node, useStrict)
+ } else if (isArrowFunction || !this.isSimpleParamList(node.params)) {
+ this.checkParams(node)
}
}
+pp$3.isSimpleParamList = function(params) {
+ for (var i = 0; i < params.length; i++)
+ if (params[i].type !== "Identifier") return false
+ return true
+}
+
// Checks function params for various disallowed patterns such as using "eval"
// or "arguments" and duplicate parameters.
-pp$3.checkParams = function(node, useStrict) {
- var this$1 = this;
+pp$3.checkParams = function(node) {
+ var this$1 = this;
- var nameHash = {}
- for (var i = 0; i < node.params.length; i++) {
- if (useStrict && this$1.options.ecmaVersion >= 7 && node.params[i].type !== "Identifier")
- this$1.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list");
- this$1.checkLVal(node.params[i], true, nameHash)
- }
+ var nameHash = {}
+ for (var i = 0; i < node.params.length; i++) this$1.checkLVal(node.params[i], true, nameHash)
}
// Parses a comma-separated list of expressions, and returns them as
@@ -2153,7 +2350,7 @@ pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestruct
else if (this$1.type === tt.ellipsis) {
elt = this$1.parseSpread(refDestructuringErrors)
if (this$1.type === tt.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) {
- refDestructuringErrors.trailingComma = this$1.lastTokStart
+ refDestructuringErrors.trailingComma = this$1.start
}
} else
elt = this$1.parseMaybeAssign(false, refDestructuringErrors)
@@ -2174,8 +2371,10 @@ pp$3.parseIdent = function(liberal) {
(this.options.ecmaVersion >= 6 ||
this.input.slice(this.start, this.end).indexOf("\\") == -1))
this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved")
- if (!liberal && this.inGenerator && this.value === "yield")
+ if (this.inGenerator && this.value === "yield")
this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator")
+ if (this.inAsync && this.value === "await")
+ this.raiseRecoverable(this.start, "Can not use 'await' as identifier inside an async function")
node.name = this.value
} else if (liberal && this.type.keyword) {
node.name = this.type.keyword
@@ -2189,6 +2388,8 @@ pp$3.parseIdent = function(liberal) {
// Parses yield expression inside generator.
pp$3.parseYield = function() {
+ if (!this.yieldPos) this.yieldPos = this.start
+
var node = this.startNode()
this.next()
if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) {
@@ -2201,6 +2402,15 @@ pp$3.parseYield = function() {
return this.finishNode(node, "YieldExpression")
}
+pp$3.parseAwait = function() {
+ if (!this.awaitPos) this.awaitPos = this.start
+
+ var node = this.startNode()
+ this.next()
+ node.argument = this.parseMaybeUnary(null, true)
+ return this.finishNode(node, "AwaitExpression")
+}
+
var pp$4 = Parser.prototype
// This function is used to raise exceptions on parse errors. It
@@ -2869,14 +3079,15 @@ pp$7.readRadixNumber = function(radix) {
pp$7.readNumber = function(startsWithDot) {
var start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48
if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number")
+ if (octal && this.pos == start + 1) octal = false
var next = this.input.charCodeAt(this.pos)
- if (next === 46) { // '.'
+ if (next === 46 && !octal) { // '.'
++this.pos
this.readInt(10)
isFloat = true
next = this.input.charCodeAt(this.pos)
}
- if (next === 69 || next === 101) { // 'eE'
+ if ((next === 69 || next === 101) && !octal) { // 'eE'
next = this.input.charCodeAt(++this.pos)
if (next === 43 || next === 45) ++this.pos // '+-'
if (this.readInt(10) === null) this.raise(start, "Invalid number")
@@ -3079,7 +3290,7 @@ pp$7.readWord = function() {
return this.finishToken(type, word)
}
-var version = "3.3.0"
+var version = "4.0.3"
// The main exported interface (under `self.acorn` when in the
// browser) is a `parse` function that takes a code string and
@@ -3109,4 +3320,13 @@ function tokenizer(input, options) {
return new Parser(options, input)
}
-export { version, parse, parseExpressionAt, tokenizer, Parser, plugins, defaultOptions, Position, SourceLocation, getLineInfo, Node, TokenType, tt as tokTypes, TokContext, types as tokContexts, isIdentifierChar, isIdentifierStart, Token, isNewLine, lineBreak, lineBreakG }; \ No newline at end of file
+// This is a terrible kludge to support the existing, pre-ES6
+// interface where the loose parser module retroactively adds exports
+// to this module.
+function addLooseExports(parse, Parser, plugins) {
+ parse_dammit = parse
+ LooseParser = Parser
+ pluginsLoose = plugins
+}
+
+export { version, parse, parseExpressionAt, tokenizer, parse_dammit, LooseParser, pluginsLoose, addLooseExports, Parser, plugins, defaultOptions, Position, SourceLocation, getLineInfo, Node, TokenType, tt as tokTypes, TokContext, types as tokContexts, isIdentifierChar, isIdentifierStart, Token, isNewLine, lineBreak, lineBreakG }; \ No newline at end of file
diff --git a/tools/eslint/node_modules/acorn/dist/acorn.js b/tools/eslint/node_modules/acorn/dist/acorn.js
index 127dfb2da7..0fc4086bb7 100644
--- a/tools/eslint/node_modules/acorn/dist/acorn.js
+++ b/tools/eslint/node_modules/acorn/dist/acorn.js
@@ -10,7 +10,6 @@
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
5: "class enum extends super const export import",
6: "enum",
- 7: "enum",
strict: "implements interface let package private protected public static yield",
strictBind: "eval arguments"
}
@@ -244,7 +243,7 @@
var lineBreakG = new RegExp(lineBreak.source, "g")
function isNewLine(code) {
- return code === 10 || code === 13 || code === 0x2028 || code == 0x2029
+ return code === 10 || code === 13 || code === 0x2028 || code === 0x2029
}
var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/
@@ -303,11 +302,13 @@
var defaultOptions = {
// `ecmaVersion` indicates the ECMAScript version to parse. Must
- // be either 3, or 5, or 6. This influences support for strict
- // mode, the set of reserved words, support for getters and
- // setters and other features. The default is 6.
- ecmaVersion: 6,
- // Source type ("script" or "module") for different semantics
+ // be either 3, 5, 6 (2015), 7 (2016), or 8 (2017). This influences support
+ // for strict mode, the set of reserved words, and support for
+ // new syntax features. The default is 7.
+ ecmaVersion: 7,
+ // `sourceType` indicates the mode the code should be parsed in.
+ // Can be either `"script"` or `"module"`. This influences global
+ // strict mode and parsing of `import` and `export` declarations.
sourceType: "script",
// `onInsertedSemicolon` can be a callback that will be called
// when a semicolon is automatically inserted. It will be passed
@@ -385,8 +386,13 @@
function getOptions(opts) {
var options = {}
+
for (var opt in defaultOptions)
options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]
+
+ if (options.ecmaVersion >= 2015)
+ options.ecmaVersion -= 2009
+
if (options.allowReserved == null)
options.allowReserved = options.ecmaVersion < 5
@@ -427,8 +433,12 @@
this.options = options = getOptions(options)
this.sourceFile = options.sourceFile
this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5])
- var reserved = options.allowReserved ? "" :
- reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : "")
+ var reserved = ""
+ if (!options.allowReserved) {
+ for (var v = options.ecmaVersion;; v--)
+ if (reserved = reservedWords[v]) break
+ if (options.sourceType == "module") reserved += " await"
+ }
this.reservedWords = keywordRegexp(reserved)
var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict
this.reservedWordsStrict = keywordRegexp(reservedStrict)
@@ -448,7 +458,7 @@
// The current position of the tokenizer in the input.
if (startPos) {
this.pos = startPos
- this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos))
+ this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1
this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length
} else {
this.pos = this.lineStart = 0
@@ -482,8 +492,10 @@
// Used to signify the start of a potential arrow function
this.potentialArrowAt = -1
- // Flags to track whether we are in a function, a generator.
- this.inFunction = this.inGenerator = false
+ // Flags to track whether we are in a function, a generator, an async function.
+ this.inFunction = this.inGenerator = this.inAsync = false
+ // Positions to delayed-check that yield/await does not exist in default parameters.
+ this.yieldPos = this.awaitPos = 0
// Labels in scope.
this.labels = []
@@ -581,11 +593,12 @@
if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected()
}
- pp.afterTrailingComma = function(tokType) {
+ pp.afterTrailingComma = function(tokType, notNext) {
if (this.type == tokType) {
if (this.options.onTrailingComma)
this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc)
- this.next()
+ if (!notNext)
+ this.next()
return true
}
}
@@ -620,6 +633,13 @@
if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns")
}
+ pp.checkYieldAwaitInDefaultParams = function() {
+ if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos))
+ this.raise(this.yieldPos, "Yield expression cannot be a default value")
+ if (this.awaitPos)
+ this.raise(this.awaitPos, "Await expression cannot be a default value")
+ }
+
var pp$1 = Parser.prototype
// ### Statement parsing
@@ -632,10 +652,10 @@
pp$1.parseTopLevel = function(node) {
var this$1 = this;
- var first = true
+ var first = true, exports = {}
if (!node.body) node.body = []
while (this.type !== tt.eof) {
- var stmt = this$1.parseStatement(true, true)
+ var stmt = this$1.parseStatement(true, true, exports)
node.body.push(stmt)
if (first) {
if (this$1.isUseStrict(stmt)) this$1.setStrict(true)
@@ -665,6 +685,21 @@
return false
}
+ // check 'async [no LineTerminator here] function'
+ // - 'async /*foo*/ function' is OK.
+ // - 'async /*\n*/ function' is invalid.
+ pp$1.isAsyncFunction = function() {
+ if (this.type !== tt.name || this.options.ecmaVersion < 8 || this.value != "async")
+ return false
+
+ skipWhiteSpace.lastIndex = this.pos
+ var skip = skipWhiteSpace.exec(this.input)
+ var next = this.pos + skip[0].length
+ return !lineBreak.test(this.input.slice(this.pos, next)) &&
+ this.input.slice(next, next + 8) === "function" &&
+ (next + 8 == this.input.length || !isIdentifierChar(this.input.charAt(next + 8)))
+ }
+
// Parse a single statement.
//
// If expecting a statement and finding a slash operator, parse a
@@ -672,7 +707,7 @@
// `if (foo) /blah/.exec(foo)`, where looking at the previous token
// does not help.
- pp$1.parseStatement = function(declaration, topLevel) {
+ pp$1.parseStatement = function(declaration, topLevel, exports) {
var starttype = this.type, node = this.startNode(), kind
if (this.isLet()) {
@@ -691,7 +726,7 @@
case tt._for: return this.parseForStatement(node)
case tt._function:
if (!declaration && this.options.ecmaVersion >= 6) this.unexpected()
- return this.parseFunctionStatement(node)
+ return this.parseFunctionStatement(node, false)
case tt._class:
if (!declaration) this.unexpected()
return this.parseClass(node, true)
@@ -716,7 +751,7 @@
if (!this.inModule)
this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")
}
- return starttype === tt._import ? this.parseImport(node) : this.parseExport(node)
+ return starttype === tt._import ? this.parseImport(node) : this.parseExport(node, exports)
// If the statement does not start with a statement keyword or a
// brace, it's an ExpressionStatement or LabeledStatement. We
@@ -724,6 +759,11 @@
// next token is a colon and the expression was a simple
// Identifier node, we switch to interpreting it as a label.
default:
+ if (this.isAsyncFunction() && declaration) {
+ this.next()
+ return this.parseFunctionStatement(node, true)
+ }
+
var maybeName = this.value, expr = this.parseExpression()
if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon))
return this.parseLabeledStatement(node, maybeName, expr)
@@ -813,16 +853,21 @@
return this.parseFor(node, init)
}
- pp$1.parseFunctionStatement = function(node) {
+ pp$1.parseFunctionStatement = function(node, isAsync) {
this.next()
- return this.parseFunction(node, true)
+ return this.parseFunction(node, true, false, isAsync)
+ }
+
+ pp$1.isFunction = function() {
+ return this.type === tt._function || this.isAsyncFunction()
}
pp$1.parseIfStatement = function(node) {
this.next()
node.test = this.parseParenExpression()
- node.consequent = this.parseStatement(false)
- node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null
+ // allow function declarations in branches, but only in non-strict mode
+ node.consequent = this.parseStatement(!this.strict && this.isFunction())
+ node.alternate = this.eat(tt._else) ? this.parseStatement(!this.strict && this.isFunction()) : null
return this.finishNode(node, "IfStatement")
}
@@ -1053,23 +1098,38 @@
// Parse a function declaration or literal (depending on the
// `isStatement` parameter).
- pp$1.parseFunction = function(node, isStatement, allowExpressionBody) {
+ pp$1.parseFunction = function(node, isStatement, allowExpressionBody, isAsync) {
this.initFunction(node)
- if (this.options.ecmaVersion >= 6)
+ if (this.options.ecmaVersion >= 6 && !isAsync)
node.generator = this.eat(tt.star)
- var oldInGen = this.inGenerator
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+
+ if (isStatement)
+ node.id = this.parseIdent()
+
+ var oldInGen = this.inGenerator, oldInAsync = this.inAsync, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos
this.inGenerator = node.generator
- if (isStatement || this.type === tt.name)
+ this.inAsync = node.async
+ this.yieldPos = 0
+ this.awaitPos = 0
+
+ if (!isStatement && this.type === tt.name)
node.id = this.parseIdent()
this.parseFunctionParams(node)
this.parseFunctionBody(node, allowExpressionBody)
+
this.inGenerator = oldInGen
+ this.inAsync = oldInAsync
+ this.yieldPos = oldYieldPos
+ this.awaitPos = oldAwaitPos
return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
}
pp$1.parseFunctionParams = function(node) {
this.expect(tt.parenL)
- node.params = this.parseBindingList(tt.parenR, false, false, true)
+ node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8, true)
+ this.checkYieldAwaitInDefaultParams()
}
// Parse a class declaration or literal (depending on the
@@ -1089,6 +1149,7 @@
if (this$1.eat(tt.semi)) continue
var method = this$1.startNode()
var isGenerator = this$1.eat(tt.star)
+ var isAsync = false
var isMaybeStatic = this$1.type === tt.name && this$1.value === "static"
this$1.parsePropertyName(method)
method.static = isMaybeStatic && this$1.type !== tt.parenL
@@ -1097,11 +1158,17 @@
isGenerator = this$1.eat(tt.star)
this$1.parsePropertyName(method)
}
+ if (this$1.options.ecmaVersion >= 8 && !isGenerator && !method.computed &&
+ method.key.type === "Identifier" && method.key.name === "async" && this$1.type !== tt.parenL &&
+ !this$1.canInsertSemicolon()) {
+ isAsync = true
+ this$1.parsePropertyName(method)
+ }
method.kind = "method"
var isGetSet = false
if (!method.computed) {
var key = method.key;
- if (!isGenerator && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
+ if (!isGenerator && !isAsync && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
isGetSet = true
method.kind = key.name
key = this$1.parsePropertyName(method)
@@ -1111,11 +1178,12 @@
if (hadConstructor) this$1.raise(key.start, "Duplicate constructor in the same class")
if (isGetSet) this$1.raise(key.start, "Constructor can't have get/set modifier")
if (isGenerator) this$1.raise(key.start, "Constructor can't be a generator")
+ if (isAsync) this$1.raise(key.start, "Constructor can't be an async method")
method.kind = "constructor"
hadConstructor = true
}
}
- this$1.parseClassMethod(classBody, method, isGenerator)
+ this$1.parseClassMethod(classBody, method, isGenerator, isAsync)
if (isGetSet) {
var paramCount = method.kind === "get" ? 0 : 1
if (method.value.params.length !== paramCount) {
@@ -1124,17 +1192,18 @@
this$1.raiseRecoverable(start, "getter should have no params")
else
this$1.raiseRecoverable(start, "setter should have exactly one param")
+ } else {
+ if (method.kind === "set" && method.value.params[0].type === "RestElement")
+ this$1.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params")
}
- if (method.kind === "set" && method.value.params[0].type === "RestElement")
- this$1.raise(method.value.params[0].start, "Setter cannot use rest params")
}
}
node.body = this.finishNode(classBody, "ClassBody")
return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
}
- pp$1.parseClassMethod = function(classBody, method, isGenerator) {
- method.value = this.parseMethod(isGenerator)
+ pp$1.parseClassMethod = function(classBody, method, isGenerator, isAsync) {
+ method.value = this.parseMethod(isGenerator, isAsync)
classBody.body.push(this.finishNode(method, "MethodDefinition"))
}
@@ -1148,7 +1217,7 @@
// Parses module export declaration.
- pp$1.parseExport = function(node) {
+ pp$1.parseExport = function(node, exports) {
var this$1 = this;
this.next()
@@ -1160,6 +1229,7 @@
return this.finishNode(node, "ExportAllDeclaration")
}
if (this.eat(tt._default)) { // export default ...
+ this.checkExport(exports, "default", this.lastTokStart)
var parens = this.type == tt.parenL
var expr = this.parseMaybeAssign()
var needsSemi = true
@@ -1179,11 +1249,15 @@
// export var|const|let|function|class ...
if (this.shouldParseExportStatement()) {
node.declaration = this.parseStatement(true)
+ if (node.declaration.type === "VariableDeclaration")
+ this.checkVariableExport(exports, node.declaration.declarations)
+ else
+ this.checkExport(exports, node.declaration.id.name, node.declaration.id.start)
node.specifiers = []
node.source = null
} else { // export { x, y as z } [from '...']
node.declaration = null
- node.specifiers = this.parseExportSpecifiers()
+ node.specifiers = this.parseExportSpecifiers(exports)
if (this.eatContextual("from")) {
node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
} else {
@@ -1201,13 +1275,48 @@
return this.finishNode(node, "ExportNamedDeclaration")
}
+ pp$1.checkExport = function(exports, name, pos) {
+ if (!exports) return
+ if (Object.prototype.hasOwnProperty.call(exports, name))
+ this.raiseRecoverable(pos, "Duplicate export '" + name + "'")
+ exports[name] = true
+ }
+
+ pp$1.checkPatternExport = function(exports, pat) {
+ var this$1 = this;
+
+ var type = pat.type
+ if (type == "Identifier")
+ this.checkExport(exports, pat.name, pat.start)
+ else if (type == "ObjectPattern")
+ for (var i = 0; i < pat.properties.length; ++i)
+ this$1.checkPatternExport(exports, pat.properties[i].value)
+ else if (type == "ArrayPattern")
+ for (var i$1 = 0; i$1 < pat.elements.length; ++i$1) {
+ var elt = pat.elements[i$1]
+ if (elt) this$1.checkPatternExport(exports, elt)
+ }
+ else if (type == "AssignmentPattern")
+ this.checkPatternExport(exports, pat.left)
+ else if (type == "ParenthesizedExpression")
+ this.checkPatternExport(exports, pat.expression)
+ }
+
+ pp$1.checkVariableExport = function(exports, decls) {
+ var this$1 = this;
+
+ if (!exports) return
+ for (var i = 0; i < decls.length; i++)
+ this$1.checkPatternExport(exports, decls[i].id)
+ }
+
pp$1.shouldParseExportStatement = function() {
- return this.type.keyword || this.isLet()
+ return this.type.keyword || this.isLet() || this.isAsyncFunction()
}
// Parses a comma-separated list of module exports.
- pp$1.parseExportSpecifiers = function() {
+ pp$1.parseExportSpecifiers = function(exports) {
var this$1 = this;
var nodes = [], first = true
@@ -1222,6 +1331,7 @@
var node = this$1.startNode()
node.local = this$1.parseIdent(this$1.type === tt._default)
node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local
+ this$1.checkExport(exports, node.exported.name, node.exported.start)
nodes.push(this$1.finishNode(node, "ExportSpecifier"))
}
return nodes
@@ -1281,7 +1391,7 @@
} else {
node$2.local = node$2.imported
if (this$1.isKeyword(node$2.local.name)) this$1.unexpected(node$2.local.start)
- if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raise(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved")
+ if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raiseRecoverable(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved")
}
this$1.checkLVal(node$2.local, true)
nodes.push(this$1.finishNode(node$2, "ImportSpecifier"))
@@ -1299,7 +1409,11 @@
if (this.options.ecmaVersion >= 6 && node) {
switch (node.type) {
- case "Identifier":
+ case "Identifier":
+ if (this.inAsync && node.name === "await")
+ this.raise(node.start, "Can not use 'await' as identifier inside an async function")
+ break
+
case "ObjectPattern":
case "ArrayPattern":
break
@@ -1322,6 +1436,7 @@
if (node.operator === "=") {
node.type = "AssignmentPattern"
delete node.operator
+ this.toAssignable(node.left, isBinding)
// falls through to AssignmentPattern
} else {
this.raise(node.left.end, "Only '=' operator can be used for specifying default value.")
@@ -1329,8 +1444,6 @@
}
case "AssignmentPattern":
- if (node.right.type === "YieldExpression")
- this.raise(node.right.start, "Yield expression cannot be a default value")
break
case "ParenthesizedExpression":
@@ -1675,7 +1788,10 @@
var this$1 = this;
var startPos = this.start, startLoc = this.startLoc, expr
- if (this.type.prefix) {
+ if (this.inAsync && this.isContextual("await")) {
+ expr = this.parseAwait(refDestructuringErrors)
+ sawUnary = true
+ } else if (this.type.prefix) {
var node = this.startNode(), update = this.type === tt.incDec
node.operator = this.value
node.prefix = true
@@ -1722,6 +1838,7 @@
var this$1 = this;
for (;;) {
+ var maybeAsyncArrow = this$1.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && !this$1.canInsertSemicolon()
if (this$1.eat(tt.dot)) {
var node = this$1.startNodeAt(startPos, startLoc)
node.object = base
@@ -1736,9 +1853,23 @@
this$1.expect(tt.bracketR)
base = this$1.finishNode(node$1, "MemberExpression")
} else if (!noCalls && this$1.eat(tt.parenL)) {
+ var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this$1.yieldPos, oldAwaitPos = this$1.awaitPos
+ this$1.yieldPos = 0
+ this$1.awaitPos = 0
+ var exprList = this$1.parseExprList(tt.parenR, this$1.options.ecmaVersion >= 8, false, refDestructuringErrors)
+ if (maybeAsyncArrow && !this$1.canInsertSemicolon() && this$1.eat(tt.arrow)) {
+ this$1.checkPatternErrors(refDestructuringErrors, true)
+ this$1.checkYieldAwaitInDefaultParams()
+ this$1.yieldPos = oldYieldPos
+ this$1.awaitPos = oldAwaitPos
+ return this$1.parseArrowExpression(this$1.startNodeAt(startPos, startLoc), exprList, true)
+ }
+ this$1.checkExpressionErrors(refDestructuringErrors, true)
+ this$1.yieldPos = oldYieldPos || this$1.yieldPos
+ this$1.awaitPos = oldAwaitPos || this$1.awaitPos
var node$2 = this$1.startNodeAt(startPos, startLoc)
node$2.callee = base
- node$2.arguments = this$1.parseExprList(tt.parenR, false)
+ node$2.arguments = exprList
base = this$1.finishNode(node$2, "CallExpression")
} else if (this$1.type === tt.backQuote) {
var node$3 = this$1.startNodeAt(startPos, startLoc)
@@ -1772,8 +1903,18 @@
case tt.name:
var startPos = this.start, startLoc = this.startLoc
var id = this.parseIdent(this.type !== tt.name)
- if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow))
- return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id])
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && !this.canInsertSemicolon() && this.eat(tt._function))
+ return this.parseFunction(this.startNodeAt(startPos, startLoc), false, false, true)
+ if (canBeArrow && !this.canInsertSemicolon()) {
+ if (this.eat(tt.arrow))
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false)
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === tt.name) {
+ id = this.parseIdent()
+ if (this.canInsertSemicolon() || !this.eat(tt.arrow))
+ this.unexpected()
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true)
+ }
+ }
return id
case tt.regexp:
@@ -1841,18 +1982,24 @@
pp$3.parseParenAndDistinguishExpression = function(canBeArrow) {
var this$1 = this;
- var startPos = this.start, startLoc = this.startLoc, val
+ var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8
if (this.options.ecmaVersion >= 6) {
this.next()
var innerStartPos = this.start, innerStartLoc = this.startLoc
- var exprList = [], first = true
- var refDestructuringErrors = new DestructuringErrors, spreadStart, innerParenStart
+ var exprList = [], first = true, lastIsComma = false
+ var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart, innerParenStart
+ this.yieldPos = 0
+ this.awaitPos = 0
while (this.type !== tt.parenR) {
first ? first = false : this$1.expect(tt.comma)
- if (this$1.type === tt.ellipsis) {
+ if (allowTrailingComma && this$1.afterTrailingComma(tt.parenR, true)) {
+ lastIsComma = true
+ break
+ } else if (this$1.type === tt.ellipsis) {
spreadStart = this$1.start
exprList.push(this$1.parseParenItem(this$1.parseRest()))
+ if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element")
break
} else {
if (this$1.type === tt.parenL && !innerParenStart) {
@@ -1866,13 +2013,18 @@
if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {
this.checkPatternErrors(refDestructuringErrors, true)
+ this.checkYieldAwaitInDefaultParams()
if (innerParenStart) this.unexpected(innerParenStart)
+ this.yieldPos = oldYieldPos
+ this.awaitPos = oldAwaitPos
return this.parseParenArrowList(startPos, startLoc, exprList)
}
- if (!exprList.length) this.unexpected(this.lastTokStart)
+ if (!exprList.length || lastIsComma) this.unexpected(this.lastTokStart)
if (spreadStart) this.unexpected(spreadStart)
this.checkExpressionErrors(refDestructuringErrors, true)
+ this.yieldPos = oldYieldPos || this.yieldPos
+ this.awaitPos = oldAwaitPos || this.awaitPos
if (exprList.length > 1) {
val = this.startNodeAt(innerStartPos, innerStartLoc)
@@ -1924,7 +2076,7 @@
}
var startPos = this.start, startLoc = this.startLoc
node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true)
- if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false)
+ if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false)
else node.arguments = empty$1
return this.finishNode(node, "NewExpression")
}
@@ -1974,7 +2126,7 @@
if (this$1.afterTrailingComma(tt.braceR)) break
} else first = false
- var prop = this$1.startNode(), isGenerator, startPos, startLoc
+ var prop = this$1.startNode(), isGenerator, isAsync, startPos, startLoc
if (this$1.options.ecmaVersion >= 6) {
prop.method = false
prop.shorthand = false
@@ -1986,14 +2138,25 @@
isGenerator = this$1.eat(tt.star)
}
this$1.parsePropertyName(prop)
- this$1.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors)
+ if (!isPattern && this$1.options.ecmaVersion >= 8 && !isGenerator && !prop.computed &&
+ prop.key.type === "Identifier" && prop.key.name === "async" && this$1.type !== tt.parenL &&
+ this$1.type !== tt.colon && !this$1.canInsertSemicolon()) {
+ isAsync = true
+ this$1.parsePropertyName(prop, refDestructuringErrors)
+ } else {
+ isAsync = false
+ }
+ this$1.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors)
this$1.checkPropClash(prop, propHash)
node.properties.push(this$1.finishNode(prop, "Property"))
}
return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
}
- pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) {
+ pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors) {
+ if ((isGenerator || isAsync) && this.type === tt.colon)
+ this.unexpected()
+
if (this.eat(tt.colon)) {
prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors)
prop.kind = "init"
@@ -2001,11 +2164,11 @@
if (isPattern) this.unexpected()
prop.kind = "init"
prop.method = true
- prop.value = this.parseMethod(isGenerator)
+ prop.value = this.parseMethod(isGenerator, isAsync)
} else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
(prop.key.name === "get" || prop.key.name === "set") &&
(this.type != tt.comma && this.type != tt.braceR)) {
- if (isGenerator || isPattern) this.unexpected()
+ if (isGenerator || isAsync || isPattern) this.unexpected()
prop.kind = prop.key.name
this.parsePropertyName(prop)
prop.value = this.parseMethod(false)
@@ -2016,13 +2179,15 @@
this.raiseRecoverable(start, "getter should have no params")
else
this.raiseRecoverable(start, "setter should have exactly one param")
+ } else {
+ if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
+ this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
}
- if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
- this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
} else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
if (this.keywords.test(prop.key.name) ||
- (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) ||
- (this.inGenerator && prop.key.name == "yield"))
+ (this.strict ? this.reservedWordsStrict : this.reservedWords).test(prop.key.name) ||
+ (this.inGenerator && prop.key.name == "yield") ||
+ (this.inAsync && prop.key.name == "await"))
this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property")
prop.kind = "init"
if (isPattern) {
@@ -2060,32 +2225,59 @@
node.generator = false
node.expression = false
}
+ if (this.options.ecmaVersion >= 8)
+ node.async = false
}
// Parse object or class method.
- pp$3.parseMethod = function(isGenerator) {
- var node = this.startNode(), oldInGen = this.inGenerator
- this.inGenerator = isGenerator
+ pp$3.parseMethod = function(isGenerator, isAsync) {
+ var node = this.startNode(), oldInGen = this.inGenerator, oldInAsync = this.inAsync, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos
+
this.initFunction(node)
- this.expect(tt.parenL)
- node.params = this.parseBindingList(tt.parenR, false, false)
if (this.options.ecmaVersion >= 6)
node.generator = isGenerator
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+
+ this.inGenerator = node.generator
+ this.inAsync = node.async
+ this.yieldPos = 0
+ this.awaitPos = 0
+
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8)
+ this.checkYieldAwaitInDefaultParams()
this.parseFunctionBody(node, false)
+
this.inGenerator = oldInGen
+ this.inAsync = oldInAsync
+ this.yieldPos = oldYieldPos
+ this.awaitPos = oldAwaitPos
return this.finishNode(node, "FunctionExpression")
}
// Parse arrow function expression with given parameters.
- pp$3.parseArrowExpression = function(node, params) {
- var oldInGen = this.inGenerator
- this.inGenerator = false
+ pp$3.parseArrowExpression = function(node, params, isAsync) {
+ var oldInGen = this.inGenerator, oldInAsync = this.inAsync, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos
+
this.initFunction(node)
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+
+ this.inGenerator = false
+ this.inAsync = node.async
+ this.yieldPos = 0
+ this.awaitPos = 0
+
node.params = this.toAssignableList(params, true)
this.parseFunctionBody(node, true)
+
this.inGenerator = oldInGen
+ this.inAsync = oldInAsync
+ this.yieldPos = oldYieldPos
+ this.awaitPos = oldAwaitPos
return this.finishNode(node, "ArrowFunctionExpression")
}
@@ -2110,31 +2302,36 @@
// 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 useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null;
+ var useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null
+ if (useStrict && this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params))
+ this.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list")
+
if (this.strict || useStrict) {
var oldStrict = this.strict
this.strict = true
if (node.id)
this.checkLVal(node.id, true)
- this.checkParams(node, useStrict)
+ this.checkParams(node)
this.strict = oldStrict
- } else if (isArrowFunction) {
- this.checkParams(node, useStrict)
+ } else if (isArrowFunction || !this.isSimpleParamList(node.params)) {
+ this.checkParams(node)
}
}
+ pp$3.isSimpleParamList = function(params) {
+ for (var i = 0; i < params.length; i++)
+ if (params[i].type !== "Identifier") return false
+ return true
+ }
+
// Checks function params for various disallowed patterns such as using "eval"
// or "arguments" and duplicate parameters.
- pp$3.checkParams = function(node, useStrict) {
- var this$1 = this;
+ pp$3.checkParams = function(node) {
+ var this$1 = this;
- var nameHash = {}
- for (var i = 0; i < node.params.length; i++) {
- if (useStrict && this$1.options.ecmaVersion >= 7 && node.params[i].type !== "Identifier")
- this$1.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list");
- this$1.checkLVal(node.params[i], true, nameHash)
- }
+ var nameHash = {}
+ for (var i = 0; i < node.params.length; i++) this$1.checkLVal(node.params[i], true, nameHash)
}
// Parses a comma-separated list of expressions, and returns them as
@@ -2159,7 +2356,7 @@
else if (this$1.type === tt.ellipsis) {
elt = this$1.parseSpread(refDestructuringErrors)
if (this$1.type === tt.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) {
- refDestructuringErrors.trailingComma = this$1.lastTokStart
+ refDestructuringErrors.trailingComma = this$1.start
}
} else
elt = this$1.parseMaybeAssign(false, refDestructuringErrors)
@@ -2180,8 +2377,10 @@
(this.options.ecmaVersion >= 6 ||
this.input.slice(this.start, this.end).indexOf("\\") == -1))
this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved")
- if (!liberal && this.inGenerator && this.value === "yield")
+ if (this.inGenerator && this.value === "yield")
this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator")
+ if (this.inAsync && this.value === "await")
+ this.raiseRecoverable(this.start, "Can not use 'await' as identifier inside an async function")
node.name = this.value
} else if (liberal && this.type.keyword) {
node.name = this.type.keyword
@@ -2195,6 +2394,8 @@
// Parses yield expression inside generator.
pp$3.parseYield = function() {
+ if (!this.yieldPos) this.yieldPos = this.start
+
var node = this.startNode()
this.next()
if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) {
@@ -2207,6 +2408,15 @@
return this.finishNode(node, "YieldExpression")
}
+ pp$3.parseAwait = function() {
+ if (!this.awaitPos) this.awaitPos = this.start
+
+ var node = this.startNode()
+ this.next()
+ node.argument = this.parseMaybeUnary(null, true)
+ return this.finishNode(node, "AwaitExpression")
+ }
+
var pp$4 = Parser.prototype
// This function is used to raise exceptions on parse errors. It
@@ -2875,14 +3085,15 @@
pp$7.readNumber = function(startsWithDot) {
var start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48
if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number")
+ if (octal && this.pos == start + 1) octal = false
var next = this.input.charCodeAt(this.pos)
- if (next === 46) { // '.'
+ if (next === 46 && !octal) { // '.'
++this.pos
this.readInt(10)
isFloat = true
next = this.input.charCodeAt(this.pos)
}
- if (next === 69 || next === 101) { // 'eE'
+ if ((next === 69 || next === 101) && !octal) { // 'eE'
next = this.input.charCodeAt(++this.pos)
if (next === 43 || next === 45) ++this.pos // '+-'
if (this.readInt(10) === null) this.raise(start, "Invalid number")
@@ -3085,7 +3296,7 @@
return this.finishToken(type, word)
}
- var version = "3.3.0"
+ var version = "4.0.3"
// The main exported interface (under `self.acorn` when in the
// browser) is a `parse` function that takes a code string and
@@ -3115,10 +3326,20 @@
return new Parser(options, input)
}
+ // This is a terrible kludge to support the existing, pre-ES6
+ // interface where the loose parser module retroactively adds exports
+ // to this module.
+ function addLooseExports(parse, Parser, plugins) {
+ exports.parse_dammit = parse
+ exports.LooseParser = Parser
+ exports.pluginsLoose = plugins
+ }
+
exports.version = version;
exports.parse = parse;
exports.parseExpressionAt = parseExpressionAt;
exports.tokenizer = tokenizer;
+ exports.addLooseExports = addLooseExports;
exports.Parser = Parser;
exports.plugins = plugins;
exports.defaultOptions = defaultOptions;
diff --git a/tools/eslint/node_modules/acorn/dist/acorn_loose.es.js b/tools/eslint/node_modules/acorn/dist/acorn_loose.es.js
index cb114d8cbd..a6b4940309 100644
--- a/tools/eslint/node_modules/acorn/dist/acorn_loose.es.js
+++ b/tools/eslint/node_modules/acorn/dist/acorn_loose.es.js
@@ -1,4 +1,4 @@
-import acorn, { SourceLocation, tokTypes, tokenizer, Node, lineBreak, isNewLine, getLineInfo, Token, lineBreakG } from './acorn.js';
+import { defaultOptions, addLooseExports, SourceLocation, tokTypes, tokenizer, Node, lineBreak, isNewLine, getLineInfo, Token, lineBreakG } from './acorn.js';
// Registered plugins
var pluginsLoose = {}
@@ -19,6 +19,7 @@ var LooseParser = function LooseParser(input, options) {
this.curIndent = 0
this.curLineStart = 0
this.nextLineStart = this.lineEnd(this.curLineStart) + 1
+ this.inAsync = false
// Load plugins
this.options.pluginsLoose = options.pluginsLoose || {}
this.loadPlugins(this.options.pluginsLoose)
@@ -456,6 +457,11 @@ lp$1.parseStatement = function() {
return this.parseExport()
default:
+ if (this.toks.isAsyncFunction()) {
+ this.next()
+ this.next()
+ return this.parseFunction(node, true, true)
+ }
var expr = this.parseExpression()
if (isDummy(expr)) {
this.next()
@@ -549,7 +555,7 @@ lp$1.parseClass = function(isStatement) {
if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
while (!this.closes(tokTypes.braceR, indent, line)) {
if (this$1.semicolon()) continue
- var method = this$1.startNode(), isGenerator
+ var method = this$1.startNode(), isGenerator, isAsync
if (this$1.options.ecmaVersion >= 6) {
method.static = false
isGenerator = this$1.eat(tokTypes.star)
@@ -564,6 +570,14 @@ lp$1.parseClass = function(isStatement) {
} else {
method.static = false
}
+ if (!method.computed &&
+ method.key.type === "Identifier" && method.key.name === "async" && this$1.tok.type !== tokTypes.parenL &&
+ !this$1.canInsertSemicolon()) {
+ this$1.parsePropertyName(method)
+ isAsync = true
+ } else {
+ isAsync = false
+ }
if (this$1.options.ecmaVersion >= 5 && method.key.type === "Identifier" &&
!method.computed && (method.key.name === "get" || method.key.name === "set") &&
this$1.tok.type !== tokTypes.parenL && this$1.tok.type !== tokTypes.braceL) {
@@ -571,14 +585,14 @@ lp$1.parseClass = function(isStatement) {
this$1.parsePropertyName(method)
method.value = this$1.parseMethod(false)
} else {
- if (!method.computed && !method.static && !isGenerator && (
+ if (!method.computed && !method.static && !isGenerator && !isAsync && (
method.key.type === "Identifier" && method.key.name === "constructor" ||
method.key.type === "Literal" && method.key.value === "constructor")) {
method.kind = "constructor"
} else {
method.kind = "method"
}
- method.value = this$1.parseMethod(isGenerator)
+ method.value = this$1.parseMethod(isGenerator, isAsync)
}
node.body.body.push(this$1.finishNode(method, "MethodDefinition"))
}
@@ -594,15 +608,21 @@ lp$1.parseClass = function(isStatement) {
return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
}
-lp$1.parseFunction = function(node, isStatement) {
+lp$1.parseFunction = function(node, isStatement, isAsync) {
+ var oldInAsync = this.inAsync
this.initFunction(node)
if (this.options.ecmaVersion >= 6) {
node.generator = this.eat(tokTypes.star)
}
+ if (this.options.ecmaVersion >= 8) {
+ node.async = !!isAsync
+ }
if (this.tok.type === tokTypes.name) node.id = this.parseIdent()
else if (isStatement) node.id = this.dummyIdent()
+ this.inAsync = node.async
node.params = this.parseFunctionParams()
node.body = this.parseBlock()
+ this.inAsync = oldInAsync
return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
}
@@ -614,8 +634,10 @@ lp$1.parseExport = function() {
return this.finishNode(node, "ExportAllDeclaration")
}
if (this.eat(tokTypes._default)) {
+ // export default (function foo() {}) // This is FunctionExpression.
+ var isParenL = this.tok.type === tokTypes.parenL
var expr = this.parseMaybeAssign()
- if (expr.id) {
+ if (!isParenL && expr.id) {
switch (expr.type) {
case "FunctionExpression": expr.type = "FunctionDeclaration"; break
case "ClassExpression": expr.type = "ClassDeclaration"; break
@@ -625,7 +647,7 @@ lp$1.parseExport = function() {
this.semicolon()
return this.finishNode(node, "ExportDefaultDeclaration")
}
- if (this.tok.type.keyword || this.toks.isLet()) {
+ if (this.tok.type.keyword || this.toks.isLet() || this.toks.isAsyncFunction()) {
node.declaration = this.parseStatement()
node.specifiers = []
node.source = null
@@ -832,7 +854,10 @@ lp$2.parseMaybeUnary = function(sawUnary) {
var this$1 = this;
var start = this.storeCurrentPos(), expr
- if (this.tok.type.prefix) {
+ if (this.options.ecmaVersion >= 8 && this.inAsync && this.toks.isContextual("await")) {
+ expr = this.parseAwait()
+ sawUnary = true
+ } else if (this.tok.type.prefix) {
var node = this.startNode(), update = this.tok.type === tokTypes.incDec
if (!update) sawUnary = true
node.operator = this.tok.value
@@ -885,6 +910,8 @@ lp$2.parseSubscripts = function(base, start, noCalls, startIndent, line) {
return base
}
+ var maybeAsyncArrow = base.type === "Identifier" && base.name === "async" && !this$1.canInsertSemicolon()
+
if (this$1.eat(tokTypes.dot)) {
var node = this$1.startNodeAt(start)
node.object = base
@@ -905,9 +932,12 @@ lp$2.parseSubscripts = function(base, start, noCalls, startIndent, line) {
this$1.expect(tokTypes.bracketR)
base = this$1.finishNode(node$1, "MemberExpression")
} else if (!noCalls && this$1.tok.type == tokTypes.parenL) {
+ var exprList = this$1.parseExprList(tokTypes.parenR)
+ if (maybeAsyncArrow && this$1.eat(tokTypes.arrow))
+ return this$1.parseArrowExpression(this$1.startNodeAt(start), exprList, true)
var node$2 = this$1.startNodeAt(start)
node$2.callee = base
- node$2.arguments = this$1.parseExprList(tokTypes.parenR)
+ node$2.arguments = exprList
base = this$1.finishNode(node$2, "CallExpression")
} else if (this$1.tok.type == tokTypes.backQuote) {
var node$3 = this$1.startNodeAt(start)
@@ -933,7 +963,16 @@ lp$2.parseExprAtom = function() {
case tokTypes.name:
var start = this.storeCurrentPos()
var id = this.parseIdent()
- return this.eat(tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id
+ var isAsync = false
+ if (id.name === "async" && !this.canInsertSemicolon()) {
+ if (this.eat(tokTypes._function))
+ return this.parseFunction(this.startNodeAt(start), false, true)
+ if (this.tok.type === tokTypes.name) {
+ id = this.parseIdent()
+ isAsync = true
+ }
+ }
+ return this.eat(tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id], isAsync) : id
case tokTypes.regexp:
node = this.startNode()
@@ -964,7 +1003,11 @@ lp$2.parseExprAtom = function() {
var inner = this.parseExpression()
this.expect(tokTypes.parenR)
if (this.eat(tokTypes.arrow)) {
- return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (isDummy(inner) ? [] : [inner]))
+ // (a,)=>a // SequenceExpression makes dummy in the last hole. Drop the dummy.
+ var params = inner.expressions || [inner]
+ if (params.length && isDummy(params[params.length - 1]))
+ params.pop()
+ return this.parseArrowExpression(this.startNodeAt(parenStart), params)
}
if (this.options.preserveParens) {
var par = this.startNodeAt(parenStart)
@@ -1064,7 +1107,7 @@ lp$2.parseObj = function() {
this.eat(tokTypes.braceL)
if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
while (!this.closes(tokTypes.braceR, indent, line)) {
- var prop = this$1.startNode(), isGenerator, start
+ var prop = this$1.startNode(), isGenerator, isAsync, start
if (this$1.options.ecmaVersion >= 6) {
start = this$1.storeCurrentPos()
prop.method = false
@@ -1072,6 +1115,14 @@ lp$2.parseObj = function() {
isGenerator = this$1.eat(tokTypes.star)
}
this$1.parsePropertyName(prop)
+ if (!prop.computed &&
+ prop.key.type === "Identifier" && prop.key.name === "async" && this$1.tok.type !== tokTypes.parenL &&
+ this$1.tok.type !== tokTypes.colon && !this$1.canInsertSemicolon()) {
+ this$1.parsePropertyName(prop)
+ isAsync = true
+ } else {
+ isAsync = false
+ }
if (isDummy(prop.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(tokTypes.comma); continue }
if (this$1.eat(tokTypes.colon)) {
prop.kind = "init"
@@ -1079,7 +1130,7 @@ lp$2.parseObj = function() {
} else if (this$1.options.ecmaVersion >= 6 && (this$1.tok.type === tokTypes.parenL || this$1.tok.type === tokTypes.braceL)) {
prop.kind = "init"
prop.method = true
- prop.value = this$1.parseMethod(isGenerator)
+ prop.value = this$1.parseMethod(isGenerator, isAsync)
} else if (this$1.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
!prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
(this$1.tok.type != tokTypes.comma && this$1.tok.type != tokTypes.braceR)) {
@@ -1151,6 +1202,8 @@ lp$2.initFunction = function(node) {
node.generator = false
node.expression = false
}
+ if (this.options.ecmaVersion >= 8)
+ node.async = false
}
// Convert existing expression atom to assignable pattern
@@ -1198,21 +1251,31 @@ lp$2.parseFunctionParams = function(params) {
return this.toAssignableList(params, true)
}
-lp$2.parseMethod = function(isGenerator) {
- var node = this.startNode()
+lp$2.parseMethod = function(isGenerator, isAsync) {
+ var node = this.startNode(), oldInAsync = this.inAsync
this.initFunction(node)
+ if (this.options.ecmaVersion >= 6)
+ node.generator = !!isGenerator
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+ this.inAsync = node.async
node.params = this.parseFunctionParams()
- node.generator = isGenerator || false
node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== tokTypes.braceL
node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ this.inAsync = oldInAsync
return this.finishNode(node, "FunctionExpression")
}
-lp$2.parseArrowExpression = function(node, params) {
+lp$2.parseArrowExpression = function(node, params, isAsync) {
+ var oldInAsync = this.inAsync
this.initFunction(node)
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+ this.inAsync = node.async
node.params = this.toAssignableList(params, true)
node.expression = this.tok.type !== tokTypes.braceL
node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ this.inAsync = oldInAsync
return this.finishNode(node, "ArrowFunctionExpression")
}
@@ -1246,7 +1309,14 @@ lp$2.parseExprList = function(close, allowEmpty) {
return elts
}
-acorn.defaultOptions.tabSize = 4
+lp$2.parseAwait = function() {
+ var node = this.startNode()
+ this.next()
+ node.argument = this.parseMaybeUnary()
+ return this.finishNode(node, "AwaitExpression")
+}
+
+defaultOptions.tabSize = 4
function parse_dammit(input, options) {
var p = new LooseParser(input, options)
@@ -1254,8 +1324,6 @@ function parse_dammit(input, options) {
return p.parseTopLevel()
}
-acorn.parse_dammit = parse_dammit
-acorn.LooseParser = LooseParser
-acorn.pluginsLoose = pluginsLoose
+addLooseExports(parse_dammit, LooseParser, pluginsLoose)
export { parse_dammit, LooseParser, pluginsLoose }; \ No newline at end of file
diff --git a/tools/eslint/node_modules/acorn/dist/acorn_loose.js b/tools/eslint/node_modules/acorn/dist/acorn_loose.js
index 26b9e48128..4137048cc2 100644
--- a/tools/eslint/node_modules/acorn/dist/acorn_loose.js
+++ b/tools/eslint/node_modules/acorn/dist/acorn_loose.js
@@ -2,9 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('./acorn.js')) :
typeof define === 'function' && define.amd ? define(['exports', './acorn.js'], factory) :
(factory((global.acorn = global.acorn || {}, global.acorn.loose = global.acorn.loose || {}),global.acorn));
-}(this, function (exports,acorn) { 'use strict';
-
- var acorn__default = 'default' in acorn ? acorn['default'] : acorn;
+}(this, function (exports,__acorn_js) { 'use strict';
// Registered plugins
var pluginsLoose = {}
@@ -12,26 +10,27 @@
var LooseParser = function LooseParser(input, options) {
if ( options === void 0 ) options = {};
- this.toks = acorn.tokenizer(input, options)
+ this.toks = __acorn_js.tokenizer(input, options)
this.options = this.toks.options
this.input = this.toks.input
- this.tok = this.last = {type: acorn.tokTypes.eof, start: 0, end: 0}
+ this.tok = this.last = {type: __acorn_js.tokTypes.eof, start: 0, end: 0}
if (this.options.locations) {
var here = this.toks.curPosition()
- this.tok.loc = new acorn.SourceLocation(this.toks, here, here)
+ this.tok.loc = new __acorn_js.SourceLocation(this.toks, here, here)
}
this.ahead = [] // Tokens ahead
this.context = [] // Indentation contexted
this.curIndent = 0
this.curLineStart = 0
this.nextLineStart = this.lineEnd(this.curLineStart) + 1
+ this.inAsync = false
// Load plugins
this.options.pluginsLoose = options.pluginsLoose || {}
this.loadPlugins(this.options.pluginsLoose)
};
LooseParser.prototype.startNode = function startNode () {
- return new acorn.Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
+ return new __acorn_js.Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
};
LooseParser.prototype.storeCurrentPos = function storeCurrentPos () {
@@ -40,9 +39,9 @@
LooseParser.prototype.startNodeAt = function startNodeAt (pos) {
if (this.options.locations) {
- return new acorn.Node(this.toks, pos[0], pos[1])
+ return new __acorn_js.Node(this.toks, pos[0], pos[1])
} else {
- return new acorn.Node(this.toks, pos)
+ return new __acorn_js.Node(this.toks, pos)
}
};
@@ -64,7 +63,7 @@
dummy.loc.end = dummy.loc.start
if (this.options.ranges)
dummy.range[1] = dummy.start
- this.last = {type: acorn.tokTypes.name, start: dummy.start, end: dummy.start, loc: dummy.loc}
+ this.last = {type: __acorn_js.tokTypes.name, start: dummy.start, end: dummy.start, loc: dummy.loc}
return dummy
};
@@ -90,20 +89,20 @@
};
LooseParser.prototype.isContextual = function isContextual (name) {
- return this.tok.type === acorn.tokTypes.name && this.tok.value === name
+ return this.tok.type === __acorn_js.tokTypes.name && this.tok.value === name
};
LooseParser.prototype.eatContextual = function eatContextual (name) {
- return this.tok.value === name && this.eat(acorn.tokTypes.name)
+ return this.tok.value === name && this.eat(__acorn_js.tokTypes.name)
};
LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon () {
- return this.tok.type === acorn.tokTypes.eof || this.tok.type === acorn.tokTypes.braceR ||
- acorn.lineBreak.test(this.input.slice(this.last.end, this.tok.start))
+ return this.tok.type === __acorn_js.tokTypes.eof || this.tok.type === __acorn_js.tokTypes.braceR ||
+ __acorn_js.lineBreak.test(this.input.slice(this.last.end, this.tok.start))
};
LooseParser.prototype.semicolon = function semicolon () {
- return this.eat(acorn.tokTypes.semi)
+ return this.eat(__acorn_js.tokTypes.semi)
};
LooseParser.prototype.expect = function expect (type) {
@@ -127,7 +126,7 @@
};
LooseParser.prototype.lineEnd = function lineEnd (pos) {
- while (pos < this.input.length && !acorn.isNewLine(this.input.charCodeAt(pos))) ++pos
+ while (pos < this.input.length && !__acorn_js.isNewLine(this.input.charCodeAt(pos))) ++pos
return pos
};
@@ -143,7 +142,7 @@
};
LooseParser.prototype.closes = function closes (closeTok, indent, line, blockHeuristic) {
- if (this.tok.type === closeTok || this.tok.type === acorn.tokTypes.eof) return true
+ if (this.tok.type === closeTok || this.tok.type === __acorn_js.tokTypes.eof) return true
return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() &&
(!blockHeuristic || this.nextLineStart >= this.input.length ||
this.indentationAfter(this.nextLineStart) < indent)
@@ -176,7 +175,7 @@
var lp = LooseParser.prototype
function isSpace(ch) {
- return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || acorn.isNewLine(ch)
+ return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || __acorn_js.isNewLine(ch)
}
lp.next = function() {
@@ -203,13 +202,13 @@
for (;;) {
try {
this$1.toks.next()
- if (this$1.toks.type === acorn.tokTypes.dot &&
+ if (this$1.toks.type === __acorn_js.tokTypes.dot &&
this$1.input.substr(this$1.toks.end, 1) === "." &&
this$1.options.ecmaVersion >= 6) {
this$1.toks.end++
- this$1.toks.type = acorn.tokTypes.ellipsis
+ this$1.toks.type = __acorn_js.tokTypes.ellipsis
}
- return new acorn.Token(this$1.toks)
+ return new __acorn_js.Token(this$1.toks)
} catch(e) {
if (!(e instanceof SyntaxError)) throw e
@@ -218,14 +217,14 @@
if (/unterminated/i.test(msg)) {
pos = this$1.lineEnd(e.pos + 1)
if (/string/.test(msg)) {
- replace = {start: e.pos, end: pos, type: acorn.tokTypes.string, value: this$1.input.slice(e.pos + 1, pos)}
+ replace = {start: e.pos, end: pos, type: __acorn_js.tokTypes.string, value: this$1.input.slice(e.pos + 1, pos)}
} else if (/regular expr/i.test(msg)) {
var re = this$1.input.slice(e.pos, pos)
try { re = new RegExp(re) } catch(e) {}
- replace = {start: e.pos, end: pos, type: acorn.tokTypes.regexp, value: re}
+ replace = {start: e.pos, end: pos, type: __acorn_js.tokTypes.regexp, value: re}
} else if (/template/.test(msg)) {
replace = {start: e.pos, end: pos,
- type: acorn.tokTypes.template,
+ type: __acorn_js.tokTypes.template,
value: this$1.input.slice(e.pos, pos)}
} else {
replace = false
@@ -235,7 +234,7 @@
} else if (/character escape|expected hexadecimal/i.test(msg)) {
while (pos < this.input.length) {
var ch = this$1.input.charCodeAt(pos++)
- if (ch === 34 || ch === 39 || acorn.isNewLine(ch)) break
+ if (ch === 34 || ch === 39 || __acorn_js.isNewLine(ch)) break
}
} else if (/unexpected character/i.test(msg)) {
pos++
@@ -246,13 +245,13 @@
throw e
}
this$1.resetTo(pos)
- if (replace === true) replace = {start: pos, end: pos, type: acorn.tokTypes.name, value: "✖"}
+ if (replace === true) replace = {start: pos, end: pos, type: __acorn_js.tokTypes.name, value: "✖"}
if (replace) {
if (this$1.options.locations)
- replace.loc = new acorn.SourceLocation(
+ replace.loc = new __acorn_js.SourceLocation(
this$1.toks,
- acorn.getLineInfo(this$1.input, replace.start),
- acorn.getLineInfo(this$1.input, replace.end))
+ __acorn_js.getLineInfo(this$1.input, replace.start),
+ __acorn_js.getLineInfo(this$1.input, replace.end))
return replace
}
}
@@ -270,9 +269,9 @@
if (this.options.locations) {
this.toks.curLine = 1
- this.toks.lineStart = acorn.lineBreakG.lastIndex = 0
+ this.toks.lineStart = __acorn_js.lineBreakG.lastIndex = 0
var match
- while ((match = acorn.lineBreakG.exec(this.input)) && match.index < pos) {
+ while ((match = __acorn_js.lineBreakG.exec(this.input)) && match.index < pos) {
++this$1.toks.curLine
this$1.toks.lineStart = match.index + match[0].length
}
@@ -294,9 +293,9 @@
lp$1.parseTopLevel = function() {
var this$1 = this;
- var node = this.startNodeAt(this.options.locations ? [0, acorn.getLineInfo(this.input, 0)] : 0)
+ var node = this.startNodeAt(this.options.locations ? [0, __acorn_js.getLineInfo(this.input, 0)] : 0)
node.body = []
- while (this.tok.type !== acorn.tokTypes.eof) node.body.push(this$1.parseStatement())
+ while (this.tok.type !== __acorn_js.tokTypes.eof) node.body.push(this$1.parseStatement())
this.last = this.tok
if (this.options.ecmaVersion >= 6) {
node.sourceType = this.options.sourceType
@@ -310,88 +309,88 @@
var starttype = this.tok.type, node = this.startNode(), kind
if (this.toks.isLet()) {
- starttype = acorn.tokTypes._var
+ starttype = __acorn_js.tokTypes._var
kind = "let"
}
switch (starttype) {
- case acorn.tokTypes._break: case acorn.tokTypes._continue:
+ case __acorn_js.tokTypes._break: case __acorn_js.tokTypes._continue:
this.next()
- var isBreak = starttype === acorn.tokTypes._break
+ var isBreak = starttype === __acorn_js.tokTypes._break
if (this.semicolon() || this.canInsertSemicolon()) {
node.label = null
} else {
- node.label = this.tok.type === acorn.tokTypes.name ? this.parseIdent() : null
+ node.label = this.tok.type === __acorn_js.tokTypes.name ? this.parseIdent() : null
this.semicolon()
}
return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
- case acorn.tokTypes._debugger:
+ case __acorn_js.tokTypes._debugger:
this.next()
this.semicolon()
return this.finishNode(node, "DebuggerStatement")
- case acorn.tokTypes._do:
+ case __acorn_js.tokTypes._do:
this.next()
node.body = this.parseStatement()
- node.test = this.eat(acorn.tokTypes._while) ? this.parseParenExpression() : this.dummyIdent()
+ node.test = this.eat(__acorn_js.tokTypes._while) ? this.parseParenExpression() : this.dummyIdent()
this.semicolon()
return this.finishNode(node, "DoWhileStatement")
- case acorn.tokTypes._for:
+ case __acorn_js.tokTypes._for:
this.next()
this.pushCx()
- this.expect(acorn.tokTypes.parenL)
- if (this.tok.type === acorn.tokTypes.semi) return this.parseFor(node, null)
+ this.expect(__acorn_js.tokTypes.parenL)
+ if (this.tok.type === __acorn_js.tokTypes.semi) return this.parseFor(node, null)
var isLet = this.toks.isLet()
- if (isLet || this.tok.type === acorn.tokTypes._var || this.tok.type === acorn.tokTypes._const) {
+ if (isLet || this.tok.type === __acorn_js.tokTypes._var || this.tok.type === __acorn_js.tokTypes._const) {
var init$1 = this.parseVar(true, isLet ? "let" : this.tok.value)
- if (init$1.declarations.length === 1 && (this.tok.type === acorn.tokTypes._in || this.isContextual("of"))) {
+ if (init$1.declarations.length === 1 && (this.tok.type === __acorn_js.tokTypes._in || this.isContextual("of"))) {
return this.parseForIn(node, init$1)
}
return this.parseFor(node, init$1)
}
var init = this.parseExpression(true)
- if (this.tok.type === acorn.tokTypes._in || this.isContextual("of"))
+ if (this.tok.type === __acorn_js.tokTypes._in || this.isContextual("of"))
return this.parseForIn(node, this.toAssignable(init))
return this.parseFor(node, init)
- case acorn.tokTypes._function:
+ case __acorn_js.tokTypes._function:
this.next()
return this.parseFunction(node, true)
- case acorn.tokTypes._if:
+ case __acorn_js.tokTypes._if:
this.next()
node.test = this.parseParenExpression()
node.consequent = this.parseStatement()
- node.alternate = this.eat(acorn.tokTypes._else) ? this.parseStatement() : null
+ node.alternate = this.eat(__acorn_js.tokTypes._else) ? this.parseStatement() : null
return this.finishNode(node, "IfStatement")
- case acorn.tokTypes._return:
+ case __acorn_js.tokTypes._return:
this.next()
- if (this.eat(acorn.tokTypes.semi) || this.canInsertSemicolon()) node.argument = null
+ if (this.eat(__acorn_js.tokTypes.semi) || this.canInsertSemicolon()) node.argument = null
else { node.argument = this.parseExpression(); this.semicolon() }
return this.finishNode(node, "ReturnStatement")
- case acorn.tokTypes._switch:
+ case __acorn_js.tokTypes._switch:
var blockIndent = this.curIndent, line = this.curLineStart
this.next()
node.discriminant = this.parseParenExpression()
node.cases = []
this.pushCx()
- this.expect(acorn.tokTypes.braceL)
+ this.expect(__acorn_js.tokTypes.braceL)
var cur
- while (!this.closes(acorn.tokTypes.braceR, blockIndent, line, true)) {
- if (this$1.tok.type === acorn.tokTypes._case || this$1.tok.type === acorn.tokTypes._default) {
- var isCase = this$1.tok.type === acorn.tokTypes._case
+ while (!this.closes(__acorn_js.tokTypes.braceR, blockIndent, line, true)) {
+ if (this$1.tok.type === __acorn_js.tokTypes._case || this$1.tok.type === __acorn_js.tokTypes._default) {
+ var isCase = this$1.tok.type === __acorn_js.tokTypes._case
if (cur) this$1.finishNode(cur, "SwitchCase")
node.cases.push(cur = this$1.startNode())
cur.consequent = []
this$1.next()
if (isCase) cur.test = this$1.parseExpression()
else cur.test = null
- this$1.expect(acorn.tokTypes.colon)
+ this$1.expect(__acorn_js.tokTypes.colon)
} else {
if (!cur) {
node.cases.push(cur = this$1.startNode())
@@ -403,71 +402,76 @@
}
if (cur) this.finishNode(cur, "SwitchCase")
this.popCx()
- this.eat(acorn.tokTypes.braceR)
+ this.eat(__acorn_js.tokTypes.braceR)
return this.finishNode(node, "SwitchStatement")
- case acorn.tokTypes._throw:
+ case __acorn_js.tokTypes._throw:
this.next()
node.argument = this.parseExpression()
this.semicolon()
return this.finishNode(node, "ThrowStatement")
- case acorn.tokTypes._try:
+ case __acorn_js.tokTypes._try:
this.next()
node.block = this.parseBlock()
node.handler = null
- if (this.tok.type === acorn.tokTypes._catch) {
+ if (this.tok.type === __acorn_js.tokTypes._catch) {
var clause = this.startNode()
this.next()
- this.expect(acorn.tokTypes.parenL)
+ this.expect(__acorn_js.tokTypes.parenL)
clause.param = this.toAssignable(this.parseExprAtom(), true)
- this.expect(acorn.tokTypes.parenR)
+ this.expect(__acorn_js.tokTypes.parenR)
clause.body = this.parseBlock()
node.handler = this.finishNode(clause, "CatchClause")
}
- node.finalizer = this.eat(acorn.tokTypes._finally) ? this.parseBlock() : null
+ node.finalizer = this.eat(__acorn_js.tokTypes._finally) ? this.parseBlock() : null
if (!node.handler && !node.finalizer) return node.block
return this.finishNode(node, "TryStatement")
- case acorn.tokTypes._var:
- case acorn.tokTypes._const:
+ case __acorn_js.tokTypes._var:
+ case __acorn_js.tokTypes._const:
return this.parseVar(false, kind || this.tok.value)
- case acorn.tokTypes._while:
+ case __acorn_js.tokTypes._while:
this.next()
node.test = this.parseParenExpression()
node.body = this.parseStatement()
return this.finishNode(node, "WhileStatement")
- case acorn.tokTypes._with:
+ case __acorn_js.tokTypes._with:
this.next()
node.object = this.parseParenExpression()
node.body = this.parseStatement()
return this.finishNode(node, "WithStatement")
- case acorn.tokTypes.braceL:
+ case __acorn_js.tokTypes.braceL:
return this.parseBlock()
- case acorn.tokTypes.semi:
+ case __acorn_js.tokTypes.semi:
this.next()
return this.finishNode(node, "EmptyStatement")
- case acorn.tokTypes._class:
+ case __acorn_js.tokTypes._class:
return this.parseClass(true)
- case acorn.tokTypes._import:
+ case __acorn_js.tokTypes._import:
return this.parseImport()
- case acorn.tokTypes._export:
+ case __acorn_js.tokTypes._export:
return this.parseExport()
default:
+ if (this.toks.isAsyncFunction()) {
+ this.next()
+ this.next()
+ return this.parseFunction(node, true, true)
+ }
var expr = this.parseExpression()
if (isDummy(expr)) {
this.next()
- if (this.tok.type === acorn.tokTypes.eof) return this.finishNode(node, "EmptyStatement")
+ if (this.tok.type === __acorn_js.tokTypes.eof) return this.finishNode(node, "EmptyStatement")
return this.parseStatement()
- } else if (starttype === acorn.tokTypes.name && expr.type === "Identifier" && this.eat(acorn.tokTypes.colon)) {
+ } else if (starttype === __acorn_js.tokTypes.name && expr.type === "Identifier" && this.eat(__acorn_js.tokTypes.colon)) {
node.body = this.parseStatement()
node.label = expr
return this.finishNode(node, "LabeledStatement")
@@ -484,34 +488,34 @@
var node = this.startNode()
this.pushCx()
- this.expect(acorn.tokTypes.braceL)
+ this.expect(__acorn_js.tokTypes.braceL)
var blockIndent = this.curIndent, line = this.curLineStart
node.body = []
- while (!this.closes(acorn.tokTypes.braceR, blockIndent, line, true))
+ while (!this.closes(__acorn_js.tokTypes.braceR, blockIndent, line, true))
node.body.push(this$1.parseStatement())
this.popCx()
- this.eat(acorn.tokTypes.braceR)
+ this.eat(__acorn_js.tokTypes.braceR)
return this.finishNode(node, "BlockStatement")
}
lp$1.parseFor = function(node, init) {
node.init = init
node.test = node.update = null
- if (this.eat(acorn.tokTypes.semi) && this.tok.type !== acorn.tokTypes.semi) node.test = this.parseExpression()
- if (this.eat(acorn.tokTypes.semi) && this.tok.type !== acorn.tokTypes.parenR) node.update = this.parseExpression()
+ if (this.eat(__acorn_js.tokTypes.semi) && this.tok.type !== __acorn_js.tokTypes.semi) node.test = this.parseExpression()
+ if (this.eat(__acorn_js.tokTypes.semi) && this.tok.type !== __acorn_js.tokTypes.parenR) node.update = this.parseExpression()
this.popCx()
- this.expect(acorn.tokTypes.parenR)
+ this.expect(__acorn_js.tokTypes.parenR)
node.body = this.parseStatement()
return this.finishNode(node, "ForStatement")
}
lp$1.parseForIn = function(node, init) {
- var type = this.tok.type === acorn.tokTypes._in ? "ForInStatement" : "ForOfStatement"
+ var type = this.tok.type === __acorn_js.tokTypes._in ? "ForInStatement" : "ForOfStatement"
this.next()
node.left = init
node.right = this.parseExpression()
this.popCx()
- this.expect(acorn.tokTypes.parenR)
+ this.expect(__acorn_js.tokTypes.parenR)
node.body = this.parseStatement()
return this.finishNode(node, type)
}
@@ -526,9 +530,9 @@
do {
var decl = this$1.startNode()
decl.id = this$1.options.ecmaVersion >= 6 ? this$1.toAssignable(this$1.parseExprAtom(), true) : this$1.parseIdent()
- decl.init = this$1.eat(acorn.tokTypes.eq) ? this$1.parseMaybeAssign(noIn) : null
+ decl.init = this$1.eat(__acorn_js.tokTypes.eq) ? this$1.parseMaybeAssign(noIn) : null
node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"))
- } while (this.eat(acorn.tokTypes.comma))
+ } while (this.eat(__acorn_js.tokTypes.comma))
if (!node.declarations.length) {
var decl$1 = this.startNode()
decl$1.id = this.dummyIdent()
@@ -543,53 +547,61 @@
var node = this.startNode()
this.next()
- if (this.tok.type === acorn.tokTypes.name) node.id = this.parseIdent()
+ if (this.tok.type === __acorn_js.tokTypes.name) node.id = this.parseIdent()
else if (isStatement) node.id = this.dummyIdent()
else node.id = null
- node.superClass = this.eat(acorn.tokTypes._extends) ? this.parseExpression() : null
+ node.superClass = this.eat(__acorn_js.tokTypes._extends) ? this.parseExpression() : null
node.body = this.startNode()
node.body.body = []
this.pushCx()
var indent = this.curIndent + 1, line = this.curLineStart
- this.eat(acorn.tokTypes.braceL)
+ this.eat(__acorn_js.tokTypes.braceL)
if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
- while (!this.closes(acorn.tokTypes.braceR, indent, line)) {
+ while (!this.closes(__acorn_js.tokTypes.braceR, indent, line)) {
if (this$1.semicolon()) continue
- var method = this$1.startNode(), isGenerator
+ var method = this$1.startNode(), isGenerator, isAsync
if (this$1.options.ecmaVersion >= 6) {
method.static = false
- isGenerator = this$1.eat(acorn.tokTypes.star)
+ isGenerator = this$1.eat(__acorn_js.tokTypes.star)
}
this$1.parsePropertyName(method)
- if (isDummy(method.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(acorn.tokTypes.comma); continue }
+ if (isDummy(method.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(__acorn_js.tokTypes.comma); continue }
if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" &&
- (this$1.tok.type != acorn.tokTypes.parenL && this$1.tok.type != acorn.tokTypes.braceL)) {
+ (this$1.tok.type != __acorn_js.tokTypes.parenL && this$1.tok.type != __acorn_js.tokTypes.braceL)) {
method.static = true
- isGenerator = this$1.eat(acorn.tokTypes.star)
+ isGenerator = this$1.eat(__acorn_js.tokTypes.star)
this$1.parsePropertyName(method)
} else {
method.static = false
}
+ if (!method.computed &&
+ method.key.type === "Identifier" && method.key.name === "async" && this$1.tok.type !== __acorn_js.tokTypes.parenL &&
+ !this$1.canInsertSemicolon()) {
+ this$1.parsePropertyName(method)
+ isAsync = true
+ } else {
+ isAsync = false
+ }
if (this$1.options.ecmaVersion >= 5 && method.key.type === "Identifier" &&
!method.computed && (method.key.name === "get" || method.key.name === "set") &&
- this$1.tok.type !== acorn.tokTypes.parenL && this$1.tok.type !== acorn.tokTypes.braceL) {
+ this$1.tok.type !== __acorn_js.tokTypes.parenL && this$1.tok.type !== __acorn_js.tokTypes.braceL) {
method.kind = method.key.name
this$1.parsePropertyName(method)
method.value = this$1.parseMethod(false)
} else {
- if (!method.computed && !method.static && !isGenerator && (
+ if (!method.computed && !method.static && !isGenerator && !isAsync && (
method.key.type === "Identifier" && method.key.name === "constructor" ||
method.key.type === "Literal" && method.key.value === "constructor")) {
method.kind = "constructor"
} else {
method.kind = "method"
}
- method.value = this$1.parseMethod(isGenerator)
+ method.value = this$1.parseMethod(isGenerator, isAsync)
}
node.body.body.push(this$1.finishNode(method, "MethodDefinition"))
}
this.popCx()
- if (!this.eat(acorn.tokTypes.braceR)) {
+ if (!this.eat(__acorn_js.tokTypes.braceR)) {
// If there is no closing brace, make the node span to the start
// of the next token (this is useful for Tern)
this.last.end = this.tok.start
@@ -600,28 +612,36 @@
return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
}
- lp$1.parseFunction = function(node, isStatement) {
+ lp$1.parseFunction = function(node, isStatement, isAsync) {
+ var oldInAsync = this.inAsync
this.initFunction(node)
if (this.options.ecmaVersion >= 6) {
- node.generator = this.eat(acorn.tokTypes.star)
+ node.generator = this.eat(__acorn_js.tokTypes.star)
+ }
+ if (this.options.ecmaVersion >= 8) {
+ node.async = !!isAsync
}
- if (this.tok.type === acorn.tokTypes.name) node.id = this.parseIdent()
+ if (this.tok.type === __acorn_js.tokTypes.name) node.id = this.parseIdent()
else if (isStatement) node.id = this.dummyIdent()
+ this.inAsync = node.async
node.params = this.parseFunctionParams()
node.body = this.parseBlock()
+ this.inAsync = oldInAsync
return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
}
lp$1.parseExport = function() {
var node = this.startNode()
this.next()
- if (this.eat(acorn.tokTypes.star)) {
+ if (this.eat(__acorn_js.tokTypes.star)) {
node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString()
return this.finishNode(node, "ExportAllDeclaration")
}
- if (this.eat(acorn.tokTypes._default)) {
+ if (this.eat(__acorn_js.tokTypes._default)) {
+ // export default (function foo() {}) // This is FunctionExpression.
+ var isParenL = this.tok.type === __acorn_js.tokTypes.parenL
var expr = this.parseMaybeAssign()
- if (expr.id) {
+ if (!isParenL && expr.id) {
switch (expr.type) {
case "FunctionExpression": expr.type = "FunctionDeclaration"; break
case "ClassExpression": expr.type = "ClassDeclaration"; break
@@ -631,7 +651,7 @@
this.semicolon()
return this.finishNode(node, "ExportDefaultDeclaration")
}
- if (this.tok.type.keyword || this.toks.isLet()) {
+ if (this.tok.type.keyword || this.toks.isLet() || this.toks.isAsyncFunction()) {
node.declaration = this.parseStatement()
node.specifiers = []
node.source = null
@@ -647,20 +667,20 @@
lp$1.parseImport = function() {
var node = this.startNode()
this.next()
- if (this.tok.type === acorn.tokTypes.string) {
+ if (this.tok.type === __acorn_js.tokTypes.string) {
node.specifiers = []
node.source = this.parseExprAtom()
node.kind = ''
} else {
var elt
- if (this.tok.type === acorn.tokTypes.name && this.tok.value !== "from") {
+ if (this.tok.type === __acorn_js.tokTypes.name && this.tok.value !== "from") {
elt = this.startNode()
elt.local = this.parseIdent()
this.finishNode(elt, "ImportDefaultSpecifier")
- this.eat(acorn.tokTypes.comma)
+ this.eat(__acorn_js.tokTypes.comma)
}
node.specifiers = this.parseImportSpecifierList()
- node.source = this.eatContextual("from") && this.tok.type == acorn.tokTypes.string ? this.parseExprAtom() : this.dummyString()
+ node.source = this.eatContextual("from") && this.tok.type == __acorn_js.tokTypes.string ? this.parseExprAtom() : this.dummyString()
if (elt) node.specifiers.unshift(elt)
}
this.semicolon()
@@ -671,7 +691,7 @@
var this$1 = this;
var elts = []
- if (this.tok.type === acorn.tokTypes.star) {
+ if (this.tok.type === __acorn_js.tokTypes.star) {
var elt = this.startNode()
this.next()
elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent()
@@ -679,11 +699,11 @@
} else {
var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
this.pushCx()
- this.eat(acorn.tokTypes.braceL)
+ this.eat(__acorn_js.tokTypes.braceL)
if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
- while (!this.closes(acorn.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ while (!this.closes(__acorn_js.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
var elt$1 = this$1.startNode()
- if (this$1.eat(acorn.tokTypes.star)) {
+ if (this$1.eat(__acorn_js.tokTypes.star)) {
elt$1.local = this$1.eatContextual("as") ? this$1.parseIdent() : this$1.dummyIdent()
this$1.finishNode(elt$1, "ImportNamespaceSpecifier")
} else {
@@ -694,9 +714,9 @@
this$1.finishNode(elt$1, "ImportSpecifier")
}
elts.push(elt$1)
- this$1.eat(acorn.tokTypes.comma)
+ this$1.eat(__acorn_js.tokTypes.comma)
}
- this.eat(acorn.tokTypes.braceR)
+ this.eat(__acorn_js.tokTypes.braceR)
this.popCx()
}
return elts
@@ -708,9 +728,9 @@
var elts = []
var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
this.pushCx()
- this.eat(acorn.tokTypes.braceL)
+ this.eat(__acorn_js.tokTypes.braceL)
if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
- while (!this.closes(acorn.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
+ while (!this.closes(__acorn_js.tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
if (this$1.isContextual("from")) break
var elt = this$1.startNode()
elt.local = this$1.parseIdent()
@@ -718,9 +738,9 @@
elt.exported = this$1.eatContextual("as") ? this$1.parseIdent() : elt.local
this$1.finishNode(elt, "ExportSpecifier")
elts.push(elt)
- this$1.eat(acorn.tokTypes.comma)
+ this$1.eat(__acorn_js.tokTypes.comma)
}
- this.eat(acorn.tokTypes.braceR)
+ this.eat(__acorn_js.tokTypes.braceR)
this.popCx()
return elts
}
@@ -748,10 +768,10 @@
var start = this.storeCurrentPos()
var expr = this.parseMaybeAssign(noIn)
- if (this.tok.type === acorn.tokTypes.comma) {
+ if (this.tok.type === __acorn_js.tokTypes.comma) {
var node = this.startNodeAt(start)
node.expressions = [expr]
- while (this.eat(acorn.tokTypes.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn))
+ while (this.eat(__acorn_js.tokTypes.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn))
return this.finishNode(node, "SequenceExpression")
}
return expr
@@ -759,10 +779,10 @@
lp$2.parseParenExpression = function() {
this.pushCx()
- this.expect(acorn.tokTypes.parenL)
+ this.expect(__acorn_js.tokTypes.parenL)
var val = this.parseExpression()
this.popCx()
- this.expect(acorn.tokTypes.parenR)
+ this.expect(__acorn_js.tokTypes.parenR)
return val
}
@@ -770,11 +790,11 @@
if (this.toks.isContextual("yield")) {
var node = this.startNode()
this.next()
- if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type != acorn.tokTypes.star && !this.tok.type.startsExpr)) {
+ if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type != __acorn_js.tokTypes.star && !this.tok.type.startsExpr)) {
node.delegate = false
node.argument = null
} else {
- node.delegate = this.eat(acorn.tokTypes.star)
+ node.delegate = this.eat(__acorn_js.tokTypes.star)
node.argument = this.parseMaybeAssign()
}
return this.finishNode(node, "YieldExpression")
@@ -785,7 +805,7 @@
if (this.tok.type.isAssign) {
var node$1 = this.startNodeAt(start)
node$1.operator = this.tok.value
- node$1.left = this.tok.type === acorn.tokTypes.eq ? this.toAssignable(left) : this.checkLVal(left)
+ node$1.left = this.tok.type === __acorn_js.tokTypes.eq ? this.toAssignable(left) : this.checkLVal(left)
this.next()
node$1.right = this.parseMaybeAssign(noIn)
return this.finishNode(node$1, "AssignmentExpression")
@@ -796,11 +816,11 @@
lp$2.parseMaybeConditional = function(noIn) {
var start = this.storeCurrentPos()
var expr = this.parseExprOps(noIn)
- if (this.eat(acorn.tokTypes.question)) {
+ if (this.eat(__acorn_js.tokTypes.question)) {
var node = this.startNodeAt(start)
node.test = expr
node.consequent = this.parseMaybeAssign()
- node.alternate = this.expect(acorn.tokTypes.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent()
+ node.alternate = this.expect(__acorn_js.tokTypes.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent()
return this.finishNode(node, "ConditionalExpression")
}
return expr
@@ -815,7 +835,7 @@
lp$2.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) return left
var prec = this.tok.type.binop
- if (prec != null && (!noIn || this.tok.type !== acorn.tokTypes._in)) {
+ if (prec != null && (!noIn || this.tok.type !== __acorn_js.tokTypes._in)) {
if (prec > minPrec) {
var node = this.startNodeAt(start)
node.left = left
@@ -838,8 +858,11 @@
var this$1 = this;
var start = this.storeCurrentPos(), expr
- if (this.tok.type.prefix) {
- var node = this.startNode(), update = this.tok.type === acorn.tokTypes.incDec
+ if (this.options.ecmaVersion >= 8 && this.inAsync && this.toks.isContextual("await")) {
+ expr = this.parseAwait()
+ sawUnary = true
+ } else if (this.tok.type.prefix) {
+ var node = this.startNode(), update = this.tok.type === __acorn_js.tokTypes.incDec
if (!update) sawUnary = true
node.operator = this.tok.value
node.prefix = true
@@ -847,7 +870,7 @@
node.argument = this.parseMaybeUnary(true)
if (update) node.argument = this.checkLVal(node.argument)
expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
- } else if (this.tok.type === acorn.tokTypes.ellipsis) {
+ } else if (this.tok.type === __acorn_js.tokTypes.ellipsis) {
var node$1 = this.startNode()
this.next()
node$1.argument = this.parseMaybeUnary(sawUnary)
@@ -864,7 +887,7 @@
}
}
- if (!sawUnary && this.eat(acorn.tokTypes.starstar)) {
+ if (!sawUnary && this.eat(__acorn_js.tokTypes.starstar)) {
var node$3 = this.startNodeAt(start)
node$3.operator = "**"
node$3.left = expr
@@ -885,13 +908,15 @@
for (;;) {
if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine()) {
- if (this$1.tok.type == acorn.tokTypes.dot && this$1.curIndent == startIndent)
+ if (this$1.tok.type == __acorn_js.tokTypes.dot && this$1.curIndent == startIndent)
--startIndent
else
return base
}
- if (this$1.eat(acorn.tokTypes.dot)) {
+ var maybeAsyncArrow = base.type === "Identifier" && base.name === "async" && !this$1.canInsertSemicolon()
+
+ if (this$1.eat(__acorn_js.tokTypes.dot)) {
var node = this$1.startNodeAt(start)
node.object = base
if (this$1.curLineStart != line && this$1.curIndent <= startIndent && this$1.tokenStartsLine())
@@ -900,7 +925,7 @@
node.property = this$1.parsePropertyAccessor() || this$1.dummyIdent()
node.computed = false
base = this$1.finishNode(node, "MemberExpression")
- } else if (this$1.tok.type == acorn.tokTypes.bracketL) {
+ } else if (this$1.tok.type == __acorn_js.tokTypes.bracketL) {
this$1.pushCx()
this$1.next()
var node$1 = this$1.startNodeAt(start)
@@ -908,14 +933,17 @@
node$1.property = this$1.parseExpression()
node$1.computed = true
this$1.popCx()
- this$1.expect(acorn.tokTypes.bracketR)
+ this$1.expect(__acorn_js.tokTypes.bracketR)
base = this$1.finishNode(node$1, "MemberExpression")
- } else if (!noCalls && this$1.tok.type == acorn.tokTypes.parenL) {
+ } else if (!noCalls && this$1.tok.type == __acorn_js.tokTypes.parenL) {
+ var exprList = this$1.parseExprList(__acorn_js.tokTypes.parenR)
+ if (maybeAsyncArrow && this$1.eat(__acorn_js.tokTypes.arrow))
+ return this$1.parseArrowExpression(this$1.startNodeAt(start), exprList, true)
var node$2 = this$1.startNodeAt(start)
node$2.callee = base
- node$2.arguments = this$1.parseExprList(acorn.tokTypes.parenR)
+ node$2.arguments = exprList
base = this$1.finishNode(node$2, "CallExpression")
- } else if (this$1.tok.type == acorn.tokTypes.backQuote) {
+ } else if (this$1.tok.type == __acorn_js.tokTypes.backQuote) {
var node$3 = this$1.startNodeAt(start)
node$3.tag = base
node$3.quasi = this$1.parseTemplate()
@@ -929,19 +957,28 @@
lp$2.parseExprAtom = function() {
var node
switch (this.tok.type) {
- case acorn.tokTypes._this:
- case acorn.tokTypes._super:
- var type = this.tok.type === acorn.tokTypes._this ? "ThisExpression" : "Super"
+ case __acorn_js.tokTypes._this:
+ case __acorn_js.tokTypes._super:
+ var type = this.tok.type === __acorn_js.tokTypes._this ? "ThisExpression" : "Super"
node = this.startNode()
this.next()
return this.finishNode(node, type)
- case acorn.tokTypes.name:
+ case __acorn_js.tokTypes.name:
var start = this.storeCurrentPos()
var id = this.parseIdent()
- return this.eat(acorn.tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id
+ var isAsync = false
+ if (id.name === "async" && !this.canInsertSemicolon()) {
+ if (this.eat(__acorn_js.tokTypes._function))
+ return this.parseFunction(this.startNodeAt(start), false, true)
+ if (this.tok.type === __acorn_js.tokTypes.name) {
+ id = this.parseIdent()
+ isAsync = true
+ }
+ }
+ return this.eat(__acorn_js.tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id], isAsync) : id
- case acorn.tokTypes.regexp:
+ case __acorn_js.tokTypes.regexp:
node = this.startNode()
var val = this.tok.value
node.regex = {pattern: val.pattern, flags: val.flags}
@@ -950,27 +987,31 @@
this.next()
return this.finishNode(node, "Literal")
- case acorn.tokTypes.num: case acorn.tokTypes.string:
+ case __acorn_js.tokTypes.num: case __acorn_js.tokTypes.string:
node = this.startNode()
node.value = this.tok.value
node.raw = this.input.slice(this.tok.start, this.tok.end)
this.next()
return this.finishNode(node, "Literal")
- case acorn.tokTypes._null: case acorn.tokTypes._true: case acorn.tokTypes._false:
+ case __acorn_js.tokTypes._null: case __acorn_js.tokTypes._true: case __acorn_js.tokTypes._false:
node = this.startNode()
- node.value = this.tok.type === acorn.tokTypes._null ? null : this.tok.type === acorn.tokTypes._true
+ node.value = this.tok.type === __acorn_js.tokTypes._null ? null : this.tok.type === __acorn_js.tokTypes._true
node.raw = this.tok.type.keyword
this.next()
return this.finishNode(node, "Literal")
- case acorn.tokTypes.parenL:
+ case __acorn_js.tokTypes.parenL:
var parenStart = this.storeCurrentPos()
this.next()
var inner = this.parseExpression()
- this.expect(acorn.tokTypes.parenR)
- if (this.eat(acorn.tokTypes.arrow)) {
- return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (isDummy(inner) ? [] : [inner]))
+ this.expect(__acorn_js.tokTypes.parenR)
+ if (this.eat(__acorn_js.tokTypes.arrow)) {
+ // (a,)=>a // SequenceExpression makes dummy in the last hole. Drop the dummy.
+ var params = inner.expressions || [inner]
+ if (params.length && isDummy(params[params.length - 1]))
+ params.pop()
+ return this.parseArrowExpression(this.startNodeAt(parenStart), params)
}
if (this.options.preserveParens) {
var par = this.startNodeAt(parenStart)
@@ -979,26 +1020,26 @@
}
return inner
- case acorn.tokTypes.bracketL:
+ case __acorn_js.tokTypes.bracketL:
node = this.startNode()
- node.elements = this.parseExprList(acorn.tokTypes.bracketR, true)
+ node.elements = this.parseExprList(__acorn_js.tokTypes.bracketR, true)
return this.finishNode(node, "ArrayExpression")
- case acorn.tokTypes.braceL:
+ case __acorn_js.tokTypes.braceL:
return this.parseObj()
- case acorn.tokTypes._class:
+ case __acorn_js.tokTypes._class:
return this.parseClass()
- case acorn.tokTypes._function:
+ case __acorn_js.tokTypes._function:
node = this.startNode()
this.next()
return this.parseFunction(node, false)
- case acorn.tokTypes._new:
+ case __acorn_js.tokTypes._new:
return this.parseNew()
- case acorn.tokTypes.backQuote:
+ case __acorn_js.tokTypes.backQuote:
return this.parseTemplate()
default:
@@ -1009,15 +1050,15 @@
lp$2.parseNew = function() {
var node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart
var meta = this.parseIdent(true)
- if (this.options.ecmaVersion >= 6 && this.eat(acorn.tokTypes.dot)) {
+ if (this.options.ecmaVersion >= 6 && this.eat(__acorn_js.tokTypes.dot)) {
node.meta = meta
node.property = this.parseIdent(true)
return this.finishNode(node, "MetaProperty")
}
var start = this.storeCurrentPos()
node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line)
- if (this.tok.type == acorn.tokTypes.parenL) {
- node.arguments = this.parseExprList(acorn.tokTypes.parenR)
+ if (this.tok.type == __acorn_js.tokTypes.parenL) {
+ node.arguments = this.parseExprList(__acorn_js.tokTypes.parenR)
} else {
node.arguments = []
}
@@ -1031,7 +1072,7 @@
cooked: this.tok.value
}
this.next()
- elem.tail = this.tok.type === acorn.tokTypes.backQuote
+ elem.tail = this.tok.type === __acorn_js.tokTypes.backQuote
return this.finishNode(elem, "TemplateElement")
}
@@ -1046,7 +1087,7 @@
while (!curElt.tail) {
this$1.next()
node.expressions.push(this$1.parseExpression())
- if (this$1.expect(acorn.tokTypes.braceR)) {
+ if (this$1.expect(__acorn_js.tokTypes.braceR)) {
curElt = this$1.parseTemplateElement()
} else {
curElt = this$1.startNode()
@@ -1056,7 +1097,7 @@
}
node.quasis.push(curElt)
}
- this.expect(acorn.tokTypes.backQuote)
+ this.expect(__acorn_js.tokTypes.backQuote)
return this.finishNode(node, "TemplateLiteral")
}
@@ -1067,35 +1108,43 @@
node.properties = []
this.pushCx()
var indent = this.curIndent + 1, line = this.curLineStart
- this.eat(acorn.tokTypes.braceL)
+ this.eat(__acorn_js.tokTypes.braceL)
if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
- while (!this.closes(acorn.tokTypes.braceR, indent, line)) {
- var prop = this$1.startNode(), isGenerator, start
+ while (!this.closes(__acorn_js.tokTypes.braceR, indent, line)) {
+ var prop = this$1.startNode(), isGenerator, isAsync, start
if (this$1.options.ecmaVersion >= 6) {
start = this$1.storeCurrentPos()
prop.method = false
prop.shorthand = false
- isGenerator = this$1.eat(acorn.tokTypes.star)
+ isGenerator = this$1.eat(__acorn_js.tokTypes.star)
}
this$1.parsePropertyName(prop)
- if (isDummy(prop.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(acorn.tokTypes.comma); continue }
- if (this$1.eat(acorn.tokTypes.colon)) {
+ if (!prop.computed &&
+ prop.key.type === "Identifier" && prop.key.name === "async" && this$1.tok.type !== __acorn_js.tokTypes.parenL &&
+ this$1.tok.type !== __acorn_js.tokTypes.colon && !this$1.canInsertSemicolon()) {
+ this$1.parsePropertyName(prop)
+ isAsync = true
+ } else {
+ isAsync = false
+ }
+ if (isDummy(prop.key)) { if (isDummy(this$1.parseMaybeAssign())) this$1.next(); this$1.eat(__acorn_js.tokTypes.comma); continue }
+ if (this$1.eat(__acorn_js.tokTypes.colon)) {
prop.kind = "init"
prop.value = this$1.parseMaybeAssign()
- } else if (this$1.options.ecmaVersion >= 6 && (this$1.tok.type === acorn.tokTypes.parenL || this$1.tok.type === acorn.tokTypes.braceL)) {
+ } else if (this$1.options.ecmaVersion >= 6 && (this$1.tok.type === __acorn_js.tokTypes.parenL || this$1.tok.type === __acorn_js.tokTypes.braceL)) {
prop.kind = "init"
prop.method = true
- prop.value = this$1.parseMethod(isGenerator)
+ prop.value = this$1.parseMethod(isGenerator, isAsync)
} else if (this$1.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
!prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
- (this$1.tok.type != acorn.tokTypes.comma && this$1.tok.type != acorn.tokTypes.braceR)) {
+ (this$1.tok.type != __acorn_js.tokTypes.comma && this$1.tok.type != __acorn_js.tokTypes.braceR)) {
prop.kind = prop.key.name
this$1.parsePropertyName(prop)
prop.value = this$1.parseMethod(false)
} else {
prop.kind = "init"
if (this$1.options.ecmaVersion >= 6) {
- if (this$1.eat(acorn.tokTypes.eq)) {
+ if (this$1.eat(__acorn_js.tokTypes.eq)) {
var assign = this$1.startNodeAt(start)
assign.operator = "="
assign.left = prop.key
@@ -1110,10 +1159,10 @@
prop.shorthand = true
}
node.properties.push(this$1.finishNode(prop, "Property"))
- this$1.eat(acorn.tokTypes.comma)
+ this$1.eat(__acorn_js.tokTypes.comma)
}
this.popCx()
- if (!this.eat(acorn.tokTypes.braceR)) {
+ if (!this.eat(__acorn_js.tokTypes.braceR)) {
// If there is no closing brace, make the node span to the start
// of the next token (this is useful for Tern)
this.last.end = this.tok.start
@@ -1124,25 +1173,25 @@
lp$2.parsePropertyName = function(prop) {
if (this.options.ecmaVersion >= 6) {
- if (this.eat(acorn.tokTypes.bracketL)) {
+ if (this.eat(__acorn_js.tokTypes.bracketL)) {
prop.computed = true
prop.key = this.parseExpression()
- this.expect(acorn.tokTypes.bracketR)
+ this.expect(__acorn_js.tokTypes.bracketR)
return
} else {
prop.computed = false
}
}
- var key = (this.tok.type === acorn.tokTypes.num || this.tok.type === acorn.tokTypes.string) ? this.parseExprAtom() : this.parseIdent()
+ var key = (this.tok.type === __acorn_js.tokTypes.num || this.tok.type === __acorn_js.tokTypes.string) ? this.parseExprAtom() : this.parseIdent()
prop.key = key || this.dummyIdent()
}
lp$2.parsePropertyAccessor = function() {
- if (this.tok.type === acorn.tokTypes.name || this.tok.type.keyword) return this.parseIdent()
+ if (this.tok.type === __acorn_js.tokTypes.name || this.tok.type.keyword) return this.parseIdent()
}
lp$2.parseIdent = function() {
- var name = this.tok.type === acorn.tokTypes.name ? this.tok.value : this.tok.type.keyword
+ var name = this.tok.type === __acorn_js.tokTypes.name ? this.tok.value : this.tok.type.keyword
if (!name) return this.dummyIdent()
var node = this.startNode()
this.next()
@@ -1157,6 +1206,8 @@
node.generator = false
node.expression = false
}
+ if (this.options.ecmaVersion >= 8)
+ node.async = false
}
// Convert existing expression atom to assignable pattern
@@ -1200,25 +1251,35 @@
}
lp$2.parseFunctionParams = function(params) {
- params = this.parseExprList(acorn.tokTypes.parenR)
+ params = this.parseExprList(__acorn_js.tokTypes.parenR)
return this.toAssignableList(params, true)
}
- lp$2.parseMethod = function(isGenerator) {
- var node = this.startNode()
+ lp$2.parseMethod = function(isGenerator, isAsync) {
+ var node = this.startNode(), oldInAsync = this.inAsync
this.initFunction(node)
+ if (this.options.ecmaVersion >= 6)
+ node.generator = !!isGenerator
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+ this.inAsync = node.async
node.params = this.parseFunctionParams()
- node.generator = isGenerator || false
- node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== acorn.tokTypes.braceL
+ node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== __acorn_js.tokTypes.braceL
node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ this.inAsync = oldInAsync
return this.finishNode(node, "FunctionExpression")
}
- lp$2.parseArrowExpression = function(node, params) {
+ lp$2.parseArrowExpression = function(node, params, isAsync) {
+ var oldInAsync = this.inAsync
this.initFunction(node)
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+ this.inAsync = node.async
node.params = this.toAssignableList(params, true)
- node.expression = this.tok.type !== acorn.tokTypes.braceL
+ node.expression = this.tok.type !== __acorn_js.tokTypes.braceL
node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ this.inAsync = oldInAsync
return this.finishNode(node, "ArrowFunctionExpression")
}
@@ -1229,7 +1290,7 @@
var indent = this.curIndent, line = this.curLineStart, elts = []
this.next() // Opening bracket
while (!this.closes(close, indent + 1, line)) {
- if (this$1.eat(acorn.tokTypes.comma)) {
+ if (this$1.eat(__acorn_js.tokTypes.comma)) {
elts.push(allowEmpty ? null : this$1.dummyIdent())
continue
}
@@ -1240,7 +1301,7 @@
} else {
elts.push(elt)
}
- this$1.eat(acorn.tokTypes.comma)
+ this$1.eat(__acorn_js.tokTypes.comma)
}
this.popCx()
if (!this.eat(close)) {
@@ -1252,7 +1313,14 @@
return elts
}
- acorn__default.defaultOptions.tabSize = 4
+ lp$2.parseAwait = function() {
+ var node = this.startNode()
+ this.next()
+ node.argument = this.parseMaybeUnary()
+ return this.finishNode(node, "AwaitExpression")
+ }
+
+ __acorn_js.defaultOptions.tabSize = 4
function parse_dammit(input, options) {
var p = new LooseParser(input, options)
@@ -1260,9 +1328,7 @@
return p.parseTopLevel()
}
- acorn__default.parse_dammit = parse_dammit
- acorn__default.LooseParser = LooseParser
- acorn__default.pluginsLoose = pluginsLoose
+ __acorn_js.addLooseExports(parse_dammit, LooseParser, pluginsLoose)
exports.parse_dammit = parse_dammit;
exports.LooseParser = LooseParser;
diff --git a/tools/eslint/node_modules/acorn/dist/walk.es.js b/tools/eslint/node_modules/acorn/dist/walk.es.js
index bef40937ac..b717ed996e 100644
--- a/tools/eslint/node_modules/acorn/dist/walk.es.js
+++ b/tools/eslint/node_modules/acorn/dist/walk.es.js
@@ -188,7 +188,7 @@ base.SwitchStatement = function (node, st, c) {
c(cs.consequent[j], st, "Statement")
}
}
-base.ReturnStatement = base.YieldExpression = function (node, st, c) {
+base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) {
if (node.argument) c(node.argument, st, "Expression")
}
base.ThrowStatement = base.SpreadElement =
diff --git a/tools/eslint/node_modules/acorn/dist/walk.js b/tools/eslint/node_modules/acorn/dist/walk.js
index 56079ac13f..250a3edc35 100644
--- a/tools/eslint/node_modules/acorn/dist/walk.js
+++ b/tools/eslint/node_modules/acorn/dist/walk.js
@@ -194,7 +194,7 @@
c(cs.consequent[j], st, "Statement")
}
}
- base.ReturnStatement = base.YieldExpression = function (node, st, c) {
+ base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) {
if (node.argument) c(node.argument, st, "Expression")
}
base.ThrowStatement = base.SpreadElement =
diff --git a/tools/eslint/node_modules/acorn/package.json b/tools/eslint/node_modules/acorn/package.json
index 4abe7ad8f2..0fde1a8ab9 100644
--- a/tools/eslint/node_modules/acorn/package.json
+++ b/tools/eslint/node_modules/acorn/package.json
@@ -2,26 +2,25 @@
"_args": [
[
{
- "raw": "acorn@^3.3.0",
+ "raw": "acorn@^4.0.1",
"scope": null,
"escapedName": "acorn",
"name": "acorn",
- "rawSpec": "^3.3.0",
- "spec": ">=3.3.0 <4.0.0",
+ "rawSpec": "^4.0.1",
+ "spec": ">=4.0.1 <5.0.0",
"type": "range"
},
"/Users/trott/io.js/tools/node_modules/espree"
]
],
- "_from": "acorn@>=3.3.0 <4.0.0",
- "_id": "acorn@3.3.0",
+ "_from": "acorn@>=4.0.1 <5.0.0",
+ "_id": "acorn@4.0.3",
"_inCache": true,
- "_installable": true,
"_location": "/acorn",
"_nodeVersion": "6.3.0",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/acorn-3.3.0.tgz_1469481913382_0.3856039580423385"
+ "tmp": "tmp/acorn-4.0.3.tgz_1474012883070_0.7297828732989728"
},
"_npmUser": {
"name": "marijn",
@@ -30,22 +29,21 @@
"_npmVersion": "3.10.3",
"_phantomChildren": {},
"_requested": {
- "raw": "acorn@^3.3.0",
+ "raw": "acorn@^4.0.1",
"scope": null,
"escapedName": "acorn",
"name": "acorn",
- "rawSpec": "^3.3.0",
- "spec": ">=3.3.0 <4.0.0",
+ "rawSpec": "^4.0.1",
+ "spec": ">=4.0.1 <5.0.0",
"type": "range"
},
"_requiredBy": [
- "/acorn-jsx",
"/espree"
],
- "_resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
- "_shasum": "45e37fb39e8da3f25baee3ff5369e2bb5f22017a",
+ "_resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.3.tgz",
+ "_shasum": "1a3e850b428e73ba6b09d1cc527f5aaad4d03ef1",
"_shrinkwrap": null,
- "_spec": "acorn@^3.3.0",
+ "_spec": "acorn@^4.0.1",
"_where": "/Users/trott/io.js/tools/node_modules/espree",
"bin": {
"acorn": "./bin/acorn"
@@ -100,9 +98,6 @@
"name": "Domenico Matteo"
},
{
- "name": "ForbesLindesay"
- },
- {
"name": "Forbes Lindesay"
},
{
@@ -214,10 +209,10 @@
"name": "Rich Harris"
},
{
- "name": "Rich-Harris"
+ "name": "Sebastian McKenzie"
},
{
- "name": "Sebastian McKenzie"
+ "name": "Simen Bekkhus"
},
{
"name": "Timothy Gu"
@@ -238,13 +233,13 @@
},
"directories": {},
"dist": {
- "shasum": "45e37fb39e8da3f25baee3ff5369e2bb5f22017a",
- "tarball": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz"
+ "shasum": "1a3e850b428e73ba6b09d1cc527f5aaad4d03ef1",
+ "tarball": "https://registry.npmjs.org/acorn/-/acorn-4.0.3.tgz"
},
"engines": {
"node": ">=0.4.0"
},
- "gitHead": "693c5fe9257c3e114a7097dc9196d6e484e52809",
+ "gitHead": "bb54adcdbceef01997a9549732139ca8f53a4e28",
"homepage": "https://github.com/ternjs/acorn",
"jsnext:main": "dist/acorn.es.js",
"license": "MIT",
@@ -276,5 +271,5 @@
"pretest": "npm run build",
"test": "node test/run.js"
},
- "version": "3.3.0"
+ "version": "4.0.3"
}
diff --git a/tools/eslint/node_modules/acorn/rollup/config.loose.js b/tools/eslint/node_modules/acorn/rollup/config.loose.js
index 11116950ee..273e7a9265 100644
--- a/tools/eslint/node_modules/acorn/rollup/config.loose.js
+++ b/tools/eslint/node_modules/acorn/rollup/config.loose.js
@@ -1,15 +1,17 @@
import buble from 'rollup-plugin-buble'
+import {resolve} from 'path'
+
+var acorn = resolve('src/index.js')
+var paths = {}, globals = {}
+paths[acorn] = './acorn.js'
+globals[acorn] = 'acorn'
export default {
entry: 'src/loose/index.js',
moduleName: 'acorn.loose',
- external: [ 'acorn' ],
- paths: {
- acorn: './acorn.js'
- },
- globals: {
- acorn: 'acorn'
- },
+ external: [ acorn ],
+ paths: paths,
+ globals: globals,
targets: [
{ dest: 'dist/acorn_loose.js', format: 'umd' },
{ dest: 'dist/acorn_loose.es.js', format: 'es' }
diff --git a/tools/eslint/node_modules/acorn/src/bin/acorn.js b/tools/eslint/node_modules/acorn/src/bin/acorn.js
index 2d9cff7c60..62e0dad188 100644
--- a/tools/eslint/node_modules/acorn/src/bin/acorn.js
+++ b/tools/eslint/node_modules/acorn/src/bin/acorn.js
@@ -7,7 +7,7 @@ const options = {}
function help(status) {
const print = (status == 0) ? console.log : console.error
- print("usage: " + basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7]")
+ print("usage: " + basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7|...|--ecma2015|--ecma2016|...]")
print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]")
process.exit(status)
}
@@ -16,10 +16,6 @@ for (let i = 2; i < process.argv.length; ++i) {
const arg = process.argv[i]
if ((arg == "-" || arg[0] != "-") && !infile) infile = arg
else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i]
- else if (arg == "--ecma3") options.ecmaVersion = 3
- else if (arg == "--ecma5") options.ecmaVersion = 5
- else if (arg == "--ecma6") options.ecmaVersion = 6
- else if (arg == "--ecma7") options.ecmaVersion = 7
else if (arg == "--locations") options.locations = true
else if (arg == "--allow-hash-bang") options.allowHashBang = true
else if (arg == "--silent") silent = true
@@ -27,7 +23,13 @@ for (let i = 2; i < process.argv.length; ++i) {
else if (arg == "--help") help(0)
else if (arg == "--tokenize") tokenize = true
else if (arg == "--module") options.sourceType = 'module'
- else help(1)
+ else {
+ let match = arg.match(/^--ecma(\d+)$/)
+ if (match)
+ options.ecmaVersion = +match[1]
+ else
+ help(1)
+ }
}
function run(code) {
diff --git a/tools/eslint/node_modules/acorn/src/expression.js b/tools/eslint/node_modules/acorn/src/expression.js
index 20b25cf055..f8a7e0fff9 100644
--- a/tools/eslint/node_modules/acorn/src/expression.js
+++ b/tools/eslint/node_modules/acorn/src/expression.js
@@ -180,7 +180,10 @@ pp.buildBinary = function(startPos, startLoc, left, right, op, logical) {
pp.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {
let startPos = this.start, startLoc = this.startLoc, expr
- if (this.type.prefix) {
+ if (this.inAsync && this.isContextual("await")) {
+ expr = this.parseAwait(refDestructuringErrors)
+ sawUnary = true
+ } else if (this.type.prefix) {
let node = this.startNode(), update = this.type === tt.incDec
node.operator = this.value
node.prefix = true
@@ -225,6 +228,7 @@ pp.parseExprSubscripts = function(refDestructuringErrors) {
pp.parseSubscripts = function(base, startPos, startLoc, noCalls) {
for (;;) {
+ let maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon()
if (this.eat(tt.dot)) {
let node = this.startNodeAt(startPos, startLoc)
node.object = base
@@ -239,9 +243,23 @@ pp.parseSubscripts = function(base, startPos, startLoc, noCalls) {
this.expect(tt.bracketR)
base = this.finishNode(node, "MemberExpression")
} else if (!noCalls && this.eat(tt.parenL)) {
+ let refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos
+ this.yieldPos = 0
+ this.awaitPos = 0
+ let exprList = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors)
+ if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {
+ this.checkPatternErrors(refDestructuringErrors, true)
+ this.checkYieldAwaitInDefaultParams()
+ this.yieldPos = oldYieldPos
+ this.awaitPos = oldAwaitPos
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true)
+ }
+ this.checkExpressionErrors(refDestructuringErrors, true)
+ this.yieldPos = oldYieldPos || this.yieldPos
+ this.awaitPos = oldAwaitPos || this.awaitPos
let node = this.startNodeAt(startPos, startLoc)
node.callee = base
- node.arguments = this.parseExprList(tt.parenR, false)
+ node.arguments = exprList
base = this.finishNode(node, "CallExpression")
} else if (this.type === tt.backQuote) {
let node = this.startNodeAt(startPos, startLoc)
@@ -275,8 +293,18 @@ pp.parseExprAtom = function(refDestructuringErrors) {
case tt.name:
let startPos = this.start, startLoc = this.startLoc
let id = this.parseIdent(this.type !== tt.name)
- if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow))
- return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id])
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && !this.canInsertSemicolon() && this.eat(tt._function))
+ return this.parseFunction(this.startNodeAt(startPos, startLoc), false, false, true)
+ if (canBeArrow && !this.canInsertSemicolon()) {
+ if (this.eat(tt.arrow))
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false)
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === tt.name) {
+ id = this.parseIdent()
+ if (this.canInsertSemicolon() || !this.eat(tt.arrow))
+ this.unexpected()
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true)
+ }
+ }
return id
case tt.regexp:
@@ -342,18 +370,24 @@ pp.parseParenExpression = function() {
}
pp.parseParenAndDistinguishExpression = function(canBeArrow) {
- let startPos = this.start, startLoc = this.startLoc, val
+ let startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8
if (this.options.ecmaVersion >= 6) {
this.next()
let innerStartPos = this.start, innerStartLoc = this.startLoc
- let exprList = [], first = true
- let refDestructuringErrors = new DestructuringErrors, spreadStart, innerParenStart
+ let exprList = [], first = true, lastIsComma = false
+ let refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart, innerParenStart
+ this.yieldPos = 0
+ this.awaitPos = 0
while (this.type !== tt.parenR) {
first ? first = false : this.expect(tt.comma)
- if (this.type === tt.ellipsis) {
+ if (allowTrailingComma && this.afterTrailingComma(tt.parenR, true)) {
+ lastIsComma = true
+ break
+ } else if (this.type === tt.ellipsis) {
spreadStart = this.start
exprList.push(this.parseParenItem(this.parseRest()))
+ if (this.type === tt.comma) this.raise(this.start, "Comma is not permitted after the rest element")
break
} else {
if (this.type === tt.parenL && !innerParenStart) {
@@ -367,13 +401,18 @@ pp.parseParenAndDistinguishExpression = function(canBeArrow) {
if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {
this.checkPatternErrors(refDestructuringErrors, true)
+ this.checkYieldAwaitInDefaultParams()
if (innerParenStart) this.unexpected(innerParenStart)
+ this.yieldPos = oldYieldPos
+ this.awaitPos = oldAwaitPos
return this.parseParenArrowList(startPos, startLoc, exprList)
}
- if (!exprList.length) this.unexpected(this.lastTokStart)
+ if (!exprList.length || lastIsComma) this.unexpected(this.lastTokStart)
if (spreadStart) this.unexpected(spreadStart)
this.checkExpressionErrors(refDestructuringErrors, true)
+ this.yieldPos = oldYieldPos || this.yieldPos
+ this.awaitPos = oldAwaitPos || this.awaitPos
if (exprList.length > 1) {
val = this.startNodeAt(innerStartPos, innerStartLoc)
@@ -425,7 +464,7 @@ pp.parseNew = function() {
}
let startPos = this.start, startLoc = this.startLoc
node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true)
- if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false)
+ if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false)
else node.arguments = empty
return this.finishNode(node, "NewExpression")
}
@@ -471,7 +510,7 @@ pp.parseObj = function(isPattern, refDestructuringErrors) {
if (this.afterTrailingComma(tt.braceR)) break
} else first = false
- let prop = this.startNode(), isGenerator, startPos, startLoc
+ let prop = this.startNode(), isGenerator, isAsync, startPos, startLoc
if (this.options.ecmaVersion >= 6) {
prop.method = false
prop.shorthand = false
@@ -483,14 +522,25 @@ pp.parseObj = function(isPattern, refDestructuringErrors) {
isGenerator = this.eat(tt.star)
}
this.parsePropertyName(prop)
- this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors)
+ if (!isPattern && this.options.ecmaVersion >= 8 && !isGenerator && !prop.computed &&
+ prop.key.type === "Identifier" && prop.key.name === "async" && this.type !== tt.parenL &&
+ this.type !== tt.colon && !this.canInsertSemicolon()) {
+ isAsync = true
+ this.parsePropertyName(prop, refDestructuringErrors)
+ } else {
+ isAsync = false
+ }
+ this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors)
this.checkPropClash(prop, propHash)
node.properties.push(this.finishNode(prop, "Property"))
}
return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
}
-pp.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) {
+pp.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors) {
+ if ((isGenerator || isAsync) && this.type === tt.colon)
+ this.unexpected()
+
if (this.eat(tt.colon)) {
prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors)
prop.kind = "init"
@@ -498,11 +548,11 @@ pp.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLo
if (isPattern) this.unexpected()
prop.kind = "init"
prop.method = true
- prop.value = this.parseMethod(isGenerator)
+ prop.value = this.parseMethod(isGenerator, isAsync)
} else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
(prop.key.name === "get" || prop.key.name === "set") &&
(this.type != tt.comma && this.type != tt.braceR)) {
- if (isGenerator || isPattern) this.unexpected()
+ if (isGenerator || isAsync || isPattern) this.unexpected()
prop.kind = prop.key.name
this.parsePropertyName(prop)
prop.value = this.parseMethod(false)
@@ -513,13 +563,15 @@ pp.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLo
this.raiseRecoverable(start, "getter should have no params")
else
this.raiseRecoverable(start, "setter should have exactly one param")
+ } else {
+ if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
+ this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
}
- if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
- this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
} else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
if (this.keywords.test(prop.key.name) ||
- (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) ||
- (this.inGenerator && prop.key.name == "yield"))
+ (this.strict ? this.reservedWordsStrict : this.reservedWords).test(prop.key.name) ||
+ (this.inGenerator && prop.key.name == "yield") ||
+ (this.inAsync && prop.key.name == "await"))
this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property")
prop.kind = "init"
if (isPattern) {
@@ -557,32 +609,59 @@ pp.initFunction = function(node) {
node.generator = false
node.expression = false
}
+ if (this.options.ecmaVersion >= 8)
+ node.async = false
}
// Parse object or class method.
-pp.parseMethod = function(isGenerator) {
- let node = this.startNode(), oldInGen = this.inGenerator
- this.inGenerator = isGenerator
+pp.parseMethod = function(isGenerator, isAsync) {
+ let node = this.startNode(), oldInGen = this.inGenerator, oldInAsync = this.inAsync, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos
+
this.initFunction(node)
- this.expect(tt.parenL)
- node.params = this.parseBindingList(tt.parenR, false, false)
if (this.options.ecmaVersion >= 6)
node.generator = isGenerator
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+
+ this.inGenerator = node.generator
+ this.inAsync = node.async
+ this.yieldPos = 0
+ this.awaitPos = 0
+
+ this.expect(tt.parenL)
+ node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8)
+ this.checkYieldAwaitInDefaultParams()
this.parseFunctionBody(node, false)
+
this.inGenerator = oldInGen
+ this.inAsync = oldInAsync
+ this.yieldPos = oldYieldPos
+ this.awaitPos = oldAwaitPos
return this.finishNode(node, "FunctionExpression")
}
// Parse arrow function expression with given parameters.
-pp.parseArrowExpression = function(node, params) {
- let oldInGen = this.inGenerator
- this.inGenerator = false
+pp.parseArrowExpression = function(node, params, isAsync) {
+ let oldInGen = this.inGenerator, oldInAsync = this.inAsync, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos
+
this.initFunction(node)
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+
+ this.inGenerator = false
+ this.inAsync = node.async
+ this.yieldPos = 0
+ this.awaitPos = 0
+
node.params = this.toAssignableList(params, true)
this.parseFunctionBody(node, true)
+
this.inGenerator = oldInGen
+ this.inAsync = oldInAsync
+ this.yieldPos = oldYieldPos
+ this.awaitPos = oldAwaitPos
return this.finishNode(node, "ArrowFunctionExpression")
}
@@ -607,29 +686,34 @@ pp.parseFunctionBody = function(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`.
- let useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null;
+ let useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null
+ if (useStrict && this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params))
+ this.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list")
+
if (this.strict || useStrict) {
let oldStrict = this.strict
this.strict = true
if (node.id)
this.checkLVal(node.id, true)
- this.checkParams(node, useStrict)
+ this.checkParams(node)
this.strict = oldStrict
- } else if (isArrowFunction) {
- this.checkParams(node, useStrict)
+ } else if (isArrowFunction || !this.isSimpleParamList(node.params)) {
+ this.checkParams(node)
}
}
+pp.isSimpleParamList = function(params) {
+ for (let i = 0; i < params.length; i++)
+ if (params[i].type !== "Identifier") return false
+ return true
+}
+
// Checks function params for various disallowed patterns such as using "eval"
// or "arguments" and duplicate parameters.
-pp.checkParams = function(node, useStrict) {
- let nameHash = {}
- for (let i = 0; i < node.params.length; i++) {
- if (useStrict && this.options.ecmaVersion >= 7 && node.params[i].type !== "Identifier")
- this.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list");
- this.checkLVal(node.params[i], true, nameHash)
- }
+pp.checkParams = function(node) {
+ let nameHash = {}
+ for (let i = 0; i < node.params.length; i++) this.checkLVal(node.params[i], true, nameHash)
}
// Parses a comma-separated list of expressions, and returns them as
@@ -652,7 +736,7 @@ pp.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructur
else if (this.type === tt.ellipsis) {
elt = this.parseSpread(refDestructuringErrors)
if (this.type === tt.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) {
- refDestructuringErrors.trailingComma = this.lastTokStart
+ refDestructuringErrors.trailingComma = this.start
}
} else
elt = this.parseMaybeAssign(false, refDestructuringErrors)
@@ -673,8 +757,10 @@ pp.parseIdent = function(liberal) {
(this.options.ecmaVersion >= 6 ||
this.input.slice(this.start, this.end).indexOf("\\") == -1))
this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved")
- if (!liberal && this.inGenerator && this.value === "yield")
+ if (this.inGenerator && this.value === "yield")
this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator")
+ if (this.inAsync && this.value === "await")
+ this.raiseRecoverable(this.start, "Can not use 'await' as identifier inside an async function")
node.name = this.value
} else if (liberal && this.type.keyword) {
node.name = this.type.keyword
@@ -688,6 +774,8 @@ pp.parseIdent = function(liberal) {
// Parses yield expression inside generator.
pp.parseYield = function() {
+ if (!this.yieldPos) this.yieldPos = this.start
+
let node = this.startNode()
this.next()
if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) {
@@ -699,3 +787,12 @@ pp.parseYield = function() {
}
return this.finishNode(node, "YieldExpression")
}
+
+pp.parseAwait = function() {
+ if (!this.awaitPos) this.awaitPos = this.start
+
+ let node = this.startNode()
+ this.next()
+ node.argument = this.parseMaybeUnary(null, true)
+ return this.finishNode(node, "AwaitExpression")
+}
diff --git a/tools/eslint/node_modules/acorn/src/identifier.js b/tools/eslint/node_modules/acorn/src/identifier.js
index e4a7415ac1..c65a24cf5f 100644
--- a/tools/eslint/node_modules/acorn/src/identifier.js
+++ b/tools/eslint/node_modules/acorn/src/identifier.js
@@ -4,7 +4,6 @@ export const reservedWords = {
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
5: "class enum extends super const export import",
6: "enum",
- 7: "enum",
strict: "implements interface let package private protected public static yield",
strictBind: "eval arguments"
}
diff --git a/tools/eslint/node_modules/acorn/src/index.js b/tools/eslint/node_modules/acorn/src/index.js
index 0a59bdf791..189bf5a269 100644
--- a/tools/eslint/node_modules/acorn/src/index.js
+++ b/tools/eslint/node_modules/acorn/src/index.js
@@ -36,7 +36,7 @@ export {isIdentifierChar, isIdentifierStart} from "./identifier"
export {Token} from "./tokenize"
export {isNewLine, lineBreak, lineBreakG} from "./whitespace"
-export const version = "3.3.0"
+export const version = "4.0.3"
// The main exported interface (under `self.acorn` when in the
// browser) is a `parse` function that takes a code string and
@@ -65,3 +65,13 @@ export function parseExpressionAt(input, pos, options) {
export function tokenizer(input, options) {
return new Parser(options, input)
}
+
+// This is a terrible kludge to support the existing, pre-ES6
+// interface where the loose parser module retroactively adds exports
+// to this module.
+export let parse_dammit, LooseParser, pluginsLoose
+export function addLooseExports(parse, Parser, plugins) {
+ parse_dammit = parse
+ LooseParser = Parser
+ pluginsLoose = plugins
+}
diff --git a/tools/eslint/node_modules/acorn/src/loose/expression.js b/tools/eslint/node_modules/acorn/src/loose/expression.js
index 52f409e5c9..1ef11b836d 100644
--- a/tools/eslint/node_modules/acorn/src/loose/expression.js
+++ b/tools/eslint/node_modules/acorn/src/loose/expression.js
@@ -1,6 +1,6 @@
import {LooseParser} from "./state"
import {isDummy} from "./parseutil"
-import {tokTypes as tt} from "acorn"
+import {tokTypes as tt} from "../index"
const lp = LooseParser.prototype
@@ -111,7 +111,10 @@ lp.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
lp.parseMaybeUnary = function(sawUnary) {
let start = this.storeCurrentPos(), expr
- if (this.tok.type.prefix) {
+ if (this.options.ecmaVersion >= 8 && this.inAsync && this.toks.isContextual("await")) {
+ expr = this.parseAwait()
+ sawUnary = true
+ } else if (this.tok.type.prefix) {
let node = this.startNode(), update = this.tok.type === tt.incDec
if (!update) sawUnary = true
node.operator = this.tok.value
@@ -162,6 +165,8 @@ lp.parseSubscripts = function(base, start, noCalls, startIndent, line) {
return base
}
+ let maybeAsyncArrow = base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon()
+
if (this.eat(tt.dot)) {
let node = this.startNodeAt(start)
node.object = base
@@ -182,9 +187,12 @@ lp.parseSubscripts = function(base, start, noCalls, startIndent, line) {
this.expect(tt.bracketR)
base = this.finishNode(node, "MemberExpression")
} else if (!noCalls && this.tok.type == tt.parenL) {
+ let exprList = this.parseExprList(tt.parenR)
+ if (maybeAsyncArrow && this.eat(tt.arrow))
+ return this.parseArrowExpression(this.startNodeAt(start), exprList, true)
let node = this.startNodeAt(start)
node.callee = base
- node.arguments = this.parseExprList(tt.parenR)
+ node.arguments = exprList
base = this.finishNode(node, "CallExpression")
} else if (this.tok.type == tt.backQuote) {
let node = this.startNodeAt(start)
@@ -210,7 +218,16 @@ lp.parseExprAtom = function() {
case tt.name:
let start = this.storeCurrentPos()
let id = this.parseIdent()
- return this.eat(tt.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id
+ let isAsync = false
+ if (id.name === "async" && !this.canInsertSemicolon()) {
+ if (this.eat(tt._function))
+ return this.parseFunction(this.startNodeAt(start), false, true)
+ if (this.tok.type === tt.name) {
+ id = this.parseIdent()
+ isAsync = true
+ }
+ }
+ return this.eat(tt.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id], isAsync) : id
case tt.regexp:
node = this.startNode()
@@ -241,7 +258,11 @@ lp.parseExprAtom = function() {
let inner = this.parseExpression()
this.expect(tt.parenR)
if (this.eat(tt.arrow)) {
- return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (isDummy(inner) ? [] : [inner]))
+ // (a,)=>a // SequenceExpression makes dummy in the last hole. Drop the dummy.
+ let params = inner.expressions || [inner]
+ if (params.length && isDummy(params[params.length - 1]))
+ params.pop()
+ return this.parseArrowExpression(this.startNodeAt(parenStart), params)
}
if (this.options.preserveParens) {
let par = this.startNodeAt(parenStart)
@@ -337,7 +358,7 @@ lp.parseObj = function() {
this.eat(tt.braceL)
if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
while (!this.closes(tt.braceR, indent, line)) {
- let prop = this.startNode(), isGenerator, start
+ let prop = this.startNode(), isGenerator, isAsync, start
if (this.options.ecmaVersion >= 6) {
start = this.storeCurrentPos()
prop.method = false
@@ -345,6 +366,14 @@ lp.parseObj = function() {
isGenerator = this.eat(tt.star)
}
this.parsePropertyName(prop)
+ if (!prop.computed &&
+ prop.key.type === "Identifier" && prop.key.name === "async" && this.tok.type !== tt.parenL &&
+ this.tok.type !== tt.colon && !this.canInsertSemicolon()) {
+ this.parsePropertyName(prop)
+ isAsync = true
+ } else {
+ isAsync = false
+ }
if (isDummy(prop.key)) { if (isDummy(this.parseMaybeAssign())) this.next(); this.eat(tt.comma); continue }
if (this.eat(tt.colon)) {
prop.kind = "init"
@@ -352,7 +381,7 @@ lp.parseObj = function() {
} else if (this.options.ecmaVersion >= 6 && (this.tok.type === tt.parenL || this.tok.type === tt.braceL)) {
prop.kind = "init"
prop.method = true
- prop.value = this.parseMethod(isGenerator)
+ prop.value = this.parseMethod(isGenerator, isAsync)
} else if (this.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
!prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
(this.tok.type != tt.comma && this.tok.type != tt.braceR)) {
@@ -424,6 +453,8 @@ lp.initFunction = function(node) {
node.generator = false
node.expression = false
}
+ if (this.options.ecmaVersion >= 8)
+ node.async = false
}
// Convert existing expression atom to assignable pattern
@@ -467,21 +498,31 @@ lp.parseFunctionParams = function(params) {
return this.toAssignableList(params, true)
}
-lp.parseMethod = function(isGenerator) {
- let node = this.startNode()
+lp.parseMethod = function(isGenerator, isAsync) {
+ let node = this.startNode(), oldInAsync = this.inAsync
this.initFunction(node)
+ if (this.options.ecmaVersion >= 6)
+ node.generator = !!isGenerator
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+ this.inAsync = node.async
node.params = this.parseFunctionParams()
- node.generator = isGenerator || false
node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== tt.braceL
node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ this.inAsync = oldInAsync
return this.finishNode(node, "FunctionExpression")
}
-lp.parseArrowExpression = function(node, params) {
+lp.parseArrowExpression = function(node, params, isAsync) {
+ let oldInAsync = this.inAsync
this.initFunction(node)
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+ this.inAsync = node.async
node.params = this.toAssignableList(params, true)
node.expression = this.tok.type !== tt.braceL
node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
+ this.inAsync = oldInAsync
return this.finishNode(node, "ArrowFunctionExpression")
}
@@ -512,3 +553,10 @@ lp.parseExprList = function(close, allowEmpty) {
}
return elts
}
+
+lp.parseAwait = function() {
+ let node = this.startNode()
+ this.next()
+ node.argument = this.parseMaybeUnary()
+ return this.finishNode(node, "AwaitExpression")
+}
diff --git a/tools/eslint/node_modules/acorn/src/loose/index.js b/tools/eslint/node_modules/acorn/src/loose/index.js
index e9e940e75f..98bbf4b3be 100644
--- a/tools/eslint/node_modules/acorn/src/loose/index.js
+++ b/tools/eslint/node_modules/acorn/src/loose/index.js
@@ -29,7 +29,7 @@
// invasive changes and simplifications without creating a complicated
// tangle.
-import acorn from "acorn"
+import {addLooseExports, defaultOptions} from "../index"
import {LooseParser, pluginsLoose} from "./state"
import "./tokenize"
import "./statement"
@@ -37,7 +37,7 @@ import "./expression"
export {LooseParser, pluginsLoose} from "./state"
-acorn.defaultOptions.tabSize = 4
+defaultOptions.tabSize = 4
export function parse_dammit(input, options) {
let p = new LooseParser(input, options)
@@ -45,6 +45,4 @@ export function parse_dammit(input, options) {
return p.parseTopLevel()
}
-acorn.parse_dammit = parse_dammit
-acorn.LooseParser = LooseParser
-acorn.pluginsLoose = pluginsLoose
+addLooseExports(parse_dammit, LooseParser, pluginsLoose)
diff --git a/tools/eslint/node_modules/acorn/src/loose/state.js b/tools/eslint/node_modules/acorn/src/loose/state.js
index 5101bc4de2..18987aa220 100644
--- a/tools/eslint/node_modules/acorn/src/loose/state.js
+++ b/tools/eslint/node_modules/acorn/src/loose/state.js
@@ -1,4 +1,4 @@
-import {tokenizer, SourceLocation, tokTypes as tt, Node, lineBreak, isNewLine} from "acorn"
+import {tokenizer, SourceLocation, tokTypes as tt, Node, lineBreak, isNewLine} from "../index"
// Registered plugins
export const pluginsLoose = {}
@@ -18,6 +18,7 @@ export class LooseParser {
this.curIndent = 0
this.curLineStart = 0
this.nextLineStart = this.lineEnd(this.curLineStart) + 1
+ this.inAsync = false
// Load plugins
this.options.pluginsLoose = options.pluginsLoose || {}
this.loadPlugins(this.options.pluginsLoose)
diff --git a/tools/eslint/node_modules/acorn/src/loose/statement.js b/tools/eslint/node_modules/acorn/src/loose/statement.js
index 4da72189eb..42eda0597e 100644
--- a/tools/eslint/node_modules/acorn/src/loose/statement.js
+++ b/tools/eslint/node_modules/acorn/src/loose/statement.js
@@ -1,6 +1,6 @@
import {LooseParser} from "./state"
import {isDummy} from "./parseutil"
-import {getLineInfo, tokTypes as tt} from "acorn"
+import {getLineInfo, tokTypes as tt} from "../index"
const lp = LooseParser.prototype
@@ -171,6 +171,11 @@ lp.parseStatement = function() {
return this.parseExport()
default:
+ if (this.toks.isAsyncFunction()) {
+ this.next()
+ this.next()
+ return this.parseFunction(node, true, true)
+ }
let expr = this.parseExpression()
if (isDummy(expr)) {
this.next()
@@ -258,7 +263,7 @@ lp.parseClass = function(isStatement) {
if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
while (!this.closes(tt.braceR, indent, line)) {
if (this.semicolon()) continue
- let method = this.startNode(), isGenerator
+ let method = this.startNode(), isGenerator, isAsync
if (this.options.ecmaVersion >= 6) {
method.static = false
isGenerator = this.eat(tt.star)
@@ -273,6 +278,14 @@ lp.parseClass = function(isStatement) {
} else {
method.static = false
}
+ if (!method.computed &&
+ method.key.type === "Identifier" && method.key.name === "async" && this.tok.type !== tt.parenL &&
+ !this.canInsertSemicolon()) {
+ this.parsePropertyName(method)
+ isAsync = true
+ } else {
+ isAsync = false
+ }
if (this.options.ecmaVersion >= 5 && method.key.type === "Identifier" &&
!method.computed && (method.key.name === "get" || method.key.name === "set") &&
this.tok.type !== tt.parenL && this.tok.type !== tt.braceL) {
@@ -280,14 +293,14 @@ lp.parseClass = function(isStatement) {
this.parsePropertyName(method)
method.value = this.parseMethod(false)
} else {
- if (!method.computed && !method.static && !isGenerator && (
+ if (!method.computed && !method.static && !isGenerator && !isAsync && (
method.key.type === "Identifier" && method.key.name === "constructor" ||
method.key.type === "Literal" && method.key.value === "constructor")) {
method.kind = "constructor"
} else {
method.kind = "method"
}
- method.value = this.parseMethod(isGenerator)
+ method.value = this.parseMethod(isGenerator, isAsync)
}
node.body.body.push(this.finishNode(method, "MethodDefinition"))
}
@@ -303,15 +316,21 @@ lp.parseClass = function(isStatement) {
return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
}
-lp.parseFunction = function(node, isStatement) {
+lp.parseFunction = function(node, isStatement, isAsync) {
+ let oldInAsync = this.inAsync
this.initFunction(node)
if (this.options.ecmaVersion >= 6) {
node.generator = this.eat(tt.star)
}
+ if (this.options.ecmaVersion >= 8) {
+ node.async = !!isAsync
+ }
if (this.tok.type === tt.name) node.id = this.parseIdent()
else if (isStatement) node.id = this.dummyIdent()
+ this.inAsync = node.async
node.params = this.parseFunctionParams()
node.body = this.parseBlock()
+ this.inAsync = oldInAsync
return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
}
@@ -323,8 +342,10 @@ lp.parseExport = function() {
return this.finishNode(node, "ExportAllDeclaration")
}
if (this.eat(tt._default)) {
+ // export default (function foo() {}) // This is FunctionExpression.
+ let isParenL = this.tok.type === tt.parenL
let expr = this.parseMaybeAssign()
- if (expr.id) {
+ if (!isParenL && expr.id) {
switch (expr.type) {
case "FunctionExpression": expr.type = "FunctionDeclaration"; break
case "ClassExpression": expr.type = "ClassDeclaration"; break
@@ -334,7 +355,7 @@ lp.parseExport = function() {
this.semicolon()
return this.finishNode(node, "ExportDefaultDeclaration")
}
- if (this.tok.type.keyword || this.toks.isLet()) {
+ if (this.tok.type.keyword || this.toks.isLet() || this.toks.isAsyncFunction()) {
node.declaration = this.parseStatement()
node.specifiers = []
node.source = null
diff --git a/tools/eslint/node_modules/acorn/src/loose/tokenize.js b/tools/eslint/node_modules/acorn/src/loose/tokenize.js
index ce5a49a3f4..c08be97783 100644
--- a/tools/eslint/node_modules/acorn/src/loose/tokenize.js
+++ b/tools/eslint/node_modules/acorn/src/loose/tokenize.js
@@ -1,4 +1,4 @@
-import {tokTypes as tt, Token, isNewLine, SourceLocation, getLineInfo, lineBreakG} from "acorn"
+import {tokTypes as tt, Token, isNewLine, SourceLocation, getLineInfo, lineBreakG} from "../index"
import {LooseParser} from "./state"
const lp = LooseParser.prototype
diff --git a/tools/eslint/node_modules/acorn/src/lval.js b/tools/eslint/node_modules/acorn/src/lval.js
index a6bc3b7ad2..c88d71938b 100644
--- a/tools/eslint/node_modules/acorn/src/lval.js
+++ b/tools/eslint/node_modules/acorn/src/lval.js
@@ -10,7 +10,11 @@ const pp = Parser.prototype
pp.toAssignable = function(node, isBinding) {
if (this.options.ecmaVersion >= 6 && node) {
switch (node.type) {
- case "Identifier":
+ case "Identifier":
+ if (this.inAsync && node.name === "await")
+ this.raise(node.start, "Can not use 'await' as identifier inside an async function")
+ break
+
case "ObjectPattern":
case "ArrayPattern":
break
@@ -33,6 +37,7 @@ pp.toAssignable = function(node, isBinding) {
if (node.operator === "=") {
node.type = "AssignmentPattern"
delete node.operator
+ this.toAssignable(node.left, isBinding)
// falls through to AssignmentPattern
} else {
this.raise(node.left.end, "Only '=' operator can be used for specifying default value.")
@@ -40,8 +45,6 @@ pp.toAssignable = function(node, isBinding) {
}
case "AssignmentPattern":
- if (node.right.type === "YieldExpression")
- this.raise(node.right.start, "Yield expression cannot be a default value")
break
case "ParenthesizedExpression":
diff --git a/tools/eslint/node_modules/acorn/src/options.js b/tools/eslint/node_modules/acorn/src/options.js
index 3a1b0df3ad..e7b217e8d5 100644
--- a/tools/eslint/node_modules/acorn/src/options.js
+++ b/tools/eslint/node_modules/acorn/src/options.js
@@ -6,11 +6,13 @@ import {SourceLocation} from "./locutil"
export const defaultOptions = {
// `ecmaVersion` indicates the ECMAScript version to parse. Must
- // be either 3, or 5, or 6. This influences support for strict
- // mode, the set of reserved words, support for getters and
- // setters and other features. The default is 6.
- ecmaVersion: 6,
- // Source type ("script" or "module") for different semantics
+ // be either 3, 5, 6 (2015), 7 (2016), or 8 (2017). This influences support
+ // for strict mode, the set of reserved words, and support for
+ // new syntax features. The default is 7.
+ ecmaVersion: 7,
+ // `sourceType` indicates the mode the code should be parsed in.
+ // Can be either `"script"` or `"module"`. This influences global
+ // strict mode and parsing of `import` and `export` declarations.
sourceType: "script",
// `onInsertedSemicolon` can be a callback that will be called
// when a semicolon is automatically inserted. It will be passed
@@ -88,8 +90,13 @@ export const defaultOptions = {
export function getOptions(opts) {
let options = {}
+
for (let opt in defaultOptions)
options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]
+
+ if (options.ecmaVersion >= 2015)
+ options.ecmaVersion -= 2009
+
if (options.allowReserved == null)
options.allowReserved = options.ecmaVersion < 5
diff --git a/tools/eslint/node_modules/acorn/src/parseutil.js b/tools/eslint/node_modules/acorn/src/parseutil.js
index 04eda2244f..55d10344a8 100644
--- a/tools/eslint/node_modules/acorn/src/parseutil.js
+++ b/tools/eslint/node_modules/acorn/src/parseutil.js
@@ -67,11 +67,12 @@ pp.semicolon = function() {
if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected()
}
-pp.afterTrailingComma = function(tokType) {
+pp.afterTrailingComma = function(tokType, notNext) {
if (this.type == tokType) {
if (this.options.onTrailingComma)
this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc)
- this.next()
+ if (!notNext)
+ this.next()
return true
}
}
@@ -107,3 +108,10 @@ pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
if (!andThrow) return !!pos
if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns")
}
+
+pp.checkYieldAwaitInDefaultParams = function() {
+ if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos))
+ this.raise(this.yieldPos, "Yield expression cannot be a default value")
+ if (this.awaitPos)
+ this.raise(this.awaitPos, "Await expression cannot be a default value")
+}
diff --git a/tools/eslint/node_modules/acorn/src/state.js b/tools/eslint/node_modules/acorn/src/state.js
index bddad5f730..1a8e293172 100644
--- a/tools/eslint/node_modules/acorn/src/state.js
+++ b/tools/eslint/node_modules/acorn/src/state.js
@@ -15,8 +15,12 @@ export class Parser {
this.options = options = getOptions(options)
this.sourceFile = options.sourceFile
this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5])
- let reserved = options.allowReserved ? "" :
- reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : "")
+ let reserved = ""
+ if (!options.allowReserved) {
+ for (let v = options.ecmaVersion;; v--)
+ if (reserved = reservedWords[v]) break
+ if (options.sourceType == "module") reserved += " await"
+ }
this.reservedWords = keywordRegexp(reserved)
let reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict
this.reservedWordsStrict = keywordRegexp(reservedStrict)
@@ -36,7 +40,7 @@ export class Parser {
// The current position of the tokenizer in the input.
if (startPos) {
this.pos = startPos
- this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos))
+ this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1
this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length
} else {
this.pos = this.lineStart = 0
@@ -70,8 +74,10 @@ export class Parser {
// Used to signify the start of a potential arrow function
this.potentialArrowAt = -1
- // Flags to track whether we are in a function, a generator.
- this.inFunction = this.inGenerator = false
+ // Flags to track whether we are in a function, a generator, an async function.
+ this.inFunction = this.inGenerator = this.inAsync = false
+ // Positions to delayed-check that yield/await does not exist in default parameters.
+ this.yieldPos = this.awaitPos = 0
// Labels in scope.
this.labels = []
diff --git a/tools/eslint/node_modules/acorn/src/statement.js b/tools/eslint/node_modules/acorn/src/statement.js
index ab5ece0307..7a660f1919 100644
--- a/tools/eslint/node_modules/acorn/src/statement.js
+++ b/tools/eslint/node_modules/acorn/src/statement.js
@@ -14,10 +14,10 @@ const pp = Parser.prototype
// to its body instead of creating a new node.
pp.parseTopLevel = function(node) {
- let first = true
+ let first = true, exports = {}
if (!node.body) node.body = []
while (this.type !== tt.eof) {
- let stmt = this.parseStatement(true, true)
+ let stmt = this.parseStatement(true, true, exports)
node.body.push(stmt)
if (first) {
if (this.isUseStrict(stmt)) this.setStrict(true)
@@ -47,6 +47,21 @@ pp.isLet = function() {
return false
}
+// check 'async [no LineTerminator here] function'
+// - 'async /*foo*/ function' is OK.
+// - 'async /*\n*/ function' is invalid.
+pp.isAsyncFunction = function() {
+ if (this.type !== tt.name || this.options.ecmaVersion < 8 || this.value != "async")
+ return false
+
+ skipWhiteSpace.lastIndex = this.pos
+ let skip = skipWhiteSpace.exec(this.input)
+ let next = this.pos + skip[0].length
+ return !lineBreak.test(this.input.slice(this.pos, next)) &&
+ this.input.slice(next, next + 8) === "function" &&
+ (next + 8 == this.input.length || !isIdentifierChar(this.input.charAt(next + 8)))
+}
+
// Parse a single statement.
//
// If expecting a statement and finding a slash operator, parse a
@@ -54,7 +69,7 @@ pp.isLet = function() {
// `if (foo) /blah/.exec(foo)`, where looking at the previous token
// does not help.
-pp.parseStatement = function(declaration, topLevel) {
+pp.parseStatement = function(declaration, topLevel, exports) {
let starttype = this.type, node = this.startNode(), kind
if (this.isLet()) {
@@ -73,7 +88,7 @@ pp.parseStatement = function(declaration, topLevel) {
case tt._for: return this.parseForStatement(node)
case tt._function:
if (!declaration && this.options.ecmaVersion >= 6) this.unexpected()
- return this.parseFunctionStatement(node)
+ return this.parseFunctionStatement(node, false)
case tt._class:
if (!declaration) this.unexpected()
return this.parseClass(node, true)
@@ -98,7 +113,7 @@ pp.parseStatement = function(declaration, topLevel) {
if (!this.inModule)
this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")
}
- return starttype === tt._import ? this.parseImport(node) : this.parseExport(node)
+ return starttype === tt._import ? this.parseImport(node) : this.parseExport(node, exports)
// If the statement does not start with a statement keyword or a
// brace, it's an ExpressionStatement or LabeledStatement. We
@@ -106,6 +121,11 @@ pp.parseStatement = function(declaration, topLevel) {
// next token is a colon and the expression was a simple
// Identifier node, we switch to interpreting it as a label.
default:
+ if (this.isAsyncFunction() && declaration) {
+ this.next()
+ return this.parseFunctionStatement(node, true)
+ }
+
let maybeName = this.value, expr = this.parseExpression()
if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon))
return this.parseLabeledStatement(node, maybeName, expr)
@@ -193,16 +213,21 @@ pp.parseForStatement = function(node) {
return this.parseFor(node, init)
}
-pp.parseFunctionStatement = function(node) {
+pp.parseFunctionStatement = function(node, isAsync) {
this.next()
- return this.parseFunction(node, true)
+ return this.parseFunction(node, true, false, isAsync)
+}
+
+pp.isFunction = function() {
+ return this.type === tt._function || this.isAsyncFunction()
}
pp.parseIfStatement = function(node) {
this.next()
node.test = this.parseParenExpression()
- node.consequent = this.parseStatement(false)
- node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null
+ // allow function declarations in branches, but only in non-strict mode
+ node.consequent = this.parseStatement(!this.strict && this.isFunction())
+ node.alternate = this.eat(tt._else) ? this.parseStatement(!this.strict && this.isFunction()) : null
return this.finishNode(node, "IfStatement")
}
@@ -425,23 +450,38 @@ pp.parseVarId = function(decl) {
// Parse a function declaration or literal (depending on the
// `isStatement` parameter).
-pp.parseFunction = function(node, isStatement, allowExpressionBody) {
+pp.parseFunction = function(node, isStatement, allowExpressionBody, isAsync) {
this.initFunction(node)
- if (this.options.ecmaVersion >= 6)
+ if (this.options.ecmaVersion >= 6 && !isAsync)
node.generator = this.eat(tt.star)
- var oldInGen = this.inGenerator
+ if (this.options.ecmaVersion >= 8)
+ node.async = !!isAsync
+
+ if (isStatement)
+ node.id = this.parseIdent()
+
+ let oldInGen = this.inGenerator, oldInAsync = this.inAsync, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos
this.inGenerator = node.generator
- if (isStatement || this.type === tt.name)
+ this.inAsync = node.async
+ this.yieldPos = 0
+ this.awaitPos = 0
+
+ if (!isStatement && this.type === tt.name)
node.id = this.parseIdent()
this.parseFunctionParams(node)
this.parseFunctionBody(node, allowExpressionBody)
+
this.inGenerator = oldInGen
+ this.inAsync = oldInAsync
+ this.yieldPos = oldYieldPos
+ this.awaitPos = oldAwaitPos
return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
}
pp.parseFunctionParams = function(node) {
this.expect(tt.parenL)
- node.params = this.parseBindingList(tt.parenR, false, false, true)
+ node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8, true)
+ this.checkYieldAwaitInDefaultParams()
}
// Parse a class declaration or literal (depending on the
@@ -459,6 +499,7 @@ pp.parseClass = function(node, isStatement) {
if (this.eat(tt.semi)) continue
let method = this.startNode()
let isGenerator = this.eat(tt.star)
+ let isAsync = false
let isMaybeStatic = this.type === tt.name && this.value === "static"
this.parsePropertyName(method)
method.static = isMaybeStatic && this.type !== tt.parenL
@@ -467,11 +508,17 @@ pp.parseClass = function(node, isStatement) {
isGenerator = this.eat(tt.star)
this.parsePropertyName(method)
}
+ if (this.options.ecmaVersion >= 8 && !isGenerator && !method.computed &&
+ method.key.type === "Identifier" && method.key.name === "async" && this.type !== tt.parenL &&
+ !this.canInsertSemicolon()) {
+ isAsync = true
+ this.parsePropertyName(method)
+ }
method.kind = "method"
let isGetSet = false
if (!method.computed) {
let {key} = method
- if (!isGenerator && key.type === "Identifier" && this.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
+ if (!isGenerator && !isAsync && key.type === "Identifier" && this.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
isGetSet = true
method.kind = key.name
key = this.parsePropertyName(method)
@@ -481,11 +528,12 @@ pp.parseClass = function(node, isStatement) {
if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class")
if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier")
if (isGenerator) this.raise(key.start, "Constructor can't be a generator")
+ if (isAsync) this.raise(key.start, "Constructor can't be an async method")
method.kind = "constructor"
hadConstructor = true
}
}
- this.parseClassMethod(classBody, method, isGenerator)
+ this.parseClassMethod(classBody, method, isGenerator, isAsync)
if (isGetSet) {
let paramCount = method.kind === "get" ? 0 : 1
if (method.value.params.length !== paramCount) {
@@ -494,17 +542,18 @@ pp.parseClass = function(node, isStatement) {
this.raiseRecoverable(start, "getter should have no params")
else
this.raiseRecoverable(start, "setter should have exactly one param")
+ } else {
+ if (method.kind === "set" && method.value.params[0].type === "RestElement")
+ this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params")
}
- if (method.kind === "set" && method.value.params[0].type === "RestElement")
- this.raise(method.value.params[0].start, "Setter cannot use rest params")
}
}
node.body = this.finishNode(classBody, "ClassBody")
return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
}
-pp.parseClassMethod = function(classBody, method, isGenerator) {
- method.value = this.parseMethod(isGenerator)
+pp.parseClassMethod = function(classBody, method, isGenerator, isAsync) {
+ method.value = this.parseMethod(isGenerator, isAsync)
classBody.body.push(this.finishNode(method, "MethodDefinition"))
}
@@ -518,7 +567,7 @@ pp.parseClassSuper = function(node) {
// Parses module export declaration.
-pp.parseExport = function(node) {
+pp.parseExport = function(node, exports) {
this.next()
// export * from '...'
if (this.eat(tt.star)) {
@@ -528,6 +577,7 @@ pp.parseExport = function(node) {
return this.finishNode(node, "ExportAllDeclaration")
}
if (this.eat(tt._default)) { // export default ...
+ this.checkExport(exports, "default", this.lastTokStart)
let parens = this.type == tt.parenL
let expr = this.parseMaybeAssign()
let needsSemi = true
@@ -547,11 +597,15 @@ pp.parseExport = function(node) {
// export var|const|let|function|class ...
if (this.shouldParseExportStatement()) {
node.declaration = this.parseStatement(true)
+ if (node.declaration.type === "VariableDeclaration")
+ this.checkVariableExport(exports, node.declaration.declarations)
+ else
+ this.checkExport(exports, node.declaration.id.name, node.declaration.id.start)
node.specifiers = []
node.source = null
} else { // export { x, y as z } [from '...']
node.declaration = null
- node.specifiers = this.parseExportSpecifiers()
+ node.specifiers = this.parseExportSpecifiers(exports)
if (this.eatContextual("from")) {
node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
} else {
@@ -569,13 +623,44 @@ pp.parseExport = function(node) {
return this.finishNode(node, "ExportNamedDeclaration")
}
+pp.checkExport = function(exports, name, pos) {
+ if (!exports) return
+ if (Object.prototype.hasOwnProperty.call(exports, name))
+ this.raiseRecoverable(pos, "Duplicate export '" + name + "'")
+ exports[name] = true
+}
+
+pp.checkPatternExport = function(exports, pat) {
+ let type = pat.type
+ if (type == "Identifier")
+ this.checkExport(exports, pat.name, pat.start)
+ else if (type == "ObjectPattern")
+ for (let i = 0; i < pat.properties.length; ++i)
+ this.checkPatternExport(exports, pat.properties[i].value)
+ else if (type == "ArrayPattern")
+ for (let i = 0; i < pat.elements.length; ++i) {
+ let elt = pat.elements[i]
+ if (elt) this.checkPatternExport(exports, elt)
+ }
+ else if (type == "AssignmentPattern")
+ this.checkPatternExport(exports, pat.left)
+ else if (type == "ParenthesizedExpression")
+ this.checkPatternExport(exports, pat.expression)
+}
+
+pp.checkVariableExport = function(exports, decls) {
+ if (!exports) return
+ for (let i = 0; i < decls.length; i++)
+ this.checkPatternExport(exports, decls[i].id)
+}
+
pp.shouldParseExportStatement = function() {
- return this.type.keyword || this.isLet()
+ return this.type.keyword || this.isLet() || this.isAsyncFunction()
}
// Parses a comma-separated list of module exports.
-pp.parseExportSpecifiers = function() {
+pp.parseExportSpecifiers = function(exports) {
let nodes = [], first = true
// export { x, y as z } [from '...']
this.expect(tt.braceL)
@@ -588,6 +673,7 @@ pp.parseExportSpecifiers = function() {
let node = this.startNode()
node.local = this.parseIdent(this.type === tt._default)
node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local
+ this.checkExport(exports, node.exported.name, node.exported.start)
nodes.push(this.finishNode(node, "ExportSpecifier"))
}
return nodes
@@ -645,7 +731,7 @@ pp.parseImportSpecifiers = function() {
} else {
node.local = node.imported
if (this.isKeyword(node.local.name)) this.unexpected(node.local.start)
- if (this.reservedWordsStrict.test(node.local.name)) this.raise(node.local.start, "The keyword '" + node.local.name + "' is reserved")
+ if (this.reservedWordsStrict.test(node.local.name)) this.raiseRecoverable(node.local.start, "The keyword '" + node.local.name + "' is reserved")
}
this.checkLVal(node.local, true)
nodes.push(this.finishNode(node, "ImportSpecifier"))
diff --git a/tools/eslint/node_modules/acorn/src/tokenize.js b/tools/eslint/node_modules/acorn/src/tokenize.js
index ed97d19fb6..08ea7bf74f 100644
--- a/tools/eslint/node_modules/acorn/src/tokenize.js
+++ b/tools/eslint/node_modules/acorn/src/tokenize.js
@@ -491,14 +491,15 @@ pp.readRadixNumber = function(radix) {
pp.readNumber = function(startsWithDot) {
let start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48
if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number")
+ if (octal && this.pos == start + 1) octal = false
let next = this.input.charCodeAt(this.pos)
- if (next === 46) { // '.'
+ if (next === 46 && !octal) { // '.'
++this.pos
this.readInt(10)
isFloat = true
next = this.input.charCodeAt(this.pos)
}
- if (next === 69 || next === 101) { // 'eE'
+ if ((next === 69 || next === 101) && !octal) { // 'eE'
next = this.input.charCodeAt(++this.pos)
if (next === 43 || next === 45) ++this.pos // '+-'
if (this.readInt(10) === null) this.raise(start, "Invalid number")
diff --git a/tools/eslint/node_modules/acorn/src/walk/index.js b/tools/eslint/node_modules/acorn/src/walk/index.js
index 68604a88ab..0da7e0d86c 100644
--- a/tools/eslint/node_modules/acorn/src/walk/index.js
+++ b/tools/eslint/node_modules/acorn/src/walk/index.js
@@ -190,7 +190,7 @@ base.SwitchStatement = (node, st, c) => {
c(cs.consequent[j], st, "Statement")
}
}
-base.ReturnStatement = base.YieldExpression = (node, st, c) => {
+base.ReturnStatement = base.YieldExpression = base.AwaitExpression = (node, st, c) => {
if (node.argument) c(node.argument, st, "Expression")
}
base.ThrowStatement = base.SpreadElement =
diff --git a/tools/eslint/node_modules/acorn/src/whitespace.js b/tools/eslint/node_modules/acorn/src/whitespace.js
index ee1214a218..094c2e4a47 100644
--- a/tools/eslint/node_modules/acorn/src/whitespace.js
+++ b/tools/eslint/node_modules/acorn/src/whitespace.js
@@ -5,7 +5,7 @@ export const lineBreak = /\r\n?|\n|\u2028|\u2029/
export const lineBreakG = new RegExp(lineBreak.source, "g")
export function isNewLine(code) {
- return code === 10 || code === 13 || code === 0x2028 || code == 0x2029
+ return code === 10 || code === 13 || code === 0x2028 || code === 0x2029
}
export const nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/
diff --git a/tools/eslint/node_modules/ajv-keywords/.eslintrc.yml b/tools/eslint/node_modules/ajv-keywords/.eslintrc.yml
new file mode 100644
index 0000000000..fd9f29adc8
--- /dev/null
+++ b/tools/eslint/node_modules/ajv-keywords/.eslintrc.yml
@@ -0,0 +1,32 @@
+env:
+ node: true
+extends: 'eslint:recommended'
+globals:
+ Promise: false
+parserOptions:
+ ecmaVersion: 6
+rules:
+ indent: [ 2, 2, { SwitchCase: 1 } ]
+ no-trailing-spaces: 2
+ quotes: [ 2, single, avoid-escape ]
+ linebreak-style: [ 2, unix ]
+ semi: [ 2, always ]
+ valid-jsdoc: [ 2, { requireReturn: false } ]
+ no-invalid-this: 2
+ no-unused-vars: [ 2, { args: none } ]
+# no-console: [ 2, { allow: [ warn, error ] } ]
+ no-console: 0
+ block-scoped-var: 2
+ complexity: [ 2, 8 ]
+ curly: [ 2, multi-or-nest, consistent ]
+ dot-location: [ 2, property ]
+ dot-notation: 2
+ no-else-return: 2
+ no-eq-null: 2
+ no-fallthrough: 2
+ no-return-assign: 2
+ strict: [ 2, global ]
+ no-shadow: 1
+ no-use-before-define: [ 2, nofunc ]
+ callback-return: 2
+ no-path-concat: 2
diff --git a/tools/eslint/node_modules/ajv-keywords/LICENSE b/tools/eslint/node_modules/ajv-keywords/LICENSE
new file mode 100644
index 0000000000..90139aa74c
--- /dev/null
+++ b/tools/eslint/node_modules/ajv-keywords/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Evgeny Poberezkin
+
+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/eslint/node_modules/ajv-keywords/README.md b/tools/eslint/node_modules/ajv-keywords/README.md
new file mode 100644
index 0000000000..5a16240923
--- /dev/null
+++ b/tools/eslint/node_modules/ajv-keywords/README.md
@@ -0,0 +1,173 @@
+# ajv-keywords
+
+Custom JSON-Schema keywords for [ajv](https://github.com/epoberezkin/ajv) validator
+
+[![Build Status](https://travis-ci.org/epoberezkin/ajv-keywords.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv-keywords)
+[![npm version](https://badge.fury.io/js/ajv-keywords.svg)](https://www.npmjs.com/package/ajv-keywords)
+[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/ajv-keywords/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/ajv-keywords?branch=master)
+
+
+## Install
+
+```
+npm install ajv-keywords
+```
+
+
+## Usage
+
+To add all available keywords:
+
+```javascript
+var Ajv = require('ajv');
+var ajv = new Ajv;
+require('ajv-keywords')(ajv);
+
+ajv.validate({ instanceof: 'RegExp' }, /.*/); // true
+ajv.validate({ instanceof: 'RegExp' }, '.*'); // false
+```
+
+To add a single keyword:
+
+```javascript
+require('ajv-keywords')(ajv, 'instanceof');
+```
+
+To add multiple keywords:
+
+```javascript
+require('ajv-keywords')(ajv, ['typeof', 'instanceof']);
+```
+
+To add a single keyword in browser (to avoid adding unused code):
+
+```javascript
+require('ajv-keywords/keywords/instanceof')(ajv);
+```
+
+
+## Keywords
+
+### `typeof`
+
+Based on JavaScript `typeof` operation.
+
+The value of the keyword should be a string (`"undefined"`, `"string"`, `"number"`, `"object"`, `"function"`, `"boolean"` or `"symbol"`) or array of strings.
+
+To pass validation the result of `typeof` operation on the value should be equal to the string (or one of the strings in the array).
+
+```
+ajv.validate({ typeof: 'undefined' }, undefined); // true
+ajv.validate({ typeof: 'undefined' }, null); // false
+ajv.validate({ typeof: ['undefined', 'object'] }, null); // true
+```
+
+
+### `instanceof`
+
+Based on JavaScript `typeof` operation.
+
+The value of the keyword should be a string (`"Object"`, `"Array"`, `"Function"`, `"Number"`, `"String"`, `"Date"`, `"RegExp"` or `"Buffer"`) or array of strings.
+
+To pass validation the result of `data instanceof ...` operation on the value should be true:
+
+```
+ajv.validate({ instanceof: 'Array' }, []); // true
+ajv.validate({ instanceof: 'Array' }, {}); // false
+ajv.validate({ instanceof: ['Array', 'Function'] }, funciton(){}); // true
+```
+
+You can add your own constructor function to be recognised by this keyword:
+
+```javascript
+function MyClass() {}
+var instanceofDefinition = require('ajv-keywords').get('instanceof').definition;
+// or require('ajv-keywords/keywords/instanceof').definition;
+instanceofDefinition.CONSTRUCTORS.MyClass = MyClass;
+
+ajv.validate({ instanceof: 'MyClass' }, new MyClass); // true
+```
+
+
+### `range` and `exclusiveRange`
+
+Syntax sugar for the combination of minimum and maximum keywords, also fails schema compilation if there are no numbers in the range.
+
+The value of this keyword must be the array consisting of two numbers, the second must be greater or equal than the first one.
+
+If the validated value is not a number the validation passes, otherwise to pas validation the value should be greater (or equal) than the first number and smaller (or equal) than the second number in the array. If `exclusiveRange` keyword is present in the same schema and its value is true, the validated value must not be equal to the range boundaries.
+
+```javascript
+var schema = { range: [1, 3] };
+ajv.validate(schema, 1); // true
+ajv.validate(schema, 2); // true
+ajv.validate(schema, 3); // true
+ajv.validate(schema, 0.99); // false
+ajv.validate(schema, 3.01); // false
+
+var schema = { range: [1, 3], exclusiveRange: true };
+ajv.validate(schema, 1.01); // true
+ajv.validate(schema, 2); // true
+ajv.validate(schema, 2.99); // true
+ajv.validate(schema, 1); // false
+ajv.validate(schema, 3); // false
+```
+
+
+### `propertyNames`
+
+This keyword allows to define the schema for the property names of the object. The value of this keyword should be a valid JSON schema (v5 schemas are supported with Ajv option `{v5: true}`).
+
+```javascript
+var schema = {
+ type: 'object'
+ propertyNames: {
+ anyOf: [
+ { format: ipv4 },
+ { format: hostname }
+ ]
+ }
+};
+
+var validData = {
+ '192.128.0.1': {},
+ 'test.example.com': {}
+};
+
+var invalidData = {
+ '1.2.3': {}
+};
+
+ajv.validate(schema, validData); // true
+ajv.validate(schema, invalidData); // false
+```
+
+
+### `regexp`
+
+This keyword allows to use regular expressions with flags in schemas (the standard `pattern` keyword does not support flags). The value of this keyword can be either a string (the result of `regexp.toString()`) or an object with the properties `pattern` and `flags` (the same strings that should be passed to RegExp constructor).
+
+```javascript
+var schema = {
+ type: 'object',
+ properties: {
+ foo: { regexp: '/foo/i' },
+ bar: { regexp: { pattern: 'bar', flags: 'i' } }
+ }
+};
+
+var validData = {
+ foo: 'Food',
+ bar: 'Barmen'
+};
+
+var invalidData = {
+ foo: 'fog',
+ bar: 'bad'
+};
+```
+
+
+## License
+
+[MIT](https://github.com/JSONScript/ajv-keywords/blob/master/LICENSE)
diff --git a/tools/eslint/node_modules/ajv-keywords/index.js b/tools/eslint/node_modules/ajv-keywords/index.js
new file mode 100644
index 0000000000..96fcd98237
--- /dev/null
+++ b/tools/eslint/node_modules/ajv-keywords/index.js
@@ -0,0 +1,33 @@
+'use strict';
+
+var KEYWORDS = require('./keywords');
+
+module.exports = defineKeywords;
+
+
+/**
+ * Defines one or several keywords in ajv instance
+ * @param {Ajv} ajv validator instance
+ * @param {String|Array<String>|undefined} keyword keyword(s) to define
+ */
+function defineKeywords(ajv, keyword) {
+ if (Array.isArray(keyword)) {
+ for (var i=0; i<keyword.length; i++)
+ get(keyword[i])(ajv);
+ return;
+ }
+ if (keyword) {
+ get(keyword)(ajv);
+ return;
+ }
+ for (keyword in KEYWORDS) get(keyword)(ajv);
+}
+
+
+defineKeywords.get = get;
+
+function get(keyword) {
+ var defFunc = KEYWORDS[keyword];
+ if (!defFunc) throw new Error('Unknown keyword ' + keyword);
+ return defFunc;
+}
diff --git a/tools/eslint/node_modules/ajv-keywords/keywords/index.js b/tools/eslint/node_modules/ajv-keywords/keywords/index.js
new file mode 100644
index 0000000000..246d661c3e
--- /dev/null
+++ b/tools/eslint/node_modules/ajv-keywords/keywords/index.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = {
+ 'typeof': require('./typeof'),
+ 'instanceof': require('./instanceof'),
+ range: require('./range'),
+ propertyNames: require('./propertyNames'),
+ regexp: require('./regexp')
+};
diff --git a/tools/eslint/node_modules/ajv-keywords/keywords/instanceof.js b/tools/eslint/node_modules/ajv-keywords/keywords/instanceof.js
new file mode 100644
index 0000000000..15b87173af
--- /dev/null
+++ b/tools/eslint/node_modules/ajv-keywords/keywords/instanceof.js
@@ -0,0 +1,55 @@
+'use strict';
+
+module.exports = defFunc;
+
+var CONSTRUCTORS = {
+ Object: Object,
+ Array: Array,
+ Function: Function,
+ Number: Number,
+ String: String,
+ Date: Date,
+ RegExp: RegExp
+};
+
+/* istanbul ignore else */
+if (typeof Buffer != 'undefined')
+ CONSTRUCTORS.Buffer = Buffer;
+
+var definition = defFunc.definition = {
+ compile: function (schema) {
+ if (typeof schema == 'string') {
+ var Constructor = getConstructor(schema);
+ return function (data) {
+ return data instanceof Constructor;
+ };
+ }
+
+ var constructors = schema.map(getConstructor);
+ return function (data) {
+ for (var i=0; i<constructors.length; i++)
+ if (data instanceof constructors[i]) return true;
+ return false;
+ };
+ },
+ CONSTRUCTORS: CONSTRUCTORS,
+ metaSchema: {
+ anyOf: [
+ { type: 'string' },
+ {
+ type: 'array',
+ items: { type: 'string' }
+ }
+ ]
+ }
+};
+
+function defFunc(ajv) {
+ ajv.addKeyword('instanceof', definition);
+}
+
+function getConstructor(c) {
+ var Constructor = CONSTRUCTORS[c];
+ if (Constructor) return Constructor;
+ throw new Error('invalid "instanceof" keyword value');
+}
diff --git a/tools/eslint/node_modules/ajv-keywords/keywords/propertyNames.js b/tools/eslint/node_modules/ajv-keywords/keywords/propertyNames.js
new file mode 100644
index 0000000000..35f4967121
--- /dev/null
+++ b/tools/eslint/node_modules/ajv-keywords/keywords/propertyNames.js
@@ -0,0 +1,48 @@
+'use strict';
+
+module.exports = function (ajv) {
+ ajv.addKeyword('propertyNames', {
+ type: 'object',
+ compile: function(schema) {
+ var validate = ajv.compile(schema);
+ return ajv._opts.allErrors ? vAllErrors : vBreakOnError;
+
+ function vBreakOnError(data) {
+ for (var prop in data) {
+ if (!validate(prop)) {
+ vBreakOnError.errors = validate.errors;
+ addPropertyNameError(vBreakOnError.errors, prop);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ function vAllErrors(data) {
+ var errors = [];
+ for (var prop in data) {
+ if (!validate(prop)) {
+ errors = errors.concat(validate.errors);
+ addPropertyNameError(errors, prop);
+ }
+ }
+ if (errors.length) vAllErrors.errors = errors;
+ return errors.length == 0;
+ }
+
+ function addPropertyNameError(errors, propName) {
+ errors.push({
+ keyword: 'propertyNames',
+ params: { propertyName: propName },
+ message: 'should have valid property name of "' + propName + '"'
+ });
+ }
+ },
+ metaSchema: {
+ $ref: ajv._opts.v5
+ ? 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#'
+ : 'http://json-schema.org/draft-04/schema#'
+ },
+ errors: true
+ });
+};
diff --git a/tools/eslint/node_modules/ajv-keywords/keywords/range.js b/tools/eslint/node_modules/ajv-keywords/keywords/range.js
new file mode 100644
index 0000000000..88b181bfc8
--- /dev/null
+++ b/tools/eslint/node_modules/ajv-keywords/keywords/range.js
@@ -0,0 +1,40 @@
+'use strict';
+
+module.exports = defFunc;
+
+var definition = defFunc.definition = {
+ type: 'number',
+ macro: function (schema, parentSchema) {
+ var min = schema[0]
+ , max = schema[1]
+ , exclusive = parentSchema.exclusiveRange;
+
+ validateRangeSchema(min, max, exclusive);
+
+ return {
+ minimum: min,
+ exclusiveMinimum: exclusive,
+ maximum: max,
+ exclusiveMaximum: exclusive
+ };
+ },
+ metaSchema: {
+ type: 'array',
+ minItems: 2,
+ maxItems: 2,
+ items: { type: 'number' }
+ }
+};
+
+function defFunc(ajv) {
+ ajv.addKeyword('range', definition);
+ ajv.addKeyword('exclusiveRange');
+}
+
+function validateRangeSchema(min, max, exclusive) {
+ if (exclusive !== undefined && typeof exclusive != 'boolean')
+ throw new Error('Invalid schema for exclusiveRange keyword, should be boolean');
+
+ if (min > max || (exclusive && min == max))
+ throw new Error('There are no numbers in range');
+}
diff --git a/tools/eslint/node_modules/ajv-keywords/keywords/regexp.js b/tools/eslint/node_modules/ajv-keywords/keywords/regexp.js
new file mode 100644
index 0000000000..a1acdd0c2b
--- /dev/null
+++ b/tools/eslint/node_modules/ajv-keywords/keywords/regexp.js
@@ -0,0 +1,33 @@
+'use strict';
+
+module.exports = function (ajv) {
+ ajv.addKeyword('regexp', {
+ type: 'string',
+ inline: function (it, keyword, schema) {
+ return getRegExp() + '.test(data' + (it.dataLevel || '') + ')';
+
+ function getRegExp() {
+ try {
+ if (typeof schema == 'object')
+ return new RegExp(schema.pattern, schema.flags);
+
+ var rx = schema.match(/^\/(.*)\/([gimy]*)$/);
+ if (rx) return new RegExp(rx[1], rx[2]);
+ throw new Error('cannot parse string into RegExp');
+ } catch(e) {
+ console.error('regular expression', schema, 'is invalid');
+ throw e;
+ }
+ }
+ },
+ metaSchema: {
+ type: ['string', 'object'],
+ properties: {
+ pattern: { type: 'string' },
+ flags: { type: 'string' }
+ },
+ required: ['pattern'],
+ additionalProperties: false
+ }
+ });
+};
diff --git a/tools/eslint/node_modules/ajv-keywords/keywords/typeof.js b/tools/eslint/node_modules/ajv-keywords/keywords/typeof.js
new file mode 100644
index 0000000000..2c9348877b
--- /dev/null
+++ b/tools/eslint/node_modules/ajv-keywords/keywords/typeof.js
@@ -0,0 +1,33 @@
+'use strict';
+
+module.exports = defFunc;
+
+var KNOWN_TYPES = ['undefined', 'string', 'number', 'object', 'function', 'boolean', 'symbol'];
+
+var definition = defFunc.definition = {
+ inline: function (it, keyword, schema) {
+ var data = 'data' + (it.dataLevel || '');
+ if (typeof schema == 'string') return 'typeof ' + data + ' == "' + schema + '"';
+ schema = 'validate.schema' + it.schemaPath + '.' + keyword;
+ return schema + '.indexOf(typeof ' + data + ') >= 0';
+ },
+ metaSchema: {
+ anyOf: [
+ {
+ type: 'string',
+ enum: KNOWN_TYPES
+ },
+ {
+ type: 'array',
+ items: {
+ type: 'string',
+ enum: KNOWN_TYPES
+ }
+ }
+ ]
+ }
+};
+
+function defFunc(ajv) {
+ ajv.addKeyword('typeof', definition);
+}
diff --git a/tools/eslint/node_modules/ajv-keywords/package.json b/tools/eslint/node_modules/ajv-keywords/package.json
new file mode 100644
index 0000000000..8dbe70ffa8
--- /dev/null
+++ b/tools/eslint/node_modules/ajv-keywords/package.json
@@ -0,0 +1,103 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "ajv-keywords@^1.0.0",
+ "scope": null,
+ "escapedName": "ajv-keywords",
+ "name": "ajv-keywords",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "/Users/trott/io.js/tools/node_modules/table"
+ ]
+ ],
+ "_from": "ajv-keywords@>=1.0.0 <2.0.0",
+ "_id": "ajv-keywords@1.1.1",
+ "_inCache": true,
+ "_location": "/ajv-keywords",
+ "_nodeVersion": "4.4.4",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/ajv-keywords-1.1.1.tgz_1474741068795_0.7051337675657123"
+ },
+ "_npmUser": {
+ "name": "esp",
+ "email": "e.poberezkin@me.com"
+ },
+ "_npmVersion": "2.15.1",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "ajv-keywords@^1.0.0",
+ "scope": null,
+ "escapedName": "ajv-keywords",
+ "name": "ajv-keywords",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/table"
+ ],
+ "_resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.1.1.tgz",
+ "_shasum": "02550bc605a3e576041565628af972e06c549d50",
+ "_shrinkwrap": null,
+ "_spec": "ajv-keywords@^1.0.0",
+ "_where": "/Users/trott/io.js/tools/node_modules/table",
+ "author": {
+ "name": "Evgeny Poberezkin"
+ },
+ "bugs": {
+ "url": "https://github.com/epoberezkin/ajv-keywords/issues"
+ },
+ "dependencies": {},
+ "description": "Custom JSON-Schema keywords for ajv validator",
+ "devDependencies": {
+ "ajv": "^4.7.4",
+ "ajv-pack": "^0.2.0",
+ "chai": "^3.5.0",
+ "coveralls": "^2.11.9",
+ "eslint": "^2.11.1",
+ "istanbul": "^0.4.3",
+ "mocha": "^2.5.3",
+ "pre-commit": "^1.1.3"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "02550bc605a3e576041565628af972e06c549d50",
+ "tarball": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.1.1.tgz"
+ },
+ "gitHead": "0d3270f022b24be277952ae9ffdab533464412ed",
+ "homepage": "https://github.com/epoberezkin/ajv-keywords#readme",
+ "keywords": [
+ "JSON-Schema",
+ "ajv",
+ "keywords"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "esp",
+ "email": "e.poberezkin@me.com"
+ }
+ ],
+ "name": "ajv-keywords",
+ "optionalDependencies": {},
+ "peerDependencies": {
+ "ajv": ">=4.2.0"
+ },
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/epoberezkin/ajv-keywords.git"
+ },
+ "scripts": {
+ "eslint": "eslint index.js keywords/*.js",
+ "test": "npm run eslint && npm run test-cov",
+ "test-cov": "istanbul cover -x 'spec/**' node_modules/mocha/bin/_mocha -- spec/*.spec.js -R spec",
+ "test-spec": "mocha spec/*.spec.js -R spec"
+ },
+ "version": "1.1.1"
+}
diff --git a/tools/eslint/node_modules/ajv/.tonic_example.js b/tools/eslint/node_modules/ajv/.tonic_example.js
new file mode 100644
index 0000000000..0c3cc86ce3
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/.tonic_example.js
@@ -0,0 +1,20 @@
+var Ajv = require('ajv');
+var ajv = Ajv({allErrors: true});
+
+var schema = {
+ "properties": {
+ "foo": { "type": "string" },
+ "bar": { "type": "number", "maximum": 3 }
+ }
+};
+
+var validate = ajv.compile(schema);
+
+test({"foo": "abc", "bar": 2});
+test({"foo": 2, "bar": 4});
+
+function test(data) {
+ var valid = validate(data);
+ if (valid) console.log('Valid!');
+ else console.log('Invalid: ' + ajv.errorsText(validate.errors));
+} \ No newline at end of file
diff --git a/tools/eslint/node_modules/ajv/LICENSE b/tools/eslint/node_modules/ajv/LICENSE
new file mode 100644
index 0000000000..810539685b
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Evgeny Poberezkin
+
+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/eslint/node_modules/ajv/README.md b/tools/eslint/node_modules/ajv/README.md
new file mode 100644
index 0000000000..04e226ede0
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/README.md
@@ -0,0 +1,1160 @@
+# Ajv: Another JSON Schema Validator
+
+The fastest JSON Schema validator for node.js and browser. Supports [v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals).
+
+
+[![Build Status](https://travis-ci.org/epoberezkin/ajv.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv)
+[![npm version](https://badge.fury.io/js/ajv.svg)](https://www.npmjs.com/package/ajv)
+[![Code Climate](https://codeclimate.com/github/epoberezkin/ajv/badges/gpa.svg)](https://codeclimate.com/github/epoberezkin/ajv)
+[![Coverage Status](https://coveralls.io/repos/epoberezkin/ajv/badge.svg?branch=master&service=github)](https://coveralls.io/github/epoberezkin/ajv?branch=master)
+
+
+## Contents
+
+- [Performance](#performance)
+- [Features](#features)
+- [Getting started](#getting-started)
+- [Frequently Asked Questions](https://github.com/epoberezkin/ajv/blob/master/FAQ.md)
+- [Using in browser](#using-in-browser)
+- [Command line interface](#command-line-interface)
+- Validation
+ - [Keywords](#validation-keywords)
+ - [Formats](#formats)
+ - [$data reference](#data-reference)
+ - NEW: [$merge and $patch keywords](#merge-and-patch-keywords)
+ - [Defining custom keywords](#defining-custom-keywords)
+ - [Asynchronous schema compilation](#asynchronous-compilation)
+ - [Asynchronous validation](#asynchronous-validation)
+- Modifying data during validation
+ - [Filtering data](#filtering-data)
+ - [Assigning defaults](#assigning-defaults)
+ - [Coercing data types](#coercing-data-types)
+- API
+ - [Methods](#api)
+ - [Options](#options)
+ - [Validation errors](#validation-errors)
+- [Related packages](#related-packages)
+- [Packages using Ajv](#some-packages-using-ajv)
+- [Tests, Contributing, History, License](#tests)
+
+
+## Performance
+
+Ajv generates code using [doT templates](https://github.com/olado/doT) to turn JSON schemas into super-fast validation functions that are efficient for v8 optimization.
+
+Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks:
+
+- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place
+- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster
+- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html)
+- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)
+
+
+Performace of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):
+
+[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=32,4,1&chs=600x416&chxl=-1:%7Cajv%7Cis-my-json-valid%7Cjsen%7Cschemasaurus%7Cthemis%7Cz-schema%7Cjsck%7Cjsonschema%7Cskeemas%7Ctv4%7Cjayschema&chd=t:100,68,61,22.8,17.6,6.6,2.7,0.9,0.7,0.4,0.1)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
+
+
+## Features
+
+- Ajv implements full [JSON Schema draft 4](http://json-schema.org/) standard:
+ - all validation keywords (see [JSON-Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md))
+ - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available)
+ - support of circular references between schemas
+ - correct string lengths for strings with unicode pairs (can be turned off)
+ - [formats](#formats) defined by JSON Schema draft 4 standard and custom formats (can be turned off)
+ - [validates schemas against meta-schema](#api-validateschema)
+- supports [browsers](#using-in-browser) and nodejs 0.10-6.x
+- [asynchronous loading](#asynchronous-compilation) of referenced schemas during compilation
+- "All errors" validation mode with [option allErrors](#options)
+- [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages
+- i18n error messages support with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package
+- [filtering data](#filtering-data) from additional properties
+- [assigning defaults](#assigning-defaults) to missing properties and items
+- [coercing data](#coercing-data-types) to the types specified in `type` keywords
+- [custom keywords](#defining-custom-keywords)
+- keywords `switch`, `constant`, `contains`, `patternGroups`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON-schema v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [option v5](#options)
+- [v5 meta-schema](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#) for schemas using v5 keywords
+- [v5 $data reference](#data-reference) to use values from the validated data as values for the schema keywords
+- [asynchronous validation](#asynchronous-validation) of custom formats and keywords
+
+Currently Ajv is the only validator that passes all the tests from [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (according to [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark), apart from the test that requires that `1.0` is not an integer that is impossible to satisfy in JavaScript).
+
+
+## Install
+
+```
+npm install ajv
+```
+
+
+## <a name="usage"></a>Getting started
+
+Try it in the node REPL: https://tonicdev.com/npm/ajv
+
+
+The fastest validation call:
+
+```javascript
+var Ajv = require('ajv');
+var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true}
+var validate = ajv.compile(schema);
+var valid = validate(data);
+if (!valid) console.log(validate.errors);
+```
+
+or with less code
+
+```javascript
+// ...
+var valid = ajv.validate(schema, data);
+if (!valid) console.log(ajv.errors);
+// ...
+```
+
+or
+
+```javascript
+// ...
+ajv.addSchema(schema, 'mySchema');
+var valid = ajv.validate('mySchema', data);
+if (!valid) console.log(ajv.errorsText());
+// ...
+```
+
+See [API](#api) and [Options](#options) for more details.
+
+Ajv compiles schemas to functions and caches them in all cases (using schema stringified with [json-stable-stringify](https://github.com/substack/json-stable-stringify) as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again.
+
+The best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call).
+
+__Please note__: every time validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback). See [Validation errors](#validation-errors)
+
+
+## Using in browser
+
+You can require Ajv directly from the code you browserify - in this case Ajv will be a part of your bundle.
+
+If you need to use Ajv in several bundles you can create a separate UMD bundle using `npm run bundle` script (thanks to [siddo420](https://github.com/siddo420)).
+
+Then you need to load Ajv in the browser:
+```html
+<script src="ajv.min.js"></script>
+```
+
+This bundle can be used with different module systems or creates global `Ajv` if no module system is found.
+
+The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv).
+
+Ajv is tested with these browsers:
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin)
+
+__Please note__: some frameworks, e.g. Dojo, may redifine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/epoberezkin/ajv/issues/234)).
+
+
+## Command line interface
+
+CLI is available as a separate npm package [ajv-cli](https://github.com/jessedc/ajv-cli). It supports:
+
+- compiling JSON-schemas to test their validity
+- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/epoberezkin/ajv-pack))
+- validating data file(s) against JSON-schema
+- testing expected validity of data against JSON-schema
+- referenced schemas
+- custom meta-schemas
+- files in JSON and JavaScript format
+- all Ajv options
+- reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format
+
+
+## Validation keywords
+
+Ajv supports all validation keywords from draft 4 of JSON-schema standard:
+
+- [type](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#type)
+- [for numbers](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf
+- [for strings](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format
+- [for arrays](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems
+- [for objects](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minproperties, required, properties, patternProperties, additionalProperties, dependencies
+- [compound keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, not, oneOf, anyOf, allOf
+
+With option `v5: true` Ajv also supports all validation keywords and [$data reference](#data-reference) from [v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON-schema standard:
+
+- [switch](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#switch-v5-proposal) - conditional validation with a sequence of if/then clauses
+- [contains](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#contains-v5-proposal) - check that array contains a valid item
+- [constant](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#constant-v5-proposal) - check that data is equal to some value
+- [patternGroups](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patterngroups-v5-proposal) - a more powerful alternative to patternProperties
+- [patternRequired](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patternrequired-v5-proposal) - like `required` but with patterns that some property should match.
+- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-v5-proposal) - setting limits for date, time, etc.
+
+See [JSON-Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) for more details.
+
+
+## Formats
+
+The following formats are supported for string validation with "format" keyword:
+
+- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6).
+- _time_: time with optional time-zone.
+- _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)).
+- _uri_: full uri with optional protocol.
+- _email_: email address.
+- _hostname_: host name acording to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5).
+- _ipv4_: IP address v4.
+- _ipv6_: IP address v6.
+- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor.
+- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122).
+- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901).
+- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00).
+
+There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `email`, and `hostname`. See [Options](#options) for details.
+
+You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method.
+
+You can find patterns used for format validation and the sources that were used in [formats.js](https://github.com/epoberezkin/ajv/blob/master/lib/compile/formats.js).
+
+
+## $data reference
+
+With `v5` option you can use values from the validated data as the values for the schema keywords. See [v5 proposal](https://github.com/json-schema/json-schema/wiki/$data-(v5-proposal)) for more information about how it works.
+
+`$data` reference is supported in the keywords: constant, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems.
+
+The value of "$data" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema).
+
+Examples.
+
+This schema requires that the value in property `smaller` is less or equal than the value in the property larger:
+
+```javascript
+var schema = {
+ "properties": {
+ "smaller": {
+ "type": "number",
+ "maximum": { "$data": "1/larger" }
+ },
+ "larger": { "type": "number" }
+ }
+};
+
+var validData = {
+ smaller: 5,
+ larger: 7
+};
+```
+
+This schema requires that the properties have the same format as their field names:
+
+```javascript
+var schema = {
+ "additionalProperties": {
+ "type": "string",
+ "format": { "$data": "0#" }
+ }
+};
+
+var validData = {
+ 'date-time': '1963-06-19T08:30:06.283185Z',
+ email: 'joe.bloggs@example.com'
+}
+```
+
+`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `constant` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails.
+
+
+## $merge and $patch keywords
+
+With v5 option and the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON-schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902).
+
+To add keywords `$merge` and `$patch` to Ajv instance use this code:
+
+```javascript
+require('ajv-merge-patch')(ajv);
+```
+
+Examples.
+
+Using `$merge`:
+
+```json
+{
+ "$merge": {
+ "source": {
+ "type": "object",
+ "properties": { "p": { "type": "string" } },
+ "additionalProperties": false
+ },
+ "with": {
+ "properties": { "q": { "type": "number" } }
+ }
+ }
+}
+```
+
+Using `$patch`:
+
+```json
+{
+ "$patch": {
+ "source": {
+ "type": "object",
+ "properties": { "p": { "type": "string" } },
+ "additionalProperties": false
+ },
+ "with": [
+ { "op": "add", "path": "/properties/q", "value": { "type": "number" } }
+ ]
+ }
+}
+```
+
+The schemas above are equivalent to this schema:
+
+```json
+{
+ "type": "object",
+ "properties": {
+ "p": { "type": "string" },
+ "q": { "type": "number" }
+ },
+ "additionalProperties": false
+}
+```
+
+The properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema.
+
+See the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) for more information.
+
+
+## Defining custom keywords
+
+The advantages of using custom keywords are:
+
+- allow creating validation scenarios that cannot be expressed using JSON-Schema
+- simplify your schemas
+- help bringing a bigger part of the validation logic to your schemas
+- make your schemas more expressive, less verbose and closer to your application domain
+- implement custom data processors that modify your data and/or create side effects while the data is being validated
+
+The concerns you have to be aware of when extending JSON-schema standard with custom keywords are the portability and understanding of your schemas. You will have to support these custom keywords on other platforms and to properly document these keywords so that everybody can understand them in your schemas.
+
+You can define custom keywords with [addKeyword](#api-addkeyword) method. Keywords are defined on the `ajv` instance level - new instances will not have previously defined keywords.
+
+Ajv allows defining keywords with:
+- validation function
+- compilation function
+- macro function
+- inline compilation function that should return code (as string) that will be inlined in the currently compiled schema.
+
+Example. `range` and `exclusiveRange` keywords using compiled schema:
+
+```javascript
+ajv.addKeyword('range', { type: 'number', compile: function (sch, parentSchema) {
+ var min = sch[0];
+ var max = sch[1];
+
+ return parentSchema.exclusiveRange === true
+ ? function (data) { return data > min && data < max; }
+ : function (data) { return data >= min && data <= max; }
+} });
+
+var schema = { "range": [2, 4], "exclusiveRange": true };
+var validate = ajv.compile(schema);
+console.log(validate(2.01)); // true
+console.log(validate(3.99)); // true
+console.log(validate(2)); // false
+console.log(validate(4)); // false
+```
+
+Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords.
+
+See [Defining custom keywords](https://github.com/epoberezkin/ajv/blob/master/CUSTOM.md) for more details.
+
+
+## Asynchronous compilation
+
+During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` method and `loadSchema` [option](#options).
+
+Example:
+
+```javascript
+var ajv = new Ajv({ loadSchema: loadSchema });
+
+ajv.compileAsync(schema, function (err, validate) {
+ if (err) return;
+ var valid = validate(data);
+});
+
+function loadSchema(uri, callback) {
+ request.json(uri, function(err, res, body) {
+ if (err || res.statusCode >= 400)
+ callback(err || new Error('Loading error: ' + res.statusCode));
+ else
+ callback(null, body);
+ });
+}
+```
+
+__Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"` or `"fail"` for asynchronous compilation to work.
+
+
+## Asynchronous validation
+
+Example in node REPL: https://tonicdev.com/esp/ajv-asynchronous-validation
+
+You can define custom formats and keywords that perform validation asyncronously by accessing database or some service. You should add `async: true` in the keyword or format defnition (see [addFormat](#api-addformat), [addKeyword](#api-addkeyword) and [Defining custom keywords](#defining-custom-keywords)).
+
+If your schema uses asynchronous formats/keywords or refers to some schema that contains them it should have `"$async": true` keyword so that Ajv can compile it correctly. If asynchronous format/keyword or reference to asynchronous schema is used in the schema without `$async` keyword Ajv will throw an exception during schema compilation.
+
+__Please note__: all asynchronous subschemas that are referenced from the current or other schemas should have `"$async": true` keyword as well, otherwise the schema compilation will fail.
+
+Validation function for an asynchronous custom format/keyword should return a promise that resolves to `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function). Ajv compiles asynchronous schemas to either [generator function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) (default) that can be optionally transpiled with [regenerator](https://github.com/facebook/regenerator) or to [es7 async function](http://tc39.github.io/ecmascript-asyncawait/) that can be transpiled with [nodent](https://github.com/MatAtBread/nodent) or with regenerator as well. You can also supply any other transpiler as a function. See [Options](#options).
+
+The compiled validation function has `$async: true` property (if the schema is asynchronous), so you can differentiate these functions if you are using both syncronous and asynchronous schemas.
+
+If you are using generators, the compiled validation function can be either wrapped with [co](https://github.com/tj/co) (default) or returned as generator function, that can be used directly, e.g. in [koa](http://koajs.com/) 1.0. `co` is a small library, it is included in Ajv (both as npm dependency and in the browser bundle).
+
+Generator functions are currently supported in Chrome, Firefox and node.js (0.11+); if you are using Ajv in other browsers or in older versions of node.js you should use one of available transpiling options. All provided async modes use global Promise class. If your platform does not have Promise you should use a polyfill that defines it.
+
+Validation result will be a promise that resolves to `true` or rejects with an exception `Ajv.ValidationError` that has the array of validation errors in `errors` property.
+
+
+Example:
+
+```javascript
+/**
+ * without "async" and "transpile" options (or with option {async: true})
+ * Ajv will choose the first supported/installed option in this order:
+ * 1. native generator function wrapped with co
+ * 2. es7 async functions transpiled with nodent
+ * 3. es7 async functions transpiled with regenerator
+ */
+
+var ajv = new Ajv;
+
+ajv.addKeyword('idExists', {
+ async: true,
+ type: 'number',
+ validate: checkIdExists
+});
+
+
+function checkIdExists(schema, data) {
+ return knex(schema.table)
+ .select('id')
+ .where('id', data)
+ .then(function (rows) {
+ return !!rows/length; // true if record is found
+ });
+}
+
+var schema = {
+ "$async": true,
+ "properties": {
+ "userId": {
+ "type": "integer",
+ "idExists": { "table": "users" }
+ },
+ "postId": {
+ "type": "integer",
+ "idExists": { "table": "posts" }
+ }
+ }
+};
+
+var validate = ajv.compile(schema);
+
+validate({ userId: 1, postId: 19 }))
+.then(function (valid) {
+ // "valid" is always true here
+ console.log('Data is valid');
+})
+.catch(function (err) {
+ if (!(err instanceof Ajv.ValidationError)) throw err;
+ // data is invalid
+ console.log('Validation errors:', err.errors);
+});
+
+```
+
+### Using transpilers with asyncronous validation functions.
+
+To use a transpiler you should separately install it (or load its bundle in the browser).
+
+Ajv npm package includes minified browser bundles of regenerator and nodent in dist folder.
+
+
+#### Using nodent
+
+```javascript
+var ajv = new Ajv({ /* async: 'es7', */ transpile: 'nodent' });
+var validate = ajv.compile(schema); // transpiled es7 async function
+validate(data).then(successFunc).catch(errorFunc);
+```
+
+`npm install nodent` or use `nodent.min.js` from dist folder of npm package.
+
+
+#### Using regenerator
+
+```javascript
+var ajv = new Ajv({ /* async: 'es7', */ transpile: 'regenerator' });
+var validate = ajv.compile(schema); // transpiled es7 async function
+validate(data).then(successFunc).catch(errorFunc);
+```
+
+`npm install regenerator` or use `regenerator.min.js` from dist folder of npm package.
+
+
+#### Using other transpilers
+
+```javascript
+var ajv = new Ajv({ async: 'es7', transpile: transpileFunc });
+var validate = ajv.compile(schema); // transpiled es7 async function
+validate(data).then(successFunc).catch(errorFunc);
+```
+
+See [Options](#options).
+
+
+#### Comparison of async modes
+
+|mode|transpile<br>speed*|run-time<br>speed*|bundle<br>size|
+|---|:-:|:-:|:-:|
+|generators<br>(native)|-|1.0|-|
+|es7.nodent|1.35|1.1|183Kb|
+|es7.regenerator|1.0|2.7|322Kb|
+|regenerator|1.0|3.2|322Kb|
+
+\* Relative performance in node v.4, smaller is better.
+
+[nodent](https://github.com/MatAtBread/nodent) has several advantages:
+
+- much smaller browser bundle than regenerator
+- almost the same performance of generated code as native generators in nodejs and the latest Chrome
+- much better performace than native generators in other browsers
+- works in IE 9 (regenerator does not)
+
+[regenerator](https://github.com/facebook/regenerator) is a more widely adopted alternative.
+
+
+## Filtering data
+
+With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation.
+
+This option modifies original data.
+
+Example:
+
+```javascript
+var ajv = new Ajv({ removeAdditional: true });
+var schema = {
+ "additionalProperties": false,
+ "properties": {
+ "foo": { "type": "number" },
+ "bar": {
+ "additionalProperties": { "type": "number" },
+ "properties": {
+ "baz": { "type": "string" }
+ }
+ }
+ }
+}
+
+var data = {
+ "foo": 0,
+ "additional1": 1, // will be removed; `additionalProperties` == false
+ "bar": {
+ "baz": "abc",
+ "additional2": 2 // will NOT be removed; `additionalProperties` != false
+ },
+}
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // { "foo": 0, "bar": { "baz": "abc", "additional2": 2 }
+```
+
+If `removeAdditional` option in the example above were `"all"` then both `additional1` and `additional2` properties would have been removed.
+
+If the option were `"failing"` then property `additional1` would have been removed regardless of its value and property `additional2` would have been removed only if its value were failing the schema in the inner `additionalProperties` (so in the example above it would have stayed because it passes the schema, but any non-number would have been removed).
+
+__Please note__: If you use `removeAdditional` option with `additionalProperties` keyword inside `anyOf`/`oneOf` keywords your validation can fail with this schema, for example:
+
+```JSON
+{
+ "type": "object",
+ "oneOf": [
+ {
+ "properties": {
+ "foo": { "type": "string" }
+ },
+ "required": [ "foo" ],
+ "additionalProperties": false
+ },
+ {
+ "properties": {
+ "bar": { "type": "integer" }
+ },
+ "required": [ "bar" ],
+ "additionalProperties": false
+ }
+ ]
+}
+```
+
+The intention of the schema above is to allow objects with either the string property "foo" or the integer property "bar", but not with both and not with any other properties.
+
+With the option `removeAdditional: true` the validation will pass for the object `{ "foo": "abc"}` but will fail for the object `{"bar": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema).
+
+While this behaviour is unexpected (issues [#129](https://github.com/epoberezkin/ajv/issues/129), [#134](https://github.com/epoberezkin/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way:
+
+```JSON
+{
+ "type": "object",
+ "properties": {
+ "foo": { "type": "string" },
+ "bar": { "type": "integer" }
+ },
+ "additionalProperties": false,
+ "oneOf": [
+ { "required": [ "foo" ] },
+ { "required": [ "bar" ] }
+ ]
+}
+```
+
+The schema above is also more efficient - it will compile into a faster function.
+
+
+## Assigning defaults
+
+With [option `useDefaults`](#options) Ajv will assign values from `default` keyword in the schemas of `properties` and `items` (when it is the array of schemas) to the missing properties and items.
+
+This option modifies original data.
+
+__Please note__: by default the default value is inserted in the generated validation code as a literal (starting from v4.0), so the value inserted in the data will be the deep clone of the default in the schema.
+
+If you need to insert the default value in the data by reference pass the option `useDefaults: "shared"`.
+
+Inserting defaults by reference can be faster (in case you have an object in `default`) and it allows to have dynamic values in defaults, e.g. timestamp, without recompiling the schema. The side effect is that modifying the default value in any validated data instance will change the default in the schema and in other validated data instances. See example 3 below.
+
+
+Example 1 (`default` in `properties`):
+
+```javascript
+var ajv = new Ajv({ useDefaults: true });
+var schema = {
+ "type": "object",
+ "properties": {
+ "foo": { "type": "number" },
+ "bar": { "type": "string", "default": "baz" }
+ },
+ "required": [ "foo", "bar" ]
+};
+
+var data = { "foo": 1 };
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // { "foo": 1, "bar": "baz" }
+```
+
+Example 2 (`default` in `items`):
+
+```javascript
+var schema = {
+ "type": "array",
+ "items": [
+ { "type": "number" },
+ { "type": "string", "default": "foo" }
+ ]
+}
+
+var data = [ 1 ];
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // [ 1, "foo" ]
+```
+
+Example 3 (inserting "defaults" by reference):
+
+```javascript
+var ajv = new Ajv({ useDefaults: 'shared' });
+
+var schema = {
+ properties: {
+ foo: {
+ default: { bar: 1 }
+ }
+ }
+}
+
+var validate = ajv.compile(schema);
+
+var data = {};
+console.log(validate(data)); // true
+console.log(data); // { foo: { bar: 1 } }
+
+data.foo.bar = 2;
+
+var data2 = {};
+console.log(validate(data2)); // true
+console.log(data2); // { foo: { bar: 2 } }
+```
+
+`default` keywords in other cases are ignored:
+
+- not in `properties` or `items` subschemas
+- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/epoberezkin/ajv/issues/42))
+- in `if` subschema of v5 `switch` keyword
+- in schemas generated by custom macro keywords
+
+
+## Coercing data types
+
+When you are validating user inputs all your data properties are usually strings. The option `coerceTypes` allows you to have your data types coerced to the types specified in your schema `type` keywords, both to pass the validation and to use the correctly typed data afterwards.
+
+This option modifies original data.
+
+__Please note__: if you pass a scalar value to the validating function its type will be coerced and it will pass the validation, but the value of the variable you pass won't be updated because scalars are passed by value.
+
+
+Example 1:
+
+```javascript
+var ajv = new Ajv({ coerceTypes: true });
+var schema = {
+ "type": "object",
+ "properties": {
+ "foo": { "type": "number" },
+ "bar": { "type": "boolean" }
+ },
+ "required": [ "foo", "bar" ]
+};
+
+var data = { "foo": "1", "bar": "false" };
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // { "foo": 1, "bar": false }
+```
+
+Example 2 (array coercions):
+
+```javascript
+var ajv = new Ajv({ coerceTypes: 'array' });
+var schema = {
+ "properties": {
+ "foo": { "type": "array", "items": { "type": "number" } },
+ "bar": { "type": "boolean" }
+ }
+};
+
+var data = { "foo": "1", "bar": ["false"] };
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // { "foo": [1], "bar": false }
+```
+
+The coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of "anyOf" and other compound keywords).
+
+See [Coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md) for details.
+
+
+## API
+
+##### new Ajv(Object options) -&gt; Object
+
+Create Ajv instance.
+
+All the instance methods below are bound to the instance, so they can be used without the instance.
+
+
+##### .compile(Object schema) -&gt; Function&lt;Object data&gt;
+
+Generate validating function and cache the compiled schema for future use.
+
+Validating function returns boolean and has properties `errors` with the errors from the last validation (`null` if there were no errors) and `schema` with the reference to the original schema.
+
+Unless the option `validateSchema` is false, the schema will be validated against meta-schema and if schema is invalid the error will be thrown. See [options](#options).
+
+
+##### .compileAsync(Object schema, Function callback)
+
+Asyncronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. Callback will always be called with 2 parameters: error (or null) and validating function. Error will be not null in the following cases:
+
+- missing schema can't be loaded (`loadSchema` calls callback with error).
+- the schema containing missing reference is loaded, but the reference cannot be resolved.
+- schema (or some referenced schema) is invalid.
+
+The function compiles schema and loads the first missing schema multiple times, until all missing schemas are loaded.
+
+See example in [Asynchronous compilation](#asynchronous-compilation).
+
+
+##### .validate(Object schema|String key|String ref, data) -&gt; Boolean
+
+Validate data using passed schema (it will be compiled and cached).
+
+Instead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference.
+
+Validation errors will be available in the `errors` property of Ajv instance (`null` if there were no errors).
+
+__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later.
+
+If the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation).
+
+
+##### .addSchema(Array&lt;Object&gt;|Object schema [, String key])
+
+Add schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole.
+
+Array of schemas can be passed (schemas should have ids), the second parameter will be ignored.
+
+Key can be passed that can be used to reference the schema and will be used as the schema id if there is no id inside the schema. If the key is not passed, the schema id will be used as the key.
+
+
+Once the schema is added, it (and all the references inside it) can be referenced in other schemas and used to validate data.
+
+Although `addSchema` does not compile schemas, explicit compilation is not required - the schema will be compiled when it is used first time.
+
+By default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option.
+
+
+##### .addMetaSchema(Array&lt;Object&gt;|Object schema [, String key])
+
+Adds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option).
+
+There is no need to explicitly add draft 4 meta schema (http://json-schema.org/draft-04/schema and http://json-schema.org/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`.
+
+With option `v5: true` [meta-schema that includes v5 keywords](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json) also added.
+
+
+##### <a name="api-validateschema"></a>.validateSchema(Object schema) -&gt; Boolean
+
+Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON-Schema standard.
+
+By default this method is called automatically when the schema is added, so you rarely need to use it directly.
+
+If schema doesn't have `$schema` property it is validated against draft 4 meta-schema (option `meta` should not be false) or against [v5 meta-schema](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#) if option `v5` is true.
+
+If schema has `$schema` property then the schema with this id (that should be previously added) is used to validate passed schema.
+
+Errors will be available at `ajv.errors`.
+
+
+##### .getSchema(String key) -&gt; Function&lt;Object data&gt;
+
+Retrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). Returned validating function has `schema` property with the reference to the original schema.
+
+
+##### .removeSchema([Object schema|String key|String ref|RegExp pattern])
+
+Remove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references.
+
+Schema can be removed using:
+- key passed to `addSchema`
+- it's full reference (id)
+- RegExp that should match schema id or key (meta-schemas won't be removed)
+- actual schema object that will be stable-stringified to remove schema from cache
+
+If no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared.
+
+
+##### <a name="api-addformat"></a>.addFormat(String name, String|RegExp|Function|Object format)
+
+Add custom format to validate strings. It can also be used to replace pre-defined formats for Ajv instance.
+
+Strings are converted to RegExp.
+
+Function should return validation result as `true` or `false`.
+
+If object is passed it should have properties `validate`, `compare` and `async`:
+
+- _validate_: a string, RegExp or a function as described above.
+- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (from [v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) - `v5` option should be used). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal.
+- _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`.
+
+Custom formats can be also added via `formats` option.
+
+
+##### <a name="api-addkeyword"></a>.addKeyword(String keyword, Object definition)
+
+Add custom validation keyword to Ajv instance.
+
+Keyword should be a valid JavaScript identifier.
+
+Keyword should be different from all standard JSON schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance.
+
+Keyword definition is an object with the following properties:
+
+- _type_: optional string or array of strings with data type(s) that the keyword applies to. If not present, the keyword will apply to all types.
+- _validate_: validating function
+- _compile_: compiling function
+- _macro_: macro function
+- _inline_: compiling function that returns code (as string)
+- _schema_: an optional `false` value used with "validate" keyword to not pass schema
+- _metaSchema_: an optional meta-schema for keyword schema
+- _$data_: an optional `true` value to support [$data reference](#data-reference) as the value of custom keyword. The reference will be resolved at validation time. If the keyword has meta-schema it would be extended to allow $data and it will be used to validate the resolved value. Supporting $data reference requires that keyword has validating function (as the only option or in addition to compile, macro or inline function).
+- _async_: an optional `true` value if the validation function is asynchronous (whether it is compiled or passed in _validate_ property); in this case it should return a promise that resolves with a value `true` or `false`. This option is ignored in case of "macro" and "inline" keywords.
+- _errors_: an optional boolean indicating whether keyword returns errors. If this property is not set Ajv will determine if the errors were set in case of failed validation.
+
+_compile_, _macro_ and _inline_ are mutually exclusive, only one should be used at a time. _validate_ can be used separately or in addition to them to support $data reference.
+
+__Please note__: If the keyword is validating data type that is different from the type(s) in its definition, the validation function will not be called (and expanded macro will not be used), so there is no need to check for data type inside validation function or inside schema returned by macro function (unless you want to enforce a specific type and for some reason do not want to use a separate `type` keyword for that). In the same way as standard keywords work, if the keyword does not apply to the data type being validated, the validation of this keyword will succeed.
+
+See [Defining custom keywords](#defining-custom-keywords) for more details.
+
+
+##### .errorsText([Array&lt;Object&gt; errors [, Object options]]) -&gt; String
+
+Returns the text with all errors in a String.
+
+Options can have properties `separator` (string used to separate errors, ", " by default) and `dataVar` (the variable name that dataPaths are prefixed with, "data" by default).
+
+
+## Options
+
+Defaults:
+
+```javascript
+{
+ // validation and reporting options:
+ v5: false,
+ allErrors: false,
+ verbose: false,
+ jsonPointers: false,
+ uniqueItems: true,
+ unicode: true,
+ format: 'fast',
+ formats: {},
+ schemas: {},
+ // referenced schema options:
+ missingRefs: true,
+ extendRefs: true,
+ loadSchema: undefined, // function(uri, cb) { /* ... */ cb(err, schema); },
+ // options to modify validated data:
+ removeAdditional: false,
+ useDefaults: false,
+ coerceTypes: false,
+ // asynchronous validation options:
+ async: undefined,
+ transpile: undefined,
+ // advanced options:
+ meta: true,
+ validateSchema: true,
+ addUsedSchema: true,
+ inlineRefs: true,
+ passContext: false,
+ loopRequired: Infinity,
+ ownProperties: false,
+ multipleOfPrecision: false,
+ errorDataPath: 'object',
+ sourceCode: true,
+ messages: true,
+ beautify: false,
+ cache: new Cache
+}
+```
+
+##### Validation and reporting options
+
+- _v5_: add keywords `switch`, `constant`, `contains`, `patternGroups`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON-schema v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals). With this option added schemas without `$schema` property are validated against [v5 meta-schema](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#). `false` by default.
+- _allErrors_: check all rules collecting all errors. Default is to return after the first error.
+- _verbose_: include the reference to the part of the schema (`schema` and `parentSchema`) and validated data in errors (false by default).
+- _jsonPointers_: set `dataPath` propery of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation.
+- _uniqueItems_: validate `uniqueItems` keyword (true by default).
+- _unicode_: calculate correct length of strings with unicode pairs (true by default). Pass `false` to use `.length` of strings that is faster, but gives "incorrect" lengths of strings with unicode pairs - each unicode pair is counted as two characters.
+- _format_: formats validation mode ('fast' by default). Pass 'full' for more correct and slow validation or `false` not to validate formats at all. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode.
+- _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method.
+- _schemas_: an array or object of schemas that will be added to the instance. If the order is important, pass array. In this case schemas must have IDs in them. Otherwise the object can be passed - `addSchema(value, key)` will be called for each schema in this object.
+
+
+##### Referenced schema options
+
+- _missingRefs_: handling of missing referenced schemas. Option values:
+ - `true` (default) - if the reference cannot be resolved during compilation the exception is thrown. The thrown error has properties `missingRef` (with hash fragment) and `missingSchema` (without it). Both properties are resolved relative to the current base id (usually schema id, unless it was substituted).
+ - `"ignore"` - to log error during compilation and always pass validation.
+ - `"fail"` - to log error and successfully compile schema but fail validation if this rule is checked.
+- _extendRefs_: validation of other keywords when `$ref` is present in the schema. Option values:
+ - `true` (default) - validate all keywords in the schemas with `$ref`.
+ - `"ignore"` - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation.
+ - `"fail"` - if other validation keywords are used together with `$ref` the exception will be throw when the schema is compiled.
+- _loadSchema_: asynchronous function that will be used to load remote schemas when the method `compileAsync` is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept 2 parameters: remote schema uri and node-style callback. See example in [Asynchronous compilation](#asynchronous-compilation).
+
+
+##### Options to modify validated data
+
+- _removeAdditional_: remove additional properties - see example in [Filtering data](#filtering-data). This option is not used if schema is added with `addMetaSchema` method. Option values:
+ - `false` (default) - not to remove additional properties
+ - `"all"` - all additional properties are removed, regardless of `additionalProperties` keyword in schema (and no validation is made for them).
+ - `true` - only additional properties with `additionalProperties` keyword equal to `false` are removed.
+ - `"failing"` - additional properties that fail schema validation will be removed (where `additionalProperties` keyword is `false` or schema).
+- _useDefaults_: replace missing properties and items with the values from corresponding `default` keywords. Default behaviour is to ignore `default` keywords. This option is not used if schema is added with `addMetaSchema` method. See examples in [Assigning defaults](#assigning-defaults). Option values:
+ - `false` (default) - do not use defaults
+ - `true` - insert defaults by value (safer and slower, object literal is used).
+ - `"shared"` - insert defaults by reference (faster). If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well.
+- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md). Option values:
+ - `false` (default) - no type coercion.
+ - `true` - coerce scalar data types.
+ - `"array"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema).
+
+
+##### Asynchronous validation options
+
+- _async_: determines how Ajv compiles asynchronous schemas (see [Asynchronous validation](#asynchronous-validation)) to functions. Option values:
+ - `"*"` / `"co*"` - compile to generator function ("co*" - wrapped with `co.wrap`). If generators are not supported and you don't provide `transpile` option, the exception will be thrown when Ajv instance is created.
+ - `"es7"` - compile to es7 async function. Unless your platform supports them you need to provide `transpile` option. Currently only MS Edge 13 with flag supports es7 async functions according to [compatibility table](http://kangax.github.io/compat-table/es7/)).
+ - `true` - if transpile option is not passed Ajv will choose the first supported/installed async/transpile modes in this order: "co*" (native generator with co.wrap), "es7"/"nodent", "co*"/"regenerator" during the creation of the Ajv instance. If none of the options is available the exception will be thrown.
+ - `undefined`- Ajv will choose the first available async mode in the same way as with `true` option but when the first asynchronous schema is compiled.
+- _transpile_: determines whether Ajv transpiles compiled asynchronous validation function. Option values:
+ - `"nodent"` - transpile with [nodent](https://github.com/MatAtBread/nodent). If nodent is not installed, the exception will be thrown. nodent can only transpile es7 async functions; it will enforce this mode.
+ - `"regenerator"` - transpile with [regenerator](https://github.com/facebook/regenerator). If regenerator is not installed, the exception will be thrown.
+ - a function - this function should accept the code of validation function as a string and return transpiled code. This option allows you to use any other transpiler you prefer.
+
+
+##### Advanced options
+
+- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). With option `v5: true` [v5 meta-schema](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#) will be added as well. If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword.
+- _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can either be http://json-schema.org/schema or http://json-schema.org/draft-04/schema or absent (draft-4 meta-schema will be used) or can be a reference to the schema previously added with `addMetaSchema` method. Option values:
+ - `true` (default) - if the validation fails, throw the exception.
+ - `"log"` - if the validation fails, log error.
+ - `false` - skip schema validation.
+- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `id` property that doesn't start with "#". If `id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `id` uniqueness check when these methods are used. This option does not affect `addSchema` method.
+- _inlineRefs_: Affects compilation of referenced schemas. Option values:
+ - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions.
+ - `false` - to not inline referenced schemas (they will be compiled as separate functions).
+ - integer number - to limit the maximum number of keywords of the schema that will be inlined.
+- _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance.
+- _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance.
+- _ownProperties_: by default ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst.
+- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/epoberezkin/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations).
+- _errorDataPath_: set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`.
+- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call).
+- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n)).
+- _beautify_: format the generated function with [js-beautify](https://github.com/beautify-web/js-beautify) (the validating function is generated without line-breaks). `npm install js-beautify` to use this option. `true` or js-beautify options can be passed.
+- _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`.
+
+
+## Validation errors
+
+In case of validation failure Ajv assigns the array of errors to `.errors` property of validation function (or to `.errors` property of Ajv instance in case `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation) the returned promise is rejected with the exception of the class `Ajv.ValidationError` that has `.errors` poperty.
+
+
+### Error objects
+
+Each error is an object with the following properties:
+
+- _keyword_: validation keyword.
+- _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `".prop[1].subProp"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `"/prop/1/subProp"`).
+- _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation.
+- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package). See below for parameters set by all keywords.
+- _message_: the standard error message (can be excluded with option `messages` set to false).
+- _schema_: the schema of the keyword (added with `verbose` option).
+- _parentSchema_: the schema containing the keyword (added with `verbose` option)
+- _data_: the data validated by the keyword (added with `verbose` option).
+
+
+### Error parameters
+
+Properties of `params` object in errors depend on the keyword that failed validation.
+
+- `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword).
+- `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false).
+- `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords).
+- `patternGroups` (with v5 option) - properties:
+ - `pattern`
+ - `reason` ("minimum"/"maximum"),
+ - `limit` (max/min allowed number of properties matching number)
+- `dependencies` - properties:
+ - `property` (dependent property),
+ - `missingProperty` (required missing dependency - only the first one is reported currently)
+ - `deps` (required dependencies, comma separated list as a string),
+ - `depsCount` (the number of required dependedncies).
+- `format` - property `format` (the schema of the keyword).
+- `maximum`, `minimum` - properties:
+ - `limit` (number, the schema of the keyword),
+ - `exclusive` (boolean, the schema of `exclusiveMaximum` or `exclusiveMinimum`),
+ - `comparison` (string, comparison operation to compare the data to the limit, with the data on the left and the limit on the right; can be "<", "<=", ">", ">=")
+- `multipleOf` - property `multipleOf` (the schema of the keyword)
+- `pattern` - property `pattern` (the schema of the keyword)
+- `required` - property `missingProperty` (required property that is missing).
+- `patternRequired` (with v5 option) - property `missingPattern` (required pattern that did not match any property).
+- `type` - property `type` (required type(s), a string, can be a comma-separated list)
+- `uniqueItems` - properties `i` and `j` (indices of duplicate items).
+- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword).
+- `$ref` - property `ref` with the referenced schema URI.
+- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name).
+
+
+## Related packages
+
+- [ajv-cli](https://github.com/epoberezkin/ajv-cli) - command line interface for Ajv
+- [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) - internationalised error messages
+- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - keywords $merge and $patch from v5 proposals.
+- [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - several custom keywords that can be used with Ajv (typeof, instanceof, range, propertyNames)
+
+
+## Some packages using Ajv
+
+- [jsonscript-js](https://github.com/JSONScript/jsonscript-js) - the interpreter for [JSONScript](http://www.jsonscript.org) - scripted processing of existing endpoints and services
+- [osprey-method-handler](https://github.com/mulesoft-labs/osprey-method-handler) - Express middleware for validating requests and responses based on a RAML method object, used in [osprey](https://github.com/mulesoft/osprey) - validating API proxy generated from a RAML definition
+- [jsoneditor](https://github.com/josdejong/jsoneditor) - A web-based tool to view, edit, format, and validate JSON http://jsoneditoronline.org
+- [objection](https://github.com/vincit/objection.js) - SQL-friendly ORM for node.js
+- [table](https://github.com/gajus/table) - formats data into a string table
+- [ripple-lib](https://github.com/ripple/ripple-lib) - A JavaScript API for interacting with [Ripple](https://ripple.com) in Node.js and the browser
+- [restbase](https://github.com/wikimedia/restbase) - Distributed storage with REST API & dispatcher for backend services built to provide a low-latency & high-throughput API for Wikipedia / Wikimedia content
+- [hippie-swagger](https://github.com/CacheControl/hippie-swagger) - [Hippie](https://github.com/vesln/hippie) wrapper that provides end to end API testing with swagger validation
+- [react-form-controlled](https://github.com/seeden/react-form-controlled) - React controlled form components with validation
+- [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - A schema definition module for RabbitMQ graphs and messages
+- [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema
+- [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON-schema with expect in mocha tests
+- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON-Schema
+- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter
+- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages
+
+
+## Tests
+
+```
+npm install
+git submodule update --init
+npm test
+```
+
+## Contributing
+
+All validation functions are generated using doT templates in [dot](https://github.com/epoberezkin/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency.
+
+`npm run build` - compiles templates to [dotjs](https://github.com/epoberezkin/ajv/tree/master/lib/dotjs) folder.
+
+`npm run watch` - automatically compiles templates when files in dot folder change
+
+Please see [Contributing guidelines](https://github.com/epoberezkin/ajv/blob/master/CONTRIBUTING.md)
+
+
+## Changes history
+
+See https://github.com/epoberezkin/ajv/releases
+
+__Please note__: [Changes in version 4.6.0](https://github.com/epoberezkin/ajv/releases/tag/4.6.0).
+
+[Changes in version 4.0.0](https://github.com/epoberezkin/ajv/releases/tag/4.0.0).
+
+[Changes in version 3.0.0](https://github.com/epoberezkin/ajv/releases/tag/3.0.0).
+
+[Changes in version 2.0.0](https://github.com/epoberezkin/ajv/releases/tag/2.0.0).
+
+
+## License
+
+[MIT](https://github.com/epoberezkin/ajv/blob/master/LICENSE)
diff --git a/tools/eslint/node_modules/ajv/dist/ajv.bundle.js b/tools/eslint/node_modules/ajv/dist/ajv.bundle.js
new file mode 100644
index 0000000000..82cdd975d5
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/dist/ajv.bundle.js
@@ -0,0 +1,7919 @@
+(function(f){if(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.Ajv = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+'use strict';
+
+module.exports = {
+ setup: setupAsync,
+ compile: compileAsync
+};
+
+
+var util = require('./compile/util');
+
+var ASYNC = {
+ '*': checkGenerators,
+ 'co*': checkGenerators,
+ 'es7': checkAsyncFunction
+};
+
+var TRANSPILE = {
+ 'nodent': getNodent,
+ 'regenerator': getRegenerator
+};
+
+var MODES = [
+ { async: 'co*' },
+ { async: 'es7', transpile: 'nodent' },
+ { async: 'co*', transpile: 'regenerator' }
+];
+
+
+var regenerator, nodent;
+
+
+function setupAsync(opts, required) {
+ if (required !== false) required = true;
+ var async = opts.async
+ , transpile = opts.transpile
+ , check;
+
+ switch (typeof transpile) {
+ case 'string':
+ var get = TRANSPILE[transpile];
+ if (!get) throw new Error('bad transpiler: ' + transpile);
+ return (opts._transpileFunc = get(opts, required));
+ case 'undefined':
+ case 'boolean':
+ if (typeof async == 'string') {
+ check = ASYNC[async];
+ if (!check) throw new Error('bad async mode: ' + async);
+ return (opts.transpile = check(opts, required));
+ }
+
+ for (var i=0; i<MODES.length; i++) {
+ var _opts = MODES[i];
+ if (setupAsync(_opts, false)) {
+ util.copy(_opts, opts);
+ return opts.transpile;
+ }
+ }
+ /* istanbul ignore next */
+ throw new Error('generators, nodent and regenerator are not available');
+ case 'function':
+ return (opts._transpileFunc = opts.transpile);
+ default:
+ throw new Error('bad transpiler: ' + transpile);
+ }
+}
+
+
+function checkGenerators(opts, required) {
+ /* jshint evil: true */
+ try {
+ (new Function('(function*(){})()'))();
+ return true;
+ } catch(e) {
+ /* istanbul ignore next */
+ if (required) throw new Error('generators not supported');
+ }
+}
+
+
+function checkAsyncFunction(opts, required) {
+ /* jshint evil: true */
+ try {
+ (new Function('(async function(){})()'))();
+ /* istanbul ignore next */
+ return true;
+ } catch(e) {
+ if (required) throw new Error('es7 async functions not supported');
+ }
+}
+
+
+function getRegenerator(opts, required) {
+ try {
+ if (!regenerator) {
+ regenerator = require('' + 'regenerator');
+ regenerator.runtime();
+ }
+ if (!opts.async || opts.async === true)
+ opts.async = 'es7';
+ return regeneratorTranspile;
+ } catch(e) {
+ /* istanbul ignore next */
+ if (required) throw new Error('regenerator not available');
+ }
+}
+
+
+function regeneratorTranspile(code) {
+ return regenerator.compile(code).code;
+}
+
+
+function getNodent(opts, required) {
+ /* jshint evil: true */
+ try {
+ if (!nodent) nodent = require('' + 'nodent')({ log: false, dontInstallRequireHook: true });
+ if (opts.async != 'es7') {
+ if (opts.async && opts.async !== true) console.warn('nodent transpiles only es7 async functions');
+ opts.async = 'es7';
+ }
+ return nodentTranspile;
+ } catch(e) {
+ /* istanbul ignore next */
+ if (required) throw new Error('nodent not available');
+ }
+}
+
+
+function nodentTranspile(code) {
+ return nodent.compile(code, '', { promises: true, sourcemap: false }).code;
+}
+
+
+/**
+ * Creates validating function for passed schema with asynchronous loading of missing schemas.
+ * `loadSchema` option should be a function that accepts schema uri and node-style callback.
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Function} callback node-style callback, it is always called with 2 parameters: error (or null) and validating function.
+ */
+function compileAsync(schema, callback) {
+ /* eslint no-shadow: 0 */
+ /* jshint validthis: true */
+ var schemaObj;
+ var self = this;
+ try {
+ schemaObj = this._addSchema(schema);
+ } catch(e) {
+ setTimeout(function() { callback(e); });
+ return;
+ }
+ if (schemaObj.validate) {
+ setTimeout(function() { callback(null, schemaObj.validate); });
+ } else {
+ if (typeof this._opts.loadSchema != 'function')
+ throw new Error('options.loadSchema should be a function');
+ _compileAsync(schema, callback, true);
+ }
+
+
+ function _compileAsync(schema, callback, firstCall) {
+ var validate;
+ try { validate = self.compile(schema); }
+ catch(e) {
+ if (e.missingSchema) loadMissingSchema(e);
+ else deferCallback(e);
+ return;
+ }
+ deferCallback(null, validate);
+
+ function loadMissingSchema(e) {
+ var ref = e.missingSchema;
+ if (self._refs[ref] || self._schemas[ref])
+ return callback(new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved'));
+ var _callbacks = self._loadingSchemas[ref];
+ if (_callbacks) {
+ if (typeof _callbacks == 'function')
+ self._loadingSchemas[ref] = [_callbacks, schemaLoaded];
+ else
+ _callbacks[_callbacks.length] = schemaLoaded;
+ } else {
+ self._loadingSchemas[ref] = schemaLoaded;
+ self._opts.loadSchema(ref, function (err, sch) {
+ var _callbacks = self._loadingSchemas[ref];
+ delete self._loadingSchemas[ref];
+ if (typeof _callbacks == 'function') {
+ _callbacks(err, sch);
+ } else {
+ for (var i=0; i<_callbacks.length; i++)
+ _callbacks[i](err, sch);
+ }
+ });
+ }
+
+ function schemaLoaded(err, sch) {
+ if (err) return callback(err);
+ if (!(self._refs[ref] || self._schemas[ref])) {
+ try {
+ self.addSchema(sch, ref);
+ } catch(e) {
+ callback(e);
+ return;
+ }
+ }
+ _compileAsync(schema, callback);
+ }
+ }
+
+ function deferCallback(err, validate) {
+ if (firstCall) setTimeout(function() { callback(err, validate); });
+ else return callback(err, validate);
+ }
+ }
+}
+
+},{"./compile/util":11}],2:[function(require,module,exports){
+'use strict';
+
+
+var Cache = module.exports = function Cache() {
+ this._cache = {};
+};
+
+
+Cache.prototype.put = function Cache_put(key, value) {
+ this._cache[key] = value;
+};
+
+
+Cache.prototype.get = function Cache_get(key) {
+ return this._cache[key];
+};
+
+
+Cache.prototype.del = function Cache_del(key) {
+ delete this._cache[key];
+};
+
+
+Cache.prototype.clear = function Cache_clear() {
+ this._cache = {};
+};
+
+},{}],3:[function(require,module,exports){
+'use strict';
+
+//all requires must be explicit because browserify won't work with dynamic requires
+module.exports = {
+ '$ref': require('../dotjs/ref'),
+ allOf: require('../dotjs/allOf'),
+ anyOf: require('../dotjs/anyOf'),
+ dependencies: require('../dotjs/dependencies'),
+ 'enum': require('../dotjs/enum'),
+ format: require('../dotjs/format'),
+ items: require('../dotjs/items'),
+ maximum: require('../dotjs/_limit'),
+ minimum: require('../dotjs/_limit'),
+ maxItems: require('../dotjs/_limitItems'),
+ minItems: require('../dotjs/_limitItems'),
+ maxLength: require('../dotjs/_limitLength'),
+ minLength: require('../dotjs/_limitLength'),
+ maxProperties: require('../dotjs/_limitProperties'),
+ minProperties: require('../dotjs/_limitProperties'),
+ multipleOf: require('../dotjs/multipleOf'),
+ not: require('../dotjs/not'),
+ oneOf: require('../dotjs/oneOf'),
+ pattern: require('../dotjs/pattern'),
+ properties: require('../dotjs/properties'),
+ required: require('../dotjs/required'),
+ uniqueItems: require('../dotjs/uniqueItems'),
+ validate: require('../dotjs/validate')
+};
+
+},{"../dotjs/_limit":14,"../dotjs/_limitItems":15,"../dotjs/_limitLength":16,"../dotjs/_limitProperties":17,"../dotjs/allOf":18,"../dotjs/anyOf":19,"../dotjs/dependencies":22,"../dotjs/enum":23,"../dotjs/format":24,"../dotjs/items":25,"../dotjs/multipleOf":26,"../dotjs/not":27,"../dotjs/oneOf":28,"../dotjs/pattern":29,"../dotjs/properties":31,"../dotjs/ref":32,"../dotjs/required":33,"../dotjs/uniqueItems":35,"../dotjs/validate":36}],4:[function(require,module,exports){
+'use strict';
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ var arrA = Array.isArray(a)
+ , arrB = Array.isArray(b)
+ , i;
+
+ if (arrA && arrB) {
+ if (a.length != b.length) return false;
+ for (i = 0; i < a.length; i++)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+ if (arrA != arrB) return false;
+
+ if (a && b && typeof a === 'object' && typeof b === 'object') {
+ var keys = Object.keys(a);
+
+ if (keys.length !== Object.keys(b).length) return false;
+
+ for (i = 0; i < keys.length; i++)
+ if (b[keys[i]] === undefined) return false;
+
+ for (i = 0; i < keys.length; i++)
+ if(!equal(a[keys[i]], b[keys[i]])) return false;
+
+ return true;
+ }
+
+ return false;
+};
+
+},{}],5:[function(require,module,exports){
+'use strict';
+
+var util = require('./util');
+
+var DATE = /^\d\d\d\d-(\d\d)-(\d\d)$/;
+var DAYS = [0,31,29,31,30,31,30,31,31,30,31,30,31];
+var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;
+var HOSTNAME = /^[0-9a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?(\.[0-9a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?)*$/i;
+var URI = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i;
+var UUID = /^(?:urn\:uuid\:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
+var JSON_POINTER = /^(?:\/(?:[^~\/]|~0|~1)+)*(?:\/)?$|^\#(?:\/(?:[a-z0-9_\-\.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)+)*(?:\/)?$/i;
+var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)+)*(?:\/)?)$/;
+
+
+module.exports = formats;
+
+function formats(mode) {
+ mode = mode == 'full' ? 'full' : 'fast';
+ var formatDefs = util.copy(formats[mode]);
+ for (var fName in formats.compare) {
+ formatDefs[fName] = {
+ validate: formatDefs[fName],
+ compare: formats.compare[fName]
+ };
+ }
+ return formatDefs;
+}
+
+
+formats.fast = {
+ // date: http://tools.ietf.org/html/rfc3339#section-5.6
+ date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
+ // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
+ time: /^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,
+ 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,
+ // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
+ uri: /^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i,
+ // email (sources from jsen validator):
+ // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
+ // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation')
+ email: /^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
+ hostname: HOSTNAME,
+ // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
+ ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
+ // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses
+ ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
+ regex: regex,
+ // uuid: http://tools.ietf.org/html/rfc4122
+ uuid: UUID,
+ // JSON-pointer: https://tools.ietf.org/html/rfc6901
+ // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
+ 'json-pointer': JSON_POINTER,
+ // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
+};
+
+
+formats.full = {
+ date: date,
+ time: time,
+ 'date-time': date_time,
+ uri: uri,
+ email: /^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
+ hostname: hostname,
+ ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
+ ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
+ regex: regex,
+ uuid: UUID,
+ 'json-pointer': JSON_POINTER,
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
+};
+
+
+formats.compare = {
+ date: compareDate,
+ time: compareTime,
+ 'date-time': compareDateTime
+};
+
+
+function date(str) {
+ // full-date from http://tools.ietf.org/html/rfc3339#section-5.6
+ var matches = str.match(DATE);
+ if (!matches) return false;
+
+ var month = +matches[1];
+ var day = +matches[2];
+ return month >= 1 && month <= 12 && day >= 1 && day <= DAYS[month];
+}
+
+
+function time(str, full) {
+ var matches = str.match(TIME);
+ if (!matches) return false;
+
+ var hour = matches[1];
+ var minute = matches[2];
+ var second = matches[3];
+ var timeZone = matches[5];
+ return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone);
+}
+
+
+var DATE_TIME_SEPARATOR = /t|\s/i;
+function date_time(str) {
+ // http://tools.ietf.org/html/rfc3339#section-5.6
+ var dateTime = str.split(DATE_TIME_SEPARATOR);
+ return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true);
+}
+
+
+function hostname(str) {
+ // https://tools.ietf.org/html/rfc1034#section-3.5
+ // https://tools.ietf.org/html/rfc1123#section-2
+ return str.length <= 255 && HOSTNAME.test(str);
+}
+
+
+var NOT_URI_FRAGMENT = /\/|\:/;
+function uri(str) {
+ // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "."
+ return NOT_URI_FRAGMENT.test(str) && URI.test(str);
+}
+
+
+function regex(str) {
+ try {
+ new RegExp(str);
+ return true;
+ } catch(e) {
+ return false;
+ }
+}
+
+
+function compareDate(d1, d2) {
+ if (!(d1 && d2)) return;
+ if (d1 > d2) return 1;
+ if (d1 < d2) return -1;
+ if (d1 === d2) return 0;
+}
+
+
+function compareTime(t1, t2) {
+ if (!(t1 && t2)) return;
+ t1 = t1.match(TIME);
+ t2 = t2.match(TIME);
+ if (!(t1 && t2)) return;
+ t1 = t1[1] + t1[2] + t1[3] + (t1[4]||'');
+ t2 = t2[1] + t2[2] + t2[3] + (t2[4]||'');
+ if (t1 > t2) return 1;
+ if (t1 < t2) return -1;
+ if (t1 === t2) return 0;
+}
+
+
+function compareDateTime(dt1, dt2) {
+ if (!(dt1 && dt2)) return;
+ dt1 = dt1.split(DATE_TIME_SEPARATOR);
+ dt2 = dt2.split(DATE_TIME_SEPARATOR);
+ var res = compareDate(dt1[0], dt2[0]);
+ if (res === undefined) return;
+ return res || compareTime(dt1[1], dt2[1]);
+}
+
+},{"./util":11}],6:[function(require,module,exports){
+'use strict';
+
+var resolve = require('./resolve')
+ , util = require('./util')
+ , stableStringify = require('json-stable-stringify')
+ , async = require('../async');
+
+var beautify = (function() { try { return require('' + 'js-beautify').js_beautify; } catch(e) {/*empty*/} })();
+
+var validateGenerator = require('../dotjs/validate');
+
+/**
+ * Functions below are used inside compiled validations function
+ */
+
+var co = require('co');
+var ucs2length = util.ucs2length;
+var equal = require('./equal');
+
+// this error is thrown by async schemas to return validation errors via exception
+var ValidationError = require('./validation_error');
+
+module.exports = compile;
+
+
+/**
+ * Compiles schema to validation function
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Object} root object with information about the root schema for this schema
+ * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution
+ * @param {String} baseId base ID for IDs in the schema
+ * @return {Function} validation function
+ */
+function compile(schema, root, localRefs, baseId) {
+ /* jshint validthis: true, evil: true */
+ /* eslint no-shadow: 0 */
+ var self = this
+ , opts = this._opts
+ , refVal = [ undefined ]
+ , refs = {}
+ , patterns = []
+ , patternsHash = {}
+ , defaults = []
+ , defaultsHash = {}
+ , customRules = []
+ , keepSourceCode = opts.sourceCode !== false;
+
+ root = root || { schema: schema, refVal: refVal, refs: refs };
+
+ var c = checkCompiling.call(this, schema, root, baseId);
+ var compilation = this._compilations[c.index];
+ if (c.compiling) return (compilation.callValidate = callValidate);
+
+ var formats = this._formats;
+ var RULES = this.RULES;
+
+ try {
+ var v = localCompile(schema, root, localRefs, baseId);
+ compilation.validate = v;
+ var cv = compilation.callValidate;
+ if (cv) {
+ cv.schema = v.schema;
+ cv.errors = null;
+ cv.refs = v.refs;
+ cv.refVal = v.refVal;
+ cv.root = v.root;
+ cv.$async = v.$async;
+ if (keepSourceCode) cv.sourceCode = v.sourceCode;
+ }
+ return v;
+ } finally {
+ endCompiling.call(this, schema, root, baseId);
+ }
+
+ function callValidate() {
+ var validate = compilation.validate;
+ var result = validate.apply(null, arguments);
+ callValidate.errors = validate.errors;
+ return result;
+ }
+
+ function localCompile(_schema, _root, localRefs, baseId) {
+ var isRoot = !_root || (_root && _root.schema == _schema);
+ if (_root.schema != root.schema)
+ return compile.call(self, _schema, _root, localRefs, baseId);
+
+ var $async = _schema.$async === true;
+ if ($async && !opts.transpile) async.setup(opts);
+
+ var sourceCode = validateGenerator({
+ isTop: true,
+ schema: _schema,
+ isRoot: isRoot,
+ baseId: baseId,
+ root: _root,
+ schemaPath: '',
+ errSchemaPath: '#',
+ errorPath: '""',
+ RULES: RULES,
+ validate: validateGenerator,
+ util: util,
+ resolve: resolve,
+ resolveRef: resolveRef,
+ usePattern: usePattern,
+ useDefault: useDefault,
+ useCustomRule: useCustomRule,
+ opts: opts,
+ formats: formats,
+ self: self
+ });
+
+ sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
+ + vars(defaults, defaultCode) + vars(customRules, customRuleCode)
+ + sourceCode + 'return validate;';
+
+ if (opts.beautify) {
+ /* istanbul ignore else */
+ if (beautify) sourceCode = beautify(sourceCode, opts.beautify);
+ else console.error('"npm install js-beautify" to use beautify option');
+ }
+ // console.log('\n\n\n *** \n', sourceCode);
+ var validate, validateCode
+ , transpile = opts._transpileFunc;
+ try {
+ validateCode = $async && transpile
+ ? transpile(sourceCode)
+ : sourceCode;
+
+ var makeValidate = new Function(
+ 'self',
+ 'RULES',
+ 'formats',
+ 'root',
+ 'refVal',
+ 'defaults',
+ 'customRules',
+ 'co',
+ 'equal',
+ 'ucs2length',
+ 'ValidationError',
+ validateCode
+ );
+
+ validate = makeValidate(
+ self,
+ RULES,
+ formats,
+ root,
+ refVal,
+ defaults,
+ customRules,
+ co,
+ equal,
+ ucs2length,
+ ValidationError
+ );
+
+ refVal[0] = validate;
+ } catch(e) {
+ console.error('Error compiling schema, function code:', validateCode);
+ throw e;
+ }
+
+ validate.schema = _schema;
+ validate.errors = null;
+ validate.refs = refs;
+ validate.refVal = refVal;
+ validate.root = isRoot ? validate : _root;
+ if ($async) validate.$async = true;
+ if (keepSourceCode) validate.sourceCode = sourceCode;
+ if (opts.sourceCode === true) {
+ validate.source = {
+ patterns: patterns,
+ defaults: defaults
+ };
+ }
+
+ return validate;
+ }
+
+ function resolveRef(baseId, ref, isRoot) {
+ ref = resolve.url(baseId, ref);
+ var refIndex = refs[ref];
+ var _refVal, refCode;
+ if (refIndex !== undefined) {
+ _refVal = refVal[refIndex];
+ refCode = 'refVal[' + refIndex + ']';
+ return resolvedRef(_refVal, refCode);
+ }
+ if (!isRoot && root.refs) {
+ var rootRefId = root.refs[ref];
+ if (rootRefId !== undefined) {
+ _refVal = root.refVal[rootRefId];
+ refCode = addLocalRef(ref, _refVal);
+ return resolvedRef(_refVal, refCode);
+ }
+ }
+
+ refCode = addLocalRef(ref);
+ var v = resolve.call(self, localCompile, root, ref);
+ if (!v) {
+ var localSchema = localRefs && localRefs[ref];
+ if (localSchema) {
+ v = resolve.inlineRef(localSchema, opts.inlineRefs)
+ ? localSchema
+ : compile.call(self, localSchema, root, localRefs, baseId);
+ }
+ }
+
+ if (v) {
+ replaceLocalRef(ref, v);
+ return resolvedRef(v, refCode);
+ }
+ }
+
+ function addLocalRef(ref, v) {
+ var refId = refVal.length;
+ refVal[refId] = v;
+ refs[ref] = refId;
+ return 'refVal' + refId;
+ }
+
+ function replaceLocalRef(ref, v) {
+ var refId = refs[ref];
+ refVal[refId] = v;
+ }
+
+ function resolvedRef(refVal, code) {
+ return typeof refVal == 'object'
+ ? { code: code, schema: refVal, inline: true }
+ : { code: code, $async: refVal && refVal.$async };
+ }
+
+ function usePattern(regexStr) {
+ var index = patternsHash[regexStr];
+ if (index === undefined) {
+ index = patternsHash[regexStr] = patterns.length;
+ patterns[index] = regexStr;
+ }
+ return 'pattern' + index;
+ }
+
+ function useDefault(value) {
+ switch (typeof value) {
+ case 'boolean':
+ case 'number':
+ return '' + value;
+ case 'string':
+ return util.toQuotedString(value);
+ case 'object':
+ if (value === null) return 'null';
+ var valueStr = stableStringify(value);
+ var index = defaultsHash[valueStr];
+ if (index === undefined) {
+ index = defaultsHash[valueStr] = defaults.length;
+ defaults[index] = value;
+ }
+ return 'default' + index;
+ }
+ }
+
+ function useCustomRule(rule, schema, parentSchema, it) {
+ var validateSchema = rule.definition.validateSchema;
+ if (validateSchema && self._opts.validateSchema !== false) {
+ var valid = validateSchema(schema);
+ if (!valid) {
+ var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
+ if (self._opts.validateSchema == 'log') console.error(message);
+ else throw new Error(message);
+ }
+ }
+
+ var compile = rule.definition.compile
+ , inline = rule.definition.inline
+ , macro = rule.definition.macro;
+
+ var validate;
+ if (compile) {
+ validate = compile.call(self, schema, parentSchema, it);
+ } else if (macro) {
+ validate = macro.call(self, schema, parentSchema, it);
+ if (opts.validateSchema !== false) self.validateSchema(validate, true);
+ } else if (inline) {
+ validate = inline.call(self, it, rule.keyword, schema, parentSchema);
+ } else {
+ validate = rule.definition.validate;
+ }
+
+ var index = customRules.length;
+ customRules[index] = validate;
+
+ return {
+ code: 'customRule' + index,
+ validate: validate
+ };
+ }
+}
+
+
+/**
+ * Checks if the schema is currently compiled
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean)
+ */
+function checkCompiling(schema, root, baseId) {
+ /* jshint validthis: true */
+ var index = compIndex.call(this, schema, root, baseId);
+ if (index >= 0) return { index: index, compiling: true };
+ index = this._compilations.length;
+ this._compilations[index] = {
+ schema: schema,
+ root: root,
+ baseId: baseId
+ };
+ return { index: index, compiling: false };
+}
+
+
+/**
+ * Removes the schema from the currently compiled list
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ */
+function endCompiling(schema, root, baseId) {
+ /* jshint validthis: true */
+ var i = compIndex.call(this, schema, root, baseId);
+ if (i >= 0) this._compilations.splice(i, 1);
+}
+
+
+/**
+ * Index of schema compilation in the currently compiled list
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ * @return {Integer} compilation index
+ */
+function compIndex(schema, root, baseId) {
+ /* jshint validthis: true */
+ for (var i=0; i<this._compilations.length; i++) {
+ var c = this._compilations[i];
+ if (c.schema == schema && c.root == root && c.baseId == baseId) return i;
+ }
+ return -1;
+}
+
+
+function patternCode(i, patterns) {
+ return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
+}
+
+
+function defaultCode(i) {
+ return 'var default' + i + ' = defaults[' + i + '];';
+}
+
+
+function refValCode(i, refVal) {
+ return refVal[i] ? 'var refVal' + i + ' = refVal[' + i + '];' : '';
+}
+
+
+function customRuleCode(i) {
+ return 'var customRule' + i + ' = customRules[' + i + '];';
+}
+
+
+function vars(arr, statement) {
+ if (!arr.length) return '';
+ var code = '';
+ for (var i=0; i<arr.length; i++)
+ code += statement(i, arr);
+ return code;
+}
+
+},{"../async":1,"../dotjs/validate":36,"./equal":4,"./resolve":7,"./util":11,"./validation_error":12,"co":47,"json-stable-stringify":48}],7:[function(require,module,exports){
+'use strict';
+
+var url = require('url')
+ , equal = require('./equal')
+ , util = require('./util')
+ , SchemaObject = require('./schema_obj');
+
+module.exports = resolve;
+
+resolve.normalizeId = normalizeId;
+resolve.fullPath = getFullPath;
+resolve.url = resolveUrl;
+resolve.ids = resolveIds;
+resolve.inlineRef = inlineRef;
+resolve.schema = resolveSchema;
+
+/**
+ * [resolve and compile the references ($ref)]
+ * @this Ajv
+ * @param {Function} compile reference to schema compilation funciton (localCompile)
+ * @param {Object} root object with information about the root schema for the current schema
+ * @param {String} ref reference to resolve
+ * @return {Object|Function} schema object (if the schema can be inlined) or validation function
+ */
+function resolve(compile, root, ref) {
+ /* jshint validthis: true */
+ var refVal = this._refs[ref];
+ if (typeof refVal == 'string') {
+ if (this._refs[refVal]) refVal = this._refs[refVal];
+ else return resolve.call(this, compile, root, refVal);
+ }
+
+ refVal = refVal || this._schemas[ref];
+ if (refVal instanceof SchemaObject) {
+ return inlineRef(refVal.schema, this._opts.inlineRefs)
+ ? refVal.schema
+ : refVal.validate || this._compile(refVal);
+ }
+
+ var res = resolveSchema.call(this, root, ref);
+ var schema, v, baseId;
+ if (res) {
+ schema = res.schema;
+ root = res.root;
+ baseId = res.baseId;
+ }
+
+ if (schema instanceof SchemaObject) {
+ v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
+ } else if (schema) {
+ v = inlineRef(schema, this._opts.inlineRefs)
+ ? schema
+ : compile.call(this, schema, root, undefined, baseId);
+ }
+
+ return v;
+}
+
+
+/**
+ * Resolve schema, its root and baseId
+ * @this Ajv
+ * @param {Object} root root object with properties schema, refVal, refs
+ * @param {String} ref reference to resolve
+ * @return {Object} object with properties schema, root, baseId
+ */
+function resolveSchema(root, ref) {
+ /* jshint validthis: true */
+ var p = url.parse(ref, false, true)
+ , refPath = _getFullPath(p)
+ , baseId = getFullPath(root.schema.id);
+ if (refPath !== baseId) {
+ var id = normalizeId(refPath);
+ var refVal = this._refs[id];
+ if (typeof refVal == 'string') {
+ return resolveRecursive.call(this, root, refVal, p);
+ } else if (refVal instanceof SchemaObject) {
+ if (!refVal.validate) this._compile(refVal);
+ root = refVal;
+ } else {
+ refVal = this._schemas[id];
+ if (refVal instanceof SchemaObject) {
+ if (!refVal.validate) this._compile(refVal);
+ if (id == normalizeId(ref))
+ return { schema: refVal, root: root, baseId: baseId };
+ root = refVal;
+ } else {
+ return;
+ }
+ }
+ if (!root.schema) return;
+ baseId = getFullPath(root.schema.id);
+ }
+ return getJsonPointer.call(this, p, baseId, root.schema, root);
+}
+
+
+/* @this Ajv */
+function resolveRecursive(root, ref, parsedRef) {
+ /* jshint validthis: true */
+ var res = resolveSchema.call(this, root, ref);
+ if (res) {
+ var schema = res.schema;
+ var baseId = res.baseId;
+ root = res.root;
+ if (schema.id) baseId = resolveUrl(baseId, schema.id);
+ return getJsonPointer.call(this, parsedRef, baseId, schema, root);
+ }
+}
+
+
+var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
+/* @this Ajv */
+function getJsonPointer(parsedRef, baseId, schema, root) {
+ /* jshint validthis: true */
+ parsedRef.hash = parsedRef.hash || '';
+ if (parsedRef.hash.slice(0,2) != '#/') return;
+ var parts = parsedRef.hash.split('/');
+
+ for (var i = 1; i < parts.length; i++) {
+ var part = parts[i];
+ if (part) {
+ part = util.unescapeFragment(part);
+ schema = schema[part];
+ if (!schema) break;
+ if (schema.id && !PREVENT_SCOPE_CHANGE[part]) baseId = resolveUrl(baseId, schema.id);
+ if (schema.$ref) {
+ var $ref = resolveUrl(baseId, schema.$ref);
+ var res = resolveSchema.call(this, root, $ref);
+ if (res) {
+ schema = res.schema;
+ root = res.root;
+ baseId = res.baseId;
+ }
+ }
+ }
+ }
+ if (schema && schema != root.schema)
+ return { schema: schema, root: root, baseId: baseId };
+}
+
+
+var SIMPLE_INLINED = util.toHash([
+ 'type', 'format', 'pattern',
+ 'maxLength', 'minLength',
+ 'maxProperties', 'minProperties',
+ 'maxItems', 'minItems',
+ 'maximum', 'minimum',
+ 'uniqueItems', 'multipleOf',
+ 'required', 'enum'
+]);
+function inlineRef(schema, limit) {
+ if (limit === false) return false;
+ if (limit === undefined || limit === true) return checkNoRef(schema);
+ else if (limit) return countKeys(schema) <= limit;
+}
+
+
+function checkNoRef(schema) {
+ var item;
+ if (Array.isArray(schema)) {
+ for (var i=0; i<schema.length; i++) {
+ item = schema[i];
+ if (typeof item == 'object' && !checkNoRef(item)) return false;
+ }
+ } else {
+ for (var key in schema) {
+ if (key == '$ref') return false;
+ item = schema[key];
+ if (typeof item == 'object' && !checkNoRef(item)) return false;
+ }
+ }
+ return true;
+}
+
+
+function countKeys(schema) {
+ var count = 0, item;
+ if (Array.isArray(schema)) {
+ for (var i=0; i<schema.length; i++) {
+ item = schema[i];
+ if (typeof item == 'object') count += countKeys(item);
+ if (count == Infinity) return Infinity;
+ }
+ } else {
+ for (var key in schema) {
+ if (key == '$ref') return Infinity;
+ if (SIMPLE_INLINED[key]) {
+ count++;
+ } else {
+ item = schema[key];
+ if (typeof item == 'object') count += countKeys(item) + 1;
+ if (count == Infinity) return Infinity;
+ }
+ }
+ }
+ return count;
+}
+
+
+function getFullPath(id, normalize) {
+ if (normalize !== false) id = normalizeId(id);
+ var p = url.parse(id, false, true);
+ return _getFullPath(p);
+}
+
+
+function _getFullPath(p) {
+ var protocolSeparator = p.protocol || p.href.slice(0,2) == '//' ? '//' : '';
+ return (p.protocol||'') + protocolSeparator + (p.host||'') + (p.path||'') + '#';
+}
+
+
+var TRAILING_SLASH_HASH = /#\/?$/;
+function normalizeId(id) {
+ return id ? id.replace(TRAILING_SLASH_HASH, '') : '';
+}
+
+
+function resolveUrl(baseId, id) {
+ id = normalizeId(id);
+ return url.resolve(baseId, id);
+}
+
+
+/* @this Ajv */
+function resolveIds(schema) {
+ /* eslint no-shadow: 0 */
+ /* jshint validthis: true */
+ var id = normalizeId(schema.id);
+ var localRefs = {};
+ _resolveIds.call(this, schema, getFullPath(id, false), id);
+ return localRefs;
+
+ /* @this Ajv */
+ function _resolveIds(schema, fullPath, baseId) {
+ /* jshint validthis: true */
+ if (Array.isArray(schema)) {
+ for (var i=0; i<schema.length; i++)
+ _resolveIds.call(this, schema[i], fullPath+'/'+i, baseId);
+ } else if (schema && typeof schema == 'object') {
+ if (typeof schema.id == 'string') {
+ var id = baseId = baseId
+ ? url.resolve(baseId, schema.id)
+ : schema.id;
+ id = normalizeId(id);
+
+ var refVal = this._refs[id];
+ if (typeof refVal == 'string') refVal = this._refs[refVal];
+ if (refVal && refVal.schema) {
+ if (!equal(schema, refVal.schema))
+ throw new Error('id "' + id + '" resolves to more than one schema');
+ } else if (id != normalizeId(fullPath)) {
+ if (id[0] == '#') {
+ if (localRefs[id] && !equal(schema, localRefs[id]))
+ throw new Error('id "' + id + '" resolves to more than one schema');
+ localRefs[id] = schema;
+ } else {
+ this._refs[id] = fullPath;
+ }
+ }
+ }
+ for (var key in schema)
+ _resolveIds.call(this, schema[key], fullPath+'/'+util.escapeFragment(key), baseId);
+ }
+ }
+}
+
+},{"./equal":4,"./schema_obj":9,"./util":11,"url":45}],8:[function(require,module,exports){
+'use strict';
+
+var ruleModules = require('./_rules')
+ , toHash = require('./util').toHash;
+
+module.exports = function rules() {
+ var RULES = [
+ { type: 'number',
+ rules: [ 'maximum', 'minimum', 'multipleOf'] },
+ { type: 'string',
+ rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },
+ { type: 'array',
+ rules: [ 'maxItems', 'minItems', 'uniqueItems', 'items' ] },
+ { type: 'object',
+ rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'properties' ] },
+ { rules: [ '$ref', 'enum', 'not', 'anyOf', 'oneOf', 'allOf' ] }
+ ];
+
+ var ALL = [ 'type', 'additionalProperties', 'patternProperties' ];
+ var KEYWORDS = [ 'additionalItems', '$schema', 'id', 'title', 'description', 'default' ];
+ var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
+ RULES.all = toHash(ALL);
+
+ RULES.forEach(function (group) {
+ group.rules = group.rules.map(function (keyword) {
+ ALL.push(keyword);
+ var rule = RULES.all[keyword] = {
+ keyword: keyword,
+ code: ruleModules[keyword]
+ };
+ return rule;
+ });
+ });
+
+ RULES.keywords = toHash(ALL.concat(KEYWORDS));
+ RULES.types = toHash(TYPES);
+ RULES.custom = {};
+
+ return RULES;
+};
+
+},{"./_rules":3,"./util":11}],9:[function(require,module,exports){
+'use strict';
+
+var util = require('./util');
+
+module.exports = SchemaObject;
+
+function SchemaObject(obj) {
+ util.copy(obj, this);
+}
+
+},{"./util":11}],10:[function(require,module,exports){
+'use strict';
+
+// https://mathiasbynens.be/notes/javascript-encoding
+// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
+module.exports = function ucs2length(str) {
+ var length = 0
+ , len = str.length
+ , pos = 0
+ , value;
+ while (pos < len) {
+ length++;
+ value = str.charCodeAt(pos++);
+ if (value >= 0xD800 && value <= 0xDBFF && pos < len) {
+ // high surrogate, and there is a next character
+ value = str.charCodeAt(pos);
+ if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate
+ }
+ }
+ return length;
+};
+
+},{}],11:[function(require,module,exports){
+'use strict';
+
+
+module.exports = {
+ copy: copy,
+ checkDataType: checkDataType,
+ checkDataTypes: checkDataTypes,
+ coerceToTypes: coerceToTypes,
+ toHash: toHash,
+ getProperty: getProperty,
+ escapeQuotes: escapeQuotes,
+ ucs2length: require('./ucs2length'),
+ varOccurences: varOccurences,
+ varReplace: varReplace,
+ cleanUpCode: cleanUpCode,
+ cleanUpVarErrors: cleanUpVarErrors,
+ schemaHasRules: schemaHasRules,
+ schemaHasRulesExcept: schemaHasRulesExcept,
+ stableStringify: require('json-stable-stringify'),
+ toQuotedString: toQuotedString,
+ getPathExpr: getPathExpr,
+ getPath: getPath,
+ getData: getData,
+ unescapeFragment: unescapeFragment,
+ escapeFragment: escapeFragment,
+ escapeJsonPointer: escapeJsonPointer
+};
+
+
+function copy(o, to) {
+ to = to || {};
+ for (var key in o) to[key] = o[key];
+ return to;
+}
+
+
+function checkDataType(dataType, data, negate) {
+ var EQUAL = negate ? ' !== ' : ' === '
+ , AND = negate ? ' || ' : ' && '
+ , OK = negate ? '!' : ''
+ , NOT = negate ? '' : '!';
+ switch (dataType) {
+ case 'null': return data + EQUAL + 'null';
+ case 'array': return OK + 'Array.isArray(' + data + ')';
+ case 'object': return '(' + OK + data + AND +
+ 'typeof ' + data + EQUAL + '"object"' + AND +
+ NOT + 'Array.isArray(' + data + '))';
+ case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND +
+ NOT + '(' + data + ' % 1)' +
+ AND + data + EQUAL + data + ')';
+ default: return 'typeof ' + data + EQUAL + '"' + dataType + '"';
+ }
+}
+
+
+function checkDataTypes(dataTypes, data) {
+ switch (dataTypes.length) {
+ case 1: return checkDataType(dataTypes[0], data, true);
+ default:
+ var code = '';
+ var types = toHash(dataTypes);
+ if (types.array && types.object) {
+ code = types.null ? '(': '(!' + data + ' || ';
+ code += 'typeof ' + data + ' !== "object")';
+ delete types.null;
+ delete types.array;
+ delete types.object;
+ }
+ if (types.number) delete types.integer;
+ for (var t in types)
+ code += (code ? ' && ' : '' ) + checkDataType(t, data, true);
+
+ return code;
+ }
+}
+
+
+var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
+function coerceToTypes(optionCoerceTypes, dataTypes) {
+ if (Array.isArray(dataTypes)) {
+ var types = [];
+ for (var i=0; i<dataTypes.length; i++) {
+ var t = dataTypes[i];
+ if (COERCE_TO_TYPES[t]) types[types.length] = t;
+ else if (optionCoerceTypes === 'array' && t === 'array') types[types.length] = t;
+ }
+ if (types.length) return types;
+ } else if (COERCE_TO_TYPES[dataTypes]) {
+ return [dataTypes];
+ } else if (optionCoerceTypes === 'array' && dataTypes === 'array') {
+ return ['array'];
+ }
+}
+
+
+function toHash(arr) {
+ var hash = {};
+ for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
+ return hash;
+}
+
+
+var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
+var SINGLE_QUOTE = /'|\\/g;
+function getProperty(key) {
+ return typeof key == 'number'
+ ? '[' + key + ']'
+ : IDENTIFIER.test(key)
+ ? '.' + key
+ : "['" + escapeQuotes(key) + "']";
+}
+
+
+function escapeQuotes(str) {
+ return str.replace(SINGLE_QUOTE, '\\$&')
+ .replace(/\n/g, '\\n')
+ .replace(/\r/g, '\\r')
+ .replace(/\f/g, '\\f')
+ .replace(/\t/g, '\\t');
+}
+
+
+function varOccurences(str, dataVar) {
+ dataVar += '[^0-9]';
+ var matches = str.match(new RegExp(dataVar, 'g'));
+ return matches ? matches.length : 0;
+}
+
+
+function varReplace(str, dataVar, expr) {
+ dataVar += '([^0-9])';
+ expr = expr.replace(/\$/g, '$$$$');
+ return str.replace(new RegExp(dataVar, 'g'), expr + '$1');
+}
+
+
+var EMPTY_ELSE = /else\s*{\s*}/g
+ , EMPTY_IF_NO_ELSE = /if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g
+ , EMPTY_IF_WITH_ELSE = /if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;
+function cleanUpCode(out) {
+ return out.replace(EMPTY_ELSE, '')
+ .replace(EMPTY_IF_NO_ELSE, '')
+ .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))');
+}
+
+
+var ERRORS_REGEXP = /[^v\.]errors/g
+ , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g
+ , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g
+ , RETURN_VALID = 'return errors === 0;'
+ , RETURN_TRUE = 'validate.errors = null; return true;'
+ , RETURN_ASYNC = /if \(errors === 0\) return true;\s*else throw new ValidationError\(vErrors\);/
+ , RETURN_TRUE_ASYNC = 'return true;';
+
+function cleanUpVarErrors(out, async) {
+ var matches = out.match(ERRORS_REGEXP);
+ if (!matches || matches.length !== 2) return out;
+ return async
+ ? out.replace(REMOVE_ERRORS_ASYNC, '')
+ .replace(RETURN_ASYNC, RETURN_TRUE_ASYNC)
+ : out.replace(REMOVE_ERRORS, '')
+ .replace(RETURN_VALID, RETURN_TRUE);
+}
+
+
+function schemaHasRules(schema, rules) {
+ for (var key in schema) if (rules[key]) return true;
+}
+
+
+function schemaHasRulesExcept(schema, rules, exceptKeyword) {
+ for (var key in schema) if (key != exceptKeyword && rules[key]) return true;
+}
+
+
+function toQuotedString(str) {
+ return '\'' + escapeQuotes(str) + '\'';
+}
+
+
+function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
+ var path = jsonPointers // false by default
+ ? '\'/\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \'~0\').replace(/\\//g, \'~1\')')
+ : (isNumber ? '\'[\' + ' + expr + ' + \']\'' : '\'[\\\'\' + ' + expr + ' + \'\\\']\'');
+ return joinPaths(currentPath, path);
+}
+
+
+function getPath(currentPath, prop, jsonPointers) {
+ var path = jsonPointers // false by default
+ ? toQuotedString('/' + escapeJsonPointer(prop))
+ : toQuotedString(getProperty(prop));
+ return joinPaths(currentPath, path);
+}
+
+
+var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
+var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
+function getData($data, lvl, paths) {
+ var up, jsonPointer, data, matches;
+ if ($data === '') return 'rootData';
+ if ($data[0] == '/') {
+ if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
+ jsonPointer = $data;
+ data = 'rootData';
+ } else {
+ matches = $data.match(RELATIVE_JSON_POINTER);
+ if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
+ up = +matches[1];
+ jsonPointer = matches[2];
+ if (jsonPointer == '#') {
+ if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);
+ return paths[lvl - up];
+ }
+
+ if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);
+ data = 'data' + ((lvl - up) || '');
+ if (!jsonPointer) return data;
+ }
+
+ var expr = data;
+ var segments = jsonPointer.split('/');
+ for (var i=0; i<segments.length; i++) {
+ var segment = segments[i];
+ if (segment) {
+ data += getProperty(unescapeJsonPointer(segment));
+ expr += ' && ' + data;
+ }
+ }
+ return expr;
+}
+
+
+function joinPaths (a, b) {
+ if (a == '""') return b;
+ return (a + ' + ' + b).replace(/' \+ '/g, '');
+}
+
+
+function unescapeFragment(str) {
+ return unescapeJsonPointer(decodeURIComponent(str));
+}
+
+
+function escapeFragment(str) {
+ return encodeURIComponent(escapeJsonPointer(str));
+}
+
+
+function escapeJsonPointer(str) {
+ return str.replace(/~/g, '~0').replace(/\//g, '~1');
+}
+
+
+function unescapeJsonPointer(str) {
+ return str.replace(/~1/g, '/').replace(/~0/g, '~');
+}
+
+},{"./ucs2length":10,"json-stable-stringify":48}],12:[function(require,module,exports){
+'use strict';
+
+module.exports = ValidationError;
+
+
+function ValidationError(errors) {
+ this.message = 'validation failed';
+ this.errors = errors;
+ this.ajv = this.validation = true;
+}
+
+
+ValidationError.prototype = Object.create(Error.prototype);
+ValidationError.prototype.constructor = ValidationError;
+
+},{}],13:[function(require,module,exports){
+'use strict';
+module.exports = function generate__formatLimit(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ out += 'var ' + ($valid) + ' = undefined;';
+ if (it.opts.format === false) {
+ out += ' ' + ($valid) + ' = true; ';
+ return out;
+ }
+ var $schemaFormat = it.schema.format,
+ $isDataFormat = it.opts.v5 && $schemaFormat.$data,
+ $closingBraces = '';
+ if ($isDataFormat) {
+ var $schemaValueFormat = it.util.getData($schemaFormat.$data, $dataLvl, it.dataPathArr),
+ $format = 'format' + $lvl,
+ $compare = 'compare' + $lvl;
+ out += ' var ' + ($format) + ' = formats[' + ($schemaValueFormat) + '] , ' + ($compare) + ' = ' + ($format) + ' && ' + ($format) + '.compare;';
+ } else {
+ var $format = it.formats[$schemaFormat];
+ if (!($format && $format.compare)) {
+ out += ' ' + ($valid) + ' = true; ';
+ return out;
+ }
+ var $compare = 'formats' + it.util.getProperty($schemaFormat) + '.compare';
+ }
+ var $isMax = $keyword == 'formatMaximum',
+ $exclusiveKeyword = 'formatExclusive' + ($isMax ? 'Maximum' : 'Minimum'),
+ $schemaExcl = it.schema[$exclusiveKeyword],
+ $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data,
+ $op = $isMax ? '<' : '>',
+ $result = 'result' + $lvl;
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if ($isDataExcl) {
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
+ $exclusive = 'exclusive' + $lvl,
+ $opExpr = 'op' + $lvl,
+ $opStr = '\' + ' + $opExpr + ' + \'';
+ out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
+ $schemaValueExcl = 'schemaExcl' + $lvl;
+ out += ' if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && ' + ($schemaValueExcl) + ' !== undefined) { ' + ($valid) + ' = false; ';
+ var $errorKeyword = $exclusiveKeyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_formatExclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ if ($isData) {
+ out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { ';
+ $closingBraces += '}';
+ }
+ if ($isDataFormat) {
+ out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';
+ $closingBraces += '}';
+ }
+ out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; var ' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true; if (' + ($valid) + ' === undefined) { ' + ($valid) + ' = ' + ($exclusive) + ' ? ' + ($result) + ' ' + ($op) + ' 0 : ' + ($result) + ' ' + ($op) + '= 0; } if (!' + ($valid) + ') var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
+ } else {
+ var $exclusive = $schemaExcl === true,
+ $opStr = $op;
+ if (!$exclusive) $opStr += '=';
+ var $opExpr = '\'' + $opStr + '\'';
+ if ($isData) {
+ out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { ';
+ $closingBraces += '}';
+ }
+ if ($isDataFormat) {
+ out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';
+ $closingBraces += '}';
+ }
+ out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; if (' + ($valid) + ' === undefined) ' + ($valid) + ' = ' + ($result) + ' ' + ($op);
+ if (!$exclusive) {
+ out += '=';
+ }
+ out += ' 0;';
+ }
+ out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_formatLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , exclusive: ' + ($exclusive) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ' + ($opStr) + ' "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '}';
+ return out;
+}
+
+},{}],14:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limit(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $isMax = $keyword == 'maximum',
+ $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',
+ $schemaExcl = it.schema[$exclusiveKeyword],
+ $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data,
+ $op = $isMax ? '<' : '>',
+ $notOp = $isMax ? '>' : '<';
+ if ($isDataExcl) {
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
+ $exclusive = 'exclusive' + $lvl,
+ $opExpr = 'op' + $lvl,
+ $opStr = '\' + ' + $opExpr + ' + \'';
+ out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
+ $schemaValueExcl = 'schemaExcl' + $lvl;
+ out += ' var exclusive' + ($lvl) + '; if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && typeof ' + ($schemaValueExcl) + ' != \'undefined\') { ';
+ var $errorKeyword = $exclusiveKeyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else if( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ((exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ') || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
+ } else {
+ var $exclusive = $schemaExcl === true,
+ $opStr = $op;
+ if (!$exclusive) $opStr += '=';
+ var $opExpr = '\'' + $opStr + '\'';
+ out += ' if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($data) + ' ' + ($notOp);
+ if ($exclusive) {
+ out += '=';
+ }
+ out += ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') {';
+ }
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ' + ($opStr) + ' ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue);
+ } else {
+ out += '' + ($schema) + '\'';
+ }
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],15:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limitItems(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $op = $keyword == 'maxItems' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ';
+ if ($keyword == 'maxItems') {
+ out += 'more';
+ } else {
+ out += 'less';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' items\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],16:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limitLength(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $op = $keyword == 'maxLength' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ if (it.opts.unicode === false) {
+ out += ' ' + ($data) + '.length ';
+ } else {
+ out += ' ucs2length(' + ($data) + ') ';
+ }
+ out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be ';
+ if ($keyword == 'maxLength') {
+ out += 'longer';
+ } else {
+ out += 'shorter';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' characters\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],17:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limitProperties(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $op = $keyword == 'maxProperties' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ';
+ if ($keyword == 'maxProperties') {
+ out += 'more';
+ } else {
+ out += 'less';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' properties\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],18:[function(require,module,exports){
+'use strict';
+module.exports = function generate_allOf(it, $keyword) {
+ var out = ' ';
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $currentBaseId = $it.baseId;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces.slice(0, -1));
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
+
+},{}],19:[function(require,module,exports){
+'use strict';
+module.exports = function generate_anyOf(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $noEmptySchema = $schema.every(function($sch) {
+ return it.util.schemaHasRules($sch, it.RULES.all);
+ });
+ if ($noEmptySchema) {
+ var $currentBaseId = $it.baseId;
+ out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' ' + ($valid) + ' = ' + ($valid) + ' || valid' + ($it.level) + '; if (!' + ($valid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match some schema in anyOf\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ out = it.util.cleanUpCode(out);
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
+
+},{}],20:[function(require,module,exports){
+'use strict';
+module.exports = function generate_constant(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!$isData) {
+ out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';
+ }
+ out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'constant') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be equal to constant\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' }';
+ return out;
+}
+
+},{}],21:[function(require,module,exports){
+'use strict';
+module.exports = function generate_custom(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $rule = this,
+ $definition = 'definition' + $lvl,
+ $rDef = $rule.definition,
+ $validate = $rDef.validate,
+ $compile, $inline, $macro, $ruleValidate, $validateCode;
+ if ($isData && $rDef.$data) {
+ $validateCode = 'keywordValidate' + $lvl;
+ var $validateSchema = $rDef.validateSchema;
+ out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;';
+ } else {
+ $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
+ $schemaValue = 'validate.schema' + $schemaPath;
+ $validateCode = $ruleValidate.code;
+ $compile = $rDef.compile;
+ $inline = $rDef.inline;
+ $macro = $rDef.macro;
+ }
+ var $ruleErrs = $validateCode + '.errors',
+ $i = 'i' + $lvl,
+ $ruleErr = 'ruleErr' + $lvl,
+ $asyncKeyword = $rDef.async;
+ if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');
+ if (!($inline || $macro)) {
+ out += '' + ($ruleErrs) + ' = null;';
+ }
+ out += 'var ' + ($errs) + ' = errors;var valid' + ($lvl) + ';';
+ if ($inline && $rDef.statements) {
+ out += ' ' + ($ruleValidate.validate);
+ } else if ($macro) {
+ var $it = it.util.copy(it);
+ $it.level++;
+ $it.schema = $ruleValidate.validate;
+ $it.schemaPath = '';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var $code = it.validate($it).replace(/validate\.schema/g, $validateCode);
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($code);
+ } else if (!$inline) {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ out += ' ' + ($validateCode) + '.call( ';
+ if (it.opts.passContext) {
+ out += 'this';
+ } else {
+ out += 'self';
+ }
+ if ($compile || $rDef.schema === false) {
+ out += ' , ' + ($data) + ' ';
+ } else {
+ out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';
+ }
+ out += ' , (dataPath || \'\')';
+ if (it.errorPath != '""') {
+ out += ' + ' + (it.errorPath);
+ }
+ if ($dataLvl) {
+ out += ' , data' + (($dataLvl - 1) || '') + ' , ' + (it.dataPathArr[$dataLvl]) + ' ';
+ } else {
+ out += ' , parentData , parentDataProperty ';
+ }
+ out += ' , rootData ) ';
+ var def_callRuleValidate = out;
+ out = $$outStack.pop();
+ if ($rDef.errors !== false) {
+ if ($asyncKeyword) {
+ $ruleErrs = 'customErrors' + $lvl;
+ out += ' var ' + ($ruleErrs) + ' = null; try { valid' + ($lvl) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { valid' + ($lvl) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';
+ } else {
+ out += ' ' + ($validateCode) + '.errors = null; ';
+ }
+ }
+ }
+ out += 'if (';
+ if ($validateSchema) {
+ out += ' !' + ($definition) + '.validateSchema(' + ($schemaValue) + ') || ';
+ }
+ out += ' ! ';
+ if ($inline) {
+ if ($rDef.statements) {
+ out += ' valid' + ($lvl) + ' ';
+ } else {
+ out += ' (' + ($ruleValidate.validate) + ') ';
+ }
+ } else if ($macro) {
+ out += ' valid' + ($it.level) + ' ';
+ } else {
+ if ($asyncKeyword) {
+ if ($rDef.errors === false) {
+ out += ' (' + (it.yieldAwait) + (def_callRuleValidate) + ') ';
+ } else {
+ out += ' valid' + ($lvl) + ' ';
+ }
+ } else {
+ out += ' ' + (def_callRuleValidate) + ' ';
+ }
+ }
+ out += ') { ';
+ $errorKeyword = $rule.keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ var def_customError = out;
+ out = $$outStack.pop();
+ if ($inline) {
+ if ($rDef.errors) {
+ if ($rDef.errors != 'full') {
+ out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) { ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; } if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } ';
+ }
+ } else {
+ if ($rDef.errors === false) {
+ out += ' ' + (def_customError) + ' ';
+ } else {
+ out += ' if (' + ($errs) + ' == errors) { ' + (def_customError) + ' } else { for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) { ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; } if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } } ';
+ }
+ }
+ } else if ($macro) {
+ out += ' var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false ';
+ }
+ }
+ } else {
+ if ($rDef.errors === false) {
+ out += ' ' + (def_customError) + ' ';
+ } else {
+ out += ' if (Array.isArray(' + ($ruleErrs) + ')) { if (vErrors === null) vErrors = ' + ($ruleErrs) + '; else vErrors = vErrors.concat(' + ($ruleErrs) + '); errors = vErrors.length; for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } } else { ' + (def_customError) + ' } ';
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],22:[function(require,module,exports){
+'use strict';
+module.exports = function generate_dependencies(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $schemaDeps = {},
+ $propertyDeps = {};
+ for ($property in $schema) {
+ var $sch = $schema[$property];
+ var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
+ $deps[$property] = $sch;
+ }
+ out += 'var ' + ($errs) + ' = errors;';
+ var $currentErrorPath = it.errorPath;
+ out += 'var missing' + ($lvl) + ';';
+ for (var $property in $propertyDeps) {
+ $deps = $propertyDeps[$property];
+ out += ' if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
+ if ($breakOnError) {
+ out += ' && ( ';
+ var arr1 = $deps;
+ if (arr1) {
+ var _$property, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ _$property = arr1[$i += 1];
+ if ($i) {
+ out += ' || ';
+ }
+ var $prop = it.util.getProperty(_$property);
+ out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';
+ }
+ }
+ out += ')) { ';
+ var $propertyPath = 'missing' + $lvl,
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have ';
+ if ($deps.length == 1) {
+ out += 'property ' + (it.util.escapeQuotes($deps[0]));
+ } else {
+ out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
+ }
+ out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ } else {
+ out += ' ) { ';
+ var arr2 = $deps;
+ if (arr2) {
+ var $reqProperty, i2 = -1,
+ l2 = arr2.length - 1;
+ while (i2 < l2) {
+ $reqProperty = arr2[i2 += 1];
+ var $prop = it.util.getProperty($reqProperty),
+ $missingProperty = it.util.escapeQuotes($reqProperty);
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers);
+ }
+ out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have ';
+ if ($deps.length == 1) {
+ out += 'property ' + (it.util.escapeQuotes($deps[0]));
+ } else {
+ out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
+ }
+ out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ }
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ var $currentBaseId = $it.baseId;
+ for (var $property in $schemaDeps) {
+ var $sch = $schemaDeps[$property];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ out += ' valid' + ($it.level) + ' = true; if (' + ($data) + '[\'' + ($property) + '\'] !== undefined) { ';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + it.util.getProperty($property);
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
+
+},{}],23:[function(require,module,exports){
+'use strict';
+module.exports = function generate_enum(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $i = 'i' + $lvl;
+ if (!$isData) {
+ out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';
+ }
+ out += 'var ' + ($valid) + ';';
+ if ($isData) {
+ out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
+ }
+ out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<schema' + ($lvl) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', schema' + ($lvl) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be equal to one of the allowed values\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' }';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],24:[function(require,module,exports){
+'use strict';
+module.exports = function generate_format(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ if (it.opts.format === false) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ }
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if ($isData) {
+ var $format = 'format' + $lvl;
+ out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var isObject' + ($lvl) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; if (isObject' + ($lvl) + ') { var async' + ($lvl) + ' = ' + ($format) + '.async; ' + ($format) + ' = ' + ($format) + '.validate; } if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
+ }
+ out += ' (' + ($format) + ' && !(typeof ' + ($format) + ' == \'function\' ? ';
+ if (it.async) {
+ out += ' (async' + ($lvl) + ' ? ' + (it.yieldAwait) + ' ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
+ } else {
+ out += ' ' + ($format) + '(' + ($data) + ') ';
+ }
+ out += ' : ' + ($format) + '.test(' + ($data) + ')))) {';
+ } else {
+ var $format = it.formats[$schema];
+ if (!$format) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ }
+ var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
+ if ($isObject) {
+ var $async = $format.async === true;
+ $format = $format.validate;
+ }
+ if ($async) {
+ if (!it.async) throw new Error('async format in sync schema');
+ var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
+ out += ' if (!(' + (it.yieldAwait) + ' ' + ($formatRef) + '(' + ($data) + '))) { ';
+ } else {
+ out += ' if (! ';
+ var $formatRef = 'formats' + it.util.getProperty($schema);
+ if ($isObject) $formatRef += '.validate';
+ if (typeof $format == 'function') {
+ out += ' ' + ($formatRef) + '(' + ($data) + ') ';
+ } else {
+ out += ' ' + ($formatRef) + '.test(' + ($data) + ') ';
+ }
+ out += ') { ';
+ }
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match format "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],25:[function(require,module,exports){
+'use strict';
+module.exports = function generate_items(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $currentBaseId = it.baseId;
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if (Array.isArray($schema)) {
+ var $additionalItems = it.schema.additionalItems;
+ if ($additionalItems === false) {
+ out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalItems';
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ out += ' valid' + ($it.level) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
+ var $passData = $data + '[' + $i + ']';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
+ $it.dataPathArr[$dataNxt] = $i;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) {
+ $it.schema = $additionalItems;
+ $it.schemaPath = it.schemaPath + '.additionalItems';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalItems';
+ out += ' valid' + ($it.level) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var i' + ($lvl) + ' = ' + ($schema.length) + '; i' + ($lvl) + ' < ' + ($data) + '.length; i' + ($lvl) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, 'i' + $lvl, it.opts.jsonPointers, true);
+ var $passData = $data + '[i' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'i' + $lvl;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!valid' + ($it.level) + ') break; ';
+ }
+ out += ' } } ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ } else if (it.util.schemaHasRules($schema, it.RULES.all)) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' for (var i' + ($lvl) + ' = ' + (0) + '; i' + ($lvl) + ' < ' + ($data) + '.length; i' + ($lvl) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, 'i' + $lvl, it.opts.jsonPointers, true);
+ var $passData = $data + '[i' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'i' + $lvl;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!valid' + ($it.level) + ') break; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
+
+},{}],26:[function(require,module,exports){
+'use strict';
+module.exports = function generate_multipleOf(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ out += 'var division' + ($lvl) + ';if (';
+ if ($isData) {
+ out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || ';
+ }
+ out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';
+ if (it.opts.multipleOfPrecision) {
+ out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';
+ } else {
+ out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';
+ }
+ out += ' ) ';
+ if ($isData) {
+ out += ' ) ';
+ }
+ out += ' ) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be multiple of ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue);
+ } else {
+ out += '' + ($schema) + '\'';
+ }
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],27:[function(require,module,exports){
+'use strict';
+module.exports = function generate_not(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ $it.level++;
+ if (it.util.schemaHasRules($schema, it.RULES.all)) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.createErrors = false;
+ var $allErrorsOption;
+ if ($it.opts.allErrors) {
+ $allErrorsOption = $it.opts.allErrors;
+ $it.opts.allErrors = false;
+ }
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.createErrors = true;
+ if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' if (valid' + ($it.level) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be valid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ } else {
+ out += ' var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be valid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if ($breakOnError) {
+ out += ' if (false) { ';
+ }
+ }
+ return out;
+}
+
+},{}],28:[function(require,module,exports){
+'use strict';
+module.exports = function generate_oneOf(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false;';
+ var $currentBaseId = $it.baseId;
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ } else {
+ out += ' var valid' + ($it.level) + ' = true; ';
+ }
+ if ($i) {
+ out += ' if (valid' + ($it.level) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { ';
+ $closingBraces += '}';
+ }
+ out += ' if (valid' + ($it.level) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;';
+ }
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match exactly one schema in oneOf\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ return out;
+}
+
+},{}],29:[function(require,module,exports){
+'use strict';
+module.exports = function generate_pattern(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
+ }
+ out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match pattern "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],30:[function(require,module,exports){
+'use strict';
+module.exports = function generate_patternRequired(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $key = 'key' + $lvl,
+ $matched = 'patternMatched' + $lvl,
+ $closingBraces = '',
+ $ownProperties = it.opts.ownProperties;
+ out += 'var ' + ($valid) + ' = true;';
+ var arr1 = $schema;
+ if (arr1) {
+ var $pProperty, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $pProperty = arr1[i1 += 1];
+ out += ' var ' + ($matched) + ' = false; for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ if ($ownProperties) {
+ out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
+ }
+ out += ' ' + ($matched) + ' = ' + (it.usePattern($pProperty)) + '.test(' + ($key) + '); if (' + ($matched) + ') break; } ';
+ var $missingPattern = it.util.escapeQuotes($pProperty);
+ out += ' if (!' + ($matched) + ') { ' + ($valid) + ' = false; var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'patternRequired') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingPattern: \'' + ($missingPattern) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have property matching pattern \\\'' + ($missingPattern) + '\\\'\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ }
+ out += '' + ($closingBraces);
+ return out;
+}
+
+},{}],31:[function(require,module,exports){
+'use strict';
+module.exports = function generate_properties(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $key = 'key' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt;
+ var $schemaKeys = Object.keys($schema || {}),
+ $pProperties = it.schema.patternProperties || {},
+ $pPropertyKeys = Object.keys($pProperties),
+ $aProperties = it.schema.additionalProperties,
+ $someProperties = $schemaKeys.length || $pPropertyKeys.length,
+ $noAdditional = $aProperties === false,
+ $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,
+ $removeAdditional = it.opts.removeAdditional,
+ $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional,
+ $ownProperties = it.opts.ownProperties,
+ $currentBaseId = it.baseId;
+ var $required = it.schema.required;
+ if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required);
+ if (it.opts.v5) {
+ var $pgProperties = it.schema.patternGroups || {},
+ $pgPropertyKeys = Object.keys($pgProperties);
+ }
+ out += 'var ' + ($errs) + ' = errors;var valid' + ($it.level) + ' = true;';
+ if ($checkAdditional) {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ if ($ownProperties) {
+ out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
+ }
+ if ($someProperties) {
+ out += ' var isAdditional' + ($lvl) + ' = !(false ';
+ if ($schemaKeys.length) {
+ if ($schemaKeys.length > 5) {
+ out += ' || validate.schema' + ($schemaPath) + '[' + ($key) + '] ';
+ } else {
+ var arr1 = $schemaKeys;
+ if (arr1) {
+ var $propertyKey, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $propertyKey = arr1[i1 += 1];
+ out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';
+ }
+ }
+ }
+ }
+ if ($pPropertyKeys.length) {
+ var arr2 = $pPropertyKeys;
+ if (arr2) {
+ var $pProperty, $i = -1,
+ l2 = arr2.length - 1;
+ while ($i < l2) {
+ $pProperty = arr2[$i += 1];
+ out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') ';
+ }
+ }
+ }
+ if (it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length) {
+ var arr3 = $pgPropertyKeys;
+ if (arr3) {
+ var $pgProperty, $i = -1,
+ l3 = arr3.length - 1;
+ while ($i < l3) {
+ $pgProperty = arr3[$i += 1];
+ out += ' || ' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ') ';
+ }
+ }
+ }
+ out += ' ); if (isAdditional' + ($lvl) + ') { ';
+ }
+ if ($removeAdditional == 'all') {
+ out += ' delete ' + ($data) + '[' + ($key) + ']; ';
+ } else {
+ var $currentErrorPath = it.errorPath;
+ var $additionalProperty = '\' + key' + $lvl + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);
+ }
+ if ($noAdditional) {
+ if ($removeAdditional) {
+ out += ' delete ' + ($data) + '[' + ($key) + ']; ';
+ } else {
+ out += ' valid' + ($it.level) + ' = false; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have additional properties\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ out += ' break; ';
+ }
+ }
+ } else if ($additionalIsSchema) {
+ if ($removeAdditional == 'failing') {
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);
+ var $passData = $data + '[key' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'key' + $lvl;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' if (!valid' + ($it.level) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ } else {
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);
+ var $passData = $data + '[key' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'key' + $lvl;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!valid' + ($it.level) + ') break; ';
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ }
+ if ($someProperties) {
+ out += ' } ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ var $useDefaults = it.opts.useDefaults && !it.compositeRule;
+ if ($schemaKeys.length) {
+ var arr4 = $schemaKeys;
+ if (arr4) {
+ var $propertyKey, i4 = -1,
+ l4 = arr4.length - 1;
+ while (i4 < l4) {
+ $propertyKey = arr4[i4 += 1];
+ var $sch = $schema[$propertyKey];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ var $prop = it.util.getProperty($propertyKey),
+ $passData = $data + $prop,
+ $hasDefault = $useDefaults && $sch.default !== undefined;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + $prop;
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
+ $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
+ $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ $code = it.util.varReplace($code, $nextData, $passData);
+ var $useData = $passData;
+ } else {
+ var $useData = $nextData;
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';
+ }
+ if ($hasDefault) {
+ out += ' ' + ($code) + ' ';
+ } else {
+ if ($requiredHash && $requiredHash[$propertyKey]) {
+ out += ' if (' + ($useData) + ' === undefined) { valid' + ($it.level) + ' = false; ';
+ var $currentErrorPath = it.errorPath,
+ $currErrSchemaPath = $errSchemaPath,
+ $missingProperty = it.util.escapeQuotes($propertyKey);
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ $errSchemaPath = it.errSchemaPath + '/required';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ it.errorPath = $currentErrorPath;
+ out += ' } else { ';
+ } else {
+ if ($breakOnError) {
+ out += ' if (' + ($useData) + ' === undefined) { valid' + ($it.level) + ' = true; } else { ';
+ } else {
+ out += ' if (' + ($useData) + ' !== undefined) { ';
+ }
+ }
+ out += ' ' + ($code) + ' } ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ var arr5 = $pPropertyKeys;
+ if (arr5) {
+ var $pProperty, i5 = -1,
+ l5 = arr5.length - 1;
+ while (i5 < l5) {
+ $pProperty = arr5[i5 += 1];
+ var $sch = $pProperties[$pProperty];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
+ $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ if ($ownProperties) {
+ out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
+ }
+ out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);
+ var $passData = $data + '[key' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'key' + $lvl;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!valid' + ($it.level) + ') break; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else valid' + ($it.level) + ' = true; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if (it.opts.v5) {
+ var arr6 = $pgPropertyKeys;
+ if (arr6) {
+ var $pgProperty, i6 = -1,
+ l6 = arr6.length - 1;
+ while (i6 < l6) {
+ $pgProperty = arr6[i6 += 1];
+ var $pgSchema = $pgProperties[$pgProperty],
+ $sch = $pgSchema.schema;
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema';
+ $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema';
+ out += ' var pgPropCount' + ($lvl) + ' = 0; for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ if ($ownProperties) {
+ out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
+ }
+ out += ' if (' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ')) { pgPropCount' + ($lvl) + '++; ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);
+ var $passData = $data + '[key' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'key' + $lvl;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!valid' + ($it.level) + ') break; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else valid' + ($it.level) + ' = true; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ var $pgMin = $pgSchema.minimum,
+ $pgMax = $pgSchema.maximum;
+ if ($pgMin !== undefined || $pgMax !== undefined) {
+ out += ' var ' + ($valid) + ' = true; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ if ($pgMin !== undefined) {
+ var $limit = $pgMin,
+ $reason = 'minimum',
+ $moreOrLess = 'less';
+ out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; ';
+ $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum';
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($pgMax !== undefined) {
+ out += ' else ';
+ }
+ }
+ if ($pgMax !== undefined) {
+ var $limit = $pgMax,
+ $reason = 'maximum',
+ $moreOrLess = 'more';
+ out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; ';
+ $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum';
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ out += ' if (' + ($valid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
+
+},{}],32:[function(require,module,exports){
+'use strict';
+module.exports = function generate_ref(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $async, $refCode;
+ if ($schema == '#' || $schema == '#/') {
+ if (it.isRoot) {
+ $async = it.async;
+ $refCode = 'validate';
+ } else {
+ $async = it.root.schema.$async === true;
+ $refCode = 'root.refVal[0]';
+ }
+ } else {
+ var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);
+ if ($refVal === undefined) {
+ var $message = 'can\'t resolve reference ' + $schema + ' from id ' + it.baseId;
+ if (it.opts.missingRefs == 'fail') {
+ console.log($message);
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ if ($breakOnError) {
+ out += ' if (false) { ';
+ }
+ } else if (it.opts.missingRefs == 'ignore') {
+ console.log($message);
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ } else {
+ var $error = new Error($message);
+ $error.missingRef = it.resolve.url(it.baseId, $schema);
+ $error.missingSchema = it.resolve.normalizeId(it.resolve.fullPath($error.missingRef));
+ throw $error;
+ }
+ } else if ($refVal.inline) {
+ var $it = it.util.copy(it);
+ $it.level++;
+ $it.schema = $refVal.schema;
+ $it.schemaPath = '';
+ $it.errSchemaPath = $schema;
+ var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code);
+ out += ' ' + ($code) + ' ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ }
+ } else {
+ $async = $refVal.$async === true;
+ $refCode = $refVal.code;
+ }
+ }
+ if ($refCode) {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ if (it.opts.passContext) {
+ out += ' ' + ($refCode) + '.call(this, ';
+ } else {
+ out += ' ' + ($refCode) + '( ';
+ }
+ out += ' ' + ($data) + ', (dataPath || \'\')';
+ if (it.errorPath != '""') {
+ out += ' + ' + (it.errorPath);
+ }
+ if ($dataLvl) {
+ out += ' , data' + (($dataLvl - 1) || '') + ' , ' + (it.dataPathArr[$dataLvl]) + ' ';
+ } else {
+ out += ' , parentData , parentDataProperty ';
+ }
+ out += ', rootData) ';
+ var __callValidate = out;
+ out = $$outStack.pop();
+ if ($async) {
+ if (!it.async) throw new Error('async schema referenced by sync schema');
+ out += ' try { ';
+ if ($breakOnError) {
+ out += 'var ' + ($valid) + ' =';
+ }
+ out += ' ' + (it.yieldAwait) + ' ' + (__callValidate) + '; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ';
+ if ($breakOnError) {
+ out += ' if (' + ($valid) + ') { ';
+ }
+ } else {
+ out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ }
+ }
+ return out;
+}
+
+},{}],33:[function(require,module,exports){
+'use strict';
+module.exports = function generate_required(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!$isData) {
+ if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {
+ var $required = [];
+ var arr1 = $schema;
+ if (arr1) {
+ var $property, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $property = arr1[i1 += 1];
+ var $propertySch = it.schema.properties[$property];
+ if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) {
+ $required[$required.length] = $property;
+ }
+ }
+ }
+ } else {
+ var $required = $schema;
+ }
+ }
+ if ($isData || $required.length) {
+ var $currentErrorPath = it.errorPath,
+ $loopRequired = $isData || $required.length >= it.opts.loopRequired;
+ if ($breakOnError) {
+ out += ' var missing' + ($lvl) + '; ';
+ if ($loopRequired) {
+ if (!$isData) {
+ out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + '; ';
+ }
+ var $i = 'i' + $lvl,
+ $propertyPath = 'schema' + $lvl + '[' + $i + ']',
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ out += ' var ' + ($valid) + ' = true; ';
+ if ($isData) {
+ out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
+ }
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < schema' + ($lvl) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[schema' + ($lvl) + '[' + ($i) + ']] !== undefined; if (!' + ($valid) + ') break; } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ } else {
+ out += ' if ( ';
+ var arr2 = $required;
+ if (arr2) {
+ var _$property, $i = -1,
+ l2 = arr2.length - 1;
+ while ($i < l2) {
+ _$property = arr2[$i += 1];
+ if ($i) {
+ out += ' || ';
+ }
+ var $prop = it.util.getProperty(_$property);
+ out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';
+ }
+ }
+ out += ') { ';
+ var $propertyPath = 'missing' + $lvl,
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ }
+ } else {
+ if ($loopRequired) {
+ if (!$isData) {
+ out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + '; ';
+ }
+ var $i = 'i' + $lvl,
+ $propertyPath = 'schema' + $lvl + '[' + $i + ']',
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ if ($isData) {
+ out += ' if (schema' + ($lvl) + ' && !Array.isArray(schema' + ($lvl) + ')) { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (schema' + ($lvl) + ' !== undefined) { ';
+ }
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < schema' + ($lvl) + '.length; ' + ($i) + '++) { if (' + ($data) + '[schema' + ($lvl) + '[' + ($i) + ']] === undefined) { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ } else {
+ var arr3 = $required;
+ if (arr3) {
+ var $reqProperty, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $reqProperty = arr3[i3 += 1];
+ var $prop = it.util.getProperty($reqProperty),
+ $missingProperty = it.util.escapeQuotes($reqProperty);
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers);
+ }
+ out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ }
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ } else if ($breakOnError) {
+ out += ' if (true) {';
+ }
+ return out;
+}
+
+},{}],34:[function(require,module,exports){
+'use strict';
+module.exports = function generate_switch(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $ifPassed = 'ifPassed' + it.level,
+ $currentBaseId = $it.baseId,
+ $shouldContinue;
+ out += 'var ' + ($ifPassed) + ';';
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $caseIndex = -1,
+ l1 = arr1.length - 1;
+ while ($caseIndex < l1) {
+ $sch = arr1[$caseIndex += 1];
+ if ($caseIndex && !$shouldContinue) {
+ out += ' if (!' + ($ifPassed) + ') { ';
+ $closingBraces += '}';
+ }
+ if ($sch.if && it.util.schemaHasRules($sch.if, it.RULES.all)) {
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.createErrors = false;
+ $it.schema = $sch.if;
+ $it.schemaPath = $schemaPath + '[' + $caseIndex + '].if';
+ $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/if';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ $it.createErrors = true;
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($ifPassed) + ' = valid' + ($it.level) + '; if (' + ($ifPassed) + ') { ';
+ if (typeof $sch.then == 'boolean') {
+ if ($sch.then === false) {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "switch" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ }
+ out += ' var valid' + ($it.level) + ' = ' + ($sch.then) + '; ';
+ } else {
+ $it.schema = $sch.then;
+ $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';
+ $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } } ';
+ } else {
+ out += ' ' + ($ifPassed) + ' = true; ';
+ if (typeof $sch.then == 'boolean') {
+ if ($sch.then === false) {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "switch" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ }
+ out += ' var valid' + ($it.level) + ' = ' + ($sch.then) + '; ';
+ } else {
+ $it.schema = $sch.then;
+ $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';
+ $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ }
+ }
+ $shouldContinue = $sch.continue
+ }
+ }
+ out += '' + ($closingBraces) + 'var ' + ($valid) + ' = valid' + ($it.level) + '; ';
+ out = it.util.cleanUpCode(out);
+ return out;
+}
+
+},{}],35:[function(require,module,exports){
+'use strict';
+module.exports = function generate_uniqueItems(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (($schema || $isData) && it.opts.uniqueItems !== false) {
+ if ($isData) {
+ out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { ';
+ }
+ out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
+
+},{}],36:[function(require,module,exports){
+'use strict';
+module.exports = function generate_validate(it, $keyword) {
+ var out = '';
+ var $async = it.schema.$async === true;
+ if (it.isTop) {
+ var $top = it.isTop,
+ $lvl = it.level = 0,
+ $dataLvl = it.dataLevel = 0,
+ $data = 'data';
+ it.rootId = it.resolve.fullPath(it.root.schema.id);
+ it.baseId = it.baseId || it.rootId;
+ if ($async) {
+ it.async = true;
+ var $es7 = it.opts.async == 'es7';
+ it.yieldAwait = $es7 ? 'await' : 'yield';
+ }
+ delete it.isTop;
+ it.dataPathArr = [undefined];
+ out += ' var validate = ';
+ if ($async) {
+ if ($es7) {
+ out += ' (async function ';
+ } else {
+ if (it.opts.async == 'co*') {
+ out += 'co.wrap';
+ }
+ out += '(function* ';
+ }
+ } else {
+ out += ' (function ';
+ }
+ out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; var vErrors = null; ';
+ out += ' var errors = 0; ';
+ out += ' if (rootData === undefined) rootData = data;';
+ } else {
+ var $lvl = it.level,
+ $dataLvl = it.dataLevel,
+ $data = 'data' + ($dataLvl || '');
+ if (it.schema.id) it.baseId = it.resolve.url(it.baseId, it.schema.id);
+ if ($async && !it.async) throw new Error('async schema in sync schema');
+ out += ' var errs_' + ($lvl) + ' = errors;';
+ }
+ var $valid = 'valid' + $lvl,
+ $breakOnError = !it.opts.allErrors,
+ $closingBraces1 = '',
+ $closingBraces2 = '',
+ $errorKeyword;
+ var $typeSchema = it.schema.type,
+ $typeIsArray = Array.isArray($typeSchema);
+ if ($typeSchema && it.opts.coerceTypes) {
+ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);
+ if ($coerceToTypes) {
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type',
+ $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+ out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';
+ var $dataType = 'dataType' + $lvl,
+ $coerced = 'coerced' + $lvl;
+ out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; ';
+ if (it.opts.coerceTypes == 'array') {
+ out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; ';
+ }
+ out += ' var ' + ($coerced) + ' = undefined; ';
+ var $bracesCoercion = '';
+ var arr1 = $coerceToTypes;
+ if (arr1) {
+ var $type, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $type = arr1[$i += 1];
+ if ($i) {
+ out += ' if (' + ($coerced) + ' === undefined) { ';
+ $bracesCoercion += '}';
+ }
+ if (it.opts.coerceTypes == 'array' && $type != 'array') {
+ out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } ';
+ }
+ if ($type == 'string') {
+ out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; ';
+ } else if ($type == 'number' || $type == 'integer') {
+ out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';
+ if ($type == 'integer') {
+ out += ' && !(' + ($data) + ' % 1)';
+ }
+ out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';
+ } else if ($type == 'boolean') {
+ out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';
+ } else if ($type == 'null') {
+ out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';
+ } else if (it.opts.coerceTypes == 'array' && $type == 'array') {
+ out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; ';
+ }
+ }
+ }
+ out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ if ($dataLvl) {
+ var $parentData = 'data' + (($dataLvl - 1) || ''),
+ $dataProperty = it.dataPathArr[$dataLvl];
+ out += ' ' + ($data) + ' = ' + ($parentData) + '[' + ($dataProperty) + '] = ' + ($coerced) + '; ';
+ } else {
+ out += ' data = ' + ($coerced) + '; if (parentData !== undefined) parentData[parentDataProperty] = ' + ($coerced) + '; ';
+ }
+ out += ' } } ';
+ }
+ }
+ var $refKeywords;
+ if (it.schema.$ref && ($refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'))) {
+ if (it.opts.extendRefs == 'fail') {
+ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '"');
+ } else if (it.opts.extendRefs == 'ignore') {
+ $refKeywords = false;
+ console.log('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
+ } else if (it.opts.extendRefs !== true) {
+ console.log('$ref: all keywords used in schema at path "' + it.errSchemaPath + '". It will change in the next major version, see issue #260. Use option { extendRefs: true } to keep current behaviour');
+ }
+ }
+ if (it.schema.$ref && !$refKeywords) {
+ out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' ';
+ if ($breakOnError) {
+ out += ' } if (errors === ';
+ if ($top) {
+ out += '0';
+ } else {
+ out += 'errs_' + ($lvl);
+ }
+ out += ') { ';
+ $closingBraces2 += '}';
+ }
+ } else {
+ var arr2 = it.RULES;
+ if (arr2) {
+ var $rulesGroup, i2 = -1,
+ l2 = arr2.length - 1;
+ while (i2 < l2) {
+ $rulesGroup = arr2[i2 += 1];
+ if ($shouldUseGroup($rulesGroup)) {
+ if ($rulesGroup.type) {
+ out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { ';
+ }
+ if (it.opts.useDefaults && !it.compositeRule) {
+ if ($rulesGroup.type == 'object' && it.schema.properties) {
+ var $schema = it.schema.properties,
+ $schemaKeys = Object.keys($schema);
+ var arr3 = $schemaKeys;
+ if (arr3) {
+ var $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $sch = $schema[$propertyKey];
+ if ($sch.default !== undefined) {
+ var $passData = $data + it.util.getProperty($propertyKey);
+ out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';
+ if (it.opts.useDefaults == 'shared') {
+ out += ' ' + (it.useDefault($sch.default)) + ' ';
+ } else {
+ out += ' ' + (JSON.stringify($sch.default)) + ' ';
+ }
+ out += '; ';
+ }
+ }
+ }
+ } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {
+ var arr4 = it.schema.items;
+ if (arr4) {
+ var $sch, $i = -1,
+ l4 = arr4.length - 1;
+ while ($i < l4) {
+ $sch = arr4[$i += 1];
+ if ($sch.default !== undefined) {
+ var $passData = $data + '[' + $i + ']';
+ out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';
+ if (it.opts.useDefaults == 'shared') {
+ out += ' ' + (it.useDefault($sch.default)) + ' ';
+ } else {
+ out += ' ' + (JSON.stringify($sch.default)) + ' ';
+ }
+ out += '; ';
+ }
+ }
+ }
+ }
+ }
+ var arr5 = $rulesGroup.rules;
+ if (arr5) {
+ var $rule, i5 = -1,
+ l5 = arr5.length - 1;
+ while (i5 < l5) {
+ $rule = arr5[i5 += 1];
+ if ($shouldUseRule($rule)) {
+ out += ' ' + ($rule.code(it, $rule.keyword)) + ' ';
+ if ($breakOnError) {
+ $closingBraces1 += '}';
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces1) + ' ';
+ $closingBraces1 = '';
+ }
+ if ($rulesGroup.type) {
+ out += ' } ';
+ if ($typeSchema && $typeSchema === $rulesGroup.type) {
+ var $typeChecked = true;
+ out += ' else { ';
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' if (errors === ';
+ if ($top) {
+ out += '0';
+ } else {
+ out += 'errs_' + ($lvl);
+ }
+ out += ') { ';
+ $closingBraces2 += '}';
+ }
+ }
+ }
+ }
+ }
+ if ($typeSchema && !$typeChecked && !(it.opts.coerceTypes && $coerceToTypes)) {
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type',
+ $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+ out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' }';
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces2) + ' ';
+ }
+ if ($top) {
+ if ($async) {
+ out += ' if (errors === 0) return true; ';
+ out += ' else throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; ';
+ out += ' return errors === 0; ';
+ }
+ out += ' }); return validate;';
+ } else {
+ out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';';
+ }
+ out = it.util.cleanUpCode(out);
+ if ($top && $breakOnError) {
+ out = it.util.cleanUpVarErrors(out, $async);
+ }
+
+ function $shouldUseGroup($rulesGroup) {
+ for (var i = 0; i < $rulesGroup.rules.length; i++)
+ if ($shouldUseRule($rulesGroup.rules[i])) return true;
+ }
+
+ function $shouldUseRule($rule) {
+ return it.schema[$rule.keyword] !== undefined || ($rule.keyword == 'properties' && (it.schema.additionalProperties === false || typeof it.schema.additionalProperties == 'object' || (it.schema.patternProperties && Object.keys(it.schema.patternProperties).length) || (it.opts.v5 && it.schema.patternGroups && Object.keys(it.schema.patternGroups).length)));
+ }
+ return out;
+}
+
+},{}],37:[function(require,module,exports){
+'use strict';
+
+var IDENTIFIER = /^[a-z_$][a-z0-9_$]*$/i;
+var customRuleCode = require('./dotjs/custom');
+
+/**
+ * Define custom keyword
+ * @this Ajv
+ * @param {String} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords.
+ * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
+ */
+module.exports = function addKeyword(keyword, definition) {
+ /* eslint no-shadow: 0 */
+ var self = this;
+ if (this.RULES.keywords[keyword])
+ throw new Error('Keyword ' + keyword + ' is already defined');
+
+ if (!IDENTIFIER.test(keyword))
+ throw new Error('Keyword ' + keyword + ' is not a valid identifier');
+
+ if (definition) {
+ var dataType = definition.type;
+ if (Array.isArray(dataType)) {
+ var i, len = dataType.length;
+ for (i=0; i<len; i++) checkDataType(dataType[i]);
+ for (i=0; i<len; i++) _addRule(keyword, dataType[i], definition);
+ } else {
+ if (dataType) checkDataType(dataType);
+ _addRule(keyword, dataType, definition);
+ }
+
+ var $data = definition.$data === true && this._opts.v5;
+ if ($data && !definition.validate)
+ throw new Error('$data support: neither "validate" nor "compile" functions are defined');
+
+ var metaSchema = definition.metaSchema;
+ if (metaSchema) {
+ if ($data) {
+ metaSchema = {
+ anyOf: [
+ metaSchema,
+ { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#/definitions/$data' }
+ ]
+ };
+ }
+ definition.validateSchema = self.compile(metaSchema, true);
+ }
+ }
+
+ this.RULES.keywords[keyword] = this.RULES.all[keyword] = true;
+
+
+ function _addRule(keyword, dataType, definition) {
+ var ruleGroup;
+ for (var i=0; i<self.RULES.length; i++) {
+ var rg = self.RULES[i];
+ if (rg.type == dataType) {
+ ruleGroup = rg;
+ break;
+ }
+ }
+
+ if (!ruleGroup) {
+ ruleGroup = { type: dataType, rules: [] };
+ self.RULES.push(ruleGroup);
+ }
+
+ var rule = {
+ keyword: keyword,
+ definition: definition,
+ custom: true,
+ code: customRuleCode
+ };
+ ruleGroup.rules.push(rule);
+ self.RULES.custom[keyword] = rule;
+ }
+
+
+ function checkDataType(dataType) {
+ if (!self.RULES.types[dataType]) throw new Error('Unknown type ' + dataType);
+ }
+};
+
+},{"./dotjs/custom":21}],38:[function(require,module,exports){
+module.exports={
+ "id": "http://json-schema.org/draft-04/schema#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "description": "Core schema meta-schema",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "#" }
+ },
+ "positiveInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "positiveIntegerDefault0": {
+ "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
+ },
+ "simpleTypes": {
+ "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": { "type": "string" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ },
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uri"
+ },
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": {},
+ "multipleOf": {
+ "type": "number",
+ "minimum": 0,
+ "exclusiveMinimum": true
+ },
+ "maximum": {
+ "type": "number"
+ },
+ "exclusiveMaximum": {
+ "type": "boolean",
+ "default": false
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "exclusiveMinimum": {
+ "type": "boolean",
+ "default": false
+ },
+ "maxLength": { "$ref": "#/definitions/positiveInteger" },
+ "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
+ "pattern": {
+ "type": "string",
+ "format": "regex"
+ },
+ "additionalItems": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" }
+ ],
+ "default": {}
+ },
+ "items": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/schemaArray" }
+ ],
+ "default": {}
+ },
+ "maxItems": { "$ref": "#/definitions/positiveInteger" },
+ "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
+ "uniqueItems": {
+ "type": "boolean",
+ "default": false
+ },
+ "maxProperties": { "$ref": "#/definitions/positiveInteger" },
+ "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
+ "required": { "$ref": "#/definitions/stringArray" },
+ "additionalProperties": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" }
+ ],
+ "default": {}
+ },
+ "definitions": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/stringArray" }
+ ]
+ }
+ },
+ "enum": {
+ "type": "array",
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "type": {
+ "anyOf": [
+ { "$ref": "#/definitions/simpleTypes" },
+ {
+ "type": "array",
+ "items": { "$ref": "#/definitions/simpleTypes" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "allOf": { "$ref": "#/definitions/schemaArray" },
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
+ "not": { "$ref": "#" }
+ },
+ "dependencies": {
+ "exclusiveMaximum": [ "maximum" ],
+ "exclusiveMinimum": [ "minimum" ]
+ },
+ "default": {}
+}
+
+},{}],39:[function(require,module,exports){
+module.exports={
+ "id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "description": "Core schema meta-schema (v5 proposals)",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "#" }
+ },
+ "positiveInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "positiveIntegerDefault0": {
+ "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
+ },
+ "simpleTypes": {
+ "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": { "type": "string" },
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "$data": {
+ "type": "object",
+ "required": [ "$data" ],
+ "properties": {
+ "$data": {
+ "type": "string",
+ "anyOf": [
+ { "format": "relative-json-pointer" },
+ { "format": "json-pointer" }
+ ]
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uri"
+ },
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": {},
+ "multipleOf": {
+ "anyOf": [
+ {
+ "type": "number",
+ "minimum": 0,
+ "exclusiveMinimum": true
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "maximum": {
+ "anyOf": [
+ { "type": "number" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "exclusiveMaximum": {
+ "anyOf": [
+ {
+ "type": "boolean",
+ "default": false
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "minimum": {
+ "anyOf": [
+ { "type": "number" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "exclusiveMinimum": {
+ "anyOf": [
+ {
+ "type": "boolean",
+ "default": false
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "maxLength": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveInteger" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "minLength": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveIntegerDefault0" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "pattern": {
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "regex"
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "additionalItems": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" },
+ { "$ref": "#/definitions/$data" }
+ ],
+ "default": {}
+ },
+ "items": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/schemaArray" }
+ ],
+ "default": {}
+ },
+ "maxItems": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveInteger" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "minItems": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveIntegerDefault0" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "uniqueItems": {
+ "anyOf": [
+ {
+ "type": "boolean",
+ "default": false
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "maxProperties": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveInteger" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "minProperties": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveIntegerDefault0" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "required": {
+ "anyOf": [
+ { "$ref": "#/definitions/stringArray" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "additionalProperties": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" },
+ { "$ref": "#/definitions/$data" }
+ ],
+ "default": {}
+ },
+ "definitions": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/stringArray" }
+ ]
+ }
+ },
+ "enum": {
+ "anyOf": [
+ {
+ "type": "array",
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "type": {
+ "anyOf": [
+ { "$ref": "#/definitions/simpleTypes" },
+ {
+ "type": "array",
+ "items": { "$ref": "#/definitions/simpleTypes" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "allOf": { "$ref": "#/definitions/schemaArray" },
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
+ "not": { "$ref": "#" },
+ "format": {
+ "anyOf": [
+ { "type": "string" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "formatMaximum": {
+ "anyOf": [
+ { "type": "string" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "formatMinimum": {
+ "anyOf": [
+ { "type": "string" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "formatExclusiveMaximum": {
+ "anyOf": [
+ {
+ "type": "boolean",
+ "default": false
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "formatExclusiveMinimum": {
+ "anyOf": [
+ {
+ "type": "boolean",
+ "default": false
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "constant": {
+ "anyOf": [
+ {},
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "contains": { "$ref": "#" },
+ "patternGroups": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "required": [ "schema" ],
+ "properties": {
+ "maximum": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveInteger" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "minimum": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveIntegerDefault0" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "schema": { "$ref": "#" }
+ },
+ "additionalProperties": false
+ },
+ "default": {}
+ },
+ "switch": {
+ "type": "array",
+ "items": {
+ "required": [ "then" ],
+ "properties": {
+ "if": { "$ref": "#" },
+ "then": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" }
+ ]
+ },
+ "continue": { "type": "boolean" }
+ },
+ "additionalProperties": false,
+ "dependencies": {
+ "continue": [ "if" ]
+ }
+ }
+ }
+ },
+ "dependencies": {
+ "exclusiveMaximum": [ "maximum" ],
+ "exclusiveMinimum": [ "minimum" ],
+ "formatMaximum": [ "format" ],
+ "formatMinimum": [ "format" ],
+ "formatExclusiveMaximum": [ "formatMaximum" ],
+ "formatExclusiveMinimum": [ "formatMinimum" ]
+ },
+ "default": {}
+}
+
+},{}],40:[function(require,module,exports){
+'use strict';
+
+var META_SCHEMA_ID = 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json';
+
+module.exports = {
+ enable: enableV5,
+ META_SCHEMA_ID: META_SCHEMA_ID
+};
+
+
+function enableV5(ajv) {
+ var inlineFunctions = {
+ 'switch': require('./dotjs/switch'),
+ 'constant': require('./dotjs/constant'),
+ '_formatLimit': require('./dotjs/_formatLimit'),
+ 'patternRequired': require('./dotjs/patternRequired')
+ };
+
+ if (ajv._opts.meta !== false) {
+ var metaSchema = require('./refs/json-schema-v5.json');
+ ajv.addMetaSchema(metaSchema, META_SCHEMA_ID);
+ }
+ _addKeyword('constant');
+ ajv.addKeyword('contains', { type: 'array', macro: containsMacro });
+
+ _addKeyword('formatMaximum', 'string', inlineFunctions._formatLimit);
+ _addKeyword('formatMinimum', 'string', inlineFunctions._formatLimit);
+ ajv.addKeyword('formatExclusiveMaximum');
+ ajv.addKeyword('formatExclusiveMinimum');
+
+ ajv.addKeyword('patternGroups'); // implemented in properties.jst
+ _addKeyword('patternRequired', 'object');
+ _addKeyword('switch');
+
+
+ function _addKeyword(keyword, types, inlineFunc) {
+ var definition = {
+ inline: inlineFunc || inlineFunctions[keyword],
+ statements: true,
+ errors: 'full'
+ };
+ if (types) definition.type = types;
+ ajv.addKeyword(keyword, definition);
+ }
+}
+
+
+function containsMacro(schema) {
+ return {
+ not: { items: { not: schema } }
+ };
+}
+
+},{"./dotjs/_formatLimit":13,"./dotjs/constant":20,"./dotjs/patternRequired":30,"./dotjs/switch":34,"./refs/json-schema-v5.json":39}],41:[function(require,module,exports){
+(function (global){
+/*! https://mths.be/punycode v1.4.1 by @mathias */
+;(function(root) {
+
+ /** Detect free variables */
+ var freeExports = typeof exports == 'object' && exports &&
+ !exports.nodeType && exports;
+ var freeModule = typeof module == 'object' && module &&
+ !module.nodeType && module;
+ var freeGlobal = typeof global == 'object' && global;
+ if (
+ freeGlobal.global === freeGlobal ||
+ freeGlobal.window === freeGlobal ||
+ freeGlobal.self === freeGlobal
+ ) {
+ root = freeGlobal;
+ }
+
+ /**
+ * The `punycode` object.
+ * @name punycode
+ * @type Object
+ */
+ var punycode,
+
+ /** Highest positive signed 32-bit float value */
+ maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
+
+ /** Bootstring parameters */
+ base = 36,
+ tMin = 1,
+ tMax = 26,
+ skew = 38,
+ damp = 700,
+ initialBias = 72,
+ initialN = 128, // 0x80
+ delimiter = '-', // '\x2D'
+
+ /** Regular expressions */
+ regexPunycode = /^xn--/,
+ regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
+ regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
+
+ /** Error messages */
+ errors = {
+ 'overflow': 'Overflow: input needs wider integers to process',
+ 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
+ 'invalid-input': 'Invalid input'
+ },
+
+ /** Convenience shortcuts */
+ baseMinusTMin = base - tMin,
+ floor = Math.floor,
+ stringFromCharCode = String.fromCharCode,
+
+ /** Temporary variable */
+ key;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * A generic error utility function.
+ * @private
+ * @param {String} type The error type.
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
+ */
+ function error(type) {
+ throw new RangeError(errors[type]);
+ }
+
+ /**
+ * A generic `Array#map` utility function.
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} callback The function that gets called for every array
+ * item.
+ * @returns {Array} A new array of values returned by the callback function.
+ */
+ function map(array, fn) {
+ var length = array.length;
+ var result = [];
+ while (length--) {
+ result[length] = fn(array[length]);
+ }
+ return result;
+ }
+
+ /**
+ * A simple `Array#map`-like wrapper to work with domain name strings or email
+ * addresses.
+ * @private
+ * @param {String} domain The domain name or email address.
+ * @param {Function} callback The function that gets called for every
+ * character.
+ * @returns {Array} A new string of characters returned by the callback
+ * function.
+ */
+ function mapDomain(string, fn) {
+ var parts = string.split('@');
+ var result = '';
+ if (parts.length > 1) {
+ // In email addresses, only the domain name should be punycoded. Leave
+ // the local part (i.e. everything up to `@`) intact.
+ result = parts[0] + '@';
+ string = parts[1];
+ }
+ // Avoid `split(regex)` for IE8 compatibility. See #17.
+ string = string.replace(regexSeparators, '\x2E');
+ var labels = string.split('.');
+ var encoded = map(labels, fn).join('.');
+ return result + encoded;
+ }
+
+ /**
+ * Creates an array containing the numeric code points of each Unicode
+ * character in the string. While JavaScript uses UCS-2 internally,
+ * this function will convert a pair of surrogate halves (each of which
+ * UCS-2 exposes as separate characters) into a single code point,
+ * matching UTF-16.
+ * @see `punycode.ucs2.encode`
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode.ucs2
+ * @name decode
+ * @param {String} string The Unicode input string (UCS-2).
+ * @returns {Array} The new array of code points.
+ */
+ function ucs2decode(string) {
+ var output = [],
+ counter = 0,
+ length = string.length,
+ value,
+ extra;
+ while (counter < length) {
+ value = string.charCodeAt(counter++);
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
+ // high surrogate, and there is a next character
+ extra = string.charCodeAt(counter++);
+ if ((extra & 0xFC00) == 0xDC00) { // low surrogate
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
+ } else {
+ // unmatched surrogate; only append this code unit, in case the next
+ // code unit is the high surrogate of a surrogate pair
+ output.push(value);
+ counter--;
+ }
+ } else {
+ output.push(value);
+ }
+ }
+ return output;
+ }
+
+ /**
+ * Creates a string based on an array of numeric code points.
+ * @see `punycode.ucs2.decode`
+ * @memberOf punycode.ucs2
+ * @name encode
+ * @param {Array} codePoints The array of numeric code points.
+ * @returns {String} The new Unicode string (UCS-2).
+ */
+ function ucs2encode(array) {
+ return map(array, function(value) {
+ var output = '';
+ if (value > 0xFFFF) {
+ value -= 0x10000;
+ output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
+ value = 0xDC00 | value & 0x3FF;
+ }
+ output += stringFromCharCode(value);
+ return output;
+ }).join('');
+ }
+
+ /**
+ * Converts a basic code point into a digit/integer.
+ * @see `digitToBasic()`
+ * @private
+ * @param {Number} codePoint The basic numeric code point value.
+ * @returns {Number} The numeric value of a basic code point (for use in
+ * representing integers) in the range `0` to `base - 1`, or `base` if
+ * the code point does not represent a value.
+ */
+ function basicToDigit(codePoint) {
+ if (codePoint - 48 < 10) {
+ return codePoint - 22;
+ }
+ if (codePoint - 65 < 26) {
+ return codePoint - 65;
+ }
+ if (codePoint - 97 < 26) {
+ return codePoint - 97;
+ }
+ return base;
+ }
+
+ /**
+ * Converts a digit/integer into a basic code point.
+ * @see `basicToDigit()`
+ * @private
+ * @param {Number} digit The numeric value of a basic code point.
+ * @returns {Number} The basic code point whose value (when used for
+ * representing integers) is `digit`, which needs to be in the range
+ * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
+ * used; else, the lowercase form is used. The behavior is undefined
+ * if `flag` is non-zero and `digit` has no uppercase form.
+ */
+ function digitToBasic(digit, flag) {
+ // 0..25 map to ASCII a..z or A..Z
+ // 26..35 map to ASCII 0..9
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
+ }
+
+ /**
+ * Bias adaptation function as per section 3.4 of RFC 3492.
+ * https://tools.ietf.org/html/rfc3492#section-3.4
+ * @private
+ */
+ function adapt(delta, numPoints, firstTime) {
+ var k = 0;
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
+ delta += floor(delta / numPoints);
+ for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
+ delta = floor(delta / baseMinusTMin);
+ }
+ return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
+ }
+
+ /**
+ * Converts a Punycode string of ASCII-only symbols to a string of Unicode
+ * symbols.
+ * @memberOf punycode
+ * @param {String} input The Punycode string of ASCII-only symbols.
+ * @returns {String} The resulting string of Unicode symbols.
+ */
+ function decode(input) {
+ // Don't use UCS-2
+ var output = [],
+ inputLength = input.length,
+ out,
+ i = 0,
+ n = initialN,
+ bias = initialBias,
+ basic,
+ j,
+ index,
+ oldi,
+ w,
+ k,
+ digit,
+ t,
+ /** Cached calculation results */
+ baseMinusT;
+
+ // Handle the basic code points: let `basic` be the number of input code
+ // points before the last delimiter, or `0` if there is none, then copy
+ // the first basic code points to the output.
+
+ basic = input.lastIndexOf(delimiter);
+ if (basic < 0) {
+ basic = 0;
+ }
+
+ for (j = 0; j < basic; ++j) {
+ // if it's not a basic code point
+ if (input.charCodeAt(j) >= 0x80) {
+ error('not-basic');
+ }
+ output.push(input.charCodeAt(j));
+ }
+
+ // Main decoding loop: start just after the last delimiter if any basic code
+ // points were copied; start at the beginning otherwise.
+
+ for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
+
+ // `index` is the index of the next character to be consumed.
+ // Decode a generalized variable-length integer into `delta`,
+ // which gets added to `i`. The overflow checking is easier
+ // if we increase `i` as we go, then subtract off its starting
+ // value at the end to obtain `delta`.
+ for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
+
+ if (index >= inputLength) {
+ error('invalid-input');
+ }
+
+ digit = basicToDigit(input.charCodeAt(index++));
+
+ if (digit >= base || digit > floor((maxInt - i) / w)) {
+ error('overflow');
+ }
+
+ i += digit * w;
+ t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+
+ if (digit < t) {
+ break;
+ }
+
+ baseMinusT = base - t;
+ if (w > floor(maxInt / baseMinusT)) {
+ error('overflow');
+ }
+
+ w *= baseMinusT;
+
+ }
+
+ out = output.length + 1;
+ bias = adapt(i - oldi, out, oldi == 0);
+
+ // `i` was supposed to wrap around from `out` to `0`,
+ // incrementing `n` each time, so we'll fix that now:
+ if (floor(i / out) > maxInt - n) {
+ error('overflow');
+ }
+
+ n += floor(i / out);
+ i %= out;
+
+ // Insert `n` at position `i` of the output
+ output.splice(i++, 0, n);
+
+ }
+
+ return ucs2encode(output);
+ }
+
+ /**
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
+ * Punycode string of ASCII-only symbols.
+ * @memberOf punycode
+ * @param {String} input The string of Unicode symbols.
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
+ */
+ function encode(input) {
+ var n,
+ delta,
+ handledCPCount,
+ basicLength,
+ bias,
+ j,
+ m,
+ q,
+ k,
+ t,
+ currentValue,
+ output = [],
+ /** `inputLength` will hold the number of code points in `input`. */
+ inputLength,
+ /** Cached calculation results */
+ handledCPCountPlusOne,
+ baseMinusT,
+ qMinusT;
+
+ // Convert the input in UCS-2 to Unicode
+ input = ucs2decode(input);
+
+ // Cache the length
+ inputLength = input.length;
+
+ // Initialize the state
+ n = initialN;
+ delta = 0;
+ bias = initialBias;
+
+ // Handle the basic code points
+ for (j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+ if (currentValue < 0x80) {
+ output.push(stringFromCharCode(currentValue));
+ }
+ }
+
+ handledCPCount = basicLength = output.length;
+
+ // `handledCPCount` is the number of code points that have been handled;
+ // `basicLength` is the number of basic code points.
+
+ // Finish the basic string - if it is not empty - with a delimiter
+ if (basicLength) {
+ output.push(delimiter);
+ }
+
+ // Main encoding loop:
+ while (handledCPCount < inputLength) {
+
+ // All non-basic code points < n have been handled already. Find the next
+ // larger one:
+ for (m = maxInt, j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+ if (currentValue >= n && currentValue < m) {
+ m = currentValue;
+ }
+ }
+
+ // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
+ // but guard against overflow
+ handledCPCountPlusOne = handledCPCount + 1;
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+ error('overflow');
+ }
+
+ delta += (m - n) * handledCPCountPlusOne;
+ n = m;
+
+ for (j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+
+ if (currentValue < n && ++delta > maxInt) {
+ error('overflow');
+ }
+
+ if (currentValue == n) {
+ // Represent delta as a generalized variable-length integer
+ for (q = delta, k = base; /* no condition */; k += base) {
+ t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+ if (q < t) {
+ break;
+ }
+ qMinusT = q - t;
+ baseMinusT = base - t;
+ output.push(
+ stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
+ );
+ q = floor(qMinusT / baseMinusT);
+ }
+
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
+ delta = 0;
+ ++handledCPCount;
+ }
+ }
+
+ ++delta;
+ ++n;
+
+ }
+ return output.join('');
+ }
+
+ /**
+ * Converts a Punycode string representing a domain name or an email address
+ * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
+ * it doesn't matter if you call it on a string that has already been
+ * converted to Unicode.
+ * @memberOf punycode
+ * @param {String} input The Punycoded domain name or email address to
+ * convert to Unicode.
+ * @returns {String} The Unicode representation of the given Punycode
+ * string.
+ */
+ function toUnicode(input) {
+ return mapDomain(input, function(string) {
+ return regexPunycode.test(string)
+ ? decode(string.slice(4).toLowerCase())
+ : string;
+ });
+ }
+
+ /**
+ * Converts a Unicode string representing a domain name or an email address to
+ * Punycode. Only the non-ASCII parts of the domain name will be converted,
+ * i.e. it doesn't matter if you call it with a domain that's already in
+ * ASCII.
+ * @memberOf punycode
+ * @param {String} input The domain name or email address to convert, as a
+ * Unicode string.
+ * @returns {String} The Punycode representation of the given domain name or
+ * email address.
+ */
+ function toASCII(input) {
+ return mapDomain(input, function(string) {
+ return regexNonASCII.test(string)
+ ? 'xn--' + encode(string)
+ : string;
+ });
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /** Define the public API */
+ punycode = {
+ /**
+ * A string representing the current Punycode.js version number.
+ * @memberOf punycode
+ * @type String
+ */
+ 'version': '1.4.1',
+ /**
+ * An object of methods to convert from JavaScript's internal character
+ * representation (UCS-2) to Unicode code points, and back.
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode
+ * @type Object
+ */
+ 'ucs2': {
+ 'decode': ucs2decode,
+ 'encode': ucs2encode
+ },
+ 'decode': decode,
+ 'encode': encode,
+ 'toASCII': toASCII,
+ 'toUnicode': toUnicode
+ };
+
+ /** Expose `punycode` */
+ // Some AMD build optimizers, like r.js, check for specific condition patterns
+ // like the following:
+ if (
+ typeof define == 'function' &&
+ typeof define.amd == 'object' &&
+ define.amd
+ ) {
+ define('punycode', function() {
+ return punycode;
+ });
+ } else if (freeExports && freeModule) {
+ if (module.exports == freeExports) {
+ // in Node.js, io.js, or RingoJS v0.8.0+
+ freeModule.exports = punycode;
+ } else {
+ // in Narwhal or RingoJS v0.7.0-
+ for (key in punycode) {
+ punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
+ }
+ }
+ } else {
+ // in Rhino or a web browser
+ root.punycode = punycode;
+ }
+
+}(this));
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],42:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+'use strict';
+
+// If obj.hasOwnProperty has been overridden, then calling
+// obj.hasOwnProperty(prop) will break.
+// See: https://github.com/joyent/node/issues/1707
+function hasOwnProperty(obj, prop) {
+ return Object.prototype.hasOwnProperty.call(obj, prop);
+}
+
+module.exports = function(qs, sep, eq, options) {
+ sep = sep || '&';
+ eq = eq || '=';
+ var obj = {};
+
+ if (typeof qs !== 'string' || qs.length === 0) {
+ return obj;
+ }
+
+ var regexp = /\+/g;
+ qs = qs.split(sep);
+
+ var maxKeys = 1000;
+ if (options && typeof options.maxKeys === 'number') {
+ maxKeys = options.maxKeys;
+ }
+
+ var len = qs.length;
+ // maxKeys <= 0 means that we should not limit keys count
+ if (maxKeys > 0 && len > maxKeys) {
+ len = maxKeys;
+ }
+
+ for (var i = 0; i < len; ++i) {
+ var x = qs[i].replace(regexp, '%20'),
+ idx = x.indexOf(eq),
+ kstr, vstr, k, v;
+
+ if (idx >= 0) {
+ kstr = x.substr(0, idx);
+ vstr = x.substr(idx + 1);
+ } else {
+ kstr = x;
+ vstr = '';
+ }
+
+ k = decodeURIComponent(kstr);
+ v = decodeURIComponent(vstr);
+
+ if (!hasOwnProperty(obj, k)) {
+ obj[k] = v;
+ } else if (isArray(obj[k])) {
+ obj[k].push(v);
+ } else {
+ obj[k] = [obj[k], v];
+ }
+ }
+
+ return obj;
+};
+
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
+
+},{}],43:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+'use strict';
+
+var stringifyPrimitive = function(v) {
+ switch (typeof v) {
+ case 'string':
+ return v;
+
+ case 'boolean':
+ return v ? 'true' : 'false';
+
+ case 'number':
+ return isFinite(v) ? v : '';
+
+ default:
+ return '';
+ }
+};
+
+module.exports = function(obj, sep, eq, name) {
+ sep = sep || '&';
+ eq = eq || '=';
+ if (obj === null) {
+ obj = undefined;
+ }
+
+ if (typeof obj === 'object') {
+ return map(objectKeys(obj), function(k) {
+ var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
+ if (isArray(obj[k])) {
+ return map(obj[k], function(v) {
+ return ks + encodeURIComponent(stringifyPrimitive(v));
+ }).join(sep);
+ } else {
+ return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
+ }
+ }).join(sep);
+
+ }
+
+ if (!name) return '';
+ return encodeURIComponent(stringifyPrimitive(name)) + eq +
+ encodeURIComponent(stringifyPrimitive(obj));
+};
+
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
+
+function map (xs, f) {
+ if (xs.map) return xs.map(f);
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ res.push(f(xs[i], i));
+ }
+ return res;
+}
+
+var objectKeys = Object.keys || function (obj) {
+ var res = [];
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
+ }
+ return res;
+};
+
+},{}],44:[function(require,module,exports){
+'use strict';
+
+exports.decode = exports.parse = require('./decode');
+exports.encode = exports.stringify = require('./encode');
+
+},{"./decode":42,"./encode":43}],45:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+'use strict';
+
+var punycode = require('punycode');
+var util = require('./util');
+
+exports.parse = urlParse;
+exports.resolve = urlResolve;
+exports.resolveObject = urlResolveObject;
+exports.format = urlFormat;
+
+exports.Url = Url;
+
+function Url() {
+ this.protocol = null;
+ this.slashes = null;
+ this.auth = null;
+ this.host = null;
+ this.port = null;
+ this.hostname = null;
+ this.hash = null;
+ this.search = null;
+ this.query = null;
+ this.pathname = null;
+ this.path = null;
+ this.href = null;
+}
+
+// Reference: RFC 3986, RFC 1808, RFC 2396
+
+// define these here so at least they only have to be
+// compiled once on the first module load.
+var protocolPattern = /^([a-z0-9.+-]+:)/i,
+ portPattern = /:[0-9]*$/,
+
+ // Special case for a simple path URL
+ simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
+
+ // RFC 2396: characters reserved for delimiting URLs.
+ // We actually just auto-escape these.
+ delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],
+
+ // RFC 2396: characters not allowed for various reasons.
+ unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims),
+
+ // Allowed by RFCs, but cause of XSS attacks. Always escape these.
+ autoEscape = ['\''].concat(unwise),
+ // Characters that are never ever allowed in a hostname.
+ // Note that any invalid chars are also handled, but these
+ // are the ones that are *expected* to be seen, so we fast-path
+ // them.
+ nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
+ hostEndingChars = ['/', '?', '#'],
+ hostnameMaxLen = 255,
+ hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
+ hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
+ // protocols that can allow "unsafe" and "unwise" chars.
+ unsafeProtocol = {
+ 'javascript': true,
+ 'javascript:': true
+ },
+ // protocols that never have a hostname.
+ hostlessProtocol = {
+ 'javascript': true,
+ 'javascript:': true
+ },
+ // protocols that always contain a // bit.
+ slashedProtocol = {
+ 'http': true,
+ 'https': true,
+ 'ftp': true,
+ 'gopher': true,
+ 'file': true,
+ 'http:': true,
+ 'https:': true,
+ 'ftp:': true,
+ 'gopher:': true,
+ 'file:': true
+ },
+ querystring = require('querystring');
+
+function urlParse(url, parseQueryString, slashesDenoteHost) {
+ if (url && util.isObject(url) && url instanceof Url) return url;
+
+ var u = new Url;
+ u.parse(url, parseQueryString, slashesDenoteHost);
+ return u;
+}
+
+Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
+ if (!util.isString(url)) {
+ throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
+ }
+
+ // Copy chrome, IE, opera backslash-handling behavior.
+ // Back slashes before the query string get converted to forward slashes
+ // See: https://code.google.com/p/chromium/issues/detail?id=25916
+ var queryIndex = url.indexOf('?'),
+ splitter =
+ (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',
+ uSplit = url.split(splitter),
+ slashRegex = /\\/g;
+ uSplit[0] = uSplit[0].replace(slashRegex, '/');
+ url = uSplit.join(splitter);
+
+ var rest = url;
+
+ // trim before proceeding.
+ // This is to support parse stuff like " http://foo.com \n"
+ rest = rest.trim();
+
+ if (!slashesDenoteHost && url.split('#').length === 1) {
+ // Try fast path regexp
+ var simplePath = simplePathPattern.exec(rest);
+ if (simplePath) {
+ this.path = rest;
+ this.href = rest;
+ this.pathname = simplePath[1];
+ if (simplePath[2]) {
+ this.search = simplePath[2];
+ if (parseQueryString) {
+ this.query = querystring.parse(this.search.substr(1));
+ } else {
+ this.query = this.search.substr(1);
+ }
+ } else if (parseQueryString) {
+ this.search = '';
+ this.query = {};
+ }
+ return this;
+ }
+ }
+
+ var proto = protocolPattern.exec(rest);
+ if (proto) {
+ proto = proto[0];
+ var lowerProto = proto.toLowerCase();
+ this.protocol = lowerProto;
+ rest = rest.substr(proto.length);
+ }
+
+ // figure out if it's got a host
+ // user@server is *always* interpreted as a hostname, and url
+ // resolution will treat //foo/bar as host=foo,path=bar because that's
+ // how the browser resolves relative URLs.
+ if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
+ var slashes = rest.substr(0, 2) === '//';
+ if (slashes && !(proto && hostlessProtocol[proto])) {
+ rest = rest.substr(2);
+ this.slashes = true;
+ }
+ }
+
+ if (!hostlessProtocol[proto] &&
+ (slashes || (proto && !slashedProtocol[proto]))) {
+
+ // there's a hostname.
+ // the first instance of /, ?, ;, or # ends the host.
+ //
+ // If there is an @ in the hostname, then non-host chars *are* allowed
+ // to the left of the last @ sign, unless some host-ending character
+ // comes *before* the @-sign.
+ // URLs are obnoxious.
+ //
+ // ex:
+ // http://a@b@c/ => user:a@b host:c
+ // http://a@b?@c => user:a host:c path:/?@c
+
+ // v0.12 TODO(isaacs): This is not quite how Chrome does things.
+ // Review our test case against browsers more comprehensively.
+
+ // find the first instance of any hostEndingChars
+ var hostEnd = -1;
+ for (var i = 0; i < hostEndingChars.length; i++) {
+ var hec = rest.indexOf(hostEndingChars[i]);
+ if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
+ hostEnd = hec;
+ }
+
+ // at this point, either we have an explicit point where the
+ // auth portion cannot go past, or the last @ char is the decider.
+ var auth, atSign;
+ if (hostEnd === -1) {
+ // atSign can be anywhere.
+ atSign = rest.lastIndexOf('@');
+ } else {
+ // atSign must be in auth portion.
+ // http://a@b/c@d => host:b auth:a path:/c@d
+ atSign = rest.lastIndexOf('@', hostEnd);
+ }
+
+ // Now we have a portion which is definitely the auth.
+ // Pull that off.
+ if (atSign !== -1) {
+ auth = rest.slice(0, atSign);
+ rest = rest.slice(atSign + 1);
+ this.auth = decodeURIComponent(auth);
+ }
+
+ // the host is the remaining to the left of the first non-host char
+ hostEnd = -1;
+ for (var i = 0; i < nonHostChars.length; i++) {
+ var hec = rest.indexOf(nonHostChars[i]);
+ if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
+ hostEnd = hec;
+ }
+ // if we still have not hit it, then the entire thing is a host.
+ if (hostEnd === -1)
+ hostEnd = rest.length;
+
+ this.host = rest.slice(0, hostEnd);
+ rest = rest.slice(hostEnd);
+
+ // pull out port.
+ this.parseHost();
+
+ // we've indicated that there is a hostname,
+ // so even if it's empty, it has to be present.
+ this.hostname = this.hostname || '';
+
+ // if hostname begins with [ and ends with ]
+ // assume that it's an IPv6 address.
+ var ipv6Hostname = this.hostname[0] === '[' &&
+ this.hostname[this.hostname.length - 1] === ']';
+
+ // validate a little.
+ if (!ipv6Hostname) {
+ var hostparts = this.hostname.split(/\./);
+ for (var i = 0, l = hostparts.length; i < l; i++) {
+ var part = hostparts[i];
+ if (!part) continue;
+ if (!part.match(hostnamePartPattern)) {
+ var newpart = '';
+ for (var j = 0, k = part.length; j < k; j++) {
+ if (part.charCodeAt(j) > 127) {
+ // we replace non-ASCII char with a temporary placeholder
+ // we need this to make sure size of hostname is not
+ // broken by replacing non-ASCII by nothing
+ newpart += 'x';
+ } else {
+ newpart += part[j];
+ }
+ }
+ // we test again with ASCII char only
+ if (!newpart.match(hostnamePartPattern)) {
+ var validParts = hostparts.slice(0, i);
+ var notHost = hostparts.slice(i + 1);
+ var bit = part.match(hostnamePartStart);
+ if (bit) {
+ validParts.push(bit[1]);
+ notHost.unshift(bit[2]);
+ }
+ if (notHost.length) {
+ rest = '/' + notHost.join('.') + rest;
+ }
+ this.hostname = validParts.join('.');
+ break;
+ }
+ }
+ }
+ }
+
+ if (this.hostname.length > hostnameMaxLen) {
+ this.hostname = '';
+ } else {
+ // hostnames are always lower case.
+ this.hostname = this.hostname.toLowerCase();
+ }
+
+ if (!ipv6Hostname) {
+ // IDNA Support: Returns a punycoded representation of "domain".
+ // It only converts parts of the domain name that
+ // have non-ASCII characters, i.e. it doesn't matter if
+ // you call it with a domain that already is ASCII-only.
+ this.hostname = punycode.toASCII(this.hostname);
+ }
+
+ var p = this.port ? ':' + this.port : '';
+ var h = this.hostname || '';
+ this.host = h + p;
+ this.href += this.host;
+
+ // strip [ and ] from the hostname
+ // the host field still retains them, though
+ if (ipv6Hostname) {
+ this.hostname = this.hostname.substr(1, this.hostname.length - 2);
+ if (rest[0] !== '/') {
+ rest = '/' + rest;
+ }
+ }
+ }
+
+ // now rest is set to the post-host stuff.
+ // chop off any delim chars.
+ if (!unsafeProtocol[lowerProto]) {
+
+ // First, make 100% sure that any "autoEscape" chars get
+ // escaped, even if encodeURIComponent doesn't think they
+ // need to be.
+ for (var i = 0, l = autoEscape.length; i < l; i++) {
+ var ae = autoEscape[i];
+ if (rest.indexOf(ae) === -1)
+ continue;
+ var esc = encodeURIComponent(ae);
+ if (esc === ae) {
+ esc = escape(ae);
+ }
+ rest = rest.split(ae).join(esc);
+ }
+ }
+
+
+ // chop off from the tail first.
+ var hash = rest.indexOf('#');
+ if (hash !== -1) {
+ // got a fragment string.
+ this.hash = rest.substr(hash);
+ rest = rest.slice(0, hash);
+ }
+ var qm = rest.indexOf('?');
+ if (qm !== -1) {
+ this.search = rest.substr(qm);
+ this.query = rest.substr(qm + 1);
+ if (parseQueryString) {
+ this.query = querystring.parse(this.query);
+ }
+ rest = rest.slice(0, qm);
+ } else if (parseQueryString) {
+ // no query string, but parseQueryString still requested
+ this.search = '';
+ this.query = {};
+ }
+ if (rest) this.pathname = rest;
+ if (slashedProtocol[lowerProto] &&
+ this.hostname && !this.pathname) {
+ this.pathname = '/';
+ }
+
+ //to support http.request
+ if (this.pathname || this.search) {
+ var p = this.pathname || '';
+ var s = this.search || '';
+ this.path = p + s;
+ }
+
+ // finally, reconstruct the href based on what has been validated.
+ this.href = this.format();
+ return this;
+};
+
+// format a parsed object into a url string
+function urlFormat(obj) {
+ // ensure it's an object, and not a string url.
+ // If it's an obj, this is a no-op.
+ // this way, you can call url_format() on strings
+ // to clean up potentially wonky urls.
+ if (util.isString(obj)) obj = urlParse(obj);
+ if (!(obj instanceof Url)) return Url.prototype.format.call(obj);
+ return obj.format();
+}
+
+Url.prototype.format = function() {
+ var auth = this.auth || '';
+ if (auth) {
+ auth = encodeURIComponent(auth);
+ auth = auth.replace(/%3A/i, ':');
+ auth += '@';
+ }
+
+ var protocol = this.protocol || '',
+ pathname = this.pathname || '',
+ hash = this.hash || '',
+ host = false,
+ query = '';
+
+ if (this.host) {
+ host = auth + this.host;
+ } else if (this.hostname) {
+ host = auth + (this.hostname.indexOf(':') === -1 ?
+ this.hostname :
+ '[' + this.hostname + ']');
+ if (this.port) {
+ host += ':' + this.port;
+ }
+ }
+
+ if (this.query &&
+ util.isObject(this.query) &&
+ Object.keys(this.query).length) {
+ query = querystring.stringify(this.query);
+ }
+
+ var search = this.search || (query && ('?' + query)) || '';
+
+ if (protocol && protocol.substr(-1) !== ':') protocol += ':';
+
+ // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
+ // unless they had them to begin with.
+ if (this.slashes ||
+ (!protocol || slashedProtocol[protocol]) && host !== false) {
+ host = '//' + (host || '');
+ if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;
+ } else if (!host) {
+ host = '';
+ }
+
+ if (hash && hash.charAt(0) !== '#') hash = '#' + hash;
+ if (search && search.charAt(0) !== '?') search = '?' + search;
+
+ pathname = pathname.replace(/[?#]/g, function(match) {
+ return encodeURIComponent(match);
+ });
+ search = search.replace('#', '%23');
+
+ return protocol + host + pathname + search + hash;
+};
+
+function urlResolve(source, relative) {
+ return urlParse(source, false, true).resolve(relative);
+}
+
+Url.prototype.resolve = function(relative) {
+ return this.resolveObject(urlParse(relative, false, true)).format();
+};
+
+function urlResolveObject(source, relative) {
+ if (!source) return relative;
+ return urlParse(source, false, true).resolveObject(relative);
+}
+
+Url.prototype.resolveObject = function(relative) {
+ if (util.isString(relative)) {
+ var rel = new Url();
+ rel.parse(relative, false, true);
+ relative = rel;
+ }
+
+ var result = new Url();
+ var tkeys = Object.keys(this);
+ for (var tk = 0; tk < tkeys.length; tk++) {
+ var tkey = tkeys[tk];
+ result[tkey] = this[tkey];
+ }
+
+ // hash is always overridden, no matter what.
+ // even href="" will remove it.
+ result.hash = relative.hash;
+
+ // if the relative url is empty, then there's nothing left to do here.
+ if (relative.href === '') {
+ result.href = result.format();
+ return result;
+ }
+
+ // hrefs like //foo/bar always cut to the protocol.
+ if (relative.slashes && !relative.protocol) {
+ // take everything except the protocol from relative
+ var rkeys = Object.keys(relative);
+ for (var rk = 0; rk < rkeys.length; rk++) {
+ var rkey = rkeys[rk];
+ if (rkey !== 'protocol')
+ result[rkey] = relative[rkey];
+ }
+
+ //urlParse appends trailing / to urls like http://www.example.com
+ if (slashedProtocol[result.protocol] &&
+ result.hostname && !result.pathname) {
+ result.path = result.pathname = '/';
+ }
+
+ result.href = result.format();
+ return result;
+ }
+
+ if (relative.protocol && relative.protocol !== result.protocol) {
+ // if it's a known url protocol, then changing
+ // the protocol does weird things
+ // first, if it's not file:, then we MUST have a host,
+ // and if there was a path
+ // to begin with, then we MUST have a path.
+ // if it is file:, then the host is dropped,
+ // because that's known to be hostless.
+ // anything else is assumed to be absolute.
+ if (!slashedProtocol[relative.protocol]) {
+ var keys = Object.keys(relative);
+ for (var v = 0; v < keys.length; v++) {
+ var k = keys[v];
+ result[k] = relative[k];
+ }
+ result.href = result.format();
+ return result;
+ }
+
+ result.protocol = relative.protocol;
+ if (!relative.host && !hostlessProtocol[relative.protocol]) {
+ var relPath = (relative.pathname || '').split('/');
+ while (relPath.length && !(relative.host = relPath.shift()));
+ if (!relative.host) relative.host = '';
+ if (!relative.hostname) relative.hostname = '';
+ if (relPath[0] !== '') relPath.unshift('');
+ if (relPath.length < 2) relPath.unshift('');
+ result.pathname = relPath.join('/');
+ } else {
+ result.pathname = relative.pathname;
+ }
+ result.search = relative.search;
+ result.query = relative.query;
+ result.host = relative.host || '';
+ result.auth = relative.auth;
+ result.hostname = relative.hostname || relative.host;
+ result.port = relative.port;
+ // to support http.request
+ if (result.pathname || result.search) {
+ var p = result.pathname || '';
+ var s = result.search || '';
+ result.path = p + s;
+ }
+ result.slashes = result.slashes || relative.slashes;
+ result.href = result.format();
+ return result;
+ }
+
+ var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),
+ isRelAbs = (
+ relative.host ||
+ relative.pathname && relative.pathname.charAt(0) === '/'
+ ),
+ mustEndAbs = (isRelAbs || isSourceAbs ||
+ (result.host && relative.pathname)),
+ removeAllDots = mustEndAbs,
+ srcPath = result.pathname && result.pathname.split('/') || [],
+ relPath = relative.pathname && relative.pathname.split('/') || [],
+ psychotic = result.protocol && !slashedProtocol[result.protocol];
+
+ // if the url is a non-slashed url, then relative
+ // links like ../.. should be able
+ // to crawl up to the hostname, as well. This is strange.
+ // result.protocol has already been set by now.
+ // Later on, put the first path part into the host field.
+ if (psychotic) {
+ result.hostname = '';
+ result.port = null;
+ if (result.host) {
+ if (srcPath[0] === '') srcPath[0] = result.host;
+ else srcPath.unshift(result.host);
+ }
+ result.host = '';
+ if (relative.protocol) {
+ relative.hostname = null;
+ relative.port = null;
+ if (relative.host) {
+ if (relPath[0] === '') relPath[0] = relative.host;
+ else relPath.unshift(relative.host);
+ }
+ relative.host = null;
+ }
+ mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
+ }
+
+ if (isRelAbs) {
+ // it's absolute.
+ result.host = (relative.host || relative.host === '') ?
+ relative.host : result.host;
+ result.hostname = (relative.hostname || relative.hostname === '') ?
+ relative.hostname : result.hostname;
+ result.search = relative.search;
+ result.query = relative.query;
+ srcPath = relPath;
+ // fall through to the dot-handling below.
+ } else if (relPath.length) {
+ // it's relative
+ // throw away the existing file, and take the new path instead.
+ if (!srcPath) srcPath = [];
+ srcPath.pop();
+ srcPath = srcPath.concat(relPath);
+ result.search = relative.search;
+ result.query = relative.query;
+ } else if (!util.isNullOrUndefined(relative.search)) {
+ // just pull out the search.
+ // like href='?foo'.
+ // Put this after the other two cases because it simplifies the booleans
+ if (psychotic) {
+ result.hostname = result.host = srcPath.shift();
+ //occationaly the auth can get stuck only in host
+ //this especially happens in cases like
+ //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
+ var authInHost = result.host && result.host.indexOf('@') > 0 ?
+ result.host.split('@') : false;
+ if (authInHost) {
+ result.auth = authInHost.shift();
+ result.host = result.hostname = authInHost.shift();
+ }
+ }
+ result.search = relative.search;
+ result.query = relative.query;
+ //to support http.request
+ if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
+ result.path = (result.pathname ? result.pathname : '') +
+ (result.search ? result.search : '');
+ }
+ result.href = result.format();
+ return result;
+ }
+
+ if (!srcPath.length) {
+ // no path at all. easy.
+ // we've already handled the other stuff above.
+ result.pathname = null;
+ //to support http.request
+ if (result.search) {
+ result.path = '/' + result.search;
+ } else {
+ result.path = null;
+ }
+ result.href = result.format();
+ return result;
+ }
+
+ // if a url ENDs in . or .., then it must get a trailing slash.
+ // however, if it ends in anything else non-slashy,
+ // then it must NOT get a trailing slash.
+ var last = srcPath.slice(-1)[0];
+ var hasTrailingSlash = (
+ (result.host || relative.host || srcPath.length > 1) &&
+ (last === '.' || last === '..') || last === '');
+
+ // strip single dots, resolve double dots to parent dir
+ // if the path tries to go above the root, `up` ends up > 0
+ var up = 0;
+ for (var i = srcPath.length; i >= 0; i--) {
+ last = srcPath[i];
+ if (last === '.') {
+ srcPath.splice(i, 1);
+ } else if (last === '..') {
+ srcPath.splice(i, 1);
+ up++;
+ } else if (up) {
+ srcPath.splice(i, 1);
+ up--;
+ }
+ }
+
+ // if the path is allowed to go above the root, restore leading ..s
+ if (!mustEndAbs && !removeAllDots) {
+ for (; up--; up) {
+ srcPath.unshift('..');
+ }
+ }
+
+ if (mustEndAbs && srcPath[0] !== '' &&
+ (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
+ srcPath.unshift('');
+ }
+
+ if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
+ srcPath.push('');
+ }
+
+ var isAbsolute = srcPath[0] === '' ||
+ (srcPath[0] && srcPath[0].charAt(0) === '/');
+
+ // put the host back
+ if (psychotic) {
+ result.hostname = result.host = isAbsolute ? '' :
+ srcPath.length ? srcPath.shift() : '';
+ //occationaly the auth can get stuck only in host
+ //this especially happens in cases like
+ //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
+ var authInHost = result.host && result.host.indexOf('@') > 0 ?
+ result.host.split('@') : false;
+ if (authInHost) {
+ result.auth = authInHost.shift();
+ result.host = result.hostname = authInHost.shift();
+ }
+ }
+
+ mustEndAbs = mustEndAbs || (result.host && srcPath.length);
+
+ if (mustEndAbs && !isAbsolute) {
+ srcPath.unshift('');
+ }
+
+ if (!srcPath.length) {
+ result.pathname = null;
+ result.path = null;
+ } else {
+ result.pathname = srcPath.join('/');
+ }
+
+ //to support request.http
+ if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
+ result.path = (result.pathname ? result.pathname : '') +
+ (result.search ? result.search : '');
+ }
+ result.auth = relative.auth || result.auth;
+ result.slashes = result.slashes || relative.slashes;
+ result.href = result.format();
+ return result;
+};
+
+Url.prototype.parseHost = function() {
+ var host = this.host;
+ var port = portPattern.exec(host);
+ if (port) {
+ port = port[0];
+ if (port !== ':') {
+ this.port = port.substr(1);
+ }
+ host = host.substr(0, host.length - port.length);
+ }
+ if (host) this.hostname = host;
+};
+
+},{"./util":46,"punycode":41,"querystring":44}],46:[function(require,module,exports){
+'use strict';
+
+module.exports = {
+ isString: function(arg) {
+ return typeof(arg) === 'string';
+ },
+ isObject: function(arg) {
+ return typeof(arg) === 'object' && arg !== null;
+ },
+ isNull: function(arg) {
+ return arg === null;
+ },
+ isNullOrUndefined: function(arg) {
+ return arg == null;
+ }
+};
+
+},{}],47:[function(require,module,exports){
+
+/**
+ * slice() reference.
+ */
+
+var slice = Array.prototype.slice;
+
+/**
+ * Expose `co`.
+ */
+
+module.exports = co['default'] = co.co = co;
+
+/**
+ * Wrap the given generator `fn` into a
+ * function that returns a promise.
+ * This is a separate function so that
+ * every `co()` call doesn't create a new,
+ * unnecessary closure.
+ *
+ * @param {GeneratorFunction} fn
+ * @return {Function}
+ * @api public
+ */
+
+co.wrap = function (fn) {
+ createPromise.__generatorFunction__ = fn;
+ return createPromise;
+ function createPromise() {
+ return co.call(this, fn.apply(this, arguments));
+ }
+};
+
+/**
+ * Execute the generator function or a generator
+ * and return a promise.
+ *
+ * @param {Function} fn
+ * @return {Promise}
+ * @api public
+ */
+
+function co(gen) {
+ var ctx = this;
+ var args = slice.call(arguments, 1)
+
+ // we wrap everything in a promise to avoid promise chaining,
+ // which leads to memory leak errors.
+ // see https://github.com/tj/co/issues/180
+ return new Promise(function(resolve, reject) {
+ if (typeof gen === 'function') gen = gen.apply(ctx, args);
+ if (!gen || typeof gen.next !== 'function') return resolve(gen);
+
+ onFulfilled();
+
+ /**
+ * @param {Mixed} res
+ * @return {Promise}
+ * @api private
+ */
+
+ function onFulfilled(res) {
+ var ret;
+ try {
+ ret = gen.next(res);
+ } catch (e) {
+ return reject(e);
+ }
+ next(ret);
+ }
+
+ /**
+ * @param {Error} err
+ * @return {Promise}
+ * @api private
+ */
+
+ function onRejected(err) {
+ var ret;
+ try {
+ ret = gen.throw(err);
+ } catch (e) {
+ return reject(e);
+ }
+ next(ret);
+ }
+
+ /**
+ * Get the next value in the generator,
+ * return a promise.
+ *
+ * @param {Object} ret
+ * @return {Promise}
+ * @api private
+ */
+
+ function next(ret) {
+ if (ret.done) return resolve(ret.value);
+ var value = toPromise.call(ctx, ret.value);
+ if (value && isPromise(value)) return value.then(onFulfilled, onRejected);
+ return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, '
+ + 'but the following object was passed: "' + String(ret.value) + '"'));
+ }
+ });
+}
+
+/**
+ * Convert a `yield`ed value into a promise.
+ *
+ * @param {Mixed} obj
+ * @return {Promise}
+ * @api private
+ */
+
+function toPromise(obj) {
+ if (!obj) return obj;
+ if (isPromise(obj)) return obj;
+ if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj);
+ if ('function' == typeof obj) return thunkToPromise.call(this, obj);
+ if (Array.isArray(obj)) return arrayToPromise.call(this, obj);
+ if (isObject(obj)) return objectToPromise.call(this, obj);
+ return obj;
+}
+
+/**
+ * Convert a thunk to a promise.
+ *
+ * @param {Function}
+ * @return {Promise}
+ * @api private
+ */
+
+function thunkToPromise(fn) {
+ var ctx = this;
+ return new Promise(function (resolve, reject) {
+ fn.call(ctx, function (err, res) {
+ if (err) return reject(err);
+ if (arguments.length > 2) res = slice.call(arguments, 1);
+ resolve(res);
+ });
+ });
+}
+
+/**
+ * Convert an array of "yieldables" to a promise.
+ * Uses `Promise.all()` internally.
+ *
+ * @param {Array} obj
+ * @return {Promise}
+ * @api private
+ */
+
+function arrayToPromise(obj) {
+ return Promise.all(obj.map(toPromise, this));
+}
+
+/**
+ * Convert an object of "yieldables" to a promise.
+ * Uses `Promise.all()` internally.
+ *
+ * @param {Object} obj
+ * @return {Promise}
+ * @api private
+ */
+
+function objectToPromise(obj){
+ var results = new obj.constructor();
+ var keys = Object.keys(obj);
+ var promises = [];
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var promise = toPromise.call(this, obj[key]);
+ if (promise && isPromise(promise)) defer(promise, key);
+ else results[key] = obj[key];
+ }
+ return Promise.all(promises).then(function () {
+ return results;
+ });
+
+ function defer(promise, key) {
+ // predefine the key in the result
+ results[key] = undefined;
+ promises.push(promise.then(function (res) {
+ results[key] = res;
+ }));
+ }
+}
+
+/**
+ * Check if `obj` is a promise.
+ *
+ * @param {Object} obj
+ * @return {Boolean}
+ * @api private
+ */
+
+function isPromise(obj) {
+ return 'function' == typeof obj.then;
+}
+
+/**
+ * Check if `obj` is a generator.
+ *
+ * @param {Mixed} obj
+ * @return {Boolean}
+ * @api private
+ */
+
+function isGenerator(obj) {
+ return 'function' == typeof obj.next && 'function' == typeof obj.throw;
+}
+
+/**
+ * Check if `obj` is a generator function.
+ *
+ * @param {Mixed} obj
+ * @return {Boolean}
+ * @api private
+ */
+function isGeneratorFunction(obj) {
+ var constructor = obj.constructor;
+ if (!constructor) return false;
+ if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true;
+ return isGenerator(constructor.prototype);
+}
+
+/**
+ * Check for plain object.
+ *
+ * @param {Mixed} val
+ * @return {Boolean}
+ * @api private
+ */
+
+function isObject(val) {
+ return Object == val.constructor;
+}
+
+},{}],48:[function(require,module,exports){
+var json = typeof JSON !== 'undefined' ? JSON : require('jsonify');
+
+module.exports = function (obj, opts) {
+ if (!opts) opts = {};
+ if (typeof opts === 'function') opts = { cmp: opts };
+ var space = opts.space || '';
+ if (typeof space === 'number') space = Array(space+1).join(' ');
+ var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;
+ var replacer = opts.replacer || function(key, value) { return value; };
+
+ var cmp = opts.cmp && (function (f) {
+ return function (node) {
+ return function (a, b) {
+ var aobj = { key: a, value: node[a] };
+ var bobj = { key: b, value: node[b] };
+ return f(aobj, bobj);
+ };
+ };
+ })(opts.cmp);
+
+ var seen = [];
+ return (function stringify (parent, key, node, level) {
+ var indent = space ? ('\n' + new Array(level + 1).join(space)) : '';
+ var colonSeparator = space ? ': ' : ':';
+
+ if (node && node.toJSON && typeof node.toJSON === 'function') {
+ node = node.toJSON();
+ }
+
+ node = replacer.call(parent, key, node);
+
+ if (node === undefined) {
+ return;
+ }
+ if (typeof node !== 'object' || node === null) {
+ return json.stringify(node);
+ }
+ if (isArray(node)) {
+ var out = [];
+ for (var i = 0; i < node.length; i++) {
+ var item = stringify(node, i, node[i], level+1) || json.stringify(null);
+ out.push(indent + space + item);
+ }
+ return '[' + out.join(',') + indent + ']';
+ }
+ else {
+ if (seen.indexOf(node) !== -1) {
+ if (cycles) return json.stringify('__cycle__');
+ throw new TypeError('Converting circular structure to JSON');
+ }
+ else seen.push(node);
+
+ var keys = objectKeys(node).sort(cmp && cmp(node));
+ var out = [];
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var value = stringify(node, key, node[key], level+1);
+
+ if(!value) continue;
+
+ var keyValue = json.stringify(key)
+ + colonSeparator
+ + value;
+ ;
+ out.push(indent + space + keyValue);
+ }
+ seen.splice(seen.indexOf(node), 1);
+ return '{' + out.join(',') + indent + '}';
+ }
+ })({ '': obj }, '', obj, 0);
+};
+
+var isArray = Array.isArray || function (x) {
+ return {}.toString.call(x) === '[object Array]';
+};
+
+var objectKeys = Object.keys || function (obj) {
+ var has = Object.prototype.hasOwnProperty || function () { return true };
+ var keys = [];
+ for (var key in obj) {
+ if (has.call(obj, key)) keys.push(key);
+ }
+ return keys;
+};
+
+},{"jsonify":49}],49:[function(require,module,exports){
+exports.parse = require('./lib/parse');
+exports.stringify = require('./lib/stringify');
+
+},{"./lib/parse":50,"./lib/stringify":51}],50:[function(require,module,exports){
+var at, // The index of the current character
+ ch, // The current character
+ escapee = {
+ '"': '"',
+ '\\': '\\',
+ '/': '/',
+ b: '\b',
+ f: '\f',
+ n: '\n',
+ r: '\r',
+ t: '\t'
+ },
+ text,
+
+ error = function (m) {
+ // Call error when something is wrong.
+ throw {
+ name: 'SyntaxError',
+ message: m,
+ at: at,
+ text: text
+ };
+ },
+
+ next = function (c) {
+ // If a c parameter is provided, verify that it matches the current character.
+ if (c && c !== ch) {
+ error("Expected '" + c + "' instead of '" + ch + "'");
+ }
+
+ // Get the next character. When there are no more characters,
+ // return the empty string.
+
+ ch = text.charAt(at);
+ at += 1;
+ return ch;
+ },
+
+ number = function () {
+ // Parse a number value.
+ var number,
+ string = '';
+
+ if (ch === '-') {
+ string = '-';
+ next('-');
+ }
+ while (ch >= '0' && ch <= '9') {
+ string += ch;
+ next();
+ }
+ if (ch === '.') {
+ string += '.';
+ while (next() && ch >= '0' && ch <= '9') {
+ string += ch;
+ }
+ }
+ if (ch === 'e' || ch === 'E') {
+ string += ch;
+ next();
+ if (ch === '-' || ch === '+') {
+ string += ch;
+ next();
+ }
+ while (ch >= '0' && ch <= '9') {
+ string += ch;
+ next();
+ }
+ }
+ number = +string;
+ if (!isFinite(number)) {
+ error("Bad number");
+ } else {
+ return number;
+ }
+ },
+
+ string = function () {
+ // Parse a string value.
+ var hex,
+ i,
+ string = '',
+ uffff;
+
+ // When parsing for string values, we must look for " and \ characters.
+ if (ch === '"') {
+ while (next()) {
+ if (ch === '"') {
+ next();
+ return string;
+ } else if (ch === '\\') {
+ next();
+ if (ch === 'u') {
+ uffff = 0;
+ for (i = 0; i < 4; i += 1) {
+ hex = parseInt(next(), 16);
+ if (!isFinite(hex)) {
+ break;
+ }
+ uffff = uffff * 16 + hex;
+ }
+ string += String.fromCharCode(uffff);
+ } else if (typeof escapee[ch] === 'string') {
+ string += escapee[ch];
+ } else {
+ break;
+ }
+ } else {
+ string += ch;
+ }
+ }
+ }
+ error("Bad string");
+ },
+
+ white = function () {
+
+// Skip whitespace.
+
+ while (ch && ch <= ' ') {
+ next();
+ }
+ },
+
+ word = function () {
+
+// true, false, or null.
+
+ switch (ch) {
+ case 't':
+ next('t');
+ next('r');
+ next('u');
+ next('e');
+ return true;
+ case 'f':
+ next('f');
+ next('a');
+ next('l');
+ next('s');
+ next('e');
+ return false;
+ case 'n':
+ next('n');
+ next('u');
+ next('l');
+ next('l');
+ return null;
+ }
+ error("Unexpected '" + ch + "'");
+ },
+
+ value, // Place holder for the value function.
+
+ array = function () {
+
+// Parse an array value.
+
+ var array = [];
+
+ if (ch === '[') {
+ next('[');
+ white();
+ if (ch === ']') {
+ next(']');
+ return array; // empty array
+ }
+ while (ch) {
+ array.push(value());
+ white();
+ if (ch === ']') {
+ next(']');
+ return array;
+ }
+ next(',');
+ white();
+ }
+ }
+ error("Bad array");
+ },
+
+ object = function () {
+
+// Parse an object value.
+
+ var key,
+ object = {};
+
+ if (ch === '{') {
+ next('{');
+ white();
+ if (ch === '}') {
+ next('}');
+ return object; // empty object
+ }
+ while (ch) {
+ key = string();
+ white();
+ next(':');
+ if (Object.hasOwnProperty.call(object, key)) {
+ error('Duplicate key "' + key + '"');
+ }
+ object[key] = value();
+ white();
+ if (ch === '}') {
+ next('}');
+ return object;
+ }
+ next(',');
+ white();
+ }
+ }
+ error("Bad object");
+ };
+
+value = function () {
+
+// Parse a JSON value. It could be an object, an array, a string, a number,
+// or a word.
+
+ white();
+ switch (ch) {
+ case '{':
+ return object();
+ case '[':
+ return array();
+ case '"':
+ return string();
+ case '-':
+ return number();
+ default:
+ return ch >= '0' && ch <= '9' ? number() : word();
+ }
+};
+
+// Return the json_parse function. It will have access to all of the above
+// functions and variables.
+
+module.exports = function (source, reviver) {
+ var result;
+
+ text = source;
+ at = 0;
+ ch = ' ';
+ result = value();
+ white();
+ if (ch) {
+ error("Syntax error");
+ }
+
+ // If there is a reviver function, we recursively walk the new structure,
+ // passing each name/value pair to the reviver function for possible
+ // transformation, starting with a temporary root object that holds the result
+ // in an empty key. If there is not a reviver function, we simply return the
+ // result.
+
+ return typeof reviver === 'function' ? (function walk(holder, key) {
+ var k, v, value = holder[key];
+ if (value && typeof value === 'object') {
+ for (k in value) {
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
+ v = walk(value, k);
+ if (v !== undefined) {
+ value[k] = v;
+ } else {
+ delete value[k];
+ }
+ }
+ }
+ }
+ return reviver.call(holder, key, value);
+ }({'': result}, '')) : result;
+};
+
+},{}],51:[function(require,module,exports){
+var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ gap,
+ indent,
+ meta = { // table of character substitutions
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"' : '\\"',
+ '\\': '\\\\'
+ },
+ rep;
+
+function quote(string) {
+ // If the string contains no control characters, no quote characters, and no
+ // backslash characters, then we can safely slap some quotes around it.
+ // Otherwise we must also replace the offending characters with safe escape
+ // sequences.
+
+ escapable.lastIndex = 0;
+ return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
+ var c = meta[a];
+ return typeof c === 'string' ? c :
+ '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ }) + '"' : '"' + string + '"';
+}
+
+function str(key, holder) {
+ // Produce a string from holder[key].
+ var i, // The loop counter.
+ k, // The member key.
+ v, // The member value.
+ length,
+ mind = gap,
+ partial,
+ value = holder[key];
+
+ // If the value has a toJSON method, call it to obtain a replacement value.
+ if (value && typeof value === 'object' &&
+ typeof value.toJSON === 'function') {
+ value = value.toJSON(key);
+ }
+
+ // If we were called with a replacer function, then call the replacer to
+ // obtain a replacement value.
+ if (typeof rep === 'function') {
+ value = rep.call(holder, key, value);
+ }
+
+ // What happens next depends on the value's type.
+ switch (typeof value) {
+ case 'string':
+ return quote(value);
+
+ case 'number':
+ // JSON numbers must be finite. Encode non-finite numbers as null.
+ return isFinite(value) ? String(value) : 'null';
+
+ case 'boolean':
+ case 'null':
+ // If the value is a boolean or null, convert it to a string. Note:
+ // typeof null does not produce 'null'. The case is included here in
+ // the remote chance that this gets fixed someday.
+ return String(value);
+
+ case 'object':
+ if (!value) return 'null';
+ gap += indent;
+ partial = [];
+
+ // Array.isArray
+ if (Object.prototype.toString.apply(value) === '[object Array]') {
+ length = value.length;
+ for (i = 0; i < length; i += 1) {
+ partial[i] = str(i, value) || 'null';
+ }
+
+ // Join all of the elements together, separated with commas, and
+ // wrap them in brackets.
+ v = partial.length === 0 ? '[]' : gap ?
+ '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' :
+ '[' + partial.join(',') + ']';
+ gap = mind;
+ return v;
+ }
+
+ // If the replacer is an array, use it to select the members to be
+ // stringified.
+ if (rep && typeof rep === 'object') {
+ length = rep.length;
+ for (i = 0; i < length; i += 1) {
+ k = rep[i];
+ if (typeof k === 'string') {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ }
+ else {
+ // Otherwise, iterate through all of the keys in the object.
+ for (k in value) {
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ }
+
+ // Join all of the member texts together, separated with commas,
+ // and wrap them in braces.
+
+ v = partial.length === 0 ? '{}' : gap ?
+ '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' :
+ '{' + partial.join(',') + '}';
+ gap = mind;
+ return v;
+ }
+}
+
+module.exports = function (value, replacer, space) {
+ var i;
+ gap = '';
+ indent = '';
+
+ // If the space parameter is a number, make an indent string containing that
+ // many spaces.
+ if (typeof space === 'number') {
+ for (i = 0; i < space; i += 1) {
+ indent += ' ';
+ }
+ }
+ // If the space parameter is a string, it will be used as the indent string.
+ else if (typeof space === 'string') {
+ indent = space;
+ }
+
+ // If there is a replacer, it must be a function or an array.
+ // Otherwise, throw an error.
+ rep = replacer;
+ if (replacer && typeof replacer !== 'function'
+ && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) {
+ throw new Error('JSON.stringify');
+ }
+
+ // Make a fake root object containing our value under the key of ''.
+ // Return the result of stringifying the value.
+ return str('', {'': value});
+};
+
+},{}],"ajv":[function(require,module,exports){
+'use strict';
+
+var compileSchema = require('./compile')
+ , resolve = require('./compile/resolve')
+ , Cache = require('./cache')
+ , SchemaObject = require('./compile/schema_obj')
+ , stableStringify = require('json-stable-stringify')
+ , formats = require('./compile/formats')
+ , rules = require('./compile/rules')
+ , v5 = require('./v5')
+ , util = require('./compile/util')
+ , async = require('./async')
+ , co = require('co');
+
+module.exports = Ajv;
+
+Ajv.prototype.compileAsync = async.compile;
+Ajv.prototype.addKeyword = require('./keyword');
+Ajv.ValidationError = require('./compile/validation_error');
+
+var META_SCHEMA_ID = 'http://json-schema.org/draft-04/schema';
+var SCHEMA_URI_FORMAT = /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i;
+function SCHEMA_URI_FORMAT_FUNC(str) {
+ return SCHEMA_URI_FORMAT.test(str);
+}
+
+var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ];
+
+/**
+ * Creates validator instance.
+ * Usage: `Ajv(opts)`
+ * @param {Object} opts optional options
+ * @return {Object} ajv instance
+ */
+function Ajv(opts) {
+ if (!(this instanceof Ajv)) return new Ajv(opts);
+ var self = this;
+
+ opts = this._opts = util.copy(opts) || {};
+ this._schemas = {};
+ this._refs = {};
+ this._fragments = {};
+ this._formats = formats(opts.format);
+ this._cache = opts.cache || new Cache;
+ this._loadingSchemas = {};
+ this._compilations = [];
+ this.RULES = rules();
+
+ // this is done on purpose, so that methods are bound to the instance
+ // (without using bind) so that they can be used without the instance
+ this.validate = validate;
+ this.compile = compile;
+ this.addSchema = addSchema;
+ this.addMetaSchema = addMetaSchema;
+ this.validateSchema = validateSchema;
+ this.getSchema = getSchema;
+ this.removeSchema = removeSchema;
+ this.addFormat = addFormat;
+ this.errorsText = errorsText;
+
+ this._addSchema = _addSchema;
+ this._compile = _compile;
+
+ opts.loopRequired = opts.loopRequired || Infinity;
+ if (opts.async || opts.transpile) async.setup(opts);
+ if (opts.beautify === true) opts.beautify = { indent_size: 2 };
+ if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
+ this._metaOpts = getMetaSchemaOptions();
+
+ if (opts.formats) addInitialFormats();
+ addDraft4MetaSchema();
+ if (opts.v5) v5.enable(this);
+ if (typeof opts.meta == 'object') addMetaSchema(opts.meta);
+ addInitialSchemas();
+
+
+ /**
+ * Validate data using schema
+ * Schema will be compiled and cached (using serialized JSON as key. [json-stable-stringify](https://github.com/substack/json-stable-stringify) is used to serialize.
+ * @param {String|Object} schemaKeyRef key, ref or schema object
+ * @param {Any} data to be validated
+ * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
+ */
+ function validate(schemaKeyRef, data) {
+ var v;
+ if (typeof schemaKeyRef == 'string') {
+ v = getSchema(schemaKeyRef);
+ if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
+ } else {
+ var schemaObj = _addSchema(schemaKeyRef);
+ v = schemaObj.validate || _compile(schemaObj);
+ }
+
+ var valid = v(data);
+ if (v.$async === true)
+ return self._opts.async == '*' ? co(valid) : valid;
+ self.errors = v.errors;
+ return valid;
+ }
+
+
+ /**
+ * Create validating function for passed schema.
+ * @param {Object} schema schema object
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
+ * @return {Function} validating function
+ */
+ function compile(schema, _meta) {
+ var schemaObj = _addSchema(schema, undefined, _meta);
+ return schemaObj.validate || _compile(schemaObj);
+ }
+
+
+ /**
+ * Adds schema to the instance.
+ * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
+ * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
+ * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
+ */
+ function addSchema(schema, key, _skipValidation, _meta) {
+ if (Array.isArray(schema)){
+ for (var i=0; i<schema.length; i++) addSchema(schema[i], undefined, _skipValidation, _meta);
+ return;
+ }
+ // can key/id have # inside?
+ key = resolve.normalizeId(key || schema.id);
+ checkUnique(key);
+ self._schemas[key] = _addSchema(schema, _skipValidation, _meta, true);
+ }
+
+
+ /**
+ * Add schema that will be used to validate other schemas
+ * options in META_IGNORE_OPTIONS are alway set to false
+ * @param {Object} schema schema object
+ * @param {String} key optional schema key
+ * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
+ */
+ function addMetaSchema(schema, key, skipValidation) {
+ addSchema(schema, key, skipValidation, true);
+ }
+
+
+ /**
+ * Validate schema
+ * @param {Object} schema schema to validate
+ * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid
+ * @return {Boolean} true if schema is valid
+ */
+ function validateSchema(schema, throwOrLogError) {
+ var $schema = schema.$schema || self._opts.defaultMeta || defaultMeta();
+ var currentUriFormat = self._formats.uri;
+ self._formats.uri = typeof currentUriFormat == 'function'
+ ? SCHEMA_URI_FORMAT_FUNC
+ : SCHEMA_URI_FORMAT;
+ var valid;
+ try { valid = validate($schema, schema); }
+ finally { self._formats.uri = currentUriFormat; }
+ if (!valid && throwOrLogError) {
+ var message = 'schema is invalid: ' + errorsText();
+ if (self._opts.validateSchema == 'log') console.error(message);
+ else throw new Error(message);
+ }
+ return valid;
+ }
+
+
+ function defaultMeta() {
+ var meta = self._opts.meta;
+ self._opts.defaultMeta = typeof meta == 'object'
+ ? meta.id || meta
+ : self._opts.v5
+ ? v5.META_SCHEMA_ID
+ : META_SCHEMA_ID;
+ return self._opts.defaultMeta;
+ }
+
+
+ /**
+ * Get compiled schema from the instance by `key` or `ref`.
+ * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
+ * @return {Function} schema validating function (with property `schema`).
+ */
+ function getSchema(keyRef) {
+ var schemaObj = _getSchemaObj(keyRef);
+ switch (typeof schemaObj) {
+ case 'object': return schemaObj.validate || _compile(schemaObj);
+ case 'string': return getSchema(schemaObj);
+ case 'undefined': return _getSchemaFragment(keyRef);
+ }
+ }
+
+
+ function _getSchemaFragment(ref) {
+ var res = resolve.schema.call(self, { schema: {} }, ref);
+ if (res) {
+ var schema = res.schema
+ , root = res.root
+ , baseId = res.baseId;
+ var v = compileSchema.call(self, schema, root, undefined, baseId);
+ self._fragments[ref] = new SchemaObject({
+ ref: ref,
+ fragment: true,
+ schema: schema,
+ root: root,
+ baseId: baseId,
+ validate: v
+ });
+ return v;
+ }
+ }
+
+
+ function _getSchemaObj(keyRef) {
+ keyRef = resolve.normalizeId(keyRef);
+ return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
+ }
+
+
+ /**
+ * Remove cached schema(s).
+ * If no parameter is passed all schemas but meta-schemas are removed.
+ * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
+ * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
+ * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
+ */
+ function removeSchema(schemaKeyRef) {
+ if (schemaKeyRef instanceof RegExp) {
+ _removeAllSchemas(self._schemas, schemaKeyRef);
+ _removeAllSchemas(self._refs, schemaKeyRef);
+ return;
+ }
+ switch (typeof schemaKeyRef) {
+ case 'undefined':
+ _removeAllSchemas(self._schemas);
+ _removeAllSchemas(self._refs);
+ self._cache.clear();
+ return;
+ case 'string':
+ var schemaObj = _getSchemaObj(schemaKeyRef);
+ if (schemaObj) self._cache.del(schemaObj.jsonStr);
+ delete self._schemas[schemaKeyRef];
+ delete self._refs[schemaKeyRef];
+ return;
+ case 'object':
+ var jsonStr = stableStringify(schemaKeyRef);
+ self._cache.del(jsonStr);
+ var id = schemaKeyRef.id;
+ if (id) {
+ id = resolve.normalizeId(id);
+ delete self._schemas[id];
+ delete self._refs[id];
+ }
+ }
+ }
+
+
+ function _removeAllSchemas(schemas, regex) {
+ for (var keyRef in schemas) {
+ var schemaObj = schemas[keyRef];
+ if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
+ self._cache.del(schemaObj.jsonStr);
+ delete schemas[keyRef];
+ }
+ }
+ }
+
+
+ function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
+ if (typeof schema != 'object') throw new Error('schema should be object');
+ var jsonStr = stableStringify(schema);
+ var cached = self._cache.get(jsonStr);
+ if (cached) return cached;
+
+ shouldAddSchema = shouldAddSchema || self._opts.addUsedSchema !== false;
+
+ var id = resolve.normalizeId(schema.id);
+ if (id && shouldAddSchema) checkUnique(id);
+
+ var willValidate = self._opts.validateSchema !== false && !skipValidation;
+ var recursiveMeta;
+ if (willValidate && !(recursiveMeta = schema.id && schema.id == schema.$schema))
+ validateSchema(schema, true);
+
+ var localRefs = resolve.ids.call(self, schema);
+
+ var schemaObj = new SchemaObject({
+ id: id,
+ schema: schema,
+ localRefs: localRefs,
+ jsonStr: jsonStr,
+ meta: meta
+ });
+
+ if (id[0] != '#' && shouldAddSchema) self._refs[id] = schemaObj;
+ self._cache.put(jsonStr, schemaObj);
+
+ if (willValidate && recursiveMeta) validateSchema(schema, true);
+
+ return schemaObj;
+ }
+
+
+ function _compile(schemaObj, root) {
+ if (schemaObj.compiling) {
+ schemaObj.validate = callValidate;
+ callValidate.schema = schemaObj.schema;
+ callValidate.errors = null;
+ callValidate.root = root ? root : callValidate;
+ if (schemaObj.schema.$async === true)
+ callValidate.$async = true;
+ return callValidate;
+ }
+ schemaObj.compiling = true;
+
+ var currentOpts;
+ if (schemaObj.meta) {
+ currentOpts = self._opts;
+ self._opts = self._metaOpts;
+ }
+
+ var v;
+ try { v = compileSchema.call(self, schemaObj.schema, root, schemaObj.localRefs); }
+ finally {
+ schemaObj.compiling = false;
+ if (schemaObj.meta) self._opts = currentOpts;
+ }
+
+ schemaObj.validate = v;
+ schemaObj.refs = v.refs;
+ schemaObj.refVal = v.refVal;
+ schemaObj.root = v.root;
+ return v;
+
+
+ function callValidate() {
+ var _validate = schemaObj.validate;
+ var result = _validate.apply(null, arguments);
+ callValidate.errors = _validate.errors;
+ return result;
+ }
+ }
+
+
+ /**
+ * Convert array of error message objects to string
+ * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
+ * @param {Object} options optional options with properties `separator` and `dataVar`.
+ * @return {String} human readable string with all errors descriptions
+ */
+ function errorsText(errors, options) {
+ errors = errors || self.errors;
+ if (!errors) return 'No errors';
+ options = options || {};
+ var separator = options.separator === undefined ? ', ' : options.separator;
+ var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;
+
+ var text = '';
+ for (var i=0; i<errors.length; i++) {
+ var e = errors[i];
+ if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;
+ }
+ return text.slice(0, -separator.length);
+ }
+
+
+ /**
+ * Add custom format
+ * @param {String} name format name
+ * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
+ */
+ function addFormat(name, format) {
+ if (typeof format == 'string') format = new RegExp(format);
+ self._formats[name] = format;
+ }
+
+
+ function addDraft4MetaSchema() {
+ if (self._opts.meta !== false) {
+ var metaSchema = require('./refs/json-schema-draft-04.json');
+ addMetaSchema(metaSchema, META_SCHEMA_ID, true);
+ self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
+ }
+ }
+
+
+ function addInitialSchemas() {
+ var optsSchemas = self._opts.schemas;
+ if (!optsSchemas) return;
+ if (Array.isArray(optsSchemas)) addSchema(optsSchemas);
+ else for (var key in optsSchemas) addSchema(optsSchemas[key], key);
+ }
+
+
+ function addInitialFormats() {
+ for (var name in self._opts.formats) {
+ var format = self._opts.formats[name];
+ addFormat(name, format);
+ }
+ }
+
+
+ function checkUnique(id) {
+ if (self._schemas[id] || self._refs[id])
+ throw new Error('schema with key or id "' + id + '" already exists');
+ }
+
+
+ function getMetaSchemaOptions() {
+ var metaOpts = util.copy(self._opts);
+ for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
+ delete metaOpts[META_IGNORE_OPTIONS[i]];
+ return metaOpts;
+ }
+}
+
+},{"./async":1,"./cache":2,"./compile":6,"./compile/formats":5,"./compile/resolve":7,"./compile/rules":8,"./compile/schema_obj":9,"./compile/util":11,"./compile/validation_error":12,"./keyword":37,"./refs/json-schema-draft-04.json":38,"./v5":40,"co":47,"json-stable-stringify":48}]},{},[])("ajv")
+}); \ No newline at end of file
diff --git a/tools/eslint/node_modules/ajv/dist/ajv.min.js b/tools/eslint/node_modules/ajv/dist/ajv.min.js
new file mode 100644
index 0000000000..1096fe4d72
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/dist/ajv.min.js
@@ -0,0 +1,6 @@
+/* ajv 4.7.7: Another JSON Schema Validator */
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.Ajv=e()}}(function(){var e;return function e(r,t,a){function s(i,n){if(!t[i]){if(!r[i]){var l="function"==typeof require&&require;if(!n&&l)return l(i,!0);if(o)return o(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var h=t[i]={exports:{}};r[i][0].call(h.exports,function(e){var t=r[i][1][e];return s(t?t:e)},h,h.exports,e,r,t,a)}return t[i].exports}for(var o="function"==typeof require&&require,i=0;i<a.length;i++)s(a[i]);return s}({1:[function(e,r,t){"use strict";function a(e,r){r!==!1&&(r=!0);var t,s=e.async,o=e.transpile;switch(typeof o){case"string":var i=m[o];if(!i)throw new Error("bad transpiler: "+o);return e._transpileFunc=i(e,r);case"undefined":case"boolean":if("string"==typeof s){if(t=p[s],!t)throw new Error("bad async mode: "+s);return e.transpile=t(e,r)}for(var n=0;n<v.length;n++){var l=v[n];if(a(l,!1))return d.copy(l,e),e.transpile}throw new Error("generators, nodent and regenerator are not available");case"function":return e._transpileFunc=e.transpile;default:throw new Error("bad transpiler: "+o)}}function s(e,r){try{return new Function("(function*(){})()")(),!0}catch(e){if(r)throw new Error("generators not supported")}}function o(e,r){try{return new Function("(async function(){})()")(),!0}catch(e){if(r)throw new Error("es7 async functions not supported")}}function i(r,t){try{return u||(u=e("regenerator"),u.runtime()),r.async&&r.async!==!0||(r.async="es7"),n}catch(e){if(t)throw new Error("regenerator not available")}}function n(e){return u.compile(e).code}function l(r,t){try{return f||(f=e("nodent")({log:!1,dontInstallRequireHook:!0})),"es7"!=r.async&&(r.async&&r.async!==!0&&console.warn("nodent transpiles only es7 async functions"),r.async="es7"),c}catch(e){if(t)throw new Error("nodent not available")}}function c(e){return f.compile(e,"",{promises:!0,sourcemap:!1}).code}function h(e,r){function t(e,r,a){function o(a){function o(a,o){if(a)return r(a);if(!s._refs[i]&&!s._schemas[i])try{s.addSchema(o,i)}catch(e){return void r(e)}t(e,r)}var i=a.missingSchema;if(s._refs[i]||s._schemas[i])return r(new Error("Schema "+i+" is loaded but "+a.missingRef+" cannot be resolved"));var n=s._loadingSchemas[i];n?"function"==typeof n?s._loadingSchemas[i]=[n,o]:n[n.length]=o:(s._loadingSchemas[i]=o,s._opts.loadSchema(i,function(e,r){var t=s._loadingSchemas[i];if(delete s._loadingSchemas[i],"function"==typeof t)t(e,r);else for(var a=0;a<t.length;a++)t[a](e,r)}))}function i(e,t){return a?void setTimeout(function(){r(e,t)}):r(e,t)}var n;try{n=s.compile(e)}catch(e){return void(e.missingSchema?o(e):i(e))}i(null,n)}var a,s=this;try{a=this._addSchema(e)}catch(e){return void setTimeout(function(){r(e)})}if(a.validate)setTimeout(function(){r(null,a.validate)});else{if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");t(e,r,!0)}}r.exports={setup:a,compile:h};var u,f,d=e("./compile/util"),p={"*":s,"co*":s,es7:o},m={nodent:l,regenerator:i},v=[{async:"co*"},{async:"es7",transpile:"nodent"},{async:"co*",transpile:"regenerator"}]},{"./compile/util":11}],2:[function(e,r,t){"use strict";var a=r.exports=function(){this._cache={}};a.prototype.put=function(e,r){this._cache[e]=r},a.prototype.get=function(e){return this._cache[e]},a.prototype.del=function(e){delete this._cache[e]},a.prototype.clear=function(){this._cache={}}},{}],3:[function(e,r,t){"use strict";r.exports={$ref:e("../dotjs/ref"),allOf:e("../dotjs/allOf"),anyOf:e("../dotjs/anyOf"),dependencies:e("../dotjs/dependencies"),enum:e("../dotjs/enum"),format:e("../dotjs/format"),items:e("../dotjs/items"),maximum:e("../dotjs/_limit"),minimum:e("../dotjs/_limit"),maxItems:e("../dotjs/_limitItems"),minItems:e("../dotjs/_limitItems"),maxLength:e("../dotjs/_limitLength"),minLength:e("../dotjs/_limitLength"),maxProperties:e("../dotjs/_limitProperties"),minProperties:e("../dotjs/_limitProperties"),multipleOf:e("../dotjs/multipleOf"),not:e("../dotjs/not"),oneOf:e("../dotjs/oneOf"),pattern:e("../dotjs/pattern"),properties:e("../dotjs/properties"),required:e("../dotjs/required"),uniqueItems:e("../dotjs/uniqueItems"),validate:e("../dotjs/validate")}},{"../dotjs/_limit":14,"../dotjs/_limitItems":15,"../dotjs/_limitLength":16,"../dotjs/_limitProperties":17,"../dotjs/allOf":18,"../dotjs/anyOf":19,"../dotjs/dependencies":22,"../dotjs/enum":23,"../dotjs/format":24,"../dotjs/items":25,"../dotjs/multipleOf":26,"../dotjs/not":27,"../dotjs/oneOf":28,"../dotjs/pattern":29,"../dotjs/properties":31,"../dotjs/ref":32,"../dotjs/required":33,"../dotjs/uniqueItems":35,"../dotjs/validate":36}],4:[function(e,r,t){"use strict";r.exports=function e(r,t){if(r===t)return!0;var a,s=Array.isArray(r),o=Array.isArray(t);if(s&&o){if(r.length!=t.length)return!1;for(a=0;a<r.length;a++)if(!e(r[a],t[a]))return!1;return!0}if(s!=o)return!1;if(r&&t&&"object"==typeof r&&"object"==typeof t){var i=Object.keys(r);if(i.length!==Object.keys(t).length)return!1;for(a=0;a<i.length;a++)if(void 0===t[i[a]])return!1;for(a=0;a<i.length;a++)if(!e(r[i[a]],t[i[a]]))return!1;return!0}return!1}},{}],5:[function(e,r,t){"use strict";function a(e){e="full"==e?"full":"fast";var r=d.copy(a[e]);for(var t in a.compare)r[t]={validate:r[t],compare:a.compare[t]};return r}function s(e){var r=e.match(p);if(!r)return!1;var t=+r[1],a=+r[2];return t>=1&&t<=12&&a>=1&&a<=m[t]}function o(e,r){var t=e.match(v);if(!t)return!1;var a=t[1],s=t[2],o=t[3],i=t[5];return a<=23&&s<=59&&o<=59&&(!r||i)}function i(e){var r=e.split(w);return 2==r.length&&s(r[0])&&o(r[1],!0)}function n(e){return e.length<=255&&y.test(e)}function l(e){return j.test(e)&&g.test(e)}function c(e){try{return new RegExp(e),!0}catch(e){return!1}}function h(e,r){if(e&&r)return e>r?1:e<r?-1:e===r?0:void 0}function u(e,r){if(e&&r&&(e=e.match(v),r=r.match(v),e&&r))return e=e[1]+e[2]+e[3]+(e[4]||""),r=r[1]+r[2]+r[3]+(r[4]||""),e>r?1:e<r?-1:e===r?0:void 0}function f(e,r){if(e&&r){e=e.split(w),r=r.split(w);var t=h(e[0],r[0]);if(void 0!==t)return t||u(e[1],r[1])}}var d=e("./util"),p=/^\d\d\d\d-(\d\d)-(\d\d)$/,m=[0,31,29,31,30,31,30,31,31,30,31,30,31],v=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,y=/^[0-9a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?(\.[0-9a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?)*$/i,g=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i,P=/^(?:urn\:uuid\:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,E=/^(?:\/(?:[^~\/]|~0|~1)+)*(?:\/)?$|^\#(?:\/(?:[a-z0-9_\-\.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)+)*(?:\/)?$/i,b=/^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)+)*(?:\/)?)$/;r.exports=a,a.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i,email:/^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:y,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:c,uuid:P,"json-pointer":E,"relative-json-pointer":b},a.full={date:s,time:o,"date-time":i,uri:l,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:n,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:c,uuid:P,"json-pointer":E,"relative-json-pointer":b},a.compare={date:h,time:u,"date-time":f};var w=/t|\s/i,j=/\/|\:/},{"./util":11}],6:[function(e,r,t){"use strict";function a(e,r,t,i){function w(){var e=M.validate,r=e.apply(null,arguments);return w.errors=e.errors,r}function j(e,t,s,o){var i=!t||t&&t.schema==e;if(t.schema!=r.schema)return a.call(A,e,t,s,o);var p=e.$async===!0;p&&!k.transpile&&m.setup(k);var w=y({isTop:!0,schema:e,isRoot:i,baseId:o,root:t,schemaPath:"",errSchemaPath:"#",errorPath:'""',RULES:F,validate:y,util:d,resolve:f,resolveRef:S,usePattern:O,useDefault:R,useCustomRule:I,opts:k,formats:N,self:A});w=u(q,c)+u(D,n)+u(C,l)+u(V,h)+w+"return validate;",k.beautify&&(v?w=v(w,k.beautify):console.error('"npm install js-beautify" to use beautify option'));var j,$,x=k._transpileFunc;try{$=p&&x?x(w):w;var _=new Function("self","RULES","formats","root","refVal","defaults","customRules","co","equal","ucs2length","ValidationError",$);j=_(A,F,N,r,q,C,V,g,E,P,b),q[0]=j}catch(e){throw console.error("Error compiling schema, function code:",$),e}return j.schema=e,j.errors=null,j.refs=L,j.refVal=q,j.root=i?j:t,p&&(j.$async=!0),z&&(j.sourceCode=w),k.sourceCode===!0&&(j.source={patterns:D,defaults:C}),j}function S(e,s,o){s=f.url(e,s);var i,n,l=L[s];if(void 0!==l)return i=q[l],n="refVal["+l+"]",_(i,n);if(!o&&r.refs){var c=r.refs[s];if(void 0!==c)return i=r.refVal[c],n=$(s,i),_(i,n)}n=$(s);var h=f.call(A,j,r,s);if(!h){var u=t&&t[s];u&&(h=f.inlineRef(u,k.inlineRefs)?u:a.call(A,u,r,t,e))}return h?(x(s,h),_(h,n)):void 0}function $(e,r){var t=q.length;return q[t]=r,L[e]=t,"refVal"+t}function x(e,r){var t=L[e];q[t]=r}function _(e,r){return"object"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&e.$async}}function O(e){var r=Q[e];return void 0===r&&(r=Q[e]=D.length,D[r]=e),"pattern"+r}function R(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return d.toQuotedString(e);case"object":if(null===e)return"null";var r=p(e),t=U[r];return void 0===t&&(t=U[r]=C.length,C[t]=e),"default"+t}}function I(e,r,t,a){var s=e.definition.validateSchema;if(s&&A._opts.validateSchema!==!1){var o=s(r);if(!o){var i="keyword schema is invalid: "+A.errorsText(s.errors);if("log"!=A._opts.validateSchema)throw new Error(i);console.error(i)}}var n,l=e.definition.compile,c=e.definition.inline,h=e.definition.macro;l?n=l.call(A,r,t,a):h?(n=h.call(A,r,t,a),k.validateSchema!==!1&&A.validateSchema(n,!0)):n=c?c.call(A,a,e.keyword,r,t):e.definition.validate;var u=V.length;return V[u]=n,{code:"customRule"+u,validate:n}}var A=this,k=this._opts,q=[void 0],L={},D=[],Q={},C=[],U={},V=[],z=k.sourceCode!==!1;r=r||{schema:e,refVal:q,refs:L};var T=s.call(this,e,r,i),M=this._compilations[T.index];if(T.compiling)return M.callValidate=w;var N=this._formats,F=this.RULES;try{var H=j(e,r,t,i);M.validate=H;var J=M.callValidate;return J&&(J.schema=H.schema,J.errors=null,J.refs=H.refs,J.refVal=H.refVal,J.root=H.root,J.$async=H.$async,z&&(J.sourceCode=H.sourceCode)),H}finally{o.call(this,e,r,i)}}function s(e,r,t){var a=i.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function o(e,r,t){var a=i.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function i(e,r,t){for(var a=0;a<this._compilations.length;a++){var s=this._compilations[a];if(s.schema==e&&s.root==r&&s.baseId==t)return a}return-1}function n(e,r){return"var pattern"+e+" = new RegExp("+d.toQuotedString(r[e])+");"}function l(e){return"var default"+e+" = defaults["+e+"];"}function c(e,r){return r[e]?"var refVal"+e+" = refVal["+e+"];":""}function h(e){return"var customRule"+e+" = customRules["+e+"];"}function u(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var f=e("./resolve"),d=e("./util"),p=e("json-stable-stringify"),m=e("../async"),v=function(){try{return e("js-beautify").js_beautify}catch(e){}}(),y=e("../dotjs/validate"),g=e("co"),P=d.ucs2length,E=e("./equal"),b=e("./validation_error");r.exports=a},{"../async":1,"../dotjs/validate":36,"./equal":4,"./resolve":7,"./util":11,"./validation_error":12,co:47,"json-stable-stringify":48}],7:[function(e,r,t){"use strict";function a(e,r,t){var o=this._refs[t];if("string"==typeof o){if(!this._refs[o])return a.call(this,e,r,o);o=this._refs[o]}if(o=o||this._schemas[t],o instanceof g)return n(o.schema,this._opts.inlineRefs)?o.schema:o.validate||this._compile(o);var i,l,c,h=s.call(this,r,t);return h&&(i=h.schema,r=h.root,c=h.baseId),i instanceof g?l=i.validate||e.call(this,i.schema,r,void 0,c):i&&(l=n(i,this._opts.inlineRefs)?i:e.call(this,i,r,void 0,c)),l}function s(e,r){var t=m.parse(r,!1,!0),a=u(t),s=h(e.schema.id);if(a!==s){var n=f(a),l=this._refs[n];if("string"==typeof l)return o.call(this,e,l,t);if(l instanceof g)l.validate||this._compile(l),e=l;else{if(l=this._schemas[n],!(l instanceof g))return;if(l.validate||this._compile(l),n==f(r))return{schema:l,root:e,baseId:s};e=l}if(!e.schema)return;s=h(e.schema.id)}return i.call(this,t,s,e.schema,e)}function o(e,r,t){var a=s.call(this,e,r);if(a){var o=a.schema,n=a.baseId;return e=a.root,o.id&&(n=d(n,o.id)),i.call(this,t,n,o,e)}}function i(e,r,t,a){if(e.hash=e.hash||"","#/"==e.hash.slice(0,2)){for(var o=e.hash.split("/"),i=1;i<o.length;i++){var n=o[i];if(n){if(n=y.unescapeFragment(n),t=t[n],!t)break;if(t.id&&!P[n]&&(r=d(r,t.id)),t.$ref){var l=d(r,t.$ref),c=s.call(this,a,l);c&&(t=c.schema,a=c.root,r=c.baseId)}}}return t&&t!=a.schema?{schema:t,root:a,baseId:r}:void 0}}function n(e,r){return r!==!1&&(void 0===r||r===!0?l(e):r?c(e)<=r:void 0)}function l(e){var r;if(Array.isArray(e)){for(var t=0;t<e.length;t++)if(r=e[t],"object"==typeof r&&!l(r))return!1}else for(var a in e){if("$ref"==a)return!1;if(r=e[a],"object"==typeof r&&!l(r))return!1}return!0}function c(e){var r,t=0;if(Array.isArray(e)){for(var a=0;a<e.length;a++)if(r=e[a],"object"==typeof r&&(t+=c(r)),t==1/0)return 1/0}else for(var s in e){if("$ref"==s)return 1/0;if(E[s])t++;else if(r=e[s],"object"==typeof r&&(t+=c(r)+1),t==1/0)return 1/0}return t}function h(e,r){r!==!1&&(e=f(e));var t=m.parse(e,!1,!0);return u(t)}function u(e){var r=e.protocol||"//"==e.href.slice(0,2)?"//":"";return(e.protocol||"")+r+(e.host||"")+(e.path||"")+"#"}function f(e){return e?e.replace(b,""):""}function d(e,r){return r=f(r),m.resolve(e,r)}function p(e){function r(e,t,s){if(Array.isArray(e))for(var o=0;o<e.length;o++)r.call(this,e[o],t+"/"+o,s);else if(e&&"object"==typeof e){if("string"==typeof e.id){var i=s=s?m.resolve(s,e.id):e.id;i=f(i);var n=this._refs[i];if("string"==typeof n&&(n=this._refs[n]),n&&n.schema){if(!v(e,n.schema))throw new Error('id "'+i+'" resolves to more than one schema')}else if(i!=f(t))if("#"==i[0]){if(a[i]&&!v(e,a[i]))throw new Error('id "'+i+'" resolves to more than one schema');a[i]=e}else this._refs[i]=t}for(var l in e)r.call(this,e[l],t+"/"+y.escapeFragment(l),s)}}var t=f(e.id),a={};return r.call(this,e,h(t,!1),t),a}var m=e("url"),v=e("./equal"),y=e("./util"),g=e("./schema_obj");r.exports=a,a.normalizeId=f,a.fullPath=h,a.url=d,a.ids=p,a.inlineRef=n,a.schema=s;var P=y.toHash(["properties","patternProperties","enum","dependencies","definitions"]),E=y.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]),b=/#\/?$/},{"./equal":4,"./schema_obj":9,"./util":11,url:45}],8:[function(e,r,t){"use strict";var a=e("./_rules"),s=e("./util").toHash;r.exports=function(){var e=[{type:"number",rules:["maximum","minimum","multipleOf"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","uniqueItems","items"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","properties"]},{rules:["$ref","enum","not","anyOf","oneOf","allOf"]}],r=["type","additionalProperties","patternProperties"],t=["additionalItems","$schema","id","title","description","default"],o=["number","integer","string","array","object","boolean","null"];return e.all=s(r),e.forEach(function(t){t.rules=t.rules.map(function(t){r.push(t);var s=e.all[t]={keyword:t,code:a[t]};return s})}),e.keywords=s(r.concat(t)),e.types=s(o),e.custom={},e}},{"./_rules":3,"./util":11}],9:[function(e,r,t){"use strict";function a(e){s.copy(e,this)}var s=e("./util");r.exports=a},{"./util":11}],10:[function(e,r,t){"use strict";r.exports=function(e){for(var r,t=0,a=e.length,s=0;s<a;)t++,r=e.charCodeAt(s++),r>=55296&&r<=56319&&s<a&&(r=e.charCodeAt(s),56320==(64512&r)&&s++);return t}},{}],11:[function(e,r,t){"use strict";function a(e,r){r=r||{};for(var t in e)r[t]=e[t];return r}function s(e,r,t){var a=t?" !== ":" === ",s=t?" || ":" && ",o=t?"!":"",i=t?"":"!";switch(e){case"null":return r+a+"null";case"array":return o+"Array.isArray("+r+")";case"object":return"("+o+r+s+"typeof "+r+a+'"object"'+s+i+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+a+'"number"'+s+i+"("+r+" % 1)"+s+r+a+r+")";default:return"typeof "+r+a+'"'+e+'"'}}function o(e,r){switch(e.length){case 1:return s(e[0],r,!0);default:var t="",a=n(e);a.array&&a.object&&(t=a.null?"(":"(!"+r+" || ",t+="typeof "+r+' !== "object")',delete a.null,delete a.array,delete a.object),a.number&&delete a.integer;for(var o in a)t+=(t?" && ":"")+s(o,r,!0);return t}}function i(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var s=r[a];$[s]?t[t.length]=s:"array"===e&&"array"===s&&(t[t.length]=s)}if(t.length)return t}else{if($[r])return[r];if("array"===e&&"array"===r)return["array"]}}function n(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}function l(e){return"number"==typeof e?"["+e+"]":x.test(e)?"."+e:"['"+c(e)+"']"}function c(e){return e.replace(_,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function h(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0}function u(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")}function f(e){return e.replace(O,"").replace(R,"").replace(I,"if (!($1))")}function d(e,r){var t=e.match(A);return t&&2===t.length?r?e.replace(q,"").replace(Q,C):e.replace(k,"").replace(L,D):e}function p(e,r){for(var t in e)if(r[t])return!0}function m(e,r,t){for(var a in e)if(a!=t&&r[a])return!0}function v(e){return"'"+c(e)+"'"}function y(e,r,t,a){var s=t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'";return E(e,s)}function g(e,r,t){var a=v(t?"/"+j(r):l(r));return E(e,a)}function P(e,r,t){var a,s,o,i;if(""===e)return"rootData";if("/"==e[0]){if(!U.test(e))throw new Error("Invalid JSON-pointer: "+e);s=e,o="rootData"}else{if(i=e.match(V),!i)throw new Error("Invalid JSON-pointer: "+e);if(a=+i[1],s=i[2],"#"==s){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(o="data"+(r-a||""),!s)return o}for(var n=o,c=s.split("/"),h=0;h<c.length;h++){var u=c[h];u&&(o+=l(S(u)),n+=" && "+o)}return n}function E(e,r){return'""'==e?r:(e+" + "+r).replace(/' \+ '/g,"")}function b(e){return S(decodeURIComponent(e))}function w(e){return encodeURIComponent(j(e))}function j(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function S(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}r.exports={copy:a,checkDataType:s,checkDataTypes:o,coerceToTypes:i,toHash:n,getProperty:l,escapeQuotes:c,ucs2length:e("./ucs2length"),varOccurences:h,varReplace:u,cleanUpCode:f,cleanUpVarErrors:d,schemaHasRules:p,schemaHasRulesExcept:m,stableStringify:e("json-stable-stringify"),toQuotedString:v,getPathExpr:y,getPath:g,getData:P,unescapeFragment:b,escapeFragment:w,escapeJsonPointer:j};var $=n(["string","number","integer","boolean","null"]),x=/^[a-z$_][a-z$_0-9]*$/i,_=/'|\\/g,O=/else\s*{\s*}/g,R=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,I=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g,A=/[^v\.]errors/g,k=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,q=/var errors = 0;|var vErrors = null;/g,L="return errors === 0;",D="validate.errors = null; return true;",Q=/if \(errors === 0\) return true;\s*else throw new ValidationError\(vErrors\);/,C="return true;",U=/^\/(?:[^~]|~0|~1)*$/,V=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/},{"./ucs2length":10,"json-stable-stringify":48}],12:[function(e,r,t){"use strict";function a(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0}r.exports=a,a.prototype=Object.create(Error.prototype),a.prototype.constructor=a},{}],13:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s;if(a+="var "+u+" = undefined;",e.opts.format===!1)return a+=" "+u+" = true; ";var f=e.schema.format,d=e.opts.v5&&f.$data,p="";if(d){var m=e.util.getData(f.$data,o,e.dataPathArr),v="format"+s,y="compare"+s;a+=" var "+v+" = formats["+m+"] , "+y+" = "+v+" && "+v+".compare;"}else{var v=e.formats[f];if(!v||!v.compare)return a+=" "+u+" = true; ";var y="formats"+e.util.getProperty(f)+".compare"}var g,P="formatMaximum"==r,E="formatExclusive"+(P?"Maximum":"Minimum"),b=e.schema[E],w=e.opts.v5&&b&&b.$data,j=P?"<":">",S="result"+s,$=e.opts.v5&&i&&i.$data;if($?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",g="schema"+s):g=i,w){var x=e.util.getData(b.$data,o,e.dataPathArr),_="exclusive"+s,O="op"+s,R="' + "+O+" + '";a+=" var schemaExcl"+s+" = "+x+"; ",x="schemaExcl"+s,a+=" if (typeof "+x+" != 'boolean' && "+x+" !== undefined) { "+u+" = false; ";var t=E,I=I||[];I.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_formatExclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: '"+E+" should be boolean' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var A=a;a=I.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+A+"]); ":" validate.errors = ["+A+"]; return false; ":" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(p+="}",a+=" else { "),$&&(a+=" if ("+g+" === undefined) "+u+" = true; else if (typeof "+g+" != 'string') "+u+" = false; else { ",p+="}"),d&&(a+=" if (!"+y+") "+u+" = true; else { ",p+="}"),a+=" var "+S+" = "+y+"("+h+", ",a+=$?""+g:""+e.util.toQuotedString(i),a+=" ); if ("+S+" === undefined) "+u+" = false; var "+_+" = "+x+" === true; if ("+u+" === undefined) { "+u+" = "+_+" ? "+S+" "+j+" 0 : "+S+" "+j+"= 0; } if (!"+u+") var op"+s+" = "+_+" ? '"+j+"' : '"+j+"=';"}else{var _=b===!0,R=j;_||(R+="=");var O="'"+R+"'";$&&(a+=" if ("+g+" === undefined) "+u+" = true; else if (typeof "+g+" != 'string') "+u+" = false; else { ",p+="}"),d&&(a+=" if (!"+y+") "+u+" = true; else { ",p+="}"),a+=" var "+S+" = "+y+"("+h+", ",a+=$?""+g:""+e.util.toQuotedString(i),a+=" ); if ("+S+" === undefined) "+u+" = false; if ("+u+" === undefined) "+u+" = "+S+" "+j,_||(a+="="),a+=" 0;"}a+=""+p+"if (!"+u+") { ";var t=r,I=I||[];I.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_formatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { comparison: "+O+", limit: ",a+=$?""+g:""+e.util.toQuotedString(i),a+=" , exclusive: "+_+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be "+R+' "',a+=$?"' + "+g+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=$?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var A=a;return a=I.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+A+"]); ":" validate.errors = ["+A+"]; return false; ":" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="}"}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+"."+r,c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f=e.opts.v5&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maximum"==r,p=d?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[p],v=e.opts.v5&&m&&m.$data,y=d?"<":">",g=d?">":"<";if(v){var P=e.util.getData(m.$data,i,e.dataPathArr),E="exclusive"+o,b="op"+o,w="' + "+b+" + '";s+=" var schemaExcl"+o+" = "+P+"; ",P="schemaExcl"+o,s+=" var exclusive"+o+"; if (typeof "+P+" != 'boolean' && typeof "+P+" != 'undefined') { ";var t=p,j=j||[];j.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(t||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",e.opts.messages!==!1&&(s+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var S=s;s=j.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" ((exclusive"+o+" = "+P+" === true) ? "+u+" "+g+"= "+a+" : "+u+" "+g+" "+a+") || "+u+" !== "+u+") { var op"+o+" = exclusive"+o+" ? '"+y+"' : '"+y+"=';"}else{var E=m===!0,w=y;E||(w+="=");var b="'"+w+"'";s+=" if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+u+" "+g,E&&(s+="="),s+=" "+a+" || "+u+" !== "+u+") {"}var t=r,j=j||[];j.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(t||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+b+", limit: "+a+", exclusive: "+E+" } ",e.opts.messages!==!1&&(s+=" , message: 'should be "+w+" ",s+=f?"' + "+a:""+n+"'"),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var S=s;return s=j.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",h&&(s+=" else { "),s}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+"."+r,c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f=e.opts.v5&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maxItems"==r?">":"<";s+="if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+u+".length "+d+" "+a+") { ";var t=r,p=p||[];p.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(t||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",e.opts.messages!==!1&&(s+=" , message: 'should NOT have ",s+="maxItems"==r?"more":"less",s+=" than ",s+=f?"' + "+a+" + '":""+n,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",h&&(s+=" else { "),s}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+"."+r,c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f=e.opts.v5&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maxLength"==r?">":"<";s+="if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=e.opts.unicode===!1?" "+u+".length ":" ucs2length("+u+") ",s+=" "+d+" "+a+") { ";var t=r,p=p||[];p.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(t||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",e.opts.messages!==!1&&(s+=" , message: 'should NOT be ",s+="maxLength"==r?"longer":"shorter",s+=" than ",s+=f?"' + "+a+" + '":""+n,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",
+s+="} ",h&&(s+=" else { "),s}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+"."+r,c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f=e.opts.v5&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maxProperties"==r?">":"<";s+="if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" Object.keys("+u+").length "+d+" "+a+") { ";var t=r,p=p||[];p.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(t||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",e.opts.messages!==!1&&(s+=" , message: 'should NOT have ",s+="maxProperties"==r?"more":"less",s+=" than ",s+=f?"' + "+a+" + '":""+n,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",h&&(s+=" else { "),s}},{}],18:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.schema[r],s=e.schemaPath+"."+r,o=e.errSchemaPath+"/"+r,i=!e.opts.allErrors,n=e.util.copy(e),l="";n.level++;var c=n.baseId,h=a;if(h)for(var u,f=-1,d=h.length-1;f<d;)u=h[f+=1],e.util.schemaHasRules(u,e.RULES.all)&&(n.schema=u,n.schemaPath=s+"["+f+"]",n.errSchemaPath=o+"/"+f,t+=" "+e.validate(n)+" ",n.baseId=c,i&&(t+=" if (valid"+n.level+") { ",l+="}"));return i&&(t+=" "+l.slice(0,-1)),t=e.util.cleanUpCode(t)}},{}],19:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f="errs__"+s,d=e.util.copy(e),p="";d.level++;var m=i.every(function(r){return e.util.schemaHasRules(r,e.RULES.all)});if(m){var v=d.baseId;a+=" var "+f+" = errors; var "+u+" = false; ";var y=e.compositeRule;e.compositeRule=d.compositeRule=!0;var g=i;if(g)for(var P,E=-1,b=g.length-1;E<b;)P=g[E+=1],d.schema=P,d.schemaPath=n+"["+E+"]",d.errSchemaPath=l+"/"+E,a+=" "+e.validate(d)+" ",d.baseId=v,a+=" "+u+" = "+u+" || valid"+d.level+"; if (!"+u+") { ",p+="}";e.compositeRule=d.compositeRule=y,a+=" "+p+" if (!"+u+") { var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(t||"anyOf")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } "),a=e.util.cleanUpCode(a)}else c&&(a+=" if (true) { ");return a}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+"."+r,c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f="valid"+o,d=e.opts.v5&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,d||(s+=" var schema"+o+" = validate.schema"+l+";"),s+="var "+f+" = equal("+u+", schema"+o+"); if (!"+f+") { ";var p=p||[];p.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(t||"constant")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",e.opts.messages!==!1&&(s+=" , message: 'should be equal to constant' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" }"}},{}],21:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+"."+r,c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f="errs__"+o,d=e.opts.v5&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var p,m,v,y,g,P=this,E="definition"+o,b=P.definition;if(d&&b.$data){g="keywordValidate"+o;var w=b.validateSchema;s+=" var "+E+" = RULES.custom['"+r+"'].definition; var "+g+" = "+E+".validate;"}else y=e.useCustomRule(P,n,e.schema,e),a="validate.schema"+l,g=y.code,p=b.compile,m=b.inline,v=b.macro;var j=g+".errors",S="i"+o,$="ruleErr"+o,x=b.async;if(x&&!e.async)throw new Error("async keyword in sync schema");if(m||v||(s+=""+j+" = null;"),s+="var "+f+" = errors;var valid"+o+";",m&&b.statements)s+=" "+y.validate;else if(v){var _=e.util.copy(e);_.level++,_.schema=y.validate,_.schemaPath="";var O=e.compositeRule;e.compositeRule=_.compositeRule=!0;var R=e.validate(_).replace(/validate\.schema/g,g);e.compositeRule=_.compositeRule=O,s+=" "+R}else if(!m){var I=I||[];I.push(s),s="",s+=" "+g+".call( ",s+=e.opts.passContext?"this":"self",s+=p||b.schema===!1?" , "+u+" ":" , "+a+" , "+u+" , validate.schema"+e.schemaPath+" ",s+=" , (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath),s+=i?" , data"+(i-1||"")+" , "+e.dataPathArr[i]+" ":" , parentData , parentDataProperty ",s+=" , rootData ) ";var A=s;s=I.pop(),b.errors!==!1&&(x?(j="customErrors"+o,s+=" var "+j+" = null; try { valid"+o+" = "+e.yieldAwait+A+"; } catch (e) { valid"+o+" = false; if (e instanceof ValidationError) "+j+" = e.errors; else throw e; } "):s+=" "+g+".errors = null; ")}s+="if (",w&&(s+=" !"+E+".validateSchema("+a+") || "),s+=" ! ",s+=m?b.statements?" valid"+o+" ":" ("+y.validate+") ":v?" valid"+_.level+" ":x?b.errors===!1?" ("+e.yieldAwait+A+") ":" valid"+o+" ":" "+A+" ",s+=") { ",t=P.keyword;var I=I||[];I.push(s),s="";var I=I||[];I.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(t||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+P.keyword+"' } ",e.opts.messages!==!1&&(s+=" , message: 'should pass \""+P.keyword+"\" keyword validation' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var k=s;s=I.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+k+"]); ":" validate.errors = ["+k+"]; return false; ":" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var q=s;return s=I.pop(),m?b.errors?"full"!=b.errors&&(s+=" for (var "+S+"="+f+"; "+S+"<errors; "+S+"++) { var "+$+" = vErrors["+S+"]; if ("+$+".dataPath === undefined) { "+$+".dataPath = (dataPath || '') + "+e.errorPath+"; } if ("+$+".schemaPath === undefined) { "+$+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(s+=" "+$+".schema = "+a+"; "+$+".data = "+u+"; "),s+=" } "):b.errors===!1?s+=" "+q+" ":(s+=" if ("+f+" == errors) { "+q+" } else { for (var "+S+"="+f+"; "+S+"<errors; "+S+"++) { var "+$+" = vErrors["+S+"]; if ("+$+".dataPath === undefined) { "+$+".dataPath = (dataPath || '') + "+e.errorPath+"; } if ("+$+".schemaPath === undefined) { "+$+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(s+=" "+$+".schema = "+a+"; "+$+".data = "+u+"; "),s+=" } } "):v?(s+=" var err = ",e.createErrors!==!1?(s+=" { keyword: '"+(t||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+P.keyword+"' } ",e.opts.messages!==!1&&(s+=" , message: 'should pass \""+P.keyword+"\" keyword validation' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ",s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&h&&(s+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false ")):b.errors===!1?s+=" "+q+" ":(s+=" if (Array.isArray("+j+")) { if (vErrors === null) vErrors = "+j+"; else vErrors = vErrors.concat("+j+"); errors = vErrors.length; for (var "+S+"="+f+"; "+S+"<errors; "+S+"++) { var "+$+" = vErrors["+S+"]; "+$+".dataPath = (dataPath || '') + "+e.errorPath+"; "+$+'.schemaPath = "'+c+'"; ',e.opts.verbose&&(s+=" "+$+".schema = "+a+"; "+$+".data = "+u+"; "),s+=" } } else { "+q+" } "),s+=" } ",h&&(s+=" else { "),s}},{}],22:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="errs__"+s,f=e.util.copy(e),d="";f.level++;var p={},m={};for(P in i){var v=i[P],y=Array.isArray(v)?m:p;y[P]=v}a+="var "+u+" = errors;";var g=e.errorPath;a+="var missing"+s+";";for(var P in m){if(y=m[P],a+=" if ("+h+e.util.getProperty(P)+" !== undefined ",c){a+=" && ( ";var E=y;if(E)for(var b,w=-1,j=E.length-1;w<j;){b=E[w+=1],w&&(a+=" || ");var S=e.util.getProperty(b);a+=" ( "+h+S+" === undefined && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?b:S)+") ) "}a+=")) { ";var $="missing"+s,x="' + "+$+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(g,$,!0):g+" + "+$);var _=_||[];_.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"dependencies")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(P)+"', missingProperty: '"+x+"', depsCount: "+y.length+", deps: '"+e.util.escapeQuotes(1==y.length?y[0]:y.join(", "))+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have ",a+=1==y.length?"property "+e.util.escapeQuotes(y[0]):"properties "+e.util.escapeQuotes(y.join(", ")),a+=" when property "+e.util.escapeQuotes(P)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var O=a;a=_.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+O+"]); ":" validate.errors = ["+O+"]; return false; ":" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var R=y;if(R)for(var I,A=-1,k=R.length-1;A<k;){I=R[A+=1];var S=e.util.getProperty(I),x=e.util.escapeQuotes(I);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(g,I,e.opts.jsonPointers)),a+=" if ("+h+S+" === undefined) { var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(t||"dependencies")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(P)+"', missingProperty: '"+x+"', depsCount: "+y.length+", deps: '"+e.util.escapeQuotes(1==y.length?y[0]:y.join(", "))+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have ",a+=1==y.length?"property "+e.util.escapeQuotes(y[0]):"properties "+e.util.escapeQuotes(y.join(", ")),a+=" when property "+e.util.escapeQuotes(P)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(d+="}",a+=" else { ")}e.errorPath=g;var q=f.baseId;for(var P in p){var v=p[P];e.util.schemaHasRules(v,e.RULES.all)&&(a+=" valid"+f.level+" = true; if ("+h+"['"+P+"'] !== undefined) { ",f.schema=v,f.schemaPath=n+e.util.getProperty(P),f.errSchemaPath=l+"/"+e.util.escapeFragment(P),a+=" "+e.validate(f)+" ",f.baseId=q,a+=" } ",c&&(a+=" if (valid"+f.level+") { ",d+="}"))}return c&&(a+=" "+d+" if ("+u+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],23:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+"."+r,c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f="valid"+o,d=e.opts.v5&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var p="i"+o;d||(s+=" var schema"+o+" = validate.schema"+l+";"),s+="var "+f+";",d&&(s+=" if (schema"+o+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+o+")) "+f+" = false; else {"),s+=""+f+" = false;for (var "+p+"=0; "+p+"<schema"+o+".length; "+p+"++) if (equal("+u+", schema"+o+"["+p+"])) { "+f+" = true; break; }",d&&(s+=" } "),s+=" if (!"+f+") { ";var m=m||[];m.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(t||"enum")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValues: schema"+o+" } ",e.opts.messages!==!1&&(s+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var v=s;return s=m.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" }",h&&(s+=" else { "),s}},{}],24:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||"");if(e.opts.format===!1)return c&&(a+=" if (true) { "),a;var u,f=e.opts.v5&&i&&i.$data;if(f?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",u="schema"+s):u=i,f){var d="format"+s;a+=" var "+d+" = formats["+u+"]; var isObject"+s+" = typeof "+d+" == 'object' && !("+d+" instanceof RegExp) && "+d+".validate; if (isObject"+s+") { var async"+s+" = "+d+".async; "+d+" = "+d+".validate; } if ( ",f&&(a+=" ("+u+" !== undefined && typeof "+u+" != 'string') || "),a+=" ("+d+" && !(typeof "+d+" == 'function' ? ",a+=e.async?" (async"+s+" ? "+e.yieldAwait+" "+d+"("+h+") : "+d+"("+h+")) ":" "+d+"("+h+") ",a+=" : "+d+".test("+h+")))) {"}else{var d=e.formats[i];if(!d)return c&&(a+=" if (true) { "),a;var p="object"==typeof d&&!(d instanceof RegExp)&&d.validate;if(p){var m=d.async===!0;d=d.validate}if(m){if(!e.async)throw new Error("async format in sync schema");var v="formats"+e.util.getProperty(i)+".validate";a+=" if (!("+e.yieldAwait+" "+v+"("+h+"))) { "}else{a+=" if (! ";var v="formats"+e.util.getProperty(i);p&&(v+=".validate"),a+="function"==typeof d?" "+v+"("+h+") ":" "+v+".test("+h+") ",a+=") { "}}var y=y||[];y.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"format")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=f?""+u:""+e.util.toQuotedString(i),a+=" } ",e.opts.messages!==!1&&(a+=" , message: 'should match format \"",a+=f?"' + "+u+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=f?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var g=a;return a=y.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+g+"]); ":" validate.errors = ["+g+"]; return false; ":" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a}},{}],25:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f="errs__"+s,d=e.util.copy(e),p="";d.level++;var m=d.dataLevel=e.dataLevel+1,v="data"+m,y=e.baseId;if(a+="var "+f+" = errors;var "+u+";",Array.isArray(i)){var g=e.schema.additionalItems;if(g===!1){a+=" "+u+" = "+h+".length <= "+i.length+"; ";var P=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+u+") { ";var E=E||[];E.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"additionalItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var b=a;a=E.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+b+"]); ":" validate.errors = ["+b+"]; return false; ":" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=P,c&&(p+="}",a+=" else { ")}var w=i;if(w)for(var j,S=-1,$=w.length-1;S<$;)if(j=w[S+=1],e.util.schemaHasRules(j,e.RULES.all)){a+=" valid"+d.level+" = true; if ("+h+".length > "+S+") { ";var x=h+"["+S+"]";d.schema=j,d.schemaPath=n+"["+S+"]",d.errSchemaPath=l+"/"+S,d.errorPath=e.util.getPathExpr(e.errorPath,S,e.opts.jsonPointers,!0),d.dataPathArr[m]=S;var _=e.validate(d);d.baseId=y,a+=e.util.varOccurences(_,v)<2?" "+e.util.varReplace(_,v,x)+" ":" var "+v+" = "+x+"; "+_+" ",a+=" } ",c&&(a+=" if (valid"+d.level+") { ",p+="}")}if("object"==typeof g&&e.util.schemaHasRules(g,e.RULES.all)){d.schema=g,d.schemaPath=e.schemaPath+".additionalItems",d.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" valid"+d.level+" = true; if ("+h+".length > "+i.length+") { for (var i"+s+" = "+i.length+"; i"+s+" < "+h+".length; i"+s+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,"i"+s,e.opts.jsonPointers,!0);var x=h+"[i"+s+"]";d.dataPathArr[m]="i"+s;var _=e.validate(d);d.baseId=y,a+=e.util.varOccurences(_,v)<2?" "+e.util.varReplace(_,v,x)+" ":" var "+v+" = "+x+"; "+_+" ",c&&(a+=" if (!valid"+d.level+") break; "),a+=" } } ",c&&(a+=" if (valid"+d.level+") { ",p+="}")}}else if(e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l,a+=" for (var i"+s+" = 0; i"+s+" < "+h+".length; i"+s+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,"i"+s,e.opts.jsonPointers,!0);var x=h+"[i"+s+"]";d.dataPathArr[m]="i"+s;var _=e.validate(d);d.baseId=y,a+=e.util.varOccurences(_,v)<2?" "+e.util.varReplace(_,v,x)+" ":" var "+v+" = "+x+"; "+_+" ",c&&(a+=" if (!valid"+d.level+") break; "),a+=" } ",c&&(a+=" if (valid"+d.level+") { ",p+="}")}return c&&(a+=" "+p+" if ("+f+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],26:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+"."+r,c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f=e.opts.v5&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,s+="var division"+o+";if (",f&&(s+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),s+=" (division"+o+" = "+u+" / "+a+", ",s+=e.opts.multipleOfPrecision?" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":" division"+o+" !== parseInt(division"+o+") ",s+=" ) ",f&&(s+=" ) "),s+=" ) { ";var d=d||[];d.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(t||"multipleOf")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",e.opts.messages!==!1&&(s+=" , message: 'should be multiple of ",s+=f?"' + "+a:""+n+"'"),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var p=s;return s=d.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",h&&(s+=" else { "),s}},{}],27:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="errs__"+s,f=e.util.copy(e);if(f.level++,e.util.schemaHasRules(i,e.RULES.all)){f.schema=i,f.schemaPath=n,f.errSchemaPath=l,a+=" var "+u+" = errors; ";var d=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.createErrors=!1;var p;f.opts.allErrors&&(p=f.opts.allErrors,f.opts.allErrors=!1),a+=" "+e.validate(f)+" ",f.createErrors=!0,p&&(f.opts.allErrors=p),e.compositeRule=f.compositeRule=d,a+=" if (valid"+f.level+") { ";var m=m||[];m.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"not")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var v=a;a=m.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(t||"not")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a}},{}],28:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f="errs__"+s,d=e.util.copy(e),p="";d.level++,a+="var "+f+" = errors;var prevValid"+s+" = false;var "+u+" = false;";var m=d.baseId,v=e.compositeRule;e.compositeRule=d.compositeRule=!0;var y=i;if(y)for(var g,P=-1,E=y.length-1;P<E;)g=y[P+=1],e.util.schemaHasRules(g,e.RULES.all)?(d.schema=g,d.schemaPath=n+"["+P+"]",d.errSchemaPath=l+"/"+P,a+=" "+e.validate(d)+" ",d.baseId=m):a+=" var valid"+d.level+" = true; ",P&&(a+=" if (valid"+d.level+" && prevValid"+s+") "+u+" = false; else { ",p+="}"),a+=" if (valid"+d.level+") "+u+" = prevValid"+s+" = true;";e.compositeRule=d.compositeRule=v,a+=""+p+"if (!"+u+") { ";var b=b||[];b.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"oneOf")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var w=a;return a=b.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+w+"]); ":" validate.errors = ["+w+"]; return false; ":" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a}},{}],29:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+"."+r,c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f=e.opts.v5&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d=f?"(new RegExp("+a+"))":e.usePattern(n);s+="if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),s+=" !"+d+".test("+u+") ) { ";var p=p||[];p.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(t||"pattern")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",s+=f?""+a:""+e.util.toQuotedString(n),s+=" } ",e.opts.messages!==!1&&(s+=" , message: 'should match pattern \"",s+=f?"' + "+a+" + '":""+e.util.escapeQuotes(n),s+="\"' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+e.util.toQuotedString(n),s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",h&&(s+=" else { "),s}},{}],30:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f="key"+s,d="patternMatched"+s,p="",m=e.opts.ownProperties;a+="var "+u+" = true;";var v=i;if(v)for(var y,g=-1,P=v.length-1;g<P;){y=v[g+=1],a+=" var "+d+" = false; for (var "+f+" in "+h+") { ",m&&(a+=" if (!Object.prototype.hasOwnProperty.call("+h+", "+f+")) continue; "),a+=" "+d+" = "+e.usePattern(y)+".test("+f+"); if ("+d+") break; } ";var E=e.util.escapeQuotes(y);a+=" if (!"+d+") { "+u+" = false; var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(t||"patternRequired")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingPattern: '"+E+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have property matching pattern \\'"+E+"\\'' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ",c&&(p+="}",a+=" else { ")}return a+=""+p}},{}],31:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f="errs__"+s,d=e.util.copy(e),p="";d.level++;var m="key"+s,v=d.dataLevel=e.dataLevel+1,y="data"+v,g=Object.keys(i||{}),P=e.schema.patternProperties||{},E=Object.keys(P),b=e.schema.additionalProperties,w=g.length||E.length,j=b===!1,S="object"==typeof b&&Object.keys(b).length,$=e.opts.removeAdditional,x=j||S||$,_=e.opts.ownProperties,O=e.baseId,R=e.schema.required;if(R&&(!e.opts.v5||!R.$data)&&R.length<e.opts.loopRequired)var I=e.util.toHash(R);if(e.opts.v5)var A=e.schema.patternGroups||{},k=Object.keys(A);if(a+="var "+f+" = errors;var valid"+d.level+" = true;",x){if(a+=" for (var "+m+" in "+h+") { ",_&&(a+=" if (!Object.prototype.hasOwnProperty.call("+h+", "+m+")) continue; "),w){if(a+=" var isAdditional"+s+" = !(false ",g.length)if(g.length>5)a+=" || validate.schema"+n+"["+m+"] ";else{var q=g;if(q)for(var L,D=-1,Q=q.length-1;D<Q;)L=q[D+=1],a+=" || "+m+" == "+e.util.toQuotedString(L)+" "}if(E.length){var C=E;if(C)for(var U,V=-1,z=C.length-1;V<z;)U=C[V+=1],a+=" || "+e.usePattern(U)+".test("+m+") "}if(e.opts.v5&&k&&k.length){var T=k;if(T)for(var M,V=-1,N=T.length-1;V<N;)M=T[V+=1],a+=" || "+e.usePattern(M)+".test("+m+") "}a+=" ); if (isAdditional"+s+") { "}if("all"==$)a+=" delete "+h+"["+m+"]; ";else{var F=e.errorPath,H="' + key"+s+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,"key"+s,e.opts.jsonPointers)),j)if($)a+=" delete "+h+"["+m+"]; ";else{a+=" valid"+d.level+" = false; ";var J=l;l=e.errSchemaPath+"/additionalProperties";var G=G||[];G.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"additionalProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+H+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have additional properties' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var K=a;a=G.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+K+"]); ":" validate.errors = ["+K+"]; return false; ":" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=J,c&&(a+=" break; ")}else if(S)if("failing"==$){a+=" var "+f+" = errors; ";var B=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.schema=b,d.schemaPath=e.schemaPath+".additionalProperties",d.errSchemaPath=e.errSchemaPath+"/additionalProperties",d.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,"key"+s,e.opts.jsonPointers);var Z=h+"[key"+s+"]";d.dataPathArr[v]="key"+s;var Y=e.validate(d);d.baseId=O,a+=e.util.varOccurences(Y,y)<2?" "+e.util.varReplace(Y,y,Z)+" ":" var "+y+" = "+Z+"; "+Y+" ",a+=" if (!valid"+d.level+") { errors = "+f+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+h+"["+m+"]; } ",e.compositeRule=d.compositeRule=B}else{d.schema=b,d.schemaPath=e.schemaPath+".additionalProperties",d.errSchemaPath=e.errSchemaPath+"/additionalProperties",d.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,"key"+s,e.opts.jsonPointers);var Z=h+"[key"+s+"]";d.dataPathArr[v]="key"+s;var Y=e.validate(d);d.baseId=O,a+=e.util.varOccurences(Y,y)<2?" "+e.util.varReplace(Y,y,Z)+" ":" var "+y+" = "+Z+"; "+Y+" ",c&&(a+=" if (!valid"+d.level+") break; ")}e.errorPath=F}w&&(a+=" } "),a+=" } ",c&&(a+=" if (valid"+d.level+") { ",p+="}")}var W=e.opts.useDefaults&&!e.compositeRule;if(g.length){var X=g;if(X)for(var L,ee=-1,re=X.length-1;ee<re;){L=X[ee+=1];var te=i[L];if(e.util.schemaHasRules(te,e.RULES.all)){var ae=e.util.getProperty(L),Z=h+ae,se=W&&void 0!==te.default;d.schema=te,d.schemaPath=n+ae,d.errSchemaPath=l+"/"+e.util.escapeFragment(L),d.errorPath=e.util.getPath(e.errorPath,L,e.opts.jsonPointers),d.dataPathArr[v]=e.util.toQuotedString(L);var Y=e.validate(d);if(d.baseId=O,e.util.varOccurences(Y,y)<2){Y=e.util.varReplace(Y,y,Z);var oe=Z}else{var oe=y;a+=" var "+y+" = "+Z+"; "}if(se)a+=" "+Y+" ";else{if(I&&I[L]){a+=" if ("+oe+" === undefined) { valid"+d.level+" = false; ";var F=e.errorPath,J=l,ie=e.util.escapeQuotes(L);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(F,L,e.opts.jsonPointers)),l=e.errSchemaPath+"/required";var G=G||[];G.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"required")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ie+"' } ",e.opts.messages!==!1&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+ie+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var K=a;a=G.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+K+"]); ":" validate.errors = ["+K+"]; return false; ":" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=J,e.errorPath=F,a+=" } else { "}else a+=c?" if ("+oe+" === undefined) { valid"+d.level+" = true; } else { ":" if ("+oe+" !== undefined) { ";a+=" "+Y+" } "}}c&&(a+=" if (valid"+d.level+") { ",p+="}")}}var ne=E;if(ne)for(var U,le=-1,ce=ne.length-1;le<ce;){U=ne[le+=1];var te=P[U];if(e.util.schemaHasRules(te,e.RULES.all)){d.schema=te,d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(U),d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(U),a+=" for (var "+m+" in "+h+") { ",_&&(a+=" if (!Object.prototype.hasOwnProperty.call("+h+", "+m+")) continue; "),a+=" if ("+e.usePattern(U)+".test("+m+")) { ",d.errorPath=e.util.getPathExpr(e.errorPath,"key"+s,e.opts.jsonPointers);var Z=h+"[key"+s+"]";d.dataPathArr[v]="key"+s;var Y=e.validate(d);d.baseId=O,a+=e.util.varOccurences(Y,y)<2?" "+e.util.varReplace(Y,y,Z)+" ":" var "+y+" = "+Z+"; "+Y+" ",c&&(a+=" if (!valid"+d.level+") break; "),a+=" } ",c&&(a+=" else valid"+d.level+" = true; "),a+=" } ",c&&(a+=" if (valid"+d.level+") { ",p+="}")}}if(e.opts.v5){var he=k;if(he)for(var M,ue=-1,fe=he.length-1;ue<fe;){
+M=he[ue+=1];var de=A[M],te=de.schema;if(e.util.schemaHasRules(te,e.RULES.all)){d.schema=te,d.schemaPath=e.schemaPath+".patternGroups"+e.util.getProperty(M)+".schema",d.errSchemaPath=e.errSchemaPath+"/patternGroups/"+e.util.escapeFragment(M)+"/schema",a+=" var pgPropCount"+s+" = 0; for (var "+m+" in "+h+") { ",_&&(a+=" if (!Object.prototype.hasOwnProperty.call("+h+", "+m+")) continue; "),a+=" if ("+e.usePattern(M)+".test("+m+")) { pgPropCount"+s+"++; ",d.errorPath=e.util.getPathExpr(e.errorPath,"key"+s,e.opts.jsonPointers);var Z=h+"[key"+s+"]";d.dataPathArr[v]="key"+s;var Y=e.validate(d);d.baseId=O,a+=e.util.varOccurences(Y,y)<2?" "+e.util.varReplace(Y,y,Z)+" ":" var "+y+" = "+Z+"; "+Y+" ",c&&(a+=" if (!valid"+d.level+") break; "),a+=" } ",c&&(a+=" else valid"+d.level+" = true; "),a+=" } ",c&&(a+=" if (valid"+d.level+") { ",p+="}");var pe=de.minimum,me=de.maximum;if(void 0!==pe||void 0!==me){a+=" var "+u+" = true; ";var J=l;if(void 0!==pe){var ve=pe,ye="minimum",ge="less";a+=" "+u+" = pgPropCount"+s+" >= "+pe+"; ",l=e.errSchemaPath+"/patternGroups/minimum",a+=" if (!"+u+") { ";var G=G||[];G.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"patternGroups")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { reason: '"+ye+"', limit: "+ve+", pattern: '"+e.util.escapeQuotes(M)+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have "+ge+" than "+ve+' properties matching pattern "'+e.util.escapeQuotes(M)+"\"' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var K=a;a=G.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+K+"]); ":" validate.errors = ["+K+"]; return false; ":" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",void 0!==me&&(a+=" else ")}if(void 0!==me){var ve=me,ye="maximum",ge="more";a+=" "+u+" = pgPropCount"+s+" <= "+me+"; ",l=e.errSchemaPath+"/patternGroups/maximum",a+=" if (!"+u+") { ";var G=G||[];G.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"patternGroups")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { reason: '"+ye+"', limit: "+ve+", pattern: '"+e.util.escapeQuotes(M)+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have "+ge+" than "+ve+' properties matching pattern "'+e.util.escapeQuotes(M)+"\"' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var K=a;a=G.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+K+"]); ":" validate.errors = ["+K+"]; return false; ":" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}l=J,c&&(a+=" if ("+u+") { ",p+="}")}}}}return c&&(a+=" "+p+" if ("+f+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],32:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s,o=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(n||""),f="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,s="validate"):(a=e.root.schema.$async===!0,s="root.refVal[0]");else{var d=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===d){var p="can't resolve reference "+l+" from id "+e.baseId;if("fail"==e.opts.missingRefs){console.log(p);var m=m||[];m.push(o),o="",e.createErrors!==!1?(o+=" { keyword: '"+(t||"$ref")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",e.opts.messages!==!1&&(o+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(o+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),o+=" } "):o+=" {} ";var v=o;o=m.pop(),o+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",h&&(o+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs){var y=new Error(p);throw y.missingRef=e.resolve.url(e.baseId,l),y.missingSchema=e.resolve.normalizeId(e.resolve.fullPath(y.missingRef)),y}console.log(p),h&&(o+=" if (true) { ")}}else if(d.inline){var g=e.util.copy(e);g.level++,g.schema=d.schema,g.schemaPath="",g.errSchemaPath=l;var P=e.validate(g).replace(/validate\.schema/g,d.code);o+=" "+P+" ",h&&(o+=" if (valid"+g.level+") { ")}else a=d.$async===!0,s=d.code}if(s){var m=m||[];m.push(o),o="",o+=e.opts.passContext?" "+s+".call(this, ":" "+s+"( ",o+=" "+u+", (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath),o+=n?" , data"+(n-1||"")+" , "+e.dataPathArr[n]+" ":" , parentData , parentDataProperty ",o+=", rootData) ";var E=o;if(o=m.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");o+=" try { ",h&&(o+="var "+f+" ="),o+=" "+e.yieldAwait+" "+E+"; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ",h&&(o+=" if ("+f+") { ")}else o+=" if (!"+E+") { if (vErrors === null) vErrors = "+s+".errors; else vErrors = vErrors.concat("+s+".errors); errors = vErrors.length; } ",h&&(o+=" else { ")}return o}},{}],33:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+"."+r,c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f="valid"+o,d=e.opts.v5&&n&&n.$data;if(d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,!d)if(n.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var p=[],m=n;if(m)for(var v,y=-1,g=m.length-1;y<g;){v=m[y+=1];var P=e.schema.properties[v];P&&e.util.schemaHasRules(P,e.RULES.all)||(p[p.length]=v)}}else var p=n;if(d||p.length){var E=e.errorPath,b=d||p.length>=e.opts.loopRequired;if(h)if(s+=" var missing"+o+"; ",b){d||(s+=" var schema"+o+" = validate.schema"+l+"; ");var w="i"+o,j="schema"+o+"["+w+"]",S="' + "+j+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,j,e.opts.jsonPointers)),s+=" var "+f+" = true; ",d&&(s+=" if (schema"+o+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+o+")) "+f+" = false; else {"),s+=" for (var "+w+" = 0; "+w+" < schema"+o+".length; "+w+"++) { "+f+" = "+u+"[schema"+o+"["+w+"]] !== undefined; if (!"+f+") break; } ",d&&(s+=" } "),s+=" if (!"+f+") { ";var $=$||[];$.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(t||"required")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+S+"' } ",e.opts.messages!==!1&&(s+=" , message: '",s+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+S+"\\'",s+="' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var x=s;s=$.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else { "}else{s+=" if ( ";var _=p;if(_)for(var O,w=-1,R=_.length-1;w<R;){O=_[w+=1],w&&(s+=" || ");var I=e.util.getProperty(O);s+=" ( "+u+I+" === undefined && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?O:I)+") ) "}s+=") { ";var j="missing"+o,S="' + "+j+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(E,j,!0):E+" + "+j);var $=$||[];$.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(t||"required")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+S+"' } ",e.opts.messages!==!1&&(s+=" , message: '",s+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+S+"\\'",s+="' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var x=s;s=$.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else { "}else if(b){d||(s+=" var schema"+o+" = validate.schema"+l+"; ");var w="i"+o,j="schema"+o+"["+w+"]",S="' + "+j+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,j,e.opts.jsonPointers)),d&&(s+=" if (schema"+o+" && !Array.isArray(schema"+o+")) { var err = ",e.createErrors!==!1?(s+=" { keyword: '"+(t||"required")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+S+"' } ",e.opts.messages!==!1&&(s+=" , message: '",s+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+S+"\\'",s+="' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ",s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (schema"+o+" !== undefined) { "),s+=" for (var "+w+" = 0; "+w+" < schema"+o+".length; "+w+"++) { if ("+u+"[schema"+o+"["+w+"]] === undefined) { var err = ",e.createErrors!==!1?(s+=" { keyword: '"+(t||"required")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+S+"' } ",e.opts.messages!==!1&&(s+=" , message: '",s+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+S+"\\'",s+="' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ",s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",d&&(s+=" } ")}else{var A=p;if(A)for(var k,q=-1,L=A.length-1;q<L;){k=A[q+=1];var I=e.util.getProperty(k),S=e.util.escapeQuotes(k);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(E,k,e.opts.jsonPointers)),s+=" if ("+u+I+" === undefined) { var err = ",e.createErrors!==!1?(s+=" { keyword: '"+(t||"required")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+S+"' } ",e.opts.messages!==!1&&(s+=" , message: '",s+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+S+"\\'",s+="' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ",s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=E}else h&&(s+=" if (true) {");return s}},{}],34:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f="errs__"+s,d=e.util.copy(e),p="";d.level++;var m,v="ifPassed"+e.level,y=d.baseId;a+="var "+v+";";var g=i;if(g)for(var P,E=-1,b=g.length-1;E<b;){if(P=g[E+=1],E&&!m&&(a+=" if (!"+v+") { ",p+="}"),P.if&&e.util.schemaHasRules(P.if,e.RULES.all)){a+=" var "+f+" = errors; ";var w=e.compositeRule;if(e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.schema=P.if,d.schemaPath=n+"["+E+"].if",d.errSchemaPath=l+"/"+E+"/if",a+=" "+e.validate(d)+" ",d.baseId=y,d.createErrors=!0,e.compositeRule=d.compositeRule=w,a+=" "+v+" = valid"+d.level+"; if ("+v+") { ","boolean"==typeof P.then){if(P.then===!1){var j=j||[];j.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"switch")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { caseIndex: "+E+" } ",e.opts.messages!==!1&&(a+=" , message: 'should pass \"switch\" keyword validation' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var S=a;a=j.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" var valid"+d.level+" = "+P.then+"; "}else d.schema=P.then,d.schemaPath=n+"["+E+"].then",d.errSchemaPath=l+"/"+E+"/then",a+=" "+e.validate(d)+" ",d.baseId=y;a+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } } "}else if(a+=" "+v+" = true; ","boolean"==typeof P.then){if(P.then===!1){var j=j||[];j.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"switch")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { caseIndex: "+E+" } ",e.opts.messages!==!1&&(a+=" , message: 'should pass \"switch\" keyword validation' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var S=a;a=j.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" var valid"+d.level+" = "+P.then+"; "}else d.schema=P.then,d.schemaPath=n+"["+E+"].then",d.errSchemaPath=l+"/"+E+"/then",a+=" "+e.validate(d)+" ",d.baseId=y;m=P.continue}return a+=""+p+"var "+u+" = valid"+d.level+"; ",a=e.util.cleanUpCode(a)}},{}],35:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+"."+r,c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f="valid"+o,d=e.opts.v5&&n&&n.$data;if(d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,(n||d)&&e.opts.uniqueItems!==!1){d&&(s+=" var "+f+"; if ("+a+" === false || "+a+" === undefined) "+f+" = true; else if (typeof "+a+" != 'boolean') "+f+" = false; else { "),s+=" var "+f+" = true; if ("+u+".length > 1) { var i = "+u+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+u+"[i], "+u+"[j])) { "+f+" = false; break outer; } } } } ",d&&(s+=" } "),s+=" if (!"+f+") { ";var p=p||[];p.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(t||"uniqueItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",e.opts.messages!==!1&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;s=p.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",h&&(s+=" else { ")}else h&&(s+=" if (true) { ");return s}},{}],36:[function(e,r,t){"use strict";r.exports=function(e,r){function t(e){for(var r=0;r<e.rules.length;r++)if(a(e.rules[r]))return!0}function a(r){return void 0!==e.schema[r.keyword]||"properties"==r.keyword&&(e.schema.additionalProperties===!1||"object"==typeof e.schema.additionalProperties||e.schema.patternProperties&&Object.keys(e.schema.patternProperties).length||e.opts.v5&&e.schema.patternGroups&&Object.keys(e.schema.patternGroups).length)}var s="",o=e.schema.$async===!0;if(e.isTop){var i=e.isTop,n=e.level=0,l=e.dataLevel=0,c="data";if(e.rootId=e.resolve.fullPath(e.root.schema.id),e.baseId=e.baseId||e.rootId,o){e.async=!0;var h="es7"==e.opts.async;e.yieldAwait=h?"await":"yield"}delete e.isTop,e.dataPathArr=[void 0],s+=" var validate = ",o?h?s+=" (async function ":("co*"==e.opts.async&&(s+="co.wrap"),s+="(function* "):s+=" (function ",s+=" (data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; var vErrors = null; ",s+=" var errors = 0; ",s+=" if (rootData === undefined) rootData = data;"}else{var n=e.level,l=e.dataLevel,c="data"+(l||"");if(e.schema.id&&(e.baseId=e.resolve.url(e.baseId,e.schema.id)),o&&!e.async)throw new Error("async schema in sync schema");s+=" var errs_"+n+" = errors;"}var u,f="valid"+n,d=!e.opts.allErrors,p="",m="",v=e.schema.type,y=Array.isArray(v);if(v&&e.opts.coerceTypes){var g=e.util.coerceToTypes(e.opts.coerceTypes,v);if(g){var P=e.schemaPath+".type",E=e.errSchemaPath+"/type",b=y?"checkDataTypes":"checkDataType";s+=" if ("+e.util[b](v,c,!0)+") { ";var w="dataType"+n,j="coerced"+n;s+=" var "+w+" = typeof "+c+"; ","array"==e.opts.coerceTypes&&(s+=" if ("+w+" == 'object' && Array.isArray("+c+")) "+w+" = 'array'; "),s+=" var "+j+" = undefined; ";var S="",$=g;if($)for(var x,_=-1,O=$.length-1;_<O;)x=$[_+=1],_&&(s+=" if ("+j+" === undefined) { ",S+="}"),"array"==e.opts.coerceTypes&&"array"!=x&&(s+=" if ("+w+" == 'array' && "+c+".length == 1) { "+j+" = "+c+" = "+c+"[0]; "+w+" = typeof "+c+"; } "),"string"==x?s+=" if ("+w+" == 'number' || "+w+" == 'boolean') "+j+" = '' + "+c+"; else if ("+c+" === null) "+j+" = ''; ":"number"==x||"integer"==x?(s+=" if ("+w+" == 'boolean' || "+c+" === null || ("+w+" == 'string' && "+c+" && "+c+" == +"+c+" ","integer"==x&&(s+=" && !("+c+" % 1)"),s+=")) "+j+" = +"+c+"; "):"boolean"==x?s+=" if ("+c+" === 'false' || "+c+" === 0 || "+c+" === null) "+j+" = false; else if ("+c+" === 'true' || "+c+" === 1) "+j+" = true; ":"null"==x?s+=" if ("+c+" === '' || "+c+" === 0 || "+c+" === false) "+j+" = null; ":"array"==e.opts.coerceTypes&&"array"==x&&(s+=" if ("+w+" == 'string' || "+w+" == 'number' || "+w+" == 'boolean' || "+c+" == null) "+j+" = ["+c+"]; ");s+=" "+S+" if ("+j+" === undefined) { ";var R=R||[];R.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(u||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(E)+" , params: { type: '",s+=y?""+v.join(","):""+v,s+="' } ",e.opts.messages!==!1&&(s+=" , message: 'should be ",s+=y?""+v.join(","):""+v,s+="' "),e.opts.verbose&&(s+=" , schema: validate.schema"+P+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var I=s;if(s=R.pop(),s+=!e.compositeRule&&d?e.async?" throw new ValidationError(["+I+"]); ":" validate.errors = ["+I+"]; return false; ":" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else { ",l){var A="data"+(l-1||""),k=e.dataPathArr[l];s+=" "+c+" = "+A+"["+k+"] = "+j+"; "}else s+=" data = "+j+"; if (parentData !== undefined) parentData[parentDataProperty] = "+j+"; ";s+=" } } "}}var q;if(e.schema.$ref&&(q=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"))){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'"');"ignore"==e.opts.extendRefs?(q=!1,console.log('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"')):e.opts.extendRefs!==!0&&console.log('$ref: all keywords used in schema at path "'+e.errSchemaPath+'". It will change in the next major version, see issue #260. Use option { extendRefs: true } to keep current behaviour')}if(e.schema.$ref&&!q)s+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",d&&(s+=" } if (errors === ",s+=i?"0":"errs_"+n,s+=") { ",m+="}");else{var L=e.RULES;if(L)for(var D,Q=-1,C=L.length-1;Q<C;)if(D=L[Q+=1],t(D)){if(D.type&&(s+=" if ("+e.util.checkDataType(D.type,c)+") { "),e.opts.useDefaults&&!e.compositeRule)if("object"==D.type&&e.schema.properties){var U=e.schema.properties,V=Object.keys(U),z=V;if(z)for(var T,M=-1,N=z.length-1;M<N;){T=z[M+=1];var F=U[T];if(void 0!==F.default){var H=c+e.util.getProperty(T);s+=" if ("+H+" === undefined) "+H+" = ",s+="shared"==e.opts.useDefaults?" "+e.useDefault(F.default)+" ":" "+JSON.stringify(F.default)+" ",s+="; "}}}else if("array"==D.type&&Array.isArray(e.schema.items)){var J=e.schema.items;if(J)for(var F,_=-1,G=J.length-1;_<G;)if(F=J[_+=1],void 0!==F.default){var H=c+"["+_+"]";s+=" if ("+H+" === undefined) "+H+" = ",s+="shared"==e.opts.useDefaults?" "+e.useDefault(F.default)+" ":" "+JSON.stringify(F.default)+" ",s+="; "}}var K=D.rules;if(K)for(var B,Z=-1,Y=K.length-1;Z<Y;)B=K[Z+=1],a(B)&&(s+=" "+B.code(e,B.keyword)+" ",d&&(p+="}"));if(d&&(s+=" "+p+" ",p=""),D.type&&(s+=" } ",v&&v===D.type)){var W=!0;s+=" else { ";var P=e.schemaPath+".type",E=e.errSchemaPath+"/type",R=R||[];R.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(u||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(E)+" , params: { type: '",s+=y?""+v.join(","):""+v,s+="' } ",e.opts.messages!==!1&&(s+=" , message: 'should be ",s+=y?""+v.join(","):""+v,s+="' "),e.opts.verbose&&(s+=" , schema: validate.schema"+P+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var I=s;s=R.pop(),s+=!e.compositeRule&&d?e.async?" throw new ValidationError(["+I+"]); ":" validate.errors = ["+I+"]; return false; ":" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } "}d&&(s+=" if (errors === ",s+=i?"0":"errs_"+n,s+=") { ",m+="}")}}if(v&&!W&&(!e.opts.coerceTypes||!g)){var P=e.schemaPath+".type",E=e.errSchemaPath+"/type",b=y?"checkDataTypes":"checkDataType";s+=" if ("+e.util[b](v,c,!0)+") { ";var R=R||[];R.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(u||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(E)+" , params: { type: '",s+=y?""+v.join(","):""+v,s+="' } ",e.opts.messages!==!1&&(s+=" , message: 'should be ",s+=y?""+v.join(","):""+v,s+="' "),e.opts.verbose&&(s+=" , schema: validate.schema"+P+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var I=s;s=R.pop(),s+=!e.compositeRule&&d?e.async?" throw new ValidationError(["+I+"]); ":" validate.errors = ["+I+"]; return false; ":" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" }"}return d&&(s+=" "+m+" "),i?(o?(s+=" if (errors === 0) return true; ",s+=" else throw new ValidationError(vErrors); "):(s+=" validate.errors = vErrors; ",s+=" return errors === 0; "),s+=" }); return validate;"):s+=" var "+f+" = errors === errs_"+n+";",s=e.util.cleanUpCode(s),i&&d&&(s=e.util.cleanUpVarErrors(s,o)),s}},{}],37:[function(e,r,t){"use strict";var a=/^[a-z_$][a-z0-9_$]*$/i,s=e("./dotjs/custom");r.exports=function(e,r){function t(e,r,t){for(var a,o=0;o<i.RULES.length;o++){var n=i.RULES[o];if(n.type==r){a=n;break}}a||(a={type:r,rules:[]},i.RULES.push(a));var l={keyword:e,definition:t,custom:!0,code:s};a.rules.push(l),i.RULES.custom[e]=l}function o(e){if(!i.RULES.types[e])throw new Error("Unknown type "+e)}var i=this;if(this.RULES.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!a.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){var n=r.type;if(Array.isArray(n)){var l,c=n.length;for(l=0;l<c;l++)o(n[l]);for(l=0;l<c;l++)t(e,n[l],r)}else n&&o(n),t(e,n,r);var h=r.$data===!0&&this._opts.v5;if(h&&!r.validate)throw new Error('$data support: neither "validate" nor "compile" functions are defined');var u=r.metaSchema;u&&(h&&(u={anyOf:[u,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#/definitions/$data"}]}),r.validateSchema=i.compile(u,!0))}this.RULES.keywords[e]=this.RULES.all[e]=!0}},{"./dotjs/custom":21}],38:[function(e,r,t){r.exports={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}}},{}],39:[function(e,r,t){r.exports={id:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema (v5 proposals)",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},$data:{type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{anyOf:[{type:"number",minimum:0,exclusiveMinimum:!0},{$ref:"#/definitions/$data"}]},maximum:{anyOf:[{type:"number"},{$ref:"#/definitions/$data"}]},exclusiveMaximum:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},minimum:{anyOf:[{type:"number"},{$ref:"#/definitions/$data"}]},exclusiveMinimum:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},maxLength:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minLength:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},pattern:{anyOf:[{type:"string",format:"regex"},{$ref:"#/definitions/$data"}]},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"},{$ref:"#/definitions/$data"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minItems:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},uniqueItems:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},maxProperties:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minProperties:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},required:{anyOf:[{$ref:"#/definitions/stringArray"},{$ref:"#/definitions/$data"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"},{$ref:"#/definitions/$data"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{anyOf:[{type:"array",minItems:1,uniqueItems:!0},{$ref:"#/definitions/$data"}]},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"},format:{anyOf:[{type:"string"},{$ref:"#/definitions/$data"}]},formatMaximum:{anyOf:[{type:"string"},{$ref:"#/definitions/$data"}]},formatMinimum:{anyOf:[{type:"string"},{$ref:"#/definitions/$data"}]},formatExclusiveMaximum:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},formatExclusiveMinimum:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},constant:{anyOf:[{},{$ref:"#/definitions/$data"}]},contains:{$ref:"#"},patternGroups:{type:"object",additionalProperties:{type:"object",required:["schema"],properties:{maximum:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minimum:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},schema:{$ref:"#"}},additionalProperties:!1},default:{}},switch:{type:"array",items:{required:["then"],properties:{if:{$ref:"#"},then:{anyOf:[{type:"boolean"},{$ref:"#"}]},continue:{type:"boolean"}},additionalProperties:!1,dependencies:{continue:["if"]}}}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"],formatMaximum:["format"],formatMinimum:["format"],formatExclusiveMaximum:["formatMaximum"],formatExclusiveMinimum:["formatMinimum"]},default:{}}},{}],40:[function(e,r,t){"use strict";function a(r){function t(e,t,s){var o={inline:s||a[e],statements:!0,errors:"full"};t&&(o.type=t),r.addKeyword(e,o)}var a={switch:e("./dotjs/switch"),constant:e("./dotjs/constant"),_formatLimit:e("./dotjs/_formatLimit"),patternRequired:e("./dotjs/patternRequired")};if(r._opts.meta!==!1){var i=e("./refs/json-schema-v5.json");r.addMetaSchema(i,o)}t("constant"),r.addKeyword("contains",{type:"array",macro:s}),t("formatMaximum","string",a._formatLimit),t("formatMinimum","string",a._formatLimit),r.addKeyword("formatExclusiveMaximum"),r.addKeyword("formatExclusiveMinimum"),r.addKeyword("patternGroups"),t("patternRequired","object"),t("switch")}function s(e){return{not:{items:{not:e}}}}var o="https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json";r.exports={enable:a,META_SCHEMA_ID:o}},{"./dotjs/_formatLimit":13,"./dotjs/constant":20,"./dotjs/patternRequired":30,"./dotjs/switch":34,"./refs/json-schema-v5.json":39}],41:[function(r,t,a){(function(r){!function(s){function o(e){throw new RangeError(L[e])}function i(e,r){for(var t=e.length,a=[];t--;)a[t]=r(e[t]);return a}function n(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]),e=e.replace(q,".");var s=e.split("."),o=i(s,r).join(".");return a+o}function l(e){for(var r,t,a=[],s=0,o=e.length;s<o;)r=e.charCodeAt(s++),r>=55296&&r<=56319&&s<o?(t=e.charCodeAt(s++),56320==(64512&t)?a.push(((1023&r)<<10)+(1023&t)+65536):(a.push(r),s--)):a.push(r);return a}function c(e){return i(e,function(e){var r="";return e>65535&&(e-=65536,r+=C(e>>>10&1023|55296),e=56320|1023&e),r+=C(e)}).join("")}function h(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:j}function u(e,r){return e+22+75*(e<26)-((0!=r)<<5)}function f(e,r,t){var a=0;for(e=t?Q(e/_):e>>1,e+=Q(e/r);e>D*$>>1;a+=j)e=Q(e/D);return Q(a+(D+1)*e/(e+x))}function d(e){var r,t,a,s,i,n,l,u,d,p,m=[],v=e.length,y=0,g=R,P=O;for(t=e.lastIndexOf(I),t<0&&(t=0),a=0;a<t;++a)e.charCodeAt(a)>=128&&o("not-basic"),
+m.push(e.charCodeAt(a));for(s=t>0?t+1:0;s<v;){for(i=y,n=1,l=j;s>=v&&o("invalid-input"),u=h(e.charCodeAt(s++)),(u>=j||u>Q((w-y)/n))&&o("overflow"),y+=u*n,d=l<=P?S:l>=P+$?$:l-P,!(u<d);l+=j)p=j-d,n>Q(w/p)&&o("overflow"),n*=p;r=m.length+1,P=f(y-i,r,0==i),Q(y/r)>w-g&&o("overflow"),g+=Q(y/r),y%=r,m.splice(y++,0,g)}return c(m)}function p(e){var r,t,a,s,i,n,c,h,d,p,m,v,y,g,P,E=[];for(e=l(e),v=e.length,r=R,t=0,i=O,n=0;n<v;++n)m=e[n],m<128&&E.push(C(m));for(a=s=E.length,s&&E.push(I);a<v;){for(c=w,n=0;n<v;++n)m=e[n],m>=r&&m<c&&(c=m);for(y=a+1,c-r>Q((w-t)/y)&&o("overflow"),t+=(c-r)*y,r=c,n=0;n<v;++n)if(m=e[n],m<r&&++t>w&&o("overflow"),m==r){for(h=t,d=j;p=d<=i?S:d>=i+$?$:d-i,!(h<p);d+=j)P=h-p,g=j-p,E.push(C(u(p+P%g,0))),h=Q(P/g);E.push(C(u(h,0))),i=f(t,y,a==s),t=0,++a}++t,++r}return E.join("")}function m(e){return n(e,function(e){return A.test(e)?d(e.slice(4).toLowerCase()):e})}function v(e){return n(e,function(e){return k.test(e)?"xn--"+p(e):e})}var y="object"==typeof a&&a&&!a.nodeType&&a,g="object"==typeof t&&t&&!t.nodeType&&t,P="object"==typeof r&&r;P.global!==P&&P.window!==P&&P.self!==P||(s=P);var E,b,w=2147483647,j=36,S=1,$=26,x=38,_=700,O=72,R=128,I="-",A=/^xn--/,k=/[^\x20-\x7E]/,q=/[\x2E\u3002\uFF0E\uFF61]/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=j-S,Q=Math.floor,C=String.fromCharCode;if(E={version:"1.4.1",ucs2:{decode:l,encode:c},decode:d,encode:p,toASCII:v,toUnicode:m},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return E});else if(y&&g)if(t.exports==y)g.exports=E;else for(b in E)E.hasOwnProperty(b)&&(y[b]=E[b]);else s.punycode=E}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],42:[function(e,r,t){"use strict";function a(e,r){return Object.prototype.hasOwnProperty.call(e,r)}r.exports=function(e,r,t,o){r=r||"&",t=t||"=";var i={};if("string"!=typeof e||0===e.length)return i;var n=/\+/g;e=e.split(r);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var h=0;h<c;++h){var u,f,d,p,m=e[h].replace(n,"%20"),v=m.indexOf(t);v>=0?(u=m.substr(0,v),f=m.substr(v+1)):(u=m,f=""),d=decodeURIComponent(u),p=decodeURIComponent(f),a(i,d)?s(i[d])?i[d].push(p):i[d]=[i[d],p]:i[d]=p}return i};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],43:[function(e,r,t){"use strict";function a(e,r){if(e.map)return e.map(r);for(var t=[],a=0;a<e.length;a++)t.push(r(e[a],a));return t}var s=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};r.exports=function(e,r,t,n){return r=r||"&",t=t||"=",null===e&&(e=void 0),"object"==typeof e?a(i(e),function(i){var n=encodeURIComponent(s(i))+t;return o(e[i])?a(e[i],function(e){return n+encodeURIComponent(s(e))}).join(r):n+encodeURIComponent(s(e[i]))}).join(r):n?encodeURIComponent(s(n))+t+encodeURIComponent(s(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=Object.keys||function(e){var r=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.push(t);return r}},{}],44:[function(e,r,t){"use strict";t.decode=t.parse=e("./decode"),t.encode=t.stringify=e("./encode")},{"./decode":42,"./encode":43}],45:[function(e,r,t){"use strict";function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function s(e,r,t){if(e&&c.isObject(e)&&e instanceof a)return e;var s=new a;return s.parse(e,r,t),s}function o(e){return c.isString(e)&&(e=s(e)),e instanceof a?e.format():a.prototype.format.call(e)}function i(e,r){return s(e,!1,!0).resolve(r)}function n(e,r){return e?s(e,!1,!0).resolveObject(r):r}var l=e("punycode"),c=e("./util");t.parse=s,t.resolve=i,t.resolveObject=n,t.format=o,t.Url=a;var h=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),m=["'"].concat(p),v=["%","/","?",";","#"].concat(m),y=["/","?","#"],g=255,P=/^[+a-z0-9A-Z_-]{0,63}$/,E=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},j={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},S=e("querystring");a.prototype.parse=function(e,r,t){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=a!==-1&&a<e.indexOf("#")?"?":"#",o=e.split(s),i=/\\/g;o[0]=o[0].replace(i,"/"),e=o.join(s);var n=e;if(n=n.trim(),!t&&1===e.split("#").length){var u=f.exec(n);if(u)return this.path=n,this.href=n,this.pathname=u[1],u[2]?(this.search=u[2],this.query=r?S.parse(this.search.substr(1)):this.search.substr(1)):r&&(this.search="",this.query={}),this}var d=h.exec(n);if(d){d=d[0];var p=d.toLowerCase();this.protocol=p,n=n.substr(d.length)}if(t||d||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var $="//"===n.substr(0,2);!$||d&&w[d]||(n=n.substr(2),this.slashes=!0)}if(!w[d]&&($||d&&!j[d])){for(var x=-1,_=0;_<y.length;_++){var O=n.indexOf(y[_]);O!==-1&&(x===-1||O<x)&&(x=O)}var R,I;I=x===-1?n.lastIndexOf("@"):n.lastIndexOf("@",x),I!==-1&&(R=n.slice(0,I),n=n.slice(I+1),this.auth=decodeURIComponent(R)),x=-1;for(var _=0;_<v.length;_++){var O=n.indexOf(v[_]);O!==-1&&(x===-1||O<x)&&(x=O)}x===-1&&(x=n.length),this.host=n.slice(0,x),n=n.slice(x),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var k=this.hostname.split(/\./),_=0,q=k.length;_<q;_++){var L=k[_];if(L&&!L.match(P)){for(var D="",Q=0,C=L.length;Q<C;Q++)D+=L.charCodeAt(Q)>127?"x":L[Q];if(!D.match(P)){var U=k.slice(0,_),V=k.slice(_+1),z=L.match(E);z&&(U.push(z[1]),V.unshift(z[2])),V.length&&(n="/"+V.join(".")+n),this.hostname=U.join(".");break}}}this.hostname=this.hostname.length>g?"":this.hostname.toLowerCase(),A||(this.hostname=l.toASCII(this.hostname));var T=this.port?":"+this.port:"",M=this.hostname||"";this.host=M+T,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!b[p])for(var _=0,q=m.length;_<q;_++){var N=m[_];if(n.indexOf(N)!==-1){var F=encodeURIComponent(N);F===N&&(F=escape(N)),n=n.split(N).join(F)}}var H=n.indexOf("#");H!==-1&&(this.hash=n.substr(H),n=n.slice(0,H));var J=n.indexOf("?");if(J!==-1?(this.search=n.substr(J),this.query=n.substr(J+1),r&&(this.query=S.parse(this.query)),n=n.slice(0,J)):r&&(this.search="",this.query={}),n&&(this.pathname=n),j[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var T=this.pathname||"",G=this.search||"";this.path=T+G}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var r=this.protocol||"",t=this.pathname||"",a=this.hash||"",s=!1,o="";this.host?s=e+this.host:this.hostname&&(s=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(s+=":"+this.port)),this.query&&c.isObject(this.query)&&Object.keys(this.query).length&&(o=S.stringify(this.query));var i=this.search||o&&"?"+o||"";return r&&":"!==r.substr(-1)&&(r+=":"),this.slashes||(!r||j[r])&&s!==!1?(s="//"+(s||""),t&&"/"!==t.charAt(0)&&(t="/"+t)):s||(s=""),a&&"#"!==a.charAt(0)&&(a="#"+a),i&&"?"!==i.charAt(0)&&(i="?"+i),t=t.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),i=i.replace("#","%23"),r+s+t+i+a},a.prototype.resolve=function(e){return this.resolveObject(s(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(c.isString(e)){var r=new a;r.parse(e,!1,!0),e=r}for(var t=new a,s=Object.keys(this),o=0;o<s.length;o++){var i=s[o];t[i]=this[i]}if(t.hash=e.hash,""===e.href)return t.href=t.format(),t;if(e.slashes&&!e.protocol){for(var n=Object.keys(e),l=0;l<n.length;l++){var h=n[l];"protocol"!==h&&(t[h]=e[h])}return j[t.protocol]&&t.hostname&&!t.pathname&&(t.path=t.pathname="/"),t.href=t.format(),t}if(e.protocol&&e.protocol!==t.protocol){if(!j[e.protocol]){for(var u=Object.keys(e),f=0;f<u.length;f++){var d=u[f];t[d]=e[d]}return t.href=t.format(),t}if(t.protocol=e.protocol,e.host||w[e.protocol])t.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),t.pathname=p.join("/")}if(t.search=e.search,t.query=e.query,t.host=e.host||"",t.auth=e.auth,t.hostname=e.hostname||e.host,t.port=e.port,t.pathname||t.search){var m=t.pathname||"",v=t.search||"";t.path=m+v}return t.slashes=t.slashes||e.slashes,t.href=t.format(),t}var y=t.pathname&&"/"===t.pathname.charAt(0),g=e.host||e.pathname&&"/"===e.pathname.charAt(0),P=g||y||t.host&&e.pathname,E=P,b=t.pathname&&t.pathname.split("/")||[],p=e.pathname&&e.pathname.split("/")||[],S=t.protocol&&!j[t.protocol];if(S&&(t.hostname="",t.port=null,t.host&&(""===b[0]?b[0]=t.host:b.unshift(t.host)),t.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),P=P&&(""===p[0]||""===b[0])),g)t.host=e.host||""===e.host?e.host:t.host,t.hostname=e.hostname||""===e.hostname?e.hostname:t.hostname,t.search=e.search,t.query=e.query,b=p;else if(p.length)b||(b=[]),b.pop(),b=b.concat(p),t.search=e.search,t.query=e.query;else if(!c.isNullOrUndefined(e.search)){if(S){t.hostname=t.host=b.shift();var $=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@");$&&(t.auth=$.shift(),t.host=t.hostname=$.shift())}return t.search=e.search,t.query=e.query,c.isNull(t.pathname)&&c.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!b.length)return t.pathname=null,t.path=t.search?"/"+t.search:null,t.href=t.format(),t;for(var x=b.slice(-1)[0],_=(t.host||e.host||b.length>1)&&("."===x||".."===x)||""===x,O=0,R=b.length;R>=0;R--)x=b[R],"."===x?b.splice(R,1):".."===x?(b.splice(R,1),O++):O&&(b.splice(R,1),O--);if(!P&&!E)for(;O--;O)b.unshift("..");!P||""===b[0]||b[0]&&"/"===b[0].charAt(0)||b.unshift(""),_&&"/"!==b.join("/").substr(-1)&&b.push("");var I=""===b[0]||b[0]&&"/"===b[0].charAt(0);if(S){t.hostname=t.host=I?"":b.length?b.shift():"";var $=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@");$&&(t.auth=$.shift(),t.host=t.hostname=$.shift())}return P=P||t.host&&b.length,P&&!I&&b.unshift(""),b.length?t.pathname=b.join("/"):(t.pathname=null,t.path=null),c.isNull(t.pathname)&&c.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=e.auth||t.auth,t.slashes=t.slashes||e.slashes,t.href=t.format(),t},a.prototype.parseHost=function(){var e=this.host,r=u.exec(e);r&&(r=r[0],":"!==r&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)}},{"./util":46,punycode:41,querystring:44}],46:[function(e,r,t){"use strict";r.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],47:[function(e,r,t){function a(e){var r=this,t=f.call(arguments,1);return new Promise(function(a,o){function i(r){var t;try{t=e.next(r)}catch(e){return o(e)}c(t)}function n(r){var t;try{t=e.throw(r)}catch(e){return o(e)}c(t)}function c(e){if(e.done)return a(e.value);var t=s.call(r,e.value);return t&&l(t)?t.then(i,n):n(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(e.value)+'"'))}return"function"==typeof e&&(e=e.apply(r,t)),e&&"function"==typeof e.next?void i():a(e)})}function s(e){return e?l(e)?e:h(e)||c(e)?a.call(this,e):"function"==typeof e?o.call(this,e):Array.isArray(e)?i.call(this,e):u(e)?n.call(this,e):e:e}function o(e){var r=this;return new Promise(function(t,a){e.call(r,function(e,r){return e?a(e):(arguments.length>2&&(r=f.call(arguments,1)),void t(r))})})}function i(e){return Promise.all(e.map(s,this))}function n(e){function r(e,r){t[r]=void 0,o.push(e.then(function(e){t[r]=e}))}for(var t=new e.constructor,a=Object.keys(e),o=[],i=0;i<a.length;i++){var n=a[i],c=s.call(this,e[n]);c&&l(c)?r(c,n):t[n]=e[n]}return Promise.all(o).then(function(){return t})}function l(e){return"function"==typeof e.then}function c(e){return"function"==typeof e.next&&"function"==typeof e.throw}function h(e){var r=e.constructor;return!!r&&("GeneratorFunction"===r.name||"GeneratorFunction"===r.displayName||c(r.prototype))}function u(e){return Object==e.constructor}var f=Array.prototype.slice;r.exports=a.default=a.co=a,a.wrap=function(e){function r(){return a.call(this,e.apply(this,arguments))}return r.__generatorFunction__=e,r}},{}],48:[function(e,r,t){var a="undefined"!=typeof JSON?JSON:e("jsonify");r.exports=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t=r.space||"";"number"==typeof t&&(t=Array(t+1).join(" "));var i="boolean"==typeof r.cycles&&r.cycles,n=r.replacer||function(e,r){return r},l=r.cmp&&function(e){return function(r){return function(t,a){var s={key:t,value:r[t]},o={key:a,value:r[a]};return e(s,o)}}}(r.cmp),c=[];return function e(r,h,u,f){var d=t?"\n"+new Array(f+1).join(t):"",p=t?": ":":";if(u&&u.toJSON&&"function"==typeof u.toJSON&&(u=u.toJSON()),u=n.call(r,h,u),void 0!==u){if("object"!=typeof u||null===u)return a.stringify(u);if(s(u)){for(var m=[],v=0;v<u.length;v++){var y=e(u,v,u[v],f+1)||a.stringify(null);m.push(d+t+y)}return"["+m.join(",")+d+"]"}if(c.indexOf(u)!==-1){if(i)return a.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}c.push(u);for(var g=o(u).sort(l&&l(u)),m=[],v=0;v<g.length;v++){var h=g[v],P=e(u,h,u[h],f+1);if(P){var E=a.stringify(h)+p+P;m.push(d+t+E)}}return c.splice(c.indexOf(u),1),"{"+m.join(",")+d+"}"}}({"":e},"",e,0)};var s=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},o=Object.keys||function(e){var r=Object.prototype.hasOwnProperty||function(){return!0},t=[];for(var a in e)r.call(e,a)&&t.push(a);return t}},{jsonify:49}],49:[function(e,r,t){t.parse=e("./lib/parse"),t.stringify=e("./lib/stringify")},{"./lib/parse":50,"./lib/stringify":51}],50:[function(e,r,t){var a,s,o,i,n={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},l=function(e){throw{name:"SyntaxError",message:e,at:a,text:o}},c=function(e){return e&&e!==s&&l("Expected '"+e+"' instead of '"+s+"'"),s=o.charAt(a),a+=1,s},h=function(){var e,r="";for("-"===s&&(r="-",c("-"));s>="0"&&s<="9";)r+=s,c();if("."===s)for(r+=".";c()&&s>="0"&&s<="9";)r+=s;if("e"===s||"E"===s)for(r+=s,c(),"-"!==s&&"+"!==s||(r+=s,c());s>="0"&&s<="9";)r+=s,c();return e=+r,isFinite(e)?e:void l("Bad number")},u=function(){var e,r,t,a="";if('"'===s)for(;c();){if('"'===s)return c(),a;if("\\"===s)if(c(),"u"===s){for(t=0,r=0;r<4&&(e=parseInt(c(),16),isFinite(e));r+=1)t=16*t+e;a+=String.fromCharCode(t)}else{if("string"!=typeof n[s])break;a+=n[s]}else a+=s}l("Bad string")},f=function(){for(;s&&s<=" ";)c()},d=function(){switch(s){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("l"),null}l("Unexpected '"+s+"'")},p=function(){var e=[];if("["===s){if(c("["),f(),"]"===s)return c("]"),e;for(;s;){if(e.push(i()),f(),"]"===s)return c("]"),e;c(","),f()}}l("Bad array")},m=function(){var e,r={};if("{"===s){if(c("{"),f(),"}"===s)return c("}"),r;for(;s;){if(e=u(),f(),c(":"),Object.hasOwnProperty.call(r,e)&&l('Duplicate key "'+e+'"'),r[e]=i(),f(),"}"===s)return c("}"),r;c(","),f()}}l("Bad object")};i=function(){switch(f(),s){case"{":return m();case"[":return p();case'"':return u();case"-":return h();default:return s>="0"&&s<="9"?h():d()}},r.exports=function(e,r){var t;return o=e,a=0,s=" ",t=i(),f(),s&&l("Syntax error"),"function"==typeof r?function e(t,a){var s,o,i=t[a];if(i&&"object"==typeof i)for(s in i)Object.prototype.hasOwnProperty.call(i,s)&&(o=e(i,s),void 0!==o?i[s]=o:delete i[s]);return r.call(t,a,i)}({"":t},""):t}},{}],51:[function(e,r,t){function a(e){return l.lastIndex=0,l.test(e)?'"'+e.replace(l,function(e){var r=c[e];return"string"==typeof r?r:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function s(e,r){var t,l,c,h,u,f=o,d=r[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),"function"==typeof n&&(d=n.call(r,e,d)),typeof d){case"string":return a(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(o+=i,u=[],"[object Array]"===Object.prototype.toString.apply(d)){for(h=d.length,t=0;t<h;t+=1)u[t]=s(t,d)||"null";return c=0===u.length?"[]":o?"[\n"+o+u.join(",\n"+o)+"\n"+f+"]":"["+u.join(",")+"]",o=f,c}if(n&&"object"==typeof n)for(h=n.length,t=0;t<h;t+=1)l=n[t],"string"==typeof l&&(c=s(l,d),c&&u.push(a(l)+(o?": ":":")+c));else for(l in d)Object.prototype.hasOwnProperty.call(d,l)&&(c=s(l,d),c&&u.push(a(l)+(o?": ":":")+c));return c=0===u.length?"{}":o?"{\n"+o+u.join(",\n"+o)+"\n"+f+"}":"{"+u.join(",")+"}",o=f,c}}var o,i,n,l=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};r.exports=function(e,r,t){var a;if(o="",i="","number"==typeof t)for(a=0;a<t;a+=1)i+=" ";else"string"==typeof t&&(i=t);if(n=r,r&&"function"!=typeof r&&("object"!=typeof r||"number"!=typeof r.length))throw new Error("JSON.stringify");return s("",{"":e})}},{}],ajv:[function(e,r,t){"use strict";function a(e){return v.test(e)}function Ajv(r){function t(e,r){var t;if("string"==typeof e){if(t=j(e),!t)throw new Error('no schema with key or ref "'+e+'"')}else{var a=O(e);t=a.validate||R(a)}var s=t(r);return t.$async===!0?"*"==C._opts.async?p(s):s:(C.errors=t.errors,s)}function g(e,r){var t=O(e,void 0,r);return t.validate||R(t)}function P(e,r,t,a){if(Array.isArray(e))for(var s=0;s<e.length;s++)P(e[s],void 0,t,a);else r=o.normalizeId(r||e.id),D(r),C._schemas[r]=O(e,t,a,!0)}function E(e,r,t){P(e,r,t,!0)}function b(e,r){var s=e.$schema||C._opts.defaultMeta||w(),o=C._formats.uri;C._formats.uri="function"==typeof o?a:v;var i;try{i=t(s,e)}finally{C._formats.uri=o}if(!i&&r){var n="schema is invalid: "+I();if("log"!=C._opts.validateSchema)throw new Error(n);console.error(n)}return i}function w(){var e=C._opts.meta;return C._opts.defaultMeta="object"==typeof e?e.id||e:C._opts.v5?u.META_SCHEMA_ID:m}function j(e){var r=$(e);switch(typeof r){case"object":return r.validate||R(r);case"string":return j(r);case"undefined":return S(e)}}function S(e){var r=o.schema.call(C,{schema:{}},e);if(r){var t=r.schema,a=r.root,i=r.baseId,l=s.call(C,t,a,void 0,i);return C._fragments[e]=new n({ref:e,fragment:!0,schema:t,root:a,baseId:i,validate:l}),l}}function $(e){return e=o.normalizeId(e),C._schemas[e]||C._refs[e]||C._fragments[e]}function x(e){if(e instanceof RegExp)return _(C._schemas,e),void _(C._refs,e);switch(typeof e){case"undefined":return _(C._schemas),_(C._refs),void C._cache.clear();case"string":var r=$(e);return r&&C._cache.del(r.jsonStr),delete C._schemas[e],void delete C._refs[e];case"object":var t=l(e);C._cache.del(t);var a=e.id;a&&(a=o.normalizeId(a),delete C._schemas[a],delete C._refs[a])}}function _(e,r){for(var t in e){var a=e[t];a.meta||r&&!r.test(t)||(C._cache.del(a.jsonStr),delete e[t])}}function O(e,r,t,a){if("object"!=typeof e)throw new Error("schema should be object");var s=l(e),i=C._cache.get(s);if(i)return i;a=a||C._opts.addUsedSchema!==!1;var c=o.normalizeId(e.id);c&&a&&D(c);var h,u=C._opts.validateSchema!==!1&&!r;u&&!(h=e.id&&e.id==e.$schema)&&b(e,!0);var f=o.ids.call(C,e),d=new n({id:c,schema:e,localRefs:f,jsonStr:s,meta:t});return"#"!=c[0]&&a&&(C._refs[c]=d),C._cache.put(s,d),u&&h&&b(e,!0),d}function R(e,r){function t(){var r=e.validate,a=r.apply(null,arguments);return t.errors=r.errors,a}if(e.compiling)return e.validate=t,t.schema=e.schema,t.errors=null,t.root=r?r:t,e.schema.$async===!0&&(t.$async=!0),t;e.compiling=!0;var a;e.meta&&(a=C._opts,C._opts=C._metaOpts);var o;try{o=s.call(C,e.schema,r,e.localRefs)}finally{e.compiling=!1,e.meta&&(C._opts=a)}return e.validate=o,e.refs=o.refs,e.refVal=o.refVal,e.root=o.root,o}function I(e,r){if(e=e||C.errors,!e)return"No errors";r=r||{};for(var t=void 0===r.separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,s="",o=0;o<e.length;o++){var i=e[o];i&&(s+=a+i.dataPath+" "+i.message+t)}return s.slice(0,-t.length)}function A(e,r){"string"==typeof r&&(r=new RegExp(r)),C._formats[e]=r}function k(){if(C._opts.meta!==!1){var r=e("./refs/json-schema-draft-04.json");E(r,m,!0),C._refs["http://json-schema.org/schema"]=m}}function q(){var e=C._opts.schemas;if(e)if(Array.isArray(e))P(e);else for(var r in e)P(e[r],r)}function L(){for(var e in C._opts.formats){var r=C._opts.formats[e];A(e,r)}}function D(e){if(C._schemas[e]||C._refs[e])throw new Error('schema with key or id "'+e+'" already exists')}function Q(){for(var e=f.copy(C._opts),r=0;r<y.length;r++)delete e[y[r]];return e}if(!(this instanceof Ajv))return new Ajv(r);var C=this;r=this._opts=f.copy(r)||{},this._schemas={},this._refs={},this._fragments={},this._formats=c(r.format),this._cache=r.cache||new i,this._loadingSchemas={},this._compilations=[],this.RULES=h(),this.validate=t,this.compile=g,this.addSchema=P,this.addMetaSchema=E,this.validateSchema=b,this.getSchema=j,this.removeSchema=x,this.addFormat=A,this.errorsText=I,this._addSchema=O,this._compile=R,r.loopRequired=r.loopRequired||1/0,(r.async||r.transpile)&&d.setup(r),r.beautify===!0&&(r.beautify={indent_size:2}),"property"==r.errorDataPath&&(r._errorDataPathProperty=!0),this._metaOpts=Q(),r.formats&&L(),k(),r.v5&&u.enable(this),"object"==typeof r.meta&&E(r.meta),q()}var s=e("./compile"),o=e("./compile/resolve"),i=e("./cache"),n=e("./compile/schema_obj"),l=e("json-stable-stringify"),c=e("./compile/formats"),h=e("./compile/rules"),u=e("./v5"),f=e("./compile/util"),d=e("./async"),p=e("co");r.exports=Ajv,Ajv.prototype.compileAsync=d.compile,Ajv.prototype.addKeyword=e("./keyword"),Ajv.ValidationError=e("./compile/validation_error");var m="http://json-schema.org/draft-04/schema",v=/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,y=["removeAdditional","useDefaults","coerceTypes"]},{"./async":1,"./cache":2,"./compile":6,"./compile/formats":5,"./compile/resolve":7,"./compile/rules":8,"./compile/schema_obj":9,"./compile/util":11,"./compile/validation_error":12,"./keyword":37,"./refs/json-schema-draft-04.json":38,"./v5":40,co:47,"json-stable-stringify":48}]},{},[])("ajv")});
+//# sourceMappingURL=dist/ajv.min.js.map \ No newline at end of file
diff --git a/tools/eslint/node_modules/ajv/dist/ajv.min.js.map b/tools/eslint/node_modules/ajv/dist/ajv.min.js.map
new file mode 100644
index 0000000000..58591b21de
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/dist/ajv.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["dist/ajv.bundle.js"],"names":["f","exports","module","define","amd","g","window","global","self","this","Ajv","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length","1","setupAsync","opts","required","check","async","transpile","get","TRANSPILE","_transpileFunc","ASYNC","MODES","_opts","util","copy","checkGenerators","Function","checkAsyncFunction","getRegenerator","regenerator","runtime","regeneratorTranspile","compile","getNodent","nodent","log","dontInstallRequireHook","console","warn","nodentTranspile","promises","sourcemap","compileAsync","schema","callback","_compileAsync","firstCall","loadMissingSchema","schemaLoaded","err","sch","_refs","ref","_schemas","addSchema","missingSchema","missingRef","_callbacks","_loadingSchemas","loadSchema","deferCallback","validate","setTimeout","schemaObj","_addSchema","setup","*","co*","es7","./compile/util","2","Cache","_cache","prototype","put","key","value","del","clear","3","$ref","allOf","anyOf","dependencies","enum","format","items","maximum","minimum","maxItems","minItems","maxLength","minLength","maxProperties","minProperties","multipleOf","not","oneOf","pattern","properties","uniqueItems","../dotjs/_limit","../dotjs/_limitItems","../dotjs/_limitLength","../dotjs/_limitProperties","../dotjs/allOf","../dotjs/anyOf","../dotjs/dependencies","../dotjs/enum","../dotjs/format","../dotjs/items","../dotjs/multipleOf","../dotjs/not","../dotjs/oneOf","../dotjs/pattern","../dotjs/properties","../dotjs/ref","../dotjs/required","../dotjs/uniqueItems","../dotjs/validate","4","equal","b","arrA","Array","isArray","arrB","keys","Object","undefined","5","formats","mode","formatDefs","fName","compare","date","str","matches","match","DATE","month","day","DAYS","time","full","TIME","hour","minute","second","timeZone","date_time","dateTime","split","DATE_TIME_SEPARATOR","hostname","HOSTNAME","test","uri","NOT_URI_FRAGMENT","URI","regex","RegExp","compareDate","d1","d2","compareTime","t1","t2","compareDateTime","dt1","dt2","res","UUID","JSON_POINTER","RELATIVE_JSON_POINTER","fast","date-time","email","ipv4","ipv6","uuid","json-pointer","relative-json-pointer","./util","6","root","localRefs","baseId","callValidate","compilation","result","apply","arguments","errors","localCompile","_schema","_root","isRoot","$async","sourceCode","validateGenerator","isTop","schemaPath","errSchemaPath","errorPath","RULES","resolve","resolveRef","usePattern","useDefault","useCustomRule","vars","refVal","refValCode","patterns","patternCode","defaults","defaultCode","customRules","customRuleCode","beautify","error","validateCode","makeValidate","co","ucs2length","ValidationError","refs","keepSourceCode","source","url","_refVal","refCode","refIndex","resolvedRef","rootRefId","addLocalRef","v","localSchema","inlineRef","inlineRefs","replaceLocalRef","refId","inline","regexStr","index","patternsHash","toQuotedString","valueStr","stableStringify","defaultsHash","rule","parentSchema","it","validateSchema","definition","valid","message","errorsText","macro","keyword","c","checkCompiling","_compilations","compiling","_formats","cv","endCompiling","compIndex","splice","arr","statement","js_beautify","../async","./equal","./resolve","./validation_error","json-stable-stringify","7","SchemaObject","_compile","resolveSchema","p","parse","refPath","_getFullPath","getFullPath","id","normalizeId","resolveRecursive","getJsonPointer","parsedRef","resolveUrl","hash","slice","parts","part","unescapeFragment","PREVENT_SCOPE_CHANGE","limit","checkNoRef","countKeys","item","count","Infinity","SIMPLE_INLINED","normalize","protocolSeparator","protocol","href","host","path","replace","TRAILING_SLASH_HASH","resolveIds","_resolveIds","fullPath","escapeFragment","ids","toHash","./schema_obj","8","ruleModules","type","rules","ALL","KEYWORDS","TYPES","all","forEach","group","map","push","keywords","concat","types","custom","./_rules","9","obj","10","len","pos","charCodeAt","11","to","checkDataType","dataType","data","negate","EQUAL","AND","OK","NOT","checkDataTypes","dataTypes","array","object","null","number","integer","coerceToTypes","optionCoerceTypes","COERCE_TO_TYPES","getProperty","IDENTIFIER","escapeQuotes","SINGLE_QUOTE","varOccurences","dataVar","varReplace","expr","cleanUpCode","out","EMPTY_ELSE","EMPTY_IF_NO_ELSE","EMPTY_IF_WITH_ELSE","cleanUpVarErrors","ERRORS_REGEXP","REMOVE_ERRORS_ASYNC","RETURN_ASYNC","RETURN_TRUE_ASYNC","REMOVE_ERRORS","RETURN_VALID","RETURN_TRUE","schemaHasRules","schemaHasRulesExcept","exceptKeyword","getPathExpr","currentPath","jsonPointers","isNumber","joinPaths","getPath","prop","escapeJsonPointer","getData","$data","lvl","paths","up","jsonPointer","segments","segment","unescapeJsonPointer","decodeURIComponent","encodeURIComponent","./ucs2length","12","ajv","validation","create","constructor","13","$keyword","$errorKeyword","$lvl","level","$dataLvl","dataLevel","$schema","$schemaPath","$errSchemaPath","$breakOnError","allErrors","$valid","$schemaFormat","$isDataFormat","v5","$closingBraces","$schemaValueFormat","dataPathArr","$format","$compare","$schemaValue","$isMax","$exclusiveKeyword","$schemaExcl","$isDataExcl","$op","$result","$isData","$schemaValueExcl","$exclusive","$opExpr","$opStr","$$outStack","createErrors","messages","verbose","__err","pop","compositeRule","14","$notOp","15","16","unicode","17","18","$it","$currentBaseId","arr1","$sch","$i","l1","19","$errs","$noEmptySchema","every","$wasComposite","20","21","$compile","$inline","$macro","$ruleValidate","$validateCode","$rule","$definition","$rDef","$validateSchema","$ruleErrs","$ruleErr","$asyncKeyword","statements","$code","passContext","def_callRuleValidate","def_customError","22","$schemaDeps","$propertyDeps","$property","$deps","$currentErrorPath","_$property","$prop","$propertyPath","$missingProperty","_errorDataPathProperty","join","arr2","$reqProperty","i2","l2","23","24","$isObject","$formatRef","25","$dataNxt","$nextData","$additionalItems","additionalItems","$currErrSchemaPath","$passData","26","multipleOfPrecision","27","$allErrorsOption","28","29","$regexp","30","$key","$matched","$ownProperties","ownProperties","$pProperty","i1","$missingPattern","31","$schemaKeys","$pProperties","patternProperties","$pPropertyKeys","$aProperties","additionalProperties","$someProperties","$noAdditional","$additionalIsSchema","$removeAdditional","removeAdditional","$checkAdditional","$required","loopRequired","$requiredHash","$pgProperties","patternGroups","$pgPropertyKeys","$propertyKey","arr3","$pgProperty","l3","$additionalProperty","$useDefaults","useDefaults","arr4","i4","l4","$hasDefault","default","$useData","arr5","i5","l5","arr6","i6","l6","$pgSchema","$pgMin","$pgMax","$limit","$reason","$moreOrLess","32","$refCode","$refVal","$message","missingRefs","$error","__callValidate","33","$propertySch","$loopRequired","i3","34","$shouldContinue","$ifPassed","$caseIndex","if","then","continue","35","36","$shouldUseGroup","$rulesGroup","$shouldUseRule","$top","rootId","$es7","yieldAwait","$closingBraces1","$closingBraces2","$typeSchema","$typeIsArray","coerceTypes","$coerceToTypes","$method","$dataType","$coerced","$bracesCoercion","$type","$parentData","$dataProperty","$refKeywords","extendRefs","JSON","stringify","$typeChecked","37","_addRule","ruleGroup","rg","metaSchema","./dotjs/custom","38","description","definitions","schemaArray","positiveInteger","positiveIntegerDefault0","simpleTypes","stringArray","title","exclusiveMinimum","exclusiveMaximum","39","formatMaximum","formatMinimum","formatExclusiveMaximum","formatExclusiveMinimum","constant","contains","switch","40","enableV5","_addKeyword","inlineFunc","inlineFunctions","addKeyword","_formatLimit","patternRequired","meta","addMetaSchema","META_SCHEMA_ID","containsMacro","enable","./dotjs/_formatLimit","./dotjs/constant","./dotjs/patternRequired","./dotjs/switch","./refs/json-schema-v5.json","41","RangeError","fn","mapDomain","string","regexSeparators","labels","encoded","ucs2decode","extra","output","counter","ucs2encode","stringFromCharCode","basicToDigit","codePoint","base","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","k","floor","damp","baseMinusTMin","tMax","skew","decode","input","basic","j","oldi","w","baseMinusT","inputLength","initialN","bias","initialBias","lastIndexOf","delimiter","maxInt","tMin","encode","handledCPCount","basicLength","m","q","currentValue","handledCPCountPlusOne","qMinusT","toUnicode","regexPunycode","toLowerCase","toASCII","regexNonASCII","freeExports","nodeType","freeModule","freeGlobal","punycode","overflow","not-basic","invalid-input","Math","String","fromCharCode","version","ucs2","hasOwnProperty","42","qs","sep","eq","options","regexp","maxKeys","kstr","vstr","x","idx","indexOf","substr","xs","toString","43","stringifyPrimitive","isFinite","name","objectKeys","ks","44","./decode","./encode","45","Url","slashes","auth","port","search","query","pathname","urlParse","parseQueryString","slashesDenoteHost","isObject","urlFormat","isString","urlResolve","relative","urlResolveObject","resolveObject","protocolPattern","portPattern","simplePathPattern","delims","unwise","autoEscape","nonHostChars","hostEndingChars","hostnameMaxLen","hostnamePartPattern","hostnamePartStart","unsafeProtocol","javascript","javascript:","hostlessProtocol","slashedProtocol","http","https","ftp","gopher","file","http:","https:","ftp:","gopher:","file:","querystring","TypeError","queryIndex","splitter","uSplit","slashRegex","rest","trim","simplePath","exec","proto","lowerProto","hostEnd","hec","atSign","parseHost","ipv6Hostname","hostparts","newpart","validParts","notHost","bit","unshift","h","ae","esc","escape","qm","charAt","rel","tkeys","tk","tkey","rkeys","rk","rkey","relPath","shift","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","isNullOrUndefined","authInHost","isNull","last","hasTrailingSlash","isAbsolute","46","arg","47","gen","ctx","args","Promise","reject","onFulfilled","ret","next","onRejected","throw","done","toPromise","isPromise","isGeneratorFunction","isGenerator","thunkToPromise","arrayToPromise","objectToPromise","defer","promise","results","displayName","val","wrap","createPromise","__generatorFunction__","48","json","cmp","space","cycles","replacer","node","aobj","bobj","seen","parent","indent","colonSeparator","toJSON","sort","keyValue","","has","jsonify","49","./lib/parse","./lib/stringify","50","at","ch","text","escapee","\"","\\","/","hex","uffff","parseInt","white","word","reviver","walk","holder","51","quote","escapable","lastIndex","partial","mind","gap","rep","\b","\t","\n","\f","\r","SCHEMA_URI_FORMAT_FUNC","SCHEMA_URI_FORMAT","schemaKeyRef","getSchema","_meta","_skipValidation","checkUnique","skipValidation","throwOrLogError","defaultMeta","currentUriFormat","keyRef","_getSchemaObj","_getSchemaFragment","compileSchema","_fragments","fragment","removeSchema","_removeAllSchemas","jsonStr","schemas","shouldAddSchema","cached","addUsedSchema","recursiveMeta","willValidate","_validate","currentOpts","_metaOpts","separator","dataPath","addFormat","addDraft4MetaSchema","addInitialSchemas","optsSchemas","addInitialFormats","getMetaSchemaOptions","metaOpts","META_IGNORE_OPTIONS","cache","indent_size","errorDataPath","./async","./cache","./compile","./compile/formats","./compile/resolve","./compile/rules","./compile/schema_obj","./compile/validation_error","./keyword","./refs/json-schema-draft-04.json","./v5"],"mappings":";CAAA,SAAUA,GAAG,GAAoB,gBAAVC,UAAoC,mBAATC,QAAsBA,OAAOD,QAAQD,QAAS,IAAmB,kBAATG,SAAqBA,OAAOC,IAAKD,UAAUH,OAAO,CAAC,GAAIK,EAAkCA,GAAb,mBAATC,QAAwBA,OAA+B,mBAATC,QAAwBA,OAA6B,mBAAPC,MAAsBA,KAAYC,KAAKJ,EAAEK,IAAMV,MAAO,WAAW,GAAIG,EAAsB,OAAO,SAAUQ,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATC,UAAqBA,OAAQ,KAAIF,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGI,EAAE,MAAOA,GAAEJ,GAAE,EAAI,IAAIhB,GAAE,GAAIqB,OAAM,uBAAuBL,EAAE,IAAK,MAAMhB,GAAEsB,KAAK,mBAAmBtB,EAAE,GAAIuB,GAAEV,EAAEG,IAAIf,WAAYW,GAAEI,GAAG,GAAGQ,KAAKD,EAAEtB,QAAQ,SAASU,GAAG,GAAIE,GAAED,EAAEI,GAAG,GAAGL,EAAG,OAAOI,GAAEF,EAAEA,EAAEF,IAAIY,EAAEA,EAAEtB,QAAQU,EAAEC,EAAEC,EAAEC,GAAG,MAAOD,GAAEG,GAAGf,QAAkD,IAAI,GAA1CmB,GAAkB,kBAATD,UAAqBA,QAAgBH,EAAE,EAAEA,EAAEF,EAAEW,OAAOT,IAAID,EAAED,EAAEE,GAAI,OAAOD,KAAKW,GAAG,SAASP,EAAQjB,EAAOD,GACl0B,YA+BA,SAAS0B,GAAWC,EAAMC,GACpBA,KAAa,IAAOA,GAAW,EACnC,IAEIC,GAFAC,EAAQH,EAAKG,MACbC,EAAYJ,EAAKI,SAGrB,cAAeA,IACb,IAAK,SACH,GAAIC,GAAMC,EAAUF,EACpB,KAAKC,EAAK,KAAM,IAAIZ,OAAM,mBAAqBW,EAC/C,OAAQJ,GAAKO,eAAiBF,EAAIL,EAAMC,EAC1C,KAAK,YACL,IAAK,UACH,GAAoB,gBAATE,GAAmB,CAE5B,GADAD,EAAQM,EAAML,IACTD,EAAO,KAAM,IAAIT,OAAM,mBAAqBU,EACjD,OAAQH,GAAKI,UAAYF,EAAMF,EAAMC,GAGvC,IAAK,GAAIT,GAAE,EAAGA,EAAEiB,EAAMZ,OAAQL,IAAK,CACjC,GAAIkB,GAAQD,EAAMjB,EAClB,IAAIO,EAAWW,GAAO,GAEpB,MADAC,GAAKC,KAAKF,EAAOV,GACVA,EAAKI,UAIhB,KAAM,IAAIX,OAAM,uDAClB,KAAK,WACH,MAAQO,GAAKO,eAAiBP,EAAKI,SACrC,SACE,KAAM,IAAIX,OAAM,mBAAqBW,IAK3C,QAASS,GAAgBb,EAAMC,GAE7B,IAEE,MADA,IAAKa,UAAS,wBACP,EACP,MAAM/B,GAEN,GAAIkB,EAAU,KAAM,IAAIR,OAAM,6BAKlC,QAASsB,GAAmBf,EAAMC,GAEhC,IAGE,MAFA,IAAKa,UAAS,6BAEP,EACP,MAAM/B,GACN,GAAIkB,EAAU,KAAM,IAAIR,OAAM,sCAKlC,QAASuB,GAAehB,EAAMC,GAC5B,IAOE,MANKgB,KACHA,EAAc1B,EAAQ,eACtB0B,EAAYC,WAETlB,EAAKG,OAASH,EAAKG,SAAU,IAChCH,EAAKG,MAAQ,OACRgB,EACP,MAAMpC,GAEN,GAAIkB,EAAU,KAAM,IAAIR,OAAM,8BAKlC,QAAS0B,GAAqBzB,GAC5B,MAAOuB,GAAYG,QAAQ1B,GAAMA,KAInC,QAAS2B,GAAUrB,EAAMC,GAEvB,IAME,MALKqB,KAAQA,EAAS/B,EAAQ,WAAiBgC,KAAK,EAAOC,wBAAwB,KACjE,OAAdxB,EAAKG,QACHH,EAAKG,OAASH,EAAKG,SAAU,GAAMsB,QAAQC,KAAK,8CACpD1B,EAAKG,MAAQ,OAERwB,EACP,MAAM5C,GAEN,GAAIkB,EAAU,KAAM,IAAIR,OAAM,yBAKlC,QAASkC,GAAgBjC,GACvB,MAAO4B,GAAOF,QAAQ1B,EAAM,IAAMkC,UAAU,EAAMC,WAAW,IAASnC,KAWxE,QAASoC,GAAaC,EAAQC,GAoB5B,QAASC,GAAcF,EAAQC,EAAUE,GAUvC,QAASC,GAAkBpD,GAwBzB,QAASqD,GAAaC,EAAKC,GACzB,GAAID,EAAK,MAAOL,GAASK,EACzB,KAAMzD,EAAK2D,MAAMC,KAAQ5D,EAAK6D,SAASD,GACrC,IACE5D,EAAK8D,UAAUJ,EAAKE,GACpB,MAAMzD,GAEN,WADAiD,GAASjD,GAIbkD,EAAcF,EAAQC,GAjCxB,GAAIQ,GAAMzD,EAAE4D,aACZ,IAAI/D,EAAK2D,MAAMC,IAAQ5D,EAAK6D,SAASD,GACnC,MAAOR,GAAS,GAAIvC,OAAM,UAAY+C,EAAM,kBAAoBzD,EAAE6D,WAAa,uBACjF,IAAIC,GAAajE,EAAKkE,gBAAgBN,EAClCK,GACuB,kBAAdA,GACTjE,EAAKkE,gBAAgBN,IAAQK,EAAYT,GAEzCS,EAAWA,EAAWhD,QAAUuC,GAElCxD,EAAKkE,gBAAgBN,GAAOJ,EAC5BxD,EAAK8B,MAAMqC,WAAWP,EAAK,SAAUH,EAAKC,GACxC,GAAIO,GAAajE,EAAKkE,gBAAgBN,EAEtC,UADO5D,GAAKkE,gBAAgBN,GACH,kBAAdK,GACTA,EAAWR,EAAKC,OAEhB,KAAK,GAAI9C,GAAE,EAAGA,EAAEqD,EAAWhD,OAAQL,IACjCqD,EAAWrD,GAAG6C,EAAKC,MAmB7B,QAASU,GAAcX,EAAKY,GAC1B,MAAIf,OAAWgB,YAAW,WAAalB,EAASK,EAAKY,KACzCjB,EAASK,EAAKY,GAjD5B,GAAIA,EACJ,KAAMA,EAAWrE,EAAKwC,QAAQW,GAC9B,MAAMhD,GAGJ,YAFIA,EAAE4D,cAAeR,EAAkBpD,GAClCiE,EAAcjE,IAGrBiE,EAAc,KAAMC,GAzBtB,GAAIE,GACAvE,EAAOC,IACX,KACEsE,EAAYtE,KAAKuE,WAAWrB,GAC5B,MAAMhD,GAEN,WADAmE,YAAW,WAAalB,EAASjD,KAGnC,GAAIoE,EAAUF,SACZC,WAAW,WAAalB,EAAS,KAAMmB,EAAUF,gBAC5C,CACL,GAAoC,kBAAzBpE,MAAK6B,MAAMqC,WACpB,KAAM,IAAItD,OAAM,0CAClBwC,GAAcF,EAAQC,GAAU,IA1JpC1D,EAAOD,SACLgF,MAAOtD,EACPqB,QAASU,EAIX,IAoBIb,GAAaK,EApBbX,EAAOpB,EAAQ,kBAEfiB,GACF8C,IAAKzC,EACL0C,MAAO1C,EACP2C,IAAOzC,GAGLT,GACFgB,OAAUD,EACVJ,YAAeD,GAGbP,IACAN,MAAO,QACPA,MAAO,MAAOC,UAAW,WACzBD,MAAO,MAAOC,UAAW,kBA+L1BqD,iBAAiB,KAAKC,GAAG,SAASnE,EAAQjB,EAAOD,GACpD,YAGA,IAAIsF,GAAQrF,EAAOD,QAAU,WAC3BQ,KAAK+E,UAIPD,GAAME,UAAUC,IAAM,SAAmBC,EAAKC,GAC5CnF,KAAK+E,OAAOG,GAAOC,GAIrBL,EAAME,UAAUxD,IAAM,SAAmB0D,GACvC,MAAOlF,MAAK+E,OAAOG,IAIrBJ,EAAME,UAAUI,IAAM,SAAmBF,SAChClF,MAAK+E,OAAOG,IAIrBJ,EAAME,UAAUK,MAAQ,WACtBrF,KAAK+E,gBAGDO,GAAG,SAAS5E,EAAQjB,EAAOD,GACjC,YAGAC,GAAOD,SACL+F,KAAQ7E,EAAQ,gBAChB8E,MAAO9E,EAAQ,kBACf+E,MAAO/E,EAAQ,kBACfgF,aAAchF,EAAQ,yBACtBiF,KAAQjF,EAAQ,iBAChBkF,OAAQlF,EAAQ,mBAChBmF,MAAOnF,EAAQ,kBACfoF,QAASpF,EAAQ,mBACjBqF,QAASrF,EAAQ,mBACjBsF,SAAUtF,EAAQ,wBAClBuF,SAAUvF,EAAQ,wBAClBwF,UAAWxF,EAAQ,yBACnByF,UAAWzF,EAAQ,yBACnB0F,cAAe1F,EAAQ,6BACvB2F,cAAe3F,EAAQ,6BACvB4F,WAAY5F,EAAQ,uBACpB6F,IAAK7F,EAAQ,gBACb8F,MAAO9F,EAAQ,kBACf+F,QAAS/F,EAAQ,oBACjBgG,WAAYhG,EAAQ,uBACpBU,SAAUV,EAAQ,qBAClBiG,YAAajG,EAAQ,wBACrB0D,SAAU1D,EAAQ,wBAGjBkG,kBAAkB,GAAGC,uBAAuB,GAAGC,wBAAwB,GAAGC,4BAA4B,GAAGC,iBAAiB,GAAGC,iBAAiB,GAAGC,wBAAwB,GAAGC,gBAAgB,GAAGC,kBAAkB,GAAGC,iBAAiB,GAAGC,sBAAsB,GAAGC,eAAe,GAAGC,iBAAiB,GAAGC,mBAAmB,GAAGC,sBAAsB,GAAGC,eAAe,GAAGC,oBAAoB,GAAGC,uBAAuB,GAAGC,oBAAoB,KAAKC,GAAG,SAASrH,EAAQjB,EAAOD,GAChd,YAEAC,GAAOD,QAAU,QAASwI,GAAMvH,EAAGwH,GACjC,GAAIxH,IAAMwH,EAAG,OAAO,CAEpB,IAEItH,GAFAuH,EAAOC,MAAMC,QAAQ3H,GACrB4H,EAAOF,MAAMC,QAAQH,EAGzB,IAAIC,GAAQG,EAAM,CAChB,GAAI5H,EAAEO,QAAUiH,EAAEjH,OAAQ,OAAO,CACjC,KAAKL,EAAI,EAAGA,EAAIF,EAAEO,OAAQL,IACxB,IAAKqH,EAAMvH,EAAEE,GAAIsH,EAAEtH,IAAK,OAAO,CACjC,QAAO,EAGT,GAAIuH,GAAQG,EAAM,OAAO,CAEzB,IAAI5H,GAAKwH,GAAkB,gBAANxH,IAA+B,gBAANwH,GAAgB,CAC5D,GAAIK,GAAOC,OAAOD,KAAK7H,EAEvB,IAAI6H,EAAKtH,SAAWuH,OAAOD,KAAKL,GAAGjH,OAAQ,OAAO,CAElD,KAAKL,EAAI,EAAGA,EAAI2H,EAAKtH,OAAQL,IAC3B,GAAmB6H,SAAfP,EAAEK,EAAK3H,IAAmB,OAAO,CAEvC,KAAKA,EAAI,EAAGA,EAAI2H,EAAKtH,OAAQL,IAC3B,IAAIqH,EAAMvH,EAAE6H,EAAK3H,IAAKsH,EAAEK,EAAK3H,KAAM,OAAO,CAE5C,QAAO,EAGT,OAAO,QAGH8H,GAAG,SAAS/H,EAAQjB,EAAOD,GACjC,YAgBA,SAASkJ,GAAQC,GACfA,EAAe,QAARA,EAAiB,OAAS,MACjC,IAAIC,GAAa9G,EAAKC,KAAK2G,EAAQC,GACnC,KAAK,GAAIE,KAASH,GAAQI,QACxBF,EAAWC,IACTzE,SAAUwE,EAAWC,GACrBC,QAASJ,EAAQI,QAAQD,GAG7B,OAAOD,GAuDT,QAASG,GAAKC,GAEZ,GAAIC,GAAUD,EAAIE,MAAMC,EACxB,KAAKF,EAAS,OAAO,CAErB,IAAIG,IAASH,EAAQ,GACjBI,GAAOJ,EAAQ,EACnB,OAAOG,IAAS,GAAKA,GAAS,IAAMC,GAAO,GAAKA,GAAOC,EAAKF,GAI9D,QAASG,GAAKP,EAAKQ,GACjB,GAAIP,GAAUD,EAAIE,MAAMO,EACxB,KAAKR,EAAS,OAAO,CAErB,IAAIS,GAAOT,EAAQ,GACfU,EAASV,EAAQ,GACjBW,EAASX,EAAQ,GACjBY,EAAWZ,EAAQ,EACvB,OAAOS,IAAQ,IAAMC,GAAU,IAAMC,GAAU,MAAQJ,GAAQK,GAKjE,QAASC,GAAUd,GAEjB,GAAIe,GAAWf,EAAIgB,MAAMC,EACzB,OAA0B,IAAnBF,EAAS/I,QAAe+H,EAAKgB,EAAS,KAAOR,EAAKQ,EAAS,IAAI,GAIxE,QAASG,GAASlB,GAGhB,MAAOA,GAAIhI,QAAU,KAAOmJ,EAASC,KAAKpB,GAK5C,QAASqB,GAAIrB,GAEX,MAAOsB,GAAiBF,KAAKpB,IAAQuB,EAAIH,KAAKpB,GAIhD,QAASwB,GAAMxB,GACb,IAEE,MADA,IAAIyB,QAAOzB,IACJ,EACP,MAAM9I,GACN,OAAO,GAKX,QAASwK,GAAYC,EAAIC,GACvB,GAAMD,GAAMC,EACZ,MAAID,GAAKC,EAAW,EAChBD,EAAKC,GAAW,EAChBD,IAAOC,EAAW,EAAtB,OAIF,QAASC,GAAYC,EAAIC,GACvB,GAAMD,GAAMC,IACZD,EAAKA,EAAG5B,MAAMO,GACdsB,EAAKA,EAAG7B,MAAMO,GACRqB,GAAMC,GAGZ,MAFAD,GAAKA,EAAG,GAAKA,EAAG,GAAKA,EAAG,IAAMA,EAAG,IAAI,IACrCC,EAAKA,EAAG,GAAKA,EAAG,GAAKA,EAAG,IAAMA,EAAG,IAAI,IACjCD,EAAKC,EAAW,EAChBD,EAAKC,GAAW,EAChBD,IAAOC,EAAW,EAAtB,OAIF,QAASC,GAAgBC,EAAKC,GAC5B,GAAMD,GAAOC,EAAb,CACAD,EAAMA,EAAIjB,MAAMC,GAChBiB,EAAMA,EAAIlB,MAAMC,EAChB,IAAIkB,GAAMT,EAAYO,EAAI,GAAIC,EAAI,GAClC,IAAY1C,SAAR2C,EACJ,MAAOA,IAAON,EAAYI,EAAI,GAAIC,EAAI,KAhKxC,GAAIpJ,GAAOpB,EAAQ,UAEfyI,EAAO,2BACPG,GAAQ,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAC3CG,EAAO,oDACPU,EAAW,6FACXI,EAAM,moCACNa,EAAO,iEACPC,EAAe,0GACfC,EAAwB,2DAG5B7L,GAAOD,QAAUkJ,EAejBA,EAAQ6C,MAENxC,KAAM,6BAENQ,KAAM,2DACNiC,YAAa,uFAEbnB,IAAK,8CAILoB,MAAO,oHACPvB,SAAUC,EAEVuB,KAAM,4EAENC,KAAM,qpCACNnB,MAAOA,EAEPoB,KAAMR,EAGNS,eAAgBR,EAEhBS,wBAAyBR,GAI3B5C,EAAQc,MACNT,KAAMA,EACNQ,KAAMA,EACNiC,YAAa1B,EACbO,IAAKA,EACLoB,MAAO,8IACPvB,SAAUA,EACVwB,KAAM,4EACNC,KAAM,qpCACNnB,MAAOA,EACPoB,KAAMR,EACNS,eAAgBR,EAChBS,wBAAyBR,GAI3B5C,EAAQI,SACNC,KAAM2B,EACNnB,KAAMsB,EACNW,YAAaR,EA2Bf,IAAIf,GAAsB,QAetBK,EAAmB,UA+CpByB,SAAS,KAAKC,GAAG,SAAStL,EAAQjB,EAAOD,GAC5C,YAkCA,SAAS+C,GAAQW,EAAQ+I,EAAMC,EAAWC,GAyCxC,QAASC,KACP,GAAIhI,GAAWiI,EAAYjI,SACvBkI,EAASlI,EAASmI,MAAM,KAAMC,UAElC,OADAJ,GAAaK,OAASrI,EAASqI,OACxBH,EAGT,QAASI,GAAaC,EAASC,EAAOV,EAAWC,GAC/C,GAAIU,IAAUD,GAAUA,GAASA,EAAM1J,QAAUyJ,CACjD,IAAIC,EAAM1J,QAAU+I,EAAK/I,OACvB,MAAOX,GAAQxB,KAAKhB,EAAM4M,EAASC,EAAOV,EAAWC,EAEvD,IAAIW,GAASH,EAAQG,UAAW,CAC5BA,KAAW3L,EAAKI,WAAWD,EAAMkD,MAAMrD,EAE3C,IAAI4L,GAAaC,GACfC,OAAO,EACP/J,OAAQyJ,EACRE,OAAQA,EACRV,OAAQA,EACRF,KAAMW,EACNM,WAAY,GACZC,cAAe,IACfC,UAAW,KACXC,MAAOA,EACPjJ,SAAU4I,EACVlL,KAAMA,EACNwL,QAASA,EACTC,WAAYA,EACZC,WAAYA,EACZC,WAAYA,EACZC,cAAeA,EACfvM,KAAMA,EACNuH,QAASA,EACT3I,KAAMA,GAGRgN,GAAaY,EAAKC,EAAQC,GAAcF,EAAKG,EAAUC,GACtCJ,EAAKK,EAAUC,GAAeN,EAAKO,EAAaC,GAChDpB,EAAa,mBAE1B5L,EAAKiN,WAEHA,EAAUrB,EAAaqB,EAASrB,EAAY5L,EAAKiN,UAChDxL,QAAQyL,MAAM,oDAGrB,IAAIjK,GAAUkK,EACV/M,EAAYJ,EAAKO,cACrB,KACE4M,EAAexB,GAAUvL,EACPA,EAAUwL,GACVA,CAElB,IAAIwB,GAAe,GAAItM,UACrB,OACA,QACA,UACA,OACA,SACA,WACA,cACA,KACA,QACA,aACA,kBACAqM,EAGFlK,GAAWmK,EACTxO,EACAsN,EACA3E,EACAuD,EACA2B,EACAI,EACAE,EACAM,EACAxG,EACAyG,EACAC,GAGFd,EAAO,GAAKxJ,EACZ,MAAMlE,GAEN,KADA0C,SAAQyL,MAAM,yCAA0CC,GAClDpO,EAiBR,MAdAkE,GAASlB,OAASyJ,EAClBvI,EAASqI,OAAS,KAClBrI,EAASuK,KAAOA,EAChBvK,EAASwJ,OAASA,EAClBxJ,EAAS6H,KAAOY,EAASzI,EAAWwI,EAChCE,IAAQ1I,EAAS0I,QAAS,GAC1B8B,IAAgBxK,EAAS2I,WAAaA,GACtC5L,EAAK4L,cAAe,IACtB3I,EAASyK,QACPf,SAAUA,EACVE,SAAUA,IAIP5J,EAGT,QAASmJ,GAAWpB,EAAQxI,EAAKkJ,GAC/BlJ,EAAM2J,EAAQwB,IAAI3C,EAAQxI,EAC1B,IACIoL,GAASC,EADTC,EAAWN,EAAKhL,EAEpB,IAAiB6E,SAAbyG,EAGF,MAFAF,GAAUnB,EAAOqB,GACjBD,EAAU,UAAYC,EAAW,IAC1BC,EAAYH,EAASC,EAE9B,KAAKnC,GAAUZ,EAAK0C,KAAM,CACxB,GAAIQ,GAAYlD,EAAK0C,KAAKhL,EAC1B,IAAkB6E,SAAd2G,EAGF,MAFAJ,GAAU9C,EAAK2B,OAAOuB,GACtBH,EAAUI,EAAYzL,EAAKoL,GACpBG,EAAYH,EAASC,GAIhCA,EAAUI,EAAYzL,EACtB,IAAI0L,GAAI/B,EAAQvM,KAAKhB,EAAM2M,EAAcT,EAAMtI,EAC/C,KAAK0L,EAAG,CACN,GAAIC,GAAcpD,GAAaA,EAAUvI,EACrC2L,KACFD,EAAI/B,EAAQiC,UAAUD,EAAanO,EAAKqO,YAClCF,EACA/M,EAAQxB,KAAKhB,EAAMuP,EAAarD,EAAMC,EAAWC,IAI3D,MAAIkD,IACFI,EAAgB9L,EAAK0L,GACdH,EAAYG,EAAGL,IAFxB,OAMF,QAASI,GAAYzL,EAAK0L,GACxB,GAAIK,GAAQ9B,EAAO5M,MAGnB,OAFA4M,GAAO8B,GAASL,EAChBV,EAAKhL,GAAO+L,EACL,SAAWA,EAGpB,QAASD,GAAgB9L,EAAK0L,GAC5B,GAAIK,GAAQf,EAAKhL,EACjBiK,GAAO8B,GAASL,EAGlB,QAASH,GAAYtB,EAAQ/M,GAC3B,MAAwB,gBAAV+M,IACF/M,KAAMA,EAAMqC,OAAQ0K,EAAQ+B,QAAQ,IACpC9O,KAAMA,EAAMiM,OAAQc,GAAUA,EAAOd,QAGnD,QAASU,GAAWoC,GAClB,GAAIC,GAAQC,EAAaF,EAKzB,OAJcpH,UAAVqH,IACFA,EAAQC,EAAaF,GAAY9B,EAAS9M,OAC1C8M,EAAS+B,GAASD,GAEb,UAAYC,EAGrB,QAASpC,GAAWtI,GAClB,aAAeA,IACb,IAAK,UACL,IAAK,SACH,MAAO,GAAKA,CACd,KAAK,SACH,MAAOrD,GAAKiO,eAAe5K,EAC7B,KAAK,SACH,GAAc,OAAVA,EAAgB,MAAO,MAC3B,IAAI6K,GAAWC,EAAgB9K,GAC3B0K,EAAQK,EAAaF,EAKzB,OAJcxH,UAAVqH,IACFA,EAAQK,EAAaF,GAAYhC,EAAShN,OAC1CgN,EAAS6B,GAAS1K,GAEb,UAAY0K,GAIzB,QAASnC,GAAcyC,EAAMjN,EAAQkN,EAAcC,GACjD,GAAIC,GAAiBH,EAAKI,WAAWD,cACrC,IAAIA,GAAkBvQ,EAAK8B,MAAMyO,kBAAmB,EAAO,CACzD,GAAIE,GAAQF,EAAepN,EAC3B,KAAKsN,EAAO,CACV,GAAIC,GAAU,8BAAgC1Q,EAAK2Q,WAAWJ,EAAe7D,OAC7E,IAAiC,OAA7B1M,EAAK8B,MAAMyO,eACV,KAAM,IAAI1P,OAAM6P,EADmB7N,SAAQyL,MAAMoC,IAK1D,GAIIrM,GAJA7B,EAAU4N,EAAKI,WAAWhO,QAC1BoN,EAASQ,EAAKI,WAAWZ,OACzBgB,EAAQR,EAAKI,WAAWI,KAGxBpO,GACF6B,EAAW7B,EAAQxB,KAAKhB,EAAMmD,EAAQkN,EAAcC,GAC3CM,GACTvM,EAAWuM,EAAM5P,KAAKhB,EAAMmD,EAAQkN,EAAcC,GAC9ClP,EAAKmP,kBAAmB,GAAOvQ,EAAKuQ,eAAelM,GAAU,IAEjEA,EADSuL,EACEA,EAAO5O,KAAKhB,EAAMsQ,EAAIF,EAAKS,QAAS1N,EAAQkN,GAE5CD,EAAKI,WAAWnM,QAG7B,IAAIyL,GAAQ3B,EAAYlN,MAGxB,OAFAkN,GAAY2B,GAASzL,GAGnBvD,KAAM,aAAegP,EACrBzL,SAAUA,GAjQd,GAAIrE,GAAOC,KACPmB,EAAOnB,KAAK6B,MACZ+L,GAAWpF,QACXmG,KACAb,KACAgC,KACA9B,KACAkC,KACAhC,KACAU,EAAiBzN,EAAK4L,cAAe,CAEzCd,GAAOA,IAAU/I,OAAQA,EAAQ0K,OAAQA,EAAQe,KAAMA,EAEvD,IAAIkC,GAAIC,EAAe/P,KAAKf,KAAMkD,EAAQ+I,EAAME,GAC5CE,EAAcrM,KAAK+Q,cAAcF,EAAEhB,MACvC,IAAIgB,EAAEG,UAAW,MAAQ3E,GAAYD,aAAeA,CAEpD,IAAI1D,GAAU1I,KAAKiR,SACf5D,EAAQrN,KAAKqN,KAEjB,KACE,GAAIgC,GAAI3C,EAAaxJ,EAAQ+I,EAAMC,EAAWC,EAC9CE,GAAYjI,SAAWiL,CACvB,IAAI6B,GAAK7E,EAAYD,YAUrB,OATI8E,KACFA,EAAGhO,OAASmM,EAAEnM,OACdgO,EAAGzE,OAAS,KACZyE,EAAGvC,KAAOU,EAAEV,KACZuC,EAAGtD,OAASyB,EAAEzB,OACdsD,EAAGjF,KAAOoD,EAAEpD,KACZiF,EAAGpE,OAASuC,EAAEvC,OACV8B,IAAgBsC,EAAGnE,WAAasC,EAAEtC,aAEjCsC,EACP,QACA8B,EAAapQ,KAAKf,KAAMkD,EAAQ+I,EAAME,IA4O1C,QAAS2E,GAAe5N,EAAQ+I,EAAME,GAEpC,GAAI0D,GAAQuB,EAAUrQ,KAAKf,KAAMkD,EAAQ+I,EAAME,EAC/C,OAAI0D,IAAS,GAAYA,MAAOA,EAAOmB,WAAW,IAClDnB,EAAQ7P,KAAK+Q,cAAc/P,OAC3BhB,KAAK+Q,cAAclB,IACjB3M,OAAQA,EACR+I,KAAMA,EACNE,OAAQA,IAED0D,MAAOA,EAAOmB,WAAW,IAWpC,QAASG,GAAajO,EAAQ+I,EAAME,GAElC,GAAIxL,GAAIyQ,EAAUrQ,KAAKf,KAAMkD,EAAQ+I,EAAME,EACvCxL,IAAK,GAAGX,KAAK+Q,cAAcM,OAAO1Q,EAAG,GAY3C,QAASyQ,GAAUlO,EAAQ+I,EAAME,GAE/B,IAAK,GAAIxL,GAAE,EAAGA,EAAEX,KAAK+Q,cAAc/P,OAAQL,IAAK,CAC9C,GAAIkQ,GAAI7Q,KAAK+Q,cAAcpQ,EAC3B,IAAIkQ,EAAE3N,QAAUA,GAAU2N,EAAE5E,MAAQA,GAAQ4E,EAAE1E,QAAUA,EAAQ,MAAOxL,GAEzE,OAAO,EAIT,QAASoN,GAAYpN,EAAGmN,GACtB,MAAO,cAAgBnN,EAAI,iBAAmBmB,EAAKiO,eAAejC,EAASnN,IAAM,KAInF,QAASsN,GAAYtN,GACnB,MAAO,cAAgBA,EAAI,eAAiBA,EAAI,KAIlD,QAASkN,GAAWlN,EAAGiN,GACrB,MAAOA,GAAOjN,GAAK,aAAeA,EAAI,aAAeA,EAAI,KAAO,GAIlE,QAASwN,GAAexN,GACtB,MAAO,iBAAmBA,EAAI,kBAAoBA,EAAI,KAIxD,QAASgN,GAAK2D,EAAKC,GACjB,IAAKD,EAAItQ,OAAQ,MAAO,EAExB,KAAK,GADDH,GAAO,GACFF,EAAE,EAAGA,EAAE2Q,EAAItQ,OAAQL,IAC1BE,GAAQ0Q,EAAU5Q,EAAG2Q,EACvB,OAAOzQ,GAzXT,GAAIyM,GAAU5M,EAAQ,aAClBoB,EAAOpB,EAAQ,UACfuP,EAAkBvP,EAAQ,yBAC1BY,EAAQZ,EAAQ,YAEhB0N,EAAW,WAAc,IAAM,MAAO1N,GAAQ,eAAoB8Q,YAAe,MAAMtR,QAEvF8M,EAAoBtM,EAAQ,qBAM5B8N,EAAK9N,EAAQ,MACb+N,EAAa3M,EAAK2M,WAClBzG,EAAQtH,EAAQ,WAGhBgO,EAAkBhO,EAAQ,qBAE9BjB,GAAOD,QAAU+C,IAwWdkP,WAAW,EAAE3J,oBAAoB,GAAG4J,UAAU,EAAEC,YAAY,EAAE5F,SAAS,GAAG6F,qBAAqB,GAAGpD,GAAK,GAAGqD,wBAAwB,KAAKC,GAAG,SAASpR,EAAQjB,EAAOD,GACrK,YAwBA,SAAS8N,GAAQ/K,EAAS0J,EAAMtI,GAE9B,GAAIiK,GAAS5N,KAAK0D,MAAMC,EACxB,IAAqB,gBAAViK,GAAoB,CAC7B,IAAI5N,KAAK0D,MAAMkK,GACV,MAAON,GAAQvM,KAAKf,KAAMuC,EAAS0J,EAAM2B,EADtBA,GAAS5N,KAAK0D,MAAMkK,GAK9C,GADAA,EAASA,GAAU5N,KAAK4D,SAASD,GAC7BiK,YAAkBmE,GACpB,MAAOxC,GAAU3B,EAAO1K,OAAQlD,KAAK6B,MAAM2N,YACjC5B,EAAO1K,OACP0K,EAAOxJ,UAAYpE,KAAKgS,SAASpE,EAG7C,IACI1K,GAAQmM,EAAGlD,EADXhB,EAAM8G,EAAclR,KAAKf,KAAMiM,EAAMtI,EAgBzC,OAdIwH,KACFjI,EAASiI,EAAIjI,OACb+I,EAAOd,EAAIc,KACXE,EAAShB,EAAIgB,QAGXjJ,YAAkB6O,GACpB1C,EAAInM,EAAOkB,UAAY7B,EAAQxB,KAAKf,KAAMkD,EAAOA,OAAQ+I,EAAMzD,OAAW2D,GACjEjJ,IACTmM,EAAIE,EAAUrM,EAAQlD,KAAK6B,MAAM2N,YAC3BtM,EACAX,EAAQxB,KAAKf,KAAMkD,EAAQ+I,EAAMzD,OAAW2D,IAG7CkD,EAWT,QAAS4C,GAAchG,EAAMtI,GAE3B,GAAIuO,GAAIpD,EAAIqD,MAAMxO,GAAK,GAAO,GAC1ByO,EAAUC,EAAaH,GACvB/F,EAASmG,EAAYrG,EAAK/I,OAAOqP,GACrC,IAAIH,IAAYjG,EAAQ,CACtB,GAAIoG,GAAKC,EAAYJ,GACjBxE,EAAS5N,KAAK0D,MAAM6O,EACxB,IAAqB,gBAAV3E,GACT,MAAO6E,GAAiB1R,KAAKf,KAAMiM,EAAM2B,EAAQsE,EAC5C,IAAItE,YAAkBmE,GACtBnE,EAAOxJ,UAAUpE,KAAKgS,SAASpE,GACpC3B,EAAO2B,MACF,CAEL,GADAA,EAAS5N,KAAK4D,SAAS2O,KACnB3E,YAAkBmE,IAMpB,MAJA,IADKnE,EAAOxJ,UAAUpE,KAAKgS,SAASpE,GAChC2E,GAAMC,EAAY7O,GACpB,OAAST,OAAQ0K,EAAQ3B,KAAMA,EAAME,OAAQA,EAC/CF,GAAO2B,EAKX,IAAK3B,EAAK/I,OAAQ,MAClBiJ,GAASmG,EAAYrG,EAAK/I,OAAOqP,IAEnC,MAAOG,GAAe3R,KAAKf,KAAMkS,EAAG/F,EAAQF,EAAK/I,OAAQ+I,GAK3D,QAASwG,GAAiBxG,EAAMtI,EAAKgP,GAEnC,GAAIxH,GAAM8G,EAAclR,KAAKf,KAAMiM,EAAMtI,EACzC,IAAIwH,EAAK,CACP,GAAIjI,GAASiI,EAAIjI,OACbiJ,EAAShB,EAAIgB,MAGjB,OAFAF,GAAOd,EAAIc,KACP/I,EAAOqP,KAAIpG,EAASyG,EAAWzG,EAAQjJ,EAAOqP,KAC3CG,EAAe3R,KAAKf,KAAM2S,EAAWxG,EAAQjJ,EAAQ+I,IAOhE,QAASyG,GAAeC,EAAWxG,EAAQjJ,EAAQ+I,GAGjD,GADA0G,EAAUE,KAAOF,EAAUE,MAAQ,GACF,MAA7BF,EAAUE,KAAKC,MAAM,EAAE,GAA3B,CAGA,IAAK,GAFDC,GAAQJ,EAAUE,KAAK7I,MAAM,KAExBrJ,EAAI,EAAGA,EAAIoS,EAAM/R,OAAQL,IAAK,CACrC,GAAIqS,GAAOD,EAAMpS,EACjB,IAAIqS,EAAM,CAGR,GAFAA,EAAOlR,EAAKmR,iBAAiBD,GAC7B9P,EAASA,EAAO8P,IACX9P,EAAQ,KAEb,IADIA,EAAOqP,KAAOW,EAAqBF,KAAO7G,EAASyG,EAAWzG,EAAQjJ,EAAOqP,KAC7ErP,EAAOqC,KAAM,CACf,GAAIA,GAAOqN,EAAWzG,EAAQjJ,EAAOqC,MACjC4F,EAAM8G,EAAclR,KAAKf,KAAMiM,EAAM1G,EACrC4F,KACFjI,EAASiI,EAAIjI,OACb+I,EAAOd,EAAIc,KACXE,EAAShB,EAAIgB,UAKrB,MAAIjJ,IAAUA,GAAU+I,EAAK/I,QAClBA,OAAQA,EAAQ+I,KAAMA,EAAME,OAAQA,GAD/C,QAcF,QAASoD,GAAUrM,EAAQiQ,GACzB,MAAIA,MAAU,IACA3K,SAAV2K,GAAuBA,KAAU,EAAaC,EAAWlQ,GACpDiQ,EAAcE,EAAUnQ,IAAWiQ,EAAvC,QAIP,QAASC,GAAWlQ,GAClB,GAAIoQ,EACJ,IAAInL,MAAMC,QAAQlF,IAChB,IAAK,GAAIvC,GAAE,EAAGA,EAAEuC,EAAOlC,OAAQL,IAE7B,GADA2S,EAAOpQ,EAAOvC,GACK,gBAAR2S,KAAqBF,EAAWE,GAAO,OAAO,MAG3D,KAAK,GAAIpO,KAAOhC,GAAQ,CACtB,GAAW,QAAPgC,EAAe,OAAO,CAE1B,IADAoO,EAAOpQ,EAAOgC,GACK,gBAARoO,KAAqBF,EAAWE,GAAO,OAAO,EAG7D,OAAO,EAIT,QAASD,GAAUnQ,GACjB,GAAeoQ,GAAXC,EAAQ,CACZ,IAAIpL,MAAMC,QAAQlF,IAChB,IAAK,GAAIvC,GAAE,EAAGA,EAAEuC,EAAOlC,OAAQL,IAG7B,GAFA2S,EAAOpQ,EAAOvC,GACK,gBAAR2S,KAAkBC,GAASF,EAAUC,IAC5CC,GAASC,EAAAA,EAAU,MAAOA,GAAAA,MAGhC,KAAK,GAAItO,KAAOhC,GAAQ,CACtB,GAAW,QAAPgC,EAAe,MAAOsO,GAAAA,CAC1B,IAAIC,EAAevO,GACjBqO,QAIA,IAFAD,EAAOpQ,EAAOgC,GACK,gBAARoO,KAAkBC,GAASF,EAAUC,GAAQ,GACpDC,GAASC,EAAAA,EAAU,MAAOA,GAAAA,EAIpC,MAAOD,GAIT,QAASjB,GAAYC,EAAImB,GACnBA,KAAc,IAAOnB,EAAKC,EAAYD,GAC1C,IAAIL,GAAIpD,EAAIqD,MAAMI,GAAI,GAAO,EAC7B,OAAOF,GAAaH,GAItB,QAASG,GAAaH,GACpB,GAAIyB,GAAoBzB,EAAE0B,UAAiC,MAArB1B,EAAE2B,KAAKf,MAAM,EAAE,GAAa,KAAO,EACzE,QAAQZ,EAAE0B,UAAU,IAAMD,GAAqBzB,EAAE4B,MAAM,KAAO5B,EAAE6B,MAAM,IAAO,IAK/E,QAASvB,GAAYD,GACnB,MAAOA,GAAKA,EAAGyB,QAAQC,EAAqB,IAAM,GAIpD,QAASrB,GAAWzG,EAAQoG,GAE1B,MADAA,GAAKC,EAAYD,GACVzD,EAAIxB,QAAQnB,EAAQoG,GAK7B,QAAS2B,GAAWhR,GASlB,QAASiR,GAAYjR,EAAQkR,EAAUjI,GAErC,GAAIhE,MAAMC,QAAQlF,GAChB,IAAK,GAAIvC,GAAE,EAAGA,EAAEuC,EAAOlC,OAAQL,IAC7BwT,EAAYpT,KAAKf,KAAMkD,EAAOvC,GAAIyT,EAAS,IAAIzT,EAAGwL,OAC/C,IAAIjJ,GAA2B,gBAAVA,GAAoB,CAC9C,GAAwB,gBAAbA,GAAOqP,GAAgB,CAChC,GAAIA,GAAKpG,EAASA,EACE2C,EAAIxB,QAAQnB,EAAQjJ,EAAOqP,IAC3BrP,EAAOqP,EAC3BA,GAAKC,EAAYD,EAEjB,IAAI3E,GAAS5N,KAAK0D,MAAM6O,EAExB,IADqB,gBAAV3E,KAAoBA,EAAS5N,KAAK0D,MAAMkK,IAC/CA,GAAUA,EAAO1K,QACnB,IAAK8E,EAAM9E,EAAQ0K,EAAO1K,QACxB,KAAM,IAAItC,OAAM,OAAS2R,EAAK,0CAC3B,IAAIA,GAAMC,EAAY4B,GAC3B,GAAa,KAAT7B,EAAG,GAAW,CAChB,GAAIrG,EAAUqG,KAAQvK,EAAM9E,EAAQgJ,EAAUqG,IAC5C,KAAM,IAAI3R,OAAM,OAAS2R,EAAK,qCAChCrG,GAAUqG,GAAMrP,MAEhBlD,MAAK0D,MAAM6O,GAAM6B,EAIvB,IAAK,GAAIlP,KAAOhC,GACdiR,EAAYpT,KAAKf,KAAMkD,EAAOgC,GAAMkP,EAAS,IAAItS,EAAKuS,eAAenP,GAAMiH,IAlCjF,GAAIoG,GAAKC,EAAYtP,EAAOqP,IACxBrG,IAEJ,OADAiI,GAAYpT,KAAKf,KAAMkD,EAAQoP,EAAYC,GAAI,GAAQA,GAChDrG,EAtOT,GAAI4C,GAAMpO,EAAQ,OACdsH,EAAQtH,EAAQ,WAChBoB,EAAOpB,EAAQ,UACfqR,EAAerR,EAAQ,eAE3BjB,GAAOD,QAAU8N,EAEjBA,EAAQkF,YAAcA,EACtBlF,EAAQ8G,SAAW9B,EACnBhF,EAAQwB,IAAM8D,EACdtF,EAAQgH,IAAMJ,EACd5G,EAAQiC,UAAYA,EACpBjC,EAAQpK,OAAS+O,CAiGjB,IAAIiB,GAAuBpR,EAAKyS,QAAQ,aAAc,oBAAqB,OAAQ,eAAgB,gBA+B/Fd,EAAiB3R,EAAKyS,QACxB,OAAQ,SAAU,UAClB,YAAa,YACb,gBAAiB,gBACjB,WAAY,WACZ,UAAW,UACX,cAAe,aACf,WAAY,SAgEVN,EAAsB,UAuDvBvC,UAAU,EAAE8C,eAAe,EAAEzI,SAAS,GAAG+C,IAAM,KAAK2F,GAAG,SAAS/T,EAAQjB,EAAOD,GAClF,YAEA,IAAIkV,GAAchU,EAAQ,YACtB6T,EAAS7T,EAAQ,UAAU6T,MAE/B9U,GAAOD,QAAU,WACf,GAAI6N,KACAsH,KAAM,SACNC,OAAS,UAAW,UAAW,gBAC/BD,KAAM,SACNC,OAAS,YAAa,YAAa,UAAW,YAC9CD,KAAM,QACNC,OAAS,WAAY,WAAY,cAAe,WAChDD,KAAM,SACNC,OAAS,gBAAiB,gBAAiB,WAAY,eAAgB,gBACvEA,OAAS,OAAQ,OAAQ,MAAO,QAAS,QAAS,WAGlDC,GAAQ,OAAQ,uBAAwB,qBACxCC,GAAa,kBAAmB,UAAW,KAAM,QAAS,cAAe,WACzEC,GAAU,SAAU,UAAW,SAAU,QAAS,SAAU,UAAW,OAkB3E,OAjBA1H,GAAM2H,IAAMT,EAAOM,GAEnBxH,EAAM4H,QAAQ,SAAUC,GACtBA,EAAMN,MAAQM,EAAMN,MAAMO,IAAI,SAAUvE,GACtCiE,EAAIO,KAAKxE,EACT,IAAIT,GAAO9C,EAAM2H,IAAIpE,IACnBA,QAASA,EACT/P,KAAM6T,EAAY9D,GAEpB,OAAOT,OAIX9C,EAAMgI,SAAWd,EAAOM,EAAIS,OAAOR,IACnCzH,EAAMkI,MAAQhB,EAAOQ,GACrB1H,EAAMmI,UAECnI,KAGNoI,WAAW,EAAE1J,SAAS,KAAK2J,GAAG,SAAShV,EAAQjB,EAAOD,GACzD,YAMA,SAASuS,GAAa4D,GACpB7T,EAAKC,KAAK4T,EAAK3V,MALjB,GAAI8B,GAAOpB,EAAQ,SAEnBjB,GAAOD,QAAUuS,IAMdhG,SAAS,KAAK6J,IAAI,SAASlV,EAAQjB,EAAOD,GAC7C,YAIAC,GAAOD,QAAU,SAAoBwJ,GAKnC,IAJA,GAGI7D,GAHAnE,EAAS,EACT6U,EAAM7M,EAAIhI,OACV8U,EAAM,EAEHA,EAAMD,GACX7U,IACAmE,EAAQ6D,EAAI+M,WAAWD,KACnB3Q,GAAS,OAAUA,GAAS,OAAU2Q,EAAMD,IAE9C1Q,EAAQ6D,EAAI+M,WAAWD,GACC,QAAX,MAAR3Q,IAA2B2Q,IAGpC,OAAO9U,SAGHgV,IAAI,SAAStV,EAAQjB,EAAOD,GAClC,YA6BA,SAASuC,GAAKxB,EAAG0V,GACfA,EAAKA,KACL,KAAK,GAAI/Q,KAAO3E,GAAG0V,EAAG/Q,GAAO3E,EAAE2E,EAC/B,OAAO+Q,GAIT,QAASC,GAAcC,EAAUC,EAAMC,GACrC,GAAIC,GAAQD,EAAS,QAAU,QAC3BE,EAAMF,EAAS,OAAS,OACxBG,EAAKH,EAAS,IAAM,GACpBI,EAAMJ,EAAS,GAAK,GACxB,QAAQF,GACN,IAAK,OAAQ,MAAOC,GAAOE,EAAQ,MACnC,KAAK,QAAS,MAAOE,GAAK,iBAAmBJ,EAAO,GACpD,KAAK,SAAU,MAAO,IAAMI,EAAKJ,EAAOG,EAClB,UAAYH,EAAOE,EAAQ,WAAaC,EACxCE,EAAM,iBAAmBL,EAAO,IACtD,KAAK,UAAW,MAAO,WAAaA,EAAOE,EAAQ,WAAaC,EACzCE,EAAM,IAAML,EAAO,QACnBG,EAAMH,EAAOE,EAAQF,EAAO,GACnD,SAAS,MAAO,UAAYA,EAAOE,EAAQ,IAAMH,EAAW,KAKhE,QAASO,GAAeC,EAAWP,GACjC,OAAQO,EAAU3V,QAChB,IAAK,GAAG,MAAOkV,GAAcS,EAAU,GAAIP,GAAM,EACjD,SACE,GAAIvV,GAAO,GACP0U,EAAQhB,EAAOoC,EACfpB,GAAMqB,OAASrB,EAAMsB,SACvBhW,EAAO0U,EAAMuB,KAAO,IAAK,KAAOV,EAAO,OACvCvV,GAAQ,UAAYuV,EAAO,uBACpBb,GAAMuB,WACNvB,GAAMqB,YACNrB,GAAMsB,QAEXtB,EAAMwB,cAAexB,GAAMyB,OAC/B,KAAK,GAAI7W,KAAKoV,GACZ1U,IAASA,EAAO,OAAS,IAAOqV,EAAc/V,EAAGiW,GAAM,EAEzD,OAAOvV,IAMb,QAASoW,GAAcC,EAAmBP,GACxC,GAAIxO,MAAMC,QAAQuO,GAAY,CAE5B,IAAK,GADDpB,MACK5U,EAAE,EAAGA,EAAEgW,EAAU3V,OAAQL,IAAK,CACrC,GAAIR,GAAIwW,EAAUhW,EACdwW,GAAgBhX,GAAIoV,EAAMA,EAAMvU,QAAUb,EACf,UAAtB+W,GAAuC,UAAN/W,IAAeoV,EAAMA,EAAMvU,QAAUb,GAEjF,GAAIoV,EAAMvU,OAAQ,MAAOuU,OACpB,CAAA,GAAI4B,EAAgBR,GACzB,OAAQA,EACH,IAA0B,UAAtBO,GAA+C,UAAdP,EAC1C,OAAQ,UAKZ,QAASpC,GAAOjD,GAEd,IAAK,GADDuB,MACKlS,EAAE,EAAGA,EAAE2Q,EAAItQ,OAAQL,IAAKkS,EAAKvB,EAAI3Q,KAAM,CAChD,OAAOkS,GAMT,QAASuE,GAAYlS,GACnB,MAAqB,gBAAPA,GACJ,IAAMA,EAAM,IACZmS,EAAWjN,KAAKlF,GACd,IAAMA,EACN,KAAOoS,EAAapS,GAAO,KAIzC,QAASoS,GAAatO,GACpB,MAAOA,GAAIgL,QAAQuD,EAAc,QACtBvD,QAAQ,MAAO,OACfA,QAAQ,MAAO,OACfA,QAAQ,MAAO,OACfA,QAAQ,MAAO,OAI5B,QAASwD,GAAcxO,EAAKyO,GAC1BA,GAAW,QACX,IAAIxO,GAAUD,EAAIE,MAAM,GAAIuB,QAAOgN,EAAS,KAC5C,OAAOxO,GAAUA,EAAQjI,OAAS,EAIpC,QAAS0W,GAAW1O,EAAKyO,EAASE,GAGhC,MAFAF,IAAW,WACXE,EAAOA,EAAK3D,QAAQ,MAAO,QACpBhL,EAAIgL,QAAQ,GAAIvJ,QAAOgN,EAAS,KAAME,EAAO,MAOtD,QAASC,GAAYC,GACnB,MAAOA,GAAI7D,QAAQ8D,EAAY,IACpB9D,QAAQ+D,EAAkB,IAC1B/D,QAAQgE,EAAoB,cAYzC,QAASC,GAAiBJ,EAAKvW,GAC7B,GAAI2H,GAAU4O,EAAI3O,MAAMgP,EACxB,OAAKjP,IAA8B,IAAnBA,EAAQjI,OACjBM,EACGuW,EAAI7D,QAAQmE,EAAqB,IAC7BnE,QAAQoE,EAAcC,GAC1BR,EAAI7D,QAAQsE,EAAe,IACvBtE,QAAQuE,EAAcC,GALSX,EAS/C,QAASY,GAAevV,EAAQ0R,GAC9B,IAAK,GAAI1P,KAAOhC,GAAQ,GAAI0R,EAAM1P,GAAM,OAAO,EAIjD,QAASwT,GAAqBxV,EAAQ0R,EAAO+D,GAC3C,IAAK,GAAIzT,KAAOhC,GAAQ,GAAIgC,GAAOyT,GAAiB/D,EAAM1P,GAAM,OAAO,EAIzE,QAAS6K,GAAe/G,GACtB,MAAO,IAAOsO,EAAatO,GAAO,IAIpC,QAAS4P,GAAYC,EAAalB,EAAMmB,EAAcC,GACpD,GAAIhF,GAAO+E,EACG,SAAanB,GAAQoB,EAAW,GAAK,8CACpCA,EAAW,SAAapB,EAAO,SAAa,YAAiBA,EAAO,WACnF,OAAOqB,GAAUH,EAAa9E,GAIhC,QAASkF,GAAQJ,EAAaK,EAAMJ,GAClC,GAAI/E,GACUhE,EADH+I,EACkB,IAAMK,EAAkBD,GACxB9B,EAAY8B,GACzC,OAAOF,GAAUH,EAAa9E,GAMhC,QAASqF,GAAQC,EAAOC,EAAKC,GAC3B,GAAIC,GAAIC,EAAarD,EAAMnN,CAC3B,IAAc,KAAVoQ,EAAc,MAAO,UACzB,IAAgB,KAAZA,EAAM,GAAW,CACnB,IAAKhO,EAAajB,KAAKiP,GAAQ,KAAM,IAAIzY,OAAM,yBAA2ByY,EAC1EI,GAAcJ,EACdjD,EAAO,eACF,CAEL,GADAnN,EAAUoQ,EAAMnQ,MAAMoC,IACjBrC,EAAS,KAAM,IAAIrI,OAAM,yBAA2ByY,EAGzD,IAFAG,GAAMvQ,EAAQ,GACdwQ,EAAcxQ,EAAQ,GACH,KAAfwQ,EAAoB,CACtB,GAAID,GAAMF,EAAK,KAAM,IAAI1Y,OAAM,gCAAkC4Y,EAAK,gCAAkCF,EACxG,OAAOC,GAAMD,EAAME,GAGrB,GAAIA,EAAKF,EAAK,KAAM,IAAI1Y,OAAM,sBAAwB4Y,EAAK,gCAAkCF,EAE7F,IADAlD,EAAO,QAAWkD,EAAME,GAAO,KAC1BC,EAAa,MAAOrD,GAK3B,IAAK,GAFDuB,GAAOvB,EACPsD,EAAWD,EAAYzP,MAAM,KACxBrJ,EAAE,EAAGA,EAAE+Y,EAAS1Y,OAAQL,IAAK,CACpC,GAAIgZ,GAAUD,EAAS/Y,EACnBgZ,KACFvD,GAAQgB,EAAYwC,EAAoBD,IACxChC,GAAQ,OAASvB,GAGrB,MAAOuB,GAIT,QAASqB,GAAWvY,EAAGwH,GACrB,MAAS,MAALxH,EAAkBwH,GACdxH,EAAI,MAAQwH,GAAG+L,QAAQ,UAAW,IAI5C,QAASf,GAAiBjK,GACxB,MAAO4Q,GAAoBC,mBAAmB7Q,IAIhD,QAASqL,GAAerL,GACtB,MAAO8Q,oBAAmBX,EAAkBnQ,IAI9C,QAASmQ,GAAkBnQ,GACzB,MAAOA,GAAIgL,QAAQ,KAAM,MAAMA,QAAQ,MAAO,MAIhD,QAAS4F,GAAoB5Q,GAC3B,MAAOA,GAAIgL,QAAQ,MAAO,KAAKA,QAAQ,MAAO,KA5PhDvU,EAAOD,SACLuC,KAAMA,EACNmU,cAAeA,EACfQ,eAAgBA,EAChBO,cAAeA,EACf1C,OAAQA,EACR6C,YAAaA,EACbE,aAAcA,EACd7I,WAAY/N,EAAQ,gBACpB8W,cAAeA,EACfE,WAAYA,EACZE,YAAaA,EACbK,iBAAkBA,EAClBQ,eAAgBA,EAChBC,qBAAsBA,EACtBzI,gBAAiBvP,EAAQ,yBACzBqP,eAAgBA,EAChB6I,YAAaA,EACbK,QAASA,EACTG,QAASA,EACTnG,iBAAkBA,EAClBoB,eAAgBA,EAChB8E,kBAAmBA,EAoDrB,IAAIhC,GAAkB5C,GAAS,SAAU,SAAU,UAAW,UAAW,SAyBrE8C,EAAa,wBACbE,EAAe,QAiCfO,EAAa,gBACbC,EAAmB,uCACnBC,EAAqB,8CAQrBE,EAAgB,gBAChBI,EAAgB,kEAChBH,EAAsB,uCACtBI,EAAe,uBACfC,EAAc,uCACdJ,EAAe,gFACfC,EAAoB,eA4CpBhN,EAAe,sBACfC,EAAwB,qCA6DzByO,eAAe,GAAGlI,wBAAwB,KAAKmI,IAAI,SAAStZ,EAAQjB,EAAOD,GAC9E,YAKA,SAASkP,GAAgBjC,GACvBzM,KAAKyQ,QAAU,oBACfzQ,KAAKyM,OAASA,EACdzM,KAAKia,IAAMja,KAAKka,YAAa,EAN/Bza,EAAOD,QAAUkP,EAUjBA,EAAgB1J,UAAYuD,OAAO4R,OAAOvZ,MAAMoE,WAChD0J,EAAgB1J,UAAUoV,YAAc1L,OAElC2L,IAAI,SAAS3Z,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAA+B6Q,EAAIiK,GAClD,GAOIC,GAPA1C,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BO,EAAS,QAAUT,CAEvB,IADA3C,GAAO,OAAS,EAAW,gBACvBxH,EAAGlP,KAAKyE,UAAW,EAErB,MADAiS,IAAO,IAAM,EAAW,WAG1B,IAAIqD,GAAgB7K,EAAGnN,OAAO0C,OAC5BuV,EAAgB9K,EAAGlP,KAAKia,IAAMF,EAAc7B,MAC5CgC,EAAiB,EACnB,IAAIF,EAAe,CACjB,GAAIG,GAAqBjL,EAAGvO,KAAKsX,QAAQ8B,EAAc7B,MAAOqB,EAAUrK,EAAGkL,aACzEC,EAAU,SAAWhB,EACrBiB,EAAW,UAAYjB,CACzB3C,IAAO,QAAU,EAAY,cAAgB,EAAuB,OAAS,EAAa,MAAQ,EAAY,OAAS,EAAY,gBAC9H,CACL,GAAI2D,GAAUnL,EAAG3H,QAAQwS,EACzB,KAAMM,IAAWA,EAAQ1S,QAEvB,MADA+O,IAAO,KAAO,EAAW,WAG3B,IAAI4D,GAAW,UAAYpL,EAAGvO,KAAKsV,YAAY8D,GAAiB,WAElE,GAOEQ,GAPEC,EAAqB,iBAAZrB,EACXsB,EAAoB,mBAAqBD,EAAS,UAAY,WAC9DE,EAAcxL,EAAGnN,OAAO0Y,GACxBE,EAAczL,EAAGlP,KAAKia,IAAMS,GAAeA,EAAYxC,MACvD0C,EAAMJ,EAAS,IAAM,IACrBK,EAAU,SAAWxB,EACnByB,EAAU5L,EAAGlP,KAAKia,IAAMR,GAAWA,EAAQvB,KAQ/C,IANI4C,GACFpE,GAAO,cAAgB,EAAS,MAASxH,EAAGvO,KAAKsX,QAAQwB,EAAQvB,MAAOqB,EAAUrK,EAAGkL,aAAgB,KACrGG,EAAe,SAAWlB,GAE1BkB,EAAed,EAEbkB,EAAa,CACf,GAAII,GAAmB7L,EAAGvO,KAAKsX,QAAQyC,EAAYxC,MAAOqB,EAAUrK,EAAGkL,aACrEY,EAAa,YAAc3B,EAC3B4B,EAAU,KAAO5B,EACjB6B,EAAS,OAAUD,EAAU,MAC/BvE,IAAO,kBAAoB,EAAS,MAAQ,EAAqB,KACjEqE,EAAmB,aAAe1B,EAClC3C,GAAO,eAAiB,EAAqB,oBAAwB,EAAqB,qBAAuB,EAAW,YAC5H,IAAI0C,GAAgBqB,EAChBU,EAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,yBAA2B,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,iBAC5LzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,gBAAmB,EAAsB,wBAE9CxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,OACHkD,IACFM,GAAkB,IAClBxD,GAAO,YAELoE,IACFpE,GAAO,QAAU,EAAiB,mBAAqB,EAAW,4BAA8B,EAAiB,iBAAqB,EAAW,oBACjJwD,GAAkB,KAEhBF,IACFtD,GAAO,SAAW,EAAa,KAAO,EAAW,mBACjDwD,GAAkB,KAEpBxD,GAAO,QAAU,EAAY,MAAQ,EAAa,IAAM,EAAU,MAEhEA,GADEoE,EACK,GAAK,EAEL,GAAM5L,EAAGvO,KAAKiO,eAAe6K,GAEtC/C,GAAO,WAAa,EAAY,mBAAqB,EAAW,iBAAmB,EAAe,MAAQ,EAAqB,kBAAoB,EAAW,qBAAuB,EAAW,MAAQ,EAAe,MAAQ,EAAY,IAAM,EAAQ,QAAU,EAAY,IAAM,EAAQ,eAAiB,EAAW,WAAa,EAAS,MAAQ,EAAe,OAAU,EAAQ,QAAY,EAAQ,UACvY,CACL,GAAIsE,GAAaN,KAAgB,EAC/BQ,EAASN,CACNI,KAAYE,GAAU,IAC3B,IAAID,GAAU,IAAOC,EAAS,GAC1BJ,KACFpE,GAAO,QAAU,EAAiB,mBAAqB,EAAW,4BAA8B,EAAiB,iBAAqB,EAAW,oBACjJwD,GAAkB,KAEhBF,IACFtD,GAAO,SAAW,EAAa,KAAO,EAAW,mBACjDwD,GAAkB,KAEpBxD,GAAO,QAAU,EAAY,MAAQ,EAAa,IAAM,EAAU,MAEhEA,GADEoE,EACK,GAAK,EAEL,GAAM5L,EAAGvO,KAAKiO,eAAe6K,GAEtC/C,GAAO,WAAa,EAAY,mBAAqB,EAAW,iBAAmB,EAAW,mBAAqB,EAAW,MAAQ,EAAY,IAAM,EACnJsE,IACHtE,GAAO,KAETA,GAAO,MAETA,GAAO,GAAK,EAAmB,QAAU,EAAW,MACpD,IAAI0C,GAAgBD,EAChBgC,EAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,gBAAkB,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,4BAA8B,EAAY,aAE/NjD,GADEoE,EACK,GAAK,EAEL,GAAM5L,EAAGvO,KAAKiO,eAAe6K,GAEtC/C,GAAO,iBAAmB,EAAe,MACrCxH,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,0BAA6B,EAAW,KAE7CA,GADEoE,EACK,OAAU,EAAiB,OAE3B,GAAM5L,EAAGvO,KAAKwV,aAAasD,GAEpC/C,GAAO,QAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,eAELA,GADEoE,EACK,kBAAoB,EAEpB,GAAM5L,EAAGvO,KAAKiO,eAAe6K,GAEtC/C,GAAO,2CAA8CxH,EAAa,WAAI,YAAc,EAAU,KAEhGwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CAYZ,OAXAA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,UAIHgF,IAAI,SAASnc,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAAyB6Q,EAAIiK,GAC5C,GAOIC,GAGFmB,EAVE7D,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BuB,EAAU5L,EAAGlP,KAAKia,IAAMR,GAAWA,EAAQvB,KAE3C4C,IACFpE,GAAO,cAAgB,EAAS,MAASxH,EAAGvO,KAAKsX,QAAQwB,EAAQvB,MAAOqB,EAAUrK,EAAGkL,aAAgB,KACrGG,EAAe,SAAWlB,GAE1BkB,EAAed,CAEjB,IAAIe,GAAqB,WAAZrB,EACXsB,EAAoBD,EAAS,mBAAqB,mBAClDE,EAAcxL,EAAGnN,OAAO0Y,GACxBE,EAAczL,EAAGlP,KAAKia,IAAMS,GAAeA,EAAYxC,MACvD0C,EAAMJ,EAAS,IAAM,IACrBmB,EAASnB,EAAS,IAAM,GAC1B,IAAIG,EAAa,CACf,GAAII,GAAmB7L,EAAGvO,KAAKsX,QAAQyC,EAAYxC,MAAOqB,EAAUrK,EAAGkL,aACrEY,EAAa,YAAc3B,EAC3B4B,EAAU,KAAO5B,EACjB6B,EAAS,OAAUD,EAAU,MAC/BvE,IAAO,kBAAoB,EAAS,MAAQ,EAAqB,KACjEqE,EAAmB,aAAe1B,EAClC3C,GAAO,iBAAmB,EAAS,gBAAkB,EAAqB,2BAA+B,EAAqB,qBAC9H,IAAI0C,GAAgBqB,EAChBU,EAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,mBAAqB,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,iBACtLzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,gBAAmB,EAAsB,wBAE9CxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,eACHoE,IACFpE,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,eAAiB,EAAS,MAAQ,EAAqB,gBAAkB,EAAU,IAAM,EAAW,KAAO,EAAiB,MAAQ,EAAU,IAAM,EAAW,IAAM,EAAiB,QAAU,EAAU,QAAU,EAAU,aAAe,EAAS,eAAiB,EAAS,OAAU,EAAQ,QAAY,EAAQ,UACxT,CACL,GAAIsE,GAAaN,KAAgB,EAC/BQ,EAASN,CACNI,KAAYE,GAAU,IAC3B,IAAID,GAAU,IAAOC,EAAS,GAC9BxE,IAAO,SACHoE,IACFpE,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,IAAM,EAAU,IAAM,EACzBsE,IACFtE,GAAO,KAETA,GAAO,IAAM,EAAiB,OAAS,EAAU,QAAU,EAAU,MAEvE,GAAI0C,GAAgBD,EAChBgC,EAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,UAAY,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,4BAA8B,EAAY,YAAc,EAAiB,gBAAkB,EAAe,MACvRzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,0BAA6B,EAAW,IAE7CA,GADEoE,EACK,OAAU,EAEV,GAAK,EAAY,KAGxB5L,EAAGlP,KAAKsb,UACV5E,GAAO,eAELA,GADEoE,EACK,kBAAoB,EAEpB,GAAK,EAEdpE,GAAO,2CAA8CxH,EAAa,WAAI,YAAc,EAAU,KAEhGwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CAeZ,OAdAA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,MACHkD,IACFlD,GAAO,YAEFA,QAGHkF,IAAI,SAASrc,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAA8B6Q,EAAIiK,GACjD,GAOIC,GAGFmB,EAVE7D,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BuB,EAAU5L,EAAGlP,KAAKia,IAAMR,GAAWA,EAAQvB,KAE3C4C,IACFpE,GAAO,cAAgB,EAAS,MAASxH,EAAGvO,KAAKsX,QAAQwB,EAAQvB,MAAOqB,EAAUrK,EAAGkL,aAAgB,KACrGG,EAAe,SAAWlB,GAE1BkB,EAAed,CAEjB,IAAImB,GAAkB,YAAZzB,EAAyB,IAAM,GACzCzC,IAAO,QACHoE,IACFpE,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,IAAM,EAAU,WAAa,EAAQ,IAAM,EAAiB,MACnE,IAAI0C,GAAgBD,EAChBgC,EAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,eAAiB,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,uBAAyB,EAAiB,MAC5NzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,gCAELA,GADc,YAAZyC,EACK,OAEA,OAETzC,GAAO,SAELA,GADEoE,EACK,OAAU,EAAiB,OAE3B,GAAK,EAEdpE,GAAO,YAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,eAELA,GADEoE,EACK,kBAAoB,EAEpB,GAAK,EAEdpE,GAAO,2CAA8CxH,EAAa,WAAI,YAAc,EAAU,KAEhGwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CAeZ,OAdAA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,KACHkD,IACFlD,GAAO,YAEFA,QAGHmF,IAAI,SAAStc,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAA+B6Q,EAAIiK,GAClD,GAOIC,GAGFmB,EAVE7D,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BuB,EAAU5L,EAAGlP,KAAKia,IAAMR,GAAWA,EAAQvB,KAE3C4C,IACFpE,GAAO,cAAgB,EAAS,MAASxH,EAAGvO,KAAKsX,QAAQwB,EAAQvB,MAAOqB,EAAUrK,EAAGkL,aAAgB,KACrGG,EAAe,SAAWlB,GAE1BkB,EAAed,CAEjB,IAAImB,GAAkB,aAAZzB,EAA0B,IAAM,GAC1CzC,IAAO,QACHoE,IACFpE,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAG9EA,GADExH,EAAGlP,KAAK8b,WAAY,EACf,IAAM,EAAU,WAEhB,eAAiB,EAAU,KAEpCpF,GAAO,IAAM,EAAQ,IAAM,EAAiB,MAC5C,IAAI0C,GAAgBD,EAChBgC,EAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,gBAAkB,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,uBAAyB,EAAiB,MAC7NzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,8BAELA,GADc,aAAZyC,EACK,SAEA,UAETzC,GAAO,SAELA,GADEoE,EACK,OAAU,EAAiB,OAE3B,GAAK,EAEdpE,GAAO,iBAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,eAELA,GADEoE,EACK,kBAAoB,EAEpB,GAAK,EAEdpE,GAAO,2CAA8CxH,EAAa,WAAI,YAAc,EAAU,KAEhGwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CAeZ,OAdAA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU;AAEnCuW,GAAO,KACHkD,IACFlD,GAAO,YAEFA,QAGHqF,IAAI,SAASxc,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAAmC6Q,EAAIiK,GACtD,GAOIC,GAGFmB,EAVE7D,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BuB,EAAU5L,EAAGlP,KAAKia,IAAMR,GAAWA,EAAQvB,KAE3C4C,IACFpE,GAAO,cAAgB,EAAS,MAASxH,EAAGvO,KAAKsX,QAAQwB,EAAQvB,MAAOqB,EAAUrK,EAAGkL,aAAgB,KACrGG,EAAe,SAAWlB,GAE1BkB,EAAed,CAEjB,IAAImB,GAAkB,iBAAZzB,EAA8B,IAAM,GAC9CzC,IAAO,QACHoE,IACFpE,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,gBAAkB,EAAU,YAAc,EAAQ,IAAM,EAAiB,MAChF,IAAI0C,GAAgBD,EAChBgC,EAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,oBAAsB,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,uBAAyB,EAAiB,MACjOzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,gCAELA,GADc,iBAAZyC,EACK,OAEA,OAETzC,GAAO,SAELA,GADEoE,EACK,OAAU,EAAiB,OAE3B,GAAK,EAEdpE,GAAO,iBAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,eAELA,GADEoE,EACK,kBAAoB,EAEpB,GAAK,EAEdpE,GAAO,2CAA8CxH,EAAa,WAAI,YAAc,EAAU,KAEhGwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CAeZ,OAdAA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,KACHkD,IACFlD,GAAO,YAEFA,QAGHsF,IAAI,SAASzc,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAAwB6Q,EAAIiK,GAC3C,GAAIzC,GAAM,IACN+C,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UACzBoC,EAAM/M,EAAGvO,KAAKC,KAAKsO,GACnBgL,EAAiB,EACrB+B,GAAI3C,OACJ,IAAI4C,GAAiBD,EAAIjR,OACrBmR,EAAO1C,CACX,IAAI0C,EAGF,IAFA,GAAIC,GAAMC,GAAK,EACbC,EAAKH,EAAKtc,OAAS,EACdwc,EAAKC,GACVF,EAAOD,EAAKE,GAAM,GACdnN,EAAGvO,KAAK2W,eAAe8E,EAAMlN,EAAGhD,MAAM2H,OACxCoI,EAAIla,OAASqa,EACbH,EAAIlQ,WAAa2N,EAAc,IAAM2C,EAAK,IAC1CJ,EAAIjQ,cAAgB2N,EAAiB,IAAM0C,EAC3C3F,GAAO,KAAQxH,EAAGjM,SAASgZ,GAAQ,IACnCA,EAAIjR,OAASkR,EACTtC,IACFlD,GAAO,aAAgBuF,EAAS,MAAI,OACpC/B,GAAkB,KAS1B,OAJIN,KACFlD,GAAO,IAAOwD,EAAevI,MAAM,GAAG,IAExC+E,EAAMxH,EAAGvO,KAAK8V,YAAYC,SAItB6F,IAAI,SAAShd,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAAwB6Q,EAAIiK,GAC3C,GAOIC,GAPA1C,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BO,EAAS,QAAUT,EACnBmD,EAAQ,SAAWnD,EACnB4C,EAAM/M,EAAGvO,KAAKC,KAAKsO,GACnBgL,EAAiB,EACrB+B,GAAI3C,OACJ,IAAImD,GAAiBhD,EAAQiD,MAAM,SAASN,GAC1C,MAAOlN,GAAGvO,KAAK2W,eAAe8E,EAAMlN,EAAGhD,MAAM2H,MAE/C,IAAI4I,EAAgB,CAClB,GAAIP,GAAiBD,EAAIjR,MACzB0L,IAAO,QAAU,EAAU,kBAAoB,EAAW,aAC1D,IAAIiG,GAAgBzN,EAAGuM,aACvBvM,GAAGuM,cAAgBQ,EAAIR,eAAgB,CACvC,IAAIU,GAAO1C,CACX,IAAI0C,EAGF,IAFA,GAAIC,GAAMC,GAAK,EACbC,EAAKH,EAAKtc,OAAS,EACdwc,EAAKC,GACVF,EAAOD,EAAKE,GAAM,GAClBJ,EAAIla,OAASqa,EACbH,EAAIlQ,WAAa2N,EAAc,IAAM2C,EAAK,IAC1CJ,EAAIjQ,cAAgB2N,EAAiB,IAAM0C,EAC3C3F,GAAO,KAAQxH,EAAGjM,SAASgZ,GAAQ,IACnCA,EAAIjR,OAASkR,EACbxF,GAAO,IAAM,EAAW,MAAQ,EAAW,YAAeuF,EAAS,MAAI,UAAY,EAAW,OAC9F/B,GAAkB,GAGtBhL,GAAGuM,cAAgBQ,EAAIR,cAAgBkB,EACvCjG,GAAO,IAAM,EAAmB,SAAW,EAAW,oBAClDxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,SAAW,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,iBAC5KzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,oDAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,OAETA,GAAO,kGAAoG,EAAU,iCAAmC,EAAU,sBAAwB,EAAU,4BAChMxH,EAAGlP,KAAK6Z,YACVnD,GAAO,OAETA,EAAMxH,EAAGvO,KAAK8V,YAAYC,OAEtBkD,KACFlD,GAAO,gBAGX,OAAOA,SAGHkG,IAAI,SAASrd,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAA2B6Q,EAAIiK,GAC9C,GAOIC,GAIFmB,EAXE7D,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BO,EAAS,QAAUT,EACnByB,EAAU5L,EAAGlP,KAAKia,IAAMR,GAAWA,EAAQvB,KAE3C4C,IACFpE,GAAO,cAAgB,EAAS,MAASxH,EAAGvO,KAAKsX,QAAQwB,EAAQvB,MAAOqB,EAAUrK,EAAGkL,aAAgB,KACrGG,EAAe,SAAWlB,GAE1BkB,EAAed,EAEZqB,IACHpE,GAAO,cAAgB,EAAS,qBAAuB,EAAgB,KAEzEA,GAAO,OAAS,EAAW,YAAc,EAAU,WAAa,EAAS,WAAa,EAAW,QACjG,IAAIyE,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,YAAc,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,iBAC/KzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,8CAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CAYZ,OAXAA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,WAIHmG,IAAI,SAAStd,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAAyB6Q,EAAIiK,GAC5C,GAOIC,GAIFmB,EAXE7D,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BiD,EAAQ,SAAWnD,EACnByB,EAAU5L,EAAGlP,KAAKia,IAAMR,GAAWA,EAAQvB,KAE3C4C,IACFpE,GAAO,cAAgB,EAAS,MAASxH,EAAGvO,KAAKsX,QAAQwB,EAAQvB,MAAOqB,EAAUrK,EAAGkL,aAAgB,KACrGG,EAAe,SAAWlB,GAE1BkB,EAAed,CAEjB,IAIEqD,GAAUC,EAASC,EAAQC,EAAeC,EAJxCC,EAAQte,KACVue,EAAc,aAAe/D,EAC7BgE,EAAQF,EAAM/N,UAGhB,IAAI0L,GAAWuC,EAAMnF,MAAO,CAC1BgF,EAAgB,kBAAoB7D,CACpC,IAAIiE,GAAkBD,EAAMlO,cAC5BuH,IAAO,QAAU,EAAgB,oBAAuB,EAAa,sBAAyB,EAAkB,MAAQ,EAAgB,iBAExIuG,GAAgB/N,EAAG3C,cAAc4Q,EAAO1D,EAASvK,EAAGnN,OAAQmN,GAC5DqL,EAAe,kBAAoBb,EACnCwD,EAAgBD,EAAcvd,KAC9Bod,EAAWO,EAAMjc,QACjB2b,EAAUM,EAAM7O,OAChBwO,EAASK,EAAM7N,KAEjB,IAAI+N,GAAYL,EAAgB,UAC9Bb,EAAK,IAAMhD,EACXmE,EAAW,UAAYnE,EACvBoE,EAAgBJ,EAAMld,KACxB,IAAIsd,IAAkBvO,EAAG/O,MAAO,KAAM,IAAIV,OAAM,+BAKhD,IAJMsd,GAAWC,IACftG,GAAO,GAAK,EAAc,YAE5BA,GAAO,OAAS,EAAU,sBAAwB,EAAS,IACvDqG,GAAWM,EAAMK,WACnBhH,GAAO,IAAOuG,EAAsB,aAC/B,IAAID,EAAQ,CACjB,GAAIf,GAAM/M,EAAGvO,KAAKC,KAAKsO,EACvB+M,GAAI3C,QACJ2C,EAAIla,OAASkb,EAAcha,SAC3BgZ,EAAIlQ,WAAa,EACjB,IAAI4Q,GAAgBzN,EAAGuM,aACvBvM,GAAGuM,cAAgBQ,EAAIR,eAAgB,CACvC,IAAIkC,GAAQzO,EAAGjM,SAASgZ,GAAKpJ,QAAQ,oBAAqBqK,EAC1DhO,GAAGuM,cAAgBQ,EAAIR,cAAgBkB,EACvCjG,GAAO,IAAM,MACR,KAAKqG,EAAS,CACnB,GAAI5B,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACNA,GAAO,KAAO,EAAkB,UAE9BA,GADExH,EAAGlP,KAAK4d,YACH,OAEA,OAGPlH,GADEoG,GAAYO,EAAMtb,UAAW,EACxB,MAAQ,EAAU,IAElB,MAAQ,EAAiB,MAAQ,EAAU,qBAAwBmN,EAAa,WAAI,IAE7FwH,GAAO,sBACa,MAAhBxH,EAAGjD,YACLyK,GAAO,MAASxH,EAAY,WAG5BwH,GADE6C,EACK,WAAcA,EAAW,GAAM,IAAM,MAASrK,EAAGkL,YAAYb,GAAa,IAE1E,sCAET7C,GAAO,iBACP,IAAImH,GAAuBnH,CAC3BA,GAAMyE,EAAWK,MACb6B,EAAM/R,UAAW,IACfmS,GACFF,EAAY,eAAiBlE,EAC7B3C,GAAO,QAAU,EAAc,uBAAyB,EAAS,MAASxH,EAAa,WAAI,EAAyB,wBAA0B,EAAS,+CAAiD,EAAc,iCAEtNwH,GAAO,IAAM,EAAkB,oBAIrCA,GAAO,OACH4G,IACF5G,GAAO,KAAO,EAAgB,mBAAqB,EAAiB,SAEtEA,GAAO,MAGHA,GAFAqG,EACEM,EAAMK,WACD,SAAW,EAAS,IAEpB,KAAQT,EAAsB,SAAI,KAElCD,EACF,SAAYf,EAAS,MAAI,IAE5BwB,EACEJ,EAAM/R,UAAW,EACZ,KAAQ4D,EAAa,WAAI,EAAyB,KAElD,SAAW,EAAS,IAGtB,IAAM,EAAyB,IAG1CwH,GAAO,OACP0C,EAAgB+D,EAAM1N,OACtB,IAAI0L,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,EACN,IAAIyE,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,UAAY,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,0BAA8BwD,EAAa,QAAI,OAC5NjO,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,8BAAiCyG,EAAa,QAAI,2BAEvDjO,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,8EAEnC,IAAI2d,GAAkBpH,CA2DtB,OA1DAA,GAAMyE,EAAWK,MACbuB,EACEM,EAAM/R,OACY,QAAhB+R,EAAM/R,SACRoL,GAAO,cAAgB,EAAO,IAAM,EAAU,KAAO,EAAO,YAAc,EAAO,aAAe,EAAa,cAAgB,EAAO,UAAY,EAAa,8BAAgC,EAAa,kCAAuCxH,EAAY,UAAI,WAAa,EAAa,gCAAkC,EAAa,kBAAoB,EAAmB,QAC7WA,EAAGlP,KAAKsb,UACV5E,GAAO,IAAM,EAAa,aAAe,EAAiB,KAAO,EAAa,WAAa,EAAU,MAEvGA,GAAO,OAGL2G,EAAM/R,UAAW,EACnBoL,GAAO,IAAM,EAAoB,KAEjCA,GAAO,QAAU,EAAU,iBAAmB,EAAoB,uBAAyB,EAAO,IAAM,EAAU,KAAO,EAAO,YAAc,EAAO,aAAe,EAAa,cAAgB,EAAO,UAAY,EAAa,8BAAgC,EAAa,kCAAuCxH,EAAY,UAAI,WAAa,EAAa,gCAAkC,EAAa,kBAAoB,EAAmB,QACjbA,EAAGlP,KAAKsb,UACV5E,GAAO,IAAM,EAAa,aAAe,EAAiB,KAAO,EAAa,WAAa,EAAU,MAEvGA,GAAO,SAGFsG,GACTtG,GAAO,kBACHxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,UAAY,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,0BAA8BwD,EAAa,QAAI,OAC5NjO,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,8BAAiCyG,EAAa,QAAI,2BAEvDjO,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,OAETA,GAAO,gFACFxH,EAAGuM,eAAiB7B,IAErBlD,GADExH,EAAG/O,MACE,wCAEA,8CAIPkd,EAAM/R,UAAW,EACnBoL,GAAO,IAAM,EAAoB,KAEjCA,GAAO,sBAAwB,EAAc,wCAA0C,EAAc,mCAAqC,EAAc,yCAA2C,EAAO,IAAM,EAAU,KAAO,EAAO,YAAc,EAAO,aAAe,EAAa,cAAgB,EAAO,OAAS,EAAa,kCAAuCxH,EAAY,UAAI,OAAS,EAAa,kBAAoB,EAAmB,OACtbA,EAAGlP,KAAKsb,UACV5E,GAAO,IAAM,EAAa,aAAe,EAAiB,KAAO,EAAa,WAAa,EAAU,MAEvGA,GAAO,eAAiB,EAAoB,OAGhDA,GAAO,MACHkD,IACFlD,GAAO,YAEFA,QAGHqH,IAAI,SAASxe,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAA+B6Q,EAAIiK,GAClD,GAOIC,GAPA1C,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BiD,EAAQ,SAAWnD,EACnB4C,EAAM/M,EAAGvO,KAAKC,KAAKsO,GACnBgL,EAAiB,EACrB+B,GAAI3C,OACJ,IAAI0E,MACFC,IACF,KAAKC,IAAazE,GAAS,CACzB,GAAI2C,GAAO3C,EAAQyE,GACfC,EAAQnX,MAAMC,QAAQmV,GAAQ6B,EAAgBD,CAClDG,GAAMD,GAAa9B,EAErB1F,GAAO,OAAS,EAAU,YAC1B,IAAI0H,GAAoBlP,EAAGjD,SAC3ByK,IAAO,cAAgB,EAAS,GAChC,KAAK,GAAIwH,KAAaD,GAAe,CAGnC,GAFAE,EAAQF,EAAcC,GACtBxH,GAAO,QAAU,EAAWxH,EAAGvO,KAAKsV,YAAYiI,GAAc,kBAC1DtE,EAAe,CACjBlD,GAAO,QACP,IAAIyF,GAAOgC,CACX,IAAIhC,EAGF,IAFA,GAAIkC,GAAYhC,GAAK,EACnBC,EAAKH,EAAKtc,OAAS,EACdwc,EAAKC,GAAI,CACd+B,EAAalC,EAAKE,GAAM,GACpBA,IACF3F,GAAO,OAET,IAAI4H,GAAQpP,EAAGvO,KAAKsV,YAAYoI,EAChC3H,IAAO,MAAQ,EAAU,EAAU,6BAA+B,EAAS,MAASxH,EAAGvO,KAAKiO,eAAeM,EAAGlP,KAAK2X,aAAe0G,EAAaC,GAAU,OAG7J5H,GAAO,QACP,IAAI6H,GAAgB,UAAYlF,EAC9BmF,EAAmB,OAAUD,EAAgB,MAC3CrP,GAAGlP,KAAKye,yBACVvP,EAAGjD,UAAYiD,EAAGlP,KAAK2X,aAAezI,EAAGvO,KAAK8W,YAAY2G,EAAmBG,GAAe,GAAQH,EAAoB,MAAQG,EAElI,IAAIpD,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,gBAAkB,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,2BAA+BzK,EAAGvO,KAAKwV,aAAa+H,GAAc,wBAA4B,EAAqB,iBAAqBC,EAAY,OAAI,YAAgBjP,EAAGvO,KAAKwV,aAA6B,GAAhBgI,EAAMte,OAAcse,EAAM,GAAKA,EAAMO,KAAK,OAAU,OACpaxP,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,4BAELA,GADkB,GAAhByH,EAAMte,OACD,YAAeqP,EAAGvO,KAAKwV,aAAagI,EAAM,IAE1C,cAAiBjP,EAAGvO,KAAKwV,aAAagI,EAAMO,KAAK,OAE1DhI,GAAO,kBAAqBxH,EAAGvO,KAAKwV,aAAa+H,GAAc,iBAE7DhP,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,mFAE9B,CACLuW,GAAO,OACP,IAAIiI,GAAOR,CACX,IAAIQ,EAGF,IAFA,GAAIC,GAAcC,GAAK,EACrBC,EAAKH,EAAK9e,OAAS,EACdgf,EAAKC,GAAI,CACdF,EAAeD,EAAKE,GAAM,EAC1B,IAAIP,GAAQpP,EAAGvO,KAAKsV,YAAY2I,GAC9BJ,EAAmBtP,EAAGvO,KAAKwV,aAAayI,EACtC1P,GAAGlP,KAAKye,yBACVvP,EAAGjD,UAAYiD,EAAGvO,KAAKmX,QAAQsG,EAAmBQ,EAAc1P,EAAGlP,KAAK2X,eAE1EjB,GAAO,QAAU,EAAU,EAAU,kCACjCxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,gBAAkB,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,2BAA+BzK,EAAGvO,KAAKwV,aAAa+H,GAAc,wBAA4B,EAAqB,iBAAqBC,EAAY,OAAI,YAAgBjP,EAAGvO,KAAKwV,aAA6B,GAAhBgI,EAAMte,OAAcse,EAAM,GAAKA,EAAMO,KAAK,OAAU,OACpaxP,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,4BAELA,GADkB,GAAhByH,EAAMte,OACD,YAAeqP,EAAGvO,KAAKwV,aAAagI,EAAM,IAE1C,cAAiBjP,EAAGvO,KAAKwV,aAAagI,EAAMO,KAAK,OAE1DhI,GAAO,kBAAqBxH,EAAGvO,KAAKwV,aAAa+H,GAAc,iBAE7DhP,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,OAETA,GAAO,kFAIbA,GAAO,QACHkD,IACFM,GAAkB,IAClBxD,GAAO,YAGXxH,EAAGjD,UAAYmS,CACf,IAAIlC,GAAiBD,EAAIjR,MACzB,KAAK,GAAIkT,KAAaF,GAAa,CACjC,GAAI5B,GAAO4B,EAAYE,EACnBhP,GAAGvO,KAAK2W,eAAe8E,EAAMlN,EAAGhD,MAAM2H,OACxC6C,GAAO,SAAYuF,EAAS,MAAI,gBAAkB,EAAU,KAAQ,EAAc,uBAClFA,EAAIla,OAASqa,EACbH,EAAIlQ,WAAa2N,EAAcxK,EAAGvO,KAAKsV,YAAYiI,GACnDjC,EAAIjQ,cAAgB2N,EAAiB,IAAMzK,EAAGvO,KAAKuS,eAAegL,GAClExH,GAAO,KAAQxH,EAAGjM,SAASgZ,GAAQ,IACnCA,EAAIjR,OAASkR,EACbxF,GAAO,OACHkD,IACFlD,GAAO,aAAgBuF,EAAS,MAAI,OACpC/B,GAAkB,MAQxB,MAJIN,KACFlD,GAAO,MAAQ,EAAmB,QAAU,EAAU,iBAExDA,EAAMxH,EAAGvO,KAAK8V,YAAYC,SAItBqI,IAAI,SAASxf,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAAuB6Q,EAAIiK,GAC1C,GAOIC,GAIFmB,EAXE7D,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BO,EAAS,QAAUT,EACnByB,EAAU5L,EAAGlP,KAAKia,IAAMR,GAAWA,EAAQvB,KAE3C4C,IACFpE,GAAO,cAAgB,EAAS,MAASxH,EAAGvO,KAAKsX,QAAQwB,EAAQvB,MAAOqB,EAAUrK,EAAGkL,aAAgB,KACrGG,EAAe,SAAWlB,GAE1BkB,EAAed,CAEjB,IAAI4C,GAAK,IAAMhD,CACVyB,KACHpE,GAAO,cAAgB,EAAS,qBAAuB,EAAgB,KAEzEA,GAAO,OAAS,EAAW,IACvBoE,IACFpE,GAAO,cAAgB,EAAS,mBAAqB,EAAW,0CAA4C,EAAS,MAAQ,EAAW,oBAE1IA,GAAO,GAAK,EAAW,qBAAuB,EAAO,OAAS,EAAO,UAAY,EAAS,YAAc,EAAO,iBAAmB,EAAU,WAAa,EAAS,IAAM,EAAO,SAAW,EAAW,oBACjMoE,IACFpE,GAAO,SAETA,GAAO,SAAW,EAAW,QAC7B,IAAIyE,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,QAAU,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,qCAAuC,EAAS,MAC3NzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,+DAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CAeZ,OAdAA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,KACHkD,IACFlD,GAAO,YAEFA,QAGHsI,IAAI,SAASzf,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAAyB6Q,EAAIiK,GAC5C,GAOIC,GAPA1C,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,GAClC,IAAIrK,EAAGlP,KAAKyE,UAAW,EAIrB,MAHImV,KACFlD,GAAO,iBAEFA,CAET,IACE6D,GADEO,EAAU5L,EAAGlP,KAAKia,IAAMR,GAAWA,EAAQvB,KAQ/C,IANI4C,GACFpE,GAAO,cAAgB,EAAS,MAASxH,EAAGvO,KAAKsX,QAAQwB,EAAQvB,MAAOqB,EAAUrK,EAAGkL,aAAgB,KACrGG,EAAe,SAAWlB,GAE1BkB,EAAed,EAEbqB,EAAS,CACX,GAAIT,GAAU,SAAWhB,CACzB3C,IAAO,QAAU,EAAY,cAAgB,EAAiB,kBAAoB,EAAS,aAAe,EAAY,qBAAyB,EAAY,0BAA4B,EAAY,0BAA4B,EAAS,gBAAkB,EAAS,MAAQ,EAAY,WAAa,EAAY,MAAQ,EAAY,sBAChUoE,IACFpE,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,KAAO,EAAY,gBAAkB,EAAY,oBAEtDA,GADExH,EAAG/O,MACE,UAAY,EAAS,MAAS+O,EAAa,WAAI,IAAM,EAAY,IAAM,EAAU,OAAS,EAAY,IAAM,EAAU,MAEtH,IAAM,EAAY,IAAM,EAAU,KAE3CwH,GAAO,MAAQ,EAAY,SAAW,EAAU,aAC3C,CACL,GAAI2D,GAAUnL,EAAG3H,QAAQkS,EACzB,KAAKY,EAIH,MAHIT,KACFlD,GAAO,iBAEFA,CAET,IAAIuI,GAA8B,gBAAX5E,MAAyBA,YAAmB/Q,UAAW+Q,EAAQpX,QACtF,IAAIgc,EAAW,CACb,GAAItT,GAAS0O,EAAQla,SAAU,CAC/Bka,GAAUA,EAAQpX,SAEpB,GAAI0I,EAAQ,CACV,IAAKuD,EAAG/O,MAAO,KAAM,IAAIV,OAAM,8BAC/B,IAAIyf,GAAa,UAAYhQ,EAAGvO,KAAKsV,YAAYwD,GAAW,WAC5D/C,IAAO,UAAaxH,EAAa,WAAI,IAAM,EAAe,IAAM,EAAU,aACrE,CACLwH,GAAO,SACP,IAAIwI,GAAa,UAAYhQ,EAAGvO,KAAKsV,YAAYwD,EAC7CwF,KAAWC,GAAc,aAE3BxI,GADoB,kBAAX2D,GACF,IAAM,EAAe,IAAM,EAAU,KAErC,IAAM,EAAe,SAAW,EAAU,KAEnD3D,GAAO,QAGX,GAAIyE,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,UAAY,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,yBAE/KjD,GADEoE,EACK,GAAK,EAEL,GAAM5L,EAAGvO,KAAKiO,eAAe6K,GAEtC/C,GAAO,OACHxH,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,sCAELA,GADEoE,EACK,OAAU,EAAiB,OAE3B,GAAM5L,EAAGvO,KAAKwV,aAAasD,GAEpC/C,GAAO,QAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,eAELA,GADEoE,EACK,kBAAoB,EAEpB,GAAM5L,EAAGvO,KAAKiO,eAAe6K,GAEtC/C,GAAO,2CAA8CxH,EAAa,WAAI,YAAc,EAAU,KAEhGwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CAeZ,OAdAA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,MACHkD,IACFlD,GAAO,YAEFA,QAGHyI,IAAI,SAAS5f,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAAwB6Q,EAAIiK,GAC3C,GAOIC,GAPA1C,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BO,EAAS,QAAUT,EACnBmD,EAAQ,SAAWnD,EACnB4C,EAAM/M,EAAGvO,KAAKC,KAAKsO,GACnBgL,EAAiB,EACrB+B,GAAI3C,OACJ,IAAI8F,GAAWnD,EAAIzC,UAAYtK,EAAGsK,UAAY,EAC5C6F,EAAY,OAASD,EACrBlD,EAAiBhN,EAAGlE,MAEtB,IADA0L,GAAO,OAAS,EAAU,iBAAmB,EAAW,IACpD1P,MAAMC,QAAQwS,GAAU,CAC1B,GAAI6F,GAAmBpQ,EAAGnN,OAAOwd,eACjC,IAAID,KAAqB,EAAO,CAC9B5I,GAAO,IAAM,EAAW,MAAQ,EAAU,cAAiB+C,EAAc,OAAI,IAC7E,IAAI+F,GAAqB7F,CACzBA,GAAiBzK,EAAGlD,cAAgB,mBACpC0K,GAAO,UAAY,EAAW,QAC9B,IAAIyE,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,mBAAqB,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,uBAA0BF,EAAc,OAAI,MAClOvK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,0CAA8C+C,EAAc,OAAI,YAErEvK,EAAGlP,KAAKsb,UACV5E,GAAO,mDAAsDxH,EAAa,WAAI,YAAc,EAAU,KAExGwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,MACPiD,EAAiB6F,EACb5F,IACFM,GAAkB,IAClBxD,GAAO,YAGX,GAAIyF,GAAO1C,CACX,IAAI0C,EAGF,IAFA,GAAIC,GAAMC,GAAK,EACbC,EAAKH,EAAKtc,OAAS,EACdwc,EAAKC,GAEV,GADAF,EAAOD,EAAKE,GAAM,GACdnN,EAAGvO,KAAK2W,eAAe8E,EAAMlN,EAAGhD,MAAM2H,KAAM,CAC9C6C,GAAO,SAAYuF,EAAS,MAAI,gBAAkB,EAAU,aAAe,EAAO,MAClF,IAAIwD,GAAYvH,EAAQ,IAAMmE,EAAK,GACnCJ,GAAIla,OAASqa,EACbH,EAAIlQ,WAAa2N,EAAc,IAAM2C,EAAK,IAC1CJ,EAAIjQ,cAAgB2N,EAAiB,IAAM0C,EAC3CJ,EAAIhQ,UAAYiD,EAAGvO,KAAK8W,YAAYvI,EAAGjD,UAAWoQ,EAAInN,EAAGlP,KAAK2X,cAAc,GAC5EsE,EAAI7B,YAAYgF,GAAY/C,CAC5B,IAAIsB,GAAQzO,EAAGjM,SAASgZ,EACxBA,GAAIjR,OAASkR,EAEXxF,GADExH,EAAGvO,KAAK0V,cAAcsH,EAAO0B,GAAa,EACrC,IAAOnQ,EAAGvO,KAAK4V,WAAWoH,EAAO0B,EAAWI,GAAc,IAE1D,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAExE/I,GAAO,OACHkD,IACFlD,GAAO,aAAgBuF,EAAS,MAAI,OACpC/B,GAAkB,KAK1B,GAA+B,gBAApBoF,IAAgCpQ,EAAGvO,KAAK2W,eAAegI,EAAkBpQ,EAAGhD,MAAM2H,KAAM,CACjGoI,EAAIla,OAASud,EACbrD,EAAIlQ,WAAamD,EAAGnD,WAAa,mBACjCkQ,EAAIjQ,cAAgBkD,EAAGlD,cAAgB,mBACvC0K,GAAO,SAAYuF,EAAS,MAAI,gBAAkB,EAAU,aAAgBxC,EAAc,OAAI,kBAAoB,EAAS,MAASA,EAAc,OAAI,MAAQ,EAAS,MAAQ,EAAU,aAAe,EAAS,SACjNwC,EAAIhQ,UAAYiD,EAAGvO,KAAK8W,YAAYvI,EAAGjD,UAAW,IAAMoN,EAAMnK,EAAGlP,KAAK2X,cAAc,EACpF,IAAI8H,GAAYvH,EAAQ,KAAOmB,EAAO,GACtC4C,GAAI7B,YAAYgF,GAAY,IAAM/F,CAClC,IAAIsE,GAAQzO,EAAGjM,SAASgZ,EACxBA,GAAIjR,OAASkR,EAEXxF,GADExH,EAAGvO,KAAK0V,cAAcsH,EAAO0B,GAAa,EACrC,IAAOnQ,EAAGvO,KAAK4V,WAAWoH,EAAO0B,EAAWI,GAAc,IAE1D,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAEpE7F,IACFlD,GAAO,cAAiBuF,EAAS,MAAI,aAEvCvF,GAAO,SACHkD,IACFlD,GAAO,aAAgBuF,EAAS,MAAI,OACpC/B,GAAkB,UAGjB,IAAIhL,EAAGvO,KAAK2W,eAAemC,EAASvK,EAAGhD,MAAM2H,KAAM,CACxDoI,EAAIla,OAAS0X,EACbwC,EAAIlQ,WAAa2N,EACjBuC,EAAIjQ,cAAgB2N,EACpBjD,GAAO,eAAiB,EAAS,UAAsB,EAAS,MAAQ,EAAU,aAAe,EAAS,SAC1GuF,EAAIhQ,UAAYiD,EAAGvO,KAAK8W,YAAYvI,EAAGjD,UAAW,IAAMoN,EAAMnK,EAAGlP,KAAK2X,cAAc,EACpF,IAAI8H,GAAYvH,EAAQ,KAAOmB,EAAO,GACtC4C,GAAI7B,YAAYgF,GAAY,IAAM/F,CAClC,IAAIsE,GAAQzO,EAAGjM,SAASgZ,EACxBA,GAAIjR,OAASkR,EAEXxF,GADExH,EAAGvO,KAAK0V,cAAcsH,EAAO0B,GAAa,EACrC,IAAOnQ,EAAGvO,KAAK4V,WAAWoH,EAAO0B,EAAWI,GAAc,IAE1D,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAEpE7F,IACFlD,GAAO,cAAiBuF,EAAS,MAAI,aAEvCvF,GAAO,OACHkD,IACFlD,GAAO,aAAgBuF,EAAS,MAAI,OACpC/B,GAAkB,KAOtB,MAJIN,KACFlD,GAAO,IAAM,EAAmB,QAAU,EAAU,iBAEtDA,EAAMxH,EAAGvO,KAAK8V,YAAYC,SAItBgJ,IAAI,SAASngB,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAA6B6Q,EAAIiK,GAChD,GAOIC,GAGFmB,EAVE7D,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BuB,EAAU5L,EAAGlP,KAAKia,IAAMR,GAAWA,EAAQvB,KAE3C4C,IACFpE,GAAO,cAAgB,EAAS,MAASxH,EAAGvO,KAAKsX,QAAQwB,EAAQvB,MAAOqB,EAAUrK,EAAGkL,aAAgB,KACrGG,EAAe,SAAWlB,GAE1BkB,EAAed,EAEjB/C,GAAO,eAAiB,EAAS,QAC7BoE,IACFpE,GAAO,IAAM,EAAiB,8BAAgC,EAAiB,oBAEjFA,GAAO,aAAe,EAAS,MAAQ,EAAU,MAAQ,EAAiB,KAExEA,GADExH,EAAGlP,KAAK2f,oBACH,gCAAkC,EAAS,eAAiB,EAAS,UAAazQ,EAAGlP,KAAwB,oBAAI,IAEjH,YAAc,EAAS,yBAA2B,EAAS,KAEpE0W,GAAO,MACHoE,IACFpE,GAAO,SAETA,GAAO,SACP,IAAIyE,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,cAAgB,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,4BAA8B,EAAiB,MAChOzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,sCAELA,GADEoE,EACK,OAAU,EAEV,GAAK,EAAY,KAGxB5L,EAAGlP,KAAKsb,UACV5E,GAAO,eAELA,GADEoE,EACK,kBAAoB,EAEpB,GAAK,EAEdpE,GAAO,2CAA8CxH,EAAa,WAAI,YAAc,EAAU,KAEhGwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CAeZ,OAdAA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,KACHkD,IACFlD,GAAO,YAEFA,QAGHkJ,IAAI,SAASrgB,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAAsB6Q,EAAIiK,GACzC,GAOIC,GAPA1C,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BiD,EAAQ,SAAWnD,EACnB4C,EAAM/M,EAAGvO,KAAKC,KAAKsO,EAEvB,IADA+M,EAAI3C,QACApK,EAAGvO,KAAK2W,eAAemC,EAASvK,EAAGhD,MAAM2H,KAAM,CACjDoI,EAAIla,OAAS0X,EACbwC,EAAIlQ,WAAa2N,EACjBuC,EAAIjQ,cAAgB2N,EACpBjD,GAAO,QAAU,EAAU,cAC3B,IAAIiG,GAAgBzN,EAAGuM,aACvBvM,GAAGuM,cAAgBQ,EAAIR,eAAgB,EACvCQ,EAAIb,cAAe,CACnB,IAAIyE,EACA5D,GAAIjc,KAAK6Z,YACXgG,EAAmB5D,EAAIjc,KAAK6Z,UAC5BoC,EAAIjc,KAAK6Z,WAAY,GAEvBnD,GAAO,IAAOxH,EAAGjM,SAASgZ,GAAQ,IAClCA,EAAIb,cAAe,EACfyE,IAAkB5D,EAAIjc,KAAK6Z,UAAYgG,GAC3C3Q,EAAGuM,cAAgBQ,EAAIR,cAAgBkB,EACvCjG,GAAO,aAAgBuF,EAAS,MAAI,QACpC,IAAId,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,OAAS,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,iBAC1KzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,sCAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,uBAAyB,EAAU,iCAAmC,EAAU,sBAAwB,EAAU,4BACrHxH,EAAGlP,KAAK6Z,YACVnD,GAAO,WAGTA,IAAO,iBACHxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,OAAS,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,iBAC1KzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,sCAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,OAETA,GAAO,+EACHkD,IACFlD,GAAO,iBAGX,OAAOA,SAGHoJ,IAAI,SAASvgB,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAAwB6Q,EAAIiK,GAC3C,GAOIC,GAPA1C,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BO,EAAS,QAAUT,EACnBmD,EAAQ,SAAWnD,EACnB4C,EAAM/M,EAAGvO,KAAKC,KAAKsO,GACnBgL,EAAiB,EACrB+B,GAAI3C,QACJ5C,GAAO,OAAS,EAAU,0BAA4B,EAAS,gBAAkB,EAAW,WAC5F,IAAIwF,GAAiBD,EAAIjR,OACrB2R,EAAgBzN,EAAGuM,aACvBvM,GAAGuM,cAAgBQ,EAAIR,eAAgB,CACvC,IAAIU,GAAO1C,CACX,IAAI0C,EAGF,IAFA,GAAIC,GAAMC,GAAK,EACbC,EAAKH,EAAKtc,OAAS,EACdwc,EAAKC,GACVF,EAAOD,EAAKE,GAAM,GACdnN,EAAGvO,KAAK2W,eAAe8E,EAAMlN,EAAGhD,MAAM2H,MACxCoI,EAAIla,OAASqa,EACbH,EAAIlQ,WAAa2N,EAAc,IAAM2C,EAAK,IAC1CJ,EAAIjQ,cAAgB2N,EAAiB,IAAM0C,EAC3C3F,GAAO,KAAQxH,EAAGjM,SAASgZ,GAAQ,IACnCA,EAAIjR,OAASkR,GAEbxF,GAAO,aAAgBuF,EAAS,MAAI,YAElCI,IACF3F,GAAO,aAAgBuF,EAAS,MAAI,gBAAkB,EAAS,KAAO,EAAW,oBACjF/B,GAAkB,KAEpBxD,GAAO,aAAgBuF,EAAS,MAAI,KAAO,EAAW,eAAiB,EAAS,UAGpF/M,GAAGuM,cAAgBQ,EAAIR,cAAgBkB,EACvCjG,GAAO,GAAK,EAAmB,QAAU,EAAW,QACpD,IAAIyE,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,SAAW,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,iBAC5KzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,2DAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CAeZ,OAdAA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,sBAAwB,EAAU,iCAAmC,EAAU,sBAAwB,EAAU,2BACpHxH,EAAGlP,KAAK6Z,YACVnD,GAAO,OAEFA,QAGHqJ,IAAI,SAASxgB,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAA0B6Q,EAAIiK,GAC7C,GAOIC,GAGFmB,EAVE7D,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BuB,EAAU5L,EAAGlP,KAAKia,IAAMR,GAAWA,EAAQvB,KAE3C4C,IACFpE,GAAO,cAAgB,EAAS,MAASxH,EAAGvO,KAAKsX,QAAQwB,EAAQvB,MAAOqB,EAAUrK,EAAGkL,aAAgB,KACrGG,EAAe,SAAWlB,GAE1BkB,EAAed,CAEjB,IAAIuG,GAAUlF,EAAU,eAAiBP,EAAe,KAAOrL,EAAG7C,WAAWoN,EAC7E/C,IAAO,QACHoE,IACFpE,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,KAAO,EAAY,SAAW,EAAU,UAC/C,IAAIyE,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,WAAa,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,0BAEhLjD,GADEoE,EACK,GAAK,EAEL,GAAM5L,EAAGvO,KAAKiO,eAAe6K,GAEtC/C,GAAO,OACHxH,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,uCAELA,GADEoE,EACK,OAAU,EAAiB,OAE3B,GAAM5L,EAAGvO,KAAKwV,aAAasD,GAEpC/C,GAAO,QAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,eAELA,GADEoE,EACK,kBAAoB,EAEpB,GAAM5L,EAAGvO,KAAKiO,eAAe6K,GAEtC/C,GAAO,2CAA8CxH,EAAa,WAAI,YAAc,EAAU,KAEhGwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CAeZ,OAdAA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,KACHkD,IACFlD,GAAO,YAEFA,QAGHuJ,IAAI,SAAS1gB,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAAkC6Q,EAAIiK,GACrD,GAOIC,GAPA1C,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BO,EAAS,QAAUT,EACnB6G,EAAO,MAAQ7G,EACjB8G,EAAW,iBAAmB9G,EAC9Ba,EAAiB,GACjBkG,EAAiBlR,EAAGlP,KAAKqgB,aAC3B3J,IAAO,OAAS,EAAW,UAC3B,IAAIyF,GAAO1C,CACX,IAAI0C,EAGF,IAFA,GAAImE,GAAYC,GAAK,EACnBjE,EAAKH,EAAKtc,OAAS,EACd0gB,EAAKjE,GAAI,CACdgE,EAAanE,EAAKoE,GAAM,GACxB7J,GAAO,QAAU,EAAa,sBAAwB,EAAS,OAAS,EAAU,QAC9E0J,IACF1J,GAAO,8CAAgD,EAAU,KAAO,EAAS,iBAEnFA,GAAO,IAAM,EAAa,MAASxH,EAAG7C,WAAWiU,GAAe,SAAW,EAAS,UAAY,EAAa,aAC7G,IAAIE,GAAkBtR,EAAGvO,KAAKwV,aAAamK,EAC3C5J,IAAO,SAAW,EAAa,OAAS,EAAW,0BAC/CxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,mBAAqB,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,iCAAoC,EAAoB,OAC9OzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,yDAA6D,EAAoB,SAEtFxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,OAETA,GAAO,mFACHkD,IACFM,GAAkB,IAClBxD,GAAO,YAKb,MADAA,IAAO,GAAK,QAIR+J,IAAI,SAASlhB,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAA6B6Q,EAAIiK,GAChD,GAOIC,GAPA1C,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BO,EAAS,QAAUT,EACnBmD,EAAQ,SAAWnD,EACnB4C,EAAM/M,EAAGvO,KAAKC,KAAKsO,GACnBgL,EAAiB,EACrB+B,GAAI3C,OACJ,IAAI4G,GAAO,MAAQ7G,EACjB+F,EAAWnD,EAAIzC,UAAYtK,EAAGsK,UAAY,EAC1C6F,EAAY,OAASD,EACnBsB,EAActZ,OAAOD,KAAKsS,OAC5BkH,EAAezR,EAAGnN,OAAO6e,sBACzBC,EAAiBzZ,OAAOD,KAAKwZ,GAC7BG,EAAe5R,EAAGnN,OAAOgf,qBACzBC,EAAkBN,EAAY7gB,QAAUghB,EAAehhB,OACvDohB,EAAgBH,KAAiB,EACjCI,EAA6C,gBAAhBJ,IAA4B1Z,OAAOD,KAAK2Z,GAAcjhB,OACnFshB,EAAoBjS,EAAGlP,KAAKohB,iBAC5BC,EAAmBJ,GAAiBC,GAAuBC,EAC3Df,EAAiBlR,EAAGlP,KAAKqgB,cACzBnE,EAAiBhN,EAAGlE,OAClBsW,EAAYpS,EAAGnN,OAAO9B,QAC1B,IAAIqhB,KAAepS,EAAGlP,KAAKia,KAAMqH,EAAUpJ,QAAUoJ,EAAUzhB,OAASqP,EAAGlP,KAAKuhB,aAAc,GAAIC,GAAgBtS,EAAGvO,KAAKyS,OAAOkO,EACjI,IAAIpS,EAAGlP,KAAKia,GACV,GAAIwH,GAAgBvS,EAAGnN,OAAO2f,kBAC5BC,EAAkBva,OAAOD,KAAKsa,EAGlC,IADA/K,GAAO,OAAS,EAAU,sBAAyBuF,EAAS,MAAI,WAC5DoF,EAAkB,CAKpB,GAJA3K,GAAO,aAAe,EAAS,OAAS,EAAU,QAC9C0J,IACF1J,GAAO,8CAAgD,EAAU,KAAO,EAAS,iBAE/EsK,EAAiB,CAEnB,GADAtK,GAAO,oBAAsB,EAAS,cAClCgK,EAAY7gB,OACd,GAAI6gB,EAAY7gB,OAAS,EACvB6W,GAAO,sBAAwB,EAAgB,IAAM,EAAS,SACzD,CACL,GAAIyF,GAAOuE,CACX,IAAIvE,EAGF,IAFA,GAAIyF,GAAcrB,GAAK,EACrBjE,EAAKH,EAAKtc,OAAS,EACd0gB,EAAKjE,GACVsF,EAAezF,EAAKoE,GAAM,GAC1B7J,GAAO,OAAS,EAAS,OAAUxH,EAAGvO,KAAKiO,eAAegT,GAAiB,IAKnF,GAAIf,EAAehhB,OAAQ,CACzB,GAAI8e,GAAOkC,CACX,IAAIlC,EAGF,IAFA,GAAI2B,GAAYjE,GAAK,EACnByC,EAAKH,EAAK9e,OAAS,EACdwc,EAAKyC,GACVwB,EAAa3B,EAAKtC,GAAM,GACxB3F,GAAO,OAAUxH,EAAG7C,WAAWiU,GAAe,SAAW,EAAS,KAIxE,GAAIpR,EAAGlP,KAAKia,IAAM0H,GAAmBA,EAAgB9hB,OAAQ,CAC3D,GAAIgiB,GAAOF,CACX,IAAIE,EAGF,IAFA,GAAIC,GAAazF,GAAK,EACpB0F,EAAKF,EAAKhiB,OAAS,EACdwc,EAAK0F,GACVD,EAAcD,EAAKxF,GAAM,GACzB3F,GAAO,OAAUxH,EAAG7C,WAAWyV,GAAgB,SAAW,EAAS,KAIzEpL,GAAO,uBAAyB,EAAS,OAE3C,GAAyB,OAArByK,EACFzK,GAAO,WAAa,EAAU,IAAM,EAAS,UACxC,CACL,GAAI0H,GAAoBlP,EAAGjD,UACvB+V,EAAsB,UAAa3I,EAAO,MAI9C,IAHInK,EAAGlP,KAAKye,yBACVvP,EAAGjD,UAAYiD,EAAGvO,KAAK8W,YAAYvI,EAAGjD,UAAW,MAAQoN,EAAMnK,EAAGlP,KAAK2X,eAErEsJ,EACF,GAAIE,EACFzK,GAAO,WAAa,EAAU,IAAM,EAAS,UACxC,CACLA,GAAO,SAAYuF,EAAS,MAAI,YAChC,IAAIuD,GAAqB7F,CACzBA,GAAiBzK,EAAGlD,cAAgB,uBACpC,IAAImP,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,wBAA0B,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,qCAAwC,EAAwB,OAC3PzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,wDAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,mDAAsDxH,EAAa,WAAI,YAAc,EAAU,KAExGwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCwZ,EAAiB6F,EACb5F,IACFlD,GAAO,gBAGN,IAAIwK,EACT,GAAyB,WAArBC,EAAgC,CAClCzK,GAAO,QAAU,EAAU,cAC3B,IAAIiG,GAAgBzN,EAAGuM,aACvBvM,GAAGuM,cAAgBQ,EAAIR,eAAgB,EACvCQ,EAAIla,OAAS+e,EACb7E,EAAIlQ,WAAamD,EAAGnD,WAAa,wBACjCkQ,EAAIjQ,cAAgBkD,EAAGlD,cAAgB,wBACvCiQ,EAAIhQ,UAAYiD,EAAGlP,KAAKye,uBAAyBvP,EAAGjD,UAAYiD,EAAGvO,KAAK8W,YAAYvI,EAAGjD,UAAW,MAAQoN,EAAMnK,EAAGlP,KAAK2X,aACxH,IAAI8H,GAAYvH,EAAQ,OAASmB,EAAO,GACxC4C,GAAI7B,YAAYgF,GAAY,MAAQ/F,CACpC,IAAIsE,GAAQzO,EAAGjM,SAASgZ,EACxBA,GAAIjR,OAASkR,EAEXxF,GADExH,EAAGvO,KAAK0V,cAAcsH,EAAO0B,GAAa,EACrC,IAAOnQ,EAAGvO,KAAK4V,WAAWoH,EAAO0B,EAAWI,GAAc,IAE1D,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAExE/I,GAAO,cAAiBuF,EAAS,MAAI,gBAAkB,EAAU,wHAA0H,EAAU,IAAM,EAAS,SACpN/M,EAAGuM,cAAgBQ,EAAIR,cAAgBkB,MAClC,CACLV,EAAIla,OAAS+e,EACb7E,EAAIlQ,WAAamD,EAAGnD,WAAa,wBACjCkQ,EAAIjQ,cAAgBkD,EAAGlD,cAAgB,wBACvCiQ,EAAIhQ,UAAYiD,EAAGlP,KAAKye,uBAAyBvP,EAAGjD,UAAYiD,EAAGvO,KAAK8W,YAAYvI,EAAGjD,UAAW,MAAQoN,EAAMnK,EAAGlP,KAAK2X,aACxH,IAAI8H,GAAYvH,EAAQ,OAASmB,EAAO,GACxC4C,GAAI7B,YAAYgF,GAAY,MAAQ/F,CACpC,IAAIsE,GAAQzO,EAAGjM,SAASgZ,EACxBA,GAAIjR,OAASkR,EAEXxF,GADExH,EAAGvO,KAAK0V,cAAcsH,EAAO0B,GAAa,EACrC,IAAOnQ,EAAGvO,KAAK4V,WAAWoH,EAAO0B,EAAWI,GAAc,IAE1D,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAEpE7F,IACFlD,GAAO,cAAiBuF,EAAS,MAAI,aAI3C/M,EAAGjD,UAAYmS,EAEb4C,IACFtK,GAAO,OAETA,GAAO,OACHkD,IACFlD,GAAO,aAAgBuF,EAAS,MAAI,OACpC/B,GAAkB,KAGtB,GAAI+H,GAAe/S,EAAGlP,KAAKkiB,cAAgBhT,EAAGuM,aAC9C,IAAIiF,EAAY7gB,OAAQ,CACtB,GAAIsiB,GAAOzB,CACX,IAAIyB,EAGF,IAFA,GAAIP,GAAcQ,IAAK,EACrBC,GAAKF,EAAKtiB,OAAS,EACduiB,GAAKC,IAAI,CACdT,EAAeO,EAAKC,IAAM,EAC1B,IAAIhG,IAAO3C,EAAQmI,EACnB,IAAI1S,EAAGvO,KAAK2W,eAAe8E,GAAMlN,EAAGhD,MAAM2H,KAAM,CAC9C,GAAIyK,IAAQpP,EAAGvO,KAAKsV,YAAY2L,GAC9BnC,EAAYvH,EAAQoG,GACpBgE,GAAcL,GAAiC5a,SAAjB+U,GAAKmG,OACrCtG,GAAIla,OAASqa,GACbH,EAAIlQ,WAAa2N,EAAc4E,GAC/BrC,EAAIjQ,cAAgB2N,EAAiB,IAAMzK,EAAGvO,KAAKuS,eAAe0O,GAClE3F,EAAIhQ,UAAYiD,EAAGvO,KAAKmX,QAAQ5I,EAAGjD,UAAW2V,EAAc1S,EAAGlP,KAAK2X,cACpEsE,EAAI7B,YAAYgF,GAAYlQ,EAAGvO,KAAKiO,eAAegT,EACnD,IAAIjE,GAAQzO,EAAGjM,SAASgZ,EAExB,IADAA,EAAIjR,OAASkR,EACThN,EAAGvO,KAAK0V,cAAcsH,EAAO0B,GAAa,EAAG,CAC/C1B,EAAQzO,EAAGvO,KAAK4V,WAAWoH,EAAO0B,EAAWI,EAC7C,IAAI+C,IAAW/C,MACV,CACL,GAAI+C,IAAWnD,CACf3I,IAAO,QAAU,EAAc,MAAQ,EAAc,KAEvD,GAAI4L,GACF5L,GAAO,IAAM,EAAU,QAClB,CACL,GAAI8K,GAAiBA,EAAcI,GAAe,CAChDlL,GAAO,QAAU,GAAa,0BAA6BuF,EAAS,MAAI,YACxE,IAAImC,GAAoBlP,EAAGjD,UACzBuT,EAAqB7F,EACrB6E,GAAmBtP,EAAGvO,KAAKwV,aAAayL,EACtC1S,GAAGlP,KAAKye,yBACVvP,EAAGjD,UAAYiD,EAAGvO,KAAKmX,QAAQsG,EAAmBwD,EAAc1S,EAAGlP,KAAK2X,eAE1EgC,EAAiBzK,EAAGlD,cAAgB,WACpC,IAAImP,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,YAAc,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,kCAAqC,GAAqB,OACzOzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,gBAELA,GADExH,EAAGlP,KAAKye,uBACH,yBAEA,oCAAuC,GAAqB,MAErE/H,GAAO,MAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCwZ,EAAiB6F,EACjBtQ,EAAGjD,UAAYmS,EACf1H,GAAO,iBAGLA,IADEkD,EACK,QAAU,GAAa,0BAA6BqC,EAAS,MAAI,qBAEjE,QAAU,GAAa,oBAGlCvF,IAAO,IAAM,EAAU,OAGvBkD,IACFlD,GAAO,aAAgBuF,EAAS,MAAI,OACpC/B,GAAkB,MAK1B,GAAIuI,IAAO5B,CACX,IAAI4B,GAGF,IAFA,GAAInC,GAAYoC,IAAK,EACnBC,GAAKF,GAAK5iB,OAAS,EACd6iB,GAAKC,IAAI,CACdrC,EAAamC,GAAKC,IAAM,EACxB,IAAItG,IAAOuE,EAAaL,EACxB,IAAIpR,EAAGvO,KAAK2W,eAAe8E,GAAMlN,EAAGhD,MAAM2H,KAAM,CAC9CoI,EAAIla,OAASqa,GACbH,EAAIlQ,WAAamD,EAAGnD,WAAa,qBAAuBmD,EAAGvO,KAAKsV,YAAYqK,GAC5ErE,EAAIjQ,cAAgBkD,EAAGlD,cAAgB,sBAAwBkD,EAAGvO,KAAKuS,eAAeoN,GACtF5J,GAAO,aAAe,EAAS,OAAS,EAAU,QAC9C0J,IACF1J,GAAO,8CAAgD,EAAU,KAAO,EAAS,iBAEnFA,GAAO,QAAWxH,EAAG7C,WAAWiU,GAAe,SAAW,EAAS,QACnErE,EAAIhQ,UAAYiD,EAAGvO,KAAK8W,YAAYvI,EAAGjD,UAAW,MAAQoN,EAAMnK,EAAGlP,KAAK2X,aACxE,IAAI8H,GAAYvH,EAAQ,OAASmB,EAAO,GACxC4C,GAAI7B,YAAYgF,GAAY,MAAQ/F,CACpC,IAAIsE,GAAQzO,EAAGjM,SAASgZ,EACxBA,GAAIjR,OAASkR,EAEXxF,GADExH,EAAGvO,KAAK0V,cAAcsH,EAAO0B,GAAa,EACrC,IAAOnQ,EAAGvO,KAAK4V,WAAWoH,EAAO0B,EAAWI,GAAc,IAE1D,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAEpE7F,IACFlD,GAAO,cAAiBuF,EAAS,MAAI,aAEvCvF,GAAO,MACHkD,IACFlD,GAAO,cAAiBuF,EAAS,MAAI,aAEvCvF,GAAO,OACHkD,IACFlD,GAAO,aAAgBuF,EAAS,MAAI,OACpC/B,GAAkB,MAK1B,GAAIhL,EAAGlP,KAAKia,GAAI,CACd,GAAI2I,IAAOjB,CACX,IAAIiB,GAGF,IAFA,GAAId,GAAae,IAAK,EACpBC,GAAKF,GAAK/iB,OAAS,EACdgjB,GAAKC,IAAI;AACdhB,EAAcc,GAAKC,IAAM,EACzB,IAAIE,IAAYtB,EAAcK,GAC5B1F,GAAO2G,GAAUhhB,MACnB,IAAImN,EAAGvO,KAAK2W,eAAe8E,GAAMlN,EAAGhD,MAAM2H,KAAM,CAC9CoI,EAAIla,OAASqa,GACbH,EAAIlQ,WAAamD,EAAGnD,WAAa,iBAAmBmD,EAAGvO,KAAKsV,YAAY6L,GAAe,UACvF7F,EAAIjQ,cAAgBkD,EAAGlD,cAAgB,kBAAoBkD,EAAGvO,KAAKuS,eAAe4O,GAAe,UACjGpL,GAAO,mBAAqB,EAAS,kBAAoB,EAAS,OAAS,EAAU,QACjF0J,IACF1J,GAAO,8CAAgD,EAAU,KAAO,EAAS,iBAEnFA,GAAO,QAAWxH,EAAG7C,WAAWyV,GAAgB,SAAW,EAAS,mBAAqB,EAAS,OAClG7F,EAAIhQ,UAAYiD,EAAGvO,KAAK8W,YAAYvI,EAAGjD,UAAW,MAAQoN,EAAMnK,EAAGlP,KAAK2X,aACxE,IAAI8H,GAAYvH,EAAQ,OAASmB,EAAO,GACxC4C,GAAI7B,YAAYgF,GAAY,MAAQ/F,CACpC,IAAIsE,GAAQzO,EAAGjM,SAASgZ,EACxBA,GAAIjR,OAASkR,EAEXxF,GADExH,EAAGvO,KAAK0V,cAAcsH,EAAO0B,GAAa,EACrC,IAAOnQ,EAAGvO,KAAK4V,WAAWoH,EAAO0B,EAAWI,GAAc,IAE1D,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAEpE7F,IACFlD,GAAO,cAAiBuF,EAAS,MAAI,aAEvCvF,GAAO,MACHkD,IACFlD,GAAO,cAAiBuF,EAAS,MAAI,aAEvCvF,GAAO,OACHkD,IACFlD,GAAO,aAAgBuF,EAAS,MAAI,OACpC/B,GAAkB,IAEpB,IAAI8I,IAASD,GAAUne,QACrBqe,GAASF,GAAUpe,OACrB,IAAe0C,SAAX2b,IAAmC3b,SAAX4b,GAAsB,CAChDvM,GAAO,QAAU,EAAW,WAC5B,IAAI8I,GAAqB7F,CACzB,IAAetS,SAAX2b,GAAsB,CACxB,GAAIE,IAASF,GACXG,GAAU,UACVC,GAAc,MAChB1M,IAAO,IAAM,EAAW,iBAAmB,EAAS,OAAS,GAAW,KACxEiD,EAAiBzK,EAAGlD,cAAgB,yBACpC0K,GAAO,UAAY,EAAW,QAC9B,IAAIyE,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,iBAAmB,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,yBAA4B,GAAY,aAAgB,GAAW,eAAmBzK,EAAGvO,KAAKwV,aAAa2L,GAAgB,OAC/S5S,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,gCAAmC,GAAgB,SAAW,GAAW,iCAAoCxH,EAAGvO,KAAKwV,aAAa2L,GAAgB,QAEvJ5S,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,MACQrP,SAAX4b,KACFvM,GAAO,UAGX,GAAerP,SAAX4b,GAAsB,CACxB,GAAIC,IAASD,GACXE,GAAU,UACVC,GAAc,MAChB1M,IAAO,IAAM,EAAW,iBAAmB,EAAS,OAAS,GAAW,KACxEiD,EAAiBzK,EAAGlD,cAAgB,yBACpC0K,GAAO,UAAY,EAAW,QAC9B,IAAIyE,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,iBAAmB,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,yBAA4B,GAAY,aAAgB,GAAW,eAAmBzK,EAAGvO,KAAKwV,aAAa2L,GAAgB,OAC/S5S,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,gCAAmC,GAAgB,SAAW,GAAW,iCAAoCxH,EAAGvO,KAAKwV,aAAa2L,GAAgB,QAEvJ5S,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,MAETiD,EAAiB6F,EACb5F,IACFlD,GAAO,QAAU,EAAW,OAC5BwD,GAAkB,QAW9B,MAJIN,KACFlD,GAAO,IAAM,EAAmB,QAAU,EAAU,iBAEtDA,EAAMxH,EAAGvO,KAAK8V,YAAYC,SAItB2M,IAAI,SAAS9jB,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAAsB6Q,EAAIiK,GACzC,GAMIC,GAGAzN,EAAQ2X,EATR5M,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BO,EAAS,QAAUT,CAEvB,IAAe,KAAXI,GAA6B,MAAXA,EAChBvK,EAAGxD,QACLC,EAASuD,EAAG/O,MACZmjB,EAAW,aAEX3X,EAASuD,EAAGpE,KAAK/I,OAAO4J,UAAW,EACnC2X,EAAW,sBAER,CACL,GAAIC,GAAUrU,EAAG9C,WAAW8C,EAAGlE,OAAQyO,EAASvK,EAAGxD,OACnD,IAAgBrE,SAAZkc,EAAuB,CACzB,GAAIC,GAAW,2BAA8B/J,EAAU,YAAcvK,EAAGlE,MACxE,IAA2B,QAAvBkE,EAAGlP,KAAKyjB,YAAuB,CACjChiB,QAAQF,IAAIiiB,EACZ,IAAIrI,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,QAAU,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,sBAA0BzK,EAAGvO,KAAKwV,aAAasD,GAAY,OACtOvK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,0CAA+CxH,EAAGvO,KAAKwV,aAAasD,GAAY,MAErFvK,EAAGlP,KAAKsb,UACV5E,GAAO,cAAiBxH,EAAGvO,KAAKiO,eAAe6K,GAAY,mCAAsCvK,EAAa,WAAI,YAAc,EAAU,KAE5IwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAE/ByZ,IACFlD,GAAO,sBAEJ,CAAA,GAA2B,UAAvBxH,EAAGlP,KAAKyjB,YAKZ,CACL,GAAIC,GAAS,GAAIjkB,OAAM+jB,EAGvB,MAFAE,GAAO9gB,WAAasM,EAAG/C,QAAQwB,IAAIuB,EAAGlE,OAAQyO,GAC9CiK,EAAO/gB,cAAgBuM,EAAG/C,QAAQkF,YAAYnC,EAAG/C,QAAQ8G,SAASyQ,EAAO9gB,aACnE8gB,EARNjiB,QAAQF,IAAIiiB,GACR5J,IACFlD,GAAO,sBAQN,IAAI6M,EAAQ/U,OAAQ,CACzB,GAAIyN,GAAM/M,EAAGvO,KAAKC,KAAKsO,EACvB+M,GAAI3C,QACJ2C,EAAIla,OAASwhB,EAAQxhB,OACrBka,EAAIlQ,WAAa,GACjBkQ,EAAIjQ,cAAgByN,CACpB,IAAIkE,GAAQzO,EAAGjM,SAASgZ,GAAKpJ,QAAQ,oBAAqB0Q,EAAQ7jB,KAClEgX,IAAO,IAAM,EAAU,IACnBkD,IACFlD,GAAO,aAAgBuF,EAAS,MAAI,YAGtCtQ,GAAS4X,EAAQ5X,UAAW,EAC5B2X,EAAWC,EAAQ7jB,KAGvB,GAAI4jB,EAAU,CACZ,GAAInI,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GAEJA,GADExH,EAAGlP,KAAK4d,YACH,IAAM,EAAa,eAEnB,IAAM,EAAa,KAE5BlH,GAAO,IAAM,EAAU,qBACH,MAAhBxH,EAAGjD,YACLyK,GAAO,MAASxH,EAAY,WAG5BwH,GADE6C,EACK,WAAcA,EAAW,GAAM,IAAM,MAASrK,EAAGkL,YAAYb,GAAa,IAE1E,sCAET7C,GAAO,eACP,IAAIiN,GAAiBjN,CAErB,IADAA,EAAMyE,EAAWK,MACb7P,EAAQ,CACV,IAAKuD,EAAG/O,MAAO,KAAM,IAAIV,OAAM,yCAC/BiX,IAAO,UACHkD,IACFlD,GAAO,OAAS,EAAW,MAE7BA,GAAO,IAAOxH,EAAa,WAAI,IAAM,EAAmB,+KACpD0K,IACFlD,GAAO,QAAU,EAAW,YAG9BA,IAAO,SAAW,EAAmB,uCAAyC,EAAa,0CAA4C,EAAa,wCAChJkD,IACFlD,GAAO,YAIb,MAAOA,SAGHkN,IAAI,SAASrkB,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAA2B6Q,EAAIiK,GAC9C,GAOIC,GAIFmB,EAXE7D,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BO,EAAS,QAAUT,EACnByB,EAAU5L,EAAGlP,KAAKia,IAAMR,GAAWA,EAAQvB,KAQ/C,IANI4C,GACFpE,GAAO,cAAgB,EAAS,MAASxH,EAAGvO,KAAKsX,QAAQwB,EAAQvB,MAAOqB,EAAUrK,EAAGkL,aAAgB,KACrGG,EAAe,SAAWlB,GAE1BkB,EAAed,GAEZqB,EACH,GAAIrB,EAAQ5Z,OAASqP,EAAGlP,KAAKuhB,cAAgBrS,EAAGnN,OAAOwD,YAAc6B,OAAOD,KAAK+H,EAAGnN,OAAOwD,YAAY1F,OAAQ,CAC7G,GAAIyhB,MACAnF,EAAO1C,CACX,IAAI0C,EAGF,IAFA,GAAI+B,GAAWqC,GAAK,EAClBjE,EAAKH,EAAKtc,OAAS,EACd0gB,EAAKjE,GAAI,CACd4B,EAAY/B,EAAKoE,GAAM,EACvB,IAAIsD,GAAe3U,EAAGnN,OAAOwD,WAAW2Y,EAClC2F,IAAgB3U,EAAGvO,KAAK2W,eAAeuM,EAAc3U,EAAGhD,MAAM2H,OAClEyN,EAAUA,EAAUzhB,QAAUqe,QAKpC,IAAIoD,GAAY7H,CAGpB,IAAIqB,GAAWwG,EAAUzhB,OAAQ,CAC/B,GAAIue,GAAoBlP,EAAGjD,UACzB6X,EAAgBhJ,GAAWwG,EAAUzhB,QAAUqP,EAAGlP,KAAKuhB,YACzD,IAAI3H,EAEF,GADAlD,GAAO,eAAiB,EAAS,KAC7BoN,EAAe,CACZhJ,IACHpE,GAAO,cAAgB,EAAS,qBAAuB,EAAgB,KAEzE,IAAI2F,GAAK,IAAMhD,EACbkF,EAAgB,SAAWlF,EAAO,IAAMgD,EAAK,IAC7CmC,EAAmB,OAAUD,EAAgB,MAC3CrP,GAAGlP,KAAKye,yBACVvP,EAAGjD,UAAYiD,EAAGvO,KAAK8W,YAAY2G,EAAmBG,EAAerP,EAAGlP,KAAK2X,eAE/EjB,GAAO,QAAU,EAAW,YACxBoE,IACFpE,GAAO,cAAgB,EAAS,mBAAqB,EAAW,0CAA4C,EAAS,MAAQ,EAAW,oBAE1IA,GAAO,aAAe,EAAO,SAAW,EAAO,YAAc,EAAS,YAAc,EAAO,SAAW,EAAW,MAAQ,EAAU,UAAY,EAAS,IAAM,EAAO,0BAA4B,EAAW,cACxMoE,IACFpE,GAAO,SAETA,GAAO,UAAY,EAAW,QAC9B,IAAIyE,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,YAAc,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,kCAAqC,EAAqB,OACzOzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,gBAELA,GADExH,EAAGlP,KAAKye,uBACH,yBAEA,oCAAuC,EAAqB,MAErE/H,GAAO,MAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,iBACF,CACLA,GAAO,QACP,IAAIiI,GAAO2C,CACX,IAAI3C,EAGF,IAFA,GAAIN,GAAYhC,GAAK,EACnByC,EAAKH,EAAK9e,OAAS,EACdwc,EAAKyC,GAAI,CACdT,EAAaM,EAAKtC,GAAM,GACpBA,IACF3F,GAAO,OAET,IAAI4H,GAAQpP,EAAGvO,KAAKsV,YAAYoI,EAChC3H,IAAO,MAAQ,EAAU,EAAU,6BAA+B,EAAS,MAASxH,EAAGvO,KAAKiO,eAAeM,EAAGlP,KAAK2X,aAAe0G,EAAaC,GAAU,OAG7J5H,GAAO,OACP,IAAI6H,GAAgB,UAAYlF,EAC9BmF,EAAmB,OAAUD,EAAgB,MAC3CrP,GAAGlP,KAAKye,yBACVvP,EAAGjD,UAAYiD,EAAGlP,KAAK2X,aAAezI,EAAGvO,KAAK8W,YAAY2G,EAAmBG,GAAe,GAAQH,EAAoB,MAAQG,EAElI,IAAIpD,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,YAAc,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,kCAAqC,EAAqB,OACzOzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,gBAELA,GADExH,EAAGlP,KAAKye,uBACH,yBAEA,oCAAuC,EAAqB,MAErE/H,GAAO,MAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,iBAGT,IAAIoN,EAAe,CACZhJ,IACHpE,GAAO,cAAgB,EAAS,qBAAuB,EAAgB,KAEzE,IAAI2F,GAAK,IAAMhD,EACbkF,EAAgB,SAAWlF,EAAO,IAAMgD,EAAK,IAC7CmC,EAAmB,OAAUD,EAAgB,MAC3CrP,GAAGlP,KAAKye,yBACVvP,EAAGjD,UAAYiD,EAAGvO,KAAK8W,YAAY2G,EAAmBG,EAAerP,EAAGlP,KAAK2X,eAE3EmD,IACFpE,GAAO,cAAgB,EAAS,4BAA8B,EAAS,qBACnExH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,YAAc,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,kCAAqC,EAAqB,OACzOzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,gBAELA,GADExH,EAAGlP,KAAKye,uBACH,yBAEA,oCAAuC,EAAqB,MAErE/H,GAAO,MAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,OAETA,GAAO,gGAAkG,EAAS,sBAEpHA,GAAO,aAAe,EAAO,SAAW,EAAO,YAAc,EAAS,YAAc,EAAO,aAAe,EAAU,UAAY,EAAS,IAAM,EAAO,oCAClJxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,YAAc,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,kCAAqC,EAAqB,OACzOzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,gBAELA,GADExH,EAAGlP,KAAKye,uBACH,yBAEA,oCAAuC,EAAqB,MAErE/H,GAAO,MAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,OAETA,GAAO,mFACHoE,IACFpE,GAAO,aAEJ,CACL,GAAImL,GAAOP,CACX,IAAIO,EAGF,IAFA,GAAIjD,GAAcmF,GAAK,EACrBhC,EAAKF,EAAKhiB,OAAS,EACdkkB,EAAKhC,GAAI,CACdnD,EAAeiD,EAAKkC,GAAM,EAC1B,IAAIzF,GAAQpP,EAAGvO,KAAKsV,YAAY2I,GAC9BJ,EAAmBtP,EAAGvO,KAAKwV,aAAayI,EACtC1P,GAAGlP,KAAKye,yBACVvP,EAAGjD,UAAYiD,EAAGvO,KAAKmX,QAAQsG,EAAmBQ,EAAc1P,EAAGlP,KAAK2X,eAE1EjB,GAAO,QAAU,EAAU,EAAU,kCACjCxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,YAAc,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,kCAAqC,EAAqB,OACzOzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,gBAELA,GADExH,EAAGlP,KAAKye,uBACH,yBAEA,oCAAuC,EAAqB,MAErE/H,GAAO,MAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,OAETA,GAAO,kFAKfxH,EAAGjD,UAAYmS,MACNxE,KACTlD,GAAO,eAET,OAAOA,SAGHsN,IAAI,SAASzkB,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAAyB6Q,EAAIiK,GAC5C,GAOIC,GAPA1C,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BO,EAAS,QAAUT,EACnBmD,EAAQ,SAAWnD,EACnB4C,EAAM/M,EAAGvO,KAAKC,KAAKsO,GACnBgL,EAAiB,EACrB+B,GAAI3C,OACJ,IAEE2K,GAFEC,EAAY,WAAahV,EAAGoK,MAC9B4C,EAAiBD,EAAIjR,MAEvB0L,IAAO,OAAS,EAAc,GAC9B,IAAIyF,GAAO1C,CACX,IAAI0C,EAGF,IAFA,GAAIC,GAAM+H,GAAa,EACrB7H,EAAKH,EAAKtc,OAAS,EACdskB,EAAa7H,GAAI,CAMtB,GALAF,EAAOD,EAAKgI,GAAc,GACtBA,IAAeF,IACjBvN,GAAO,SAAW,EAAc,OAChCwD,GAAkB,KAEhBkC,EAAKgI,IAAMlV,EAAGvO,KAAK2W,eAAe8E,EAAKgI,GAAIlV,EAAGhD,MAAM2H,KAAM,CAC5D6C,GAAO,QAAU,EAAU,eAC3B,IAAIiG,GAAgBzN,EAAGuM,aAWvB,IAVAvM,EAAGuM,cAAgBQ,EAAIR,eAAgB,EACvCQ,EAAIb,cAAe,EACnBa,EAAIla,OAASqa,EAAKgI,GAClBnI,EAAIlQ,WAAa2N,EAAc,IAAMyK,EAAa,OAClDlI,EAAIjQ,cAAgB2N,EAAiB,IAAMwK,EAAa,MACxDzN,GAAO,KAAQxH,EAAGjM,SAASgZ,GAAQ,IACnCA,EAAIjR,OAASkR,EACbD,EAAIb,cAAe,EACnBlM,EAAGuM,cAAgBQ,EAAIR,cAAgBkB,EACvCjG,GAAO,IAAM,EAAc,WAAcuF,EAAS,MAAI,SAAW,EAAc,QACvD,iBAAbG,GAAKiI,KAAmB,CACjC,GAAIjI,EAAKiI,QAAS,EAAO,CACvB,GAAIlJ,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,UAAY,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,2BAA6B,EAAe,MACzNzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,4DAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAGrCuW,GAAO,aAAgBuF,EAAS,MAAI,MAASG,EAAS,KAAI,SAE1DH,GAAIla,OAASqa,EAAKiI,KAClBpI,EAAIlQ,WAAa2N,EAAc,IAAMyK,EAAa,SAClDlI,EAAIjQ,cAAgB2N,EAAiB,IAAMwK,EAAa,QACxDzN,GAAO,KAAQxH,EAAGjM,SAASgZ,GAAQ,IACnCA,EAAIjR,OAASkR,CAEfxF,IAAO,wBAA0B,EAAU,iCAAmC,EAAU,sBAAwB,EAAU,kCAG1H,IADAA,GAAO,IAAM,EAAc,aACH,iBAAb0F,GAAKiI,KAAmB,CACjC,GAAIjI,EAAKiI,QAAS,EAAO,CACvB,GAAIlJ,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,UAAY,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,2BAA6B,EAAe,MACzNzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,4DAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAGrCuW,GAAO,aAAgBuF,EAAS,MAAI,MAASG,EAAS,KAAI,SAE1DH,GAAIla,OAASqa,EAAKiI,KAClBpI,EAAIlQ,WAAa2N,EAAc,IAAMyK,EAAa,SAClDlI,EAAIjQ,cAAgB2N,EAAiB,IAAMwK,EAAa,QACxDzN,GAAO,KAAQxH,EAAGjM,SAASgZ,GAAQ,IACnCA,EAAIjR,OAASkR,CAGjB+H,GAAkB7H,EAAKkI,SAK3B,MAFA5N,IAAO,GAAK,EAAmB,OAAS,EAAW,WAAcuF,EAAS,MAAI,KAC9EvF,EAAMxH,EAAGvO,KAAK8V,YAAYC,SAItB6N,IAAI,SAAShlB,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAA8B6Q,EAAIiK,GACjD,GAOIC,GAIFmB,EAXE7D,EAAM,IACN2C,EAAOnK,EAAGoK,MACVC,EAAWrK,EAAGsK,UACdC,EAAUvK,EAAGnN,OAAOoX,GACpBO,EAAcxK,EAAGnD,WAAa,IAAMoN,EACpCQ,EAAiBzK,EAAGlD,cAAgB,IAAMmN,EAC1CS,GAAiB1K,EAAGlP,KAAK6Z,UAEzB3B,EAAQ,QAAUqB,GAAY,IAC9BO,EAAS,QAAUT,EACnByB,EAAU5L,EAAGlP,KAAKia,IAAMR,GAAWA,EAAQvB,KAQ/C,IANI4C,GACFpE,GAAO,cAAgB,EAAS,MAASxH,EAAGvO,KAAKsX,QAAQwB,EAAQvB,MAAOqB,EAAUrK,EAAGkL,aAAgB,KACrGG,EAAe,SAAWlB,GAE1BkB,EAAed,GAEZA,GAAWqB,IAAY5L,EAAGlP,KAAKwF,eAAgB,EAAO,CACrDsV,IACFpE,GAAO,QAAU,EAAW,SAAW,EAAiB,iBAAmB,EAAiB,mBAAqB,EAAW,4BAA8B,EAAiB,kBAAsB,EAAW,qBAE9MA,GAAO,QAAU,EAAW,gBAAkB,EAAU,0BAA4B,EAAU,kEAAoE,EAAU,QAAU,EAAU,WAAa,EAAW,kCACpNoE,IACFpE,GAAO,SAETA,GAAO,SAAW,EAAW,QAC7B,IAAIyE,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,eAAiB,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,6BAClLzK,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,mGAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,eAELA,GADEoE,EACK,kBAAoB,EAEpB,GAAK,EAEdpE,GAAO,2CAA8CxH,EAAa,WAAI,YAAc,EAAU,KAEhGwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,MACHkD,IACFlD,GAAO,gBAGLkD,KACFlD,GAAO,gBAGX,OAAOA,SAGH8N,IAAI,SAASjlB,EAAQjB,EAAOD,GAClC,YACAC,GAAOD,QAAU,SAA2B6Q,EAAIiK,GA8W9C,QAASsL,GAAgBC,GACvB,IAAK,GAAIllB,GAAI,EAAGA,EAAIklB,EAAYjR,MAAM5T,OAAQL,IAC5C,GAAImlB,EAAeD,EAAYjR,MAAMjU,IAAK,OAAO,EAGrD,QAASmlB,GAAexH,GACtB,MAAoC9V,UAA7B6H,EAAGnN,OAAOob,EAAM1N,UAA4C,cAAjB0N,EAAM1N,UAA4BP,EAAGnN,OAAOgf,wBAAyB,GAAkD,gBAAlC7R,GAAGnN,OAAOgf,sBAAqC7R,EAAGnN,OAAO6e,mBAAqBxZ,OAAOD,KAAK+H,EAAGnN,OAAO6e,mBAAmB/gB,QAAYqP,EAAGlP,KAAKia,IAAM/K,EAAGnN,OAAO2f,eAAiBta,OAAOD,KAAK+H,EAAGnN,OAAO2f,eAAe7hB,QAnX1V,GAAI6W,GAAM,GACN/K,EAASuD,EAAGnN,OAAO4J,UAAW,CAClC,IAAIuD,EAAGpD,MAAO,CACZ,GAAI8Y,GAAO1V,EAAGpD,MACZuN,EAAOnK,EAAGoK,MAAQ,EAClBC,EAAWrK,EAAGsK,UAAY,EAC1BtB,EAAQ,MAGV,IAFAhJ,EAAG2V,OAAS3V,EAAG/C,QAAQ8G,SAAS/D,EAAGpE,KAAK/I,OAAOqP,IAC/ClC,EAAGlE,OAASkE,EAAGlE,QAAUkE,EAAG2V,OACxBlZ,EAAQ,CACVuD,EAAG/O,OAAQ,CACX,IAAI2kB,GAAwB,OAAjB5V,EAAGlP,KAAKG,KACnB+O,GAAG6V,WAAaD,EAAO,QAAU,cAE5B5V,GAAGpD,MACVoD,EAAGkL,aAAe/S,QAClBqP,GAAO,mBACH/K,EACEmZ,EACFpO,GAAO,qBAEc,OAAjBxH,EAAGlP,KAAKG,QACVuW,GAAO,WAETA,GAAO,eAGTA,GAAO,cAETA,GAAO,mGACPA,GAAO,wBACPA,GAAO,oDACF,CACL,GAAI2C,GAAOnK,EAAGoK,MACZC,EAAWrK,EAAGsK,UACdtB,EAAQ,QAAUqB,GAAY,GAEhC,IADIrK,EAAGnN,OAAOqP,KAAIlC,EAAGlE,OAASkE,EAAG/C,QAAQwB,IAAIuB,EAAGlE,OAAQkE,EAAGnN,OAAOqP,KAC9DzF,IAAWuD,EAAG/O,MAAO,KAAM,IAAIV,OAAM,8BACzCiX,IAAO,aAAe,EAAS,aAEjC,GAIE0C,GAJEU,EAAS,QAAUT,EACrBO,GAAiB1K,EAAGlP,KAAK6Z,UACzBmL,EAAkB,GAClBC,EAAkB,GAEhBC,EAAchW,EAAGnN,OAAOyR,KAC1B2R,EAAene,MAAMC,QAAQie,EAC/B,IAAIA,GAAehW,EAAGlP,KAAKolB,YAAa,CACtC,GAAIC,GAAiBnW,EAAGvO,KAAKmV,cAAc5G,EAAGlP,KAAKolB,YAAaF,EAChE,IAAIG,EAAgB,CAClB,GAAI3L,GAAcxK,EAAGnD,WAAa,QAChC4N,EAAiBzK,EAAGlD,cAAgB,QACpCsZ,EAAUH,EAAe,iBAAmB,eAC9CzO,IAAO,QAAWxH,EAAGvO,KAAK2kB,GAASJ,EAAahN,GAAO,GAAS,OAChE,IAAIqN,GAAY,WAAalM,EAC3BmM,EAAW,UAAYnM,CACzB3C,IAAO,QAAU,EAAc,aAAe,EAAU,KAC7B,SAAvBxH,EAAGlP,KAAKolB,cACV1O,GAAO,QAAU,EAAc,iCAAqC,EAAU,MAAQ,EAAc,gBAEtGA,GAAO,QAAU,EAAa,gBAC9B,IAAI+O,GAAkB,GAClBtJ,EAAOkJ,CACX,IAAIlJ,EAGF,IAFA,GAAIuJ,GAAOrJ,GAAK,EACdC,EAAKH,EAAKtc,OAAS,EACdwc,EAAKC,GACVoJ,EAAQvJ,EAAKE,GAAM,GACfA,IACF3F,GAAO,QAAU,EAAa,qBAC9B+O,GAAmB,KAEM,SAAvBvW,EAAGlP,KAAKolB,aAAmC,SAATM,IACpChP,GAAO,QAAU,EAAc,kBAAsB,EAAU,mBAAqB,EAAa,MAAQ,EAAU,MAAQ,EAAU,QAAU,EAAc,aAAe,EAAU,SAE3K,UAATgP,EACFhP,GAAO,QAAU,EAAc,mBAAuB,EAAc,kBAAsB,EAAa,WAAe,EAAU,cAAgB,EAAU,cAAgB,EAAa,UACrK,UAATgP,GAA8B,WAATA,GAC9BhP,GAAO,QAAU,EAAc,oBAAwB,EAAU,iBAAmB,EAAc,mBAAuB,EAAU,OAAS,EAAU,QAAU,EAAU,IAC7J,WAATgP,IACFhP,GAAO,SAAW,EAAU,SAE9BA,GAAO,MAAQ,EAAa,OAAS,EAAU,MAC7B,WAATgP,EACThP,GAAO,QAAU,EAAU,mBAAuB,EAAU,aAAe,EAAU,cAAgB,EAAa,sBAAwB,EAAU,kBAAsB,EAAU,WAAa,EAAa,YAC5L,QAATgP,EACThP,GAAO,QAAU,EAAU,cAAkB,EAAU,aAAe,EAAU,eAAiB,EAAa,YAC9E,SAAvBxH,EAAGlP,KAAKolB,aAAmC,SAATM,IAC3ChP,GAAO,QAAU,EAAc,mBAAuB,EAAc,mBAAuB,EAAc,oBAAwB,EAAU,aAAe,EAAa,OAAS,EAAU,MAIhMA,IAAO,IAAM,EAAoB,QAAU,EAAa,sBACxD,IAAIyE,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,QAAU,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,uBAE7KjD,GADEyO,EACK,GAAMD,EAAYxG,KAAK,KAEvB,GAAK,EAEdhI,GAAO,OACHxH,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,0BAELA,GADEyO,EACK,GAAMD,EAAYxG,KAAK,KAEvB,GAAK,EAEdhI,GAAO,MAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CAYZ,IAXAA,EAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,aACH6C,EAAU,CACZ,GAAIoM,GAAc,QAAWpM,EAAW,GAAM,IAC5CqM,EAAgB1W,EAAGkL,YAAYb,EACjC7C,IAAO,IAAM,EAAU,MAAQ,EAAgB,IAAM,EAAkB,OAAS,EAAa,SAE7FA,IAAO,WAAa,EAAa,oEAAsE,EAAa,IAEtHA,IAAO,SAGX,GAAImP,EACJ,IAAI3W,EAAGnN,OAAOqC,OAASyhB,EAAe3W,EAAGvO,KAAK4W,qBAAqBrI,EAAGnN,OAAQmN,EAAGhD,MAAM2H,IAAK,SAAU,CACpG,GAA0B,QAAtB3E,EAAGlP,KAAK8lB,WACV,KAAM,IAAIrmB,OAAM,qDAAuDyP,EAAGlD,cAAgB,IAC3D,WAAtBkD,EAAGlP,KAAK8lB,YACjBD,GAAe,EACfpkB,QAAQF,IAAI,6CAA+C2N,EAAGlD,cAAgB,MACrEkD,EAAGlP,KAAK8lB,cAAe,GAChCrkB,QAAQF,IAAI,8CAAgD2N,EAAGlD,cAAgB,0HAGnF,GAAIkD,EAAGnN,OAAOqC,OAASyhB,EACrBnP,GAAO,IAAOxH,EAAGhD,MAAM2H,IAAIzP,KAAK1E,KAAKwP,EAAI,QAAW,IAChD0K,IACFlD,GAAO,qBAELA,GADEkO,EACK,IAEA,QAAU,EAEnBlO,GAAO,OACPuO,GAAmB,SAEhB,CACL,GAAItG,GAAOzP,EAAGhD,KACd,IAAIyS,EAGF,IAFA,GAAI+F,GAAa7F,GAAK,EACpBC,EAAKH,EAAK9e,OAAS,EACdgf,EAAKC,GAEV,GADA4F,EAAc/F,EAAKE,GAAM,GACrB4F,EAAgBC,GAAc,CAIhC,GAHIA,EAAYlR,OACdkD,GAAO,QAAWxH,EAAGvO,KAAKoU,cAAc2P,EAAYlR,KAAM0E,GAAU,QAElEhJ,EAAGlP,KAAKkiB,cAAgBhT,EAAGuM,cAC7B,GAAwB,UAApBiJ,EAAYlR,MAAoBtE,EAAGnN,OAAOwD,WAAY,CACxD,GAAIkU,GAAUvK,EAAGnN,OAAOwD,WACtBmb,EAActZ,OAAOD,KAAKsS,GACxBoI,EAAOnB,CACX,IAAImB,EAGF,IAFA,GAAID,GAAcmC,GAAK,EACrBhC,EAAKF,EAAKhiB,OAAS,EACdkkB,EAAKhC,GAAI,CACdH,EAAeC,EAAKkC,GAAM,EAC1B,IAAI3H,GAAO3C,EAAQmI,EACnB,IAAqBva,SAAjB+U,EAAKmG,QAAuB,CAC9B,GAAI9C,GAAYvH,EAAQhJ,EAAGvO,KAAKsV,YAAY2L,EAC5ClL,IAAO,SAAW,EAAc,mBAAqB,EAAc,MAEjEA,GADyB,UAAvBxH,EAAGlP,KAAKkiB,YACH,IAAOhT,EAAG5C,WAAW8P,EAAKmG,SAAY,IAEtC,IAAOwD,KAAKC,UAAU5J,EAAKmG,SAAY,IAEhD7L,GAAO,WAIR,IAAwB,SAApBgO,EAAYlR,MAAmBxM,MAAMC,QAAQiI,EAAGnN,OAAO2C,OAAQ,CACxE,GAAIyd,GAAOjT,EAAGnN,OAAO2C,KACrB,IAAIyd,EAGF,IAFA,GAAI/F,GAAMC,GAAK,EACbgG,EAAKF,EAAKtiB,OAAS,EACdwc,EAAKgG,GAEV,GADAjG,EAAO+F,EAAK9F,GAAM,GACGhV,SAAjB+U,EAAKmG,QAAuB,CAC9B,GAAI9C,GAAYvH,EAAQ,IAAMmE,EAAK,GACnC3F,IAAO,SAAW,EAAc,mBAAqB,EAAc,MAEjEA,GADyB,UAAvBxH,EAAGlP,KAAKkiB,YACH,IAAOhT,EAAG5C,WAAW8P,EAAKmG,SAAY,IAEtC,IAAOwD,KAAKC,UAAU5J,EAAKmG,SAAY,IAEhD7L,GAAO,MAMjB,GAAI+L,GAAOiC,EAAYjR,KACvB,IAAIgP,EAGF,IAFA,GAAItF,GAAOuF,GAAK,EACdC,EAAKF,EAAK5iB,OAAS,EACd6iB,EAAKC,GACVxF,EAAQsF,EAAKC,GAAM,GACfiC,EAAexH,KACjBzG,GAAO,IAAOyG,EAAMzd,KAAKwP,EAAIiO,EAAM1N,SAAY,IAC3CmK,IACFoL,GAAmB,KAS3B,IAJIpL,IACFlD,GAAO,IAAM,EAAoB,IACjCsO,EAAkB,IAEhBN,EAAYlR,OACdkD,GAAO,MACHwO,GAAeA,IAAgBR,EAAYlR,MAAM,CACnD,GAAIyS,IAAe,CACnBvP,IAAO,UACP,IAAIgD,GAAcxK,EAAGnD,WAAa,QAChC4N,EAAiBzK,EAAGlD,cAAgB,QAClCmP,EAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,QAAU,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,uBAE7KjD,GADEyO,EACK,GAAMD,EAAYxG,KAAK,KAEvB,GAAK,EAEdhI,GAAO,OACHxH,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,0BAELA,GADEyO,EACK,GAAMD,EAAYxG,KAAK,KAEvB,GAAK,EAEdhI,GAAO,MAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,MAGPkD,IACFlD,GAAO,mBAELA,GADEkO,EACK,IAEA,QAAU,EAEnBlO,GAAO,OACPuO,GAAmB,MAM7B,GAAIC,IAAgBe,KAAkB/W,EAAGlP,KAAKolB,cAAeC,GAAiB,CAC5E,GAAI3L,GAAcxK,EAAGnD,WAAa,QAChC4N,EAAiBzK,EAAGlD,cAAgB,QACpCsZ,EAAUH,EAAe,iBAAmB,eAC9CzO,IAAO,QAAWxH,EAAGvO,KAAK2kB,GAASJ,EAAahN,GAAO,GAAS,QAChE,IAAIiD,GAAaA,KACjBA,GAAWlH,KAAKyC,GAChBA,EAAM,GACFxH,EAAGkM,gBAAiB,GACtB1E,GAAO,iBAAoB0C,GAAiB,QAAU,oCAA0ClK,EAAY,UAAI,kBAAqBA,EAAGvO,KAAKiO,eAAe+K,GAAmB,uBAE7KjD,GADEyO,EACK,GAAMD,EAAYxG,KAAK,KAEvB,GAAK,EAEdhI,GAAO,OACHxH,EAAGlP,KAAKqb,YAAa,IACvB3E,GAAO,0BAELA,GADEyO,EACK,GAAMD,EAAYxG,KAAK,KAEvB,GAAK,EAEdhI,GAAO,MAELxH,EAAGlP,KAAKsb,UACV5E,GAAO,6BAA+B,EAAgB,mCAAsCxH,EAAa,WAAI,YAAc,EAAU,KAEvIwH,GAAO,OAEPA,GAAO,MAET,IAAI6E,GAAQ7E,CACZA,GAAMyE,EAAWK,MAGb9E,IAFCxH,EAAGuM,eAAiB7B,EACnB1K,EAAG/O,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCuW,GAAO,KA8BT,MA5BIkD,KACFlD,GAAO,IAAM,EAAoB,KAE/BkO,GACEjZ,GACF+K,GAAO,6CACPA,GAAO,+CAEPA,GAAO,+BACPA,GAAO,gCAETA,GAAO,yBAEPA,GAAO,QAAU,EAAW,sBAAwB,EAAS,IAE/DA,EAAMxH,EAAGvO,KAAK8V,YAAYC,GACtBkO,GAAQhL,IACVlD,EAAMxH,EAAGvO,KAAKmW,iBAAiBJ,EAAK/K,IAW/B+K,QAGHwP,IAAI,SAAS3mB,EAAQjB,EAAOD,GAClC,YAEA,IAAI6X,GAAa,wBACblJ,EAAiBzN,EAAQ,iBAQ7BjB,GAAOD,QAAU,SAAoBoR,EAASL,GAyC5C,QAAS+W,GAAS1W,EAASuF,EAAU5F,GAEnC,IAAK,GADDgX,GACK5mB,EAAE,EAAGA,EAAEZ,EAAKsN,MAAMrM,OAAQL,IAAK,CACtC,GAAI6mB,GAAKznB,EAAKsN,MAAM1M,EACpB,IAAI6mB,EAAG7S,MAAQwB,EAAU,CACvBoR,EAAYC,CACZ,QAICD,IACHA,GAAc5S,KAAMwB,EAAUvB,UAC9B7U,EAAKsN,MAAM+H,KAAKmS,GAGlB,IAAIpX,IACFS,QAASA,EACTL,WAAYA,EACZiF,QAAQ,EACR3U,KAAMsN,EAERoZ,GAAU3S,MAAMQ,KAAKjF,GACrBpQ,EAAKsN,MAAMmI,OAAO5E,GAAWT,EAI/B,QAAS+F,GAAcC,GACrB,IAAKpW,EAAKsN,MAAMkI,MAAMY,GAAW,KAAM,IAAIvV,OAAM,gBAAkBuV,GAlErE,GAAIpW,GAAOC,IACX,IAAIA,KAAKqN,MAAMgI,SAASzE,GACtB,KAAM,IAAIhQ,OAAM,WAAagQ,EAAU,sBAEzC,KAAKyG,EAAWjN,KAAKwG,GACnB,KAAM,IAAIhQ,OAAM,WAAagQ,EAAU,6BAEzC,IAAIL,EAAY,CACd,GAAI4F,GAAW5F,EAAWoE,IAC1B,IAAIxM,MAAMC,QAAQ+N,GAAW,CAC3B,GAAIxV,GAAGkV,EAAMM,EAASnV,MACtB,KAAKL,EAAE,EAAGA,EAAEkV,EAAKlV,IAAKuV,EAAcC,EAASxV,GAC7C,KAAKA,EAAE,EAAGA,EAAEkV,EAAKlV,IAAK2mB,EAAS1W,EAASuF,EAASxV,GAAI4P,OAEjD4F,IAAUD,EAAcC,GAC5BmR,EAAS1W,EAASuF,EAAU5F,EAG9B,IAAI8I,GAAQ9I,EAAW8I,SAAU,GAAQrZ,KAAK6B,MAAMuZ,EACpD,IAAI/B,IAAU9I,EAAWnM,SACvB,KAAM,IAAIxD,OAAM,wEAElB,IAAI6mB,GAAalX,EAAWkX,UACxBA,KACEpO,IACFoO,GACEhiB,OACEgiB,GACEliB,KAAQ,+GAIhBgL,EAAWD,eAAiBvQ,EAAKwC,QAAQklB,GAAY,IAIzDznB,KAAKqN,MAAMgI,SAASzE,GAAW5Q,KAAKqN,MAAM2H,IAAIpE,IAAW,KAkCxD8W,iBAAiB,KAAKC,IAAI,SAASjnB,EAAQjB,EAAOD,GACrDC,EAAOD,SACH+S,GAAM,0CACNqI,QAAW,0CACXgN,YAAe,0BACfC,aACIC,aACInT,KAAQ,QACR1O,SAAY,EACZJ,OAAWN,KAAQ,MAEvBwiB,iBACIpT,KAAQ,UACR5O,QAAW,GAEfiiB,yBACIxiB,QAAaD,KAAQ,kCAAqCme,QAAW,KAEzEuE,aACItiB,MAAU,QAAS,UAAW,UAAW,OAAQ,SAAU,SAAU,WAEzEuiB,aACIvT,KAAQ,QACR9O,OAAW8O,KAAQ,UACnB1O,SAAY,EACZU,aAAe,IAGvBgO,KAAQ,SACRjO,YACI6L,IACIoC,KAAQ,SACR/O,OAAU,OAEdgV,SACIjG,KAAQ,SACR/O,OAAU,OAEduiB,OACIxT,KAAQ,UAEZiT,aACIjT,KAAQ,UAEZ+O,WACApd,YACIqO,KAAQ,SACR5O,QAAW,EACXqiB,kBAAoB,GAExBtiB,SACI6O,KAAQ,UAEZ0T,kBACI1T,KAAQ,UACR+O,SAAW,GAEf3d,SACI4O,KAAQ,UAEZyT,kBACIzT,KAAQ,UACR+O,SAAW,GAEfxd,WAAeX,KAAQ,iCACvBY,WAAeZ,KAAQ,yCACvBkB,SACIkO,KAAQ,SACR/O,OAAU,SAEd8a,iBACIjb,QACMkP,KAAQ,YACRpP,KAAQ,MAEdme,YAEJ7d,OACIJ,QACMF,KAAQ,MACRA,KAAQ,8BAEdme,YAEJ1d,UAAcT,KAAQ,iCACtBU,UAAcV,KAAQ,yCACtBoB,aACIgO,KAAQ,UACR+O,SAAW,GAEftd,eAAmBb,KAAQ,iCAC3Bc,eAAmBd,KAAQ,yCAC3BnE,UAAcmE,KAAQ,6BACtB2c,sBACIzc,QACMkP,KAAQ,YACRpP,KAAQ,MAEdme,YAEJmE,aACIlT,KAAQ,SACRuN,sBAA0B3c,KAAQ,KAClCme,YAEJhd,YACIiO,KAAQ,SACRuN,sBAA0B3c,KAAQ,KAClCme,YAEJ3B,mBACIpN,KAAQ,SACRuN,sBAA0B3c,KAAQ,KAClCme,YAEJhe,cACIiP,KAAQ,SACRuN,sBACIzc,QACMF,KAAQ,MACRA,KAAQ,gCAItBI,MACIgP,KAAQ,QACR1O,SAAY,EACZU,aAAe,GAEnBgO,MACIlP,QACMF,KAAQ,8BAENoP,KAAQ,QACR9O,OAAWN,KAAQ,6BACnBU,SAAY,EACZU,aAAe,KAI3BnB,OAAWD,KAAQ,6BACnBE,OAAWF,KAAQ,6BACnBiB,OAAWjB,KAAQ,6BACnBgB,KAAShB,KAAQ,MAErBG,cACI2iB,kBAAsB,WACtBD,kBAAsB,YAE1B1E,iBAGE4E,IAAI,SAAS5nB,EAAQjB,EAAOD,GAClCC,EAAOD,SACH+S,GAAM,yFACNqI,QAAW,0CACXgN,YAAe,yCACfC,aACIC,aACInT,KAAQ,QACR1O,SAAY,EACZJ,OAAWN,KAAQ,MAEvBwiB,iBACIpT,KAAQ,UACR5O,QAAW,GAEfiiB,yBACIxiB,QAAaD,KAAQ,kCAAqCme,QAAW,KAEzEuE,aACItiB,MAAU,QAAS,UAAW,UAAW,OAAQ,SAAU,SAAU,WAEzEuiB,aACIvT,KAAQ,QACR9O,OAAW8O,KAAQ,UACnB1O,SAAY,EACZU,aAAe,GAEnB0S,OACI1E,KAAQ,SACRvT,UAAc,SACdsF,YACI2S,OACI1E,KAAQ,SACRlP,QACMG,OAAU,0BACVA,OAAU,mBAIxBsc,sBAAwB,IAGhCvN,KAAQ,SACRjO,YACI6L,IACIoC,KAAQ,SACR/O,OAAU,OAEdgV,SACIjG,KAAQ,SACR/O,OAAU,OAEduiB,OACIxT,KAAQ,UAEZiT,aACIjT,KAAQ,UAEZ+O,WACApd,YACIb,QAEQkP,KAAQ,SACR5O,QAAW,EACXqiB,kBAAoB,IAEtB7iB,KAAQ,yBAGlBO,SACIL,QACMkP,KAAQ,WACRpP,KAAQ,yBAGlB8iB,kBACI5iB,QAEQkP,KAAQ,UACR+O,SAAW,IAEbne,KAAQ,yBAGlBQ,SACIN,QACMkP,KAAQ,WACRpP,KAAQ,yBAGlB6iB,kBACI3iB,QAEQkP,KAAQ,UACR+O,SAAW,IAEbne,KAAQ,yBAGlBW,WACIT,QACMF,KAAQ,kCACRA,KAAQ,yBAGlBY,WACIV,QACMF,KAAQ,0CACRA,KAAQ,yBAGlBkB,SACIhB,QAEQkP,KAAQ,SACR/O,OAAU,UAEZL,KAAQ,yBAGlBmb,iBACIjb,QACMkP,KAAQ,YACRpP,KAAQ,MACRA,KAAQ,wBAEdme,YAEJ7d,OACIJ,QACMF,KAAQ,MACRA,KAAQ,8BAEdme,YAEJ1d,UACIP,QACMF,KAAQ,kCACRA,KAAQ,yBAGlBU,UACIR,QACMF,KAAQ,0CACRA,KAAQ,yBAGlBoB,aACIlB,QAEQkP,KAAQ,UACR+O,SAAW,IAEbne,KAAQ,yBAGlBa,eACIX,QACMF,KAAQ,kCACRA,KAAQ,yBAGlBc,eACIZ,QACMF,KAAQ,0CACRA,KAAQ,yBAGlBnE,UACIqE,QACMF,KAAQ,8BACRA,KAAQ,yBAGlB2c,sBACIzc,QACMkP,KAAQ,YACRpP,KAAQ,MACRA,KAAQ,wBAEdme,YAEJmE,aACIlT,KAAQ,SACRuN,sBAA0B3c,KAAQ,KAClCme,YAEJhd,YACIiO,KAAQ,SACRuN,sBAA0B3c,KAAQ,KAClCme,YAEJ3B,mBACIpN,KAAQ,SACRuN,sBAA0B3c,KAAQ,KAClCme,YAEJhe,cACIiP,KAAQ,SACRuN,sBACIzc,QACMF,KAAQ,MACRA,KAAQ,gCAItBI,MACIF,QAEQkP,KAAQ,QACR1O,SAAY,EACZU,aAAe,IAEjBpB,KAAQ,yBAGlBoP,MACIlP,QACMF,KAAQ,8BAENoP,KAAQ,QACR9O,OAAWN,KAAQ,6BACnBU,SAAY,EACZU,aAAe,KAI3BnB,OAAWD,KAAQ,6BACnBE,OAAWF,KAAQ,6BACnBiB,OAAWjB,KAAQ,6BACnBgB,KAAShB,KAAQ,KACjBK,QACIH,QACMkP,KAAQ,WACRpP,KAAQ,yBAGlBgjB,eACI9iB,QACMkP,KAAQ,WACRpP,KAAQ,yBAGlBijB,eACI/iB,QACMkP,KAAQ,WACRpP,KAAQ,yBAGlBkjB,wBACIhjB,QAEQkP,KAAQ,UACR+O,SAAW,IAEbne,KAAQ,yBAGlBmjB,wBACIjjB,QAEQkP,KAAQ,UACR+O,SAAW,IAEbne,KAAQ,yBAGlBojB,UACIljB,WAEMF,KAAQ,yBAGlBqjB,UAAcrjB,KAAQ,KACtBsd,eACIlO,KAAQ,SACRuN,sBACIvN,KAAQ,SACRvT,UAAc,UACdsF,YACIZ,SACIL,QACMF,KAAQ,kCACRA,KAAQ,yBAGlBQ,SACIN,QACMF,KAAQ,0CACRA,KAAQ,yBAGlBrC,QAAYqC,KAAQ,MAExB2c,sBAAwB,GAE5BwB,YAEJmF,QACIlU,KAAQ,QACR9O,OACIzE,UAAc,QACdsF,YACI6e,IAAQhgB,KAAQ,KAChBigB,MACI/f,QACMkP,KAAQ,YACRpP,KAAQ,OAGlBkgB,UAAc9Q,KAAQ,YAE1BuN,sBAAwB,EACxBxc,cACI+f,UAAc,UAK9B/f,cACI2iB,kBAAsB,WACtBD,kBAAsB,WACtBG,eAAmB,UACnBC,eAAmB,UACnBC,wBAA4B,iBAC5BC,wBAA4B,kBAEhChF,iBAGEoF,IAAI,SAASpoB,EAAQjB,EAAOD,GAClC,YAUA,SAASupB,GAAS9O,GAyBhB,QAAS+O,GAAYpY,EAAS2E,EAAO0T,GACnC,GAAI1Y,IACFZ,OAAQsZ,GAAcC,EAAgBtY,GACtCiO,YAAY,EACZpS,OAAQ,OAEN8I,KAAOhF,EAAWoE,KAAOY,GAC7B0E,EAAIkP,WAAWvY,EAASL,GA/B1B,GAAI2Y,IACFL,OAAUnoB,EAAQ,kBAClBioB,SAAYjoB,EAAQ,oBACpB0oB,aAAgB1oB,EAAQ,wBACxB2oB,gBAAmB3oB,EAAQ,2BAG7B,IAAIuZ,EAAIpY,MAAMynB,QAAS,EAAO,CAC5B,GAAI7B,GAAa/mB,EAAQ,6BACzBuZ,GAAIsP,cAAc9B,EAAY+B,GAEhCR,EAAY,YACZ/O,EAAIkP,WAAW,YAAcxU,KAAM,QAAShE,MAAO8Y,IAEnDT,EAAY,gBAAiB,SAAUE,EAAgBE,cACvDJ,EAAY,gBAAiB,SAAUE,EAAgBE,cACvDnP,EAAIkP,WAAW,0BACflP,EAAIkP,WAAW,0BAEflP,EAAIkP,WAAW,iBACfH,EAAY,kBAAmB,UAC/BA,EAAY,UAed,QAASS,GAAcvmB,GACrB,OACEqD,KAAOV,OAASU,IAAKrD,KA/CzB,GAAIsmB,GAAiB,uFAErB/pB,GAAOD,SACLkqB,OAAQX,EACRS,eAAgBA,KA+CfG,uBAAuB,GAAGC,mBAAmB,GAAGC,0BAA0B,GAAGC,iBAAiB,GAAGC,6BAA6B,KAAKC,IAAI,SAAStpB,EAAQjB,EAAOD,IAClK,SAAWM,IAET,SAASmM,GAgEV,QAASoC,GAAMsG,GACd,KAAM,IAAIsV,YAAWxd,EAAOkI,IAW7B,QAASQ,GAAIyB,EAAOsT,GAGnB,IAFA,GAAIlpB,GAAS4V,EAAM5V,OACfsL,KACGtL,KACNsL,EAAOtL,GAAUkpB,EAAGtT,EAAM5V,GAE3B,OAAOsL,GAaR,QAAS6d,GAAUC,EAAQF,GAC1B,GAAInX,GAAQqX,EAAOpgB,MAAM,KACrBsC,EAAS,EACTyG,GAAM/R,OAAS,IAGlBsL,EAASyG,EAAM,GAAK,IACpBqX,EAASrX,EAAM,IAGhBqX,EAASA,EAAOpW,QAAQqW,EAAiB,IACzC,IAAIC,GAASF,EAAOpgB,MAAM,KACtBugB,EAAUpV,EAAImV,EAAQJ,GAAIrK,KAAK,IACnC,OAAOvT,GAASie,EAgBjB,QAASC,GAAWJ,GAMnB,IALA,GAGIjlB,GACAslB,EAJAC,KACAC,EAAU,EACV3pB,EAASopB,EAAOppB,OAGb2pB,EAAU3pB,GAChBmE,EAAQilB,EAAOrU,WAAW4U,KACtBxlB,GAAS,OAAUA,GAAS,OAAUwlB,EAAU3pB,GAEnDypB,EAAQL,EAAOrU,WAAW4U,KACF,QAAX,MAARF,GACJC,EAAOtV,OAAe,KAARjQ,IAAkB,KAAe,KAARslB,GAAiB,QAIxDC,EAAOtV,KAAKjQ,GACZwlB,MAGDD,EAAOtV,KAAKjQ,EAGd,OAAOulB,GAWR,QAASE,GAAWhU,GACnB,MAAOzB,GAAIyB,EAAO,SAASzR,GAC1B,GAAIulB,GAAS,EAOb,OANIvlB,GAAQ,QACXA,GAAS,MACTulB,GAAUG,EAAmB1lB,IAAU,GAAK,KAAQ,OACpDA,EAAQ,MAAiB,KAARA,GAElBulB,GAAUG,EAAmB1lB,KAE3B0a,KAAK,IAYT,QAASiL,GAAaC,GACrB,MAAIA,GAAY,GAAK,GACbA,EAAY,GAEhBA,EAAY,GAAK,GACbA,EAAY,GAEhBA,EAAY,GAAK,GACbA,EAAY,GAEbC,EAcR,QAASC,GAAaC,EAAOC,GAG5B,MAAOD,GAAQ,GAAK,IAAMA,EAAQ,MAAgB,GAARC,IAAc,GAQzD,QAASC,GAAMC,EAAOC,EAAWC,GAChC,GAAIC,GAAI,CAGR,KAFAH,EAAQE,EAAYE,EAAMJ,EAAQK,GAAQL,GAAS,EACnDA,GAASI,EAAMJ,EAAQC,GACOD,EAAQM,EAAgBC,GAAQ,EAAGJ,GAAKR,EACrEK,EAAQI,EAAMJ,EAAQM,EAEvB,OAAOF,GAAMD,GAAKG,EAAgB,GAAKN,GAASA,EAAQQ,IAUzD,QAASC,GAAOC,GAEf,GAEIlU,GAIAmU,EACAC,EACApc,EACAqc,EACAC,EACAX,EACAN,EACA/qB,EAEAisB,EAfA1B,KACA2B,EAAcN,EAAM/qB,OAEpBL,EAAI,EACJP,EAAIksB,EACJC,EAAOC,CAqBX,KALAR,EAAQD,EAAMU,YAAYC,GACtBV,EAAQ,IACXA,EAAQ,GAGJC,EAAI,EAAGA,EAAID,IAASC,EAEpBF,EAAMhW,WAAWkW,IAAM,KAC1B5d,EAAM;AAEPqc,EAAOtV,KAAK2W,EAAMhW,WAAWkW,GAM9B,KAAKpc,EAAQmc,EAAQ,EAAIA,EAAQ,EAAI,EAAGnc,EAAQwc,GAAwC,CAOvF,IAAKH,EAAOvrB,EAAGwrB,EAAI,EAAGX,EAAIR,EAErBnb,GAASwc,GACZhe,EAAM,iBAGP6c,EAAQJ,EAAaiB,EAAMhW,WAAWlG,OAElCqb,GAASF,GAAQE,EAAQO,GAAOkB,EAAShsB,GAAKwrB,KACjD9d,EAAM,YAGP1N,GAAKuqB,EAAQiB,EACbhsB,EAAIqrB,GAAKe,EAAOK,EAAQpB,GAAKe,EAAOX,EAAOA,EAAOJ,EAAIe,IAElDrB,EAAQ/qB,GAfuCqrB,GAAKR,EAmBxDoB,EAAapB,EAAO7qB,EAChBgsB,EAAIV,EAAMkB,EAASP,IACtB/d,EAAM,YAGP8d,GAAKC,CAINvU,GAAM6S,EAAO1pB,OAAS,EACtBurB,EAAOnB,EAAMzqB,EAAIurB,EAAMrU,EAAa,GAARqU,GAIxBT,EAAM9qB,EAAIkX,GAAO8U,EAASvsB,GAC7BiO,EAAM,YAGPjO,GAAKqrB,EAAM9qB,EAAIkX,GACflX,GAAKkX,EAGL6S,EAAOrZ,OAAO1Q,IAAK,EAAGP,GAIvB,MAAOwqB,GAAWF,GAUnB,QAASmC,GAAOd,GACf,GAAI3rB,GACAirB,EACAyB,EACAC,EACAR,EACAN,EACAe,EACAC,EACAzB,EACArrB,EACA+sB,EAGAb,EAEAc,EACAf,EACAgB,EANA1C,IAoBJ,KAXAqB,EAAQvB,EAAWuB,GAGnBM,EAAcN,EAAM/qB,OAGpBZ,EAAIksB,EACJjB,EAAQ,EACRkB,EAAOC,EAGFP,EAAI,EAAGA,EAAII,IAAeJ,EAC9BiB,EAAenB,EAAME,GACjBiB,EAAe,KAClBxC,EAAOtV,KAAKyV,EAAmBqC,GAejC,KAXAJ,EAAiBC,EAAcrC,EAAO1pB,OAMlC+rB,GACHrC,EAAOtV,KAAKsX,GAINI,EAAiBT,GAAa,CAIpC,IAAKW,EAAIL,EAAQV,EAAI,EAAGA,EAAII,IAAeJ,EAC1CiB,EAAenB,EAAME,GACjBiB,GAAgB9sB,GAAK8sB,EAAeF,IACvCA,EAAIE,EAcN,KARAC,EAAwBL,EAAiB,EACrCE,EAAI5sB,EAAIqrB,GAAOkB,EAAStB,GAAS8B,IACpC9e,EAAM,YAGPgd,IAAU2B,EAAI5sB,GAAK+sB,EACnB/sB,EAAI4sB,EAECf,EAAI,EAAGA,EAAII,IAAeJ,EAO9B,GANAiB,EAAenB,EAAME,GAEjBiB,EAAe9sB,KAAOirB,EAAQsB,GACjCte,EAAM,YAGH6e,GAAgB9sB,EAAG,CAEtB,IAAK6sB,EAAI5B,EAAOG,EAAIR,EACnB7qB,EAAIqrB,GAAKe,EAAOK,EAAQpB,GAAKe,EAAOX,EAAOA,EAAOJ,EAAIe,IAClDU,EAAI9sB,GAFqCqrB,GAAKR,EAKlDoC,EAAUH,EAAI9sB,EACdisB,EAAapB,EAAO7qB,EACpBuqB,EAAOtV,KACNyV,EAAmBI,EAAa9qB,EAAIitB,EAAUhB,EAAY,KAE3Da,EAAIxB,EAAM2B,EAAUhB,EAGrB1B,GAAOtV,KAAKyV,EAAmBI,EAAagC,EAAG,KAC/CV,EAAOnB,EAAMC,EAAO8B,EAAuBL,GAAkBC,GAC7D1B,EAAQ,IACNyB,IAIFzB,IACAjrB,EAGH,MAAOsqB,GAAO7K,KAAK,IAcpB,QAASwN,GAAUtB,GAClB,MAAO5B,GAAU4B,EAAO,SAAS3B,GAChC,MAAOkD,GAAcljB,KAAKggB,GACvB0B,EAAO1B,EAAOtX,MAAM,GAAGya,eACvBnD,IAeL,QAASoD,GAAQzB,GAChB,MAAO5B,GAAU4B,EAAO,SAAS3B,GAChC,MAAOqD,GAAcrjB,KAAKggB,GACvB,OAASyC,EAAOzC,GAChBA,IAvdL,GAAIsD,GAAgC,gBAAXluB,IAAuBA,IAC9CA,EAAQmuB,UAAYnuB,EAClBouB,EAA8B,gBAAVnuB,IAAsBA,IAC5CA,EAAOkuB,UAAYluB,EACjBouB,EAA8B,gBAAV/tB,IAAsBA,CAE7C+tB,GAAW/tB,SAAW+tB,GACtBA,EAAWhuB,SAAWguB,GACtBA,EAAW9tB,OAAS8tB,IAEpB5hB,EAAO4hB,EAQR,IAAIC,GAiCJ5oB,EA9BAynB,EAAS,WAGT3B,EAAO,GACP4B,EAAO,EACPhB,EAAO,GACPC,EAAO,GACPH,EAAO,IACPc,EAAc,GACdF,EAAW,IACXI,EAAY,IAGZY,EAAgB,QAChBG,EAAgB,eAChBpD,EAAkB,4BAGlB5d,GACCshB,SAAY,kDACZC,YAAa,iDACbC,gBAAiB,iBAIlBtC,EAAgBX,EAAO4B,EACvBnB,EAAQyC,KAAKzC,MACbZ,EAAqBsD,OAAOC,YAyc5B,IA3BAN,GAMCO,QAAW,QAQXC,MACCxC,OAAUtB,EACVqC,OAAUjC,GAEXkB,OAAUA,EACVe,OAAUA,EACVW,QAAWA,EACXH,UAAaA,GAOI,kBAAV3tB,IACc,gBAAdA,GAAOC,KACdD,EAAOC,IAEPD,EAAO,WAAY,WAClB,MAAOouB,SAEF,IAAIJ,GAAeE,EACzB,GAAInuB,EAAOD,SAAWkuB,EAErBE,EAAWpuB,QAAUsuB,MAGrB,KAAK5oB,IAAO4oB,GACXA,EAASS,eAAerpB,KAASwoB,EAAYxoB,GAAO4oB,EAAS5oB,QAK/D+G,GAAK6hB,SAAWA,GAGhB9tB,QAECe,KAAKf,KAAuB,mBAAXF,QAAyBA,OAAyB,mBAATC,MAAuBA,KAAyB,mBAAXF,QAAyBA,gBACrH2uB,IAAI,SAAS9tB,EAAQjB,EAAOD,GAsBlC,YAKA,SAAS+uB,GAAe5Y,EAAKuD,GAC3B,MAAO3Q,QAAOvD,UAAUupB,eAAextB,KAAK4U,EAAKuD,GAGnDzZ,EAAOD,QAAU,SAASivB,EAAIC,EAAKC,EAAIC,GACrCF,EAAMA,GAAO,IACbC,EAAKA,GAAM,GACX,IAAIhZ,KAEJ,IAAkB,gBAAP8Y,IAAiC,IAAdA,EAAGztB,OAC/B,MAAO2U,EAGT,IAAIkZ,GAAS,KACbJ,GAAKA,EAAGzkB,MAAM0kB,EAEd,IAAII,GAAU,GACVF,IAAsC,gBAApBA,GAAQE,UAC5BA,EAAUF,EAAQE,QAGpB,IAAIjZ,GAAM4Y,EAAGztB,MAET8tB,GAAU,GAAKjZ,EAAMiZ,IACvBjZ,EAAMiZ,EAGR,KAAK,GAAInuB,GAAI,EAAGA,EAAIkV,IAAOlV,EAAG,CAC5B,GAEIouB,GAAMC,EAAMxD,EAAGnc,EAFf4f,EAAIR,EAAG9tB,GAAGqT,QAAQ6a,EAAQ,OAC1BK,EAAMD,EAAEE,QAAQR,EAGhBO,IAAO,GACTH,EAAOE,EAAEG,OAAO,EAAGF,GACnBF,EAAOC,EAAEG,OAAOF,EAAM,KAEtBH,EAAOE,EACPD,EAAO,IAGTxD,EAAI3R,mBAAmBkV,GACvB1f,EAAIwK,mBAAmBmV,GAElBT,EAAe5Y,EAAK6V,GAEdpjB,EAAQuN,EAAI6V,IACrB7V,EAAI6V,GAAGpW,KAAK/F,GAEZsG,EAAI6V,IAAM7V,EAAI6V,GAAInc,GAJlBsG,EAAI6V,GAAKnc,EAQb,MAAOsG,GAGT,IAAIvN,GAAUD,MAAMC,SAAW,SAAUinB,GACvC,MAA8C,mBAAvC9mB,OAAOvD,UAAUsqB,SAASvuB,KAAKsuB,SAGlCE,IAAI,SAAS7uB,EAAQjB,EAAOD,GAsBlC,YAgDA,SAAS2V,GAAKka,EAAI9vB,GAChB,GAAI8vB,EAAGla,IAAK,MAAOka,GAAGla,IAAI5V,EAE1B,KAAK,GADD4L,MACKxK,EAAI,EAAGA,EAAI0uB,EAAGruB,OAAQL,IAC7BwK,EAAIiK,KAAK7V,EAAE8vB,EAAG1uB,GAAIA,GAEpB,OAAOwK,GApDT,GAAIqkB,GAAqB,SAASngB,GAChC,aAAeA,IACb,IAAK,SACH,MAAOA,EAET,KAAK,UACH,MAAOA,GAAI,OAAS,OAEtB,KAAK,SACH,MAAOogB,UAASpgB,GAAKA,EAAI,EAE3B,SACE,MAAO,IAIb5P,GAAOD,QAAU,SAASmW,EAAK+Y,EAAKC,EAAIe,GAOtC,MANAhB,GAAMA,GAAO,IACbC,EAAKA,GAAM,IACC,OAARhZ,IACFA,EAAMnN,QAGW,gBAARmN,GACFR,EAAIwa,EAAWha,GAAM,SAAS6V,GACnC,GAAIoE,GAAK9V,mBAAmB0V,EAAmBhE,IAAMmD,CACrD,OAAIvmB,GAAQuN,EAAI6V,IACPrW,EAAIQ,EAAI6V,GAAI,SAASnc,GAC1B,MAAOugB,GAAK9V,mBAAmB0V,EAAmBngB,MACjDwQ,KAAK6O,GAEDkB,EAAK9V,mBAAmB0V,EAAmB7Z,EAAI6V,OAEvD3L,KAAK6O,GAILgB,EACE5V,mBAAmB0V,EAAmBE,IAASf,EAC/C7U,mBAAmB0V,EAAmB7Z,IAF3B,GAKpB,IAAIvN,GAAUD,MAAMC,SAAW,SAAUinB,GACvC,MAA8C,mBAAvC9mB,OAAOvD,UAAUsqB,SAASvuB,KAAKsuB,IAYpCM,EAAapnB,OAAOD,MAAQ,SAAUqN,GACxC,GAAIxK,KACJ,KAAK,GAAIjG,KAAOyQ,GACVpN,OAAOvD,UAAUupB,eAAextB,KAAK4U,EAAKzQ,IAAMiG,EAAIiK,KAAKlQ,EAE/D,OAAOiG,SAGH0kB,IAAI,SAASnvB,EAAQjB,EAAOD,GAClC,YAEAA,GAAQssB,OAAStsB,EAAQ2S,MAAQzR,EAAQ,YACzClB,EAAQqtB,OAASrtB,EAAQ2nB,UAAYzmB,EAAQ,cAE1CovB,WAAW,GAAGC,WAAW,KAAKC,IAAI,SAAStvB,EAAQjB,EAAOD,GAsB7D,YAYA,SAASywB,KACPjwB,KAAK4T,SAAW,KAChB5T,KAAKkwB,QAAU,KACflwB,KAAKmwB,KAAO,KACZnwB,KAAK8T,KAAO,KACZ9T,KAAKowB,KAAO,KACZpwB,KAAKkK,SAAW,KAChBlK,KAAK6S,KAAO,KACZ7S,KAAKqwB,OAAS,KACdrwB,KAAKswB,MAAQ,KACbtwB,KAAKuwB,SAAW,KAChBvwB,KAAK+T,KAAO,KACZ/T,KAAK6T,KAAO,KAwDd,QAAS2c,GAAS1hB,EAAK2hB,EAAkBC,GACvC,GAAI5hB,GAAOhN,EAAK6uB,SAAS7hB,IAAQA,YAAemhB,GAAK,MAAOnhB,EAE5D,IAAItO,GAAI,GAAIyvB,EAEZ,OADAzvB,GAAE2R,MAAMrD,EAAK2hB,EAAkBC,GACxBlwB,EAyQT,QAASowB,GAAUjb,GAMjB,MADI7T,GAAK+uB,SAASlb,KAAMA,EAAM6a,EAAS7a,IACjCA,YAAesa,GACdta,EAAI/P,SADuBqqB,EAAIjrB,UAAUY,OAAO7E,KAAK4U,GA4D9D,QAASmb,GAAWjiB,EAAQkiB,GAC1B,MAAOP,GAAS3hB,GAAQ,GAAO,GAAMvB,QAAQyjB,GAO/C,QAASC,GAAiBniB,EAAQkiB,GAChC,MAAKliB,GACE2hB,EAAS3hB,GAAQ,GAAO,GAAMoiB,cAAcF,GAD/BA,EAvatB,GAAIjD,GAAWptB,EAAQ,YACnBoB,EAAOpB,EAAQ,SAEnBlB,GAAQ2S,MAAQqe,EAChBhxB,EAAQ8N,QAAUwjB,EAClBtxB,EAAQyxB,cAAgBD,EACxBxxB,EAAQoG,OAASgrB,EAEjBpxB,EAAQywB,IAAMA,CAqBd,IAAIiB,GAAkB,oBAClBC,EAAc,WAGdC,EAAoB,qCAIpBC,GAAU,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,MAG/CC,GAAU,IAAK,IAAK,IAAK,KAAM,IAAK,KAAKhc,OAAO+b,GAGhDE,GAAc,KAAMjc,OAAOgc,GAK3BE,GAAgB,IAAK,IAAK,IAAK,IAAK,KAAKlc,OAAOic,GAChDE,GAAmB,IAAK,IAAK,KAC7BC,EAAiB,IACjBC,EAAsB,yBACtBC,EAAoB,+BAEpBC,GACEC,YAAc,EACdC,eAAe,GAGjBC,GACEF,YAAc,EACdC,eAAe,GAGjBE,GACEC,MAAQ,EACRC,OAAS,EACTC,KAAO,EACPC,QAAU,EACVC,MAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,WAAW,EACXC,SAAS,GAEXC,EAAclyB,EAAQ,cAU1BuvB,GAAIjrB,UAAUmN,MAAQ,SAASrD,EAAK2hB,EAAkBC,GACpD,IAAK5uB,EAAK+uB,SAAS/hB,GACjB,KAAM,IAAI+jB,WAAU,+CAAkD/jB,GAMxE,IAAIgkB,GAAahkB,EAAIqgB,QAAQ,KACzB4D,EACKD,KAAe,GAAMA,EAAahkB,EAAIqgB,QAAQ,KAAQ,IAAM,IACjE6D,EAASlkB,EAAI9E,MAAM+oB,GACnBE,EAAa,KACjBD,GAAO,GAAKA,EAAO,GAAGhf,QAAQif,EAAY,KAC1CnkB,EAAMkkB,EAAOnT,KAAKkT,EAElB,IAAIG,GAAOpkB,CAMX,IAFAokB,EAAOA,EAAKC,QAEPzC,GAA+C,IAA1B5hB,EAAI9E,MAAM,KAAKhJ,OAAc,CAErD,GAAIoyB,GAAahC,EAAkBiC,KAAKH,EACxC,IAAIE,EAeF,MAdApzB,MAAK+T,KAAOmf,EACZlzB,KAAK6T,KAAOqf,EACZlzB,KAAKuwB,SAAW6C,EAAW,GACvBA,EAAW,IACbpzB,KAAKqwB,OAAS+C,EAAW,GAEvBpzB,KAAKswB,MADHG,EACWmC,EAAYzgB,MAAMnS,KAAKqwB,OAAOjB,OAAO,IAErCpvB,KAAKqwB,OAAOjB,OAAO,IAEzBqB,IACTzwB,KAAKqwB,OAAS,GACdrwB,KAAKswB,UAEAtwB,KAIX,GAAIszB,GAAQpC,EAAgBmC,KAAKH,EACjC,IAAII,EAAO,CACTA,EAAQA,EAAM,EACd,IAAIC,GAAaD,EAAM/F,aACvBvtB,MAAK4T,SAAW2f,EAChBL,EAAOA,EAAK9D,OAAOkE,EAAMtyB,QAO3B,GAAI0vB,GAAqB4C,GAASJ,EAAKhqB,MAAM,wBAAyB,CACpE,GAAIgnB,GAAgC,OAAtBgD,EAAK9D,OAAO,EAAG,IACzBc,GAAaoD,GAAStB,EAAiBsB,KACzCJ,EAAOA,EAAK9D,OAAO,GACnBpvB,KAAKkwB,SAAU,GAInB,IAAK8B,EAAiBsB,KACjBpD,GAAYoD,IAAUrB,EAAgBqB,IAAU,CAmBnD,IAAK,GADDE,IAAU,EACL7yB,EAAI,EAAGA,EAAI8wB,EAAgBzwB,OAAQL,IAAK,CAC/C,GAAI8yB,GAAMP,EAAK/D,QAAQsC,EAAgB9wB,GACnC8yB,MAAQ,IAAOD,KAAY,GAAMC,EAAMD,KACzCA,EAAUC,GAKd,GAAItD,GAAMuD,CAGRA,GAFEF,KAAY,EAELN,EAAKzG,YAAY,KAIjByG,EAAKzG,YAAY,IAAK+G,GAK7BE,KAAW,IACbvD,EAAO+C,EAAKpgB,MAAM,EAAG4gB,GACrBR,EAAOA,EAAKpgB,MAAM4gB,EAAS,GAC3B1zB,KAAKmwB,KAAOtW,mBAAmBsW,IAIjCqD,GAAU,CACV,KAAK,GAAI7yB,GAAI,EAAGA,EAAI6wB,EAAaxwB,OAAQL,IAAK,CAC5C,GAAI8yB,GAAMP,EAAK/D,QAAQqC,EAAa7wB,GAChC8yB,MAAQ,IAAOD,KAAY,GAAMC,EAAMD,KACzCA,EAAUC,GAGVD,KAAY,IACdA,EAAUN,EAAKlyB,QAEjBhB,KAAK8T,KAAOof,EAAKpgB,MAAM,EAAG0gB,GAC1BN,EAAOA,EAAKpgB,MAAM0gB,GAGlBxzB,KAAK2zB,YAIL3zB,KAAKkK,SAAWlK,KAAKkK,UAAY,EAIjC,IAAI0pB,GAAoC,MAArB5zB,KAAKkK,SAAS,IACe,MAA5ClK,KAAKkK,SAASlK,KAAKkK,SAASlJ,OAAS,EAGzC,KAAK4yB,EAEH,IAAK,GADDC,GAAY7zB,KAAKkK,SAASF,MAAM,MAC3BrJ,EAAI,EAAGG,EAAI+yB,EAAU7yB,OAAQL,EAAIG,EAAGH,IAAK,CAChD,GAAIqS,GAAO6gB,EAAUlzB,EACrB,IAAKqS,IACAA,EAAK9J,MAAMyoB,GAAsB,CAEpC,IAAK,GADDmC,GAAU,GACL7H,EAAI,EAAGT,EAAIxY,EAAKhS,OAAQirB,EAAIT,EAAGS,IAKpC6H,GAJE9gB,EAAK+C,WAAWkW,GAAK,IAIZ,IAEAjZ,EAAKiZ,EAIpB,KAAK6H,EAAQ5qB,MAAMyoB,GAAsB,CACvC,GAAIoC,GAAaF,EAAU/gB,MAAM,EAAGnS,GAChCqzB,EAAUH,EAAU/gB,MAAMnS,EAAI,GAC9BszB,EAAMjhB,EAAK9J,MAAM0oB,EACjBqC,KACFF,EAAW3e,KAAK6e,EAAI,IACpBD,EAAQE,QAAQD,EAAI,KAElBD,EAAQhzB,SACVkyB,EAAO,IAAMc,EAAQnU,KAAK,KAAOqT,GAEnClzB,KAAKkK,SAAW6pB,EAAWlU,KAAK,IAChC,SAON7f,KAAKkK,SADHlK,KAAKkK,SAASlJ,OAAS0wB,EACT,GAGA1xB,KAAKkK,SAASqjB,cAG3BqG,IAKH5zB,KAAKkK,SAAW4jB,EAASN,QAAQxtB,KAAKkK,UAGxC,IAAIgI,GAAIlS,KAAKowB,KAAO,IAAMpwB,KAAKowB,KAAO,GAClC+D,EAAIn0B,KAAKkK,UAAY,EACzBlK,MAAK8T,KAAOqgB,EAAIjiB,EAChBlS,KAAK6T,MAAQ7T,KAAK8T,KAId8f,IACF5zB,KAAKkK,SAAWlK,KAAKkK,SAASklB,OAAO,EAAGpvB,KAAKkK,SAASlJ,OAAS,GAC/C,MAAZkyB,EAAK,KACPA,EAAO,IAAMA,IAOnB,IAAKrB,EAAe0B,GAKlB,IAAK,GAAI5yB,GAAI,EAAGG,EAAIywB,EAAWvwB,OAAQL,EAAIG,EAAGH,IAAK,CACjD,GAAIyzB,GAAK7C,EAAW5wB,EACpB,IAAIuyB,EAAK/D,QAAQiF,MAAQ,EAAzB,CAEA,GAAIC,GAAMva,mBAAmBsa,EACzBC,KAAQD,IACVC,EAAMC,OAAOF,IAEflB,EAAOA,EAAKlpB,MAAMoqB,GAAIvU,KAAKwU,IAM/B,GAAIxhB,GAAOqgB,EAAK/D,QAAQ,IACpBtc,MAAS,IAEX7S,KAAK6S,KAAOqgB,EAAK9D,OAAOvc,GACxBqgB,EAAOA,EAAKpgB,MAAM,EAAGD,GAEvB,IAAI0hB,GAAKrB,EAAK/D,QAAQ,IAoBtB,IAnBIoF,KAAO,GACTv0B,KAAKqwB,OAAS6C,EAAK9D,OAAOmF,GAC1Bv0B,KAAKswB,MAAQ4C,EAAK9D,OAAOmF,EAAK,GAC1B9D,IACFzwB,KAAKswB,MAAQsC,EAAYzgB,MAAMnS,KAAKswB,QAEtC4C,EAAOA,EAAKpgB,MAAM,EAAGyhB,IACZ9D,IAETzwB,KAAKqwB,OAAS,GACdrwB,KAAKswB,UAEH4C,IAAMlzB,KAAKuwB,SAAW2C,GACtBjB,EAAgBsB,IAChBvzB,KAAKkK,WAAalK,KAAKuwB,WACzBvwB,KAAKuwB,SAAW,KAIdvwB,KAAKuwB,UAAYvwB,KAAKqwB,OAAQ,CAChC,GAAIne,GAAIlS,KAAKuwB,UAAY,GACrBjwB,EAAIN,KAAKqwB,QAAU,EACvBrwB,MAAK+T,KAAO7B,EAAI5R,EAKlB,MADAN,MAAK6T,KAAO7T,KAAK4F,SACV5F,MAcTiwB,EAAIjrB,UAAUY,OAAS,WACrB,GAAIuqB,GAAOnwB,KAAKmwB,MAAQ,EACpBA,KACFA,EAAOrW,mBAAmBqW,GAC1BA,EAAOA,EAAKnc,QAAQ,OAAQ,KAC5Bmc,GAAQ,IAGV,IAAIvc,GAAW5T,KAAK4T,UAAY,GAC5B2c,EAAWvwB,KAAKuwB,UAAY,GAC5B1d,EAAO7S,KAAK6S,MAAQ,GACpBiB,GAAO,EACPwc,EAAQ,EAERtwB,MAAK8T,KACPA,EAAOqc,EAAOnwB,KAAK8T,KACV9T,KAAKkK,WACd4J,EAAOqc,GAAQnwB,KAAKkK,SAASilB,QAAQ,QAAS,EAC1CnvB,KAAKkK,SACL,IAAMlK,KAAKkK,SAAW,KACtBlK,KAAKowB,OACPtc,GAAQ,IAAM9T,KAAKowB,OAInBpwB,KAAKswB,OACLxuB,EAAK6uB,SAAS3wB,KAAKswB,QACnB/nB,OAAOD,KAAKtI,KAAKswB,OAAOtvB,SAC1BsvB,EAAQsC,EAAYzL,UAAUnnB,KAAKswB,OAGrC,IAAID,GAASrwB,KAAKqwB,QAAWC,GAAU,IAAMA,GAAW,EAsBxD,OApBI1c,IAAoC,MAAxBA,EAASwb,QAAO,KAAaxb,GAAY,KAIrD5T,KAAKkwB,WACHtc,GAAYqe,EAAgBre,KAAcE,KAAS,GACvDA,EAAO,MAAQA,GAAQ,IACnByc,GAAmC,MAAvBA,EAASiE,OAAO,KAAYjE,EAAW,IAAMA,IACnDzc,IACVA,EAAO,IAGLjB,GAA2B,MAAnBA,EAAK2hB,OAAO,KAAY3hB,EAAO,IAAMA,GAC7Cwd,GAA+B,MAArBA,EAAOmE,OAAO,KAAYnE,EAAS,IAAMA,GAEvDE,EAAWA,EAASvc,QAAQ,QAAS,SAAS9K,GAC5C,MAAO4Q,oBAAmB5Q,KAE5BmnB,EAASA,EAAOrc,QAAQ,IAAK,OAEtBJ,EAAWE,EAAOyc,EAAWF,EAASxd,GAO/Cod,EAAIjrB,UAAUsI,QAAU,SAASyjB,GAC/B,MAAO/wB,MAAKixB,cAAcT,EAASO,GAAU,GAAO,IAAOnrB,UAQ7DqqB,EAAIjrB,UAAUisB,cAAgB,SAASF,GACrC,GAAIjvB,EAAK+uB,SAASE,GAAW,CAC3B,GAAI0D,GAAM,GAAIxE,EACdwE,GAAItiB,MAAM4e,GAAU,GAAO,GAC3BA,EAAW0D,EAKb,IAAK,GAFDnoB,GAAS,GAAI2jB,GACbyE,EAAQnsB,OAAOD,KAAKtI,MACf20B,EAAK,EAAGA,EAAKD,EAAM1zB,OAAQ2zB,IAAM,CACxC,GAAIC,GAAOF,EAAMC,EACjBroB,GAAOsoB,GAAQ50B,KAAK40B,GAQtB,GAHAtoB,EAAOuG,KAAOke,EAASle,KAGD,KAAlBke,EAASld,KAEX,MADAvH,GAAOuH,KAAOvH,EAAO1G,SACd0G,CAIT,IAAIykB,EAASb,UAAYa,EAASnd,SAAU,CAG1C,IAAK,GADDihB,GAAQtsB,OAAOD,KAAKyoB,GACf+D,EAAK,EAAGA,EAAKD,EAAM7zB,OAAQ8zB,IAAM,CACxC,GAAIC,GAAOF,EAAMC,EACJ,cAATC,IACFzoB,EAAOyoB,GAAQhE,EAASgE,IAU5B,MANI9C,GAAgB3lB,EAAOsH,WACvBtH,EAAOpC,WAAaoC,EAAOikB,WAC7BjkB,EAAOyH,KAAOzH,EAAOikB,SAAW,KAGlCjkB,EAAOuH,KAAOvH,EAAO1G,SACd0G,EAGT,GAAIykB,EAASnd,UAAYmd,EAASnd,WAAatH,EAAOsH,SAAU,CAS9D,IAAKqe,EAAgBlB,EAASnd,UAAW,CAEvC,IAAK,GADDtL,GAAOC,OAAOD,KAAKyoB,GACd1hB,EAAI,EAAGA,EAAI/G,EAAKtH,OAAQqO,IAAK,CACpC,GAAImc,GAAIljB,EAAK+G,EACb/C,GAAOkf,GAAKuF,EAASvF,GAGvB,MADAlf,GAAOuH,KAAOvH,EAAO1G,SACd0G,EAIT,GADAA,EAAOsH,SAAWmd,EAASnd,SACtBmd,EAASjd,MAASke,EAAiBjB,EAASnd,UAS/CtH,EAAOikB,SAAWQ,EAASR,aAT+B,CAE1D,IADA,GAAIyE,IAAWjE,EAASR,UAAY,IAAIvmB,MAAM,KACvCgrB,EAAQh0B,UAAY+vB,EAASjd,KAAOkhB,EAAQC,WAC9ClE,EAASjd,OAAMid,EAASjd,KAAO,IAC/Bid,EAAS7mB,WAAU6mB,EAAS7mB,SAAW,IACzB,KAAf8qB,EAAQ,IAAWA,EAAQd,QAAQ,IACnCc,EAAQh0B,OAAS,GAAGg0B,EAAQd,QAAQ,IACxC5nB,EAAOikB,SAAWyE,EAAQnV,KAAK,KAWjC,GAPAvT,EAAO+jB,OAASU,EAASV,OACzB/jB,EAAOgkB,MAAQS,EAAST,MACxBhkB,EAAOwH,KAAOid,EAASjd,MAAQ,GAC/BxH,EAAO6jB,KAAOY,EAASZ,KACvB7jB,EAAOpC,SAAW6mB,EAAS7mB,UAAY6mB,EAASjd,KAChDxH,EAAO8jB,KAAOW,EAASX,KAEnB9jB,EAAOikB,UAAYjkB,EAAO+jB,OAAQ,CACpC,GAAIne,GAAI5F,EAAOikB,UAAY,GACvBjwB,EAAIgM,EAAO+jB,QAAU,EACzB/jB,GAAOyH,KAAO7B,EAAI5R,EAIpB,MAFAgM,GAAO4jB,QAAU5jB,EAAO4jB,SAAWa,EAASb,QAC5C5jB,EAAOuH,KAAOvH,EAAO1G,SACd0G,EAGT,GAAI4oB,GAAe5oB,EAAOikB,UAA0C,MAA9BjkB,EAAOikB,SAASiE,OAAO,GACzDW,EACIpE,EAASjd,MACTid,EAASR,UAA4C,MAAhCQ,EAASR,SAASiE,OAAO,GAElDY,EAAcD,GAAYD,GACX5oB,EAAOwH,MAAQid,EAASR,SACvC8E,EAAgBD,EAChBE,EAAUhpB,EAAOikB,UAAYjkB,EAAOikB,SAASvmB,MAAM,SACnDgrB,EAAUjE,EAASR,UAAYQ,EAASR,SAASvmB,MAAM,SACvDurB,EAAYjpB,EAAOsH,WAAaqe,EAAgB3lB,EAAOsH,SA2B3D,IApBI2hB,IACFjpB,EAAOpC,SAAW,GAClBoC,EAAO8jB,KAAO,KACV9jB,EAAOwH,OACU,KAAfwhB,EAAQ,GAAWA,EAAQ,GAAKhpB,EAAOwH,KACtCwhB,EAAQpB,QAAQ5nB,EAAOwH,OAE9BxH,EAAOwH,KAAO,GACVid,EAASnd,WACXmd,EAAS7mB,SAAW,KACpB6mB,EAASX,KAAO,KACZW,EAASjd,OACQ,KAAfkhB,EAAQ,GAAWA,EAAQ,GAAKjE,EAASjd,KACxCkhB,EAAQd,QAAQnD,EAASjd,OAEhCid,EAASjd,KAAO,MAElBshB,EAAaA,IAA8B,KAAfJ,EAAQ,IAA4B,KAAfM,EAAQ,KAGvDH,EAEF7oB,EAAOwH,KAAQid,EAASjd,MAA0B,KAAlBid,EAASjd,KAC3Bid,EAASjd,KAAOxH,EAAOwH,KACrCxH,EAAOpC,SAAY6mB,EAAS7mB,UAAkC,KAAtB6mB,EAAS7mB,SAC/B6mB,EAAS7mB,SAAWoC,EAAOpC,SAC7CoC,EAAO+jB,OAASU,EAASV,OACzB/jB,EAAOgkB,MAAQS,EAAST,MACxBgF,EAAUN,MAEL,IAAIA,EAAQh0B,OAGZs0B,IAASA,MACdA,EAAQ3Y,MACR2Y,EAAUA,EAAQhgB,OAAO0f,GACzB1oB,EAAO+jB,OAASU,EAASV,OACzB/jB,EAAOgkB,MAAQS,EAAST,UACnB,KAAKxuB,EAAK0zB,kBAAkBzE,EAASV,QAAS,CAInD,GAAIkF,EAAW,CACbjpB,EAAOpC,SAAWoC,EAAOwH,KAAOwhB,EAAQL,OAIxC,IAAIQ,MAAanpB,EAAOwH,MAAQxH,EAAOwH,KAAKqb,QAAQ,KAAO,IAC1C7iB,EAAOwH,KAAK9J,MAAM,IAC/ByrB,KACFnpB,EAAO6jB,KAAOsF,EAAWR,QACzB3oB,EAAOwH,KAAOxH,EAAOpC,SAAWurB,EAAWR,SAW/C,MARA3oB,GAAO+jB,OAASU,EAASV,OACzB/jB,EAAOgkB,MAAQS,EAAST,MAEnBxuB,EAAK4zB,OAAOppB,EAAOikB,WAAczuB,EAAK4zB,OAAOppB,EAAO+jB,UACvD/jB,EAAOyH,MAAQzH,EAAOikB,SAAWjkB,EAAOikB,SAAW,KACpCjkB,EAAO+jB,OAAS/jB,EAAO+jB,OAAS,KAEjD/jB,EAAOuH,KAAOvH,EAAO1G,SACd0G,EAGT,IAAKgpB,EAAQt0B,OAWX,MARAsL,GAAOikB,SAAW,KAGhBjkB,EAAOyH,KADLzH,EAAO+jB,OACK,IAAM/jB,EAAO+jB,OAEb,KAEhB/jB,EAAOuH,KAAOvH,EAAO1G,SACd0G,CAcT,KAAK,GARDqpB,GAAOL,EAAQxiB,OAAM,GAAI,GACzB8iB,GACCtpB,EAAOwH,MAAQid,EAASjd,MAAQwhB,EAAQt0B,OAAS,KACxC,MAAT20B,GAAyB,OAATA,IAA2B,KAATA,EAInCnc,EAAK,EACA7Y,EAAI20B,EAAQt0B,OAAQL,GAAK,EAAGA,IACnCg1B,EAAOL,EAAQ30B,GACF,MAATg1B,EACFL,EAAQjkB,OAAO1Q,EAAG,GACA,OAATg1B,GACTL,EAAQjkB,OAAO1Q,EAAG,GAClB6Y,KACSA,IACT8b,EAAQjkB,OAAO1Q,EAAG,GAClB6Y,IAKJ,KAAK4b,IAAeC,EAClB,KAAO7b,IAAMA,EACX8b,EAAQpB,QAAQ,OAIhBkB,GAA6B,KAAfE,EAAQ,IACpBA,EAAQ,IAA+B,MAAzBA,EAAQ,GAAGd,OAAO,IACpCc,EAAQpB,QAAQ,IAGd0B,GAAsD,MAAjCN,EAAQzV,KAAK,KAAKuP,QAAO,IAChDkG,EAAQlgB,KAAK,GAGf,IAAIygB,GAA4B,KAAfP,EAAQ,IACpBA,EAAQ,IAA+B,MAAzBA,EAAQ,GAAGd,OAAO,EAGrC,IAAIe,EAAW,CACbjpB,EAAOpC,SAAWoC,EAAOwH,KAAO+hB,EAAa,GACbP,EAAQt0B,OAASs0B,EAAQL,QAAU,EAInE,IAAIQ,MAAanpB,EAAOwH,MAAQxH,EAAOwH,KAAKqb,QAAQ,KAAO,IAC1C7iB,EAAOwH,KAAK9J,MAAM,IAC/ByrB,KACFnpB,EAAO6jB,KAAOsF,EAAWR,QACzB3oB,EAAOwH,KAAOxH,EAAOpC,SAAWurB,EAAWR,SAyB/C,MArBAG,GAAaA,GAAe9oB,EAAOwH,MAAQwhB,EAAQt0B,OAE/Co0B,IAAeS,GACjBP,EAAQpB,QAAQ,IAGboB,EAAQt0B,OAIXsL,EAAOikB,SAAW+E,EAAQzV,KAAK,MAH/BvT,EAAOikB,SAAW,KAClBjkB,EAAOyH,KAAO,MAMXjS,EAAK4zB,OAAOppB,EAAOikB,WAAczuB,EAAK4zB,OAAOppB,EAAO+jB,UACvD/jB,EAAOyH,MAAQzH,EAAOikB,SAAWjkB,EAAOikB,SAAW,KACpCjkB,EAAO+jB,OAAS/jB,EAAO+jB,OAAS,KAEjD/jB,EAAO6jB,KAAOY,EAASZ,MAAQ7jB,EAAO6jB,KACtC7jB,EAAO4jB,QAAU5jB,EAAO4jB,SAAWa,EAASb,QAC5C5jB,EAAOuH,KAAOvH,EAAO1G,SACd0G,GAGT2jB,EAAIjrB,UAAU2uB,UAAY,WACxB,GAAI7f,GAAO9T,KAAK8T,KACZsc,EAAOe,EAAYkC,KAAKvf,EACxBsc,KACFA,EAAOA,EAAK,GACC,MAATA,IACFpwB,KAAKowB,KAAOA,EAAKhB,OAAO,IAE1Btb,EAAOA,EAAKsb,OAAO,EAAGtb,EAAK9S,OAASovB,EAAKpvB,SAEvC8S,IAAM9T,KAAKkK,SAAW4J,MAGzB/H,SAAS,GAAG+hB,SAAW,GAAG8E,YAAc,KAAKkD,IAAI,SAASp1B,EAAQjB,EAAOD,GAC5E,YAEAC,GAAOD,SACLqxB,SAAU,SAASkF,GACjB,MAAuB,gBAAV,IAEfpF,SAAU,SAASoF,GACjB,MAAuB,gBAAV,IAA8B,OAARA,GAErCL,OAAQ,SAASK,GACf,MAAe,QAARA,GAETP,kBAAmB,SAASO,GAC1B,MAAc,OAAPA,SAILC,IAAI,SAASt1B,EAAQjB,EAAOD,GA2ClC,QAASgP,GAAGynB,GACV,GAAIC,GAAMl2B,KACNm2B,EAAOrjB,EAAM/R,KAAKyL,UAAW,EAKjC,OAAO,IAAI4pB,SAAQ,SAAS9oB,EAAS+oB,GAYnC,QAASC,GAAYnrB,GACnB,GAAIorB,EACJ,KACEA,EAAMN,EAAIO,KAAKrrB,GACf,MAAOjL,GACP,MAAOm2B,GAAOn2B,GAEhBs2B,EAAKD,GASP,QAASE,GAAWjzB,GAClB,GAAI+yB,EACJ,KACEA,EAAMN,EAAIS,MAAMlzB,GAChB,MAAOtD,GACP,MAAOm2B,GAAOn2B,GAEhBs2B,EAAKD,GAYP,QAASC,GAAKD,GACZ,GAAIA,EAAII,KAAM,MAAOrpB,GAAQipB,EAAIpxB,MACjC,IAAIA,GAAQyxB,EAAU71B,KAAKm1B,EAAKK,EAAIpxB,MACpC,OAAIA,IAAS0xB,EAAU1xB,GAAeA,EAAMqgB,KAAK8Q,EAAaG,GACvDA,EAAW,GAAI5D,WAAU,8GACe1E,OAAOoI,EAAIpxB,OAAS,MAlDrE,MADmB,kBAAR8wB,KAAoBA,EAAMA,EAAI1pB,MAAM2pB,EAAKC,IAC/CF,GAA2B,kBAAbA,GAAIO,SAEvBF,KAFmDhpB,EAAQ2oB,KA+D/D,QAASW,GAAUjhB,GACjB,MAAKA,GACDkhB,EAAUlhB,GAAaA,EACvBmhB,EAAoBnhB,IAAQohB,EAAYphB,GAAanH,EAAGzN,KAAKf,KAAM2V,GACnE,kBAAqBA,GAAYqhB,EAAej2B,KAAKf,KAAM2V,GAC3DxN,MAAMC,QAAQuN,GAAashB,EAAel2B,KAAKf,KAAM2V,GACrDgb,EAAShb,GAAauhB,EAAgBn2B,KAAKf,KAAM2V,GAC9CA,EANUA,EAiBnB,QAASqhB,GAAe9M,GACtB,GAAIgM,GAAMl2B,IACV,OAAO,IAAIo2B,SAAQ,SAAU9oB,EAAS+oB,GACpCnM,EAAGnpB,KAAKm1B,EAAK,SAAU1yB,EAAK2H,GAC1B,MAAI3H,GAAY6yB,EAAO7yB,IACnBgJ,UAAUxL,OAAS,IAAGmK,EAAM2H,EAAM/R,KAAKyL,UAAW,QACtDc,GAAQnC,QAcd,QAAS8rB,GAAethB,GACtB,MAAOygB,SAAQphB,IAAIW,EAAIR,IAAIyhB,EAAW52B,OAYxC,QAASk3B,GAAgBvhB,GAcvB,QAASwhB,GAAMC,EAASlyB,GAEtBmyB,EAAQnyB,GAAOsD,OACfzF,EAASqS,KAAKgiB,EAAQ5R,KAAK,SAAUra,GACnCksB,EAAQnyB,GAAOiG,KAdnB,IAAK,GAHDksB,GAAU,GAAI1hB,GAAIyE,YAClB9R,EAAOC,OAAOD,KAAKqN,GACnB5S,KACKpC,EAAI,EAAGA,EAAI2H,EAAKtH,OAAQL,IAAK,CACpC,GAAIuE,GAAMoD,EAAK3H,GACXy2B,EAAUR,EAAU71B,KAAKf,KAAM2V,EAAIzQ,GACnCkyB,IAAWP,EAAUO,GAAUD,EAAMC,EAASlyB,GAC7CmyB,EAAQnyB,GAAOyQ,EAAIzQ,GAE1B,MAAOkxB,SAAQphB,IAAIjS,GAAUyiB,KAAK,WAChC,MAAO6R,KAoBX,QAASR,GAAUlhB,GACjB,MAAO,kBAAqBA,GAAI6P,KAWlC,QAASuR,GAAYphB,GACnB,MAAO,kBAAqBA,GAAI6gB,MAAQ,kBAAqB7gB,GAAI+gB,MAUnE,QAASI,GAAoBnhB,GAC3B,GAAIyE,GAAczE,EAAIyE,WACtB,SAAKA,IACD,sBAAwBA,EAAYsV,MAAQ,sBAAwBtV,EAAYkd,aAC7EP,EAAY3c,EAAYpV,YAWjC,QAAS2rB,GAAS4G,GAChB,MAAOhvB,SAAUgvB,EAAInd,YAtOvB,GAAItH,GAAQ3K,MAAMnD,UAAU8N,KAM5BrT,GAAOD,QAAUgP,EAAY,QAAIA,EAAGA,GAAKA,EAczCA,EAAGgpB,KAAO,SAAUtN,GAGlB,QAASuN,KACP,MAAOjpB,GAAGzN,KAAKf,KAAMkqB,EAAG3d,MAAMvM,KAAMwM,YAFtC,MADAirB,GAAcC,sBAAwBxN,EAC/BuN,QAmNHE,IAAI,SAASj3B,EAAQjB,EAAOD,GAClC,GAAIo4B,GAAuB,mBAAT1Q,MAAuBA,KAAOxmB,EAAQ,UAExDjB,GAAOD,QAAU,SAAUmW,EAAKxU,GACvBA,IAAMA,MACS,kBAATA,KAAqBA,GAAS02B,IAAK12B,GAC9C,IAAI22B,GAAQ32B,EAAK22B,OAAS,EACL,iBAAVA,KAAoBA,EAAQ3vB,MAAM2vB,EAAM,GAAGjY,KAAK,KAC3D,IAAIkY,GAAiC,iBAAhB52B,GAAK42B,QAAwB52B,EAAK42B,OACnDC,EAAW72B,EAAK62B,UAAY,SAAS9yB,EAAKC,GAAS,MAAOA,IAE1D0yB,EAAM12B,EAAK02B,KAAO,SAAWt4B,GAC7B,MAAO,UAAU04B,GACb,MAAO,UAAUx3B,EAAGwH,GAChB,GAAIiwB,IAAShzB,IAAKzE,EAAG0E,MAAO8yB,EAAKx3B,IAC7B03B,GAASjzB,IAAK+C,EAAG9C,MAAO8yB,EAAKhwB,GACjC,OAAO1I,GAAE24B,EAAMC,MAGxBh3B,EAAK02B,KAEJO,IACJ,OAAO,SAAUjR,GAAWkR,EAAQnzB,EAAK+yB,EAAMxd,GAC3C,GAAI6d,GAASR,EAAS,KAAO,GAAI3vB,OAAMsS,EAAQ,GAAGoF,KAAKiY,GAAU,GAC7DS,EAAiBT,EAAQ,KAAO,GAQpC,IANIG,GAAQA,EAAKO,QAAiC,kBAAhBP,GAAKO,SACnCP,EAAOA,EAAKO,UAGhBP,EAAOD,EAASj3B,KAAKs3B,EAAQnzB,EAAK+yB,GAErBzvB,SAATyvB,EAAJ,CAGA,GAAoB,gBAATA,IAA8B,OAATA,EAC5B,MAAOL,GAAKzQ,UAAU8Q,EAE1B,IAAI7vB,EAAQ6vB,GAAO,CAEf,IAAK,GADDpgB,MACKlX,EAAI,EAAGA,EAAIs3B,EAAKj3B,OAAQL,IAAK,CAClC,GAAI2S,GAAO6T,EAAU8Q,EAAMt3B,EAAGs3B,EAAKt3B,GAAI8Z,EAAM,IAAMmd,EAAKzQ,UAAU,KAClEtP,GAAIzC,KAAKkjB,EAASR,EAAQxkB,GAE9B,MAAO,IAAMuE,EAAIgI,KAAK,KAAOyY,EAAS,IAGtC,GAAIF,EAAKjJ,QAAQ8I,MAAU,EAAI,CAC3B,GAAIF,EAAQ,MAAOH,GAAKzQ,UAAU,YAClC,MAAM,IAAI0L,WAAU,yCAEnBuF,EAAKhjB,KAAK6iB,EAIf,KAAK,GAFD3vB,GAAOqnB,EAAWsI,GAAMQ,KAAKZ,GAAOA,EAAII,IACxCpgB,KACKlX,EAAI,EAAGA,EAAI2H,EAAKtH,OAAQL,IAAK,CAClC,GAAIuE,GAAMoD,EAAK3H,GACXwE,EAAQgiB,EAAU8Q,EAAM/yB,EAAK+yB,EAAK/yB,GAAMuV,EAAM,EAElD,IAAItV,EAAJ,CAEA,GAAIuzB,GAAWd,EAAKzQ,UAAUjiB,GACxBqzB,EACApzB,CAEN0S,GAAIzC,KAAKkjB,EAASR,EAAQY,IAG9B,MADAN,GAAK/mB,OAAO+mB,EAAKjJ,QAAQ8I,GAAO,GACzB,IAAMpgB,EAAIgI,KAAK,KAAOyY,EAAS,OAEzCK,GAAIhjB,GAAO,GAAIA,EAAK,GAG7B,IAAIvN,GAAUD,MAAMC,SAAW,SAAU6mB,GACrC,MAA+B,sBAArBK,SAASvuB,KAAKkuB,IAGxBU,EAAapnB,OAAOD,MAAQ,SAAUqN,GACtC,GAAIijB,GAAMrwB,OAAOvD,UAAUupB,gBAAkB,WAAc,OAAO,GAC9DjmB,IACJ,KAAK,GAAIpD,KAAOyQ,GACRijB,EAAI73B,KAAK4U,EAAKzQ,IAAMoD,EAAK8M,KAAKlQ,EAEtC,OAAOoD,MAGRuwB,QAAU,KAAKC,IAAI,SAASp4B,EAAQjB,EAAOD,GAC9CA,EAAQ2S,MAAQzR,EAAQ,eACxBlB,EAAQ2nB,UAAYzmB,EAAQ,qBAEzBq4B,cAAc,GAAGC,kBAAkB,KAAKC,IAAI,SAASv4B,EAAQjB,EAAOD,GACvE,GAAI05B,GACAC,EAWAC,EA4IAj0B,EAtJAk0B,GACIC,IAAM,IACNC,KAAM,KACNC,IAAM,IACNvxB,EAAM,KACN1I,EAAM,KACNa,EAAM,KACNC,EAAM,KACNF,EAAM,MAIVkO,EAAQ,SAAU2e,GAEd,MACI0C,KAAS,cACTjf,QAASuc,EACTkM,GAASA,EACTE,KAASA,IAIjB5C,EAAO,SAAU3lB,GAWb,MATIA,IAAKA,IAAMsoB,GACX9qB,EAAM,aAAewC,EAAI,iBAAmBsoB,EAAK,KAMrDA,EAAKC,EAAK5E,OAAO0E,GACjBA,GAAM,EACCC,GAGXpiB,EAAS,WAEL,GAAIA,GACAqT,EAAS,EAMb,KAJW,MAAP+O,IACA/O,EAAS,IACToM,EAAK,MAEF2C,GAAM,KAAOA,GAAM,KACtB/O,GAAU+O,EACV3C,GAEJ,IAAW,MAAP2C,EAEA,IADA/O,GAAU,IACHoM,KAAU2C,GAAM,KAAOA,GAAM,KAChC/O,GAAU+O,CAGlB,IAAW,MAAPA,GAAqB,MAAPA,EAOd,IANA/O,GAAU+O,EACV3C,IACW,MAAP2C,GAAqB,MAAPA,IACd/O,GAAU+O,EACV3C,KAEG2C,GAAM,KAAOA,GAAM,KACtB/O,GAAU+O,EACV3C,GAIR,OADAzf,IAAUqT,EACLqF,SAAS1Y,GAGHA,MAFP1I,GAAM,eAMd+b,EAAS,WAEL,GAAIqP,GACA94B,EAEA+4B,EADAtP,EAAS,EAIb,IAAW,MAAP+O,EACA,KAAO3C,KAAQ,CACX,GAAW,MAAP2C,EAEA,MADA3C,KACOpM,CACJ,IAAW,OAAP+O,EAEP,GADA3C,IACW,MAAP2C,EAAY,CAEZ,IADAO,EAAQ,EACH/4B,EAAI,EAAGA,EAAI,IACZ84B,EAAME,SAASnD,IAAQ,IAClB/G,SAASgK,IAFC94B,GAAK,EAKpB+4B,EAAgB,GAARA,EAAaD,CAEzBrP,IAAU+D,OAAOC,aAAasL,OAC3B,CAAA,GAA2B,gBAAhBL,GAAQF,GAGtB,KAFA/O,IAAUiP,EAAQF,OAKtB/O,IAAU+O,EAItB9qB,EAAM,eAGVurB,EAAQ,WAIJ,KAAOT,GAAMA,GAAM,KACf3C,KAIRqD,EAAO,WAIH,OAAQV,GACR,IAAK,IAKD,MAJA3C,GAAK,KACLA,EAAK,KACLA,EAAK,KACLA,EAAK,MACE,CACX,KAAK,IAMD,MALAA,GAAK,KACLA,EAAK,KACLA,EAAK,KACLA,EAAK,KACLA,EAAK,MACE,CACX,KAAK,IAKD,MAJAA,GAAK,KACLA,EAAK,KACLA,EAAK,KACLA,EAAK,KACE,KAEXnoB,EAAM,eAAiB8qB,EAAK,MAKhCviB,EAAQ,WAIJ,GAAIA,KAEJ,IAAW,MAAPuiB,EAAY,CAGZ,GAFA3C,EAAK,KACLoD,IACW,MAAPT,EAEA,MADA3C,GAAK,KACE5f,CAEX,MAAOuiB,GAAI,CAGP,GAFAviB,EAAMxB,KAAKjQ,KACXy0B,IACW,MAAPT,EAEA,MADA3C,GAAK,KACE5f,CAEX4f,GAAK,KACLoD,KAGRvrB,EAAM,cAGVwI,EAAS,WAIL,GAAI3R,GACA2R,IAEJ,IAAW,MAAPsiB,EAAY,CAGZ,GAFA3C,EAAK,KACLoD,IACW,MAAPT,EAEA,MADA3C,GAAK,KACE3f,CAEX,MAAOsiB,GAAI,CASP,GARAj0B,EAAMklB,IACNwP,IACApD,EAAK,KACDjuB,OAAOgmB,eAAextB,KAAK8V,EAAQ3R,IACnCmJ,EAAM,kBAAoBnJ,EAAM,KAEpC2R,EAAO3R,GAAOC,IACdy0B,IACW,MAAPT,EAEA,MADA3C,GAAK,KACE3f,CAEX2f,GAAK,KACLoD,KAGRvrB,EAAM,cAGdlJ,GAAQ,WAMJ,OADAy0B,IACQT,GACR,IAAK,IACD,MAAOtiB,IACX,KAAK,IACD,MAAOD,IACX,KAAK,IACD,MAAOwT,IACX,KAAK,IACD,MAAOrT,IACX,SACI,MAAOoiB,IAAM,KAAOA,GAAM,IAAMpiB,IAAW8iB,MAOnDp6B,EAAOD,QAAU,SAAUqP,EAAQirB,GAC/B,GAAIxtB,EAiBJ,OAfA8sB,GAAOvqB,EACPqqB,EAAK,EACLC,EAAK,IACL7sB,EAASnH,IACTy0B,IACIT,GACA9qB,EAAM,gBASgB,kBAAZyrB,GAA0B,QAASC,GAAKC,EAAQ90B,GAC1D,GAAIsmB,GAAGnc,EAAGlK,EAAQ60B,EAAO90B,EACzB,IAAIC,GAA0B,gBAAVA,GAChB,IAAKqmB,IAAKrmB,GACFoD,OAAOvD,UAAUupB,eAAextB,KAAKoE,EAAOqmB,KAC5Cnc,EAAI0qB,EAAK50B,EAAOqmB,GACNhjB,SAAN6G,EACAlK,EAAMqmB,GAAKnc,QAEJlK,GAAMqmB,GAK7B,OAAOsO,GAAQ/4B,KAAKi5B,EAAQ90B,EAAKC,KAClCwzB,GAAIrsB,GAAS,IAAOA,QAGrB2tB,IAAI,SAASv5B,EAAQjB,EAAOD,GAgBlC,QAAS06B,GAAM9P,GAOX,MADA+P,GAAUC,UAAY,EACfD,EAAU/vB,KAAKggB,GAAU,IAAMA,EAAOpW,QAAQmmB,EAAW,SAAU15B,GACtE,GAAIoQ,GAAIyY,EAAK7oB,EACb,OAAoB,gBAANoQ,GAAiBA,EAC3B,OAAS,OAASpQ,EAAEsV,WAAW,GAAGuZ,SAAS,KAAKxc,OAAM,KACzD,IAAM,IAAMsX,EAAS,IAG9B,QAASphB,GAAI9D,EAAK80B,GAEd,GAAIr5B,GACA6qB,EACAnc,EACArO,EAEAq5B,EADAC,EAAOC,EAEPp1B,EAAQ60B,EAAO90B,EAenB,QAZIC,GAA0B,gBAAVA,IACY,kBAAjBA,GAAMqzB,SACjBrzB,EAAQA,EAAMqzB,OAAOtzB,IAKN,kBAARs1B,KACPr1B,EAAQq1B,EAAIz5B,KAAKi5B,EAAQ90B,EAAKC,UAInBA,IACX,IAAK,SACD,MAAO+0B,GAAM/0B,EAEjB,KAAK,SAED,MAAOsqB,UAAStqB,GAASgpB,OAAOhpB,GAAS,MAE7C,KAAK,UACL,IAAK,OAID,MAAOgpB,QAAOhpB,EAElB,KAAK,SACD,IAAKA,EAAO,MAAO,MAKnB,IAJAo1B,GAAOjC,EACP+B,KAG+C,mBAA3C9xB,OAAOvD,UAAUsqB,SAAS/iB,MAAMpH,GAA6B,CAE7D,IADAnE,EAASmE,EAAMnE,OACVL,EAAI,EAAGA,EAAIK,EAAQL,GAAK,EACzB05B,EAAQ15B,GAAKqI,EAAIrI,EAAGwE,IAAU,MASlC,OAJAkK,GAAuB,IAAnBgrB,EAAQr5B,OAAe,KAAOu5B,EAC9B,MAAQA,EAAMF,EAAQxa,KAAK,MAAQ0a,GAAO,KAAOD,EAAO,IACxD,IAAMD,EAAQxa,KAAK,KAAO,IAC9B0a,EAAMD,EACCjrB,EAKX,GAAImrB,GAAsB,gBAARA,GAEd,IADAx5B,EAASw5B,EAAIx5B,OACRL,EAAI,EAAGA,EAAIK,EAAQL,GAAK,EACzB6qB,EAAIgP,EAAI75B,GACS,gBAAN6qB,KACPnc,EAAIrG,EAAIwiB,EAAGrmB,GACPkK,GACAgrB,EAAQjlB,KAAK8kB,EAAM1O,IAAM+O,EAAM,KAAO,KAAOlrB,QAOzD,KAAKmc,IAAKrmB,GACFoD,OAAOvD,UAAUupB,eAAextB,KAAKoE,EAAOqmB,KAC5Cnc,EAAIrG,EAAIwiB,EAAGrmB,GACPkK,GACAgrB,EAAQjlB,KAAK8kB,EAAM1O,IAAM+O,EAAM,KAAO,KAAOlrB,GAajE,OAJAA,GAAuB,IAAnBgrB,EAAQr5B,OAAe,KAAOu5B,EAC9B,MAAQA,EAAMF,EAAQxa,KAAK,MAAQ0a,GAAO,KAAOD,EAAO,IACxD,IAAMD,EAAQxa,KAAK,KAAO,IAC9B0a,EAAMD,EACCjrB,GAzHf,GAEIkrB,GACAjC,EAUAkC,EAZAL,EAAY,2HAGZ7Q,GACImR,KAAM,MACNC,KAAM,MACNC,KAAM,MACNC,KAAM,MACNC,KAAM,MACNvB,IAAM,MACNC,KAAM,OAkHd95B,GAAOD,QAAU,SAAU2F,EAAO6yB,EAAUF,GACxC,GAAIn3B,EAMJ,IALA45B,EAAM,GACNjC,EAAS,GAIY,gBAAVR,GACP,IAAKn3B,EAAI,EAAGA,EAAIm3B,EAAOn3B,GAAK,EACxB23B,GAAU,QAIQ,gBAAVR,KACZQ,EAASR,EAMb,IADA0C,EAAMxC,EACFA,GAAgC,kBAAbA,KACC,gBAAbA,IAAoD,gBAApBA,GAASh3B,QAChD,KAAM,IAAIJ,OAAM,iBAKpB,OAAOoI,GAAI,IAAK2vB,GAAIxzB,UAGlB8U,KAAO,SAASvZ,EAAQjB,EAAOD,GACrC,YAsBA,SAASs7B,GAAuB9xB,GAC9B,MAAO+xB,GAAkB3wB,KAAKpB,GAWhC,QAAS/I,KAAIkB,GAiDX,QAASiD,GAAS42B,EAAc5kB,GAC9B,GAAI/G,EACJ,IAA2B,gBAAhB2rB,IAET,GADA3rB,EAAI4rB,EAAUD,IACT3rB,EAAG,KAAM,IAAIzO,OAAM,8BAAgCo6B,EAAe,SAClE,CACL,GAAI12B,GAAYC,EAAWy2B,EAC3B3rB,GAAI/K,EAAUF,UAAY4N,EAAS1N,GAGrC,GAAIkM,GAAQnB,EAAE+G,EACd,OAAI/G,GAAEvC,UAAW,EACY,KAApB/M,EAAK8B,MAAMP,MAAekN,EAAGgC,GAASA,GAC/CzQ,EAAK0M,OAAS4C,EAAE5C,OACT+D,GAUT,QAASjO,GAAQW,EAAQg4B,GACvB,GAAI52B,GAAYC,EAAWrB,EAAQsF,OAAW0yB,EAC9C,OAAO52B,GAAUF,UAAY4N,EAAS1N,GAWxC,QAAST,GAAUX,EAAQgC,EAAKi2B,EAAiBD,GAC/C,GAAI/yB,MAAMC,QAAQlF,GAChB,IAAK,GAAIvC,GAAE,EAAGA,EAAEuC,EAAOlC,OAAQL,IAAKkD,EAAUX,EAAOvC,GAAI6H,OAAW2yB,EAAiBD,OAIvFh2B,GAAMoI,EAAQkF,YAAYtN,GAAOhC,EAAOqP,IACxC6oB,EAAYl2B,GACZnF,EAAK6D,SAASsB,GAAOX,EAAWrB,EAAQi4B,EAAiBD,GAAO,GAWlE,QAAS3R,GAAcrmB,EAAQgC,EAAKm2B,GAClCx3B,EAAUX,EAAQgC,EAAKm2B,GAAgB,GAUzC,QAAS/qB,GAAepN,EAAQo4B,GAC9B,GAAI1gB,GAAU1X,EAAO0X,SAAW7a,EAAK8B,MAAM05B,aAAeA,IACtDC,EAAmBz7B,EAAKkR,SAAS5G,GACrCtK,GAAKkR,SAAS5G,IAAiC,kBAApBmxB,GACLV,EACAC,CACtB,IAAIvqB,EACJ,KAAMA,EAAQpM,EAASwW,EAAS1X,GAChC,QAAUnD,EAAKkR,SAAS5G,IAAMmxB,EAC9B,IAAKhrB,GAAS8qB,EAAiB,CAC7B,GAAI7qB,GAAU,sBAAwBC,GACtC,IAAiC,OAA7B3Q,EAAK8B,MAAMyO,eACV,KAAM,IAAI1P,OAAM6P,EADmB7N,SAAQyL,MAAMoC,GAGxD,MAAOD,GAIT,QAAS+qB,KACP,GAAIjS,GAAOvpB,EAAK8B,MAAMynB,IAMtB,OALAvpB,GAAK8B,MAAM05B,YAA6B,gBAARjS,GACJA,EAAK/W,IAAM+W,EACXvpB,EAAK8B,MAAMuZ,GACTA,EAAGoO,eACHA,EAUhC,QAASyR,GAAUQ,GACjB,GAAIn3B,GAAYo3B,EAAcD,EAC9B,cAAen3B,IACb,IAAK,SAAU,MAAOA,GAAUF,UAAY4N,EAAS1N,EACrD,KAAK,SAAU,MAAO22B,GAAU32B,EAChC,KAAK,YAAa,MAAOq3B,GAAmBF,IAKhD,QAASE,GAAmBh4B,GAC1B,GAAIwH,GAAMmC,EAAQpK,OAAOnC,KAAKhB,GAAQmD,WAAcS,EACpD,IAAIwH,EAAK,CACP,GAAIjI,GAASiI,EAAIjI,OACb+I,EAAOd,EAAIc,KACXE,EAAShB,EAAIgB,OACbkD,EAAIusB,EAAc76B,KAAKhB,EAAMmD,EAAQ+I,EAAMzD,OAAW2D,EAS1D,OARApM,GAAK87B,WAAWl4B,GAAO,GAAIoO,IACzBpO,IAAKA,EACLm4B,UAAU,EACV54B,OAAQA,EACR+I,KAAMA,EACNE,OAAQA,EACR/H,SAAUiL,IAELA,GAKX,QAASqsB,GAAcD,GAErB,MADAA,GAASnuB,EAAQkF,YAAYipB,GACtB17B,EAAK6D,SAAS63B,IAAW17B,EAAK2D,MAAM+3B,IAAW17B,EAAK87B,WAAWJ,GAWxE,QAASM,GAAaf,GACpB,GAAIA,YAAwBvwB,QAG1B,MAFAuxB,GAAkBj8B,EAAK6D,SAAUo3B,OACjCgB,GAAkBj8B,EAAK2D,MAAOs3B,EAGhC,cAAeA,IACb,IAAK,YAIH,MAHAgB,GAAkBj8B,EAAK6D,UACvBo4B,EAAkBj8B,EAAK2D,WACvB3D,GAAKgF,OAAOM,OAEd,KAAK,SACH,GAAIf,GAAYo3B,EAAcV,EAI9B,OAHI12B,IAAWvE,EAAKgF,OAAOK,IAAId,EAAU23B,eAClCl8B,GAAK6D,SAASo3B,cACdj7B,GAAK2D,MAAMs3B,EAEpB,KAAK,SACH,GAAIiB,GAAUhsB,EAAgB+qB,EAC9Bj7B,GAAKgF,OAAOK,IAAI62B,EAChB,IAAI1pB,GAAKyoB,EAAazoB,EAClBA,KACFA,EAAKjF,EAAQkF,YAAYD,SAClBxS,GAAK6D,SAAS2O,SACdxS,GAAK2D,MAAM6O,KAM1B,QAASypB,GAAkBE,EAAS1xB,GAClC,IAAK,GAAIixB,KAAUS,GAAS,CAC1B,GAAI53B,GAAY43B,EAAQT,EACnBn3B,GAAUglB,MAAU9e,IAASA,EAAMJ,KAAKqxB,KAC3C17B,EAAKgF,OAAOK,IAAId,EAAU23B,eACnBC,GAAQT,KAMrB,QAASl3B,GAAWrB,EAAQm4B,EAAgB/R,EAAM6S,GAChD,GAAqB,gBAAVj5B,GAAoB,KAAM,IAAItC,OAAM,0BAC/C,IAAIq7B,GAAUhsB,EAAgB/M,GAC1Bk5B,EAASr8B,EAAKgF,OAAOvD,IAAIy6B,EAC7B,IAAIG,EAAQ,MAAOA,EAEnBD,GAAkBA,GAAmBp8B,EAAK8B,MAAMw6B,iBAAkB,CAElE,IAAI9pB,GAAKjF,EAAQkF,YAAYtP,EAAOqP,GAChCA,IAAM4pB,GAAiBf,EAAY7oB,EAEvC,IACI+pB,GADAC,EAAex8B,EAAK8B,MAAMyO,kBAAmB,IAAU+qB,CAEvDkB,MAAkBD,EAAgBp5B,EAAOqP,IAAMrP,EAAOqP,IAAMrP,EAAO0X,UACrEtK,EAAepN,GAAQ,EAEzB,IAAIgJ,GAAYoB,EAAQgH,IAAIvT,KAAKhB,EAAMmD,GAEnCoB,EAAY,GAAIyN,IAClBQ,GAAIA,EACJrP,OAAQA,EACRgJ,UAAWA,EACX+vB,QAASA,EACT3S,KAAMA,GAQR,OALa,KAAT/W,EAAG,IAAa4pB,IAAiBp8B,EAAK2D,MAAM6O,GAAMjO,GACtDvE,EAAKgF,OAAOE,IAAIg3B,EAAS33B,GAErBi4B,GAAgBD,GAAehsB,EAAepN,GAAQ,GAEnDoB,EAIT,QAAS0N,GAAS1N,EAAW2H,GAgC3B,QAASG,KACP,GAAIowB,GAAYl4B,EAAUF,SACtBkI,EAASkwB,EAAUjwB,MAAM,KAAMC,UAEnC,OADAJ,GAAaK,OAAS+vB,EAAU/vB,OACzBH,EAnCT,GAAIhI,EAAU0M,UAOZ,MANA1M,GAAUF,SAAWgI,EACrBA,EAAalJ,OAASoB,EAAUpB,OAChCkJ,EAAaK,OAAS,KACtBL,EAAaH,KAAOA,EAAOA,EAAOG,EAC9B9H,EAAUpB,OAAO4J,UAAW,IAC9BV,EAAaU,QAAS,GACjBV,CAET9H,GAAU0M,WAAY,CAEtB,IAAIyrB,EACAn4B,GAAUglB,OACZmT,EAAc18B,EAAK8B,MACnB9B,EAAK8B,MAAQ9B,EAAK28B,UAGpB,IAAIrtB,EACJ,KAAMA,EAAIusB,EAAc76B,KAAKhB,EAAMuE,EAAUpB,OAAQ+I,EAAM3H,EAAU4H,WACrE,QACE5H,EAAU0M,WAAY,EAClB1M,EAAUglB,OAAMvpB,EAAK8B,MAAQ46B,GAOnC,MAJAn4B,GAAUF,SAAWiL,EACrB/K,EAAUqK,KAAOU,EAAEV,KACnBrK,EAAUsJ,OAASyB,EAAEzB,OACrBtJ,EAAU2H,KAAOoD,EAAEpD,KACZoD,EAkBT,QAASqB,GAAWjE,EAAQmiB,GAE1B,GADAniB,EAASA,GAAU1M,EAAK0M,QACnBA,EAAQ,MAAO,WACpBmiB,GAAUA,KAKV,KAAK,GAJD+N,GAAkCn0B,SAAtBomB,EAAQ+N,UAA0B,KAAO/N,EAAQ+N,UAC7DllB,EAA8BjP,SAApBomB,EAAQnX,QAAwB,OAASmX,EAAQnX,QAE3D2hB,EAAO,GACFz4B,EAAE,EAAGA,EAAE8L,EAAOzL,OAAQL,IAAK,CAClC,GAAIT,GAAIuM,EAAO9L,EACXT,KAAGk5B,GAAQ3hB,EAAUvX,EAAE08B,SAAW,IAAM18B,EAAEuQ,QAAUksB,GAE1D,MAAOvD,GAAKtmB,MAAM,GAAI6pB,EAAU37B,QASlC,QAAS67B,GAAUnN,EAAM9pB,GACF,gBAAVA,KAAoBA,EAAS,GAAI6E,QAAO7E,IACnD7F,EAAKkR,SAASye,GAAQ9pB,EAIxB,QAASk3B,KACP,GAAI/8B,EAAK8B,MAAMynB,QAAS,EAAO,CAC7B,GAAI7B,GAAa/mB,EAAQ,mCACzB6oB,GAAc9B,EAAY+B,GAAgB,GAC1CzpB,EAAK2D,MAAM,iCAAmC8lB,GAKlD,QAASuT,KACP,GAAIC,GAAcj9B,EAAK8B,MAAMq6B,OAC7B,IAAKc,EACL,GAAI70B,MAAMC,QAAQ40B,GAAcn5B,EAAUm5B,OACrC,KAAK,GAAI93B,KAAO83B,GAAan5B,EAAUm5B,EAAY93B,GAAMA,GAIhE,QAAS+3B,KACP,IAAK,GAAIvN,KAAQ3vB,GAAK8B,MAAM6G,QAAS,CACnC,GAAI9C,GAAS7F,EAAK8B,MAAM6G,QAAQgnB,EAChCmN,GAAUnN,EAAM9pB,IAKpB,QAASw1B,GAAY7oB,GACnB,GAAIxS,EAAK6D,SAAS2O,IAAOxS,EAAK2D,MAAM6O,GAClC,KAAM,IAAI3R,OAAM,0BAA4B2R,EAAK,oBAIrD,QAAS2qB,KAEP,IAAK,GADDC,GAAWr7B,EAAKC,KAAKhC,EAAK8B,OACrBlB,EAAE,EAAGA,EAAEy8B,EAAoBp8B,OAAQL,UACnCw8B,GAASC,EAAoBz8B,GACtC,OAAOw8B,GA1XT,KAAMn9B,eAAgBC,MAAM,MAAO,IAAIA,KAAIkB,EAC3C,IAAIpB,GAAOC,IAEXmB,GAAOnB,KAAK6B,MAAQC,EAAKC,KAAKZ,OAC9BnB,KAAK4D,YACL5D,KAAK0D,SACL1D,KAAK67B,cACL77B,KAAKiR,SAAWvI,EAAQvH,EAAKyE,QAC7B5F,KAAK+E,OAAS5D,EAAKk8B,OAAS,GAAIv4B,GAChC9E,KAAKiE,mBACLjE,KAAK+Q,iBACL/Q,KAAKqN,MAAQuH,IAIb5U,KAAKoE,SAAWA,EAChBpE,KAAKuC,QAAUA,EACfvC,KAAK6D,UAAYA,EACjB7D,KAAKupB,cAAgBA,EACrBvpB,KAAKsQ,eAAiBA,EACtBtQ,KAAKi7B,UAAYA,EACjBj7B,KAAK+7B,aAAeA,EACpB/7B,KAAK68B,UAAYA,EACjB78B,KAAK0Q,WAAaA,EAElB1Q,KAAKuE,WAAaA,EAClBvE,KAAKgS,SAAWA,EAEhB7Q,EAAKuhB,aAAevhB,EAAKuhB,cAAgBlP,EAAAA,GACrCrS,EAAKG,OAASH,EAAKI,YAAWD,EAAMkD,MAAMrD,GAC1CA,EAAKiN,YAAa,IAAMjN,EAAKiN,UAAakvB,YAAa,IACjC,YAAtBn8B,EAAKo8B,gBAA6Bp8B,EAAKye,wBAAyB,GACpE5f,KAAK08B,UAAYQ,IAEb/7B,EAAKuH,SAASu0B,IAClBH,IACI37B,EAAKia,IAAIA,EAAGsO,OAAO1pB,MACC,gBAAbmB,GAAKmoB,MAAkBC,EAAcpoB,EAAKmoB,MACrDyT,IAvEF,GAAInB,GAAgBl7B,EAAQ,aACxB4M,EAAU5M,EAAQ,qBAClBoE,EAAQpE,EAAQ,WAChBqR,EAAerR,EAAQ,wBACvBuP,EAAkBvP,EAAQ,yBAC1BgI,EAAUhI,EAAQ,qBAClBkU,EAAQlU,EAAQ,mBAChB0a,EAAK1a,EAAQ,QACboB,EAAOpB,EAAQ,kBACfY,EAAQZ,EAAQ,WAChB8N,EAAK9N,EAAQ,KAEjBjB,GAAOD,QAAUS,IAEjBA,IAAI+E,UAAU/B,aAAe3B,EAAMiB,QACnCtC,IAAI+E,UAAUmkB,WAAazoB,EAAQ,aACnCT,IAAIyO,gBAAkBhO,EAAQ,6BAE9B,IAAI8oB,GAAiB,yCACjBuR,EAAoB,4CAKpBqC,GAAwB,mBAAoB,cAAe,iBAuY5DI,UAAU,EAAEC,UAAU,EAAEC,YAAY,EAAEC,oBAAoB,EAAEC,oBAAoB,EAAEC,kBAAkB,EAAEC,uBAAuB,EAAEl5B,iBAAiB,GAAGm5B,6BAA6B,GAAGC,YAAY,GAAGC,mCAAmC,GAAGC,OAAO,GAAG1vB,GAAK,GAAGqD,wBAAwB,aAAa","file":"dist/ajv.min.js"} \ No newline at end of file
diff --git a/tools/eslint/node_modules/ajv/dist/nodent.min.js b/tools/eslint/node_modules/ajv/dist/nodent.min.js
new file mode 100644
index 0000000000..7368224b4f
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/dist/nodent.min.js
@@ -0,0 +1,8 @@
+/* nodent 2.6.10: NoDent - Asynchronous Javascript language extensions */
+require=function e(t,n,r){function i(o,a){if(!n[o]){if(!t[o]){var u="function"==typeof require&&require;if(!a&&u)return u(o,!0);if(s)return s(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){},{}],2:[function(e,t,n){(function(t){"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function i(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=o.prototype):(null===e&&(e=new o(t)),e.length=t),e}function o(e,t,n){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return a(this,e,t,n)}function a(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?f(e,t,n,r):"string"==typeof t?p(e,t,n):d(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function c(e,t,n,r){return u(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}function l(e,t){if(u(t),e=s(e,t<0?0:0|y(t)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!o.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|g(t,n);e=s(e,r);var i=e.write(t,n);return i!==r&&(e=e.slice(0,i)),e}function h(e,t){var n=t.length<0?0:0|y(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function f(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),o.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=o.prototype):e=h(e,t),e}function d(e,t){if(o.isBuffer(t)){var n=0|y(t.length);return e=s(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||Q(t.length)?s(e,0):h(e,t);if("Buffer"===t.type&&K(t.data))return h(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function y(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),o.alloc(+e)}function g(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return L(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function b(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function x(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if("number"==typeof t)return t=255&t,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,i){function s(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,a=e.length,u=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;c<a;c++)if(s(e,c)===s(t,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===u)return l*o}else l!==-1&&(c-=c-l),l=-1}else for(n+u>a&&(n=a-u),c=n;c>=0;c--){for(var p=!0,h=0;h<u;h++)if(s(e,c+h)!==s(t,h)){p=!1;break}if(p)return c}return-1}function E(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var s=t.length;if(s%2!==0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o<r;++o){var a=parseInt(t.substr(2*o,2),16);if(isNaN(a))return o;e[n+o]=a}return o}function S(e,t,n,r){return H(z(t,e.length-n),e,n,r)}function k(e,t,n,r){return H(Y(t),e,n,r)}function A(e,t,n,r){return k(e,t,n,r)}function _(e,t,n,r){return H(J(t),e,n,r)}function C(e,t,n,r){return H(G(t,e.length-n),e,n,r)}function L(e,t,n){return 0===t&&n===e.length?X.fromByteArray(e):X.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var s=e[i],o=null,a=s>239?4:s>223?3:s>191?2:1;if(i+a<=n){var u,c,l,p;switch(a){case 1:s<128&&(o=s);break;case 2:u=e[i+1],128===(192&u)&&(p=(31&s)<<6|63&u,p>127&&(o=p));break;case 3:u=e[i+1],c=e[i+2],128===(192&u)&&128===(192&c)&&(p=(15&s)<<12|(63&u)<<6|63&c,p>2047&&(p<55296||p>57343)&&(o=p));break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(p=(15&s)<<18|(63&u)<<12|(63&c)<<6|63&l,p>65535&&p<1114112&&(o=p))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return R(r)}function R(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=ee));return n}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function N(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",s=t;s<n;++s)i+=W(e[s]);return i}function B(e,t,n){for(var r=e.slice(t,n),i="",s=0;s<r.length;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}function F(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,n,r,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-n,2);i<s;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function I(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-n,4);i<s;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function D(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function $(e,t,n,r,i){return i||D(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,n,r,23,4),n+4}function V(e,t,n,r,i){return i||D(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,n,r,52,8),n+8}function U(e){if(e=q(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function q(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function W(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,t){t=t||1/0;for(var n,r=e.length,i=null,s=[],o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function Y(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function G(e,t){for(var n,r,i,s=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,s.push(i),s.push(r);return s}function J(e){return X.toByteArray(U(e))}function H(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Q(e){return e!==e}var X=e("base64-js"),Z=e("ieee754"),K=e("isarray");n.Buffer=o,n.SlowBuffer=m,n.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:r(),n.kMaxLength=i(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return a(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return c(null,e,t,n)},o.allocUnsafe=function(e){return l(null,e)},o.allocUnsafeSlow=function(e){return l(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!K(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=o.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},o.byteLength=g,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)b(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},o.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?T(this,0,e):v.apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},o.prototype.compare=function(e,t,n,r,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var s=i-r,a=n-t,u=Math.min(s,a),c=this.slice(r,i),l=e.slice(t,n),p=0;p<u;++p)if(c[p]!==l[p]){s=c[p],a=l[p];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},o.prototype.indexOf=function(e,t,n){return x(this,e,t,n,!0)},o.prototype.lastIndexOf=function(e,t,n){return x(this,e,t,n,!1)},o.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":return k(this,e,t,n);case"latin1":case"binary":return A(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var r;if(o.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=o.prototype;else{var i=t-e;r=new o(i,void 0);for(var s=0;s<i;++s)r[s]=this[s+e]}return r},o.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||F(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r},o.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||F(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||F(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||F(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||F(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||F(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||F(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},o.prototype.readInt8=function(e,t){return t||F(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||F(e,4,this.length),Z.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||F(e,4,this.length),Z.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||F(e,8,this.length),Z.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||F(e,8,this.length),Z.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;j(this,e,t,n,i,0)}var s=1,o=0;for(this[t]=255&e;++o<n&&(s*=256);)this[t+o]=e/s&255;return t+n},o.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;j(this,e,t,n,i,0)}var s=n-1,o=1;for(this[t+s]=255&e;--s>=0&&(o*=256);)this[t+s]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||j(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||j(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||j(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||j(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||j(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);j(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<n&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);j(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||j(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||j(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||j(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||j(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return $(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return $(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return V(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return V(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,s=r-n;if(this===e&&n<t&&t<r)for(i=s-1;i>=0;--i)e[i+t]=this[i+n];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s},o.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e=255&e);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var s;if("number"==typeof e)for(s=t;s<n;++s)this[s]=e;else{var a=o.isBuffer(e)?e:z(new o(e,r).toString()),u=a.length;for(s=0;s<n-t;++s)this[s+t]=a[s%u]}return this};var te=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":3,ieee754:4,isarray:5}],3:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-r(e)}function s(e){var t,n,i,s,o,a,u=e.length;o=r(e),a=new p(3*u/4-o),i=o>0?u-4:u;var c=0;for(t=0,n=0;t<i;t+=4,n+=3)s=l[e.charCodeAt(t)]<<18|l[e.charCodeAt(t+1)]<<12|l[e.charCodeAt(t+2)]<<6|l[e.charCodeAt(t+3)],a[c++]=s>>16&255,a[c++]=s>>8&255,a[c++]=255&s;return 2===o?(s=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,a[c++]=255&s):1===o&&(s=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,a[c++]=s>>8&255,a[c++]=255&s),a}function o(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function a(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16)+(e[s+1]<<8)+e[s+2],i.push(o(r));return i.join("")}function u(e){for(var t,n=e.length,r=n%3,i="",s=[],o=16383,u=0,l=n-r;u<l;u+=o)s.push(a(e,u,u+o>l?l:u+o));return 1===r?(t=e[n-1],i+=c[t>>2],i+=c[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=c[t>>10],i+=c[t>>4&63],i+=c[t<<2&63],i+="="),s.push(i),s.join("")}n.byteLength=i,n.toByteArray=s,n.fromByteArray=u;for(var c=[],l=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,d=h.length;f<d;++f)c[f]=h[f],l[h.charCodeAt(f)]=f;l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},{}],4:[function(e,t,n){n.read=function(e,t,n,r,i){var s,o,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,p=n?i-1:0,h=n?-1:1,f=e[t+p];for(p+=h,s=f&(1<<-l)-1,f>>=-l,l+=a;l>0;s=256*s+e[t+p],p+=h,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=r;l>0;o=256*o+e[t+p],p+=h,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:(f?-1:1)*(1/0);o+=Math.pow(2,r),s-=c}return(f?-1:1)*o*Math.pow(2,s-r)},n.write=function(e,t,n,r,i,s){var o,a,u,c=8*s-i-1,l=(1<<c)-1,p=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:s-1,d=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),t+=o+p>=1?h/u:h*Math.pow(2,1-p),t*u>=2&&(o++,u/=2),o+p>=l?(a=0,o=l):o+p>=1?(a=(t*u-1)*Math.pow(2,i),o+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&a,f+=d,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[n+f]=255&o,f+=d,o/=256,c-=8);e[n+f-d]|=128*y}},{}],5:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],6:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(e){return i.exec(e).slice(1)};n.resolve=function(){for(var n="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o=s>=0?arguments[s]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),s="/"===o(e,-1);return e=t(r(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),s=r(t.split("/")),o=Math.min(i.length,s.length),a=o,u=0;u<o;u++)if(i[u]!==s[u]){a=u;break}for(var c=[],u=a;u<i.length;u++)c.push("..");return c=c.concat(s.slice(a)),c.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=s(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=s(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return s(e)[3]};var o="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:7}],7:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(p===setTimeout)return setTimeout(e,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(e,0);try{return p(e,0)}catch(t){try{return p.call(null,e,0)}catch(t){return p.call(this,e,0)}}}function o(e){if(h===clearTimeout)return clearTimeout(e);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?y=d.concat(y):g=-1,y.length&&u())}function u(){if(!m){var e=s(a);m=!0;for(var t=y.length;t;){for(d=y,y=[];++g<t;)d&&d[g].run();g=-1,t=y.length}d=null,m=!1,o(e)}}function c(e,t){this.fun=e,this.array=t}function l(){}var p,h,f=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:r}catch(e){p=r}try{h="function"==typeof clearTimeout?clearTimeout:i}catch(e){h=i}}();var d,y=[],m=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];y.push(new c(e,t)),1!==y.length||m||s(u)},c.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=l,f.addListener=l,f.once=l,f.off=l,f.removeListener=l,f.removeAllListeners=l,f.emit=l,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],8:[function(e,t,n){t.exports=function(e,t,n,r){var i=[[],[]],s=[/(.*)(<script[^>]*>)(.*)/i,/(.*)(<\/script>)(.*)/i],o=0,a=!0;t=t.split("\n");for(var u=0;u<t.length;){var c=s[o].exec(t[u]);c&&0==o&&c[2].match("src=")&&(c=null),c?(1==o?(i[o].push(c[1]),pr=e.compile(i[1].join("\n"),n,3,r.compiler).code,a&&r.runtime&&(a=!1,r.runtime&&i[0].push("Function.prototype.$asyncbind = "+e.$asyncbind.toString()+";\n")),i[0].push(pr),i[1]=[],o=0,i[o].push(c[2])):(i[o].push(c[1]),i[o].push(c[2]),o=1),t[u]=c[3]):i[o].push(t[u++])}return i[0].join("\n")}},{}],9:[function(e,t,n){"use strict";function r(e){if(!e)return"";if(Array.isArray(e))return e.map(r).join("|\n");try{return m(e)}catch(t){return t.message+": "+(e&&e.type)}}function i(e){if(Array.isArray(e))return e.map(function(e){return i(e)});var t={};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function s(e,t){e!==t&&(e.__proto__=Object.getPrototypeOf(t),Object.keys(e).forEach(function(t){t in g||delete e[t]}),Object.keys(t).forEach(function(n){n in e||(e[n]=t[n])}))}function o(e){return e?(b.node=e,b):{}}function a(e,t,n){if(!e)return null;if(t&&"object"==typeof t){var r=Object.keys(t);return a(e,function(e){return r.every(function(n){return e[n]==t[n]})})}var i,s={};if(Array.isArray(e)){for(var u=0;u<e.length;u++)if(i=a(e[u],t))return i;return null}var c=n;"function"!=typeof n&&(c=n?function(e){return!0}:function(e){return!o(e).isScope});try{y.treeWalker(e,function(n,r,i){if(t(n))throw s.path=i,s;(n===e||c(n))&&r()})}catch(e){if(e===s)return s.path;throw e}return null}function u(e){return a(e,function(e){return"AwaitExpression"===e.type&&!e.$hidden})}function c(e){return a(e,function(e){return"AwaitExpression"===e.type&&!e.$hidden},function(e){var t=o(e);return!t.isBlockStatement&&!t.isScope})}function l(e){return a(e,{type:"ThisExpression"})}function p(e){if(null===e)return{type:"NullLiteral",value:null,raw:"null"};if(e===!0||e===!1)return{type:"BooleanLiteral",value:e,raw:JSON.stringify(e)};if(e instanceof RegExp){var t=e.toString(),n=t.split("/");return{type:"RegExpLiteral",value:e,raw:t,pattern:n[1],flags:n[2]}}return"number"==typeof e?{type:"NumericLiteral",value:e,raw:JSON.stringify(e)}:{type:"StringLiteral",value:e,raw:JSON.stringify(e)}}function h(e,t){return{type:"Identifier",name:e,loc:t}}function f(e){var t={};for(var n in e)t[n]="string"==typeof e[n]?h(e[n]):e[n];return t}function d(e,t,n,d){function m(t){return e.filename+(t&&t.loc&&t.loc.start?"("+t.loc.start.line+":"+t.loc.start.column+")\t":"\t")}function g(e){return n.babelTree?p(e):{type:"Literal",value:e,raw:JSON.stringify(e)}}function v(e){return e?!n.babelTree||"ClassMethod"!==e.type&&"ObjectMethod"!==e.type?(!n.babelTree&&"MethodDefinition"===e.type||"Property"===e.type&&(e.method||"get"==e.kind||"set"==e.kind))&&o(e.value).isFunction?e.value:null:e:null}function b(e){if(!e)return!1;var t=!1;if(Array.isArray(e)){for(var r=0;r<e.length;r++)b(e[r])&&(t=!0);return t}return y.treeWalker(e,function(r,i,s){"Identifier"===r.type&&"arguments"===r.name?(r.name=n.$arguments,t=!0):r!==e&&o(r).isFunction||i()}),t}function x(e){return"string"!=typeof e&&(e=e.type),n.generatedSymbolPrefix+e+"_"+pe++}function w(e,t){return e&&(e.$exit=f({$error:t.$error,$return:t.$return})),e}function E(e){for(var t=0;t<e.length;t++){if(e[t].self.$exit)return e[t].self;if(e[t].parent&&e[t].parent.$exit)return e[t].parent}return null}function S(e,t){var n=E(e);if(n)return n.$exit;if(t)for(var r=0;r<t.length;r++)if(t[r])return f(t[r]);return null}function k(e,t){se(e),ne(e),M(e),G(e),Y(e),W(e),N(e),P(e),$(e,[B,D,F,j]),V(e,t),oe(e),ce(e)}function A(e,t,n,r){return{type:"VariableDeclaration",kind:"var",declarations:[{type:"VariableDeclarator",id:h(e),init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:n||[],body:t},property:he.asyncbind,computed:!1},arguments:[{type:"ThisExpression"},r]}}]}}function _(e,t){var n={$continuation:!0,type:e?"FunctionDeclaration":"FunctionExpression",id:e?"string"==typeof e?h(e):e:void 0,params:[],body:{type:"BlockStatement",body:i(t)}};return e&&(le[e]={def:n}),n}function C(e){return{type:"AwaitExpression",argument:G({type:"FunctionExpression",generator:!1,expression:!1,async:!0,params:[],body:{type:"BlockStatement",body:e}}).body.body[0].argument}}function L(e,t){"string"==typeof e&&(e=h(e));var n={type:"CallExpression",callee:{type:"MemberExpression",object:e,property:h("call"),computed:!1},arguments:[{type:"ThisExpression"}].concat(t||[])};return e.$thisCall=n,n.$thisCallName=e.name,n}function T(e,t){return{type:"ReturnStatement",argument:L(e,t)}}function R(e,t){return{type:"CallExpression",callee:h(e.$seh+"Finally"),arguments:t?[t]:[]}}function O(e,t){if(Array.isArray(e))return e.map(function(e){return O(e,t)});var r=0;return y.treeWalker(e,function(e,t,i){if("ReturnStatement"!==e.type||e.$mapped){if("ThrowStatement"===e.type){if(r>0){if(!o(e).isAsync)return t(e);delete e.async}return e.type="ReturnStatement",e.$mapped=!0,void(e.argument={type:"CallExpression",callee:S(i,[n]).$error,arguments:[e.argument]})}return o(e).isFunction?(r++,t(e),void r--):void t(e)}if(r>0){if(!o(e).isAsync)return t(e);delete e.async}return e.$mapped=!0,void(o(e.argument).isUnaryExpression&&"void"===e.argument.operator?e.argument=e.argument.argument:e.argument={type:"CallExpression",callee:S(i,[n]).$return,arguments:e.argument?[e.argument]:[]
+})},t)}function P(e,t){return Array.isArray(e)?e.map(function(e){return P(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"ConditionalExpression"===e.type&&(u(e.alternate)||u(e.consequent))){var r=(h(x("condOp")),C([{type:"IfStatement",test:e.test,consequent:{type:"ReturnStatement",argument:e.consequent},alternate:null},{type:"ReturnStatement",argument:e.alternate}]));s(e,r)}},t),e)}function N(e,t){return Array.isArray(e)?e.map(function(e){return N(e,t)}):(y.treeWalker(e,function(e,t,n){function r(e,t){return C([{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:o,init:null}],kind:"var"},{type:"IfStatement",test:e,consequent:t,alternate:null},{type:"ReturnStatement",argument:o}])}if(t(),"LogicalExpression"===e.type&&u(e.right)){var i,o=h(x("logical"+("&&"===e.operator?"And":"Or")));if("||"===e.operator)i=r({type:"UnaryExpression",operator:"!",prefix:!0,argument:{type:"AssignmentExpression",operator:"=",left:o,right:e.left}},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:o,right:e.right}});else{if("&&"!==e.operator)throw new Error(m(e)+"Illegal logical operator: "+e.operator);i=r({type:"AssignmentExpression",operator:"=",left:o,right:e.left},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:o,right:e.right}})}s(e,i)}},t),e)}function B(e,t,n){if("SwitchCase"!==e.type&&o(e).isBlockStatement)for(var r=0;r<e.body.length;){var i=e.body[r];if("SwitchCase"!==i.type&&o(i).isBlockStatement){var s=ue(i.body);if(s)if(c(i)){var a=x(i),u=e.body.splice(r+1,e.body.length-(r+1));if(u.length){var l=_(a,u);delete le[a],i.body.push(T(a)),e.body.push(l),r++}else r++}else r++;else e.body.splice.apply(e.body,[r,1].concat(i.body))}else r++}}function F(e,t,n){if("IfStatement"===e.type&&u([e.consequent,e.alternate])){var r=x(e),a=t[0],c={type:"BlockStatement",body:[e]};if("index"in a){var l=a.index,p=a.parent[a.field].splice(l+1,a.parent[a.field].length-(l+1));if(a.replace(c),p.length){var h=T(r);c.body.unshift(n(_(r,p))),[e.consequent,e.alternate].forEach(function(e){if(e){var t;t=o(e).isBlockStatement?e.body[e.body.length-1]:e,t&&"ReturnStatement"===t.type||("BlockStatement"!==e.type&&s(e,{type:"BlockStatement",body:[i(e)]}),e.$deferred=!0,e.body.push(i(h))),n(e)}}),e.consequent&&e.alternate&&e.consequent.$deferred&&e.alternate.$deferred||c.body.push(i(h))}}else a.parent[a.field]=c}}function j(e,t,n){if(!e.$switched&&"SwitchStatement"===e.type&&u(e.cases)){e.$switched=!0;var r,s,o,a=t[0];if("index"in a){var c=a.index+1;o=a.parent[a.field].splice(c,a.parent[a.field].length-c),o.length&&"BreakStatement"===o[o.length-1].type&&a.parent[a.field].push(o.pop()),r=x(e),s=T(r),a.parent[a.field].unshift(_(r,o)),a.parent[a.field].push(i(s))}return e.cases.forEach(function(e,t){if("SwitchCase"!==e.type)throw new Error("switch contains non-case/default statement: "+e.type);if(u(e.consequent)){var n=e.consequent[e.consequent.length-1];"BreakStatement"===n.type?e.consequent[e.consequent.length-1]=i(s):"ReturnStatement"===n.type||"ThrowStatement"===n.type||(d(m(e)+"switch-case fall-through not supported - added break. See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification"),e.consequent.push(i(s)))}}),!0}}function M(t){return y.treeWalker(t,function(t,r,i){if("TryStatement"===t.type&&u(t)){t.$containedAwait=!0;var s=S(i,[n]);if(t.$seh=x("Try")+"_",t.finalizer&&!t.handler){var o=h(x("exception"));t.handler={type:"CatchClause",param:o,body:{type:"BlockStatement",body:[{type:"ThrowStatement",argument:o}]}}}if(!t.handler&&!t.finalizer){var a=new SyntaxError(m(t.value)+"try requires catch and/or finally clause",e.filename,t.start);throw a.pos=t.start,a.loc=t.loc.start,a}t.finalizer?(w(t.block,{$error:t.$seh+"Catch",$return:R(t,s.$return)}),w(t.handler,{$error:R(t,s.$error),$return:R(t,s.$return)})):w(t.block,{$error:t.$seh+"Catch",$return:s.$return})}r()}),t}function I(e,t){for(var n=0;n<e.length;n++)if(!o(e[n]).isDirective)return void e.splice.apply(e,[n,0].concat(t));e.splice.apply(e,[e.length,0].concat(t))}function D(t,r,s){if("TryStatement"===t.type&&(t.$containedAwait||u(t))&&!t.$mapped){var o,a,c,l=r[0];if(!("index"in l))throw new Error(e.filename+" - malformed try/catch blocks");var p=l.index+1,f=l.parent[l.field].splice(p,l.parent[l.field].length-p);if(f.length){a=t.$seh+"Post";var d=_(a,f);d=s(d),l.parent[l.field].splice(l.index,0,d),o=T(t.finalizer?R(t,h(a)):a)}else t.finalizer&&(o=T(R(t)));t.$mapped=!0,o&&(t.block.body.push(i(o)),t.handler.body.body.push(i(o)));var y=S(r,[n]);if(t.handler){var m=h(t.$seh+"Catch");c=i(t.handler.body);var g=A(m.name,c,[i(t.handler.param)],t.finalizer?R(t,y.$error):y.$error);t.handler.body.body=[{type:"CallExpression",callee:m,arguments:[i(t.handler.param)]}],l.parent[l.field].splice(l.index,0,g)}if(t.finalizer){var v={type:"VariableDeclaration",kind:"var",declarations:[{type:"VariableDeclarator",id:h(t.$seh+"Finally"),init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"FunctionExpression",params:[h(t.$seh+"Exit")],body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"CallExpression",arguments:[{type:"ThisExpression"},y.$error],callee:{type:"MemberExpression",property:he.asyncbind,object:{type:"FunctionExpression",params:[h(t.$seh+"Value")],body:{type:"BlockStatement",body:i(t.finalizer.body).concat([{type:"ReturnStatement",argument:{type:"BinaryExpression",operator:"&&",left:h(t.$seh+"Exit"),right:L(h(t.$seh+"Exit"),[h(t.$seh+"Value")])}}])}}}}}]}},property:he.asyncbind,computed:!1},arguments:[{type:"ThisExpression"}]}}]};I(l.parent[l.field],[v]);var b=T(R(t,a&&h(a)));c.body[c.length-1]=b,t.block.body[t.block.body.length-1]=b,delete t.finalizer}}}function $(e,t,n){function r(e,n){return y.treeWalker(e,function(e,n,s){function o(e){return r(e,s)}i.indexOf(e)<0&&(i.push(e),t.forEach(function(t){t(e,s,o)})),n()},n)}var i=[];return r(e,n),e}function V(e,t,a){return y.treeWalker(e,function(e,c,l){if("IfStatement"==e.type&&("BlockStatement"!=e.consequent.type&&u(e.consequent)&&(e.consequent={type:"BlockStatement",body:[e.consequent]}),e.alternate&&"BlockStatement"!=e.alternate.type&&u(e.alternate)&&(e.alternate={type:"BlockStatement",body:[e.alternate]})),c(),o(e).isAwait){var p=e.loc;if(t=t||l.some(function(e){return e.self&&e.self.$wasAsync}),!t||"warn"===t){var f=m(e)+"'await' used inside non-async function. ";f+=n.promises?"'return' value Promise runtime-specific":"'return' value from await is synchronous",d(f+". See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification")}var y=l[0].parent;"LogicalExpression"===y.type&&y.right===e&&d(m(e.argument)+"'"+r(y)+"' on right of "+y.operator+" will always evaluate '"+r(e.argument)+"'"),"ConditionalExpression"===y.type&&y.test!==e&&d(m(e.argument)+"'"+r(y)+"' will always evaluate '"+r(e.argument)+"'");var g=h(x("await")),v=i(e.argument);s(e,g);for(var b,w,E=1;E<l.length;E++)if(w=o(l[E].self).isBlockStatement){b=l[E-1];break}if(!b)throw new Error(m(e)+"Illegal await not contained in a statement");var k,A,_=S(l,[a,n]),C=b.index,L=w.splice(C,w.length-C).slice(1);"ReturnStatement"===b.self.type&&"CallExpression"===b.self.argument.type&&1===b.self.argument.arguments.length&&b.self.argument.arguments[0].name===g.name?A=k=b.self.argument.callee:"Identifier"===b.self.type||b.self.name===g.name||"ExpressionStatement"===b.self.type&&"Identifier"===b.self.expression.type&&b.self.expression.name===g.name?k=L.length?{type:"FunctionExpression",params:[i(g)],body:V({type:"BlockStatement",body:i(L)},t,_)}:{type:"FunctionExpression",params:[],body:{type:"BlockStatement",body:[]}}:(L.unshift(b.self),k={type:"FunctionExpression",params:[i(g)],body:V({type:"BlockStatement",body:i(L)},t,_)}),A||(A=k?{type:"CallExpression",callee:{type:"MemberExpression",object:k,property:h("$asyncbind",p),computed:!1},arguments:[{type:"ThisExpression"},_.$error]}:{type:"FunctionExpression",params:[],body:{type:"BlockStatement",body:[]}}),n.wrapAwait&&(v=n.promises||n.generators?{type:"CallExpression",arguments:[v],callee:{type:"MemberExpression",object:h("Promise"),property:h("resolve")}}:{type:"CallExpression",arguments:[v],callee:{type:"MemberExpression",object:h("Object"),property:h("$makeThenable")}});var T={type:"CallExpression",callee:{type:"MemberExpression",object:v,property:h("then",p),computed:!1},arguments:[A,_.$error]};w.push({loc:p,type:"ReturnStatement",argument:T})}return!0}),e}function U(e,t){var n=h(x("in")),r="VariableDeclaration"===e.left.type?e.left.declarations[0].id:e.left,i={type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:n,init:{type:"ArrayExpression",elements:[]}}],kind:"var"},s=e.body;e.body={type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:n,property:h("push"),computed:!1},arguments:[r]}};var o={type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:r,right:{type:"CallExpression",callee:{type:"MemberExpression",object:n,property:h("shift"),computed:!1},arguments:[]}}};"BlockStatement"===s.type?s.body.unshift(o):s={type:"BlockStatement",body:[o].concat(s)};var a={type:"WhileStatement",test:{type:"MemberExpression",object:n,property:h("length"),computed:!1},body:s};"index"in t[0]?t[0].parent.body.splice(t[0].index,1,i,e,a):t[0].parent[t[0].ref]={type:"BlockStatement",body:[i,e,a]}}function q(e,t){e.type="ForStatement","BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[e.body]});var n,r,i={type:"ArrayExpression",elements:[{type:"CallExpression",callee:{type:"MemberExpression",object:e.right,property:{type:"MemberExpression",object:h("Symbol"),property:h("iterator"),computed:!1},computed:!0},arguments:[]}]};if("VariableDeclaration"===e.left.type){"const"===e.left.kind&&(e.left.kind="let"),n=e.left.declarations[0].id;var s=ee(e.left.declarations[0].id);r=h("$iterator_"+s.join("_")),e.left.declarations=s.map(function(e){return{type:"VariableDeclarator",id:h(e)}}),e.left.declarations.push({type:"VariableDeclarator",id:r,init:i}),e.init=e.left}else{n=e.left,r=h("$iterator_"+n.name);var o={type:"VariableDeclaration",kind:"var",declarations:[{type:"VariableDeclarator",id:r,init:i}]};t[0].parent.body.splice(t[0].index,0,o),e.init=null}e.test={type:"LogicalExpression",left:{type:"UnaryExpression",operator:"!",prefix:!0,argument:{type:"MemberExpression",object:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:r,property:g(1),computed:!0},right:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"MemberExpression",object:r,property:g(0),computed:!0},property:h("next"),computed:!1},arguments:[]}},property:h("done"),computed:!1}},operator:"&&",right:{type:"LogicalExpression",operator:"||",left:{type:"AssignmentExpression",operator:"=",left:n,right:{type:"MemberExpression",object:{type:"MemberExpression",object:r,property:g(1),computed:!0},property:h("value"),computed:!1}},right:g(!0)}},delete e.left,delete e.right}function W(e){return y.treeWalker(e,function(e,t,r){function a(e){return{type:"ReturnStatement",argument:{type:"UnaryExpression",operator:"void",prefix:!0,argument:L(e||E)}}}function c(t,r){if("BreakStatement"===t.type)s(t,i(k(t.label&&n.generatedSymbolPrefix+e.type+"_"+t.label.name+"_exit")));else if("ContinueStatement"===t.type)s(t,i(a(t.label&&n.generatedSymbolPrefix+e.type+"_"+t.label.name+"_next")));else if(o(t).isFunction)return!0;r()}"ForInStatement"===e.type&&u(e)?U(e,r):"ForOfStatement"===e.type&&u(e)&&q(e,r),t();var p;if(o(e).isLoop&&u(e)){var f=e.init,d=e.test||g(!0),m=e.update,v=e.body,b=l(v);f&&(o(f).isStatement||(f={type:"ExpressionStatement",expression:f})),m=m&&{type:"ExpressionStatement",expression:m},v=o(v).isBlockStatement?i(v).body:[i(v)];var x="LabeledStatement"===r[0].parent.type&&r[0].parent.label.name;x=e.type+"_"+(x||pe++);var w=n.generatedSymbolPrefix+(x+"_exit"),E=n.generatedSymbolPrefix+(x+"_next"),S=h(n.generatedSymbolPrefix+(x+"_loop")),k=function(e){return{type:"ReturnStatement",argument:{type:"UnaryExpression",operator:"void",prefix:!0,argument:{type:"CallExpression",callee:h(e||w),arguments:[]}}}},A=_(E,[{type:"ReturnStatement",argument:{type:"CallExpression",callee:b?{type:"CallExpression",arguments:[{type:"ThisExpression"}],callee:{type:"MemberExpression",object:S,property:he.asyncbind,computed:!1}}:S,arguments:[h(w),he.error]}}]);m&&A.body.body.unshift(m);for(var C=0;C<v.length;C++)y.treeWalker(v[C],c);v.push(i(a()));var T={type:"FunctionExpression",id:S,params:[h(w),he.error],body:{type:"BlockStatement",body:[A]}};if("DoWhileStatement"===e.type)A.body.body=[{type:"IfStatement",test:i(d),consequent:{type:"BlockStatement",body:i(A.body.body)},alternate:{type:"ReturnStatement",argument:{type:"CallExpression",callee:h(w),arguments:[]}}}],T.body.body=[A].concat(v);else{var R={type:"IfStatement",test:i(d),consequent:{type:"BlockStatement",body:v},alternate:i(k())};T.body.body.push(R)}var O={type:"ExpressionStatement",expression:{type:"AwaitExpression",argument:{type:"CallExpression",arguments:[{type:"ThisExpression"}],callee:{type:"MemberExpression",object:T,property:he.asyncbind,computed:!1}}}};for(!f||"VariableDeclaration"!==f.type||"let"!==f.kind&&"const"!==f.kind||("const"===f.kind&&(f.kind="let"),O={type:"BlockStatement",body:[i(f),O]},f=null),p=0;p<r.length;p++){var P=r[p];if("index"in P)return f?P.parent[P.field].splice(P.index,1,i(f),O):P.parent[P.field][P.index]=O,!0}}return!0}),e}function z(e){try{return Array.isArray(e)?e.some(z):(y.treeWalker(e,function(e,t,r){if("Identifier"===e.type&&(e.name===n.$return||e.name===n.$error))throw e;if(o(e).isFunction){var i=a(e,function(e){if("Identifier"===e.type&&(e.name===n.$return||e.name===n.$error))throw e;if(("ReturnStatement"===e.type||"ThrowStatement"===e.type)&&o(e).isAsync)throw e});if(i)throw i;return!1}t()}),!1)}catch(e){return e}}function Y(t){return y.treeWalker(t,function(t,r,i){var s=v(t);if(r(),s&&o(s).isAsync){if("set"==t.kind){var a=new SyntaxError(m(s)+"method 'async set' cannot be invoked",e.filename,t.start);throw a.pos=t.start,a.loc=t.loc.start,a}s.async=!1;var u=b(s);z(s)||0!==s.body.body.length&&"ReturnStatement"===s.body.body[s.body.body.length-1].type||s.body.body.push({type:"ReturnStatement"});var c={type:"CallExpression",arguments:[{type:"ThisExpression"}],callee:{type:"MemberExpression",object:w({type:"FunctionExpression",params:[he.return,he.error],body:Y(O(s.body,i)),$wasAsync:!0},n),property:he.asyncbind,computed:!1}};n.promises?s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"NewExpression",callee:h("Promise"),arguments:[c]}}]}:(n.lazyThenables||c.arguments.push(g(!0)),s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:c}]}),u&&I(s.body.body,[fe])}})}function G(e,t){return y.treeWalker(e,function(e,r,i){if(r(),o(e).isAsync&&o(e).isFunction){var s;(s=v(i[0].parent))&&o(s).isAsync&&"get"===i[0].parent.kind&&Q(i[0].parent.key),delete e.async;var a,u=b(e);return o(e.body).isBlockStatement?(t||z(e.body)||0!==e.body.body.length&&"ReturnStatement"===e.body.body[e.body.body.length-1].type||e.body.body.push({type:"ReturnStatement"}),a={type:"BlockStatement",body:e.body.body.map(function(e){return O(e,i)})}):(a={type:"BlockStatement",body:[O({type:"ReturnStatement",argument:e.body},i)]},e.expression=!1),a={type:"CallExpression",arguments:[{type:"ThisExpression"}],callee:{type:"MemberExpression",object:w({type:"FunctionExpression",params:[he.return,he.error],body:a,$wasAsync:!0},n),property:he.asyncbind,computed:!1}},n.promises?a={type:"NewExpression",callee:h("Promise"),arguments:[a]}:n.lazyThenables||a.arguments.push(g(!0)),a={type:"BlockStatement",body:[{type:"ReturnStatement",loc:e.loc,argument:a}]},u&&I(a.body,[fe]),void(e.body=a)}}),e}function J(e){if(Array.isArray(e))return e.map(J);var t=0;return y.treeWalker(e,function(e,n,r){if("ThrowStatement"!==e.type&&"ReturnStatement"!==e.type||e.$mapped){if(o(e).isFunction)return t++,n(e),void t--}else if(t>0&&o(e).isAsync)return delete e.async,e.argument={type:"CallExpression",callee:"ThrowStatement"===e.type?he.error:he.return,arguments:e.argument?[e.argument]:[]},void(e.type="ReturnStatement");n(e)})}function H(e,t){return{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"FunctionExpression",id:null,generator:!0,expression:!1,params:[he.return,he.error],body:{type:"BlockStatement",body:J(e).concat(t?[{type:"ReturnStatement",argument:he.return}]:[])}},property:he.asyncspawn,computed:!1},arguments:[h("Promise"),{type:"ThisExpression"}]}}]}}function Q(e){e.$asyncgetwarninig||(e.$asyncgetwarninig=!0,d(m(e)+"'async get "+r(e)+"(){...}' is non-standard. See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification"))}function X(e,t){function r(e,t){y.treeWalker(e,function(n,r,i){n!==e&&o(n).isFunction||(o(n).isAwait?t?(n.$hidden=!0,r()):(delete n.operator,n.delegate=!1,n.type="YieldExpression",r()):r())})}function i(e){var t=n.promises;n.promises=!0,k(e,!0),n.promises=t}function a(e){return"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:e.body}]}),e}function u(e,n){n.$asyncexitwarninig||(n.$asyncexitwarninig=!0,d(m(e)+"'async "+{ReturnStatement:"return",ThrowStatement:"throw"}[e.type]+"' not possible in "+(t?"engine":"generator")+" mode. Using Promises for function at "+m(n)))}y.treeWalker(e,function(e,n,c){n();var l,p,h;if(o(e).isAsync&&o(e).isFunction){var f;(f=v(c[0].parent))&&o(f).isAsync&&"get"===c[0].parent.kind&&Q(c[0].parent.key),(p=z(e.body))?(u(p,e.body),i(e)):t?"get"!==c[0].parent.kind&&r(e,!0):(l=e,delete l.async,h=b(l),r(l,!1),l=a(l),l.body=H(l.body.body,p),h&&I(l.body.body,[fe]),l.id&&"ExpressionStatement"===c[0].parent.type?(l.type="FunctionDeclaration",c[1].replace(l)):c[0].replace(l))}else(l=v(e))&&o(l).isAsync&&((p=z(l))?(u(p,l),i(e)):t&&"get"!==e.kind||(t?i(e):(e.async=!1,h=b(l),r(l,!1),s(l,a(l)),l.body=H(l.body.body,p)),h&&I(l.body.body,[fe])))});var c=n.promises;return n.promises=!0,se(e),ne(e),M(e),W(e),N(e),P(e),$(e,[B,D,F,j]),V(e,"warn"),n.promises=c,e}function Z(e,t,n){var r=[];return y.treeWalker(e,function(i,s,a){return i===e?s():t(i,a)?void r.push([].concat(a)):void(n||o(i).isScope||s())}),r}function K(e,t){var n=[],r={};if(e=e.filter(function(e){return"ExportNamedDeclaration"!==e[0].parent.type}),e.length){var s={};e.forEach(function(e){function t(e){e in s?r[e]=o.declarations[u]:s[e]=o.declarations[u]}for(var n=e[0],o=n.self,a=(o.kind,[]),u=0;u<o.declarations.length;u++){var c=o.declarations[u];if(ee(c.id).forEach(t),c.init){var l={type:"AssignmentExpression",left:i(c.id),operator:"=",right:i(c.init)};"ForStatement"!==n.parent.type&&(l={type:"ExpressionStatement",expression:l}),a.push(l)}}0==a.length?n.remove():n.replace(a)});var o=Object.keys(s);o.length&&(o=o.map(function(e){return{type:"VariableDeclarator",id:h(e),loc:s[e].loc,start:s[e].start,end:s[e].end}}),n[0]&&"VariableDeclaration"===n[0].type?n[0].declarations=n[0].declarations.concat(o):n.unshift({type:"VariableDeclaration",kind:t,declarations:o}))}return{decls:n,duplicates:r}}function ee(e){if(!e)return[];if(Array.isArray(e))return e.reduce(function(e,t){return e.concat(ee(t.id))},[]);switch(e.type){case"Identifier":return[e.name];case"ArrayPattern":return e.elements.reduce(function(e,t){return e.concat(ee(t))},[]);case"ObjectPattern":return e.properties.reduce(function(e,t){return e.concat(ee(t))},[]);case"ObjectProperty":case"Property":return ee(e.value);case"RestElement":case"RestProperty":return ee(e.argument)}}function te(e){function t(e){d(m(e)+"Possible assignment to 'const "+r(e)+"'")}function n(e){switch(e.type){case"Identifier":"const"===i[e.name]&&t(e);break;case"ArrayPattern":e.elements.forEach(function(e){"const"===i[e.name]&&t(e)});break;case"ObjectPattern":e.properties.forEach(function(e){"const"===i[e.key.name]&&t(e)})}}var i={};y.treeWalker(e,function(e,t,r){var s=o(e).isBlockStatement;if(s){i=Object.create(i);for(var a=0;a<s.length;a++)if("VariableDeclaration"===s[a].type)for(var u=0;u<s[a].declarations.length;u++)ee(s[a].declarations[u].id).forEach(function(e){i[e]=s[a].kind})}t(),"AssignmentExpression"===e.type?n(e.left):"UpdateExpression"===e.type&&n(e.argument),s&&(i=Object.getPrototypeOf(i))})}function ne(e){function t(e){return function(t,n){if(t.kind||(t.kind="var"),"VariableDeclaration"===t.type&&e.indexOf(t.kind)>=0){var r=n[0];return("left"!=r.field||"ForInStatement"!==r.parent.type&&"ForOfStatement"!==r.parent.type)&&("init"!=r.field||"ForStatement"!==r.parent.type||"const"!==t.kind&&"let"!==t.kind)}}}function n(e,t){return!!(o(e).isAsync&&o(e).isFunction&&e.id)||!(!o(e).isFunction||!e.id)&&!e.$continuation}te(e);var i=!1;return y.treeWalker(e,function(e,s,a){var c=i;if(i=i||ae(e),o(e).isBlockStatement){var l=u(e);if(l){var p,f,y,g,v,b=!a[0].parent||o(a[0].parent).isScope;if(b){f=Z(e,t(["const"]),!1);var x={},w={};f.forEach(function(e){e[0].self.declarations.forEach(function(e){ee(e.id).forEach(function(t){x[t]||w[t]?(delete x[t],w[t]=e):x[t]=e})})}),f.forEach(function(e){for(var t=0;t<e.length&&!o(e[t].parent).isBlockStatement;t++);var n=e[t];n.append({type:"ExpressionStatement",expression:{type:"SequenceExpression",expressions:e[0].self.declarations.map(function(e){var t={type:"AssignmentExpression",operator:"=",left:e.id,right:e.init};return e.init=null,t})}});var r=ee(e[0].self.declarations),i=r.filter(function(e){return e in w});i.length&&e[0].append({type:"VariableDeclaration",kind:"let",declarations:i.map(function(e){return{type:"VariableDeclarator",id:h(e)}})}),e[0].self.kind="var",i=r.filter(function(e){return e in x}),i.length?e[0].self.declarations=i.map(function(e){return{type:"VariableDeclarator",id:h(e)}}):n.remove()}),y=Z(e,t(["var"]),!1),g=[]}else g=Z(e,t(["const"]),!0);g=g.concat(Z(e,t(["let"]),!0)),p=Z(e,function(e){return o(e).isDirective},!0),v=Z(e,n,i),y=y?K(y,"var"):{duplicates:{},decls:[]},g=g?K(g,"let"):{duplicates:{},decls:[]},Object.keys(y.duplicates).forEach(function(e){d(m(y.duplicates[e])+"Duplicate declaration '"+r(y.duplicates[e])+"'")}),Object.keys(g.duplicates).forEach(function(e){d(m(g.duplicates[e])+"Duplicate declaration '"+r(g.duplicates[e])+"'")}),v=v.map(function(e){var t,n=e[0];if(o(n.self).isAsync)return t=n.self.id.name,o(n.parent).isBlockStatement?(n.self.type="FunctionDeclaration",n.remove(),n.self):n.replace(h(t));t=n.self.id.name;var r="FunctionDeclaration"===n.self.type?n.remove():n.replace(h(t));return r}),p=p.map(function(e){var t=e[0];return t.remove()}),(p.length||y.decls.length||g.decls.length||v.length)&&(e.body=p.concat(y.decls).concat(g.decls).concat(v).concat(e.body))}i=c}return s(),!0}),e}function re(e){function t(){return e.$superID=e.$superID||h("$super$"+pe++)}return function(e){e=v(e),e&&o(e).isAsync&&y.treeWalker(e.body,function(e,n,r){var i;o(e).isClass||(n(),"Super"===e.type&&("MemberExpression"===r[0].parent.type?"CallExpression"===r[1].parent.type&&"callee"===r[1].field?r[0].parent.computed?(i={type:"CallExpression",callee:{type:"MemberExpression",object:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"ThisExpression"},property:t(),computed:!1},arguments:[r[0].parent.property]},property:h("call"),computed:!1},arguments:[{type:"ThisExpression"}].concat(r[1].parent.arguments)},r[2].replace(i)):(i={type:"CallExpression",callee:{type:"MemberExpression",object:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"ThisExpression"},property:t(),computed:!1},arguments:[g(r[0].parent.property.name)]},property:h("call"),computed:!1},arguments:[{type:"ThisExpression"}].concat(r[1].parent.arguments)},r[2].replace(i)):r[0].parent.computed?(i={type:"CallExpression",callee:{type:"MemberExpression",object:{type:"ThisExpression"},property:t(),computed:!1},arguments:[r[0].parent.property]},r[1].replace(i)):(i={type:"CallExpression",callee:{type:"MemberExpression",object:{type:"ThisExpression"},property:t(),computed:!1},arguments:[g(r[0].parent.property.name)]},r[1].replace(i)):d(m(e)+"'super' in async methods must be deferenced. 'async constructor()'/'await super()' not valid.")))})}}function ie(e){return y.treeWalker(e,function(e,t,r){if(t(),("ClassDeclaration"===e.type||"ClassExpression"===e.type)&&(e.body.body.forEach(re(e)),e.$superID)){var i={type:"FunctionExpression",params:[h("$field")],body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"MemberExpression",object:{type:"Super"},property:h("$field"),computed:!0}}]}};n.babelTree?(i.type="ClassMethod",i.key=e.$superID,i.kind="method",e.body.body.push(i)):e.body.body.push({type:"MethodDefinition",key:e.$superID,kind:"method",value:i})}})}function se(e){return y.treeWalker(e,function(e,t,n){var r=u(e);return r&&"ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:e.body}]}),t(),!0}),e}function oe(e){return y.treeWalker(e,function(e,t,r){t(),"Identifier"===e.type&&"__nodent"===e.name&&s(e,g(n))}),e}function ae(e){if("Program"===e.type&&"module"===e.sourceType)return!0;var t;if("Program"===e.type)t=e.body;else{if(!o(e).isFunction)return!1;t=e.body.body}if(t)for(var n=0;n<t.length;n++)if(o(t[n]).isDirective&&t[n].expression.value.match(/^\s*use\s+strict\s*$/))return!0;return!1}function ue(e){for(var t=0;t<e.length;t++){var n=e[t];if("ClassDeclaration"===n.type||"VariableDeclaration"===n.type&&("let"===n.kind||"const"===n.kind)||"FunctionDeclaration"===n.type&&n.id&&n.id.name&&!n.$continuation)return!0}return!1}function ce(e){y.treeWalker(e,function(e,t,n){t();var r,i;if(r=o(e).isBlockStatement)for(var s=0;s<r.length;s++)(i=o(r[s]).isBlockStatement)&&!ue(i)&&(ue(r[s])||[].splice.apply(r,[s,1].concat(i)))}),y.treeWalker(e,function(e,t,n){if(t(),o(e).isJump){var r=n[0];if("index"in r)for(var i=r.index+1,s=r.parent[r.field];i<s.length;)"VariableDeclaration"===s[i].type||o(s[i]).isFunction&&s[i].id?i+=1:s.splice(i,1)}}),y.treeWalker(e,function(e,t,n){t(),e.$thisCall&&le[e.name]&&(le[e.name].ref?delete le[e.name]:le[e.name].ref=e.$thisCall)});var t=Object.keys(le).map(function(e){return le[e].ref});if(t.length){y.treeWalker(e,function(e,n,r){if(n(),t.indexOf(e)>=0&&"ReturnStatement"===r[1].self.type){var s=e.$thisCallName,a=i(le[s].def.body.body);le[s].$inlined=!0,o(r[1].self).isJump||a.push({type:"ReturnStatement"}),r[1].replace(a)}});var n=Object.keys(le).map(function(e){return le[e].$inlined&&le[e].def});y.treeWalker(e,function(e,t,r){t(),n.indexOf(e)>=0&&r[0].remove()})}var r="Program"===e.type||"module"===e.sourceType;if(!r||!a(e,function(e){return o(e).isES6},!0)){var s=ae(e);!function(e){y.treeWalker(e,function(e,t,n){if("Program"===e.type||"FunctionDeclaration"===e.type||"FunctionExpression"===e.type){var r=s;if(s=s||ae(e)){t();var i="Program"===e.type?e:e.body,o=Z(i,function(e,t){if("FunctionDeclaration"===e.type)return t[0].parent!==i});o=o.map(function(e){return e[0].remove()}),[].push.apply(i.body,o)}else t();s=r}else t()})}(e)}return e}var le={},pe=1,he={};Object.keys(n).filter(function(e){return"$"===e[0]}).forEach(function(e){he[e.slice(1)]=h(n[e])});var fe={type:"VariableDeclaration",kind:"var",declarations:[{type:"VariableDeclarator",id:he.arguments,init:h("arguments")}]};return n.engine?(e.ast=X(e.ast,n.engine),e.ast=oe(e.ast)):n.generators?(e.ast=ie(e.ast),e.ast=X(e.ast),e.ast=oe(e.ast)):(e.ast=ie(e.ast),k(e.ast)),e}var y=e("./parser"),m=e("./output"),g={start:!0,end:!0,loc:!0,range:!0},v={getScope:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type&&"BlockStatement"===this.node.body.type?this.node.body.body:"Program"===this.node.type?this.node.body:null},isScope:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"Program"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type&&"BlockStatement"===this.node.body.type},isFunction:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type},isClass:function(){return"ClassDeclaration"===this.node.type||"ClassExpression"===this.node.type},isBlockStatement:function(){return"ClassBody"===this.node.type||"Program"===this.node.type||"BlockStatement"===this.node.type?this.node.body:"SwitchCase"===this.node.type&&this.node.consequent},isExpressionStatement:function(){return"ExpressionStatement"===this.node.type},isLiteral:function(){return"Literal"===this.node.type||"BooleanLiteral"===this.node.type||"RegExpLiteral"===this.node.type||"NumericLiteral"===this.node.type||"StringLiteral"===this.node.type||"NullLiteral"===this.node.type},isDirective:function(){return"ExpressionStatement"===this.node.type&&("StringLiteral"===this.node.expression.type||"Literal"===this.node.expression.type&&"string"==typeof this.node.expression.value)},isUnaryExpression:function(){return"UnaryExpression"===this.node.type},isAwait:function(){return"AwaitExpression"===this.node.type&&!this.node.$hidden},isAsync:function(){return this.node.async},isStatement:function(){return null!==this.node.type.match(/[a-zA-Z]+Declaration/)||null!==this.node.type.match(/[a-zA-Z]+Statement/)},isExpression:function(){return null!==this.node.type.match(/[a-zA-Z]+Expression/)},isLoop:function(){return"ForStatement"===this.node.type||"WhileStatement"===this.node.type||"DoWhileStatement"===this.node.type},isJump:function(){return"ReturnStatement"===this.node.type||"ThrowStatement"===this.node.type||"BreakStatement"===this.node.type||"ContinueStatement"===this.node.type},isES6:function(){switch(this.node.type){case"ExportNamedDeclaration":case"ExportSpecifier":case"ExportDefaultDeclaration":case"ExportAllDeclaration":case"ImportDeclaration":case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ArrowFunctionExpression":case"ForOfStatement":case"YieldExpression":case"Super":case"RestElement":case"RestProperty":case"SpreadElement":case"TemplateLiteral":case"ClassDeclaration":case"ClassExpression":return!0;case"VariableDeclaration":return this.node.kind&&"var"!==this.node.kind;case"FunctionDeclaration":case"FunctionExpression":return!!this.node.generator}}},b={};Object.keys(v).forEach(function(e){Object.defineProperty(b,e,{get:v[e]})}),t.exports={babelLiteralNode:p,asynchronize:function(e,t,n,r){try{return d(e,t,n,r)}catch(t){if(t instanceof SyntaxError){var i=e.origCode.substr(t.pos-t.loc.column);i=i.split("\n")[0],t.message+=" (nodent)\n"+i+"\n"+i.replace(/[\S ]/g,"-").substring(0,t.loc.column)+"^",t.stack=""}throw t}}}},{"./output":11,"./parser":12}],10:[function(e,t,n){(function(e){function n(t){function n(){for(var e=0;e<s.length;e+=2)for(var t=s[e+1],n=s[e],r=0;r<t.length;r++)t[r].call(null,n);s=[]}function r(e){return e&&e instanceof Object&&"function"==typeof e.then}function i(e){function i(e){var r;f||d<0||0===(r=h[d]).length||(s.push(p,r),h=[[],[]],2===s.length&&(e?n():t(n)))}function o(e){if(!(d>=0)){if(r(e))return e.then(o,a);d=0,p=e,i(!0)}}function a(e){if(!(d>=0)){if(r(e))return e.then(o,a);d=1,p=e,i(!0)}}function u(e,t){h[0].push(e),h[1].push(t),i()}function c(){return"EagerThenable{"+{"-1":"pending",0:"resolved",1:"rejected"}[d]+"}="+p.toString()}function l(){try{e.call(null,o,a)}catch(e){a(e)}}this.then=u,this.toString=c;var p,h=[[],[]],f=!0,d=-1;l(),f=!1,i()}var s=[];if(!t)try{t=e.nextTick}catch(e){t=function(e){setTimeout(e,0)}}return i.resolve=function(e){return r(e)?e:{then:function(t,n){return t(e)}}},i}t.exports=n}).call(this,e("_process"))},{_process:7}],11:[function(e,t,n){"use strict";function r(e){var t=y[e.type]||y[e.type+e.operator]||y[e.type+e.operator+(e.prefix?"prefix":"")];
+return void 0!==t?t:20}function i(e,t,n){var r=this[n||e.type];r?r.call(this,e,t):t.write(e,t.sourceAt(e.start,e.end))}function s(e,t,n,i){2===i||r(n)<r(t)||r(n)==r(t)&&(i||t.right===n)?(e.write(null,"("),this.out(n,e,n.type),e.write(null,")")):this.out(n,e,n.type)}function o(e,t){var n;if(t.write(null,"("),null!=e&&e.length>0){this.out(e[0],t,e[0].type);for(var r=1,i=e.length;r<i;r++)n=e[r],t.write(n,", "),this.out(n,t,n.type)}t.write(null,") ")}var a,u,c,l,p,h,f=e("source-map").SourceMapGenerator;if("".repeat)h=function(e,t){return t&&e?e.repeat(t):""};else{var d={};h=function(e,t){if(!t||!e)return"";var n=""+e+t;if(!d[n]){for(var r=[];t--;)r.push(e);d[n]=r.join("")}return d[n]}}var y={ExpressionStatement:-1,Identifier:21,Literal:21,BooleanLiteral:21,RegExpLiteral:21,NumericLiteral:21,StringLiteral:21,NullLiteral:21,ThisExpression:21,SuperExpression:21,ObjectExpression:21,ClassExpression:21,MemberExpression:19,CallExpression:18,NewExpression:18,ArrayExpression:17.5,FunctionExpression:17.5,FunctionDeclaration:17.5,ArrowFunctionExpression:17.5,"UpdateExpression++":17,"UpdateExpression--":17,"UpdateExpression++prefix":16,"UpdateExpression--prefix":16,UnaryExpression:16,AwaitExpression:16,"BinaryExpression**":15,"BinaryExpression*":15,"BinaryExpression/":15,"BinaryExpression%":15,"BinaryExpression+":14,"BinaryExpression-":14,"BinaryExpression<<":13,"BinaryExpression>>":13,"BinaryExpression>>>":13,"BinaryExpression<":12,"BinaryExpression<=":12,"BinaryExpression>":12,"BinaryExpression>=":12,BinaryExpressionin:12,BinaryExpressioninstanceof:12,"BinaryExpression==":11,"BinaryExpression===":11,"BinaryExpression!=":11,"BinaryExpression!==":11,"BinaryExpression&":10,"BinaryExpression^":9,"BinaryExpression|":8,"LogicalExpression&&":7,"LogicalExpression||":6,ConditionalExpression:5,AssignmentPattern:4,AssignmentExpression:4,yield:3,YieldExpression:3,SpreadElement:2,"comma-separated-list":1.5,SequenceExpression:1},m={type:"comma-separated-list"},g={out:i,expr:s,formatParameters:o,Program:function(e,t){var n,r,i=h(t.indent,t.indentLevel),s=t.lineEnd;n=e.body;for(var o=0,a=n.length;o<a;o++)r=n[o],t.write(null,i),this.out(r,t,r.type),t.write(null,s)},BlockStatement:p=function(e,t){var n,r,i=h(t.indent,t.indentLevel++),s=t.lineEnd,o=i+t.indent;if(t.write(e,"{"),n=e.body,null!=n&&n.length>0){t.write(null,s);for(var a=0,u=n.length;a<u;a++)r=n[a],t.write(null,o),this.out(r,t,r.type),t.write(null,s);t.write(null,i)}t.write(e.loc?{loc:{start:{line:e.loc.end.line,column:0}}}:null,"}"),t.indentLevel--},ClassBody:p,EmptyStatement:function(e,t){t.write(e,";")},ParenthesizedExpression:function(e,t){this.expr(t,e,e.expression,2)},ExpressionStatement:function(e,t){"FunctionExpression"===e.expression.type||"ObjectExpression"===e.expression.type?(t.write(null,"("),this.expr(t,e,e.expression),t.write(null,")")):this.expr(t,e,e.expression),t.write(null,";")},IfStatement:function(e,t){t.write(e,"if ("),this.out(e.test,t,e.test.type),t.write(null,") "),"BlockStatement"!==e.consequent.type&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1)),this.out(e.consequent,t,e.consequent.type),null!=e.alternate&&("BlockStatement"!==e.consequent.type&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel)),t.write(null," else "),"BlockStatement"!==e.alternate.type&&"IfStatement"!==e.alternate.type&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1)),this.out(e.alternate,t,e.alternate.type))},LabeledStatement:function(e,t){this.out(e.label,t,e.label.type),t.write(null,":"),this.out(e.body,t,e.body.type)},BreakStatement:function(e,t){t.write(e,"break"),e.label&&(t.write(null," "),this.out(e.label,t,e.label.type)),t.write(null,";")},ContinueStatement:function(e,t){t.write(e,"continue"),e.label&&(t.write(null," "),this.out(e.label,t,e.label.type)),t.write(null,";")},WithStatement:function(e,t){t.write(e,"with ("),this.out(e.object,t,e.object.type),t.write(null,") "),this.out(e.body,t,e.body.type)},SwitchStatement:function(e,t){var n,r,i,s=h(t.indent,t.indentLevel++),o=t.lineEnd;t.indentLevel++;var a=s+t.indent,u=a+t.indent;t.write(e,"switch ("),this.out(e.discriminant,t,e.discriminant.type),t.write(null,") {",o);for(var c=e.cases,l=0;l<c.length;l++){n=c[l],n.test?(t.write(n,a,"case "),this.out(n.test,t,n.test.type),t.write(null,":",o)):t.write(n,a,"default:",o),r=n.consequent;for(var p=0;p<r.length;p++)i=r[p],t.write(null,u),this.out(i,t,i.type),t.write(null,o)}t.indentLevel-=2,t.write(null,s,"}")},ReturnStatement:function(e,t){e.async&&t.write(e," async "),t.write(e,"return"),e.argument&&(t.write(null," "),this.out(e.argument,t,e.argument.type)),t.write(null,";")},ThrowStatement:function(e,t){e.async&&t.write(e," async "),t.write(e,"throw "),this.out(e.argument,t,e.argument.type),t.write(null,";")},TryStatement:function(e,t){var n;t.write(e,"try "),this.out(e.block,t,e.block.type),e.handler&&(n=e.handler,t.write(n," catch ("),this.out(n.param,t,n.param.type),t.write(null,") "),this.out(n.body,t,n.body.type)),e.finalizer&&(t.write(e.finalizer," finally "),this.out(e.finalizer,t,e.finalizer.type))},WhileStatement:function(e,t){t.write(e,"while ("),this.out(e.test,t,e.test.type),t.write(null,") "),"BlockStatement"!==e.body.type&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1)),this.out(e.body,t,e.body.type)},DoWhileStatement:function(e,t){t.write(e,"do "),"BlockStatement"!==e.body.type&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1)),this.out(e.body,t,e.body.type),t.write(null," while ("),this.out(e.test,t,e.test.type),t.write(null,");")},ForStatement:function(e,t){if(t.write(e,"for ("),null!=e.init){var n=e.init,r=n.type;t.inForInit++,this.out(n,t,r),t.inForInit--,"VariableDeclaration"!==r&&t.write(null,"; ")}else t.write(null,"; ");e.test&&this.out(e.test,t,e.test.type),t.write(null,"; "),e.update&&this.out(e.update,t,e.update.type),t.write(null,") "),"BlockStatement"!==e.body.type&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1)),this.out(e.body,t,e.body.type)},ForInStatement:a=function(e,t){t.write(e,"for (");var n=e.left,r=n.type;t.inForInit++,this.out(n,t,r),"V"===r[0]&&19===r.length&&t.back(),t.inForInit--,t.write(null,"I"===e.type[3]?" in ":" of "),this.out(e.right,t,e.right.type),t.write(null,") "),"BlockStatement"!==e.body.type&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1)),this.out(e.body,t,e.body.type)},ForOfStatement:a,DebuggerStatement:function(e,t){t.write(e,"debugger;")},Function:function(e,t){e.async&&t.write(e,"async "),t.write(e,e.generator?"function* ":"function "),e.id&&t.write(e.id,e.id.name),this.formatParameters(e.params,t),this.out(e.body,t,e.body.type)},FunctionDeclaration:function(e,t){this.Function(e,t),t.write(null,t.lineEnd,h(t.indent,t.indentLevel))},FunctionExpression:function(e,t){this.Function(e,t)},VariableDeclaration:function(e,t){var n=e.declarations;t.write(e,e.kind," ");var r=n.length;if(r>0){this.out(n[0],t,"VariableDeclarator");for(var i=1;i<r;i++)t.write(null,", "),this.out(n[i],t,"VariableDeclarator")}t.write(null,";")},VariableDeclarator:function(e,t){this.out(e.id,t,e.id.type),null!=e.init&&(t.write(null," = "),this.expr(t,m,e.init))},ClassDeclaration:function(e,t){t.write(e,"class "),e.id&&t.write(e.id,e.id.name+" "),e.superClass&&(t.write(null,"extends "),this.out(e.superClass,t,e.superClass.type),t.write(null," ")),this.out(e.body,t,"BlockStatement")},ImportSpecifier:function(e,t){e.local.name==e.imported.name?this.out(e.local,t,e.local.type):(this.out(e.imported,t,e.imported.type),t.write(null," as "),this.out(e.local,t,e.local.type))},ImportDefaultSpecifier:function(e,t){this.out(e.local,t,e.local.type)},ImportNamespaceSpecifier:function(e,t){t.write(null,"* as "),this.out(e.local,t,e.local.type)},ImportDeclaration:function(e,t){var n;t.write(e,"import ");var r=e.specifiers,i=r.length,s=!0;if(i>0){for(var n=0;n<i;n++)"ImportSpecifier"===r[n].type&&s&&(s=!1,t.write(null,"{")),this.out(r[n],t,r[n].type),n<i-1&&t.write(null,", ");"ImportSpecifier"===r[i-1].type&&t.write(null,"}"),t.write(null," from ")}t.write(e.source,e.source.raw),t.write(null,";")},ExportDefaultDeclaration:function(e,t){t.write(e,"export default "),this.out(e.declaration,t,e.declaration.type)},ExportSpecifier:function(e,t){e.local.name==e.exported.name?this.out(e.local,t,e.local.type):(this.out(e.local,t,e.local.type),t.write(null," as "),this.out(e.exported,t,e.exported.type))},ExportNamedDeclaration:function(e,t){if(t.write(e,"export "),e.declaration)this.out(e.declaration,t,e.declaration.type);else{var n=e.specifiers;if(t.write(e,"{"),n&&n.length>0)for(var r=0;r<n.length;r++)this.out(n[r],t,n[r].type),r<n.length-1&&t.write(null,", ");t.write(null,"}"),e.source&&t.write(e.source," from ",e.source.raw),t.write(null,";")}},ExportAllDeclaration:function(e,t){t.write(e,"export * from "),t.write(e.source,e.source.raw,";")},MethodDefinition:function(e,t){switch(e.value.async&&t.write(e,"async "),e.static&&t.write(e,"static "),e.kind){case"get":case"set":t.write(e,e.kind," ")}e.value.generator&&t.write(null,"*"),e.computed?(t.write(null,"["),this.out(e.key,t,e.key.type),t.write(null,"]")):this.out(e.key,t,e.key.type),this.formatParameters(e.value.params,t),this.out(e.value.body,t,e.value.body.type)},ClassMethod:function(e,t){switch(e.async&&t.write(e,"async "),e.static&&t.write(e,"static "),e.kind){case"get":case"set":t.write(e,e.kind," ")}e.generator&&t.write(null,"*"),e.computed?(t.write(null,"["),this.out(e.key,t,e.key.type),t.write(null,"]")):this.out(e.key,t,e.key.type),this.formatParameters(e.params,t),this.out(e.body,t,e.body.type)},ClassExpression:function(e,t){this.out(e,t,"ClassDeclaration")},ArrowFunctionExpression:function(e,t){e.async&&t.write(e,"async "),this.formatParameters(e.params,t),t.write(e,"=> "),"ObjectExpression"===e.body.type||"SequenceExpression"===e.body.type?(t.write(null,"("),this.out(e.body,t,e.body.type),t.write(null,")")):this.out(e.body,t,e.body.type)},ThisExpression:function(e,t){t.write(e,"this")},Super:function(e,t){t.write(e,"super")},RestElement:u=function(e,t){t.write(e,"..."),this.out(e.argument,t,e.argument.type)},SpreadElement:u,YieldExpression:function(e,t){t.write(e,e.delegate?"yield*":"yield"),e.argument&&(t.write(null," "),this.expr(t,e,e.argument))},AwaitExpression:function(e,t){t.write(e,"await "),this.expr(t,e,e.argument)},TemplateLiteral:function(e,t){var n,r=e.quasis,i=e.expressions;t.write(e,"`");for(var s=0,o=i.length;s<o;s++)n=i[s],t.write(r[s].value,r[s].value.raw),t.write(null,"${"),this.out(n,t,n.type),t.write(null,"}");t.write(r[r.length-1].value,r[r.length-1].value.raw),t.write(e,"`")},TaggedTemplateExpression:function(e,t){this.out(e.tag,t,e.tag.type),this.out(e.quasi,t,e.quasi.type)},ArrayExpression:l=function(e,t){if(t.write(e,"["),e.elements.length>0)for(var n=e.elements,r=n.length,i=0;;){var s=n[i];if(s&&this.expr(t,m,s),i+=1,(i<r||null===s)&&t.write(null,","),i>=r)break;t.lineLength()>t.wrapColumn&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1))}t.write(null,"]")},ArrayPattern:l,ObjectExpression:function(e,t){var n,r=h(t.indent,t.indentLevel++),i=t.lineEnd,s=r+t.indent;if(t.write(e,"{"),e.properties.length>0){t.write(null,i);for(var o=e.properties,a=o.length,u=0;n=o[u],t.write(null,s),this.out(n,t,"Property"),++u<a;)t.write(e,",",i),t.lineLength()>t.wrapColumn&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1));t.write(null,i,r,"}")}else t.write(null,"}");t.indentLevel--},Property:function(e,t){e.method||"get"===e.kind||"set"===e.kind?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write(null,"["),this.out(e.key,t,e.key.type),t.write(null,"]")):this.out(e.key,t,e.key.type),t.write(null,": ")),this.expr(t,m,e.value))},ObjectPattern:function(e,t){if(t.write(e,"{"),e.properties.length>0)for(var n=e.properties,r=n.length,i=0;this.out(n[i],t,"Property"),++i<r;)t.write(null,", ");t.write(null,"}")},SequenceExpression:function(e,t){var n,r=e.expressions;if(r.length>0)for(var i=r.length,s=0;s<i;s++)n=r[s],s&&t.write(null,", "),this.expr(t,m,n)},UnaryExpression:function(e,t){e.prefix?(t.write(e,e.operator),e.operator.length>1&&t.write(e," "),this.expr(t,e,e.argument,!0)):(this.expr(t,e,e.argument),t.write(e,e.operator))},UpdateExpression:function(e,t){e.prefix?(t.write(e,e.operator),this.out(e.argument,t,e.argument.type)):(this.out(e.argument,t,e.argument.type),t.write(e,e.operator))},BinaryExpression:c=function(e,t){var n=e.operator;"in"===n&&t.inForInit&&t.write(null,"("),this.expr(t,e,e.left),t.write(e," ",n," "),this.expr(t,e,e.right,"ArrowFunctionExpression"===e.right.type?2:0),"in"===n&&t.inForInit&&t.write(null,")")},LogicalExpression:c,AssignmentExpression:function(e,t){"ObjectPattern"===e.left.type&&t.write(null,"("),this.BinaryExpression(e,t),"ObjectPattern"===e.left.type&&t.write(null,")")},AssignmentPattern:function(e,t){this.expr(t,e,e.left),t.write(e," = "),this.expr(t,e,e.right)},ConditionalExpression:function(e,t){this.expr(t,e,e.test,!0),t.write(e," ? "),this.expr(t,e,e.consequent),t.write(null," : "),this.expr(t,e,e.alternate)},NewExpression:function(e,t){t.write(e,"new "),this.out(e,t,"CallExpression")},CallExpression:function(e,t){this.expr(t,e,e.callee,"ObjectExpression"===e.callee.type?2:0),t.write(e,"(");var n=e.arguments;if(n.length>0)for(var r=n.length,i=0;i<r;i++)0!=i&&t.write(null,", "),this.expr(t,m,n[i]);t.write(null,")")},MemberExpression:function(e,t){var n="ObjectExpression"===e.object.type||e.object.type.match(/Literal$/)&&e.object.raw.match(/^[0-9]/),i=!n&&("ArrayExpression"===e.object.type||"CallExpression"===e.object.type||"NewExpression"===e.object.type||r(e)<=r(e.object));i?this.out(e.object,t,e.object.type):(t.write(null,"("),this.out(e.object,t,e.object.type),t.write(null,")")),e.computed?(t.write(e,"["),this.out(e.property,t,e.property.type),t.write(null,"]")):(t.write(e,"."),this.out(e.property,t,e.property.type))},Identifier:function(e,t){t.write(e,e.name)},Literal:function(e,t){t.write(e,e.raw)},NullLiteral:function(e,t){t.write(e,"null")},BooleanLiteral:function(e,t){t.write(e,JSON.stringify(e.value))},StringLiteral:function(e,t){t.write(e,JSON.stringify(e.value))},RegExpLiteral:function(e,t){t.write(e,e.extra.raw||"/"+e.pattern+"/"+e.flags)},NumericLiteral:function(e,t){t.write(e,JSON.stringify(e.value))}};t.exports=function(e,t,n){function r(e){l=arguments[arguments.length-1];for(var n=1;n<arguments.length;n++){if(c&&e&&e.loc&&e.loc.start){var r=!1;c.addMapping({source:t.map.file,original:{line:e.loc.start.line,column:r?0:e.loc.start.column},generated:{line:t.map.startLine+u.length+1,column:r?0:a.length}})}if(arguments[n]===y.lineEnd){if(d.length&&(d.forEach(function(e){"Line"===e.type?a+=" // "+e.value:((" /*"+e.value+"*/").split("\n").forEach(function(e){a+=e,u.push(a),a=""}),a=u.pop())}),d=[]),u.push(a),a="",p.length){var i=u.pop();p.forEach(function(e){var t=h(y.indent,e.indent);"Line"===e.type?u.push(t+"//"+e.value):(t+"/*"+e.value+"*/").split("\n").forEach(function(e){u.push(e)})}),u.push(i),p=[]}}else a+=arguments[n],e&&e.$comments&&(e.$comments.forEach(function(t){var n=e.loc.start.column<t.loc.start.column;t.indent=y.indentLevel,n?d.push(t):p.push(t)}),e.$comments=null)}}function i(){return a.length}function s(e,t){return n?n.substring(e,t):"/* Omitted Non-standard node */"}function o(){a=a.substring(0,a.length-l.length)}t=t||{};var a="",u=[],c=t.map&&new f(t.map);c&&t.map.sourceContent&&c.setSourceContent(t.map.file,t.map.sourceContent);var l="",p=[],d=[],y={inForInit:0,lineLength:i,sourceAt:s,write:r,back:o,indent:" ",lineEnd:"\n",indentLevel:0,wrapColumn:80};g[e.type](e,y),d=e.$comments||[],y.write(e,y.lineEnd);var m=u.join(y.lineEnd);return t&&t.map?{code:m,map:c}:m}},{"source-map":37}],12:[function(e,t,n){"use strict";function r(e,t){["start","end","loc","range"].forEach(function(n){n in e&&!(n in t)&&(t[n]=e[n])})}function i(e,t,n){function r(e){e.replace=l.replace,e.append=l.append,e.index?(Object.defineProperties(e,{index:{enumerable:!0,get:l.index}}),e.remove=l.removeElement):e.remove=l.removeNode,n.unshift(e),i(e.self,t,n),n.shift()}function s(){e.type in c&&c[e.type](e,n,function t(i,s,o){if(i===e)return c[o||e.type](e,n,t);for(var a=Object.keys(e),u=0;u<a.length;u++){var l=e[a[u]];Array.isArray(l)?l.indexOf(i)>=0&&r({self:i,parent:e,field:a[u],index:!0}):l instanceof Object&&i===l&&r({self:i,parent:e,field:a[u]})}})}return n||(n=[{self:e}],n.replace=function(e,t){n[e].replace(t)}),t(e,s,n),e}function s(e,t){var n=[],r={plugins:{asyncawait:{asyncExits:!0,awaitAnywhere:!0}},ecmaVersion:7,allowHashBang:!0,allowReturnOutsideFunction:!0,allowImportExportEverywhere:!0,locations:!0,onComment:n};if(t)for(var s in t)r[s]=t[s];var a=o.parse(e,r);return i(a,function(e,t,r){for(t();n.length&&e.loc&&e.loc.start.line>=n[0].loc.start.line&&e.loc.end.line>=n[0].loc.end.line;)e.$comments=e.$comments||[],e.$comments.push(n.shift())}),a}var o=e("acorn"),a=e("acorn/dist/walk"),u={AwaitExpression:function(e,t,n){n(e.argument,t,"Expression")},SwitchStatement:function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0;r<e.cases.length;++r)n(e.cases[r],t)},SwitchCase:function(e,t,n){e.test&&n(e.test,t,"Expression");for(var r=0;r<e.consequent.length;++r)n(e.consequent[r],t,"Statement")},TryStatement:function(e,t,n){n(e.block,t,"Statement"),e.handler&&n(e.handler,t,"Statement"),e.finalizer&&n(e.finalizer,t,"Statement")},CatchClause:function(e,t,n){n(e.param,t,"Pattern"),n(e.body,t,"ScopeBody")},Class:function(e,t,n){e.id&&n(e.id,t,"Pattern"),e.superClass&&n(e.superClass,t,"Expression"),n(e.body,t)},ClassBody:function(e,t,n){for(var r=0;r<e.body.length;r++)n(e.body[r],t)},ClassProperty:function(e,t,n){e.key&&n(e.key,t,"Expression"),e.value&&n(e.value,t,"Expression")},ClassMethod:function(e,t,n){e.key&&n(e.key,t,"Expression"),n(e,t,"Function")},ObjectProperty:function(e,t,n){e.key&&n(e.key,t,"Expression"),e.value&&n(e.value,t,"Expression")},ObjectMethod:function(e,t,n){e.key&&n(e.key,t,"Expression"),n(e,t,"Function")}},c=a.make(u),l={replace:function(e){return Array.isArray(e)&&1===e.length&&(e=e[0]),"index"in this?(r(this.parent[this.field][this.index],e),Array.isArray(e)?[].splice.apply(this.parent[this.field],[this.index,1].concat(e)):this.parent[this.field][this.index]=e):(r(this.parent[this.field],e),Array.isArray(e)?this.parent[this.field]={type:"BlockStatement",body:e}:this.parent[this.field]=e),this.self},append:function(e){if(Array.isArray(e)&&1===e.length&&(e=e[0]),!("index"in this))throw new Error("Cannot append Element node to non-array");return Array.isArray(e)?[].splice.apply(this.parent[this.field],[this.index+1,0].concat(e)):this.parent[this.field].splice(this.index+1,0,e),this.self},index:function(){return this.parent[this.field].indexOf(this.self)},removeElement:function(){return this.parent[this.field].splice(this.index,1)[0]},removeNode:function(){var e=this.parent[this.field];return delete this.parent[this.field],e}};e("acorn-es7-plugin")(o),t.exports={parse:s,treeWalker:i,_acorn:o}},{acorn:18,"acorn-es7-plugin":15,"acorn/dist/walk":19}],13:[function(e,t,n){function r(e,t){var n=this;return new e(function(e,r){function i(t,n){var o;try{if(o=t.call(s,n),o.done){if(o.value!==e){if(o.value&&o.value===o.value.then)return o.value(e,r);e&&e(o.value),e=null}return}o.value.then?o.value.then(function(e){i(s.next,e)},function(e){i(s.throw,e)}):i(s.next,o.value)}catch(e){return r&&r(e),void(r=null)}}var s=n.call(t,e,r);i(s.next)})}var i=new Function("self","catcher",(" var resolver = this; if (catcher===true) { if (!Function.prototype.$asyncbind.EagerThenable) Function.prototype.$asyncbind.EagerThenable = "+e("./eager.js").toString()+"(); return new (Function.prototype.$asyncbind.EagerThenable)(boundThen); } if (catcher) { if (Function.prototype.$asyncbind.wrapAsyncStack) catcher = Function.prototype.$asyncbind.wrapAsyncStack(catcher); return then; } function then(result,error){ try { return result && (result instanceof Object) && typeof result.then==='function' ? result.then(then,catcher) : resolver.call(self,result,error||catcher); } catch (ex) { return (error||catcher)(ex); } } function boundThen(result,error) { return resolver.call(self,result,error); } boundThen.then = boundThen; return boundThen; ").replace(/\s+/g," "));t.exports={$asyncbind:i,$asyncspawn:r}},{"./eager.js":10}],14:[function(e,t,n){function r(e){return e.then=e}r.resolve=function(e){return r.isThenable(e)?e:{then:function(t){return t(e)}}},r.isThenable=function(e){return e&&e instanceof Object&&"function"==typeof e.then},t.exports=r},{}],15:[function(e,t,n){t.exports=function(t){switch(parseInt(t.version)){case 2:case 3:t.plugins.asyncawait=e("./acorn-v3");break;case 4:t.plugins.asyncawait=e("./acorn-v4");break;default:throw new Error("acorn-es7-plugin requires Acorn v2, 3 or 4")}return t}},{"./acorn-v3":16,"./acorn-v4":17}],16:[function(e,t,n){function r(e,t){return e.lineStart>=t}function i(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(h,"$1 $3")),e.test(r)}function s(e){return"state"in e&&e.state.constructor&&"State"===e.state.constructor.name?e.state:e}function o(e,t,n,r){var i=new e.constructor(e.options,e.input,t);if(n)for(var o in n)i[o]=n[o];var a=s(e),u=s(i);return["inFunction","inAsyncFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in a&&(u[e]=a[e])}),r&&(i.options.preserveParens=!0),i.nextToken(),i}function a(e,t){var n=function(){};e.extend("initialContext",function(r){return function(){return this.options.ecmaVersion<7&&(n=function(t){e.raise(t.start,"async/await keywords only available when ecmaVersion>=7")}),this.reservedWords=new RegExp(this.reservedWords.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.reservedWordsStrict=new RegExp(this.reservedWordsStrict.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.reservedWordsStrictBind=new RegExp(this.reservedWordsStrictBind.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.inAsyncFunction=t.inAsyncFunction,t.awaitAnywhere&&t.inAsyncFunction&&e.raise(node.start,"The options awaitAnywhere and inAsyncFunction are mutually exclusive"),r.apply(this,arguments)}}),e.extend("shouldParseExportStatement",function(e){return function(){return!("name"!==this.type.label||"async"!==this.value||!i(l,s(this)))||e.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var o=s(this),a=o.start,u=o.startLoc;if("name"===o.type.label)if(i(l,o,!0)){var p=o.inAsyncFunction;try{o.inAsyncFunction=!0,this.next();var h=this.parseStatement(n,r);return h.async=!0,h.start=a,h.loc&&(h.loc.start=u),h.range&&(h.range[0]=a),h}finally{o.inAsyncFunction=p}}else if("object"==typeof t&&t.asyncExits&&i(c,o)){this.next();var h=this.parseStatement(n,r);return h.async=!0,h.start=a,h.loc&&(h.loc.start=u),h.range&&(h.range[0]=a),h}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(t){var n=e.apply(this,arguments),r=s(this);return r.inAsyncFunction&&"await"===n.name&&0===arguments.length&&this.raise(n.start,"'await' is reserved within async functions"),n}}),e.extend("parseExprAtom",function(e){return function(i){var a,c=s(this),l=c.start,h=c.startLoc,f=e.apply(this,arguments);if("Identifier"===f.type)if("async"!==f.name||r(c,f.end)){if("await"===f.name){var d=this.startNodeAt(f.start,f.loc&&f.loc.start);if(c.inAsyncFunction)return a=this.parseExprSubscripts(),d.operator="await",d.argument=a,d=this.finishNodeAt(d,"AwaitExpression",a.end,a.loc&&a.loc.end),n(d),d;if(c.input.slice(f.end).match(p))return f;if("object"==typeof t&&t.awaitAnywhere&&(l=c.start,a=o(this,l-4).parseExprSubscripts(),a.end<=l))return a=o(this,l).parseExprSubscripts(),d.operator="await",d.argument=a,d=this.finishNodeAt(d,"AwaitExpression",a.end,a.loc&&a.loc.end),c.pos=a.end,this.end=a.end,this.endLoc=a.endLoc,this.next(),n(d),d;if(!t.awaitAnywhere&&"module"===this.options.sourceType)return this.raise(f.start,"'await' is reserved within modules")}}else{var y=c.inAsyncFunction;try{c.inAsyncFunction=!0;var m=this,g=!1,v={parseFunctionBody:function(e,t){try{var n=g;return g=!0,m.parseFunctionBody.apply(this,arguments)}finally{g=n}},raise:function(){try{return m.raise.apply(this,arguments)}catch(e){throw g?e:u}}};if(a=o(this,c.start,v,!0).parseExpression(),"SequenceExpression"===a.type&&(a=a.expressions[0]),"FunctionExpression"===a.type||"FunctionDeclaration"===a.type||"ArrowFunctionExpression"===a.type)return a=o(this,c.start,v).parseExpression(),"SequenceExpression"===a.type&&(a=a.expressions[0]),a.async=!0,a.start=l,a.loc&&(a.loc.start=h),a.range&&(a.range[0]=l),c.pos=a.end,this.end=a.end,this.endLoc=a.endLoc,this.next(),n(a),a}catch(e){if(e!==u)throw e}finally{c.inAsyncFunction=y}}return f}}),e.extend("finishNodeAt",function(e){return function(t,n,r,i){return t.__asyncValue&&(delete t.__asyncValue,t.value.async=!0),e.apply(this,arguments)}}),e.extend("finishNode",function(e){return function(t,n){return t.__asyncValue&&(delete t.__asyncValue,t.value.async=!0),e.apply(this,arguments)}}),e.extend("parsePropertyName",function(e){return function(t){var i=s(this),o=e.apply(this,arguments);return"Identifier"!==o.type||"async"!==o.name||r(i,o.end)||i.input.slice(o.end).match(p)||(n(t),o=e.apply(this,arguments),"Identifier"===o.type&&("constructor"===o.name?this.raise(o.start,"'constructor()' cannot be be async"):"set"===o.name&&this.raise(o.start,"'set <member>(value)' cannot be be async")),t.__asyncValue=!0),o}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i,o;n.__asyncValue&&(i=s(this),o=i.inAsyncFunction,i.inAsyncFunction=!0);var a=e.apply(this,arguments);return i&&(i.inAsyncFunction=o),a}}),e.extend("parsePropertyValue",function(e){return function(t,n,r,i,o,a){var u,c;t.__asyncValue&&(u=s(this),c=u.inAsyncFunction,u.inAsyncFunction=!0);var l=e.apply(this,arguments);return u&&(u.inAsyncFunction=c),l}})}var u={},c=/^async[\t ]+(return|throw)/,l=/^async[\t ]+function/,p=/^\s*[):;]/,h=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g;t.exports=a},{}],17:[function(e,t,n){function r(e,t){return e.lineStart>=t}function i(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(l,"$1 $3")),e.test(r)}function s(e){return"state"in e&&e.state.constructor&&"State"===e.state.constructor.name?e.state:e}function o(e,t,n){var r=new e.constructor(e.options,e.input,t);if(n)for(var i in n)r[i]=n[i];var o=s(e),a=s(r);return["inFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in o&&(a[e]=o[e])}),r.nextToken(),r}function a(e,t){t&&"object"==typeof t||(t={}),e.extend("parse",function(n){return function(){return this.inAsync=t.inAsyncFunction,t.awaitAnywhere&&t.inAsyncFunction&&e.raise(node.start,"The options awaitAnywhere and inAsyncFunction are mutually exclusive"),n.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var o=s(this),a=o.start,c=o.startLoc;if("name"===o.type.label&&t.asyncExits&&i(u,o)){this.next();var l=this.parseStatement(n,r);return l.async=!0,l.start=a,l.loc&&(l.loc.start=c),l.range&&(l.range[0]=a),l}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(n){return"module"===this.options.sourceType&&this.options.ecmaVersion>=8&&t.awaitAnywhere?e.call(this,!0):e.apply(this,arguments)}}),e.extend("parseExprAtom",function(e){var n={};return function(r){var i,a=s(this),u=a.start,c=(a.startLoc,e.apply(this,arguments));if("Identifier"===c.type&&"await"===c.name&&!a.inAsync&&t.awaitAnywhere){var l=this.startNodeAt(c.start,c.loc&&c.loc.start);u=a.start;var p={raise:function(){try{return pp.raise.apply(this,arguments)}catch(e){throw n}}};try{if(i=o(this,u-4,p).parseExprSubscripts(),i.end<=u)return i=o(this,u,p).parseExprSubscripts(),l.argument=i,l=this.finishNodeAt(l,"AwaitExpression",i.end,i.loc&&i.loc.end),a.pos=i.end,this.end=i.end,this.endLoc=i.endLoc,this.next(),l}catch(e){if(e===n)return c;throw e}}return c}}),e.extend("parsePropertyName",function(e){return function(t){var n=s(this),i=e.apply(this,arguments);return"Identifier"!==i.type||"async"!==i.name||r(n,i.end)||n.input.slice(i.end).match(c)||(n.__isAsyncProp=!0,i=e.apply(this,arguments),"Identifier"===i.type&&("constructor"===i.name?this.raise(i.start,"'constructor()' cannot be be async"):"set"===i.name&&this.raise(i.start,"'set <member>(value)' cannot be be async"))),i}}),e.extend("parseFunctionBody",function(e){return function(t,n){var r=s(this),i=r.inAsync;r.__isAsyncProp&&(t.async=!0,r.inAsync=!0,delete r.__isAsyncProp);var o=e.apply(this,arguments);return r.inAsync=i,o}})}var u=/^async[\t ]+(return|throw)/,c=/^\s*[):;]/,l=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g;t.exports=a},{}],18:[function(e,t,n){!function(e,r){"object"==typeof n&&"undefined"!=typeof t?r(n):"function"==typeof define&&define.amd?define(["exports"],r):r(e.acorn=e.acorn||{})}(this,function(e){"use strict";function t(e,t){for(var n=65536,r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}}function n(e,n){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&k.test(String.fromCharCode(e)):n!==!1&&t(e,_)))}function r(e,n){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&A.test(String.fromCharCode(e)):n!==!1&&(t(e,_)||t(e,C)))))}function i(e,t){return new L(e,{beforeExpr:!0,binop:t})}function s(e,t){return void 0===t&&(t={}),t.keyword=e,O[e]=new L(e,t)}function o(e){return 10===e||13===e||8232===e||8233==e}function a(e){return"[object Array]"===Object.prototype.toString.call(e)}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){for(var n=1,r=0;;){B.lastIndex=r;var i=B.exec(e);if(!(i&&i.index<t))return new M(n,t-r);++n,r=i.index+i[0].length}}function l(e){var t={};for(var n in D)t[n]=e&&u(e,n)?e[n]:D[n];if(null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),a(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return a(t.onComment)&&(t.onComment=p(t,t.onComment)),t}function p(e,t){return function(n,r,i,s,o,a){var u={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(u.loc=new I(this,o,a)),e.ranges&&(u.range=[i,s]),t.push(u)}}function h(e){return new RegExp("^("+e.replace(/ /g,"|")+")$")}function f(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}function d(e,t,n,r){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&r.raise(n,"Error parsing regular expression: "+e.message),
+e}}function y(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(1023&e)+56320))}function m(e,t){return new V(t,e).parse()}function g(e,t,n){var r=new V(n,e,t);return r.nextToken(),r.parseExpression()}function v(e,t){return new V(t,e)}var b={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",7:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},x="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",w={5:x,6:x+" const class extends export import super"},E="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",S="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",k=new RegExp("["+E+"]"),A=new RegExp("["+E+S+"]");E=S=null;var _=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,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,449,56,264,8,2,36,18,0,50,29,881,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,0,32,6124,20,754,9486,1,3071,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,10591,541],C=[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,838,7,2,7,17,9,57,21,2,13,19882,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],L=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null},T={beforeExpr:!0},R={startsExpr:!0},O={},P={num:new L("num",R),regexp:new L("regexp",R),string:new L("string",R),name:new L("name",R),eof:new L("eof"),bracketL:new L("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new L("]"),braceL:new L("{",{beforeExpr:!0,startsExpr:!0}),braceR:new L("}"),parenL:new L("(",{beforeExpr:!0,startsExpr:!0}),parenR:new L(")"),comma:new L(",",T),semi:new L(";",T),colon:new L(":",T),dot:new L("."),question:new L("?",T),arrow:new L("=>",T),template:new L("template"),ellipsis:new L("...",T),backQuote:new L("`",R),dollarBraceL:new L("${",{beforeExpr:!0,startsExpr:!0}),eq:new L("=",{beforeExpr:!0,isAssign:!0}),assign:new L("_=",{beforeExpr:!0,isAssign:!0}),incDec:new L("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new L("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:i("||",1),logicalAND:i("&&",2),bitwiseOR:i("|",3),bitwiseXOR:i("^",4),bitwiseAND:i("&",5),equality:i("==/!=",6),relational:i("</>",7),bitShift:i("<</>>",8),plusMin:new L("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:i("%",10),star:i("*",10),slash:i("/",10),starstar:new L("**",{beforeExpr:!0}),_break:s("break"),_case:s("case",T),_catch:s("catch"),_continue:s("continue"),_debugger:s("debugger"),_default:s("default",T),_do:s("do",{isLoop:!0,beforeExpr:!0}),_else:s("else",T),_finally:s("finally"),_for:s("for",{isLoop:!0}),_function:s("function",R),_if:s("if"),_return:s("return",T),_switch:s("switch"),_throw:s("throw",T),_try:s("try"),_var:s("var"),_const:s("const"),_while:s("while",{isLoop:!0}),_with:s("with"),_new:s("new",{beforeExpr:!0,startsExpr:!0}),_this:s("this",R),_super:s("super",R),_class:s("class"),_extends:s("extends",T),_export:s("export"),_import:s("import"),_null:s("null",R),_true:s("true",R),_false:s("false",R),_in:s("in",{beforeExpr:!0,binop:7}),_instanceof:s("instanceof",{beforeExpr:!0,binop:7}),_typeof:s("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:s("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:s("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},N=/\r\n?|\n|\u2028|\u2029/,B=new RegExp(N.source,"g"),F=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,j=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,M=function(e,t){this.line=e,this.column=t};M.prototype.offset=function(e){return new M(this.line,this.column+e)};var I=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)},D={ecmaVersion:6,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{}},$={},V=function(e,t,n){this.options=e=l(e),this.sourceFile=e.sourceFile,this.keywords=h(w[e.ecmaVersion>=6?6:5]);var r=e.allowReserved?"":b[e.ecmaVersion]+("module"==e.sourceType?" await":"");this.reservedWords=h(r);var i=(r?r+" ":"")+b.strict;this.reservedWordsStrict=h(i),this.reservedWordsStrictBind=h(i+" "+b.strictBind),this.input=String(t),this.containsEsc=!1,this.loadPlugins(e.plugins),n?(this.pos=n,this.lineStart=Math.max(0,this.input.lastIndexOf("\n",n)),this.curLine=this.input.slice(0,this.lineStart).split(N).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=P.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.strict=this.inModule="module"===e.sourceType,this.potentialArrowAt=-1,this.inFunction=this.inGenerator=!1,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2)};V.prototype.isKeyword=function(e){return this.keywords.test(e)},V.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},V.prototype.extend=function(e,t){this[e]=t(this[e])},V.prototype.loadPlugins=function(e){var t=this;for(var n in e){var r=$[n];if(!r)throw new Error("Plugin '"+n+"' not found");r(t,e[n])}},V.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var U=V.prototype;U.isUseStrict=function(e){return this.options.ecmaVersion>=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"use strict"===e.expression.raw.slice(1,-1)},U.eat=function(e){return this.type===e&&(this.next(),!0)},U.isContextual=function(e){return this.type===P.name&&this.value===e},U.eatContextual=function(e){return this.value===e&&this.eat(P.name)},U.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},U.canInsertSemicolon=function(){return this.type===P.eof||this.type===P.braceR||N.test(this.input.slice(this.lastTokEnd,this.start))},U.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},U.semicolon=function(){this.eat(P.semi)||this.insertSemicolon()||this.unexpected()},U.afterTrailingComma=function(e){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),this.next(),!0},U.expect=function(e){this.eat(e)||this.unexpected()},U.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var q=function(){this.shorthandAssign=0,this.trailingComma=0};U.checkPatternErrors=function(e,t){var n=e&&e.trailingComma;return t?void(n&&this.raise(n,"Comma is not permitted after the rest element")):!!n},U.checkExpressionErrors=function(e,t){var n=e&&e.shorthandAssign;return t?void(n&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")):!!n};var W=V.prototype;W.parseTopLevel=function(e){var t=this,n=!0;for(e.body||(e.body=[]);this.type!==P.eof;){var r=t.parseStatement(!0,!0);e.body.push(r),n&&(t.isUseStrict(r)&&t.setStrict(!0),n=!1)}return this.next(),this.options.ecmaVersion>=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var z={kind:"loop"},Y={kind:"switch"};W.isLet=function(){if(this.type!==P.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;j.lastIndex=this.pos;var e=j.exec(this.input),t=this.pos+e[0].length,i=this.input.charCodeAt(t);if(91===i||123==i)return!0;if(n(i,!0)){for(var s=t+1;r(this.input.charCodeAt(s),!0);++s);var o=this.input.slice(t,s);if(!this.isKeyword(o))return!0}return!1},W.parseStatement=function(e,t){var n,r=this.type,i=this.startNode();switch(this.isLet()&&(r=P._var,n="let"),r){case P._break:case P._continue:return this.parseBreakContinueStatement(i,r.keyword);case P._debugger:return this.parseDebuggerStatement(i);case P._do:return this.parseDoStatement(i);case P._for:return this.parseForStatement(i);case P._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i);case P._class:return e||this.unexpected(),this.parseClass(i,!0);case P._if:return this.parseIfStatement(i);case P._return:return this.parseReturnStatement(i);case P._switch:return this.parseSwitchStatement(i);case P._throw:return this.parseThrowStatement(i);case P._try:return this.parseTryStatement(i);case P._const:case P._var:return n=n||this.value,e||"var"==n||this.unexpected(),this.parseVarStatement(i,n);case P._while:return this.parseWhileStatement(i);case P._with:return this.parseWithStatement(i);case P.braceL:return this.parseBlock();case P.semi:return this.parseEmptyStatement(i);case P._export:case P._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===P._import?this.parseImport(i):this.parseExport(i);default:var s=this.value,o=this.parseExpression();return r===P.name&&"Identifier"===o.type&&this.eat(P.colon)?this.parseLabeledStatement(i,s,o):this.parseExpressionStatement(i,o)}},W.parseBreakContinueStatement=function(e,t){var n=this,r="break"==t;this.next(),this.eat(P.semi)||this.insertSemicolon()?e.label=null:this.type!==P.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var s=n.labels[i];if(null==e.label||s.name===e.label.name){if(null!=s.kind&&(r||"loop"===s.kind))break;if(e.label&&r)break}}return i===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},W.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},W.parseDoStatement=function(e){return this.next(),this.labels.push(z),e.body=this.parseStatement(!1),this.labels.pop(),this.expect(P._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(P.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},W.parseForStatement=function(e){if(this.next(),this.labels.push(z),this.expect(P.parenL),this.type===P.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===P._var||this.type===P._const||t){var n=this.startNode(),r=t?"let":this.value;return this.next(),this.parseVar(n,!0,r),this.finishNode(n,"VariableDeclaration"),!(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==r&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var i=new q,s=this.parseExpression(!0,i);return this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.checkPatternErrors(i,!0),this.toAssignable(s),this.checkLVal(s),this.parseForIn(e,s)):(this.checkExpressionErrors(i,!0),this.parseFor(e,s))},W.parseFunctionStatement=function(e){return this.next(),this.parseFunction(e,!0)},W.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!1),e.alternate=this.eat(P._else)?this.parseStatement(!1):null,this.finishNode(e,"IfStatement")},W.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(P.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},W.parseSwitchStatement=function(e){var t=this;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(P.braceL),this.labels.push(Y);for(var n,r=!1;this.type!=P.braceR;)if(t.type===P._case||t.type===P._default){var i=t.type===P._case;n&&t.finishNode(n,"SwitchCase"),e.cases.push(n=t.startNode()),n.consequent=[],t.next(),i?n.test=t.parseExpression():(r&&t.raiseRecoverable(t.lastTokStart,"Multiple default clauses"),r=!0,n.test=null),t.expect(P.colon)}else n||t.unexpected(),n.consequent.push(t.parseStatement(!0));return n&&this.finishNode(n,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},W.parseThrowStatement=function(e){return this.next(),N.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var G=[];W.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===P._catch){var t=this.startNode();this.next(),this.expect(P.parenL),t.param=this.parseBindingAtom(),this.checkLVal(t.param,!0),this.expect(P.parenR),t.body=this.parseBlock(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(P._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},W.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},W.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(z),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},W.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},W.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},W.parseLabeledStatement=function(e,t,n){for(var r=this,i=0;i<this.labels.length;++i)r.labels[i].name===t&&r.raise(n.start,"Label '"+t+"' is already declared");for(var s=this.type.isLoop?"loop":this.type===P._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var a=r.labels[o];if(a.statementStart!=e.start)break;a.statementStart=r.start,a.kind=s}return this.labels.push({name:t,kind:s,statementStart:this.start}),e.body=this.parseStatement(!0),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},W.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},W.parseBlock=function(e){var t,n=this,r=this.startNode(),i=!0;for(r.body=[],this.expect(P.braceL);!this.eat(P.braceR);){var s=n.parseStatement(!0);r.body.push(s),i&&e&&n.isUseStrict(s)&&(t=n.strict,n.setStrict(n.strict=!0)),i=!1}return t===!1&&this.setStrict(!1),this.finishNode(r,"BlockStatement")},W.parseFor=function(e,t){return e.init=t,this.expect(P.semi),e.test=this.type===P.semi?null:this.parseExpression(),this.expect(P.semi),e.update=this.type===P.parenR?null:this.parseExpression(),this.expect(P.parenR),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},W.parseForIn=function(e,t){var n=this.type===P._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(P.parenR),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},W.parseVar=function(e,t,n){var r=this;for(e.declarations=[],e.kind=n;;){var i=r.startNode();if(r.parseVarId(i),r.eat(P.eq)?i.init=r.parseMaybeAssign(t):"const"!==n||r.type===P._in||r.options.ecmaVersion>=6&&r.isContextual("of")?"Identifier"==i.id.type||t&&(r.type===P._in||r.isContextual("of"))?i.init=null:r.raise(r.lastTokEnd,"Complex binding patterns require an initialization value"):r.unexpected(),e.declarations.push(r.finishNode(i,"VariableDeclarator")),!r.eat(P.comma))break}return e},W.parseVarId=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0)},W.parseFunction=function(e,t,n){this.initFunction(e),this.options.ecmaVersion>=6&&(e.generator=this.eat(P.star));var r=this.inGenerator;return this.inGenerator=e.generator,(t||this.type===P.name)&&(e.id=this.parseIdent()),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=r,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},W.parseFunctionParams=function(e){this.expect(P.parenL),e.params=this.parseBindingList(P.parenR,!1,!1,!0)},W.parseClass=function(e,t){var n=this;this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var r=this.startNode(),i=!1;for(r.body=[],this.expect(P.braceL);!this.eat(P.braceR);)if(!n.eat(P.semi)){var s=n.startNode(),o=n.eat(P.star),a=n.type===P.name&&"static"===n.value;n.parsePropertyName(s),s.static=a&&n.type!==P.parenL,s.static&&(o&&n.unexpected(),o=n.eat(P.star),n.parsePropertyName(s)),s.kind="method";var u=!1;if(!s.computed){var c=s.key;o||"Identifier"!==c.type||n.type===P.parenL||"get"!==c.name&&"set"!==c.name||(u=!0,s.kind=c.name,c=n.parsePropertyName(s)),!s.static&&("Identifier"===c.type&&"constructor"===c.name||"Literal"===c.type&&"constructor"===c.value)&&(i&&n.raise(c.start,"Duplicate constructor in the same class"),u&&n.raise(c.start,"Constructor can't have get/set modifier"),o&&n.raise(c.start,"Constructor can't be a generator"),s.kind="constructor",i=!0)}if(n.parseClassMethod(r,s,o),u){var l="get"===s.kind?0:1;if(s.value.params.length!==l){var p=s.value.start;"get"===s.kind?n.raiseRecoverable(p,"getter should have no params"):n.raiseRecoverable(p,"setter should have exactly one param")}"set"===s.kind&&"RestElement"===s.value.params[0].type&&n.raise(s.value.params[0].start,"Setter cannot use rest params")}}return e.body=this.finishNode(r,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},W.parseClassMethod=function(e,t,n){t.value=this.parseMethod(n),e.body.push(this.finishNode(t,"MethodDefinition"))},W.parseClassId=function(e,t){e.id=this.type===P.name?this.parseIdent():t?this.unexpected():null},W.parseClassSuper=function(e){e.superClass=this.eat(P._extends)?this.parseExprSubscripts():null},W.parseExport=function(e){var t=this;if(this.next(),this.eat(P.star))return this.expectContextual("from"),e.source=this.type===P.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(P._default)){var n=this.type==P.parenL,r=this.parseMaybeAssign(),i=!0;return n||"FunctionExpression"!=r.type&&"ClassExpression"!=r.type||(i=!1,r.id&&(r.type="FunctionExpression"==r.type?"FunctionDeclaration":"ClassDeclaration")),e.declaration=r,i&&this.semicolon(),this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.eatContextual("from"))e.source=this.type===P.string?this.parseExprAtom():this.unexpected();else{for(var s=0;s<e.specifiers.length;s++)(t.keywords.test(e.specifiers[s].local.name)||t.reservedWords.test(e.specifiers[s].local.name))&&t.unexpected(e.specifiers[s].local.start);e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},W.shouldParseExportStatement=function(){return this.type.keyword||this.isLet()},W.parseExportSpecifiers=function(){var e=this,t=[],n=!0;for(this.expect(P.braceL);!this.eat(P.braceR);){if(n)n=!1;else if(e.expect(P.comma),e.afterTrailingComma(P.braceR))break;var r=e.startNode();r.local=e.parseIdent(e.type===P._default),r.exported=e.eatContextual("as")?e.parseIdent(!0):r.local,t.push(e.finishNode(r,"ExportSpecifier"))}return t},W.parseImport=function(e){return this.next(),this.type===P.string?(e.specifiers=G,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===P.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},W.parseImportSpecifiers=function(){var e=this,t=[],n=!0;if(this.type===P.name){var r=this.startNode();if(r.local=this.parseIdent(),this.checkLVal(r.local,!0),t.push(this.finishNode(r,"ImportDefaultSpecifier")),!this.eat(P.comma))return t}if(this.type===P.star){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLVal(i.local,!0),t.push(this.finishNode(i,"ImportNamespaceSpecifier")),t}for(this.expect(P.braceL);!this.eat(P.braceR);){if(n)n=!1;else if(e.expect(P.comma),e.afterTrailingComma(P.braceR))break;var s=e.startNode();s.imported=e.parseIdent(!0),e.eatContextual("as")?s.local=e.parseIdent():(s.local=s.imported,e.isKeyword(s.local.name)&&e.unexpected(s.local.start),e.reservedWordsStrict.test(s.local.name)&&e.raise(s.local.start,"The keyword '"+s.local.name+"' is reserved")),e.checkLVal(s.local,!0),t.push(e.finishNode(s,"ImportSpecifier"))}return t};var J=V.prototype;J.toAssignable=function(e,t){var n=this;if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var r=0;r<e.properties.length;r++){var i=e.properties[r];"init"!==i.kind&&n.raise(i.key.start,"Object pattern can't contain getter or setter"),n.toAssignable(i.value,t)}break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t);break;case"AssignmentExpression":if("="!==e.operator){this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break}e.type="AssignmentPattern",delete e.operator;case"AssignmentPattern":"YieldExpression"===e.right.type&&this.raise(e.right.start,"Yield expression cannot be a default value");break;case"ParenthesizedExpression":e.expression=this.toAssignable(e.expression,t);break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}return e},J.toAssignableList=function(e,t){var n=this,r=e.length;if(r){var i=e[r-1];if(i&&"RestElement"==i.type)--r;else if(i&&"SpreadElement"==i.type){i.type="RestElement";var s=i.argument;this.toAssignable(s,t),"Identifier"!==s.type&&"MemberExpression"!==s.type&&"ArrayPattern"!==s.type&&this.unexpected(s.start),--r}t&&i&&"RestElement"===i.type&&"Identifier"!==i.argument.type&&this.unexpected(i.argument.start)}for(var o=0;o<r;o++){var a=e[o];a&&n.toAssignable(a,t)}return e},J.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},J.parseRest=function(e){var t=this.startNode();return this.next(),e?t.argument=this.type===P.name?this.parseIdent():this.unexpected():t.argument=this.type===P.name||this.type===P.bracketL?this.parseBindingAtom():this.unexpected(),this.finishNode(t,"RestElement")},J.parseBindingAtom=function(){if(this.options.ecmaVersion<6)return this.parseIdent();switch(this.type){case P.name:return this.parseIdent();case P.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(P.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case P.braceL:return this.parseObj(!0);default:this.unexpected()}},J.parseBindingList=function(e,t,n,r){for(var i=this,s=[],o=!0;!this.eat(e);)if(o?o=!1:i.expect(P.comma),t&&i.type===P.comma)s.push(null);else{if(n&&i.afterTrailingComma(e))break;if(i.type===P.ellipsis){var a=i.parseRest(r);i.parseBindingListItem(a),s.push(a),i.type===P.comma&&i.raise(i.start,"Comma is not permitted after the rest element"),i.expect(e);break}var u=i.parseMaybeDefault(i.start,i.startLoc);i.parseBindingListItem(u),s.push(u)}return s},J.parseBindingListItem=function(e){return e},J.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(P.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},J.checkLVal=function(e,t,n){var r=this;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(u(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0);break;case"MemberExpression":t&&this.raiseRecoverable(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var i=0;i<e.properties.length;i++)r.checkLVal(e.properties[i].value,t,n);break;case"ArrayPattern":for(var s=0;s<e.elements.length;s++){var o=e.elements[s];o&&r.checkLVal(o,t,n)}break;case"AssignmentPattern":this.checkLVal(e.left,t,n);break;case"RestElement":this.checkLVal(e.argument,t,n);break;case"ParenthesizedExpression":this.checkLVal(e.expression,t,n);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}};var H=V.prototype;H.checkPropClash=function(e,t){if(!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var n,r=e.key;switch(r.type){case"Identifier":n=r.name;break;case"Literal":n=String(r.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)return void("__proto__"===n&&"init"===i&&(t.proto&&this.raiseRecoverable(r.start,"Redefinition of __proto__ property"),t.proto=!0));n="$"+n;var s=t[n];if(s){var o="init"!==i;(!this.strict&&!o||!s[i])&&o^s.init||this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[n]={init:!1,get:!1,set:!1};s[i]=!0}},H.parseExpression=function(e,t){var n=this,r=this.start,i=this.startLoc,s=this.parseMaybeAssign(e,t);if(this.type===P.comma){var o=this.startNodeAt(r,i);for(o.expressions=[s];this.eat(P.comma);)o.expressions.push(n.parseMaybeAssign(e,t));return this.finishNode(o,"SequenceExpression")}return s},H.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var r=!1;t||(t=new q,r=!0);var i=this.start,s=this.startLoc;this.type!=P.parenL&&this.type!=P.name||(this.potentialArrowAt=this.start);var o=this.parseMaybeConditional(e,t);if(n&&(o=n.call(this,o,i,s)),this.type.isAssign){this.checkPatternErrors(t,!0),r||q.call(t);var a=this.startNodeAt(i,s);return a.operator=this.value,a.left=this.type===P.eq?this.toAssignable(o):o,t.shorthandAssign=0,this.checkLVal(o),this.next(),a.right=this.parseMaybeAssign(e),this.finishNode(a,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),o},H.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(P.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(P.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},H.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:this.parseExprOp(i,n,r,-1,e)},H.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==P._in)&&s>r){var o=this.type===P.logicalOR||this.type===P.logicalAND,a=this.value;this.next();var u=this.start,c=this.startLoc,l=this.parseExprOp(this.parseMaybeUnary(null,!1),u,c,s,i),p=this.buildBinary(t,n,e,l,a,o);return this.parseExprOp(p,t,n,r,i)}return e},H.buildBinary=function(e,t,n,r,i,s){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},H.parseMaybeUnary=function(e,t){var n,r=this,i=this.start,s=this.startLoc;if(this.type.prefix){var o=this.startNode(),a=this.type===P.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),a?this.checkLVal(o.argument):this.strict&&"delete"===o.operator&&"Identifier"===o.argument.type?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(o,a?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=r.startNodeAt(i,s);u.operator=r.value,u.prefix=!1,u.argument=n,r.checkLVal(n),r.next(),n=r.finishNode(u,"UpdateExpression")}}return!t&&this.eat(P.starstar)?this.buildBinary(i,s,n,this.parseMaybeUnary(null,!1),"**",!1):n},H.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,r=this.parseExprAtom(e),i="ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);return this.checkExpressionErrors(e)||i?r:this.parseSubscripts(r,t,n)},H.parseSubscripts=function(e,t,n,r){for(var i=this;;)if(i.eat(P.dot)){var s=i.startNodeAt(t,n);s.object=e,s.property=i.parseIdent(!0),s.computed=!1,e=i.finishNode(s,"MemberExpression")}else if(i.eat(P.bracketL)){var o=i.startNodeAt(t,n);o.object=e,o.property=i.parseExpression(),o.computed=!0,i.expect(P.bracketR),e=i.finishNode(o,"MemberExpression")}else if(!r&&i.eat(P.parenL)){var a=i.startNodeAt(t,n);a.callee=e,a.arguments=i.parseExprList(P.parenR,!1),e=i.finishNode(a,"CallExpression")}else{if(i.type!==P.backQuote)return e;var u=i.startNodeAt(t,n);u.tag=e,u.quasi=i.parseTemplate(),e=i.finishNode(u,"TaggedTemplateExpression")}},H.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case P._super:this.inFunction||this.raise(this.start,"'super' outside of function or class");case P._this:var r=this.type===P._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,r);case P.name:var i=this.start,s=this.startLoc,o=this.parseIdent(this.type!==P.name);return n&&!this.canInsertSemicolon()&&this.eat(P.arrow)?this.parseArrowExpression(this.startNodeAt(i,s),[o]):o;
+case P.regexp:var a=this.value;return t=this.parseLiteral(a.value),t.regex={pattern:a.pattern,flags:a.flags},t;case P.num:case P.string:return this.parseLiteral(this.value);case P._null:case P._true:case P._false:return t=this.startNode(),t.value=this.type===P._null?null:this.type===P._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case P.parenL:return this.parseParenAndDistinguishExpression(n);case P.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(P.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case P.braceL:return this.parseObj(!1,e);case P._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case P._class:return this.parseClass(this.startNode(),!1);case P._new:return this.parseNew();case P.backQuote:return this.parseTemplate();default:this.unexpected()}},H.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},H.parseParenExpression=function(){this.expect(P.parenL);var e=this.parseExpression();return this.expect(P.parenR),e},H.parseParenAndDistinguishExpression=function(e){var t,n=this,r=this.start,i=this.startLoc;if(this.options.ecmaVersion>=6){this.next();for(var s,o,a=this.start,u=this.startLoc,c=[],l=!0,p=new q;this.type!==P.parenR;){if(l?l=!1:n.expect(P.comma),n.type===P.ellipsis){s=n.start,c.push(n.parseParenItem(n.parseRest()));break}n.type!==P.parenL||o||(o=n.start),c.push(n.parseMaybeAssign(!1,p,n.parseParenItem))}var h=this.start,f=this.startLoc;if(this.expect(P.parenR),e&&!this.canInsertSemicolon()&&this.eat(P.arrow))return this.checkPatternErrors(p,!0),o&&this.unexpected(o),this.parseParenArrowList(r,i,c);c.length||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(p,!0),c.length>1?(t=this.startNodeAt(a,u),t.expressions=c,this.finishNodeAt(t,"SequenceExpression",h,f)):t=c[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var d=this.startNodeAt(r,i);return d.expression=t,this.finishNode(d,"ParenthesizedExpression")}return t},H.parseParenItem=function(e){return e},H.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var Q=[];H.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(P.dot))return e.meta=t,e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inFunction||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty");var n=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,r,!0),this.eat(P.parenL)?e.arguments=this.parseExprList(P.parenR,!1):e.arguments=Q,this.finishNode(e,"NewExpression")},H.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),e.tail=this.type===P.backQuote,this.finishNode(e,"TemplateElement")},H.parseTemplate=function(){var e=this,t=this.startNode();this.next(),t.expressions=[];var n=this.parseTemplateElement();for(t.quasis=[n];!n.tail;)e.expect(P.dollarBraceL),t.expressions.push(e.parseExpression()),e.expect(P.braceR),t.quasis.push(n=e.parseTemplateElement());return this.next(),this.finishNode(t,"TemplateLiteral")},H.parseObj=function(e,t){var n=this,r=this.startNode(),i=!0,s={};for(r.properties=[],this.next();!this.eat(P.braceR);){if(i)i=!1;else if(n.expect(P.comma),n.afterTrailingComma(P.braceR))break;var o,a,u,c=n.startNode();n.options.ecmaVersion>=6&&(c.method=!1,c.shorthand=!1,(e||t)&&(a=n.start,u=n.startLoc),e||(o=n.eat(P.star))),n.parsePropertyName(c),n.parsePropertyValue(c,e,o,a,u,t),n.checkPropClash(c,s),r.properties.push(n.finishNode(c,"Property"))}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")},H.parsePropertyValue=function(e,t,n,r,i,s){if(this.eat(P.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===P.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n);else if(this.options.ecmaVersion>=5&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.type!=P.comma&&this.type!=P.braceR){(n||t)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var o="get"===e.kind?0:1;if(e.value.params.length!==o){var a=e.value.start;"get"===e.kind?this.raiseRecoverable(a,"getter should have no params"):this.raiseRecoverable(a,"setter should have exactly one param")}"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((this.keywords.test(e.key.name)||(this.strict?this.reservedWordsStrictBind:this.reservedWords).test(e.key.name)||this.inGenerator&&"yield"==e.key.name)&&this.raiseRecoverable(e.key.start,"'"+e.key.name+"' can not be used as shorthand property"),e.kind="init",t?e.value=this.parseMaybeDefault(r,i,e.key):this.type===P.eq&&s?(s.shorthandAssign||(s.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,i,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected()},H.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(P.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(P.bracketR),e.key;e.computed=!1}return e.key=this.type===P.num||this.type===P.string?this.parseExprAtom():this.parseIdent(!0)},H.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1)},H.parseMethod=function(e){var t=this.startNode(),n=this.inGenerator;return this.inGenerator=e,this.initFunction(t),this.expect(P.parenL),t.params=this.parseBindingList(P.parenR,!1,!1),this.options.ecmaVersion>=6&&(t.generator=e),this.parseFunctionBody(t,!1),this.inGenerator=n,this.finishNode(t,"FunctionExpression")},H.parseArrowExpression=function(e,t){var n=this.inGenerator;return this.inGenerator=!1,this.initFunction(e),e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=n,this.finishNode(e,"ArrowFunctionExpression")},H.parseFunctionBody=function(e,t){var n=t&&this.type!==P.braceL;if(n)e.body=this.parseMaybeAssign(),e.expression=!0;else{var r=this.inFunction,i=this.labels;this.inFunction=!0,this.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.inFunction=r,this.labels=i}var s=!n&&e.body.body.length&&this.isUseStrict(e.body.body[0])?e.body.body[0]:null;if(this.strict||s){var o=this.strict;this.strict=!0,e.id&&this.checkLVal(e.id,!0),this.checkParams(e,s),this.strict=o}else t&&this.checkParams(e,s)},H.checkParams=function(e,t){for(var n=this,r={},i=0;i<e.params.length;i++)t&&n.options.ecmaVersion>=7&&"Identifier"!==e.params[i].type&&n.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list"),n.checkLVal(e.params[i],!0,r)},H.parseExprList=function(e,t,n,r){for(var i=this,s=[],o=!0;!this.eat(e);){if(o)o=!1;else if(i.expect(P.comma),t&&i.afterTrailingComma(e))break;var a;n&&i.type===P.comma?a=null:i.type===P.ellipsis?(a=i.parseSpread(r),i.type===P.comma&&r&&!r.trailingComma&&(r.trailingComma=i.lastTokStart)):a=i.parseMaybeAssign(!1,r),s.push(a)}return s},H.parseIdent=function(e){var t=this.startNode();return e&&"never"==this.options.allowReserved&&(e=!1),this.type===P.name?(!e&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(this.value)&&(this.options.ecmaVersion>=6||this.input.slice(this.start,this.end).indexOf("\\")==-1)&&this.raiseRecoverable(this.start,"The keyword '"+this.value+"' is reserved"),!e&&this.inGenerator&&"yield"===this.value&&this.raiseRecoverable(this.start,"Can not use 'yield' as identifier inside a generator"),t.name=this.value):e&&this.type.keyword?t.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"Identifier")},H.parseYield=function(){var e=this.startNode();return this.next(),this.type==P.semi||this.canInsertSemicolon()||this.type!=P.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(P.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")};var X=V.prototype;X.raise=function(e,t){var n=c(this.input,e);t+=" ("+n.line+":"+n.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},X.raiseRecoverable=X.raise,X.curPosition=function(){if(this.options.locations)return new M(this.curLine,this.pos-this.lineStart)};var Z=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new I(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},K=V.prototype;K.startNode=function(){return new Z(this,this.start,this.startLoc)},K.startNodeAt=function(e,t){return new Z(this,e,t)},K.finishNode=function(e,t){return f.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},K.finishNodeAt=function(e,t,n,r){return f.call(this,e,t,n,r)};var ee=function(e,t,n,r){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r},te={b_stat:new ee("{",!1),b_expr:new ee("{",!0),b_tmpl:new ee("${",!0),p_stat:new ee("(",!1),p_expr:new ee("(",!0),q_tmpl:new ee("`",!0,!0,function(e){return e.readTmplToken()}),f_expr:new ee("function",!0)},ne=V.prototype;ne.initialContext=function(){return[te.b_stat]},ne.braceIsBlock=function(e){if(e===P.colon){var t=this.curContext();if(t===te.b_stat||t===te.b_expr)return!t.isExpr}return e===P._return?N.test(this.input.slice(this.lastTokEnd,this.start)):e===P._else||e===P.semi||e===P.eof||e===P.parenR||(e==P.braceL?this.curContext()===te.b_stat:!this.exprAllowed)},ne.updateContext=function(e){var t,n=this.type;n.keyword&&e==P.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},P.parenR.updateContext=P.braceR.updateContext=function(){if(1==this.context.length)return void(this.exprAllowed=!0);var e=this.context.pop();e===te.b_stat&&this.curContext()===te.f_expr?(this.context.pop(),this.exprAllowed=!1):e===te.b_tmpl?this.exprAllowed=!0:this.exprAllowed=!e.isExpr},P.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?te.b_stat:te.b_expr),this.exprAllowed=!0},P.dollarBraceL.updateContext=function(){this.context.push(te.b_tmpl),this.exprAllowed=!0},P.parenL.updateContext=function(e){var t=e===P._if||e===P._for||e===P._with||e===P._while;this.context.push(t?te.p_stat:te.p_expr),this.exprAllowed=!0},P.incDec.updateContext=function(){},P._function.updateContext=function(e){e.beforeExpr&&e!==P.semi&&e!==P._else&&(e!==P.colon&&e!==P.braceL||this.curContext()!==te.b_stat)&&this.context.push(te.f_expr),this.exprAllowed=!1},P.backQuote.updateContext=function(){this.curContext()===te.q_tmpl?this.context.pop():this.context.push(te.q_tmpl),this.exprAllowed=!1};var re=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new I(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},ie=V.prototype,se="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);ie.next=function(){this.options.onToken&&this.options.onToken(new re(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},ie.getToken=function(){return this.next(),new re(this)},"undefined"!=typeof Symbol&&(ie[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===P.eof,value:t}}}}),ie.setStrict=function(e){var t=this;if(this.strict=e,this.type===P.num||this.type===P.string){if(this.pos=this.start,this.options.locations)for(;this.pos<this.lineStart;)t.lineStart=t.input.lastIndexOf("\n",t.lineStart-2)+1,--t.curLine;this.nextToken()}},ie.curContext=function(){return this.context[this.context.length-1]},ie.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(P.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},ie.readToken=function(e){return n(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},ie.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=57344)return e;var t=this.input.charCodeAt(this.pos+1);return(e<<10)+t-56613888},ie.skipBlockComment=function(){var e=this,t=this.options.onComment&&this.curPosition(),n=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations){B.lastIndex=n;for(var i;(i=B.exec(this.input))&&i.index<this.pos;)++e.curLine,e.lineStart=i.index+i[0].length}this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,r),n,this.pos,t,this.curPosition())},ie.skipLineComment=function(e){for(var t=this,n=this.pos,r=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&10!==i&&13!==i&&8232!==i&&8233!==i;)++t.pos,i=t.input.charCodeAt(t.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(n+e,this.pos),n,this.pos,r,this.curPosition())},ie.skipSpace=function(){var e=this;e:for(;this.pos<this.input.length;){var t=e.input.charCodeAt(e.pos);switch(t){case 32:case 160:++e.pos;break;case 13:10===e.input.charCodeAt(e.pos+1)&&++e.pos;case 10:case 8232:case 8233:++e.pos,e.options.locations&&(++e.curLine,e.lineStart=e.pos);break;case 47:switch(e.input.charCodeAt(e.pos+1)){case 42:e.skipBlockComment();break;case 47:e.skipLineComment(2);break;default:break e}break;default:if(!(t>8&&t<14||t>=5760&&F.test(String.fromCharCode(t))))break e;++e.pos}}},ie.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},ie.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(P.ellipsis)):(++this.pos,this.finishToken(P.dot))},ie.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(P.assign,2):this.finishOp(P.slash,1)},ie.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?P.star:P.modulo;return this.options.ecmaVersion>=7&&42===t&&(++n,r=P.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(P.assign,n+1):this.finishOp(r,n)},ie.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?P.logicalOR:P.logicalAND,2):61===t?this.finishOp(P.assign,2):this.finishOp(124===e?P.bitwiseOR:P.bitwiseAND,1)},ie.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(P.assign,2):this.finishOp(P.bitwiseXOR,1)},ie.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45==t&&62==this.input.charCodeAt(this.pos+2)&&N.test(this.input.slice(this.lastTokEnd,this.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(P.incDec,2):61===t?this.finishOp(P.assign,2):this.finishOp(P.plusMin,1)},ie.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(P.assign,n+1):this.finishOp(P.bitShift,n)):33==t&&60==e&&45==this.input.charCodeAt(this.pos+2)&&45==this.input.charCodeAt(this.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(n=2),this.finishOp(P.relational,n))},ie.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(P.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(P.arrow)):this.finishOp(61===e?P.eq:P.prefix,1)},ie.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(P.parenL);case 41:return++this.pos,this.finishToken(P.parenR);case 59:return++this.pos,this.finishToken(P.semi);case 44:return++this.pos,this.finishToken(P.comma);case 91:return++this.pos,this.finishToken(P.bracketL);case 93:return++this.pos,this.finishToken(P.bracketR);case 123:return++this.pos,this.finishToken(P.braceL);case 125:return++this.pos,this.finishToken(P.braceR);case 58:return++this.pos,this.finishToken(P.colon);case 63:return++this.pos,this.finishToken(P.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(P.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(P.prefix,1)}this.raise(this.pos,"Unexpected character '"+y(e)+"'")},ie.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var oe=!!d("￿","u");ie.readRegexp=function(){for(var e,t,n=this,r=this.pos;;){n.pos>=n.input.length&&n.raise(r,"Unterminated regular expression");var i=n.input.charAt(n.pos);if(N.test(i)&&n.raise(r,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++n.pos}var s=this.input.slice(r,this.pos);++this.pos;var o=this.readWord1(),a=s,u="";if(o){var c=/^[gim]*$/;this.options.ecmaVersion>=6&&(c=/^[gimuy]*$/),c.test(o)||this.raise(r,"Invalid regular expression flag"),o.indexOf("u")>=0&&(oe?u="u":(a=a.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,i){return t=Number("0x"+t),t>1114111&&n.raise(r+i+3,"Code point out of bounds"),"x"}),a=a.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),u=u.replace("u","")))}var l=null;return se||(d(a,u,r,this),l=d(s,o)),this.finishToken(P.regexp,{pattern:s,flags:o,value:l})},ie.readInt=function(e,t){for(var n=this,r=this.pos,i=0,s=0,o=null==t?1/0:t;s<o;++s){var a,u=n.input.charCodeAt(n.pos);if(a=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0,a>=e)break;++n.pos,i=i*e+a}return this.pos===r||null!=t&&this.pos-r!==t?null:i},ie.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,t)},ie.readNumber=function(e){var t=this.pos,r=!1,i=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number");var s=this.input.charCodeAt(this.pos);46===s&&(++this.pos,this.readInt(10),r=!0,s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||(s=this.input.charCodeAt(++this.pos),43!==s&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var o,a=this.input.slice(t,this.pos);return r?o=parseFloat(a):i&&1!==a.length?/[89]/.test(a)||this.strict?this.raise(t,"Invalid number"):o=parseInt(a,8):o=parseInt(a,10),this.finishToken(P.num,o)},ie.readCodePoint=function(){var e,t=this.input.charCodeAt(this.pos);if(123===t){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.raise(n,"Code point out of bounds")}else e=this.readHexChar(4);return e},ie.readString=function(e){for(var t=this,n="",r=++this.pos;;){t.pos>=t.input.length&&t.raise(t.start,"Unterminated string constant");var i=t.input.charCodeAt(t.pos);if(i===e)break;92===i?(n+=t.input.slice(r,t.pos),n+=t.readEscapedChar(!1),r=t.pos):(o(i)&&t.raise(t.start,"Unterminated string constant"),++t.pos)}return n+=this.input.slice(r,this.pos++),this.finishToken(P.string,n)},ie.readTmplToken=function(){for(var e=this,t="",n=this.pos;;){e.pos>=e.input.length&&e.raise(e.start,"Unterminated template");var r=e.input.charCodeAt(e.pos);if(96===r||36===r&&123===e.input.charCodeAt(e.pos+1))return e.pos===e.start&&e.type===P.template?36===r?(e.pos+=2,e.finishToken(P.dollarBraceL)):(++e.pos,e.finishToken(P.backQuote)):(t+=e.input.slice(n,e.pos),e.finishToken(P.template,t));if(92===r)t+=e.input.slice(n,e.pos),t+=e.readEscapedChar(!0),n=e.pos;else if(o(r)){switch(t+=e.input.slice(n,e.pos),++e.pos,r){case 13:10===e.input.charCodeAt(e.pos)&&++e.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(r)}e.options.locations&&(++e.curLine,e.lineStart=e.pos),n=e.pos}else++e.pos}},ie.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return y(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);return r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),"0"!==n&&(this.strict||e)&&this.raise(this.pos-2,"Octal literal in strict mode"),this.pos+=n.length-1,String.fromCharCode(r)}return String.fromCharCode(t)}},ie.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.raise(t,"Bad character escape sequence"),n},ie.readWord1=function(){var e=this;this.containsEsc=!1;for(var t="",i=!0,s=this.pos,o=this.options.ecmaVersion>=6;this.pos<this.input.length;){var a=e.fullCharCodeAtPos();if(r(a,o))e.pos+=a<=65535?1:2;else{if(92!==a)break;e.containsEsc=!0,t+=e.input.slice(s,e.pos);var u=e.pos;117!=e.input.charCodeAt(++e.pos)&&e.raise(e.pos,"Expecting Unicode escape sequence \\uXXXX"),++e.pos;var c=e.readCodePoint();(i?n:r)(c,o)||e.raise(u,"Invalid Unicode escape"),t+=y(c),s=e.pos}i=!1}return t+this.input.slice(s,this.pos)},ie.readWord=function(){var e=this.readWord1(),t=P.name;return(this.options.ecmaVersion>=6||!this.containsEsc)&&this.keywords.test(e)&&(t=O[e]),this.finishToken(t,e)};var ae="3.3.0";e.version=ae,e.parse=m,e.parseExpressionAt=g,e.tokenizer=v,e.Parser=V,e.plugins=$,e.defaultOptions=D,e.Position=M,e.SourceLocation=I,e.getLineInfo=c,e.Node=Z,e.TokenType=L,e.tokTypes=P,e.TokContext=ee,e.tokContexts=te,e.isIdentifierChar=r,e.isIdentifierStart=n,e.Token=re,e.isNewLine=o,e.lineBreak=N,e.lineBreakG=B,Object.defineProperty(e,"__esModule",{value:!0})})},{}],19:[function(e,t,n){!function(e,r){"object"==typeof n&&"undefined"!=typeof t?r(n):"function"==typeof define&&define.amd?define(["exports"],r):r((e.acorn=e.acorn||{},e.acorn.walk=e.acorn.walk||{}))}(this,function(e){"use strict";function t(t,n,r,i,s){r||(r=e.base),function e(t,i,s){var o=s||t.type,a=n[o];r[o](t,i,e),a&&a(t,i)}(t,i,s)}function n(t,n,r,i){r||(r=e.base);var s=[];!function e(t,i,o){var a=o||t.type,u=n[a],c=t!=s[s.length-1];c&&s.push(t),r[a](t,i,e),u&&u(t,i||s,s),c&&s.pop()}(t,i)}function r(t,n,r,i,s){var o=r?e.make(r,i):i;!function e(t,n,r){o[r||t.type](t,n,e)}(t,n,s)}function i(e){return"string"==typeof e?function(t){return t==e}:e?e:function(){return!0}}function s(t,n,r,s,o,a){s=i(s),o||(o=e.base);try{!function e(t,i,a){var u=a||t.type;if((null==n||t.start<=n)&&(null==r||t.end>=r)&&o[u](t,i,e),(null==n||t.start==n)&&(null==r||t.end==r)&&s(u,t))throw new h(t,i)}(t,a)}catch(e){if(e instanceof h)return e;throw e}}function o(t,n,r,s,o){r=i(r),s||(s=e.base);try{!function e(t,i,o){var a=o||t.type;if(!(t.start>n||t.end<n)&&(s[a](t,i,e),r(a,t)))throw new h(t,i)}(t,o)}catch(e){if(e instanceof h)return e;throw e}}function a(t,n,r,s,o){r=i(r),s||(s=e.base);try{!function e(t,i,o){if(!(t.end<n)){var a=o||t.type;if(t.start>=n&&r(a,t))throw new h(t,i);s[a](t,i,e)}}(t,o)}catch(e){if(e instanceof h)return e;throw e}}function u(t,n,r,s,o){r=i(r),s||(s=e.base);var a;return function e(t,i,o){if(!(t.start>n)){var u=o||t.type;t.end<=n&&(!a||a.node.end<t.end)&&r(u,t)&&(a=new h(t,i)),s[u](t,i,e)}}(t,o),a}function c(t,n){n||(n=e.base);var r=f(n);for(var i in t)r[i]=t[i];return r}function l(e,t,n){n(e,t)}function p(e,t,n){}var h=function(e,t){this.node=e,this.state=t},f=Object.create||function(e){function t(){}return t.prototype=e,new t},d={};d.Program=d.BlockStatement=function(e,t,n){for(var r=0;r<e.body.length;++r)n(e.body[r],t,"Statement")},d.Statement=l,d.EmptyStatement=p,d.ExpressionStatement=d.ParenthesizedExpression=function(e,t,n){return n(e.expression,t,"Expression")},d.IfStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Statement"),e.alternate&&n(e.alternate,t,"Statement")},d.LabeledStatement=function(e,t,n){return n(e.body,t,"Statement")},d.BreakStatement=d.ContinueStatement=p,d.WithStatement=function(e,t,n){n(e.object,t,"Expression"),n(e.body,t,"Statement")},d.SwitchStatement=function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0;r<e.cases.length;++r){var i=e.cases[r];i.test&&n(i.test,t,"Expression");for(var s=0;s<i.consequent.length;++s)n(i.consequent[s],t,"Statement")}},d.ReturnStatement=d.YieldExpression=function(e,t,n){e.argument&&n(e.argument,t,"Expression")},d.ThrowStatement=d.SpreadElement=function(e,t,n){return n(e.argument,t,"Expression")},d.TryStatement=function(e,t,n){n(e.block,t,"Statement"),e.handler&&n(e.handler,t),e.finalizer&&n(e.finalizer,t,"Statement")},d.CatchClause=function(e,t,n){n(e.param,t,"Pattern"),n(e.body,t,"ScopeBody")},d.WhileStatement=d.DoWhileStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.body,t,"Statement")},d.ForStatement=function(e,t,n){e.init&&n(e.init,t,"ForInit"),e.test&&n(e.test,t,"Expression"),e.update&&n(e.update,t,"Expression"),n(e.body,t,"Statement")},d.ForInStatement=d.ForOfStatement=function(e,t,n){n(e.left,t,"ForInit"),n(e.right,t,"Expression"),n(e.body,t,"Statement")},d.ForInit=function(e,t,n){"VariableDeclaration"==e.type?n(e,t):n(e,t,"Expression")},d.DebuggerStatement=p,d.FunctionDeclaration=function(e,t,n){return n(e,t,"Function")},d.VariableDeclaration=function(e,t,n){for(var r=0;r<e.declarations.length;++r)n(e.declarations[r],t)},d.VariableDeclarator=function(e,t,n){n(e.id,t,"Pattern"),e.init&&n(e.init,t,"Expression")},d.Function=function(e,t,n){e.id&&n(e.id,t,"Pattern");for(var r=0;r<e.params.length;r++)n(e.params[r],t,"Pattern");n(e.body,t,e.expression?"ScopeExpression":"ScopeBody")},d.ScopeBody=function(e,t,n){return n(e,t,"Statement")},d.ScopeExpression=function(e,t,n){return n(e,t,"Expression")},d.Pattern=function(e,t,n){"Identifier"==e.type?n(e,t,"VariablePattern"):"MemberExpression"==e.type?n(e,t,"MemberPattern"):n(e,t)},d.VariablePattern=p,d.MemberPattern=l,d.RestElement=function(e,t,n){return n(e.argument,t,"Pattern")},d.ArrayPattern=function(e,t,n){for(var r=0;r<e.elements.length;++r){var i=e.elements[r];i&&n(i,t,"Pattern")}},d.ObjectPattern=function(e,t,n){for(var r=0;r<e.properties.length;++r)n(e.properties[r].value,t,"Pattern")},d.Expression=l,d.ThisExpression=d.Super=d.MetaProperty=p,d.ArrayExpression=function(e,t,n){for(var r=0;r<e.elements.length;++r){var i=e.elements[r];i&&n(i,t,"Expression")}},d.ObjectExpression=function(e,t,n){for(var r=0;r<e.properties.length;++r)n(e.properties[r],t)},d.FunctionExpression=d.ArrowFunctionExpression=d.FunctionDeclaration,d.SequenceExpression=d.TemplateLiteral=function(e,t,n){for(var r=0;r<e.expressions.length;++r)n(e.expressions[r],t,"Expression")},d.UnaryExpression=d.UpdateExpression=function(e,t,n){n(e.argument,t,"Expression")},d.BinaryExpression=d.LogicalExpression=function(e,t,n){n(e.left,t,"Expression"),n(e.right,t,"Expression")},d.AssignmentExpression=d.AssignmentPattern=function(e,t,n){n(e.left,t,"Pattern"),n(e.right,t,"Expression")},d.ConditionalExpression=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Expression"),n(e.alternate,t,"Expression")},d.NewExpression=d.CallExpression=function(e,t,n){if(n(e.callee,t,"Expression"),e.arguments)for(var r=0;r<e.arguments.length;++r)n(e.arguments[r],t,"Expression")},d.MemberExpression=function(e,t,n){n(e.object,t,"Expression"),e.computed&&n(e.property,t,"Expression")},d.ExportNamedDeclaration=d.ExportDefaultDeclaration=function(e,t,n){e.declaration&&n(e.declaration,t,"ExportNamedDeclaration"==e.type||e.declaration.id?"Statement":"Expression"),e.source&&n(e.source,t,"Expression")},d.ExportAllDeclaration=function(e,t,n){n(e.source,t,"Expression")},d.ImportDeclaration=function(e,t,n){for(var r=0;r<e.specifiers.length;r++)n(e.specifiers[r],t);n(e.source,t,"Expression")},d.ImportSpecifier=d.ImportDefaultSpecifier=d.ImportNamespaceSpecifier=d.Identifier=d.Literal=p,d.TaggedTemplateExpression=function(e,t,n){n(e.tag,t,"Expression"),n(e.quasi,t)},d.ClassDeclaration=d.ClassExpression=function(e,t,n){return n(e,t,"Class")},d.Class=function(e,t,n){e.id&&n(e.id,t,"Pattern"),e.superClass&&n(e.superClass,t,"Expression");for(var r=0;r<e.body.body.length;r++)n(e.body.body[r],t)},d.MethodDefinition=d.Property=function(e,t,n){e.computed&&n(e.key,t,"Expression"),n(e.value,t,"Expression")},e.simple=t,e.ancestor=n,e.recursive=r,e.findNodeAt=s,e.findNodeAround=o,e.findNodeAfter=a,e.findNodeBefore=u,e.make=c,e.base=d,Object.defineProperty(e,"__esModule",{value:!0})})},{}],20:[function(e,t,n){var r=e("./lib/core");n=t.exports=e("./lib/async"),n.core=r,n.isCore=function(e){return r[e]},n.sync=e("./lib/sync")},{"./lib/async":21,"./lib/core":24,"./lib/sync":26}],21:[function(e,t,n){(function(n){var r=e("./core"),i=e("fs"),s=e("path"),o=e("./caller.js"),a=e("./node-modules-paths.js");"win32"===n.platform?/[\/\\]/:/\//;t.exports=function(e,t,u){function c(t,n,r){t?u(t):n?u(null,n,r):h(v,function(t,n,r){t?u(t):n?u(null,n,r):u(new Error("Cannot find module '"+e+"' from '"+g+"'"))})}function l(e,n,r){function i(e,n,o){function a(a,l,p){if(o=l,a)return r(a);if(p&&o&&t.pathFilter){var h=s.relative(p,c),f=h.slice(0,h.length-e[0].length),y=t.pathFilter(o,n,f);if(y)return i([""].concat(m.slice()),s.resolve(p,y),o)}d(c,u)}function u(t,s){t?r(t):s?r(null,c,o):i(e.slice(1),n,o)}if(0===e.length)return r(null,void 0,o);var c=n+e[0];o?a(null,o):p(s.dirname(c),a)}"function"==typeof n&&(r=n,n=void 0);var o=[""].concat(m);i(o,e,n)}function p(e,r){if(""===e||"/"===e)return r(null);if("win32"===n.platform&&/^\w:[\\\/]*$/.test(e))return r(null);if(/[\\\/]node_modules[\\\/]*$/.test(e))return r(null);var i=s.join(e,"package.json");d(i,function(n,o){return o?void y(i,function(n,s){n&&r(n);try{var o=JSON.parse(s)}catch(e){}o&&t.packageFilter&&(o=t.packageFilter(o,i)),r(null,o,e)}):p(s.dirname(e),r)})}function h(e,n,r){"function"==typeof n&&(r=n,n=t.package);var i=s.join(e,"/package.json");d(i,function(o,a){return o?r(o):a?void y(i,function(n,o){if(n)return r(n);try{var a=JSON.parse(o)}catch(e){}return t.packageFilter&&(a=t.packageFilter(a,i)),a.main?("."!==a.main&&"./"!==a.main||(a.main="index"),void l(s.resolve(e,a.main),a,function(t,n,i){if(t)return r(t);if(n)return r(null,n,i);if(!i)return l(s.join(e,"/index"),i,r);var o=s.resolve(e,i.main);h(o,i,function(t,n,i){return t?r(t):n?r(null,n,i):void l(s.join(e,"/index"),i,r)})})):void l(s.join(e,"/index"),a,r)}):l(s.join(e,"/index"),n,r)})}function f(e,n,r){!function t(n){function i(t,n,i){return t?r(t):n?r(null,n,i):void h(s.join(a,"/",e),void 0,o)}function o(e,i,s){return e?r(e):i?r(null,i,s):void t(n.slice(1));
+}if(0===n.length)return r(null,void 0);var a=n[0],u=s.join(a,"/",e);l(u,void 0,i)}(a(n,t))}if("function"==typeof t&&(u=t,t={}),t||(t={}),"string"!=typeof e)return n.nextTick(function(){u(new Error("path must be a string"))});var d=t.isFile||function(e,t){i.stat(e,function(e,n){e&&"ENOENT"===e.code?t(null,!1):e?t(e):t(null,n.isFile()||n.isFIFO())})},y=t.readFile||i.readFile,m=t.extensions||[".js"],g=t.basedir||s.dirname(o());if(t.paths=t.paths||[],/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/.test(e)){var v=s.resolve(g,e);".."===e&&(v+="/"),/\/$/.test(e)&&v===g?h(v,t.package,c):l(v,t.package,c)}else f(e,g,function(t,n,i){if(t)u(t);else if(n)u(null,n,i);else{if(r[e])return u(null,e);u(new Error("Cannot find module '"+e+"' from '"+g+"'"))}})}}).call(this,e("_process"))},{"./caller.js":22,"./core":24,"./node-modules-paths.js":25,_process:7,fs:1,path:6}],22:[function(e,t,n){t.exports=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var t=(new Error).stack;return Error.prepareStackTrace=e,t[2].getFileName()}},{}],23:[function(e,t,n){t.exports=["assert","buffer_ieee754","buffer","child_process","cluster","console","constants","crypto","_debugger","dgram","dns","domain","events","freelist","fs","http","https","_linklist","module","net","os","path","punycode","querystring","readline","repl","stream","string_decoder","sys","timers","tls","tty","url","util","vm","zlib"]},{}],24:[function(e,t,n){t.exports=e("./core.json").reduce(function(e,t){return e[t]=!0,e},{})},{"./core.json":23}],25:[function(e,t,n){(function(n){var r=e("path");t.exports=function(e,t){var i=t.moduleDirectory?[].concat(t.moduleDirectory):["node_modules"];e=r.resolve(e);var s="/";/^([A-Za-z]:)/.test(e)?s="":/^\\\\/.test(e)&&(s="\\\\");for(var o="win32"===n.platform?/[\/\\]/:/\/+/,a=e.split(o),u=[],c=a.length-1;c>=0;c--)i.indexOf(a[c])===-1&&(u=u.concat(i.map(function(e){return s+r.join(r.join.apply(r,a.slice(0,c+1)),e)})));return"win32"===n.platform&&(u[u.length-1]=u[u.length-1].replace(":",":\\")),u.concat(t.paths)}}).call(this,e("_process"))},{_process:7,path:6}],26:[function(e,t,n){var r=e("./core"),i=e("fs"),s=e("path"),o=e("./caller.js"),a=e("./node-modules-paths.js");t.exports=function(e,t){function n(e){if(l(e))return e;for(var t=0;t<h.length;t++){var n=e+h[t];if(l(n))return n}}function u(e){var r=s.join(e,"/package.json");if(l(r)){var i=p(r,"utf8");try{var o=JSON.parse(i);if(t.packageFilter&&(o=t.packageFilter(o,e)),o.main){var a=n(s.resolve(e,o.main));if(a)return a;var c=u(s.resolve(e,o.main));if(c)return c}}catch(e){}}return n(s.join(e,"/index"))}function c(e,r){for(var i=a(r,t),o=0;o<i.length;o++){var c=i[o],l=n(s.join(c,"/",e));if(l)return l;var p=u(s.join(c,"/",e));if(p)return p}}t||(t={});var l=t.isFile||function(e){try{var t=i.statSync(e)}catch(e){if(e&&"ENOENT"===e.code)return!1}return t.isFile()||t.isFIFO()},p=t.readFileSync||i.readFileSync,h=t.extensions||[".js"],f=t.basedir||s.dirname(o());if(t.paths=t.paths||[],/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/.test(e)){var d=s.resolve(f,e);".."===e&&(d+="/");var y=n(d)||u(d);if(y)return y}else{var m=c(e,f);if(m)return m}if(r[e])return e;throw new Error("Cannot find module '"+e+"' from '"+f+"'")}},{"./caller.js":22,"./core":24,"./node-modules-paths.js":25,fs:1,path:6}],27:[function(e,t,n){function r(){this._array=[],this._set={}}var i=e("./util");r.fromArray=function(e,t){for(var n=new r,i=0,s=e.length;i<s;i++)n.add(e[i],t);return n},r.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(e,t){var n=i.toSetString(e),r=this._set.hasOwnProperty(n),s=this._array.length;r&&!t||this._array.push(e),r||(this._set[n]=s)},r.prototype.has=function(e){var t=i.toSetString(e);return this._set.hasOwnProperty(t)},r.prototype.indexOf=function(e){var t=i.toSetString(e);if(this._set.hasOwnProperty(t))return this._set[t];throw new Error('"'+e+'" is not in the set.')},r.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},r.prototype.toArray=function(){return this._array.slice()},n.ArraySet=r},{"./util":36}],28:[function(e,t,n){function r(e){return e<0?(-e<<1)+1:(e<<1)+0}function i(e){var t=1===(1&e),n=e>>1;return t?-n:n}var s=e("./base64"),o=5,a=1<<o,u=a-1,c=a;n.encode=function(e){var t,n="",i=r(e);do t=i&u,i>>>=o,i>0&&(t|=c),n+=s.encode(t);while(i>0);return n},n.decode=function(e,t,n){var r,a,l=e.length,p=0,h=0;do{if(t>=l)throw new Error("Expected more digits in base 64 VLQ value.");if(a=s.decode(e.charCodeAt(t++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));r=!!(a&c),a&=u,p+=a<<h,h+=o}while(r);n.value=i(p),n.rest=t}},{"./base64":29}],29:[function(e,t,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 t=65,n=90,r=97,i=122,s=48,o=57,a=43,u=47,c=26,l=52;return t<=e&&e<=n?e-t:r<=e&&e<=i?e-r+c:s<=e&&e<=o?e-s+l:e==a?62:e==u?63:-1}},{}],30:[function(e,t,n){function r(e,t,i,s,o,a){var u=Math.floor((t-e)/2)+e,c=o(i,s[u],!0);return 0===c?u:c>0?t-u>1?r(u,t,i,s,o,a):a==n.LEAST_UPPER_BOUND?t<s.length?t:-1:u:u-e>1?r(e,u,i,s,o,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,i,s){if(0===t.length)return-1;var o=r(-1,t.length,e,t,i,s||n.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===i(t[o],t[o-1],!0);)--o;return o}},{}],31:[function(e,t,n){function r(e,t){var n=e.generatedLine,r=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return r>n||r==n&&o>=i||s.compareByGeneratedPositionsInflated(e,t)<=0}function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var s=e("./util");i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){r(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(s.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=i},{"./util":36}],32:[function(e,t,n){function r(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function i(e,t){return Math.round(e+Math.random()*(t-e))}function s(e,t,n,o){if(n<o){var a=i(n,o),u=n-1;r(e,a,o);for(var c=e[o],l=n;l<o;l++)t(e[l],c)<=0&&(u+=1,r(e,u,l));r(e,u+1,l);var p=u+1;s(e,t,n,p-1),s(e,t,p+1,o)}}n.quickSort=function(e,t){s(e,t,0,e.length-1)}},{}],33:[function(e,t,n){function r(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new o(t):new i(t)}function i(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=a.getArg(t,"version"),r=a.getArg(t,"sources"),i=a.getArg(t,"names",[]),s=a.getArg(t,"sourceRoot",null),o=a.getArg(t,"sourcesContent",null),u=a.getArg(t,"mappings"),l=a.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);r=r.map(a.normalize).map(function(e){return s&&a.isAbsolute(s)&&a.isAbsolute(e)?a.relative(s,e):e}),this._names=c.fromArray(i,!0),this._sources=c.fromArray(r,!0),this.sourceRoot=s,this.sourcesContent=o,this._mappings=u,this.file=l}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function o(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=a.getArg(t,"version"),i=a.getArg(t,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new c,this._names=new c;var s={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=a.getArg(e,"offset"),n=a.getArg(t,"line"),i=a.getArg(t,"column");if(n<s.line||n===s.line&&i<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=t,{generatedOffset:{generatedLine:n+1,generatedColumn:i+1},consumer:new r(a.getArg(e,"map"))}})}var a=e("./util"),u=e("./binary-search"),c=e("./array-set").ArraySet,l=e("./base64-vlq"),p=e("./quick-sort").quickSort;r.fromSourceMap=function(e){return i.fromSourceMap(e)},r.prototype._version=3,r.prototype.__generatedMappings=null,Object.defineProperty(r.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),r.prototype.__originalMappings=null,Object.defineProperty(r.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),r.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return";"===n||","===n},r.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},r.GENERATED_ORDER=1,r.ORIGINAL_ORDER=2,r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.prototype.eachMapping=function(e,t,n){var i,s=t||null,o=n||r.GENERATED_ORDER;switch(o){case r.GENERATED_ORDER:i=this._generatedMappings;break;case r.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;i.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=u&&(t=a.join(u,t)),{source:t,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,s)},r.prototype.allGeneratedPositionsFor=function(e){var t=a.getArg(e,"line"),n={source:a.getArg(e,"source"),originalLine:t,originalColumn:a.getArg(e,"column",0)};if(null!=this.sourceRoot&&(n.source=a.relative(this.sourceRoot,n.source)),!this._sources.has(n.source))return[];n.source=this._sources.indexOf(n.source);var r=[],i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(void 0===e.column)for(var o=s.originalLine;s&&s.originalLine===o;)r.push({line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var c=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==c;)r.push({line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return r},n.SourceMapConsumer=r,i.prototype=Object.create(r.prototype),i.prototype.consumer=r,i.fromSourceMap=function(e){var t=Object.create(i.prototype),n=t._names=c.fromArray(e._names.toArray(),!0),r=t._sources=c.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var o=e._mappings.toArray().slice(),u=t.__generatedMappings=[],l=t.__originalMappings=[],h=0,f=o.length;h<f;h++){var d=o[h],y=new s;y.generatedLine=d.generatedLine,y.generatedColumn=d.generatedColumn,d.source&&(y.source=r.indexOf(d.source),y.originalLine=d.originalLine,y.originalColumn=d.originalColumn,d.name&&(y.name=n.indexOf(d.name)),l.push(y)),u.push(y)}return p(t.__originalMappings,a.compareByOriginalPositions),t},i.prototype._version=3,Object.defineProperty(i.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?a.join(this.sourceRoot,e):e},this)}}),i.prototype._parseMappings=function(e,t){for(var n,r,i,o,u,c=1,h=0,f=0,d=0,y=0,m=0,g=e.length,v=0,b={},x={},w=[],E=[];v<g;)if(";"===e.charAt(v))c++,v++,h=0;else if(","===e.charAt(v))v++;else{for(n=new s,n.generatedLine=c,o=v;o<g&&!this._charIsMappingSeparator(e,o);o++);if(r=e.slice(v,o),i=b[r])v+=r.length;else{for(i=[];v<o;)l.decode(e,v,x),u=x.value,v=x.rest,i.push(u);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");b[r]=i}n.generatedColumn=h+i[0],h=n.generatedColumn,i.length>1&&(n.source=y+i[1],y+=i[1],n.originalLine=f+i[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=d+i[3],d=n.originalColumn,i.length>4&&(n.name=m+i[4],m+=i[4])),E.push(n),"number"==typeof n.originalLine&&w.push(n)}p(E,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=E,p(w,a.compareByOriginalPositions),this.__originalMappings=w},i.prototype._findMapping=function(e,t,n,r,i,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},i.prototype.originalPositionFor=function(e){var t={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},n=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",a.compareByGeneratedPositionsDeflated,a.getArg(e,"bias",r.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===t.generatedLine){var s=a.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=a.join(this.sourceRoot,s)));var o=a.getArg(i,"name",null);return null!==o&&(o=this._names.at(o)),{source:s,line:a.getArg(i,"originalLine",null),column:a.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){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 n;if(null!=this.sourceRoot&&(n=a.urlParse(this.sourceRoot))){var r=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=a.getArg(e,"source");if(null!=this.sourceRoot&&(t=a.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};t=this._sources.indexOf(t);var n={source:t,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",r.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=i,o.prototype=Object.create(r.prototype),o.prototype.constructor=r,o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),o.prototype.originalPositionFor=function(e){var t={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},n=u.search(t,this._sections,function(e,t){var n=e.generatedLine-t.generatedOffset.generatedLine;return n?n:e.generatedColumn-t.generatedOffset.generatedColumn}),r=this._sections[n];return r?r.consumer.originalPositionFor({line:t.generatedLine-(r.generatedOffset.generatedLine-1),column:t.generatedColumn-(r.generatedOffset.generatedLine===t.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},o.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n],i=r.consumer.sourceContentFor(e,!0);if(i)return i}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var n=this._sections[t];if(n.consumer.sources.indexOf(a.getArg(e,"source"))!==-1){var r=n.consumer.generatedPositionFor(e);if(r){var i={line:r.line+(n.generatedOffset.generatedLine-1),column:r.column+(n.generatedOffset.generatedLine===r.line?n.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}},o.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var r=this._sections[n],i=r.consumer._generatedMappings,s=0;s<i.length;s++){var o=i[s],u=r.consumer._sources.at(o.source);null!==r.consumer.sourceRoot&&(u=a.join(r.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var c=r.consumer._names.at(o.name);this._names.add(c),c=this._names.indexOf(c);var l={source:u,generatedLine:o.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(r.generatedOffset.generatedLine===o.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:c};this.__generatedMappings.push(l),"number"==typeof l.originalLine&&this.__originalMappings.push(l)}p(this.__generatedMappings,a.compareByGeneratedPositionsDeflated),p(this.__originalMappings,a.compareByOriginalPositions)},n.IndexedSourceMapConsumer=o},{"./array-set":27,"./base64-vlq":28,"./binary-search":30,"./quick-sort":32,"./util":36}],34:[function(e,t,n){function r(e){e||(e={}),this._file=s.getArg(e,"file",null),this._sourceRoot=s.getArg(e,"sourceRoot",null),this._skipValidation=s.getArg(e,"skipValidation",!1),this._sources=new o,this._names=new o,this._mappings=new a,this._sourcesContents=null}var i=e("./base64-vlq"),s=e("./util"),o=e("./array-set").ArraySet,a=e("./mapping-list").MappingList;r.prototype._version=3,r.fromSourceMap=function(e){var t=e.sourceRoot,n=new r({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=s.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)}),e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&n.setSourceContent(t,r)}),n},r.prototype.addMapping=function(e){var t=s.getArg(e,"generated"),n=s.getArg(e,"original",null),r=s.getArg(e,"source",null),i=s.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,i),null==r||this._sources.has(r)||this._sources.add(r),null==i||this._names.has(i)||this._names.add(i),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})},r.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=s.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[s.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){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.');r=e.file}var i=this._sourceRoot;null!=i&&(r=s.relative(i,r));var a=new o,u=new o;this._mappings.unsortedForEach(function(t){if(t.source===r&&null!=t.originalLine){var o=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=o.source&&(t.source=o.source,null!=n&&(t.source=s.join(n,t.source)),null!=i&&(t.source=s.relative(i,t.source)),t.originalLine=o.line,t.originalColumn=o.column,null!=o.name&&(t.name=o.name))}var c=t.source;null==c||a.has(c)||a.add(c);var l=t.name;null==l||u.has(l)||u.add(l)},this),this._sources=a,this._names=u,e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=s.join(n,t)),null!=i&&(t=s.relative(i,t)),this.setSourceContent(t,r))},this)},r.prototype._validateMapping=function(e,t,n,r){if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},r.prototype._serializeMappings=function(){for(var e,t,n,r=0,o=1,a=0,u=0,c=0,l=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f<d;f++){if(e=h[f],e.generatedLine!==o)for(r=0;e.generatedLine!==o;)p+=";",o++;else if(f>0){if(!s.compareByGeneratedPositionsInflated(e,h[f-1]))continue;p+=","}p+=i.encode(e.generatedColumn-r),r=e.generatedColumn,null!=e.source&&(n=this._sources.indexOf(e.source),p+=i.encode(n-l),l=n,p+=i.encode(e.originalLine-1-u),u=e.originalLine-1,p+=i.encode(e.originalColumn-a),a=e.originalColumn,null!=e.name&&(t=this._names.indexOf(e.name),p+=i.encode(t-c),c=t))}return p},r.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var n=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},r.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},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=r},{"./array-set":27,"./base64-vlq":28,"./mapping-list":31,"./util":36}],35:[function(e,t,n){function r(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[u]=!0,null!=r&&this.add(r)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),o=/(\r?\n)/,a=10,u="$$$isSourceNode$$$";r.fromStringWithSourceMap=function(e,t,n){function i(e,t){if(null===e||void 0===e.source)a.add(t);else{var i=n?s.join(n,e.source):e.source;a.add(new r(e.originalLine,e.originalColumn,i,t,e.name))}}var a=new r,u=e.split(o),c=function(){var e=u.shift(),t=u.shift()||"";return e+t},l=1,p=0,h=null;return t.eachMapping(function(e){if(null!==h){if(!(l<e.generatedLine)){var t=u[0],n=t.substr(0,e.generatedColumn-p);return u[0]=t.substr(e.generatedColumn-p),p=e.generatedColumn,i(h,n),void(h=e)}i(h,c()),l++,p=0}for(;l<e.generatedLine;)a.add(c()),l++;if(p<e.generatedColumn){var t=u[0];a.add(t.substr(0,e.generatedColumn)),u[0]=t.substr(e.generatedColumn),p=e.generatedColumn}h=e},this),u.length>0&&(h&&i(h,c()),a.add(u.join(""))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);null!=r&&(null!=n&&(e=s.join(n,e)),a.setSourceContent(e,r))}),a},r.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},r.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);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},r.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)t=this.children[n],t[u]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},r.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},r.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[u]?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},r.prototype.setSourceContent=function(e,t){this.sourceContents[s.toSetString(e)]=t},r.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;t<n;t++)this.children[t][u]&&this.children[t].walkSourceContents(e);for(var r=Object.keys(this.sourceContents),t=0,n=r.length;t<n;t++)e(s.fromSetString(r[t]),this.sourceContents[r[t]])},r.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},r.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new i(e),r=!1,s=null,o=null,u=null,c=null;return this.walk(function(e,i){t.code+=e,null!==i.source&&null!==i.line&&null!==i.column?(s===i.source&&o===i.line&&u===i.column&&c===i.name||n.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name}),s=i.source,o=i.line,u=i.column,c=i.name,r=!0):r&&(n.addMapping({generated:{line:t.line,column:t.column}}),s=null,r=!1);for(var l=0,p=e.length;l<p;l++)e.charCodeAt(l)===a?(t.line++,t.column=0,l+1===p?(s=null,r=!1):r&&n.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name})):t.column++}),this.walkSourceContents(function(e,t){n.setSourceContent(e,t)}),{code:t.code,map:n}},n.SourceNode=r},{"./source-map-generator":34,"./util":36}],36:[function(e,t,n){function r(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')}function i(e){var t=e.match(y);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function s(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var t=e,r=i(e);if(r){if(!r.path)return e;t=r.path}for(var o,a=n.isAbsolute(t),u=t.split(/\/+/),c=0,l=u.length-1;l>=0;l--)o=u[l],"."===o?u.splice(l,1):".."===o?c++:c>0&&(""===o?(u.splice(l+1,c),c=0):(u.splice(l,2),c--));return t=u.join("/"),""===t&&(t=a?"/":"."),r?(r.path=t,s(r)):t}function a(e,t){""===e&&(e="."),""===t&&(t=".");var n=i(t),r=i(e);if(r&&(e=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),s(n);if(n||t.match(m))return t;if(r&&!r.host&&!r.path)return r.host=t,s(r);var a="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return r?(r.path=a,s(r)):a}function u(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)}function c(e){return"$"+e}function l(e){return e.substr(1)}function p(e,t,n){var r=e.source-t.source;return 0!==r?r:(r=e.originalLine-t.originalLine,0!==r?r:(r=e.originalColumn-t.originalColumn,0!==r||n?r:(r=e.generatedColumn-t.generatedColumn,0!==r?r:(r=e.generatedLine-t.generatedLine,0!==r?r:e.name-t.name))))}function h(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r?r:(r=e.generatedColumn-t.generatedColumn,0!==r||n?r:(r=e.source-t.source,0!==r?r:(r=e.originalLine-t.originalLine,0!==r?r:(r=e.originalColumn-t.originalColumn,0!==r?r:e.name-t.name))))}function f(e,t){return e===t?0:e>t?1:-1}function d(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n?n:(n=e.generatedColumn-t.generatedColumn,0!==n?n:(n=f(e.source,t.source),0!==n?n:(n=e.originalLine-t.originalLine,0!==n?n:(n=e.originalColumn-t.originalColumn,0!==n?n:f(e.name,t.name)))))}n.getArg=r;var y=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,m=/^data:.+\,.+$/;n.urlParse=i,n.urlGenerate=s,n.normalize=o,n.join=a,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(y)},n.relative=u,n.toSetString=c,n.fromSetString=l,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d},{}],37:[function(e,t,n){n.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,n.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,n.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":33,"./lib/source-map-generator":34,"./lib/source-node":35}],38:[function(e,t,n){t.exports={name:"nodent",version:"2.6.10",description:"NoDent - Asynchronous Javascript language extensions",main:"nodent.js",scripts:{cover:"istanbul cover ./nodent.js tests -- --quick --quiet --syntax --generators --forceStrict ; open ./coverage/lcov-report/index.html",test:"cd tests && npm i --prod && cd .. && ./nodent.js tests --syntax --quick --quiet --generators","test-loader":"cd tests/loader/app && npm test && cd ../../..",start:"./nodent.js"},dependencies:{acorn:"3.3.0","acorn-es7-plugin":"^1.0.18",resolve:"1.1.7","source-map":"0.5.3"},repository:{type:"git",url:"git+https://github.com/MatAtBread/nodent.git"},engines:"node >= 0.10.0",keywords:["Javascript","ES7","async","await","language","extensions","Node","callback","generator","Promise","asynchronous"],author:{name:"Mat At Bread",email:"nodent@mailed.me.uk"},license:"BSD-2-Clause",bugs:{url:"https://github.com/MatAtBread/nodent/issues"},gitHead:"385def047a46b19fa5abc698742e63159a96f47d",homepage:"https://github.com/MatAtBread/nodent#readme",_id:"nodent@2.6.10",_shasum:"bfab2501276e87db183573de321533e6e51dff7a",_from:"nodent@>=2.5.3 <3.0.0",_npmVersion:"3.10.3",_nodeVersion:"6.6.0",_npmUser:{name:"matatbread",email:"npm@mailed.me.uk"},maintainers:[{name:"matatbread",email:"npm@mailed.me.uk"}],dist:{shasum:"bfab2501276e87db183573de321533e6e51dff7a",tarball:"https://registry.npmjs.org/nodent/-/nodent-2.6.10.tgz"},_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/nodent-2.6.10.tgz_1475078302539_0.5869635329581797"},directories:{},_resolved:"https://registry.npmjs.org/nodent/-/nodent-2.6.10.tgz"}},{}],nodent:[function(e,t,n){(function(n,r,i,s,o,a,u,c){"use strict";function l(e){var t={};return e.forEach(function(e){if(e&&"object"==typeof e)for(var n in e)t[n]=e[n]}),t}function p(e){throw e}function h(){}function f(e){return"ExpressionStatement"===e.type&&("StringLiteral"===e.expression.type||"Literal"===e.expression.type&&"string"==typeof e.expression.value)}function d(t,n,r){var i,s,o={};if("string"==typeof t)(i=t.match(V))&&(s=i[1]||"default");else for(var a=0;a<t.body.length&&f(t.body[a].type);a++){var u="'"+t.body[a].value+"'";if(i=u.match(V)){s=i[1]||"default";break}}if(!i){if(!D.noUseDirective)return null;s="default",i=[null,null,"{}"]}if(s)try{r?e("fs").lstatSync(r).isDirectory()&&(r=e("path").dirname(r)):r=e("path").resolve(".");var c=e("resolve").sync("package.json",{moduleDirectory:[""],extensions:[""],basedir:r}),p=JSON.parse(N.readFileSync(c)).nodent.directive[s]}catch(e){}try{o=l([$[s],p,i[2]&&JSON.parse(i[2])])}catch(e){n("Invalid literal compiler option: "+(i&&i[0]||"<no options found>"))}return o.promises||o.es7||o.generators||o.engine?((o.promises||o.es7)&&o.generators&&(n("No valid 'use nodent' directive, assumed -es7 mode"),o=$.es7),o):null}function y(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),"#!"===e.substring(0,2)&&(e="//"+e),e}function m(e){var t;return t=e instanceof i?e:new i(e.toString(),"binary"),t.toString("base64")}function g(e,t,n,r){r=r||z;var i=this;return function(){var s=this,o=Array.prototype.slice.apply(arguments),a=function(r,a){return void 0==e&&(e=o.length),void 0==t?o[e]=r:o[e]=function(){var e=arguments[t];if(e)return a(e);if(Array.isArray(n)&&0===n.length)return r(arguments);var i=arguments[void 0===n?t+1:n];return r(i)},i.apply(s,o)};return new r(a)}}function v(e,t){return t=t||e.log,
+function(n,r,i){var s=y(N.readFileSync(r,"utf8")),o=e.parse(s,r,i);i=i||d(o.ast,t,r),e.asynchronize(o,void 0,i,t),e.prettyPrint(o,i),n._compile(o.code,o.filename)}}function b(e){return e=e||z,function(t,n,r){if(Array.isArray(n)){var i=n;n=function(e,t){return i.indexOf(e)>=0}}else n=n||function(e,t){return!(e.match(/Sync$/)&&e.replace(/Sync$/,"")in t)};r||(r="");var s=Object.create(t);for(var o in s)(function(){var i=o;try{"function"!=typeof t[i]||s[i+r]&&s[i+r].isAsync||!n(i,s)||(s[i+r]=function(){var n=Array.prototype.slice.call(arguments),r=function(e,r){var s=function(t,n){if(t)return r(t);switch(arguments.length){case 0:return e();case 2:return e(n);default:return e(Array.prototype.slice.call(arguments,1))}};n.length>t[i].length?n.push(s):n[t[i].length-1]=s;t[i].apply(t,n)};return new e(r)},s[i+r].isAsync=!0)}catch(e){}})();return s.super=t,s}}function x(t,n){var r=t.filename.split("/"),i=r.pop(),s=B(t.ast,n&&n.sourcemap?{map:{startLine:n.mapStartLine||0,file:i+"(original)",sourceMapRoot:r.join("/"),sourceContent:t.origCode}}:null,t.origCode);if(n&&n.sourcemap)try{var o="",a=s.map.toJSON();if(a){var u=e("source-map").SourceMapConsumer;t.sourcemap=a,P[t.filename]={map:a,smc:new u(a)},o="\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+m(JSON.stringify(a))+"\n"}t.code=s.code+o}catch(e){t.code=s}else t.code=s;return t}function w(e,t,n,r){"object"==typeof n&&void 0===r&&(r=n);var i={origCode:e.toString(),filename:t};try{return i.ast=F.parse(i.origCode,r&&r.parser),r.babelTree&&F.treeWalker(i.ast,function(e,t,n){"Literal"===e.type?n[0].replace(j.babelLiteralNode(e.value)):"Property"===e.type&&("ClassBody"===n[0].parent.type?e.type="ClassProperty":e.type="ObjectProperty"),t()}),i}catch(e){if(e instanceof SyntaxError){var s=i.origCode.substr(e.pos-e.loc.column);s=s.split("\n")[0],e.message+=" "+t+" (nodent)\n"+s+"\n"+s.replace(/[\S ]/g,"-").substring(0,e.loc.column)+"^",e.stack=""}throw e}}function E(e){var t={};return Error.captureStackTrace(t,q),function(n){if(n instanceof Error&&t){try{n.stack=n.stack.split("\n").slice(0,3).filter(function(e){return!e.match(/^\s*at.*nodent\.js/)}).join("\n")+n.stack.split("\n").slice(3).map(function(e){return"\n "+e}).join("")+t.stack.split("\n").slice(2).filter(function(e){return!e.match(/^\s*at.*nodent\.js/)}).map(function(e,t){return t?"\n"+e:e.replace(/^(\s*)at /g,"\n$1await ")}).join("")}catch(e){}t=null}return e.call(this,n)}}function S(t,n){n=n||{};var r=t+"|"+Object.keys(n).sort().reduce(function(e,t){return e+t+JSON.stringify(n[t])},"");return this.covers[r]||(t.indexOf("/")>=0?this.covers[r]=e(t):this.covers[r]=e(c+"/covers/"+t)),this.covers[r](this,n)}function k(e,t,n,r){"object"==typeof n&&void 0===r&&(r=n),r=r||{};for(var i in D)i in r||(r[i]=D[i]);var s=this.parse(e,t,null,r);return this.asynchronize(s,null,r,this.log||h),this.prettyPrint(s,r),s}function A(t,n,r){var i={},s=this;n||(n=/\.njs$/),r?r.compiler||(r.compiler={}):r={compiler:{}};var o=l([I,r.compiler]);return function(a,u,c){function l(e){u.statusCode=500,u.write(e.toString()),u.end()}if(i[a.url])return u.setHeader("Content-Type",i[a.url].contentType),r.setHeaders&&r.setHeaders(u),u.write(i[a.url].output),void u.end();if(!(a.url.match(n)||r.htmlScriptRegex&&a.url.match(r.htmlScriptRegex)))return c&&c();var p=t+a.url;if(r.extensions&&!N.existsSync(p))for(var h=0;h<r.extensions.length;h++)if(N.existsSync(p+"."+r.extensions[h])){p=p+"."+r.extensions[h];break}N.readFile(p,function(t,n){if(t)return l(t);try{var c,p;r.htmlScriptRegex&&a.url.match(r.htmlScriptRegex)?(c=e("./htmlScriptParser")(s,n.toString(),a.url,r),p="text/html"):(r.runtime?(c="Function.prototype."+o.$asyncbind+" = "+q.toString()+";",o.generators&&(c+="Function.prototype."+o.$asyncspawn+" = "+W.toString()+";"),o.wrapAwait&&!o.promises&&(c+="Object."+o.$makeThenable+" = "+z.resolve.toString()+";"),o.mapStartLine=c.split("\n").length,c+="\n"):c="",c+=s.compile(n.toString(),a.url,null,o).code,p="application/javascript"),u.setHeader("Content-Type",p),r.enableCache&&(i[a.url]={output:c,contentType:p}),r.setHeaders&&r.setHeaders(u),u.write(c),u.end()}catch(e){return l(e)}})}}function _(e){this.covers={},this._ident=_.prototype.version+"_"+Math.random(),this.setOptions(e)}function C(e,t){function n(e){var t=e.getFileName();if(t&&P[t]){var n=P[t].smc.originalPositionFor({line:e.getLineNumber(),column:e.getColumnNumber()});if(n&&n.line){var r=e.toString();return"\n at "+r.substring(0,r.length-1)+" => …"+n.source+":"+n.line+":"+n.column+(e.getFunctionName()?")":"")}}return"\n at "+e}return e+t.map(n).join("")}function L(e){var t={};t[D.$asyncbind]={value:q,writable:!0,enumerable:!1,configurable:!0},t[D.$asyncspawn]={value:W,writable:!0,enumerable:!1,configurable:!0},t.noDentify={value:g,configurable:!0,enumerable:!1,writable:!0};try{Object.defineProperties(Function.prototype,t)}catch(t){e.log("Function prototypes already assigned: ",t.messsage)}D[D.$error]in r||(r[D[D.$error]]=p),e.asyncStackTrace&&(q.wrapAsyncStack=E),e.augmentObject&&Object.defineProperties(Object.prototype,{asyncify:{value:function(e,t,n){return b(e)(this,t,n)},writable:!0,configurable:!0},isThenable:{value:function(){return z.isThenable(this)},writable:!0,configurable:!0}}),Object[D.$makeThenable]=z.resolve}function T(t){function n(e,t){e=e.split("."),t=t.split(".");for(var n=0;n<3;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0}function r(i,s){if(!s.match(/nodent\/nodent.js$/)){for(var u=0;u<o.length;u++)if(s.slice(0,o[u].path.length)==o[u].path){if(o[u].jsCompiler){if(o[u].jsCompiler===r)break;return o[u].jsCompiler.apply(this,arguments)}return O(i,s)}var c=y(N.readFileSync(s,"utf8")),l=d(c,t.log,s);return l?a(i,s,l):O(i,s)}var p={path:s.replace(/\/node_modules\/nodent\/nodent.js$/,"")};p.path&&(p.version=JSON.parse(N.readFileSync(s.replace(/nodent\.js$/,"package.json"))).version,O(i,s),n(p.version,_.prototype.version)<0&&(p.originalNodentLoader=i.exports,i.exports=function(){var n=e.extensions[".js"],r=p.originalNodentLoader.apply(this,arguments);return p.jsCompiler=e.extensions[".js"],e.extensions[".js"]=n,L(t),r},Object.keys(p.originalNodentLoader).forEach(function(e){i.exports[e]=p.originalNodentLoader[e]}),o.push(p),o=o.sort(function(e,t){return t.path.length-e.path.length})))}function i(n){if(Array.isArray(n))return n.forEach(i);if(e.extensions[n]){var r=Object.keys(t).filter(function(e){return Y[e]!=t[e]});r.length&&t.log("File extension "+n+" already configured for async/await compilation.")}e.extensions[n]=v(Y,t.log)}if(t){for(var s in t)if("use"!==s&&!M.hasOwnProperty(s))throw new Error("NoDent: unknown option: "+s+"="+JSON.stringify(t[s]))}else t={};Y?Y.setOptions(t):(Object.keys(M).forEach(function(e){e in t||(t[e]=M[e])}),Y=new _(t)),t.dontMapStackTraces||(Error.prepareStackTrace=C),L(t);var o=[];if(!t.dontInstallRequireHook){if(!O){O=e.extensions[".js"];var a=v(Y,t.log);e.extensions[".js"]=r}t.extension&&i(t.extension)}return t.use&&(Array.isArray(t.use)?(t.log("Warning: nodent({use:[...]}) is deprecated. Use nodent.require(module,options)\n"+(new Error).stack.split("\n")[2]),t.use.length&&t.use.forEach(function(e){Y[e]=Y.require(e)})):(t.log("Warning: nodent({use:{...}}) is deprecated. Use nodent.require(module,options)\n"+(new Error).stack.split("\n")[2]),Object.keys(t.use).forEach(function(e){Y[e]=Y.require(e,t.use[e])}))),Y}function R(){function t(e){return new z(function(t,n){var r=[];e.on("data",function(e){r.push(e)}),e.on("end",function(){var e=r.map(function(e){return e.toString()}).join("");return t(e)}),e.on("error",n)}.$asyncbind(this))}function i(e){for(var t=[],r=e||2;r<n.argv.length;r++)if("--"===n.argv[r].slice(0,2)){var i=n.argv[r].slice(2).split("=");t[i[0]]=i[1]||!0}else t.push(n.argv[r]);return t}function s(e){var t,n;u.fromast?(e=JSON.parse(e),t={origCode:"",filename:o,ast:e},n=d(e,c.log),n||(u.use=u.use?'"use nodent-'+u.use+'";':'"use nodent";',n=d(u.use,c.log),console.warn("/* "+o+": No 'use nodent*' directive, assumed "+u.use+" */"))):(n=d(u.use?'"use nodent-'+u.use+'";':e,c.log),n||(u.use='"use nodent";',n=d(u.use,c.log),console.warn("/* "+o+": 'use nodent*' directive missing/ignored, assumed "+u.use+" */")),t=c.parse(e,o,n)),u.parseast||u.pretty||c.asynchronize(t,void 0,n,c.log),c.prettyPrint(t,n),(u.out||u.pretty)&&(u.runtime&&(console.log("Function.prototype.$asyncbind = "+Function.prototype.$asyncbind.toString()+";\n"),console.log("global.$error = global.$error || "+r.$error.toString()+";\n")),console.log(t.code)),(u.minast||u.parseast)&&console.log(JSON.stringify(t.ast,function(e,t){return"$"===e[0]||e.match(/^(start|end|loc)$/)?void 0:t},2,null)),u.ast&&console.log(JSON.stringify(t.ast,function(e,t){return"$"===e[0]?void 0:t},0)),u.exec&&new Function(t.code)()}var o,a=e("path"),u=(n.env.NODENT_OPTS&&JSON.parse(n.env.NODENT_OPTS)||{},i());T.setDefaultCompileOptions({sourcemap:u.sourcemap,wrapAwait:u.wrapAwait,lazyThenables:u.lazyThenables,noUseDirective:!!u.use});var c=T({augmentObject:!0});if(!(u.fromast||u.parseast||u.pretty||u.out||u.ast||u.minast||u.exec))try{var l=a.resolve(u[0]);return e(l)}catch(e){throw e&&(e.message=u[0]+": "+e.message),e}return 0==u.length||"-"===u[0]?(o="(stdin)",t(n.stdin).then(s,p)):(o=a.resolve(u[0]),s(y(N.readFileSync(o,"utf8"))))}var O,P={},N=e("fs"),B=e("./lib/output"),F=e("./lib/parser"),j=e("./lib/arboriculture"),M={log:function(e){console.warn("Nodent: "+e)},augmentObject:!1,extension:".njs",dontMapStackTraces:!1,asyncStackTrace:!1,babelTree:!1,dontInstallRequireHook:!1},I={lazyThenables:!1,noUseDirective:!1,wrapAwait:null,mapStartLine:0,sourcemap:!0,parser:{sourceType:"script"},$return:"$return",$error:"$error",$arguments:"$args",$asyncspawn:"$asyncspawn",$asyncbind:"$asyncbind",generatedSymbolPrefix:"$",$makeThenable:"$makeThenable"},D=Object.create(I,{es7:{value:!0,writable:!0,enumerable:!0}}),$={default:D,es7:Object.create(D),promise:Object.create(D,{promises:{value:!0,writable:!0,enumerable:!0}}),generator:Object.create(D,{generators:{value:!0,writable:!0,enumerable:!0},es7:{value:!1,writable:!0,enumerable:!0}}),engine:Object.create(D,{engine:{value:!0,writable:!0,enumerable:!0},promises:{value:!0,writable:!0,enumerable:!0}})};$.promises=$.promise,$.generators=$.generator;var V=/^\s*['"]use\s+nodent-?([a-zA-Z0-9]*)?(\s*.*)?['"]\s*;/,U=e("./lib/runtime"),q=U.$asyncbind,W=U.$asyncspawn,z=e("./lib/thenable");_.prototype.setOptions=function(e){return this.log=e.log===!1?h:e.log||this.log,this.options=l([this.options,e]),delete this.options.log,this},_.prototype.version=e("./package.json").version,_.prototype.Thenable=z,_.prototype.EagerThenable=e("./lib/eager.js"),_.prototype.isThenable=z.isThenable,_.prototype.asyncify=b,_.prototype.require=S,_.prototype.generateRequestHandler=A,_.prototype.$asyncspawn=W,_.prototype.$asyncbind=q,_.prototype.parse=w,_.prototype.compile=k,_.prototype.asynchronize=j.asynchronize,_.prototype.prettyPrint=x,_.prototype.parseCompilerOptions=d,_.prototype.getDefaultCompileOptions=void 0,Object.defineProperty(_.prototype,"Promise",{get:function(){return initOpts.log("Warning: nodent.Promise is deprecated. Use nodent.Thenable instead"),z},enumerable:!1,configurable:!1});var Y;T.setDefaultCompileOptions=function(e,t){return e&&Object.keys(e).forEach(function(t){if(!(t in D))throw new Error("NoDent: unknown compiler option: "+t);D[t]=e[t]}),t&&Object.keys(t).forEach(function(e){if(!(e in t))throw new Error("NoDent: unknown configuration option: "+e);M[e]=t[e]}),T},T.setCompileOptions=function(e,t){return optionSet[e]=optionSet[e]||l([D]),t&&Object.keys(t).forEach(function(n){if(!(n in D))throw new Error("NoDent: unknown compiler option: "+n);optionSet[e][n]=t[n]}),T},T.asyncify=b,T.Thenable=z,T.EagerThenable=e("./lib/eager.js"),t.exports=T,e.main===t&&n.argv.length>=3&&R()}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/nodent")},{"./htmlScriptParser":8,"./lib/arboriculture":9,"./lib/eager.js":10,"./lib/output":11,"./lib/parser":12,"./lib/runtime":13,"./lib/thenable":14,"./package.json":38,_process:7,buffer:2,fs:1,path:6,resolve:20,"source-map":37}]},{},[]); \ No newline at end of file
diff --git a/tools/eslint/node_modules/ajv/dist/regenerator.min.js b/tools/eslint/node_modules/ajv/dist/regenerator.min.js
new file mode 100644
index 0000000000..3099ecde43
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/dist/regenerator.min.js
@@ -0,0 +1,12 @@
+/* regenerator 0.8.42: Source transformer enabling ECMAScript 6 generator functions (yield) in JavaScript-of-today (ES5) */
+require=function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){var n=t[o][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){},{}],2:[function(e,t,n){function r(e,t){return d.isUndefined(t)?""+t:d.isNumber(t)&&!isFinite(t)?t.toString():d.isFunction(t)||d.isRegExp(t)?t.toString():t}function i(e,t){return d.isString(e)?e.length<t?e:e.slice(0,t):e}function a(e){return i(JSON.stringify(e.actual,r),128)+" "+e.operator+" "+i(JSON.stringify(e.expected,r),128)}function o(e,t,n,r,i){throw new y.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function s(e,t){e||o(e,!0,t,"==",y.ok)}function l(e,t){if(e===t)return!0;if(d.isBuffer(e)&&d.isBuffer(t)){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return d.isDate(e)&&d.isDate(t)?e.getTime()===t.getTime():d.isRegExp(e)&&d.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:d.isObject(e)||d.isObject(t)?c(e,t):e==t}function u(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function c(e,t){if(d.isNullOrUndefined(e)||d.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(d.isPrimitive(e)||d.isPrimitive(t))return e===t;var n=u(e),r=u(t);if(n&&!r||!n&&r)return!1;if(n)return e=h.call(e),t=h.call(t),l(e,t);var i,a,o=g(e),s=g(t);if(o.length!=s.length)return!1;for(o.sort(),s.sort(),a=o.length-1;a>=0;a--)if(o[a]!=s[a])return!1;for(a=o.length-1;a>=0;a--)if(i=o[a],!l(e[i],t[i]))return!1;return!0}function p(e,t){return!(!e||!t)&&("[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t||t.call({},e)===!0)}function f(e,t,n,r){var i;d.isString(n)&&(r=n,n=null);try{t()}catch(e){i=e}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&o(i,n,"Missing expected exception"+r),!e&&p(i,n)&&o(i,n,"Got unwanted exception"+r),e&&i&&n&&!p(i,n)||!e&&i)throw i}var d=e("util/"),h=Array.prototype.slice,m=Object.prototype.hasOwnProperty,y=t.exports=s;y.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=a(this),this.generatedMessage=!0);var t=e.stackStartFunction||o;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=t.name,s=r.indexOf("\n"+i);if(s>=0){var l=r.indexOf("\n",s+1);r=r.substring(l+1)}this.stack=r}}},d.inherits(y.AssertionError,Error),y.fail=o,y.ok=s,y.equal=function(e,t,n){e!=t&&o(e,t,n,"==",y.equal)},y.notEqual=function(e,t,n){e==t&&o(e,t,n,"!=",y.notEqual)},y.deepEqual=function(e,t,n){l(e,t)||o(e,t,n,"deepEqual",y.deepEqual)},y.notDeepEqual=function(e,t,n){l(e,t)&&o(e,t,n,"notDeepEqual",y.notDeepEqual)},y.strictEqual=function(e,t,n){e!==t&&o(e,t,n,"===",y.strictEqual)},y.notStrictEqual=function(e,t,n){e===t&&o(e,t,n,"!==",y.notStrictEqual)},y.throws=function(e,t,n){f.apply(this,[!0].concat(h.call(arguments)))},y.doesNotThrow=function(e,t){f.apply(this,[!1].concat(h.call(arguments)))},y.ifError=function(e){if(e)throw e};var g=Object.keys||function(e){var t=[];for(var n in e)m.call(e,n)&&t.push(n);return t}},{"util/":34}],3:[function(e,t,n){arguments[4][1][0].apply(n,arguments)},{dup:1}],4:[function(e,t,n){(function(t){"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function i(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=o.prototype):(null===e&&(e=new o(t)),e.length=t),e}function o(e,t,n){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return s(this,e,t,n)}function s(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?d(e,t,n,r):"string"==typeof t?p(e,t,n):h(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t,n,r){return l(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}function c(e,t){if(l(t),e=a(e,t<0?0:0|m(t)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!o.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|g(t,n);e=a(e,r);var i=e.write(t,n);return i!==r&&(e=e.slice(0,i)),e}function f(e,t){var n=t.length<0?0:0|m(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),o.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=o.prototype):e=f(e,t),e}function h(e,t){if(o.isBuffer(t)){var n=0|m(t.length);return e=a(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||Y(t.length)?a(e,0):f(e,t);if("Buffer"===t.type&&Z(t.data))return f(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function m(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function y(e){return+e!=e&&(e=0),o.alloc(+e)}function g(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return P(this,t,n);case"ascii":return I(this,t,n);case"latin1":case"binary":return j(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function b(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function E(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:S(e,t,n,r,i);if("number"==typeof t)return t=255&t,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):S(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function S(e,t,n,r,i){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,l=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;u<s;u++)if(a(e,u)===a(t,c===-1?0:u-c)){if(c===-1&&(c=u),u-c+1===l)return c*o}else c!==-1&&(u-=u-c),c=-1}else for(n+l>s&&(n=s-l),u=n;u>=0;u--){for(var p=!0,f=0;f<l;f++)if(a(e,u+f)!==a(t,f)){p=!1;break}if(p)return u}return-1}function w(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function x(e,t,n,r){return G(z(t,e.length-n),e,n,r)}function k(e,t,n,r){return G(W(t),e,n,r)}function T(e,t,n,r){return k(e,t,n,r)}function A(e,t,n,r){return G(H(t),e,n,r)}function L(e,t,n,r){return G($(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,n))}function P(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=n){var l,u,c,p;switch(s){case 1:a<128&&(o=a);break;case 2:l=e[i+1],128===(192&l)&&(p=(31&a)<<6|63&l,p>127&&(o=p));break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(p=(15&a)<<12|(63&l)<<6|63&u,p>2047&&(p<55296||p>57343)&&(o=p));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(p=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c,p>65535&&p<1114112&&(o=p))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return _(r)}function _(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=ee));return n}function I(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function j(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function O(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=V(e[a]);return i}function M(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function N(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function B(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function F(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function X(e,t,n,r,i){return i||F(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||F(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(e,t,n,r,52,8),n+8}function J(e){if(e=q(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function q(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function W(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function $(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function H(e){return K.toByteArray(J(e))}function G(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e){return e!==e}var K=e("base64-js"),Q=e("ieee754"),Z=e("isarray");n.Buffer=o,n.SlowBuffer=y,n.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:r(),n.kMaxLength=i(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return s(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return u(null,e,t,n)},o.allocUnsafe=function(e){return c(null,e)},o.allocUnsafeSlow=function(e){return c(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Z(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=o.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!o.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},o.byteLength=g,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)b(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},o.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?P(this,0,e):v.apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},o.prototype.compare=function(e,t,n,r,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,s=n-t,l=Math.min(a,s),u=this.slice(r,i),c=e.slice(t,n),p=0;p<l;++p)if(u[p]!==c[p]){a=u[p],s=c[p];break}return a<s?-1:s<a?1:0},o.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},o.prototype.indexOf=function(e,t,n){return E(this,e,t,n,!0)},o.prototype.lastIndexOf=function(e,t,n){return E(this,e,t,n,!1)},o.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return k(this,e,t,n);case"latin1":case"binary":return T(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var r;if(o.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=o.prototype;else{var i=t-e;r=new o(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+e]}return r},o.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||N(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},o.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||N(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||N(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||N(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||N(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(e,t){return t||N(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){t||N(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||N(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||N(e,4,this.length),Q.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),Q.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),Q.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),Q.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;D(this,e,t,n,i,0)}var a=1,o=0;for(this[t]=255&e;++o<n&&(a*=256);)this[t+o]=e/a&255;return t+n},o.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;D(this,e,t,n,i,0)}var a=n-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return X(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return X(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},o.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e=255&e);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var s=o.isBuffer(e)?e:z(new o(e,r).toString()),l=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%l]}return this};var te=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":5,ieee754:6,isarray:7}],5:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-r(e)}function a(e){var t,n,i,a,o,s,l=e.length;o=r(e),s=new p(3*l/4-o),i=o>0?l-4:l;var u=0;for(t=0,n=0;t<i;t+=4,n+=3)a=c[e.charCodeAt(t)]<<18|c[e.charCodeAt(t+1)]<<12|c[e.charCodeAt(t+2)]<<6|c[e.charCodeAt(t+3)],s[u++]=a>>16&255,s[u++]=a>>8&255,s[u++]=255&a;return 2===o?(a=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,s[u++]=255&a):1===o&&(a=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,s[u++]=a>>8&255,s[u++]=255&a),s}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function s(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],i.push(o(r));return i.join("")}function l(e){for(var t,n=e.length,r=n%3,i="",a=[],o=16383,l=0,c=n-r;l<c;l+=o)a.push(s(e,l,l+o>c?c:l+o));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),a.push(i),a.join("")}n.byteLength=i,n.toByteArray=a,n.fromByteArray=l;for(var u=[],c=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,h=f.length;d<h;++d)u[d]=f[d],c[f.charCodeAt(d)]=d;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},{}],6:[function(e,t,n){n.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,p=n?i-1:0,f=n?-1:1,d=e[t+p];for(p+=f,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+e[t+p],p+=f,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+p],p+=f,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:(d?-1:1)*(1/0);o+=Math.pow(2,r),a-=u}return(d?-1:1)*o*Math.pow(2,a-r)},n.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,p=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=o+p>=1?f/l:f*Math.pow(2,1-p),t*l>=2&&(o++,l/=2),o+p>=c?(s=0,o=c):o+p>=1?(s=(t*l-1)*Math.pow(2,i),o+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+d]=255&s,d+=h,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[n+d]=255&o,d+=h,o/=256,u-=8);e[n+d-h]|=128*m}},{}],7:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],8:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function a(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!a(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,a,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(n=this._events[e],s(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(o(n))for(a=Array.prototype.slice.call(arguments,1),u=n.slice(),r=u.length,l=0;l<r;l++)u[l].apply(this,a);return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,a,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],9:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],10:[function(e,t,n){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function i(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}t.exports=function(e){return null!=e&&(r(e)||i(e)||!!e._isBuffer)}},{}],11:[function(e,t,n){n.endianness=function(){return"LE"},n.hostname=function(){return"undefined"!=typeof location?location.hostname:""},n.loadavg=function(){return[]},n.uptime=function(){return 0},n.freemem=function(){return Number.MAX_VALUE},n.totalmem=function(){return Number.MAX_VALUE},n.cpus=function(){return[]},n.type=function(){return"Browser"},n.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},n.networkInterfaces=n.getNetworkInterfaces=function(){return{}},n.arch=function(){return"javascript"},n.platform=function(){return"browser"},n.tmpdir=n.tmpDir=function(){return"/tmp"},n.EOL="\n"},{}],12:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(e){return i.exec(e).slice(1)};n.resolve=function(){for(var n="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),a="/"===o(e,-1);return e=t(r(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");
+return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),a=r(t.split("/")),o=Math.min(i.length,a.length),s=o,l=0;l<o;l++)if(i[l]!==a[l]){s=l;break}for(var u=[],l=s;l<i.length;l++)u.push("..");return u=u.concat(a.slice(s)),u.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=a(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=a(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return a(e)[3]};var o="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:13}],13:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(p===setTimeout)return setTimeout(e,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(e,0);try{return p(e,0)}catch(t){try{return p.call(null,e,0)}catch(t){return p.call(this,e,0)}}}function o(e){if(f===clearTimeout)return clearTimeout(e);if((f===i||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function s(){y&&h&&(y=!1,h.length?m=h.concat(m):g=-1,m.length&&l())}function l(){if(!y){var e=a(s);y=!0;for(var t=m.length;t;){for(h=m,m=[];++g<t;)h&&h[g].run();g=-1,t=m.length}h=null,y=!1,o(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var p,f,d=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:r}catch(e){p=r}try{f="function"==typeof clearTimeout?clearTimeout:i}catch(e){f=i}}();var h,m=[],y=!1,g=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];m.push(new u(e,t)),1!==m.length||y||a(l)},u.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{}],14:[function(e,t,n){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":15}],15:[function(e,t,n){"use strict";function r(e){return this instanceof r?(u.call(this,e),c.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new r(e)}function i(){this.allowHalfOpen||this._writableState.ended||s(a,this)}function a(e){e.end()}var o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=r;var s=e("process-nextick-args"),l=e("core-util-is");l.inherits=e("inherits");var u=e("./_stream_readable"),c=e("./_stream_writable");l.inherits(r,u);for(var p=o(c.prototype),f=0;f<p.length;f++){var d=p[f];r.prototype[d]||(r.prototype[d]=c.prototype[d])}},{"./_stream_readable":17,"./_stream_writable":19,"core-util-is":22,inherits:9,"process-nextick-args":24}],16:[function(e,t,n){"use strict";function r(e){return this instanceof r?void i.call(this,e):new r(e)}t.exports=r;var i=e("./_stream_transform"),a=e("core-util-is");a.inherits=e("inherits"),a.inherits(r,i),r.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":18,"core-util-is":22,inherits:9}],17:[function(e,t,n){(function(n){"use strict";function r(e,t,n){return"function"==typeof e.prependListener?e.prependListener(t,n):void(e._events&&e._events[t]?_(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n))}function i(t,n){X=X||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,n instanceof X&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new F,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(B||(B=e("string_decoder/").StringDecoder),this.decoder=new B(t.encoding),this.encoding=t.encoding)}function a(t){return X=X||e("./_stream_duplex"),this instanceof a?(this._readableState=new i(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),void I.call(this)):new a(t)}function o(e,t,n,r,i){var a=c(t,n);if(a)e.emit("error",a);else if(null===n)t.reading=!1,p(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var o=new Error("stream.push() after EOF");e.emit("error",o)}else if(t.endEmitted&&i){var l=new Error("stream.unshift() after end event");e.emit("error",l)}else{var u;!t.decoder||i||r||(n=t.decoder.write(n),u=!t.objectMode&&0===n.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&f(e))),h(e,t)}else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function l(e){return e>=U?e=U:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function u(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=l(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function c(e,t){var n=null;return O.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function p(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,f(e)}}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(R("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?P(d,e):d(e))}function d(e){R("emit readable"),e.emit("readable"),E(e)}function h(e,t){t.readingMore||(t.readingMore=!0,P(m,e,t))}function m(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(R("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function y(e){return function(){var t=e._readableState;R("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&j(e,"data")&&(t.flowing=!0,E(e))}}function g(e){R("readable nexttick read 0"),e.read(0)}function v(e,t){t.resumeScheduled||(t.resumeScheduled=!0,P(b,e,t))}function b(e,t){t.reading||(R("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),E(e),t.flowing&&!t.reading&&e.read(0)}function E(e){var t=e._readableState;for(R("flow",t.flowing);t.flowing&&null!==e.read(););}function S(e,t){if(0===t.length)return null;var n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=w(e,t.buffer,t.decoder),n}function w(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?x(e,t):k(e,t),r}function x(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(i+=o===a.length?a:a.slice(0,e),e-=o,0===e){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}function k(e,t){var n=M.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),e-=o,0===e){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function T(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,P(A,t,e))}function A(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function C(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}t.exports=a;var P=e("process-nextick-args"),_=e("isarray");a.ReadableState=i;var I,j=(e("events").EventEmitter,function(e,t){return e.listeners(t).length});!function(){try{I=e("stream")}catch(e){}finally{I||(I=e("events").EventEmitter)}}();var O=e("buffer").Buffer,M=e("buffer-shims"),N=e("core-util-is");N.inherits=e("inherits");var D=e("util"),R=void 0;R=D&&D.debuglog?D.debuglog("stream"):function(){};var B,F=e("./internal/streams/BufferList");N.inherits(a,I);var X,X;a.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding,t!==n.encoding&&(e=M.from(e,t),t="")),o(this,n,e,t,!1)},a.prototype.unshift=function(e){var t=this._readableState;return o(this,t,e,"",!0)},a.prototype.isPaused=function(){return this._readableState.flowing===!1},a.prototype.setEncoding=function(t){return B||(B=e("string_decoder/").StringDecoder),this._readableState.decoder=new B(t),this._readableState.encoding=t,this};var U=8388608;a.prototype.read=function(e){R("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return R("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):f(this),null;if(e=u(e,t),0===e&&t.ended)return 0===t.length&&T(this),null;var r=t.needReadable;R("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,R("length less than watermark",r)),t.ended||t.reading?(r=!1,R("reading or ended",r)):r&&(R("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=u(n,t)));var i;return i=e>0?S(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&T(this)),null!==i&&this.emit("data",i),i},a.prototype._read=function(e){this.emit("error",new Error("not implemented"))},a.prototype.pipe=function(e,t){function i(e){R("onunpipe"),e===f&&o()}function a(){R("onend"),e.end()}function o(){R("cleanup"),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("drain",g),e.removeListener("error",l),e.removeListener("unpipe",i),f.removeListener("end",a),f.removeListener("end",o),f.removeListener("data",s),v=!0,!d.awaitDrain||e._writableState&&!e._writableState.needDrain||g()}function s(t){R("ondata"),b=!1;var n=e.write(t);!1!==n||b||((1===d.pipesCount&&d.pipes===e||d.pipesCount>1&&C(d.pipes,e)!==-1)&&!v&&(R("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,b=!0),f.pause())}function l(t){R("onerror",t),p(),e.removeListener("error",l),0===j(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",c),p()}function c(){R("onfinish"),e.removeListener("close",u),p()}function p(){R("unpipe"),f.unpipe(e)}var f=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=e;break;case 1:d.pipes=[d.pipes,e];break;default:d.pipes.push(e)}d.pipesCount+=1,R("pipe count=%d opts=%j",d.pipesCount,t);var h=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr,m=h?a:o;d.endEmitted?P(m):f.once("end",m),e.on("unpipe",i);var g=y(f);e.on("drain",g);var v=!1,b=!1;return f.on("data",s),r(e,"error",l),e.once("close",u),e.once("finish",c),e.emit("pipe",f),d.flowing||(R("pipe resume"),f.resume()),e},a.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var a=C(t.pipes,e);return a===-1?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},a.prototype.on=function(e,t){var n=I.prototype.on.call(this,e,t);if("data"===e)this._readableState.flowing!==!1&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&f(this,r):P(g,this))}return n},a.prototype.addListener=a.prototype.on,a.prototype.resume=function(){var e=this._readableState;return e.flowing||(R("resume"),e.flowing=!0,v(this,e)),this},a.prototype.pause=function(){return R("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(R("pause"),this._readableState.flowing=!1,this.emit("pause")),this},a.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(R("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){if(R("wrapped data"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){var a=r.push(i);a||(n=!0,e.pause())}});for(var i in e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var a=["error","close","destroy","pause","resume"];return L(a,function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){R("wrapped _read",t),n&&(n=!1,e.resume())},r},a._fromList=S}).call(this,e("_process"))},{"./_stream_duplex":15,"./internal/streams/BufferList":20,_process:13,buffer:4,"buffer-shims":21,"core-util-is":22,events:8,inherits:9,isarray:23,"process-nextick-args":24,"string_decoder/":31,util:3}],18:[function(e,t,n){"use strict";function r(e){this.afterTransform=function(t,n){return i(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&e._read(a.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);s.call(this,e),this._transformState=new r(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e){o(t,e)}):o(t)})}function o(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}t.exports=a;var s=e("./_stream_duplex"),l=e("core-util-is");l.inherits=e("inherits"),l.inherits(a,s),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("Not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},{"./_stream_duplex":15,"core-util-is":22,inherits:9}],19:[function(e,t,n){(function(n){"use strict";function r(){}function i(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function a(t,n){_=_||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,n instanceof _&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var r=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){h(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new w(this)}function o(t){return _=_||e("./_stream_duplex"),this instanceof o||this instanceof _?(this._writableState=new a(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),void A.call(this)):new o(t)}function s(e,t){var n=new Error("write after end");e.emit("error",n),x(t,n)}function l(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):C.isBuffer(n)||"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),x(r,a),i=!1),i}function u(e,t,n){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=P.from(t,n)),t}function c(e,t,n,r,a){n=u(t,n,r),C.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var s=t.length<t.highWaterMark;if(s||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest=new i(n,r,a),l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else p(e,t,!1,o,n,r,a);return s}function p(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function f(e,t,n,r,i){--t.pendingcb,n?x(i,r):i(r),e._writableState.errorEmitted=!0,e.emit("error",r)}function d(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function h(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(d(n),t)f(e,n,r,t,i);else{var a=v(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||g(e,n),r?k(m,e,n,a,i):m(e,n,a,i)}}function m(e,t,n,r){n||y(e,t),t.pendingcb--,r(),E(e,t)}function y(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function g(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var o=0;n;)i[o]=n,n=n.next,o+=1;p(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new w(t)}else{for(;n;){var s=n.chunk,l=n.encoding,u=n.callback,c=t.objectMode?1:s.length;if(p(e,t,!1,c,s,l,u),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function v(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function b(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function E(e,t){var n=v(t);return n&&(0===t.pendingcb?(b(e,t),t.finished=!0,e.emit("finish")):b(e,t)),n}function S(e,t,n){t.ending=!0,E(e,t),n&&(t.finished?x(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function w(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}t.exports=o;var x=e("process-nextick-args"),k=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?setImmediate:x;o.WritableState=a;var T=e("core-util-is");T.inherits=e("inherits");var A,L={deprecate:e("util-deprecate")};!function(){try{A=e("stream")}catch(e){}finally{A||(A=e("events").EventEmitter)}}();var C=e("buffer").Buffer,P=e("buffer-shims");T.inherits(o,A);var _;a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(a.prototype,"buffer",{get:L.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var _;o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},o.prototype.write=function(e,t,n){var i=this._writableState,a=!1;return"function"==typeof t&&(n=t,t=null),C.isBuffer(e)?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=r),i.ended?s(this,n):l(this,i,e,n)&&(i.pendingcb++,a=c(this,i,e,t,n)),a},o.prototype.cork=function(){var e=this._writableState;e.corked++},o.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||g(this,e))},o.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},o.prototype._write=function(e,t,n){n(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||S(this,r,n)}}).call(this,e("_process"))},{"./_stream_duplex":15,_process:13,buffer:4,"buffer-shims":21,"core-util-is":22,events:8,inherits:9,"process-nextick-args":24,"util-deprecate":25}],20:[function(e,t,n){"use strict";function r(){this.head=null,this.tail=null,this.length=0}var i=(e("buffer").Buffer,e("buffer-shims"));t.exports=r,r.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},r.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},r.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},r.prototype.clear=function(){this.head=this.tail=null,this.length=0},r.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},r.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t}},{buffer:4,"buffer-shims":21}],21:[function(e,t,n){(function(t){"use strict";var r=e("buffer"),i=r.Buffer,a=r.SlowBuffer,o=r.kMaxLength||2147483647;n.alloc=function(e,t,n){if("function"==typeof i.alloc)return i.alloc(e,t,n);if("number"==typeof n)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>o)throw new RangeError("size is too large");var r=n,a=t;void 0===a&&(r=void 0,a=0);var s=new i(e);if("string"==typeof a)for(var l=new i(a,r),u=l.length,c=-1;++c<e;)s[c]=l[c%u];else s.fill(a);return s},n.allocUnsafe=function(e){if("function"==typeof i.allocUnsafe)return i.allocUnsafe(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>o)throw new RangeError("size is too large");return new i(e)},n.from=function(e,n,r){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,n,r);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,n);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var a=n;if(1===arguments.length)return new i(e);"undefined"==typeof a&&(a=0);var o=r;if("undefined"==typeof o&&(o=e.byteLength-a),a>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(o>e.byteLength-a)throw new RangeError("'length' is out of bounds");return new i(e.slice(a,a+o))}if(i.isBuffer(e)){var s=new i(e.length);return e.copy(s,0,0,e.length),s}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},n.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=o)throw new RangeError("size is too large");return new a(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:4}],22:[function(e,t,n){(function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===y(e)}function r(e){return"boolean"==typeof e}function i(e){return null===e}function a(e){return null==e}function o(e){return"number"==typeof e}function s(e){return"string"==typeof e}function l(e){return"symbol"==typeof e}function u(e){return void 0===e}function c(e){return"[object RegExp]"===y(e)}function p(e){return"object"==typeof e&&null!==e}function f(e){return"[object Date]"===y(e)}function d(e){return"[object Error]"===y(e)||e instanceof Error}function h(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function y(e){return Object.prototype.toString.call(e)}n.isArray=t,n.isBoolean=r,n.isNull=i,n.isNullOrUndefined=a,n.isNumber=o,n.isString=s,n.isSymbol=l,n.isUndefined=u,n.isRegExp=c,n.isObject=p,n.isDate=f,n.isError=d,n.isFunction=h,n.isPrimitive=m,n.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../../../insert-module-globals/node_modules/is-buffer/index.js")})},{"../../../../insert-module-globals/node_modules/is-buffer/index.js":10}],23:[function(e,t,n){arguments[4][7][0].apply(n,arguments)},{dup:7}],24:[function(e,t,n){(function(e){"use strict";function n(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,n)});case 3:return e.nextTick(function(){t.call(null,n,r)});case 4:return e.nextTick(function(){t.call(null,n,r,i)});default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return e.nextTick(function(){t.apply(null,a)})}}!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=n:t.exports=e.nextTick}).call(this,e("_process"))},{_process:13}],25:[function(e,t,n){(function(e){function n(e,t){function n(){if(!i){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}if(r("noDeprecation"))return e;var i=!1;return n}function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],26:[function(e,t,n){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":16}],27:[function(e,t,n){(function(r){var i=function(){try{return e("stream")}catch(e){}}();n=t.exports=e("./lib/_stream_readable.js"),n.Stream=i||n,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js"),!r.browser&&"disable"===r.env.READABLE_STREAM&&i&&(t.exports=i)}).call(this,e("_process"))},{"./lib/_stream_duplex.js":15,"./lib/_stream_passthrough.js":16,"./lib/_stream_readable.js":17,"./lib/_stream_transform.js":18,"./lib/_stream_writable.js":19,_process:13}],28:[function(e,t,n){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":18}],29:[function(e,t,n){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":19}],30:[function(e,t,n){function r(){i.call(this)}t.exports=r;var i=e("events").EventEmitter,a=e("inherits");a(r,i),r.Readable=e("readable-stream/readable.js"),r.Writable=e("readable-stream/writable.js"),r.Duplex=e("readable-stream/duplex.js"),r.Transform=e("readable-stream/transform.js"),r.PassThrough=e("readable-stream/passthrough.js"),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&u.pause&&u.pause()}function r(){u.readable&&u.resume&&u.resume()}function a(){c||(c=!0,e.end())}function o(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(l(),0===i.listenerCount(this,"error"))throw e}function l(){u.removeListener("data",n),e.removeListener("drain",r),u.removeListener("end",a),u.removeListener("close",o),u.removeListener("error",s),e.removeListener("error",s),u.removeListener("end",l),u.removeListener("close",l),e.removeListener("close",l)}var u=this;u.on("data",n),e.on("drain",r),e._isStdio||t&&t.end===!1||(u.on("end",a),u.on("close",o));var c=!1;return u.on("error",s),e.on("error",s),u.on("end",l),u.on("close",l),e.on("close",l),e.emit("pipe",u),e}},{events:8,inherits:9,"readable-stream/duplex.js":14,"readable-stream/passthrough.js":26,"readable-stream/readable.js":27,"readable-stream/transform.js":28,"readable-stream/writable.js":29}],31:[function(e,t,n){function r(e){if(e&&!l(e))throw new Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function a(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function o(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var s=e("buffer").Buffer,l=s.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=n.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),r(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=a;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=i)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";e=e.slice(n,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var r=t.charCodeAt(t.length-1);if(!(r>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,r=t.charCodeAt(i);if(r>=55296&&r<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,i)}return t},u.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},u.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},{buffer:4}],32:[function(e,t,n){arguments[4][9][0].apply(n,arguments)},{dup:9}],33:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8;
+}},{}],34:[function(e,t,n){(function(t,r){function i(e,t){var r={seen:[],stylize:o};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(t)?r.showHidden=t:t&&n._extend(r,t),S(r.showHidden)&&(r.showHidden=!1),S(r.depth)&&(r.depth=2),S(r.colors)&&(r.colors=!1),S(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=a),l(r,e,r.depth)}function a(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function o(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function l(e,t,r){if(e.customInspect&&t&&A(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return b(i)||(i=l(e,i,r)),i}var a=u(e,t);if(a)return a;var o=Object.keys(t),m=s(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),T(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(t);if(0===o.length){if(A(t)){var y=t.name?": "+t.name:"";return e.stylize("[Function"+y+"]","special")}if(w(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(k(t))return e.stylize(Date.prototype.toString.call(t),"date");if(T(t))return c(t)}var g="",v=!1,E=["{","}"];if(h(t)&&(v=!0,E=["[","]"]),A(t)){var S=t.name?": "+t.name:"";g=" [Function"+S+"]"}if(w(t)&&(g=" "+RegExp.prototype.toString.call(t)),k(t)&&(g=" "+Date.prototype.toUTCString.call(t)),T(t)&&(g=" "+c(t)),0===o.length&&(!v||0==t.length))return E[0]+g+E[1];if(r<0)return w(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var x;return x=v?p(e,t,r,m,o):o.map(function(n){return f(e,t,r,m,n,v)}),e.seen.pop(),d(x,g,E)}function u(e,t){if(S(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return v(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){for(var a=[],o=0,s=t.length;o<s;++o)I(t,String(o))?a.push(f(e,t,n,r,String(o),!0)):a.push("");return i.forEach(function(i){i.match(/^\d+$/)||a.push(f(e,t,n,r,i,!0))}),a}function f(e,t,n,r,i,a){var o,s,u;if(u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},u.get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),I(r,i)||(o="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=y(n)?l(e,u.value,null):l(e,u.value,n-1),s.indexOf("\n")>-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),S(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function d(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return null==e}function v(e){return"number"==typeof e}function b(e){return"string"==typeof e}function E(e){return"symbol"==typeof e}function S(e){return void 0===e}function w(e){return x(e)&&"[object RegExp]"===C(e)}function x(e){return"object"==typeof e&&null!==e}function k(e){return x(e)&&"[object Date]"===C(e)}function T(e){return x(e)&&("[object Error]"===C(e)||e instanceof Error)}function A(e){return"function"==typeof e}function L(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function C(e){return Object.prototype.toString.call(e)}function P(e){return e<10?"0"+e.toString(10):e.toString(10)}function _(){var e=new Date,t=[P(e.getHours()),P(e.getMinutes()),P(e.getSeconds())].join(":");return[e.getDate(),N[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var j=/%[sdj%]/g;n.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,a=r.length,o=String(e).replace(j,function(e){if("%%"===e)return"%";if(n>=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n<a;s=r[++n])o+=y(s)||!x(s)?" "+s:" "+i(s);return o},n.deprecate=function(e,i){function a(){if(!o){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),o=!0}return e.apply(this,arguments)}if(S(r.process))return function(){return n.deprecate(e,i).apply(this,arguments)};if(t.noDeprecation===!0)return e;var o=!1;return a};var O,M={};n.debuglog=function(e){if(S(O)&&(O=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!M[e])if(new RegExp("\\b"+e+"\\b","i").test(O)){var r=t.pid;M[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else M[e]=function(){};return M[e]},n.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=h,n.isBoolean=m,n.isNull=y,n.isNullOrUndefined=g,n.isNumber=v,n.isString=b,n.isSymbol=E,n.isUndefined=S,n.isRegExp=w,n.isObject=x,n.isDate=k,n.isError=T,n.isFunction=A,n.isPrimitive=L,n.isBuffer=e("./support/isBuffer");var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",_(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!x(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":33,_process:13,inherits:32}],35:[function(e,t,n){function r(e){l.ok(this instanceof r),p.Identifier.assert(e),this.nextTempId=0,Object.defineProperties(this,{contextId:{value:e},listing:{value:[]},marked:{value:[!0]},finalLoc:{value:i()},tryEntries:{value:[]}}),Object.defineProperties(this,{leapManager:{value:new f.LeapManager(this)}})}function i(){return c.literal(-1)}function a(e){return p.BreakStatement.check(e)||p.ContinueStatement.check(e)||p.ReturnStatement.check(e)||p.ThrowStatement.check(e)}function o(e){return new Error("all declarations should have been transformed into assignments before the Exploder began its work: "+JSON.stringify(e))}function s(e){var t=e.type;return"normal"===t?!y.call(e,"target"):"break"===t||"continue"===t?!y.call(e,"value")&&p.Literal.check(e.target):("return"===t||"throw"===t)&&(y.call(e,"value")&&!y.call(e,"target"))}var l=e("assert"),u=e("recast").types,c=(u.builtInTypes.array,u.builders),p=u.namedTypes,f=e("./leap"),d=e("./meta"),h=e("./util"),m=h.runtimeProperty,y=Object.prototype.hasOwnProperty,g=r.prototype;n.Emitter=r,g.mark=function(e){p.Literal.assert(e);var t=this.listing.length;return e.value===-1?e.value=t:l.strictEqual(e.value,t),this.marked[t]=!0,e},g.emit=function(e){p.Expression.check(e)&&(e=c.expressionStatement(e)),p.Statement.assert(e),this.listing.push(e)},g.emitAssign=function(e,t){return this.emit(this.assign(e,t)),e},g.assign=function(e,t){return c.expressionStatement(c.assignmentExpression("=",e,t))},g.contextProperty=function(e,t){return c.memberExpression(this.contextId,t?c.literal(e):c.identifier(e),!!t)},g.stop=function(e){e&&this.setReturnValue(e),this.jump(this.finalLoc)},g.setReturnValue=function(e){p.Expression.assert(e.value),this.emitAssign(this.contextProperty("rval"),this.explodeExpression(e))},g.clearPendingException=function(e,t){p.Literal.assert(e);var n=c.callExpression(this.contextProperty("catch",!0),[e]);t?this.emitAssign(t,n):this.emit(n)},g.jump=function(e){this.emitAssign(this.contextProperty("next"),e),this.emit(c.breakStatement())},g.jumpIf=function(e,t){p.Expression.assert(e),p.Literal.assert(t),this.emit(c.ifStatement(e,c.blockStatement([this.assign(this.contextProperty("next"),t),c.breakStatement()])))},g.jumpIfNot=function(e,t){p.Expression.assert(e),p.Literal.assert(t);var n;n=p.UnaryExpression.check(e)&&"!"===e.operator?e.argument:c.unaryExpression("!",e),this.emit(c.ifStatement(n,c.blockStatement([this.assign(this.contextProperty("next"),t),c.breakStatement()])))},g.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)},g.getContextFunction=function(e){return c.functionExpression(e||null,[this.contextId],c.blockStatement([this.getDispatchLoop()]),!1,!1)},g.getDispatchLoop=function(){var e,t=this,n=[],r=!1;return t.listing.forEach(function(i,o){t.marked.hasOwnProperty(o)&&(n.push(c.switchCase(c.literal(o),e=[])),r=!1),r||(e.push(i),a(i)&&(r=!0))}),this.finalLoc.value=this.listing.length,n.push(c.switchCase(this.finalLoc,[]),c.switchCase(c.literal("end"),[c.returnStatement(c.callExpression(this.contextProperty("stop"),[]))])),c.whileStatement(c.literal(1),c.switchStatement(c.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),n))},g.getTryLocsList=function(){if(0===this.tryEntries.length)return null;var e=0;return c.arrayExpression(this.tryEntries.map(function(t){var n=t.firstLoc.value;l.ok(n>=e,"try entries out of order"),e=n;var r=t.catchEntry,i=t.finallyEntry,a=[t.firstLoc,r?r.firstLoc:null];return i&&(a[2]=i.firstLoc,a[3]=i.afterLoc),c.arrayExpression(a)}))},g.explode=function(e,t){l.ok(e instanceof u.NodePath);var n=e.value,r=this;if(p.Node.assert(n),p.Statement.check(n))return r.explodeStatement(e);if(p.Expression.check(n))return r.explodeExpression(e,t);if(p.Declaration.check(n))throw o(n);switch(n.type){case"Program":return e.get("body").map(r.explodeStatement,r);case"VariableDeclarator":throw o(n);case"Property":case"SwitchCase":case"CatchClause":throw new Error(n.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(n.type))}},g.explodeStatement=function(e,t){l.ok(e instanceof u.NodePath);var n=e.value,r=this;if(p.Statement.assert(n),t?p.Identifier.assert(t):t=null,p.BlockStatement.check(n))return e.get("body").each(r.explodeStatement,r);if(!d.containsLeap(n))return void r.emit(n);switch(n.type){case"ExpressionStatement":r.explodeExpression(e.get("expression"),!0);break;case"LabeledStatement":var a=i();r.leapManager.withEntry(new f.LabeledEntry(a,n.label),function(){r.explodeStatement(e.get("body"),n.label)}),r.mark(a);break;case"WhileStatement":var o=i(),a=i();r.mark(o),r.jumpIfNot(r.explodeExpression(e.get("test")),a),r.leapManager.withEntry(new f.LoopEntry(a,o,t),function(){r.explodeStatement(e.get("body"))}),r.jump(o),r.mark(a);break;case"DoWhileStatement":var s=i(),y=i(),a=i();r.mark(s),r.leapManager.withEntry(new f.LoopEntry(a,y,t),function(){r.explode(e.get("body"))}),r.mark(y),r.jumpIf(r.explodeExpression(e.get("test")),s),r.mark(a);break;case"ForStatement":var g=i(),v=i(),a=i();n.init&&r.explode(e.get("init"),!0),r.mark(g),n.test&&r.jumpIfNot(r.explodeExpression(e.get("test")),a),r.leapManager.withEntry(new f.LoopEntry(a,v,t),function(){r.explodeStatement(e.get("body"))}),r.mark(v),n.update&&r.explode(e.get("update"),!0),r.jump(g),r.mark(a);break;case"ForInStatement":var g=i(),a=i(),b=r.makeTempVar();r.emitAssign(b,c.callExpression(m("keys"),[r.explodeExpression(e.get("right"))])),r.mark(g);var E=r.makeTempVar();r.jumpIf(c.memberExpression(c.assignmentExpression("=",E,c.callExpression(b,[])),c.identifier("done"),!1),a),r.emitAssign(n.left,c.memberExpression(E,c.identifier("value"),!1)),r.leapManager.withEntry(new f.LoopEntry(a,g,t),function(){r.explodeStatement(e.get("body"))}),r.jump(g),r.mark(a);break;case"BreakStatement":r.emitAbruptCompletion({type:"break",target:r.leapManager.getBreakLoc(n.label)});break;case"ContinueStatement":r.emitAbruptCompletion({type:"continue",target:r.leapManager.getContinueLoc(n.label)});break;case"SwitchStatement":for(var S=r.emitAssign(r.makeTempVar(),r.explodeExpression(e.get("discriminant"))),a=i(),w=i(),x=w,k=[],T=n.cases||[],A=T.length-1;A>=0;--A){var L=T[A];p.SwitchCase.assert(L),L.test?x=c.conditionalExpression(c.binaryExpression("===",S,L.test),k[A]=i(),x):k[A]=w}r.jump(r.explodeExpression(new u.NodePath(x,e,"discriminant"))),r.leapManager.withEntry(new f.SwitchEntry(a),function(){e.get("cases").each(function(e){var t=(e.value,e.name);r.mark(k[t]),e.get("consequent").each(r.explodeStatement,r)})}),r.mark(a),w.value===-1&&(r.mark(w),l.strictEqual(a.value,w.value));break;case"IfStatement":var C=n.alternate&&i(),a=i();r.jumpIfNot(r.explodeExpression(e.get("test")),C||a),r.explodeStatement(e.get("consequent")),C&&(r.jump(a),r.mark(C),r.explodeStatement(e.get("alternate"))),r.mark(a);break;case"ReturnStatement":r.emitAbruptCompletion({type:"return",value:r.explodeExpression(e.get("argument"))});break;case"WithStatement":throw new Error(node.type+" not supported in generator functions.");case"TryStatement":var a=i(),P=n.handler;!P&&n.handlers&&(P=n.handlers[0]||null);var _=P&&i(),I=_&&new f.CatchEntry(_,P.param),j=n.finalizer&&i(),O=j&&new f.FinallyEntry(j,a),M=new f.TryEntry(r.getUnmarkedCurrentLoc(),I,O);r.tryEntries.push(M),r.updateContextPrevLoc(M.firstLoc),r.leapManager.withEntry(M,function(){if(r.explodeStatement(e.get("block")),_){j?r.jump(j):r.jump(a),r.updateContextPrevLoc(r.mark(_));var t=e.get("handler","body"),n=r.makeTempVar();r.clearPendingException(M.firstLoc,n);var i=t.scope,o=P.param.name;p.CatchClause.assert(i.node),l.strictEqual(i.lookup(o),i),u.visit(t,{visitIdentifier:function(e){return h.isReference(e,o)&&e.scope.lookup(o)===i?n:void this.traverse(e)},visitFunction:function(e){return!e.scope.declares(o)&&void this.traverse(e)}}),r.leapManager.withEntry(I,function(){r.explodeStatement(t)})}j&&(r.updateContextPrevLoc(r.mark(j)),r.leapManager.withEntry(O,function(){r.explodeStatement(e.get("finalizer"))}),r.emit(c.returnStatement(c.callExpression(r.contextProperty("finish"),[O.firstLoc]))))}),r.mark(a);break;case"ThrowStatement":r.emit(c.throwStatement(r.explodeExpression(e.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(n.type))}},g.emitAbruptCompletion=function(e){s(e)||l.ok(!1,"invalid completion record: "+JSON.stringify(e)),l.notStrictEqual(e.type,"normal","normal completions are not abrupt");var t=[c.literal(e.type)];"break"===e.type||"continue"===e.type?(p.Literal.assert(e.target),t[1]=e.target):"return"!==e.type&&"throw"!==e.type||e.value&&(p.Expression.assert(e.value),t[1]=e.value),this.emit(c.returnStatement(c.callExpression(this.contextProperty("abrupt"),t)))},g.getUnmarkedCurrentLoc=function(){return c.literal(this.listing.length)},g.updateContextPrevLoc=function(e){e?(p.Literal.assert(e),e.value===-1?e.value=this.listing.length:l.strictEqual(e.value,this.listing.length)):e=this.getUnmarkedCurrentLoc(),this.emitAssign(this.contextProperty("prev"),e)},g.explodeExpression=function(e,t){function n(e){return p.Expression.assert(e),t?void s.emit(e):e}function r(e,t,n){l.ok(t instanceof u.NodePath),l.ok(!n||!e,"Ignoring the result of a child expression but forcing it to be assigned to a temporary variable?");var r=s.explodeExpression(t,n);return n||(e||f&&!p.Literal.check(r))&&(r=s.emitAssign(e||s.makeTempVar(),r)),r}l.ok(e instanceof u.NodePath);var a=e.value;if(!a)return a;p.Expression.assert(a);var o,s=this;if(!d.containsLeap(a))return n(a);var f=d.containsLeap.onlyChildren(a);switch(a.type){case"MemberExpression":return n(c.memberExpression(s.explodeExpression(e.get("object")),a.computed?r(null,e.get("property")):a.property,a.computed));case"CallExpression":var h,m=e.get("callee"),y=e.get("arguments"),g=[],v=!1;if(y.each(function(e){v=v||d.containsLeap(e.value)}),p.MemberExpression.check(m.value))if(v){var b=r(s.makeTempVar(),m.get("object")),E=m.value.computed?r(null,m.get("property")):m.value.property;g.unshift(b),h=c.memberExpression(c.memberExpression(b,E,m.value.computed),c.identifier("call"),!1)}else h=s.explodeExpression(m);else h=s.explodeExpression(m),p.MemberExpression.check(h)&&(h=c.sequenceExpression([c.literal(0),h]));return y.each(function(e){g.push(r(null,e))}),n(c.callExpression(h,g));case"NewExpression":return n(c.newExpression(r(null,e.get("callee")),e.get("arguments").map(function(e){return r(null,e)})));case"ObjectExpression":return n(c.objectExpression(e.get("properties").map(function(e){return c.property(e.value.kind,e.value.key,r(null,e.get("value")))})));case"ArrayExpression":return n(c.arrayExpression(e.get("elements").map(function(e){return r(null,e)})));case"SequenceExpression":var S=a.expressions.length-1;return e.get("expressions").each(function(e){e.name===S?o=s.explodeExpression(e,t):s.explodeExpression(e,!0)}),o;case"LogicalExpression":var w=i();t||(o=s.makeTempVar());var x=r(o,e.get("left"));return"&&"===a.operator?s.jumpIfNot(x,w):(l.strictEqual(a.operator,"||"),s.jumpIf(x,w)),r(o,e.get("right"),t),s.mark(w),o;case"ConditionalExpression":var k=i(),w=i(),T=s.explodeExpression(e.get("test"));return s.jumpIfNot(T,k),t||(o=s.makeTempVar()),r(o,e.get("consequent"),t),s.jump(w),s.mark(k),r(o,e.get("alternate"),t),s.mark(w),o;case"UnaryExpression":return n(c.unaryExpression(a.operator,s.explodeExpression(e.get("argument")),!!a.prefix));case"BinaryExpression":return n(c.binaryExpression(a.operator,r(null,e.get("left")),r(null,e.get("right"))));case"AssignmentExpression":return n(c.assignmentExpression(a.operator,s.explodeExpression(e.get("left")),s.explodeExpression(e.get("right"))));case"UpdateExpression":return n(c.updateExpression(a.operator,s.explodeExpression(e.get("argument")),a.prefix));case"YieldExpression":var w=i(),A=a.argument&&s.explodeExpression(e.get("argument"));if(A&&a.delegate){var o=s.makeTempVar();return s.emit(c.returnStatement(c.callExpression(s.contextProperty("delegateYield"),[A,c.literal(o.property.name),w]))),s.mark(w),o}return s.emitAssign(s.contextProperty("next"),w),s.emit(c.returnStatement(A||null)),s.mark(w),s.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(a.type))}}},{"./leap":37,"./meta":38,"./util":39,assert:2,recast:67}],36:[function(e,t,n){var r=e("assert"),i=e("recast").types,a=i.namedTypes,o=i.builders,s=Object.prototype.hasOwnProperty;n.hoist=function(e){function t(e,t){a.VariableDeclaration.assert(e);var r=[];return e.declarations.forEach(function(e){n[e.id.name]=e.id,e.init?r.push(o.assignmentExpression("=",e.id,e.init)):t&&r.push(e.id)}),0===r.length?null:1===r.length?r[0]:o.sequenceExpression(r)}r.ok(e instanceof i.NodePath),a.Function.assert(e.value);var n={};i.visit(e.get("body"),{visitVariableDeclaration:function(e){var n=t(e.value,!1);return null!==n?o.expressionStatement(n):(e.replace(),!1)},visitForStatement:function(e){var n=e.value.init;a.VariableDeclaration.check(n)&&e.get("init").replace(t(n,!1)),this.traverse(e)},visitForInStatement:function(e){var n=e.value.left;a.VariableDeclaration.check(n)&&e.get("left").replace(t(n,!0)),this.traverse(e)},visitFunctionDeclaration:function(e){var t=e.value;n[t.id.name]=t.id;var r=(e.parent.node,o.expressionStatement(o.assignmentExpression("=",t.id,o.functionExpression(t.id,t.params,t.body,t.generator,t.expression))));return a.BlockStatement.check(e.parent.node)?(e.parent.get("body").unshift(r),e.replace()):e.replace(r),!1},visitFunctionExpression:function(e){return!1}});var l={};e.get("params").each(function(e){var t=e.value;a.Identifier.check(t)&&(l[t.name]=t)});var u=[];return Object.keys(n).forEach(function(e){s.call(l,e)||u.push(o.variableDeclarator(n[e],null))}),0===u.length?null:o.variableDeclaration("var",u)}},{assert:2,recast:67}],37:[function(e,t,n){function r(){f.ok(this instanceof r)}function i(e){r.call(this),h.Literal.assert(e),this.returnLoc=e}function a(e,t,n){r.call(this),h.Literal.assert(e),h.Literal.assert(t),n?h.Identifier.assert(n):n=null,this.breakLoc=e,this.continueLoc=t,this.label=n}function o(e){r.call(this),h.Literal.assert(e),this.breakLoc=e}function s(e,t,n){r.call(this),h.Literal.assert(e),t?f.ok(t instanceof l):t=null,n?f.ok(n instanceof u):n=null,f.ok(t||n),this.firstLoc=e,this.catchEntry=t,this.finallyEntry=n}function l(e,t){r.call(this),h.Literal.assert(e),h.Identifier.assert(t),this.firstLoc=e,this.paramId=t}function u(e,t){r.call(this),h.Literal.assert(e),h.Literal.assert(t),this.firstLoc=e,this.afterLoc=t}function c(e,t){r.call(this),h.Literal.assert(e),h.Identifier.assert(t),this.breakLoc=e,this.label=t}function p(t){f.ok(this instanceof p);var n=e("./emit").Emitter;f.ok(t instanceof n),this.emitter=t,this.entryStack=[new i(t.finalLoc)]}var f=e("assert"),d=e("recast").types,h=d.namedTypes,m=(d.builders,e("util").inherits);Object.prototype.hasOwnProperty;m(i,r),n.FunctionEntry=i,m(a,r),n.LoopEntry=a,m(o,r),n.SwitchEntry=o,m(s,r),n.TryEntry=s,m(l,r),n.CatchEntry=l,m(u,r),n.FinallyEntry=u,m(c,r),n.LabeledEntry=c;var y=p.prototype;n.LeapManager=p,y.withEntry=function(e,t){f.ok(e instanceof r),this.entryStack.push(e);try{t.call(this.emitter)}finally{var n=this.entryStack.pop();f.strictEqual(n,e)}},y._findLeapLocation=function(e,t){for(var n=this.entryStack.length-1;n>=0;--n){var r=this.entryStack[n],i=r[e];if(i)if(t){if(r.label&&r.label.name===t.name)return i}else if(!(r instanceof c))return i}return null},y.getBreakLoc=function(e){return this._findLeapLocation("breakLoc",e)},y.getContinueLoc=function(e){return this._findLeapLocation("continueLoc",e)}},{"./emit":35,assert:2,recast:67,util:34}],38:[function(e,t,n){function r(e,t){function n(e){function t(e){return n||(s.check(e)?e.some(t):l.Node.check(e)&&(i.strictEqual(n,!1),n=r(e))),n}l.Node.assert(e);var n=!1;return o.eachField(e,function(e,n){t(n)}),n}function r(r){l.Node.assert(r);var i=a(r);return u.call(i,e)?i[e]:u.call(c,r.type)?i[e]=!1:u.call(t,r.type)?i[e]=!0:i[e]=n(r)}return r.onlyChildren=n,r}var i=e("assert"),a=e("private").makeAccessor(),o=e("recast").types,s=o.builtInTypes.array,l=o.namedTypes,u=Object.prototype.hasOwnProperty,c={FunctionExpression:!0},p={CallExpression:!0,ForInStatement:!0,UnaryExpression:!0,BinaryExpression:!0,AssignmentExpression:!0,UpdateExpression:!0,NewExpression:!0},f={YieldExpression:!0,BreakStatement:!0,ContinueStatement:!0,ReturnStatement:!0,ThrowStatement:!0};for(var d in f)u.call(f,d)&&(p[d]=f[d]);n.hasSideEffects=r("hasSideEffects",p),n.containsLeap=r("containsLeap",f)},{assert:2,private:56,recast:67}],39:[function(e,t,n){var r=(e("assert"),e("recast").types),i=r.namedTypes,a=r.builders,o=Object.prototype.hasOwnProperty;n.defaults=function(e){for(var t,n=arguments.length,r=1;r<n;++r)if(t=arguments[r])for(var i in t)o.call(t,i)&&!o.call(e,i)&&(e[i]=t[i]);return e},n.runtimeProperty=function(e){return a.memberExpression(a.identifier("regeneratorRuntime"),a.identifier(e),!1)},n.isReference=function(e,t){var n=e.value;if(!i.Identifier.check(n))return!1;if(t&&n.name!==t)return!1;var r=e.parent.value;switch(r.type){case"VariableDeclarator":return"init"===e.name;case"MemberExpression":return"object"===e.name||r.computed&&"property"===e.name;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":return"id"!==e.name&&("params"!==e.parentPath.name||r.params!==e.parentPath.value||r.params[e.name]!==n);case"ClassDeclaration":case"ClassExpression":return"id"!==e.name;case"CatchClause":return"param"!==e.name;case"Property":case"MethodDefinition":return"key"!==e.name;case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"LabeledStatement":return!1;default:return!0}}},{assert:2,recast:67}],40:[function(e,t,n){function r(t){f.Program.assert(t);var n=e("..").runtime.path,r=u.readFileSync(n,"utf8"),i=c.parse(r,{sourceFileName:n}).program.body,a=t.body;a.unshift.apply(a,i)}function i(e){var t=e.value;if(f.Function.assert(t),t.generator&&f.FunctionDeclaration.check(t)){for(var n=e.parent;n&&!f.BlockStatement.check(n.value)&&!f.Program.check(n.value);)n=n.parent;if(!n)return t.id;var r=a(n),i=r.declarations[0].id,o=r.declarations[0].init.callee.object;f.ArrayExpression.assert(o);var s=o.elements.length;return o.elements.push(t.id),d.memberExpression(i,d.literal(s),!0)}return t.id||(t.id=e.scope.parent.declareTemporary("callee$"))}function a(e){l.ok(e instanceof m);var t=e.node;h.assert(t.body);var n=E(t);if(n.decl)return n.decl;n.decl=d.variableDeclaration("var",[d.variableDeclarator(e.scope.declareTemporary("marked"),d.callExpression(d.memberExpression(d.arrayExpression([]),d.identifier("map"),!1),[b("mark")]))]);for(var r=0;r<t.body.length&&o(e.get("body",r));++r);return e.get("body").insertAt(r,n.decl),n.decl}function o(e){var t=e.value;return f.Statement.assert(t),f.ExpressionStatement.check(t)&&f.Literal.check(t.expression)&&"use strict"===t.expression.value}function s(e,t){l.ok(e instanceof p.NodePath);var n=e.value,r=!1;return c.visit(e,{visitFunction:function(e){return e.value===n&&void this.traverse(e)},visitIdentifier:function(e){return"arguments"===e.value.name&&v.isReference(e)?(e.replace(t),r=!0,!1):void this.traverse(e)}}),r}var l=e("assert"),u=e("fs"),c=e("recast"),p=c.types,f=p.namedTypes,d=p.builders,h=p.builtInTypes.array,m=(p.builtInTypes.object,p.NodePath),y=e("./hoist").hoist,g=e("./emit").Emitter,v=e("./util"),b=v.runtimeProperty,E=e("private").makeAccessor();n.transform=function(e,t){t=t||{};var n=e instanceof m?e:new m(e);return S.visit(n,t),e=n.value,(t.includeRuntime===!0||"if used"===t.includeRuntime&&S.wasChangeReported())&&r(f.File.check(e)?e.program:e),t.madeChanges=S.wasChangeReported(),e};var S=p.PathVisitor.fromMethodsObject({reset:function(e,t){this.options=t},visitFunction:function(e){this.traverse(e);var t=e.value,n=t.async&&!this.options.disableAsync;if(t.generator||n){this.reportChanged(),t.expression&&(t.expression=!1,t.body=d.blockStatement([d.returnStatement(t.body)])),n&&w.visit(e.get("body"));var r=[],a=[],o=e.get("body","body");o.each(function(e){var t=e.value;t&&null!=t._blockHoist?r.push(t):a.push(t)}),r.length>0&&o.replace(a);var l=i(e);f.Identifier.assert(t.id);var u=d.identifier(t.id.name+"$"),c=e.scope.declareTemporary("context$"),p=e.scope.declareTemporary("args$"),h=y(e),m=s(e,p);m&&(h=h||d.variableDeclaration("var",[]),h.declarations.push(d.variableDeclarator(p,d.identifier("arguments"))));var v=new g(c);v.explode(e.get("body")),h&&h.declarations.length>0&&r.push(h);var E=[v.getContextFunction(u),t.generator?l:d.literal(null),d.thisExpression()],S=v.getTryLocsList();S&&E.push(S);var x=d.callExpression(b(n?"async":"wrap"),E);r.push(d.returnStatement(x)),t.body=d.blockStatement(r);var k=t.generator;return k&&(t.generator=!1),n&&(t.async=!1),k&&f.Expression.check(t)?d.callExpression(b("mark"),[t]):void 0}},visitForOfStatement:function(e){this.traverse(e);var t,n=e.value,r=e.scope.declareTemporary("t$"),i=d.variableDeclarator(r,d.callExpression(b("values"),[n.right])),a=e.scope.declareTemporary("t$"),o=d.variableDeclarator(a,null),s=n.left;f.VariableDeclaration.check(s)?(t=s.declarations[0].id,s.declarations.push(i,o)):(t=s,s=d.variableDeclaration("var",[i,o])),f.Identifier.assert(t);var l=d.expressionStatement(d.assignmentExpression("=",t,d.memberExpression(a,d.identifier("value"),!1)));return f.BlockStatement.check(n.body)?n.body.body.unshift(l):n.body=d.blockStatement([l,n.body]),d.forStatement(s,d.unaryExpression("!",d.memberExpression(d.assignmentExpression("=",a,d.callExpression(d.memberExpression(r,d.identifier("next"),!1),[])),d.identifier("done"),!1)),null,n.body)}}),w=p.PathVisitor.fromMethodsObject({visitFunction:function(e){return!1},visitAwaitExpression:function(e){var t=e.value.argument;return e.value.all&&(t=d.callExpression(d.memberExpression(d.identifier("Promise"),d.identifier("all"),!1),[t])),d.yieldExpression(d.callExpression(b("awrap"),[t]),!1)}})},{"..":"regenerator","./emit":35,"./hoist":36,"./util":39,assert:2,fs:1,private:56,recast:67}],41:[function(e,t,n){"use strict";function r(e){return k.someof(e,["const","let"])}function i(e){return k.someof(e,["var","const","let"])}function a(e){return"BlockStatement"===e.type&&k.noneof(e.$parent.type,["FunctionDeclaration","FunctionExpression"])}function o(e){return"ForStatement"===e.type&&e.init&&"VariableDeclaration"===e.init.type&&r(e.init.kind)}function s(e){return l(e)&&"VariableDeclaration"===e.left.type&&r(e.left.kind)}function l(e){return k.someof(e.type,["ForInStatement","ForOfStatement"])}function u(e){return k.someof(e.type,["FunctionDeclaration","FunctionExpression"])}function c(e){return k.someof(e.type,["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement"])}function p(e){var t=e.$parent;return e.$refToScope||"Identifier"===e.type&&!("VariableDeclarator"===t.type&&t.id===e)&&!("MemberExpression"===t.type&&t.computed===!1&&t.property===e)&&!("Property"===t.type&&t.key===e)&&!("LabeledStatement"===t.type&&t.label===e)&&!("CatchClause"===t.type&&t.param===e)&&!(u(t)&&t.id===e)&&!(u(t)&&k.someof(e,t.params))&&!0}function f(e){return p(e)&&("AssignmentExpression"===e.$parent.type&&e.$parent.left===e||"UpdateExpression"===e.$parent.type&&e.$parent.argument===e)}function d(e,t){if(x(!e.$scope),e.$parent=t,e.$scope=e.$parent?e.$parent.$scope:null,"Program"===e.type)e.$scope=new I({kind:"hoist",node:e,parent:null});else if(u(e))e.$scope=new I({kind:"hoist",node:e,parent:e.$parent.$scope}),e.id&&(x("Identifier"===e.id.type),"FunctionDeclaration"===e.type?e.$parent.$scope.add(e.id.name,"fun",e.id,null):"FunctionExpression"===e.type?e.$scope.add(e.id.name,"fun",e.id,null):x(!1)),e.params.forEach(function(t){e.$scope.add(t.name,"param",t,null)});else if("VariableDeclaration"===e.type)x(i(e.kind)),e.declarations.forEach(function(t){x("VariableDeclarator"===t.type);var n=t.id.name;M.disallowVars&&"var"===e.kind&&j(O(t),"var {0} is not allowed (use let or const)",n),e.$scope.add(n,e.kind,t.id,t.range[1])});else if(o(e)||s(e))e.$scope=new I({kind:"block",node:e,parent:e.$parent.$scope});else if(a(e))e.$scope=new I({kind:"block",node:e,parent:e.$parent.$scope});else if("CatchClause"===e.type){var n=e.param;e.$scope=new I({kind:"catch-block",node:e,parent:e.$parent.$scope}),e.$scope.add(n.name,"caught",n,null),e.$scope.closestHoistScope().markPropagates(n.name)}}function h(e,t,n){function r(e){for(var t in e){var n=e[t],r=n?"var":"const";i.hasOwn(t)&&i.remove(t),i.add(t,r,{loc:{start:{line:-1}}},-1)}}var i=new I({kind:"hoist",node:{},parent:null}),a={undefined:!1,Infinity:!1,console:!1};return r(a),r(D.reservedVars),r(D.ecmaIdentifiers),t&&t.forEach(function(e){D[e]?r(D[e]):j(-1,'environment "{0}" not found',e)}),n&&r(n),e.parent=i,i.children.push(e),i}function m(e,t,n){function r(e){if(p(e)){t.add(e.name);var n=e.$scope.lookup(e.name);if(i&&!n&&M.disallowUnknownReferences&&j(O(e),"reference to unknown global variable {0}",e.name),i&&n&&k.someof(n.getKind(e.name),["const","let"])){var r=n.getFromPos(e.name),a=e.range[0];x(k.finitenumber(r)),x(k.finitenumber(a)),a<r&&(e.$scope.hasFunctionScopeBetween(n)||j(O(e),"{0} is referenced before its declaration",e.name))}e.$refToScope=n}}var i=!k.own(n,"analyze")||n.analyze;P(e,{pre:r})}function y(e,t,n,i){function a(e){x(n.has(e));for(var t=0;;t++){var r=e+"$"+String(t);if(!n.has(r))return r}}function o(e){if("VariableDeclaration"===e.type&&r(e.kind)){var o=e.$scope.closestHoistScope(),s=e.$scope;i.push({start:e.range[0],end:e.range[0]+e.kind.length,str:"var"}),e.declarations.forEach(function(r){x("VariableDeclarator"===r.type);var l=r.id.name;t.declarator(e.kind);var u=s!==o&&(o.hasOwn(l)||o.doesPropagate(l)),c=u?a(l):l;s.remove(l),o.add(c,"var",r.id,r.range[1]),s.moves=s.moves||A(),s.moves.set(l,{name:c,scope:o
+}),n.add(c),c!==l&&(t.rename(l,c,O(r)),r.id.originalName=l,r.id.name=c,i.push({start:r.id.range[0],end:r.id.range[1],str:c}))}),e.kind="var"}}function s(e){if(e.$refToScope){var t=e.$refToScope.moves&&e.$refToScope.moves.get(e.name);if(t&&(e.$refToScope=t.scope,e.name!==t.name))if(e.originalName=e.name,e.name=t.name,e.alterop){for(var n=null,r=0;r<i.length;r++){var a=i[r];if(a.node===e){n=a;break}}x(n),n.str=t.name}else i.push({start:e.range[0],end:e.range[1],str:t.name})}}P(e,{pre:o}),P(e,{pre:s}),e.$scope.traverse({pre:function(e){delete e.moves}})}function g(e){function t(e,t){return _(function(n){return P(e,{pre:function(e){if(u(e))return!1;var r=!0,i="loop-variable {0} is captured by a loop-closure that can't be transformed due to use of {1} at line {2}";"BreakStatement"===e.type?j(O(t),i,t.name,"break",O(e)):"ContinueStatement"===e.type?j(O(t),i,t.name,"continue",O(e)):"ReturnStatement"===e.type?j(O(t),i,t.name,"return",O(e)):"YieldExpression"===e.type?j(O(t),i,t.name,"yield",O(e)):"Identifier"===e.type&&"arguments"===e.name?j(O(t),i,t.name,"arguments",O(e)):"VariableDeclaration"===e.type&&"var"===e.kind?j(O(t),i,t.name,"var",O(e)):r=!1,r&&n(!0)}}),!1})}function n(e){var n=null;if(p(e)&&e.$refToScope&&r(e.$refToScope.getKind(e.name))){for(var i=e.$refToScope.node;;){if(u(i))return;if(c(i)){n=i;break}if(i=i.$parent,!i)return}x(c(n));for(var a=e.$refToScope,o="iife"===M.loopClosures,s=e.$scope;s;s=s.parent){if(s===a)return;if(u(s.node)){if(!o){var l='loop-variable {0} is captured by a loop-closure. Tried "loopClosures": "iife" in defs-config.json?';return j(O(e),l,e.name)}if("ForStatement"===n.type&&a.node===n){var f=a.getNode(e.name);return j(O(f),"Not yet specced ES6 feature. {0} is declared in for-loop header and then captured in loop closure",f.name)}if(t(n.body,e))return;n.$iify=!0}}}}P(e,{pre:n})}function v(e,t,n){function r(e,n,r){var i={start:e,end:e,str:n};r&&(i.node=r),t.push(i)}P(e,{pre:function(e){if(e.$iify){var t="BlockStatement"===e.body.type,i=t?e.body.range[0]+1:e.body.range[0],a=t?e.body.range[1]-1:e.body.range[1],o=l(e)&&e.left.declarations[0].id.name,s=T("(function({0}){",o?o:""),u=T("}).call(this{0});",o?", "+o:""),c=n.parse(s+u),p=c.body[0],f=p.expression.callee.object.body;if(t){var d=e.body,h=d.body;d.body=[p],f.body=h}else{var m=e.body;e.body=p,f.body[0]=m}if(r(i,s),o){r(a,"}).call(this, ");var y=p.expression.arguments,g=y[1];g.alterop=!0,r(a,o,g),r(a,");")}else r(a,u)}}})}function b(e){P(e,{pre:function(e){if(f(e)){var t=e.$scope.lookup(e.name);t&&"const"===t.getKind(e.name)&&j(O(e),"can't assign to const variable {0}",e.name)}}})}function E(e,t){P(e,{pre:d});var n=h(e.$scope,M.environments,M.globals),r=L();return n.traverse({pre:function(e){r.addMany(e.decls.keys())}}),m(e,r,t),r}function S(e){P(e,{pre:function(e){for(var t in e)"$"===t[0]&&delete e[t]}})}function w(e,t){for(var n in t)M[n]=t[n];var r;if(k.object(e)){if(!M.ast)return{errors:["Can't produce string output when input is an AST. Did you forget to set options.ast = true?"]};r=e}else{if(!k.string(e))return{errors:["Input was neither an AST object nor a string."]};try{r=M.parse(e,{loc:!0,range:!0})}catch(t){return{errors:[T("line {0} column {1}: Error during input file parsing\n{2}\n{3}",t.lineNumber,t.column,e.split("\n")[t.lineNumber-1],T.repeat(" ",t.column-1)+"^")]}}}var i=r;j.reset();var a=E(i,{});g(i),b(i);var o=[];if(v(i,o,M),j.errors.length>=1)return{errors:j.errors};o.length>0&&(S(i),a=E(i,{analyze:!1})),x(0===j.errors.length);var s=new N;if(y(i,s,a,o),M.ast)return S(i),{stats:s,ast:i};var l=C(e,o);return{stats:s,src:l}}var x=e("assert"),k=e("simple-is"),T=e("simple-fmt"),A=e("stringmap"),L=e("stringset"),C=e("alter"),P=e("ast-traverse"),_=e("breakable"),I=e("./scope"),j=e("./error"),O=j.getline,M=e("./options"),N=e("./stats"),D=e("./jshint_globals/vars.js");t.exports=w},{"./error":42,"./jshint_globals/vars.js":43,"./options":44,"./scope":45,"./stats":46,alter:47,assert:2,"ast-traverse":49,breakable:50,"simple-fmt":51,"simple-is":52,stringmap:53,stringset:54}],42:[function(e,t,n){"use strict";function r(e,t){a(arguments.length>=2);var n=2===arguments.length?String(t):i.apply(i,Array.prototype.slice.call(arguments,1));r.errors.push(e===-1?n:i("line {0}: {1}",e,n))}var i=e("simple-fmt"),a=e("assert");r.reset=function(){r.errors=[]},r.getline=function(e){return e&&e.loc&&e.loc.start?e.loc.start.line:-1},r.reset(),t.exports=r},{assert:2,"simple-fmt":51}],43:[function(e,t,n){"use strict";n.reservedVars={arguments:!1,NaN:!1},n.ecmaIdentifiers={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,Map:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,Set:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1,WeakMap:!1},n.browser={ArrayBuffer:!1,ArrayBufferView:!1,Audio:!1,Blob:!1,addEventListener:!1,applicationCache:!1,atob:!1,blur:!1,btoa:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,DataView:!1,DOMParser:!1,defaultStatus:!1,document:!1,Element:!1,event:!1,FileReader:!1,Float32Array:!1,Float64Array:!1,FormData:!1,focus:!1,frames:!1,getComputedStyle:!1,HTMLElement:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,history:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Image:!1,length:!1,localStorage:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,Node:!1,NodeFilter:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,parent:!1,print:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,status:!1,top:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,WebSocket:!1,window:!1,Worker:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},n.devel={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},n.worker={importScripts:!0,postMessage:!0,self:!0},n.nonstandard={escape:!1,unescape:!1},n.couch={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1,provides:!1},n.node={__filename:!1,__dirname:!1,Buffer:!1,DataView:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,module:!1,process:!1,require:!1,setTimeout:!1,clearTimeout:!1,setInterval:!1,clearInterval:!1},n.phantom={phantom:!0,require:!0,WebPage:!0},n.rhino={defineClass:!1,deserialize:!1,gc:!1,help:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},n.wsh={ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WSH:!0,WScript:!0,XDomainRequest:!0},n.dojo={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},n.jquery={$:!1,jQuery:!1},n.mootools={$:!1,$$:!1,Asset:!1,Browser:!1,Chain:!1,Class:!1,Color:!1,Cookie:!1,Core:!1,Document:!1,DomReady:!1,DOMEvent:!1,DOMReady:!1,Drag:!1,Element:!1,Elements:!1,Event:!1,Events:!1,Fx:!1,Group:!1,Hash:!1,HtmlTable:!1,Iframe:!1,IframeShim:!1,InputValidator:!1,instanceOf:!1,Keyboard:!1,Locale:!1,Mask:!1,MooTools:!1,Native:!1,Options:!1,OverText:!1,Request:!1,Scroller:!1,Slick:!1,Slider:!1,Sortables:!1,Spinner:!1,Swiff:!1,Tips:!1,Type:!1,typeOf:!1,URI:!1,Window:!1},n.prototypejs={$:!1,$$:!1,$A:!1,$F:!1,$H:!1,$R:!1,$break:!1,$continue:!1,$w:!1,Abstract:!1,Ajax:!1,Class:!1,Enumerable:!1,Element:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Selector:!1,Template:!1,Toggle:!1,Try:!1,Autocompleter:!1,Builder:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Scriptaculous:!1},n.yui={YUI:!1,Y:!1,YUI_config:!1}},{}],44:[function(e,t,n){t.exports={disallowVars:!1,disallowDuplicated:!0,disallowUnknownReferences:!0,parse:e("esprima-fb").parse}},{"esprima-fb":55}],45:[function(e,t,n){"use strict";function r(e){i(s.someof(e.kind,["hoist","block","catch-block"])),i(s.object(e.node)),i(null===e.parent||s.object(e.parent)),this.kind=e.kind,this.node=e.node,this.parent=e.parent,this.children=[],this.decls=a(),this.written=o(),this.propagates="hoist"===this.kind?o():null,this.parent&&this.parent.children.push(this)}var i=e("assert"),a=e("stringmap"),o=e("stringset"),s=e("simple-is"),l=e("simple-fmt"),u=e("./error"),c=u.getline,p=e("./options");r.prototype.print=function(e){e=e||0;var t=this,n=this.decls.keys().map(function(e){return l("{0} [{1}]",e,t.decls.get(e).kind)}).join(", "),r=this.propagates?this.propagates.items().join(", "):"";console.log(l("{0}{1}: {2}. propagates: {3}",l.repeat(" ",e),this.node.type,n,r)),this.children.forEach(function(t){t.print(e+2)})},r.prototype.add=function(e,t,n,r){function a(e){return s.someof(e,["const","let"])}i(s.someof(t,["fun","param","var","caught","const","let"]));var o=this;if(s.someof(t,["fun","param","var"]))for(;"hoist"!==o.kind;){if(o.decls.has(e)&&a(o.decls.get(e).kind))return u(c(n),"{0} is already declared",e);o=o.parent}if(o.decls.has(e)&&(p.disallowDuplicated||a(o.decls.get(e).kind)||a(t)))return u(c(n),"{0} is already declared",e);var l={kind:t,node:n};r&&(i(s.someof(t,["var","const","let"])),l.from=r),o.decls.set(e,l)},r.prototype.getKind=function(e){i(s.string(e));var t=this.decls.get(e);return t?t.kind:null},r.prototype.getNode=function(e){i(s.string(e));var t=this.decls.get(e);return t?t.node:null},r.prototype.getFromPos=function(e){i(s.string(e));var t=this.decls.get(e);return t?t.from:null},r.prototype.hasOwn=function(e){return this.decls.has(e)},r.prototype.remove=function(e){return this.decls.remove(e)},r.prototype.doesPropagate=function(e){return this.propagates.has(e)},r.prototype.markPropagates=function(e){this.propagates.add(e)},r.prototype.closestHoistScope=function(){for(var e=this;"hoist"!==e.kind;)e=e.parent;return e},r.prototype.hasFunctionScopeBetween=function(e){function t(e){return s.someof(e.type,["FunctionDeclaration","FunctionExpression"])}for(var n=this;n;n=n.parent){if(n===e)return!1;if(t(n.node))return!0}throw new Error("wasn't inner scope of outer")},r.prototype.lookup=function(e){for(var t=this;t;t=t.parent){if(t.decls.has(e))return t;"hoist"===t.kind&&t.propagates.add(e)}return null},r.prototype.markWrite=function(e){i(s.string(e)),this.written.add(e)},r.prototype.detectUnmodifiedLets=function(){function e(n){n!==t&&n.decls.keys().forEach(function(e){if("let"===n.getKind(e)&&!n.written.has(e))return u(c(n.getNode(e)),"{0} is declared as let but never modified so could be const",e)}),n.children.forEach(function(t){e(t)})}var t=this;e(this)},r.prototype.traverse=function(e){function t(e){n&&n(e),e.children.forEach(function(e){t(e)}),r&&r(e)}e=e||{};var n=e.pre,r=e.post;t(this)},t.exports=r},{"./error":42,"./options":44,assert:2,"simple-fmt":51,"simple-is":52,stringmap:53,stringset:54}],46:[function(e,t,n){function r(){this.lets=0,this.consts=0,this.renames=[]}var i=e("simple-fmt"),a=e("simple-is"),o=e("assert");r.prototype.declarator=function(e){o(a.someof(e,["const","let"])),"const"===e?this.consts++:this.lets++},r.prototype.rename=function(e,t,n){this.renames.push({oldName:e,newName:t,line:n})},r.prototype.toString=function(){var e=this.renames.map(function(e){return e}).sort(function(e,t){return e.line-t.line}),t=e.map(function(e){return i("\nline {0}: {1} => {2}",e.line,e.oldName,e.newName)}).join(""),n=this.consts+this.lets,r=0===n?"can't calculate const coverage (0 consts, 0 lets)":i("{0}% const coverage ({1} consts, {2} lets)",Math.floor(100*this.consts/n),this.consts,this.lets);return r+t+"\n"},t.exports=r},{assert:2,"simple-fmt":51,"simple-is":52}],47:[function(e,t,n){function r(e,t){"use strict";var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};i("string"==typeof e),i(n(t));for(var r=a(t,function(e,t){return e.start-t.start}),o=[],s=0,l=0;l<r.length;l++){var u=r[l];i(s<=u.start),i(u.start<=u.end),o.push(e.slice(s,u.start)),o.push(u.str),s=u.end}return s<e.length&&o.push(e.slice(s)),o.join("")}var i=e("assert"),a=e("stable");"undefined"!=typeof t&&"undefined"!=typeof t.exports&&(t.exports=r)},{assert:2,stable:48}],48:[function(e,t,n){!function(){function e(e,t){"function"!=typeof t&&(t=function(e,t){return String(e).localeCompare(t)});var n=e.length;if(n<=1)return e;for(var i=new Array(n),a=1;a<n;a*=2){r(e,t,a,i);var o=e;e=i,i=o}return e}var n=function(t,n){return e(t.slice(),n)};n.inplace=function(t,n){var i=e(t,n);return i!==t&&r(i,null,t.length,t),t};var r=function(e,t,n,r){var i,a,o,s,l,u=e.length,c=0,p=2*n;for(i=0;i<u;i+=p)for(a=i+n,o=a+n,a>u&&(a=u),o>u&&(o=u),s=i,l=a;;)if(s<a&&l<o)t(e[s],e[l])<=0?r[c++]=e[s++]:r[c++]=e[l++];else if(s<a)r[c++]=e[s++];else{if(!(l<o))break;r[c++]=e[l++]}};"undefined"!=typeof t?t.exports=n:window.stable=n}()},{}],49:[function(e,t,n){function r(e,t){"use strict";function n(e,t,o,s){if(e&&"string"==typeof e.type){var l=void 0;if(r&&(l=r(e,t,o,s)),l!==!1)for(var o in e)if(a?!a(o,e):"$"!==o[0]){var u=e[o];if(Array.isArray(u))for(var c=0;c<u.length;c++)n(u[c],e,o,c);else n(u,e,o)}i&&i(e,t,o,s)}}t=t||{};var r=t.pre,i=t.post,a=t.skipProperty;n(e,null)}"undefined"!=typeof t&&"undefined"!=typeof t.exports&&(t.exports=r)},{}],50:[function(e,t,n){var r=function(){"use strict";function e(e,t){this.val=e,this.brk=t}function t(){return function t(n){throw new e(n,t)}}function n(n){var r=t();try{return n(r)}catch(t){if(t instanceof e&&t.brk===r)return t.val;throw t}}return n}();"undefined"!=typeof t&&"undefined"!=typeof t.exports&&(t.exports=r)},{}],51:[function(e,t,n){var r=function(){"use strict";function e(e,t){var n=Array.prototype.slice.call(arguments,1);return e.replace(/\{(\d+)\}/g,function(e,t){return t in n?n[t]:e})}function t(e,t){return e.replace(/\{([_$a-zA-Z0-9][_$a-zA-Z0-9]*)\}/g,function(e,n){return n in t?t[n]:e})}function n(e,t){return new Array(t+1).join(e)}return e.fmt=e,e.obj=t,e.repeat=n,e}();"undefined"!=typeof t&&"undefined"!=typeof t.exports&&(t.exports=r)},{}],52:[function(e,t,n){var r=function(){"use strict";var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=void 0;return{nan:function(e){return e!==e},boolean:function(e){return"boolean"==typeof e},number:function(e){return"number"==typeof e},string:function(e){return"string"==typeof e},fn:function(e){return"function"==typeof e},object:function(e){return null!==e&&"object"==typeof e},primitive:function(e){var t=typeof e;return null===e||e===n||"boolean"===t||"number"===t||"string"===t},array:Array.isArray||function(e){return"[object Array]"===t.call(e)},finitenumber:function(e){return"number"==typeof e&&isFinite(e)},someof:function(e,t){return t.indexOf(e)>=0},noneof:function(e,t){return t.indexOf(e)===-1},own:function(t,n){return e.call(t,n)}}}();"undefined"!=typeof t&&"undefined"!=typeof t.exports&&(t.exports=r)},{}],53:[function(e,t,n){var r=function(){"use strict";function e(t){return this instanceof e?(this.obj=n(),this.hasProto=!1,this.proto=void 0,void(t&&this.setMany(t))):new e(t)}var t=Object.prototype.hasOwnProperty,n=function(){function e(e){for(var n in e)if(t.call(e,n))return!0;return!1}function n(e){return t.call(e,"__count__")||t.call(e,"__parent__")}var r=!1;if("function"==typeof Object.create&&(e(Object.create(null))||(r=!0)),r===!1&&e({}))throw new Error("StringMap environment error 0, please file a bug at https://github.com/olov/stringmap/issues");var i=r?Object.create(null):{},a=!1;if(n(i)){if(i.__proto__=null,e(i)||n(i))throw new Error("StringMap environment error 1, please file a bug at https://github.com/olov/stringmap/issues");a=!0}return function(){var e=r?Object.create(null):{};return a&&(e.__proto__=null),e}}();return e.prototype.has=function(e){if("string"!=typeof e)throw new Error("StringMap expected string key");return"__proto__"===e?this.hasProto:t.call(this.obj,e)},e.prototype.get=function(e){if("string"!=typeof e)throw new Error("StringMap expected string key");return"__proto__"===e?this.proto:t.call(this.obj,e)?this.obj[e]:void 0},e.prototype.set=function(e,t){if("string"!=typeof e)throw new Error("StringMap expected string key");"__proto__"===e?(this.hasProto=!0,this.proto=t):this.obj[e]=t},e.prototype.remove=function(e){if("string"!=typeof e)throw new Error("StringMap expected string key");var t=this.has(e);return"__proto__"===e?(this.hasProto=!1,this.proto=void 0):delete this.obj[e],t},e.prototype.delete=e.prototype.remove,e.prototype.isEmpty=function(){for(var e in this.obj)if(t.call(this.obj,e))return!1;return!this.hasProto},e.prototype.size=function(){var e=0;for(var n in this.obj)t.call(this.obj,n)&&++e;return this.hasProto?e+1:e},e.prototype.keys=function(){var e=[];for(var n in this.obj)t.call(this.obj,n)&&e.push(n);return this.hasProto&&e.push("__proto__"),e},e.prototype.values=function(){var e=[];for(var n in this.obj)t.call(this.obj,n)&&e.push(this.obj[n]);return this.hasProto&&e.push(this.proto),e},e.prototype.items=function(){var e=[];for(var n in this.obj)t.call(this.obj,n)&&e.push([n,this.obj[n]]);return this.hasProto&&e.push(["__proto__",this.proto]),e},e.prototype.setMany=function(e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new Error("StringMap expected Object");for(var n in e)t.call(e,n)&&this.set(n,e[n]);return this},e.prototype.merge=function(e){for(var t=e.keys(),n=0;n<t.length;n++){var r=t[n];this.set(r,e.get(r))}return this},e.prototype.map=function(e){for(var t=this.keys(),n=0;n<t.length;n++){var r=t[n];t[n]=e(this.get(r),r)}return t},e.prototype.forEach=function(e){for(var t=this.keys(),n=0;n<t.length;n++){var r=t[n];e(this.get(r),r)}},e.prototype.clone=function(){var t=e();return t.merge(this)},e.prototype.toString=function(){var e=this;return"{"+this.keys().map(function(t){return JSON.stringify(t)+":"+JSON.stringify(e.get(t))}).join(",")+"}"},e}();"undefined"!=typeof t&&"undefined"!=typeof t.exports&&(t.exports=r)},{}],54:[function(e,t,n){var r=function(){"use strict";function e(t){return this instanceof e?(this.obj=n(),this.hasProto=!1,void(t&&this.addMany(t))):new e(t)}var t=Object.prototype.hasOwnProperty,n=function(){function e(e){for(var n in e)if(t.call(e,n))return!0;return!1}function n(e){return t.call(e,"__count__")||t.call(e,"__parent__")}var r=!1;if("function"==typeof Object.create&&(e(Object.create(null))||(r=!0)),r===!1&&e({}))throw new Error("StringSet environment error 0, please file a bug at https://github.com/olov/stringset/issues");var i=r?Object.create(null):{},a=!1;if(n(i)){if(i.__proto__=null,e(i)||n(i))throw new Error("StringSet environment error 1, please file a bug at https://github.com/olov/stringset/issues");a=!0}return function(){var e=r?Object.create(null):{};return a&&(e.__proto__=null),e}}();return e.prototype.has=function(e){if("string"!=typeof e)throw new Error("StringSet expected string item");return"__proto__"===e?this.hasProto:t.call(this.obj,e)},e.prototype.add=function(e){if("string"!=typeof e)throw new Error("StringSet expected string item");"__proto__"===e?this.hasProto=!0:this.obj[e]=!0},e.prototype.remove=function(e){if("string"!=typeof e)throw new Error("StringSet expected string item");var t=this.has(e);return"__proto__"===e?this.hasProto=!1:delete this.obj[e],t},e.prototype.delete=e.prototype.remove,e.prototype.isEmpty=function(){for(var e in this.obj)if(t.call(this.obj,e))return!1;return!this.hasProto},e.prototype.size=function(){var e=0;for(var n in this.obj)t.call(this.obj,n)&&++e;return this.hasProto?e+1:e},e.prototype.items=function(){var e=[];for(var n in this.obj)t.call(this.obj,n)&&e.push(n);return this.hasProto&&e.push("__proto__"),e},e.prototype.addMany=function(e){if(!Array.isArray(e))throw new Error("StringSet expected array");for(var t=0;t<e.length;t++)this.add(e[t]);return this},e.prototype.merge=function(e){return this.addMany(e.items()),this},e.prototype.clone=function(){var t=e();return t.merge(this)},e.prototype.toString=function(){return"{"+this.items().map(JSON.stringify).join(",")+"}"},e}();"undefined"!=typeof t&&"undefined"!=typeof t.exports&&(t.exports=r)},{}],55:[function(e,t,n){!function(e,t){"use strict";"function"==typeof define&&define.amd?define(["exports"],t):t("undefined"!=typeof n?n:e.esprima={})}(this,function(e){"use strict";function t(e,t){if(!e)throw new Error("ASSERT: "+t)}function n(){this.$data={}}function r(e){return e>=48&&e<=57}function i(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function a(e){return"01234567".indexOf(e)>=0}function o(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&" ᠎              \ufeff".indexOf(String.fromCharCode(e))>0}function s(e){return 10===e||13===e||8232===e||8233===e}function l(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&Zn.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function u(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&Zn.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function c(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function p(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function f(e){return"eval"===e||"arguments"===e}function d(e){if(ir&&p(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function h(e,n,r,i,a){var o;t("number"==typeof r,"Comment must have valid position"),pr.lastCommentStart>=r||(pr.lastCommentStart=r,o={type:e,value:n},fr.range&&(o.range=[r,i]),fr.loc&&(o.loc=a),fr.comments.push(o),fr.attachComment&&(fr.leadingComments.push(o),fr.trailingComments.push(o)))}function m(){var e,t,n,r;for(e=ar-2,t={start:{line:or,column:ar-sr-2}};ar<lr;)if(n=rr.charCodeAt(ar),++ar,s(n))return fr.comments&&(r=rr.slice(e+2,ar-1),t.end={line:or,column:ar-sr-1},h("Line",r,e,ar-1,t)),13===n&&10===rr.charCodeAt(ar)&&++ar,++or,void(sr=ar);fr.comments&&(r=rr.slice(e+2,ar),t.end={line:or,column:ar-sr},h("Line",r,e,ar,t))}function y(){var e,t,n,r;for(fr.comments&&(e=ar-2,t={start:{line:or,column:ar-sr-2}});ar<lr;)if(n=rr.charCodeAt(ar),s(n))13===n&&10===rr.charCodeAt(ar+1)&&++ar,++or,++ar,sr=ar,ar>=lr&&W({},Qn.UnexpectedToken,"ILLEGAL");else if(42===n){if(47===rr.charCodeAt(ar+1))return++ar,++ar,void(fr.comments&&(r=rr.slice(e+2,ar-2),t.end={line:or,column:ar-sr},h("Block",r,e,ar,t)));++ar}else++ar;W({},Qn.UnexpectedToken,"ILLEGAL")}function g(){for(var e;ar<lr;)if(e=rr.charCodeAt(ar),o(e))++ar;else if(s(e))++ar,13===e&&10===rr.charCodeAt(ar)&&++ar,++or,sr=ar;else{if(47!==e)break;if(e=rr.charCodeAt(ar+1),47===e)++ar,++ar,m();else{if(42!==e)break;++ar,++ar,y()}}}function v(e){var t,n,r,a=0;for(n="u"===e?4:2,t=0;t<n;++t){if(!(ar<lr&&i(rr[ar])))return"";r=rr[ar++],a=16*a+"0123456789abcdef".indexOf(r.toLowerCase())}return String.fromCharCode(a)}function b(){var e,t,n,r;for(e=rr[ar],t=0,"}"===e&&W({},Qn.UnexpectedToken,"ILLEGAL");ar<lr&&(e=rr[ar++],i(e));)t=16*t+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||"}"!==e)&&W({},Qn.UnexpectedToken,"ILLEGAL"),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,r=(t-65536&1023)+56320,String.fromCharCode(n,r))}function E(){var e,t;for(e=rr.charCodeAt(ar++),t=String.fromCharCode(e),92===e&&(117!==rr.charCodeAt(ar)&&W({},Qn.UnexpectedToken,"ILLEGAL"),++ar,e=v("u"),e&&"\\"!==e&&l(e.charCodeAt(0))||W({},Qn.UnexpectedToken,"ILLEGAL"),t=e);ar<lr&&(e=rr.charCodeAt(ar),u(e));)++ar,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==rr.charCodeAt(ar)&&W({},Qn.UnexpectedToken,"ILLEGAL"),++ar,e=v("u"),e&&"\\"!==e&&u(e.charCodeAt(0))||W({},Qn.UnexpectedToken,"ILLEGAL"),t+=e);return t}function S(){var e,t;for(e=ar++;ar<lr;){if(t=rr.charCodeAt(ar),92===t)return ar=e,E();if(!u(t))break;++ar}return rr.slice(e,ar)}function w(){var e,t,n;return e=ar,t=92===rr.charCodeAt(ar)?E():S(),n=1===t.length?$n.Identifier:d(t)?$n.Keyword:"null"===t?$n.NullLiteral:"true"===t||"false"===t?$n.BooleanLiteral:$n.Identifier,{type:n,value:t,lineNumber:or,lineStart:sr,range:[e,ar]}}function x(){var e,t,n,r,i=ar,a=rr.charCodeAt(ar),o=rr[ar];if(pr.inJSXTag||pr.inJSXChild)switch(a){case 60:case 62:return++ar,{type:$n.Punctuator,value:String.fromCharCode(a),lineNumber:or,lineStart:sr,range:[i,ar]}}switch(a){case 40:case 41:case 59:case 44:case 91:case 93:case 58:case 63:case 126:return++ar,fr.tokenize&&40===a&&(fr.openParenToken=fr.tokens.length),{type:$n.Punctuator,value:String.fromCharCode(a),lineNumber:or,lineStart:sr,range:[i,ar]};case 123:case 125:return++ar,fr.tokenize&&123===a&&(fr.openCurlyToken=fr.tokens.length),ar>pr.curlyLastIndex&&(pr.curlyLastIndex=ar,123===a?pr.curlyStack.push("{"):pr.curlyStack.pop()),{type:$n.Punctuator,value:String.fromCharCode(a),lineNumber:or,lineStart:sr,range:[i,ar]};default:if(e=rr.charCodeAt(ar+1),61===e)switch(a){case 37:case 38:case 42:case 43:case 45:case 47:case 60:case 62:case 94:case 124:return ar+=2,{type:$n.Punctuator,value:String.fromCharCode(a)+String.fromCharCode(e),lineNumber:or,lineStart:sr,range:[i,ar]};case 33:case 61:return ar+=2,61===rr.charCodeAt(ar)&&++ar,{type:$n.Punctuator,value:rr.slice(i,ar),lineNumber:or,lineStart:sr,range:[i,ar]}}}return t=rr[ar+1],n=rr[ar+2],r=rr[ar+3],">"===o&&">"===t&&">"===n&&"="===r?(ar+=4,{type:$n.Punctuator,value:">>>=",lineNumber:or,lineStart:sr,range:[i,ar]}):">"!==o||">"!==t||">"!==n||pr.inType?"<"===o&&"<"===t&&"="===n?(ar+=3,{type:$n.Punctuator,value:"<<=",lineNumber:or,lineStart:sr,range:[i,ar]}):">"===o&&">"===t&&"="===n?(ar+=3,{type:$n.Punctuator,value:">>=",lineNumber:or,lineStart:sr,range:[i,ar]}):"."===o&&"."===t&&"."===n?(ar+=3,{type:$n.Punctuator,value:"...",lineNumber:or,lineStart:sr,range:[i,ar]}):o===t&&"+-<>&|".indexOf(o)>=0&&!pr.inType?(ar+=2,{type:$n.Punctuator,value:o+t,lineNumber:or,lineStart:sr,range:[i,ar]}):"="===o&&">"===t?(ar+=2,{type:$n.Punctuator,value:"=>",lineNumber:or,lineStart:sr,range:[i,ar]}):"<>=!+-*%&|^/".indexOf(o)>=0?(++ar,{type:$n.Punctuator,value:o,lineNumber:or,lineStart:sr,range:[i,ar]}):"."===o?(++ar,{type:$n.Punctuator,value:o,lineNumber:or,lineStart:sr,range:[i,ar]}):void W({},Qn.UnexpectedToken,"ILLEGAL"):(ar+=3,{type:$n.Punctuator,value:">>>",lineNumber:or,lineStart:sr,range:[i,ar]})}function k(e){for(var t="";ar<lr&&i(rr[ar]);)t+=rr[ar++];return 0===t.length&&W({},Qn.UnexpectedToken,"ILLEGAL"),l(rr.charCodeAt(ar))&&W({},Qn.UnexpectedToken,"ILLEGAL"),{type:$n.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:or,lineStart:sr,range:[e,ar]}}function T(e){var t,n;for(n="";ar<lr&&(t=rr[ar],"0"===t||"1"===t);)n+=rr[ar++];return 0===n.length&&W({},Qn.UnexpectedToken,"ILLEGAL"),ar<lr&&(t=rr.charCodeAt(ar),(l(t)||r(t))&&W({},Qn.UnexpectedToken,"ILLEGAL")),{type:$n.NumericLiteral,value:parseInt(n,2),lineNumber:or,lineStart:sr,range:[e,ar]}}function A(e,t){var n,i;for(a(e)?(i=!0,n="0"+rr[ar++]):(i=!1,++ar,n="");ar<lr&&a(rr[ar]);)n+=rr[ar++];return i||0!==n.length||W({},Qn.UnexpectedToken,"ILLEGAL"),(l(rr.charCodeAt(ar))||r(rr.charCodeAt(ar)))&&W({},Qn.UnexpectedToken,"ILLEGAL"),{type:$n.NumericLiteral,value:parseInt(n,8),octal:i,lineNumber:or,lineStart:sr,range:[t,ar]}}function L(){var e,n,i;if(i=rr[ar],t(r(i.charCodeAt(0))||"."===i,"Numeric literal must start with a decimal digit or a decimal point"),n=ar,e="","."!==i){if(e=rr[ar++],i=rr[ar],"0"===e){if("x"===i||"X"===i)return++ar,k(n);if("b"===i||"B"===i)return++ar,T(n);if("o"===i||"O"===i||a(i))return A(i,n);i&&r(i.charCodeAt(0))&&W({},Qn.UnexpectedToken,"ILLEGAL")}for(;r(rr.charCodeAt(ar));)e+=rr[ar++];i=rr[ar]}if("."===i){for(e+=rr[ar++];r(rr.charCodeAt(ar));)e+=rr[ar++];i=rr[ar]}if("e"===i||"E"===i)if(e+=rr[ar++],i=rr[ar],"+"!==i&&"-"!==i||(e+=rr[ar++]),r(rr.charCodeAt(ar)))for(;r(rr.charCodeAt(ar));)e+=rr[ar++];else W({},Qn.UnexpectedToken,"ILLEGAL");return l(rr.charCodeAt(ar))&&W({},Qn.UnexpectedToken,"ILLEGAL"),{type:$n.NumericLiteral,value:parseFloat(e),lineNumber:or,lineStart:sr,range:[n,ar]}}function C(){var e,n,r,i,o,l,u="",c=!1;for(e=rr[ar],t("'"===e||'"'===e,"String literal must starts with a quote"),n=ar,++ar;ar<lr;){if(r=rr[ar++],r===e){e="";break}if("\\"===r)if(r=rr[ar++],r&&s(r.charCodeAt(0)))++or,"\r"===r&&"\n"===rr[ar]&&++ar,sr=ar;else switch(r){case"n":u+="\n";break;case"r":u+="\r";break;case"t":u+="\t";break;case"u":case"x":"{"===rr[ar]?(++ar,u+=b()):(l=ar,o=v(r),o?u+=o:(ar=l,u+=r));break;case"b":u+="\b";break;case"f":u+="\f";break;case"v":u+="\v";break;default:a(r)?(i="01234567".indexOf(r),0!==i&&(c=!0),ar<lr&&a(rr[ar])&&(c=!0,i=8*i+"01234567".indexOf(rr[ar++]),"0123".indexOf(r)>=0&&ar<lr&&a(rr[ar])&&(i=8*i+"01234567".indexOf(rr[ar++]))),u+=String.fromCharCode(i)):u+=r}else{if(s(r.charCodeAt(0)))break;u+=r}}return""!==e&&W({},Qn.UnexpectedToken,"ILLEGAL"),{type:$n.StringLiteral,value:u,octal:c,lineNumber:or,lineStart:sr,range:[n,ar]}}function P(){var e,t,n,r,i,o,l,u,c,p="";for(n=!1,i=!1,t=ar,r="`"===rr[ar],++ar;ar<lr;){if(e=rr[ar++],"`"===e){i=!0,n=!0;break}if("$"===e){if("{"===rr[ar]){++ar,n=!0;break}p+=e}else if("\\"===e)if(e=rr[ar++],s(e.charCodeAt(0)))++or,"\r"===e&&"\n"===rr[ar]&&++ar,sr=ar;else switch(e){case"n":p+="\n";break;case"r":p+="\r";break;case"t":p+="\t";break;case"u":case"x":"{"===rr[ar]?(++ar,p+=b()):(o=ar,l=v(e),l?p+=l:(ar=o,p+=e));break;case"b":p+="\b";break;case"f":p+="\f";break;case"v":p+="\v";break;default:a(e)?(u="01234567".indexOf(e),0!==u&&(c=!0),ar<lr&&a(rr[ar])&&(c=!0,u=8*u+"01234567".indexOf(rr[ar++]),"0123".indexOf(e)>=0&&ar<lr&&a(rr[ar])&&(u=8*u+"01234567".indexOf(rr[ar++]))),p+=String.fromCharCode(u)):p+=e}else s(e.charCodeAt(0))?(++or,"\r"===e&&"\n"===rr[ar]&&++ar,sr=ar,p+="\n"):p+=e}return n||W({},Qn.UnexpectedToken,"ILLEGAL"),ar>pr.curlyLastIndex&&(pr.curlyLastIndex=ar,i||pr.curlyStack.push("template"),r||pr.curlyStack.pop()),{type:$n.Template,value:{cooked:p,raw:rr.slice(t+1,ar-(i?1:2))},head:r,tail:i,octal:c,lineNumber:or,lineStart:sr,range:[t,ar]}}function _(e,t){var n,r=e;t.indexOf("u")>=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t){return parseInt(t,16)<=1114111?"x":void W({},Qn.InvalidRegExp)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{n=new RegExp(r)}catch(e){W({},Qn.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}}function I(){var e,n,r,i,a;for(e=rr[ar],t("/"===e,"Regular expression literal must start with a slash"),
+n=rr[ar++],r=!1,i=!1;ar<lr;)if(e=rr[ar++],n+=e,"\\"===e)e=rr[ar++],s(e.charCodeAt(0))&&W({},Qn.UnterminatedRegExp),n+=e;else if(s(e.charCodeAt(0)))W({},Qn.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){i=!0;break}"["===e&&(r=!0)}return i||W({},Qn.UnterminatedRegExp),a=n.substr(1,n.length-2),{value:a,literal:n}}function j(){var e,t,n,r;for(t="",n="";ar<lr&&(e=rr[ar],u(e.charCodeAt(0)));)if(++ar,"\\"===e&&ar<lr)if(e=rr[ar],"u"===e){if(++ar,r=ar,e=v("u"))for(n+=e,t+="\\u";r<ar;++r)t+=rr[r];else ar=r,n+="u",t+="\\u";$({},Qn.UnexpectedToken,"ILLEGAL")}else t+="\\",$({},Qn.UnexpectedToken,"ILLEGAL");else n+=e,t+=e;return{value:n,literal:t}}function O(){var e,t,n,r;return cr=null,g(),e=ar,t=I(),n=j(),r=_(t.value,n.value),fr.tokenize?{type:$n.RegularExpression,value:r,regex:{pattern:t.value,flags:n.value},lineNumber:or,lineStart:sr,range:[e,ar]}:{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},range:[e,ar]}}function M(e){return e.type===$n.Identifier||e.type===$n.Keyword||e.type===$n.BooleanLiteral||e.type===$n.NullLiteral}function N(){var e,t;if(e=fr.tokens[fr.tokens.length-1],!e)return O();if("Punctuator"===e.type){if(")"===e.value)return t=fr.tokens[fr.openParenToken-1],!t||"Keyword"!==t.type||"if"!==t.value&&"while"!==t.value&&"for"!==t.value&&"with"!==t.value?x():O();if("}"===e.value){if(fr.tokens[fr.openCurlyToken-3]&&"Keyword"===fr.tokens[fr.openCurlyToken-3].type){if(t=fr.tokens[fr.openCurlyToken-4],!t)return x()}else{if(!fr.tokens[fr.openCurlyToken-4]||"Keyword"!==fr.tokens[fr.openCurlyToken-4].type)return x();if(t=fr.tokens[fr.openCurlyToken-5],!t)return O()}return Gn.indexOf(t.value)>=0?x():O()}return O()}return"Keyword"===e.type&&"this"!==e.value?O():x()}function D(){var e;return pr.inJSXChild||g(),ar>=lr?{type:$n.EOF,lineNumber:or,lineStart:sr,range:[ar,ar]}:pr.inJSXChild?yn():(e=rr.charCodeAt(ar),40===e||41===e||58===e?x():39===e||34===e?pr.inJSXTag?mn():C():pr.inJSXTag&&cn(e)?fn():96===e||125===e&&"template"===pr.curlyStack[pr.curlyStack.length-1]?P():l(e)?w():46===e?r(rr.charCodeAt(ar+1))?L():x():r(e)?L():fr.tokenize&&47===e?N():x())}function R(){var e;return e=cr,ar=e.range[1],or=e.lineNumber,sr=e.lineStart,cr=D(),ar=e.range[1],or=e.lineNumber,sr=e.lineStart,e}function B(){var e,t,n;e=ar,t=or,n=sr,cr=D(),ar=e,or=t,sr=n}function F(){var e,t,n,r,i;return e="function"==typeof fr.advance?fr.advance:D,t=ar,n=or,r=sr,null===cr&&(cr=e()),ar=cr.range[1],or=cr.lineNumber,sr=cr.lineStart,i=e(),ar=t,or=n,sr=r,i}function X(e){ar=e.range[0],or=e.lineNumber,sr=e.lineStart,cr=e}function U(){if(fr.loc||fr.range)return g(),{offset:ar,line:or,col:ar-sr}}function J(){if(fr.loc||fr.range)return{offset:ar,line:or,col:ar-sr}}function q(e){var t,n,r=fr.bottomRightStack,i=r[r.length-1];if(!(e.type===Yn.Program&&e.body.length>0)){if(fr.trailingComments.length>0?fr.trailingComments[0].range[0]>=e.range[1]?(n=fr.trailingComments,fr.trailingComments=[]):fr.trailingComments.length=0:i&&i.trailingComments&&i.trailingComments[0].range[0]>=e.range[1]&&(n=i.trailingComments,delete i.trailingComments),i)for(;i&&i.range[0]>=e.range[0];)t=i,i=r.pop();t?t.leadingComments&&t.leadingComments[t.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=t.leadingComments,delete t.leadingComments):fr.leadingComments.length>0&&fr.leadingComments[fr.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=fr.leadingComments,fr.leadingComments=[]),n&&(e.trailingComments=n),r.push(e)}}function V(e,t){return fr.range&&(t.range=[e.offset,ar]),fr.loc&&(t.loc={start:{line:e.line,column:e.col},end:{line:or,column:ar-sr}},t=ur.postProcess(t)),fr.attachComment&&q(t),t}function z(){var e,t,n,r;return e=ar,t=or,n=sr,g(),r=or!==t,ar=e,or=t,sr=n,r}function W(e,n){var r,i=Array.prototype.slice.call(arguments,2),a=n.replace(/%(\d)/g,function(e,n){return t(n<i.length,"Message reference must be in range"),i[n]});throw"number"==typeof e.lineNumber?(r=new Error("Line "+e.lineNumber+": "+a),r.index=e.range[0],r.lineNumber=e.lineNumber,r.column=e.range[0]-sr+1):(r=new Error("Line "+or+": "+a),r.index=ar,r.lineNumber=or,r.column=ar-sr+1),r.description=a,r}function $(){try{W.apply(null,arguments)}catch(e){if(!fr.errors)throw e;fr.errors.push(e)}}function H(e){if(e.type===$n.EOF&&W(e,Qn.UnexpectedEOS),e.type===$n.NumericLiteral&&W(e,Qn.UnexpectedNumber),e.type!==$n.StringLiteral&&e.type!==$n.JSXText||W(e,Qn.UnexpectedString),e.type===$n.Identifier&&W(e,Qn.UnexpectedIdentifier),e.type===$n.Keyword){if(c(e.value))W(e,Qn.UnexpectedReserved);else if(ir&&p(e.value))return void $(e,Qn.StrictReservedWord);W(e,Qn.UnexpectedToken,e.value)}e.type===$n.Template&&W(e,Qn.UnexpectedTemplate,e.value.raw),W(e,Qn.UnexpectedToken,e.value)}function G(e){var t=R();t.type===$n.Punctuator&&t.value===e||H(t)}function Y(e,t){var n=R();n.type===(t?$n.Identifier:$n.Keyword)&&n.value===e||H(n)}function K(e){return Y(e,!0)}function Q(e){return cr.type===$n.Punctuator&&cr.value===e}function Z(e,t){var n=t?$n.Identifier:$n.Keyword;return cr.type===n&&cr.value===e}function ee(e){return Z(e,!0)}function te(){var e;return cr.type===$n.Punctuator&&(e=cr.value,"="===e||"*="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}function ne(){return pr.yieldAllowed&&Z("yield",!ir)}function re(){var e=cr,t=!1;return ee("async")&&(R(),t=!z(),X(e)),t}function ie(){return pr.awaitAllowed&&ee("await")}function ae(){var e,t=ar,n=or,r=sr,i=cr;return 59===rr.charCodeAt(ar)?void R():(e=or,g(),or!==e?(ar=t,or=n,sr=r,void(cr=i)):Q(";")?void R():void(cr.type===$n.EOF||Q("}")||H(cr)))}function oe(e){return e.type===Yn.Identifier||e.type===Yn.MemberExpression}function se(e){return oe(e)||e.type===Yn.ObjectPattern||e.type===Yn.ArrayPattern}function le(){var e,t=[],n=[],r=null,i=!0,a=U();for(G("[");!Q("]");)"for"===cr.value&&cr.type===$n.Keyword?(i||W({},Qn.ComprehensionError),Z("for"),e=Pt({ignoreBody:!0}),e.of=e.type===Yn.ForOfStatement,e.type=Yn.ComprehensionBlock,e.left.kind&&W({},Qn.ComprehensionError),n.push(e)):"if"===cr.value&&cr.type===$n.Keyword?(i||W({},Qn.ComprehensionError),Y("if"),G("("),r=Fe(),G(")")):","===cr.value&&cr.type===$n.Punctuator?(i=!1,R(),t.push(null)):(e=we(),t.push(e),e&&e.type===Yn.SpreadElement?Q("]")||W({},Qn.ElementAfterSpreadElement):Q("]")||Z("for")||Z("if")||(G(","),i=!1));return G("]"),r&&!n.length&&W({},Qn.ComprehensionRequiresBlock),n.length?(1!==t.length&&W({},Qn.ComprehensionError),V(a,ur.createComprehensionExpression(r,n,t[0]))):V(a,ur.createArrayExpression(t))}function ue(e){var t,n,r,i,a,o,s=U();return t=ir,n=pr.yieldAllowed,pr.yieldAllowed=e.generator,r=pr.awaitAllowed,pr.awaitAllowed=e.async,i=e.params||[],a=e.defaults||[],o=Ut(),e.name&&ir&&f(i[0].name)&&$(e.name,Qn.StrictParamName),ir=t,pr.yieldAllowed=n,pr.awaitAllowed=r,V(s,ur.createFunctionExpression(null,i,a,o,e.rest||null,e.generator,o.type!==Yn.BlockStatement,e.async,e.returnType,e.typeParameters))}function ce(e){var t,n,r;return t=ir,ir=!0,n=zt(),n.stricted&&$(n.stricted,n.message),r=ue({params:n.params,defaults:n.defaults,rest:n.rest,generator:e.generator,async:e.async,returnType:n.returnType,typeParameters:e.typeParameters}),ir=t,r}function pe(){var e,t,n=U(),r=R();return r.type===$n.StringLiteral||r.type===$n.NumericLiteral?(ir&&r.octal&&$(r,Qn.StrictOctalLiteral),V(n,ur.createLiteral(r))):r.type===$n.Punctuator&&"["===r.value?(n=U(),e=Be(),t=V(n,e),G("]"),t):V(n,ur.createIdentifier(r.value))}function fe(){var e,t,n,r,i,a,o,s=U();return e=cr,i="["===e.value&&e.type===$n.Punctuator,e.type===$n.Identifier||i||re()?(n=pe(),Q(":")?(R(),V(s,ur.createProperty("init",n,Be(),!1,!1,i))):Q("(")||Q("<")?(Q("<")&&(o=Je()),V(s,ur.createProperty("init",n,ce({generator:!1,async:!1,typeParameters:o}),!0,!1,i))):"get"===e.value?(i="["===cr.value,t=pe(),G("("),G(")"),Q(":")&&(a=st()),V(s,ur.createProperty("get",t,ue({generator:!1,async:!1,returnType:a}),!1,!1,i))):"set"===e.value?(i="["===cr.value,t=pe(),G("("),e=cr,r=[ut()],G(")"),Q(":")&&(a=st()),V(s,ur.createProperty("set",t,ue({params:r,generator:!1,async:!1,name:e,returnType:a}),!1,!1,i))):"async"===e.value?(i="["===cr.value,t=pe(),Q("<")&&(o=Je()),V(s,ur.createProperty("init",t,ce({generator:!1,async:!0,typeParameters:o}),!0,!1,i))):(i&&H(cr),V(s,ur.createProperty("init",n,n,!1,!0,!1)))):e.type===$n.EOF||e.type===$n.Punctuator?(Q("*")||H(e),R(),i=cr.type===$n.Punctuator&&"["===cr.value,n=pe(),Q("<")&&(o=Je()),Q("(")||H(R()),V(s,ur.createProperty("init",n,ce({generator:!0,typeParameters:o}),!0,!1,i))):(t=pe(),Q(":")?(R(),V(s,ur.createProperty("init",t,Be(),!1,!1,!1))):Q("(")||Q("<")?(Q("<")&&(o=Je()),V(s,ur.createProperty("init",t,ce({generator:!1,typeParameters:o}),!0,!1,!1))):void H(R()))}function de(){var e=U();return G("..."),V(e,ur.createSpreadProperty(Be()))}function he(e){var t=String;return e.type===Yn.Identifier?e.name:t(e.value)}function me(){var e,t,r,i,a=[],o=new n,s=U(),l=String;for(G("{");!Q("}");)Q("...")?e=de():(e=fe(),t=e.key.type===Yn.Identifier?e.key.name:l(e.key.value),r="init"===e.kind?Kn.Data:"get"===e.kind?Kn.Get:Kn.Set,o.has(t)?(i=o.get(t),i===Kn.Data?ir&&r===Kn.Data?$({},Qn.StrictDuplicateProperty):r!==Kn.Data&&$({},Qn.AccessorDataProperty):r===Kn.Data?$({},Qn.AccessorDataProperty):i&r&&$({},Qn.AccessorGetSet),o.set(t,i|r)):o.set(t,r)),a.push(e),Q("}")||G(",");return G("}"),V(s,ur.createObjectExpression(a))}function ye(e){var t,n;return(cr.type!==$n.Template||e.head&&!cr.head)&&W({},Qn.UnexpectedToken,"ILLEGAL"),t=U(),n=R(),ir&&n.octal&&W(n,Qn.StrictOctalLiteral),V(t,ur.createTemplateElement({raw:n.value.raw,cooked:n.value.cooked},n.tail))}function ge(){var e,t,n,r=U();for(e=ye({head:!0}),t=[e],n=[];!e.tail;)n.push(Fe()),e=ye({head:!1}),t.push(e);return V(r,ur.createTemplateLiteral(t,n))}function ve(){var e,t,n;return G("("),++pr.parenthesizedCount,t=U(),e=Fe(),Q(":")&&(n=st(),e=V(t,ur.createTypeCast(e,n))),G(")"),e}function be(){var e;return!(!re()||(e=F(),e.type!==$n.Keyword||"function"!==e.value))}function Ee(){var e,t,n,r;if(t=cr.type,t===$n.Identifier)return e=U(),V(e,ur.createIdentifier(R().value));if(t===$n.StringLiteral||t===$n.NumericLiteral)return ir&&cr.octal&&$(cr,Qn.StrictOctalLiteral),e=U(),V(e,ur.createLiteral(R()));if(t===$n.Keyword){if(Z("this"))return e=U(),R(),V(e,ur.createThisExpression());if(Z("function"))return $t();if(Z("class"))return nn();if(Z("super"))return e=U(),R(),V(e,ur.createIdentifier("super"))}return t===$n.BooleanLiteral?(e=U(),n=R(),n.value="true"===n.value,V(e,ur.createLiteral(n))):t===$n.NullLiteral?(e=U(),n=R(),n.value=null,V(e,ur.createLiteral(n))):Q("[")?le():Q("{")?me():Q("(")?ve():Q("/")||Q("/=")?(e=U(),r=ur.createLiteral(O()),B(),V(e,r)):t===$n.Template?ge():Q("<")?_n():void H(R())}function Se(){var e,t=[];if(G("("),!Q(")"))for(;ar<lr;){if(e=we(),t.push(e),e.type===Yn.SpreadElement){if(Q(")"))break;W({},Qn.ElementAfterSpreadElement)}if(Q(")"))break;if(G(","),Q(")"))break}return G(")"),t}function we(){if(Q("...")){var e=U();return R(),V(e,ur.createSpreadElement(Be()))}return Be()}function xe(){var e=U(),t=R();return M(t)||H(t),V(e,ur.createIdentifier(t.value))}function ke(){return G("."),xe()}function Te(){var e;return G("["),e=Fe(),G("]"),e}function Ae(){var e,t,n=U();return Y("new"),e=Ce(),t=Q("(")?Se():[],V(n,ur.createNewExpression(e,t))}function Le(){var e,t,n=U();for(e=Z("new")?Ae():Ee();Q(".")||Q("[")||Q("(")||cr.type===$n.Template&&cr.head;)Q("(")?(t=Se(),e=V(n,ur.createCallExpression(e,t))):e=Q("[")?V(n,ur.createMemberExpression("[",e,Te())):Q(".")?V(n,ur.createMemberExpression(".",e,ke())):V(n,ur.createTaggedTemplateExpression(e,ge()));return e}function Ce(){var e,t=U();for(e=Z("new")?Ae():Ee();Q(".")||Q("[")||cr.type===$n.Template&&cr.head;)e=Q("[")?V(t,ur.createMemberExpression("[",e,Te())):Q(".")?V(t,ur.createMemberExpression(".",e,ke())):V(t,ur.createTaggedTemplateExpression(e,ge()));return e}function Pe(){var e,t=U(),n=Le();return cr.type!==$n.Punctuator?n:(!Q("++")&&!Q("--")||z()||(ir&&n.type===Yn.Identifier&&f(n.name)&&$({},Qn.StrictLHSPostfix),oe(n)||W({},Qn.InvalidLHSInAssignment),e=R(),n=V(t,ur.createPostfixExpression(e.value,n))),n)}function _e(){var e,t,n;return cr.type!==$n.Punctuator&&cr.type!==$n.Keyword?Pe():Q("++")||Q("--")?(e=U(),t=R(),n=_e(),ir&&n.type===Yn.Identifier&&f(n.name)&&$({},Qn.StrictLHSPrefix),oe(n)||W({},Qn.InvalidLHSInAssignment),V(e,ur.createUnaryExpression(t.value,n))):Q("+")||Q("-")||Q("~")||Q("!")?(e=U(),t=R(),n=_e(),V(e,ur.createUnaryExpression(t.value,n))):Z("delete")||Z("void")||Z("typeof")?(e=U(),t=R(),n=_e(),n=V(e,ur.createUnaryExpression(t.value,n)),ir&&"delete"===n.operator&&n.argument.type===Yn.Identifier&&$({},Qn.StrictDelete),n):Pe()}function Ie(e,t){var n=0;if(e.type!==$n.Punctuator&&e.type!==$n.Keyword)return 0;switch(e.value){case"||":n=1;break;case"&&":n=2;break;case"|":n=3;break;case"^":n=4;break;case"&":n=5;break;case"==":case"!=":case"===":case"!==":n=6;break;case"<":case">":case"<=":case">=":case"instanceof":n=7;break;case"in":n=t?7:0;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11}return n}function je(){var e,t,n,r,i,a,o,s,l,u,c;if(r=pr.allowIn,pr.allowIn=!0,u=U(),s=_e(),t=cr,n=Ie(t,r),0===n)return s;for(t.prec=n,R(),c=[u,U()],a=_e(),i=[s,t,a];(n=Ie(cr,r))>0;){for(;i.length>2&&n<=i[i.length-2].prec;)a=i.pop(),o=i.pop().value,s=i.pop(),e=ur.createBinaryExpression(o,s,a),c.pop(),u=c.pop(),V(u,e),i.push(e),c.push(u);t=R(),t.prec=n,i.push(t),c.push(U()),e=_e(),i.push(e)}for(pr.allowIn=r,l=i.length-1,e=i[l],c.pop();l>1;)e=ur.createBinaryExpression(i[l-1].value,i[l-2],e),l-=2,u=c.pop(),V(u,e);return e}function Oe(){var e,t,n,r,i=U();return e=je(),Q("?")&&(R(),t=pr.allowIn,pr.allowIn=!0,n=Be(),pr.allowIn=t,G(":"),r=Be(),e=V(i,ur.createConditionalExpression(e,n,r))),e}function Me(e){var t,n,r,i;if(e.type===Yn.ObjectExpression)for(e.type=Yn.ObjectPattern,t=0,n=e.properties.length;t<n;t+=1)r=e.properties[t],r.type===Yn.SpreadProperty?(t<n-1&&W({},Qn.PropertyAfterSpreadProperty),Me(r.argument)):("init"!==r.kind&&W({},Qn.InvalidLHSInAssignment),Me(r.value));else if(e.type===Yn.ArrayExpression)for(e.type=Yn.ArrayPattern,t=0,n=e.elements.length;t<n;t+=1)i=e.elements[t],i&&Me(i);else e.type===Yn.Identifier?f(e.name)&&W({},Qn.InvalidLHSInAssignment):e.type===Yn.SpreadElement?(Me(e.argument),e.argument.type===Yn.ObjectPattern&&W({},Qn.ObjectPatternAsSpread)):e.type!==Yn.MemberExpression&&e.type!==Yn.CallExpression&&e.type!==Yn.NewExpression&&W({},Qn.InvalidLHSInAssignment)}function Ne(e,t){var n,r,i,a;if(t.type===Yn.ObjectExpression)for(t.type=Yn.ObjectPattern,n=0,r=t.properties.length;n<r;n+=1)i=t.properties[n],i.type===Yn.SpreadProperty?(n<r-1&&W({},Qn.PropertyAfterSpreadProperty),Ne(e,i.argument)):("init"!==i.kind&&W({},Qn.InvalidLHSInFormalsList),Ne(e,i.value));else if(t.type===Yn.ArrayExpression)for(t.type=Yn.ArrayPattern,n=0,r=t.elements.length;n<r;n+=1)a=t.elements[n],a&&Ne(e,a);else t.type===Yn.Identifier?qt(e,t,t.name):t.type===Yn.SpreadElement?(t.argument.type!==Yn.Identifier&&W({},Qn.InvalidLHSInFormalsList),qt(e,t.argument,t.argument.name)):W({},Qn.InvalidLHSInFormalsList)}function De(e){var r,i,a,o,s,l,u,c;for(o=[],s=[],l=0,c=null,u={paramSet:new n},r=0,i=e.length;r<i;r+=1)if(a=e[r],a.type===Yn.Identifier)o.push(a),s.push(null),qt(u,a,a.name);else if(a.type===Yn.ObjectExpression||a.type===Yn.ArrayExpression)Ne(u,a),o.push(a),s.push(null);else if(a.type===Yn.SpreadElement)t(r===i-1,"It is guaranteed that SpreadElement is last element by parseExpression"),a.argument.type!==Yn.Identifier&&W({},Qn.InvalidLHSInFormalsList),Ne(u,a.argument),c=a.argument;else{if(a.type!==Yn.AssignmentExpression)return null;o.push(a.left),s.push(a.right),++l,qt(u,a.left,a.left.name)}return u.message===Qn.StrictParamDupe&&W(ir?u.stricted:u.firstRestricted,u.message),0===l&&(s=[]),{params:o,defaults:s,rest:c,stricted:u.stricted,firstRestricted:u.firstRestricted,message:u.message}}function Re(e,t){var n,r,i,a;return G("=>"),n=ir,r=pr.yieldAllowed,pr.yieldAllowed=!1,i=pr.awaitAllowed,pr.awaitAllowed=!!e.async,a=Ut(),ir&&e.firstRestricted&&W(e.firstRestricted,e.message),ir&&e.stricted&&$(e.stricted,e.message),ir=n,pr.yieldAllowed=r,pr.awaitAllowed=i,V(t,ur.createArrowFunctionExpression(e.params,e.defaults,a,e.rest,a.type!==Yn.BlockStatement,!!e.async))}function Be(){var e,t,n,r,i,a=!1,o=cr,s=!1;if(ne())return Ht();if(ie())return Gt();if(i=pr.parenthesizedCount,e=U(),be())return $t();if(re()&&(s=!0,R()),Q("(")){if(n=F(),n.type===$n.Punctuator&&")"===n.value||"..."===n.value)return r=zt(),Q("=>")||H(R()),r.async=s,Re(r,e);a=!0}return n=cr,s&&!Q("(")&&n.type!==$n.Identifier&&(s=!1,X(o)),t=Oe(),Q("=>")&&(pr.parenthesizedCount===i||pr.parenthesizedCount===i+1)&&(t.type===Yn.Identifier?r=De([t]):t.type===Yn.AssignmentExpression||t.type===Yn.ArrayExpression||t.type===Yn.ObjectExpression?(a||H(R()),r=De([t])):t.type===Yn.SequenceExpression&&(r=De(t.expressions)),r)?(r.async=s,Re(r,e)):(s&&(s=!1,X(o),t=Oe()),te()&&(ir&&t.type===Yn.Identifier&&f(t.name)&&$(n,Qn.StrictLHSAssignment),!Q("=")||t.type!==Yn.ObjectExpression&&t.type!==Yn.ArrayExpression?oe(t)||W({},Qn.InvalidLHSInAssignment):Me(t),t=V(e,ur.createAssignmentExpression(R().value,t,Be()))),t)}function Fe(){var e,t,n,r,i,a;if(e=U(),t=Be(),n=[t],Q(",")){for(;ar<lr&&Q(",")&&(R(),!Q(")")||(a=F(),a.type!==$n.Punctuator||"=>"!==a.value));)if(t=we(),n.push(t),t.type===Yn.SpreadElement){i=!0,Q(")")||W({},Qn.ElementAfterSpreadElement);break}n.length>1&&(r=V(e,ur.createSequenceExpression(n)))}return i&&"=>"!==F().value&&W({},Qn.IllegalSpread),r||t}function Xe(){for(var e,t=[];ar<lr&&!Q("}")&&(e=an(),"undefined"!=typeof e);)t.push(e);return t}function Ue(){var e,t=U();return G("{"),e=Xe(),G("}"),V(t,ur.createBlockStatement(e))}function Je(){var e=U(),t=[];for(G("<");!Q(">");)t.push(ut()),Q(">")||G(",");return G(">"),V(e,ur.createTypeParameterDeclaration(t))}function qe(){var e=U(),t=pr.inType,n=[];for(pr.inType=!0,G("<");!Q(">");)n.push(ot()),Q(">")||G(",");return G(">"),pr.inType=t,V(e,ur.createTypeParameterInstantiation(n))}function Ve(e,t){var n,r,i;return G("["),n=pe(),G(":"),r=ot(),G("]"),G(":"),i=ot(),V(e,ur.createObjectTypeIndexer(n,r,i,t))}function ze(e){var t,n=[],r=null,i=null;for(Q("<")&&(i=Je()),G("(");cr.type===$n.Identifier;)n.push(Ze()),Q(")")||G(",");return Q("...")&&(R(),r=Ze()),G(")"),G(":"),t=ot(),V(e,ur.createFunctionTypeAnnotation(n,t,r,i))}function We(e,t,n){var r,i=!1;return r=ze(e),V(e,ur.createObjectTypeProperty(n,r,i,t))}function $e(e,t){var n=U();return V(e,ur.createObjectTypeCallProperty(ze(n),t))}function He(e){var t,n,r,i,a,o,s=[],l=[],u=!1,c=[];for(G("{");!Q("}");)t=U(),o=ir?Z("static"):ee("static"),e&&o&&(i=R(),a=!0),Q("[")?l.push(Ve(t,a)):Q("(")||Q("<")?s.push($e(t,e)):(a&&Q(":")?(n=V(t,ur.createIdentifier(i)),$(i,Qn.StrictReservedWord)):n=pe(),Q("<")||Q("(")?c.push(We(t,a,n)):(Q("?")&&(R(),u=!0),G(":"),r=ot(),c.push(V(t,ur.createObjectTypeProperty(n,r,u,a))))),Q(";")||Q(",")?R():Q("}")||H(cr);return G("}"),ur.createObjectTypeAnnotation(c,l,s)}function Ge(){var e,t=U(),n=null;for(e=lt();Q(".");)G("."),e=V(t,ur.createQualifiedTypeIdentifier(e,lt()));return Q("<")&&(n=qe()),V(t,ur.createGenericTypeAnnotation(e,n))}function Ye(){var e=U();return Y("void"),V(e,ur.createVoidTypeAnnotation())}function Ke(){var e,t=U();return Y("typeof"),e=tt(),V(t,ur.createTypeofTypeAnnotation(e))}function Qe(){var e=U(),t=[];for(G("[");ar<lr&&!Q("]")&&(t.push(ot()),!Q("]"));)G(",");return G("]"),V(e,ur.createTupleTypeAnnotation(t))}function Ze(){var e,t,n=U(),r=!1;return e=lt(),Q("?")&&(R(),r=!0),G(":"),t=ot(),V(n,ur.createFunctionTypeParam(e,t,r))}function et(){for(var e={params:[],rest:null};cr.type===$n.Identifier;)e.params.push(Ze()),Q(")")||G(",");return Q("...")&&(R(),e.rest=Ze()),e}function tt(){var e,t,n,r,i=null,a=null,o=U(),s=null,l=!1;switch(cr.type){case $n.Identifier:switch(cr.value){case"any":return R(),V(o,ur.createAnyTypeAnnotation());case"bool":case"boolean":return R(),V(o,ur.createBooleanTypeAnnotation());case"number":return R(),V(o,ur.createNumberTypeAnnotation());case"string":return R(),V(o,ur.createStringTypeAnnotation())}return V(o,Ge());case $n.Punctuator:switch(cr.value){case"{":return V(o,He());case"[":return Qe();case"<":return t=Je(),G("("),e=et(),i=e.params,s=e.rest,G(")"),G("=>"),a=ot(),V(o,ur.createFunctionTypeAnnotation(i,a,s,t));case"(":return R(),Q(")")||Q("...")||(cr.type===$n.Identifier?(n=F(),l="?"!==n.value&&":"!==n.value):l=!0),l?(r=ot(),G(")"),Q("=>")&&W({},Qn.ConfusedAboutFunctionType),r):(e=et(),i=e.params,s=e.rest,G(")"),G("=>"),a=ot(),V(o,ur.createFunctionTypeAnnotation(i,a,s,null)))}break;case $n.Keyword:switch(cr.value){case"void":return V(o,Ye());case"typeof":return V(o,Ke())}break;case $n.StringLiteral:return n=R(),n.octal&&W(n,Qn.StrictOctalLiteral),V(o,ur.createStringLiteralTypeAnnotation(n))}H(cr)}function nt(){var e=U(),t=tt();return Q("[")?(G("["),G("]"),V(e,ur.createArrayTypeAnnotation(t))):t}function rt(){var e=U();return Q("?")?(R(),V(e,ur.createNullableTypeAnnotation(rt()))):nt()}function it(){var e,t,n=U();for(e=rt(),t=[e];Q("&");)R(),t.push(rt());return 1===t.length?e:V(n,ur.createIntersectionTypeAnnotation(t))}function at(){var e,t,n=U();for(e=it(),t=[e];Q("|");)R(),t.push(it());return 1===t.length?e:V(n,ur.createUnionTypeAnnotation(t))}function ot(){var e,t=pr.inType;return pr.inType=!0,e=at(),pr.inType=t,e}function st(){var e,t=U();return G(":"),e=ot(),V(t,ur.createTypeAnnotation(e))}function lt(){var e=U(),t=R();return t.type!==$n.Identifier&&H(t),V(e,ur.createIdentifier(t.value))}function ut(e,t){var n=U(),r=lt(),i=!1;return t&&Q("?")&&(G("?"),i=!0),(e||Q(":"))&&(r.typeAnnotation=st(),r=V(n,r)),i&&(r.optional=!0,r=V(n,r)),r}function ct(e){var t,n=U(),r=null,i=U();return Q("{")?(t=me(),Me(t),Q(":")&&(t.typeAnnotation=st(),V(i,t))):Q("[")?(t=le(),Me(t),Q(":")&&(t.typeAnnotation=st(),V(i,t))):(t=pr.allowKeyword?xe():ut(),ir&&f(t.name)&&$({},Qn.StrictVarName)),"const"===e?(Q("=")||W({},Qn.NoUninitializedConst),G("="),r=Be()):Q("=")&&(R(),r=Be()),V(n,ur.createVariableDeclarator(t,r))}function pt(e){var t=[];do{if(t.push(ct(e)),!Q(","))break;R()}while(ar<lr);return t}function ft(){var e,t=U();return Y("var"),e=pt(),ae(),V(t,ur.createVariableDeclaration(e,"var"))}function dt(e){var t,n=U();return Y(e),t=pt(e),ae(),V(n,ur.createVariableDeclaration(t,e))}function ht(){var e,t=U();return cr.type!==$n.StringLiteral&&W({},Qn.InvalidModuleSpecifier),e=ur.createLiteral(R()),V(t,e)}function mt(){var e=U();return G("*"),V(e,ur.createExportBatchSpecifier())}function yt(){var e,t=null,n=U();return Z("default")?(R(),e=V(n,ur.createIdentifier("default"))):e=lt(),ee("as")&&(R(),t=xe()),V(n,ur.createExportSpecifier(e,t))}function gt(){var e,t,n,r,i=null,a=null,o=[],s=U(),l="value";if(Y("export"),Z("default")){if(R(),Z("function")||Z("class")){if(e=F(),M(e))return t=an(),V(s,ur.createExportDeclaration(!0,t,[t.id],null,l));switch(cr.value){case"class":return V(s,ur.createExportDeclaration(!0,nn(),[],null,l));case"function":return V(s,ur.createExportDeclaration(!0,$t(),[],null,l))}}return ee("from")&&W({},Qn.UnexpectedToken,cr.value),i=Q("{")?me():Q("[")?le():Be(),ae(),V(s,ur.createExportDeclaration(!0,i,[],null,l))}if(cr.type===$n.Keyword||ee("type"))switch(cr.value){case"type":if(l="type",r=F(),r.type===$n.Punctuator&&"{"===r.value){R();break}case"let":case"const":case"var":case"class":case"function":return V(s,ur.createExportDeclaration(!1,an(),o,null,l))}if(Q("*"))return o.push(mt()),ee("from")||W({},cr.value?Qn.UnexpectedToken:Qn.MissingFromClause,cr.value),R(),a=ht(),ae(),V(s,ur.createExportDeclaration(!1,null,o,a,l));if(G("{"),!Q("}"))do n=n||Z("default"),o.push(yt());while(Q(",")&&R());return G("}"),ee("from")?(R(),a=ht(),ae()):n?W({},cr.value?Qn.UnexpectedToken:Qn.MissingFromClause,cr.value):ae(),V(s,ur.createExportDeclaration(!1,i,o,a,l))}function vt(){var e,t=null,n=U();return e=xe(),ee("as")&&(R(),t=lt()),V(n,ur.createImportSpecifier(e,t))}function bt(){var e=[];if(G("{"),!Q("}"))do e.push(vt());while(Q(",")&&R());return G("}"),e}function Et(){var e,t=U();return e=xe(),V(t,ur.createImportDefaultSpecifier(e))}function St(){var e,t=U();return G("*"),ee("as")||W({},Qn.NoAsAfterImportNamespace),R(),e=xe(),V(t,ur.createImportNamespaceSpecifier(e))}function wt(){var e,t,n,r=U(),i="value";return Y("import"),ee("type")?(n=F(),(n.type===$n.Identifier&&"from"!==n.value||n.type===$n.Punctuator&&("{"===n.value||"*"===n.value))&&(i="type",R())):Z("typeof")&&(i="typeof",R()),e=[],cr.type===$n.StringLiteral?(t=ht(),ae(),V(r,ur.createImportDeclaration(e,t,i))):(!Z("default")&&M(cr)&&(e.push(Et()),Q(",")&&R()),Q("*")?e.push(St()):Q("{")&&(e=e.concat(bt())),ee("from")||W({},cr.value?Qn.UnexpectedToken:Qn.MissingFromClause,cr.value),R(),t=ht(),ae(),V(r,ur.createImportDeclaration(e,t,i)))}function xt(){var e=U();return G(";"),V(e,ur.createEmptyStatement())}function kt(){var e=U(),t=Fe();return ae(),V(e,ur.createExpressionStatement(t))}function Tt(){var e,t,n,r=U();return Y("if"),G("("),e=Fe(),G(")"),t=Xt(),Z("else")?(R(),n=Xt()):n=null,V(r,ur.createIfStatement(e,t,n))}function At(){var e,t,n,r=U();return Y("do"),n=pr.inIteration,pr.inIteration=!0,e=Xt(),pr.inIteration=n,Y("while"),G("("),t=Fe(),G(")"),Q(";")&&R(),V(r,ur.createDoWhileStatement(e,t))}function Lt(){var e,t,n,r=U();return Y("while"),G("("),e=Fe(),G(")"),n=pr.inIteration,pr.inIteration=!0,t=Xt(),pr.inIteration=n,V(r,ur.createWhileStatement(e,t))}function Ct(){var e=U(),t=R(),n=pt();return V(e,ur.createVariableDeclaration(n,t.value))}function Pt(e){var t,n,r,i,a,o,s,l,u=U();return t=n=r=null,Y("for"),ee("each")&&W({},Qn.EachNotAllowed),G("("),Q(";")?R():(Z("var")||Z("let")||Z("const")?(pr.allowIn=!1,t=Ct(),pr.allowIn=!0,1===t.declarations.length&&(Z("in")||ee("of"))&&(s=cr,("in"!==s.value&&"var"===t.kind||!t.declarations[0].init)&&(R(),i=t,a=Fe(),t=null))):(pr.allowIn=!1,t=Fe(),pr.allowIn=!0,ee("of")?(s=R(),i=t,a=Fe(),t=null):Z("in")&&(se(t)||W({},Qn.InvalidLHSInForIn),s=R(),i=t,a=Fe(),t=null)),"undefined"==typeof i&&G(";")),"undefined"==typeof i&&(Q(";")||(n=Fe()),G(";"),Q(")")||(r=Fe())),G(")"),l=pr.inIteration,pr.inIteration=!0,void 0!==e&&e.ignoreBody||(o=Xt()),pr.inIteration=l,"undefined"==typeof i?V(u,ur.createForStatement(t,n,r,o)):"in"===s.value?V(u,ur.createForInStatement(i,a,o)):V(u,ur.createForOfStatement(i,a,o))}function _t(){var e=null,t=U();return Y("continue"),59===rr.charCodeAt(ar)?(R(),pr.inIteration||W({},Qn.IllegalContinue),V(t,ur.createContinueStatement(null))):z()?(pr.inIteration||W({},Qn.IllegalContinue),V(t,ur.createContinueStatement(null))):(cr.type===$n.Identifier&&(e=lt(),pr.labelSet.has(e.name)||W({},Qn.UnknownLabel,e.name)),ae(),null!==e||pr.inIteration||W({},Qn.IllegalContinue),V(t,ur.createContinueStatement(e)))}function It(){var e=null,t=U();return Y("break"),59===rr.charCodeAt(ar)?(R(),pr.inIteration||pr.inSwitch||W({},Qn.IllegalBreak),V(t,ur.createBreakStatement(null))):z()?(pr.inIteration||pr.inSwitch||W({},Qn.IllegalBreak),V(t,ur.createBreakStatement(null))):(cr.type===$n.Identifier&&(e=lt(),pr.labelSet.has(e.name)||W({},Qn.UnknownLabel,e.name)),ae(),null!==e||pr.inIteration||pr.inSwitch||W({},Qn.IllegalBreak),V(t,ur.createBreakStatement(e)))}function jt(){var e=null,t=U();return Y("return"),pr.inFunctionBody||$({},Qn.IllegalReturn),32===rr.charCodeAt(ar)&&l(rr.charCodeAt(ar+1))?(e=Fe(),ae(),V(t,ur.createReturnStatement(e))):z()?V(t,ur.createReturnStatement(null)):(Q(";")||Q("}")||cr.type===$n.EOF||(e=Fe()),ae(),V(t,ur.createReturnStatement(e)))}function Ot(){var e,t,n=U();return ir&&$({},Qn.StrictModeWith),Y("with"),G("("),e=Fe(),G(")"),t=Xt(),V(n,ur.createWithStatement(e,t))}function Mt(){var e,t,n=[],r=U();for(Z("default")?(R(),e=null):(Y("case"),e=Fe()),G(":");ar<lr&&!(Q("}")||Z("default")||Z("case"))&&(t=an(),"undefined"!=typeof t);)n.push(t);return V(r,ur.createSwitchCase(e,n))}function Nt(){var e,t,n,r,i,a=U();if(Y("switch"),G("("),e=Fe(),G(")"),G("{"),t=[],Q("}"))return R(),V(a,ur.createSwitchStatement(e,t));for(r=pr.inSwitch,pr.inSwitch=!0,i=!1;ar<lr&&!Q("}");)n=Mt(),null===n.test&&(i&&W({},Qn.MultipleDefaultsInSwitch),i=!0),t.push(n);return pr.inSwitch=r,G("}"),V(a,ur.createSwitchStatement(e,t))}function Dt(){var e,t=U();return Y("throw"),z()&&W({},Qn.NewlineAfterThrow),e=Fe(),ae(),V(t,ur.createThrowStatement(e))}function Rt(){var e,t,n=U();return Y("catch"),G("("),Q(")")&&H(cr),e=Fe(),ir&&e.type===Yn.Identifier&&f(e.name)&&$({},Qn.StrictCatchVariable),G(")"),t=Ue(),V(n,ur.createCatchClause(e,t))}function Bt(){var e,t=[],n=null,r=U();return Y("try"),e=Ue(),Z("catch")&&t.push(Rt()),Z("finally")&&(R(),n=Ue()),0!==t.length||n||W({},Qn.NoCatchOrFinally),V(r,ur.createTryStatement(e,[],t,n))}function Ft(){var e=U();return Y("debugger"),ae(),V(e,ur.createDebuggerStatement())}function Xt(){var e,t,n,r=cr.type;if(r===$n.EOF&&H(cr),r===$n.Punctuator)switch(cr.value){case";":return xt();case"{":return Ue();case"(":return kt()}if(r===$n.Keyword)switch(cr.value){case"break":return It();case"continue":return _t();case"debugger":return Ft();case"do":return At();case"for":return Pt();case"function":return Wt();case"class":return rn();case"if":return Tt();case"return":return jt();case"switch":return Nt();case"throw":return Dt();case"try":return Bt();case"var":return ft();case"while":return Lt();case"with":return Ot()}return be()?Wt():(e=U(),t=Fe(),t.type===Yn.Identifier&&Q(":")?(R(),pr.labelSet.has(t.name)&&W({},Qn.Redeclaration,"Label",t.name),pr.labelSet.set(t.name,!0),n=Xt(),pr.labelSet.delete(t.name),V(e,ur.createLabeledStatement(t,n))):(ae(),V(e,ur.createExpressionStatement(t))))}function Ut(){return Q("{")?Jt():Be()}function Jt(){var e,t,r,i,a,o,s,l,u,c=[],p=U();for(G("{");ar<lr&&cr.type===$n.StringLiteral&&(t=cr,e=an(),c.push(e),e.expression.type===Yn.Literal);)r=rr.slice(t.range[0]+1,t.range[1]-1),"use strict"===r?(ir=!0,i&&$(i,Qn.StrictOctalLiteral)):!i&&t.octal&&(i=t);for(a=pr.labelSet,o=pr.inIteration,s=pr.inSwitch,l=pr.inFunctionBody,u=pr.parenthesizedCount,pr.labelSet=new n,pr.inIteration=!1,pr.inSwitch=!1,pr.inFunctionBody=!0,pr.parenthesizedCount=0;ar<lr&&!Q("}")&&(e=an(),"undefined"!=typeof e);)c.push(e);return G("}"),pr.labelSet=a,pr.inIteration=o,pr.inSwitch=s,pr.inFunctionBody=l,pr.parenthesizedCount=u,V(p,ur.createBlockStatement(c))}function qt(e,t,n){ir?(f(n)&&(e.stricted=t,e.message=Qn.StrictParamName),e.paramSet.has(n)&&(e.stricted=t,e.message=Qn.StrictParamDupe)):e.firstRestricted||(f(n)?(e.firstRestricted=t,e.message=Qn.StrictParamName):p(n)?(e.firstRestricted=t,e.message=Qn.StrictReservedWord):e.paramSet.has(n)&&(e.firstRestricted=t,e.message=Qn.StrictParamDupe)),e.paramSet.set(n,!0)}function Vt(e){var t,n,r,i,a;return n=cr,"..."===n.value&&(n=R(),r=!0),Q("[")?(t=U(),i=le(),Ne(e,i),Q(":")&&(i.typeAnnotation=st(),V(t,i))):Q("{")?(t=U(),r&&W({},Qn.ObjectPatternAsRestParameter),i=me(),Ne(e,i),Q(":")&&(i.typeAnnotation=st(),V(t,i))):(i=r?ut(!1,!1):ut(!1,!0),qt(e,n,n.value)),Q("=")&&(r&&$(cr,Qn.DefaultRestParameter),R(),a=Be(),++e.defaultCount),r?(Q(")")||W({},Qn.ParameterAfterRestParameter),e.rest=i,!1):(e.params.push(i),e.defaults.push(a),!Q(")"))}function zt(e){var t,r=U();if(t={params:[],defaultCount:0,defaults:[],rest:null,firstRestricted:e},G("("),!Q(")"))for(t.paramSet=new n;ar<lr&&Vt(t)&&(G(","),t.rest||!Q(")")););return G(")"),0===t.defaultCount&&(t.defaults=[]),Q(":")&&(t.returnType=st()),V(r,t)}function Wt(){var e,t,n,r,i,a,o,s,l,u,c,d,h=U();return s=!1,re()&&(R(),s=!0),Y("function"),o=!1,Q("*")&&(R(),o=!0),n=cr,e=lt(),Q("<")&&(d=Je()),ir?f(n.value)&&$(n,Qn.StrictFunctionName):f(n.value)?(i=n,a=Qn.StrictFunctionName):p(n.value)&&(i=n,a=Qn.StrictReservedWord),r=zt(i),i=r.firstRestricted,r.message&&(a=r.message),l=ir,u=pr.yieldAllowed,pr.yieldAllowed=o,c=pr.awaitAllowed,pr.awaitAllowed=s,t=Jt(),ir&&i&&W(i,a),ir&&r.stricted&&$(r.stricted,a),ir=l,pr.yieldAllowed=u,pr.awaitAllowed=c,V(h,ur.createFunctionDeclaration(e,r.params,r.defaults,t,r.rest,o,!1,s,r.returnType,d))}function $t(){var e,t,n,r,i,a,o,s,l,u,c,d=null,h=U();return o=!1,re()&&(R(),o=!0),Y("function"),a=!1,Q("*")&&(R(),a=!0),Q("(")||(Q("<")||(e=cr,
+d=lt(),ir?f(e.value)&&$(e,Qn.StrictFunctionName):f(e.value)?(t=e,n=Qn.StrictFunctionName):p(e.value)&&(t=e,n=Qn.StrictReservedWord)),Q("<")&&(c=Je())),r=zt(t),t=r.firstRestricted,r.message&&(n=r.message),s=ir,l=pr.yieldAllowed,pr.yieldAllowed=a,u=pr.awaitAllowed,pr.awaitAllowed=o,i=Jt(),ir&&t&&W(t,n),ir&&r.stricted&&$(r.stricted,n),ir=s,pr.yieldAllowed=l,pr.awaitAllowed=u,V(h,ur.createFunctionExpression(d,r.params,r.defaults,i,r.rest,a,!1,o,r.returnType,c))}function Ht(){var e,t,n=U();return Y("yield",!ir),e=!1,Q("*")&&(R(),e=!0),t=Be(),V(n,ur.createYieldExpression(t,e))}function Gt(){var e,t=U();return K("await"),e=Be(),V(t,ur.createAwaitExpression(e))}function Yt(e){return"get"===e.kind||"set"===e.kind||e.value.generator}function Kt(e,t,n,r){var i,a,o,s,l,u,c;return o=t?nr.static:nr.prototype,n?ur.createMethodDefinition(o,"",e,ce({generator:!0}),r):(u="Identifier"===e.type&&e.name,"get"!==u||Q("(")?"set"!==u||Q("(")?(Q("<")&&(l=Je()),s="async"===u&&!Q("("),s&&(e=pe()),ur.createMethodDefinition(o,"",e,ce({generator:!1,async:s,typeParameters:l}),r)):(e=pe(),G("("),i=cr,a=[ut()],G(")"),Q(":")&&(c=st()),ur.createMethodDefinition(o,"set",e,ue({params:a,generator:!1,name:i,returnType:c}),r)):(e=pe(),G("("),G(")"),Q(":")&&(c=st()),ur.createMethodDefinition(o,"get",e,ue({generator:!1,returnType:c}),r)))}function Qt(e,t,n){var r;return r=st(),G(";"),ur.createClassProperty(e,r,t,n)}function Zt(){var e,t,n=!1,r=!1,i=U(),a=!1;return Q(";")?void R():("static"===cr.value&&(R(),a=!0),Q("*")&&(R(),r=!0),t=cr,(ee("get")||ee("set"))&&(t=F()),t.type===$n.Punctuator&&"["===t.value&&(n=!0),e=pe(),r||":"!==cr.value?V(i,Kt(e,a,r,n)):V(i,Qt(e,n,a)))}function en(){var e,t,r,i=[],a={},o=U();for(a[nr.static]=new n,a[nr.prototype]=new n,G("{");ar<lr&&!Q("}");)e=Zt(a),"undefined"!=typeof e&&(i.push(e),t=!e.computed&&he(e.key),t!==!1&&(r=e.static?nr.static:nr.prototype,e.type===Yn.MethodDefinition&&("constructor"!==t||e.static||(Yt(e)&&W(e,Qn.IllegalClassConstructorProperty),a[nr.prototype].has("constructor")&&W(e.key,Qn.IllegalDuplicateClassProperty)),a[r].set(t,!0))));return G("}"),V(o,ur.createClassBody(i))}function tn(){var e,t,n,r=[];for(ir?Y("implements"):K("implements");ar<lr&&(t=U(),e=lt(),n=Q("<")?qe():null,r.push(V(t,ur.createClassImplements(e,n))),Q(","));)G(",");return r}function nn(){var e,t,n,r,i,a,o=null,s=U();return Y("class"),a=ir?Z("implements"):ee("implements"),Z("extends")||a||Q("{")||(e=lt()),Q("<")&&(i=Je()),Z("extends")&&(Y("extends"),n=pr.yieldAllowed,pr.yieldAllowed=!1,o=Le(),Q("<")&&(r=qe()),pr.yieldAllowed=n),(ir?Z("implements"):ee("implements"))&&(t=tn()),V(s,ur.createClassExpression(e,o,en(),i,r,t))}function rn(){var e,t,n,r,i,a=null,o=U();return Y("class"),e=lt(),Q("<")&&(i=Je()),Z("extends")&&(Y("extends"),n=pr.yieldAllowed,pr.yieldAllowed=!1,a=Le(),Q("<")&&(r=qe()),pr.yieldAllowed=n),(ir?Z("implements"):ee("implements"))&&(t=tn()),V(o,ur.createClassDeclaration(e,a,en(),i,r,t))}function an(){var e;if(cr.type===$n.Keyword)switch(cr.value){case"const":case"let":return dt(cr.value);case"function":return Wt();case"export":return $({},Qn.IllegalExportDeclaration),gt();case"import":return $({},Qn.IllegalImportDeclaration),wt();case"interface":return F().type===$n.Identifier?Mn():Xt();default:return Xt()}if(ee("type")&&F().type===$n.Identifier)return In();if(ee("interface")&&F().type===$n.Identifier)return Mn();if(ee("declare"))if(e=F(),e.type===$n.Keyword)switch(e.value){case"class":return Nn();case"function":return Dn();case"var":return Rn()}else if(e.type===$n.Identifier&&"module"===e.value)return Bn();return cr.type!==$n.EOF?Xt():void 0}function on(){var e="module"===fr.sourceType||"nonStrictModule"===fr.sourceType;if(e&&cr.type===$n.Keyword)switch(cr.value){case"export":return gt();case"import":return wt()}return an()}function sn(){for(var e,t,n,r,i=[];ar<lr&&(t=cr,t.type===$n.StringLiteral)&&(e=on(),i.push(e),e.expression.type===Yn.Literal);)n=rr.slice(t.range[0]+1,t.range[1]-1),"use strict"===n?(ir=!0,r&&$(r,Qn.StrictOctalLiteral)):!r&&t.octal&&(r=t);for(;ar<lr&&(e=on(),"undefined"!=typeof e);)i.push(e);return i}function ln(){var e,t=U();return ir="module"===fr.sourceType,B(),e=sn(),V(t,ur.createProgram(e))}function un(e){return e.type===Yn.JSXIdentifier?e.name:e.type===Yn.JSXNamespacedName?e.namespace.name+":"+e.name.name:e.type===Yn.JSXMemberExpression?un(e.object)+"."+un(e.property):void H(e)}function cn(e){return 92!==e&&l(e)}function pn(e){return 92!==e&&(45===e||u(e))}function fn(){var e,t,n="";for(t=ar;ar<lr&&(e=rr.charCodeAt(ar),pn(e));)n+=rr[ar++];return{type:$n.JSXIdentifier,value:n,lineNumber:or,lineStart:sr,range:[t,ar]}}function dn(){var e,n,r="",i=ar,a=0;for(e=rr[ar],t("&"===e,"Entity must start with an ampersand"),ar++;ar<lr&&a++<10&&(e=rr[ar++],";"!==e);)r+=e;if(";"===e)if("#"===r[0]){if(n="x"===r[1]?+("0"+r.substr(1)):+r.substr(1).replace(Zn.LeadingZeros,""),!isNaN(n))return String.fromCharCode(n)}else if(tr[r])return tr[r];return ar=i+1,"&"}function hn(e){var t,n,r="";for(n=ar;ar<lr&&(t=rr[ar],e.indexOf(t)===-1);)"&"===t?r+=dn():(ar++,"\r"===t&&"\n"===rr[ar]&&(r+=t,t=rr[ar],ar++),s(t.charCodeAt(0))&&(++or,sr=ar),r+=t);return{type:$n.JSXText,value:r,lineNumber:or,lineStart:sr,range:[n,ar]}}function mn(){var e,n,r;return n=rr[ar],t("'"===n||'"'===n,"String literal must starts with a quote"),r=ar,++ar,e=hn([n]),n!==rr[ar]&&W({},Qn.UnexpectedToken,"ILLEGAL"),++ar,e.range=[r,ar],e}function yn(){var e=rr.charCodeAt(ar);return 60!==e&&62!==e&&123!==e&&125!==e?hn(["<",">","{","}"]):x()}function gn(){var e,t=U();return cr.type!==$n.JSXIdentifier&&H(cr),e=R(),V(t,ur.createJSXIdentifier(e.value))}function vn(){var e,t,n=U();return e=gn(),G(":"),t=gn(),V(n,ur.createJSXNamespacedName(e,t))}function bn(){for(var e=U(),t=gn();Q(".");)R(),t=V(e,ur.createJSXMemberExpression(t,gn()));return t}function En(){return":"===F().value?vn():"."===F().value?bn():gn()}function Sn(){return":"===F().value?vn():gn()}function wn(){var e,t;return Q("{")?(e=kn(),e.expression.type===Yn.JSXEmptyExpression&&W(e,"JSX attributes must only be assigned a non-empty expression")):Q("<")?e=_n():cr.type===$n.JSXText?(t=U(),e=V(t,ur.createLiteral(R()))):W({},Qn.InvalidJSXAttributeValue),e}function xn(){for(var e,t=J();ar<lr&&(e=rr.charCodeAt(ar),125!==e);)s(e)&&(13===e&&10===rr.charCodeAt(ar+1)&&++ar,++or,sr=ar),++ar;return V(t,ur.createJSXEmptyExpression())}function kn(){var e,t,n,r=U();return t=pr.inJSXChild,n=pr.inJSXTag,pr.inJSXChild=!1,pr.inJSXTag=!1,G("{"),e=Q("}")?xn():Fe(),pr.inJSXChild=t,pr.inJSXTag=n,G("}"),V(r,ur.createJSXExpressionContainer(e))}function Tn(){var e,t,n,r=U();return t=pr.inJSXChild,n=pr.inJSXTag,pr.inJSXChild=!1,pr.inJSXTag=!1,G("{"),G("..."),e=Be(),pr.inJSXChild=t,pr.inJSXTag=n,G("}"),V(r,ur.createJSXSpreadAttribute(e))}function An(){var e,t;return Q("{")?Tn():(t=U(),e=Sn(),Q("=")?(R(),V(t,ur.createJSXAttribute(e,wn()))):V(t,ur.createJSXAttribute(e)))}function Ln(){var e,t;return Q("{")?e=kn():cr.type===$n.JSXText?(t=J(),e=V(t,ur.createLiteral(R()))):Q("<")?e=_n():H(cr),e}function Cn(){var e,t,n,r=U();return t=pr.inJSXChild,n=pr.inJSXTag,pr.inJSXChild=!1,pr.inJSXTag=!0,G("<"),G("/"),e=En(),pr.inJSXChild=t,pr.inJSXTag=n,G(">"),V(r,ur.createJSXClosingElement(e))}function Pn(){var e,t,n,r=[],i=!1,a=U();for(t=pr.inJSXChild,n=pr.inJSXTag,pr.inJSXChild=!1,pr.inJSXTag=!0,G("<"),e=En();ar<lr&&"/"!==cr.value&&">"!==cr.value;)r.push(An());return pr.inJSXTag=n,"/"===cr.value?(G("/"),pr.inJSXChild=t,G(">"),i=!0):(pr.inJSXChild=!0,G(">")),V(a,ur.createJSXOpeningElement(e,r,i))}function _n(){var e,t,n,r=null,i=[],a=U();if(t=pr.inJSXChild,n=pr.inJSXTag,e=Pn(),!e.selfClosing){for(;ar<lr&&(pr.inJSXChild=!1,"<"!==cr.value||"/"!==F().value);)pr.inJSXChild=!0,i.push(Ln());pr.inJSXChild=t,pr.inJSXTag=n,r=Cn(),un(r.name)!==un(e.name)&&W({},Qn.ExpectedJSXClosingTag,un(e.name))}return!t&&Q("<")&&W(cr,Qn.AdjacentJSXElements),V(a,ur.createJSXElement(e,r,i))}function In(){var e,t,n=U(),r=null;return K("type"),e=lt(),Q("<")&&(r=Je()),G("="),t=ot(),ae(),V(n,ur.createTypeAlias(e,r,t))}function jn(){var e,t=U(),n=null;return e=lt(),Q("<")&&(n=qe()),V(t,ur.createInterfaceExtends(e,n))}function On(e,t){var n,r,i,a=[],o=null;if(i=lt(),Q("<")&&(o=Je()),Z("extends"))for(Y("extends");ar<lr&&(a.push(jn()),Q(","));)G(",");return r=U(),n=V(r,He(t)),V(e,ur.createInterface(i,o,n,a))}function Mn(){var e=U();return ir?Y("interface"):K("interface"),On(e,!1)}function Nn(){var e,t=U();return K("declare"),Y("class"),e=On(t,!0),e.type=Yn.DeclareClass,e}function Dn(){var e,t,n,r,i,a,o,s,l=U(),u=null;return K("declare"),Y("function"),t=U(),e=lt(),s=U(),Q("<")&&(u=Je()),G("("),a=et(),n=a.params,i=a.rest,G(")"),G(":"),r=ot(),o=V(s,ur.createFunctionTypeAnnotation(n,r,i,u)),e.typeAnnotation=V(s,ur.createTypeAnnotation(o)),V(t,e),ae(),V(l,ur.createDeclareFunction(e))}function Rn(){var e,t=U();return K("declare"),Y("var"),e=ut(),ae(),V(t,ur.createDeclareVariable(e))}function Bn(){var e,t,n,r,i=[],a=U();for(K("declare"),K("module"),cr.type===$n.StringLiteral?(ir&&cr.octal&&$(cr,Qn.StrictOctalLiteral),n=U(),t=V(n,ur.createLiteral(R()))):t=lt(),e=U(),G("{");ar<lr&&!Q("}");)switch(r=F(),r.value){case"class":i.push(Nn());break;case"function":i.push(Dn());break;case"var":i.push(Rn());break;default:H(cr)}return G("}"),V(a,ur.createDeclareModule(t,V(e,ur.createBlockStatement(i))))}function Fn(){var e,t,n,r,i;return pr.inJSXChild||g(),e={start:{line:or,column:ar-sr}},t=fr.advance(),e.end={line:or,column:ar-sr},t.type!==$n.EOF&&(n=[t.range[0],t.range[1]],r=rr.slice(t.range[0],t.range[1]),i={type:Hn[t.type],value:r,range:n,loc:e},t.regex&&(i.regex={pattern:t.regex.pattern,flags:t.regex.flags}),fr.tokens.push(i)),t}function Xn(){var e,t,n,r;return g(),e=ar,t={start:{line:or,column:ar-sr}},n=fr.scanRegExp(),t.end={line:or,column:ar-sr},fr.tokenize||(fr.tokens.length>0&&(r=fr.tokens[fr.tokens.length-1],r.range[0]===e&&"Punctuator"===r.type&&("/"!==r.value&&"/="!==r.value||fr.tokens.pop())),fr.tokens.push({type:"RegularExpression",value:n.literal,regex:n.regex,range:[e,ar],loc:t})),n}function Un(){var e,t,n,r=[];for(e=0;e<fr.tokens.length;++e)t=fr.tokens[e],n={type:t.type,value:t.value},t.regex&&(n.regex={pattern:t.regex.pattern,flags:t.regex.flags}),fr.range&&(n.range=t.range),fr.loc&&(n.loc=t.loc),r.push(n);fr.tokens=r}function Jn(){"undefined"!=typeof fr.tokens&&(fr.advance=D,fr.scanRegExp=O,D=Fn,O=Xn)}function qn(){"function"==typeof fr.scanRegExp&&(D=fr.advance,O=fr.scanRegExp)}function Vn(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r}function zn(e,t){var r,i,a;r=String,"string"==typeof e||e instanceof String||(e=r(e)),ur=er,rr=e,ar=0,or=rr.length>0?1:0,sr=0,lr=rr.length,cr=null,pr={allowKeyword:!0,allowIn:!0,labelSet:new n,inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1,curlyStack:[],curlyLastIndex:0},fr={},t=t||{},t.tokens=!0,fr.tokens=[],fr.tokenize=!0,fr.openParenToken=-1,fr.openCurlyToken=-1,fr.range="boolean"==typeof t.range&&t.range,fr.loc="boolean"==typeof t.loc&&t.loc,"boolean"==typeof t.comment&&t.comment&&(fr.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(fr.errors=[]),Jn();try{if(B(),cr.type===$n.EOF)return fr.tokens;for(i=R();cr.type!==$n.EOF;)try{i=R()}catch(e){if(i=cr,fr.errors){fr.errors.push(e);break}throw e}Un(),a=fr.tokens,"undefined"!=typeof fr.comments&&(a.comments=fr.comments),"undefined"!=typeof fr.errors&&(a.errors=fr.errors)}catch(e){throw e}finally{qn(),fr={}}return a}function Wn(e,t){var r,i;i=String,"string"==typeof e||e instanceof String||(e=i(e)),ur=er,rr=e,ar=0,or=rr.length>0?1:0,sr=0,lr=rr.length,cr=null,pr={allowKeyword:!1,allowIn:!0,labelSet:new n,parenthesizedCount:0,inFunctionBody:!1,inIteration:!1,inSwitch:!1,inJSXChild:!1,inJSXTag:!1,inType:!1,lastCommentStart:-1,yieldAllowed:!1,awaitAllowed:!1,curlyPosition:0,curlyStack:[],curlyLastIndex:0},fr={},"undefined"!=typeof t&&(fr.range="boolean"==typeof t.range&&t.range,fr.loc="boolean"==typeof t.loc&&t.loc,fr.attachComment="boolean"==typeof t.attachComment&&t.attachComment,fr.loc&&null!==t.source&&void 0!==t.source&&(ur=Vn(ur,{postProcess:function(e){return e.loc.source=i(t.source),e}})),fr.sourceType=t.sourceType,"boolean"==typeof t.tokens&&t.tokens&&(fr.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(fr.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(fr.errors=[]),fr.attachComment&&(fr.range=!0,fr.comments=[],fr.bottomRightStack=[],fr.trailingComments=[],fr.leadingComments=[])),Jn();try{r=ln(),"undefined"!=typeof fr.comments&&(r.comments=fr.comments),"undefined"!=typeof fr.tokens&&(Un(),r.tokens=fr.tokens),"undefined"!=typeof fr.errors&&(r.errors=fr.errors)}catch(e){throw e}finally{qn(),fr={}}return r}var $n,Hn,Gn,Yn,Kn,Qn,Zn,er,tr,nr,rr,ir,ar,or,sr,lr,ur,cr,pr,fr;$n={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9,Template:10,JSXIdentifier:11,JSXText:12},Hn={},Hn[$n.BooleanLiteral]="Boolean",Hn[$n.EOF]="<end>",Hn[$n.Identifier]="Identifier",Hn[$n.Keyword]="Keyword",Hn[$n.NullLiteral]="Null",Hn[$n.NumericLiteral]="Numeric",Hn[$n.Punctuator]="Punctuator",Hn[$n.StringLiteral]="String",Hn[$n.JSXIdentifier]="JSXIdentifier",Hn[$n.JSXText]="JSXText",Hn[$n.RegularExpression]="RegularExpression",Hn[$n.Template]="Template",Gn=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],Yn={AnyTypeAnnotation:"AnyTypeAnnotation",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrayTypeAnnotation:"ArrayTypeAnnotation",ArrowFunctionExpression:"ArrowFunctionExpression",AssignmentExpression:"AssignmentExpression",BinaryExpression:"BinaryExpression",BlockStatement:"BlockStatement",BooleanTypeAnnotation:"BooleanTypeAnnotation",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ClassImplements:"ClassImplements",ClassProperty:"ClassProperty",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DeclareClass:"DeclareClass",DeclareFunction:"DeclareFunction",DeclareModule:"DeclareModule",DeclareVariable:"DeclareVariable",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportDeclaration:"ExportDeclaration",ExportBatchSpecifier:"ExportBatchSpecifier",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",ForStatement:"ForStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",FunctionTypeAnnotation:"FunctionTypeAnnotation",FunctionTypeParam:"FunctionTypeParam",GenericTypeAnnotation:"GenericTypeAnnotation",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",InterfaceDeclaration:"InterfaceDeclaration",InterfaceExtends:"InterfaceExtends",IntersectionTypeAnnotation:"IntersectionTypeAnnotation",LabeledStatement:"LabeledStatement",Literal:"Literal",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",NullableTypeAnnotation:"NullableTypeAnnotation",NumberTypeAnnotation:"NumberTypeAnnotation",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",ObjectTypeAnnotation:"ObjectTypeAnnotation",ObjectTypeCallProperty:"ObjectTypeCallProperty",ObjectTypeIndexer:"ObjectTypeIndexer",ObjectTypeProperty:"ObjectTypeProperty",Program:"Program",Property:"Property",QualifiedTypeIdentifier:"QualifiedTypeIdentifier",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",SpreadProperty:"SpreadProperty",StringLiteralTypeAnnotation:"StringLiteralTypeAnnotation",StringTypeAnnotation:"StringTypeAnnotation",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TupleTypeAnnotation:"TupleTypeAnnotation",TryStatement:"TryStatement",TypeAlias:"TypeAlias",TypeAnnotation:"TypeAnnotation",TypeCastExpression:"TypeCastExpression",TypeofTypeAnnotation:"TypeofTypeAnnotation",TypeParameterDeclaration:"TypeParameterDeclaration",TypeParameterInstantiation:"TypeParameterInstantiation",UnaryExpression:"UnaryExpression",UnionTypeAnnotation:"UnionTypeAnnotation",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",VoidTypeAnnotation:"VoidTypeAnnotation",WhileStatement:"WhileStatement",WithStatement:"WithStatement",JSXIdentifier:"JSXIdentifier",JSXNamespacedName:"JSXNamespacedName",JSXMemberExpression:"JSXMemberExpression",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXElement:"JSXElement",JSXClosingElement:"JSXClosingElement",JSXOpeningElement:"JSXOpeningElement",JSXAttribute:"JSXAttribute",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText",YieldExpression:"YieldExpression",AwaitExpression:"AwaitExpression"},Kn={Data:1,Get:2,Set:4},nr={static:"static",prototype:"prototype"},Qn={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInFormalsList:"Invalid left-hand side in formals list",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalDuplicateClassProperty:"Illegal duplicate property in class definition",IllegalClassConstructorProperty:"Illegal constructor property in class definition",IllegalReturn:"Illegal return statement",IllegalSpread:"Illegal spread element",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",ParameterAfterRestParameter:"Rest parameter must be final parameter of an argument list",DefaultRestParameter:"Rest parameter can not have a default value",ElementAfterSpreadElement:"Spread must be the final element of an element list",PropertyAfterSpreadProperty:"A rest property must be the final property of an object literal",ObjectPatternAsRestParameter:"Invalid rest parameter",ObjectPatternAsSpread:"Invalid spread argument",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",MissingFromClause:"Missing from clause",NoAsAfterImportNamespace:"Missing as after import *",InvalidModuleSpecifier:"Invalid module specifier",IllegalImportDeclaration:"Illegal import declaration",IllegalExportDeclaration:"Illegal export declaration",NoUninitializedConst:"Const must be initialized",ComprehensionRequiresBlock:"Comprehension must have at least one block",ComprehensionError:"Comprehension Error",EachNotAllowed:"Each is not supported",InvalidJSXAttributeValue:"JSX value should be either an expression or a quoted JSX text",ExpectedJSXClosingTag:"Expected corresponding JSX closing tag for %0",AdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag",ConfusedAboutFunctionType:"Unexpected token =>. It looks like you are trying to write a function type, but you ended up writing a grouped type followed by an =>, which is a syntax error. Remember, function type parameters are named so function types look like (name1: type1, name2: type2) => returnType. You probably wrote (type1) => returnType"},Zn={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),LeadingZeros:new RegExp("^0+(?!$)")},n.prototype.get=function(e){return e="$"+e,this.$data[e]},n.prototype.set=function(e,t){return e="$"+e,this.$data[e]=t,this},n.prototype.has=function(e){return e="$"+e,Object.prototype.hasOwnProperty.call(this.$data,e)},n.prototype.delete=function(e){return e="$"+e,delete this.$data[e]},er={name:"SyntaxTree",postProcess:function(e){return e},createArrayExpression:function(e){return{type:Yn.ArrayExpression,elements:e}},createAssignmentExpression:function(e,t,n){return{type:Yn.AssignmentExpression,operator:e,left:t,right:n}},createBinaryExpression:function(e,t,n){var r="||"===e||"&&"===e?Yn.LogicalExpression:Yn.BinaryExpression;return{type:r,operator:e,left:t,right:n}},createBlockStatement:function(e){return{type:Yn.BlockStatement,body:e}},createBreakStatement:function(e){return{type:Yn.BreakStatement,label:e}},createCallExpression:function(e,t){return{type:Yn.CallExpression,callee:e,arguments:t}},createCatchClause:function(e,t){return{type:Yn.CatchClause,param:e,body:t}},createConditionalExpression:function(e,t,n){return{type:Yn.ConditionalExpression,test:e,consequent:t,alternate:n}},createContinueStatement:function(e){return{type:Yn.ContinueStatement,label:e}},createDebuggerStatement:function(){return{type:Yn.DebuggerStatement}},createDoWhileStatement:function(e,t){return{type:Yn.DoWhileStatement,body:e,test:t}},createEmptyStatement:function(){return{type:Yn.EmptyStatement}},createExpressionStatement:function(e){return{type:Yn.ExpressionStatement,expression:e}},createForStatement:function(e,t,n,r){return{type:Yn.ForStatement,init:e,test:t,update:n,body:r}},createForInStatement:function(e,t,n){return{type:Yn.ForInStatement,left:e,right:t,body:n,each:!1}},createForOfStatement:function(e,t,n){return{type:Yn.ForOfStatement,left:e,right:t,body:n}},createFunctionDeclaration:function(e,t,n,r,i,a,o,s,l,u){var c={type:Yn.FunctionDeclaration,id:e,params:t,defaults:n,body:r,rest:i,generator:a,expression:o,returnType:l,typeParameters:u};return s&&(c.async=!0),c},createFunctionExpression:function(e,t,n,r,i,a,o,s,l,u){var c={type:Yn.FunctionExpression,id:e,params:t,defaults:n,body:r,rest:i,generator:a,expression:o,returnType:l,typeParameters:u};return s&&(c.async=!0),c},createIdentifier:function(e){return{type:Yn.Identifier,name:e,typeAnnotation:void 0,optional:void 0}},createTypeAnnotation:function(e){return{type:Yn.TypeAnnotation,typeAnnotation:e}},createTypeCast:function(e,t){return{type:Yn.TypeCastExpression,expression:e,typeAnnotation:t}},createFunctionTypeAnnotation:function(e,t,n,r){return{type:Yn.FunctionTypeAnnotation,params:e,returnType:t,rest:n,typeParameters:r}},createFunctionTypeParam:function(e,t,n){return{type:Yn.FunctionTypeParam,name:e,typeAnnotation:t,optional:n}},createNullableTypeAnnotation:function(e){return{type:Yn.NullableTypeAnnotation,typeAnnotation:e}},createArrayTypeAnnotation:function(e){return{type:Yn.ArrayTypeAnnotation,elementType:e}},createGenericTypeAnnotation:function(e,t){return{type:Yn.GenericTypeAnnotation,id:e,typeParameters:t}},createQualifiedTypeIdentifier:function(e,t){return{type:Yn.QualifiedTypeIdentifier,qualification:e,id:t}},createTypeParameterDeclaration:function(e){return{type:Yn.TypeParameterDeclaration,params:e}},createTypeParameterInstantiation:function(e){return{type:Yn.TypeParameterInstantiation,params:e}},createAnyTypeAnnotation:function(){return{type:Yn.AnyTypeAnnotation}},createBooleanTypeAnnotation:function(){return{type:Yn.BooleanTypeAnnotation}},createNumberTypeAnnotation:function(){return{type:Yn.NumberTypeAnnotation}},createStringTypeAnnotation:function(){return{type:Yn.StringTypeAnnotation}},createStringLiteralTypeAnnotation:function(e){return{type:Yn.StringLiteralTypeAnnotation,value:e.value,raw:rr.slice(e.range[0],e.range[1])}},createVoidTypeAnnotation:function(){return{type:Yn.VoidTypeAnnotation}},createTypeofTypeAnnotation:function(e){return{type:Yn.TypeofTypeAnnotation,argument:e}},createTupleTypeAnnotation:function(e){return{type:Yn.TupleTypeAnnotation,types:e}},createObjectTypeAnnotation:function(e,t,n){return{type:Yn.ObjectTypeAnnotation,properties:e,indexers:t,callProperties:n}},createObjectTypeIndexer:function(e,t,n,r){return{type:Yn.ObjectTypeIndexer,id:e,key:t,value:n,static:r}},createObjectTypeCallProperty:function(e,t){return{type:Yn.ObjectTypeCallProperty,value:e,static:t}},createObjectTypeProperty:function(e,t,n,r){return{type:Yn.ObjectTypeProperty,key:e,value:t,optional:n,static:r}},createUnionTypeAnnotation:function(e){return{type:Yn.UnionTypeAnnotation,types:e}},createIntersectionTypeAnnotation:function(e){return{type:Yn.IntersectionTypeAnnotation,types:e}},createTypeAlias:function(e,t,n){return{type:Yn.TypeAlias,id:e,typeParameters:t,right:n}},createInterface:function(e,t,n,r){return{type:Yn.InterfaceDeclaration,id:e,typeParameters:t,body:n,extends:r}},createInterfaceExtends:function(e,t){return{type:Yn.InterfaceExtends,id:e,typeParameters:t}},createDeclareFunction:function(e){return{type:Yn.DeclareFunction,id:e}},createDeclareVariable:function(e){return{type:Yn.DeclareVariable,id:e}},createDeclareModule:function(e,t){return{type:Yn.DeclareModule,id:e,body:t}},createJSXAttribute:function(e,t){return{type:Yn.JSXAttribute,name:e,value:t||null}},createJSXSpreadAttribute:function(e){return{type:Yn.JSXSpreadAttribute,argument:e}},createJSXIdentifier:function(e){return{type:Yn.JSXIdentifier,name:e}},createJSXNamespacedName:function(e,t){return{type:Yn.JSXNamespacedName,namespace:e,name:t}},createJSXMemberExpression:function(e,t){return{type:Yn.JSXMemberExpression,object:e,property:t}},createJSXElement:function(e,t,n){return{type:Yn.JSXElement,openingElement:e,closingElement:t,children:n}},createJSXEmptyExpression:function(){return{type:Yn.JSXEmptyExpression}},createJSXExpressionContainer:function(e){return{type:Yn.JSXExpressionContainer,expression:e}},createJSXOpeningElement:function(e,t,n){return{type:Yn.JSXOpeningElement,name:e,selfClosing:n,attributes:t}},createJSXClosingElement:function(e){return{type:Yn.JSXClosingElement,name:e}},createIfStatement:function(e,t,n){return{type:Yn.IfStatement,test:e,consequent:t,alternate:n}},createLabeledStatement:function(e,t){return{type:Yn.LabeledStatement,label:e,body:t}},createLiteral:function(e){var t={type:Yn.Literal,value:e.value,raw:rr.slice(e.range[0],e.range[1])};return e.regex&&(t.regex=e.regex),t},createMemberExpression:function(e,t,n){return{type:Yn.MemberExpression,computed:"["===e,object:t,property:n}},createNewExpression:function(e,t){return{type:Yn.NewExpression,callee:e,arguments:t}},createObjectExpression:function(e){return{type:Yn.ObjectExpression,properties:e}},createPostfixExpression:function(e,t){return{type:Yn.UpdateExpression,operator:e,argument:t,prefix:!1}},createProgram:function(e){return{type:Yn.Program,body:e}},createProperty:function(e,t,n,r,i,a){return{type:Yn.Property,key:t,value:n,kind:e,method:r,shorthand:i,computed:a}},createReturnStatement:function(e){return{type:Yn.ReturnStatement,argument:e}},createSequenceExpression:function(e){return{type:Yn.SequenceExpression,expressions:e}},createSwitchCase:function(e,t){return{type:Yn.SwitchCase,test:e,consequent:t}},createSwitchStatement:function(e,t){return{type:Yn.SwitchStatement,discriminant:e,cases:t}},createThisExpression:function(){return{type:Yn.ThisExpression}},createThrowStatement:function(e){return{type:Yn.ThrowStatement,argument:e}},createTryStatement:function(e,t,n,r){return{type:Yn.TryStatement,block:e,guardedHandlers:t,handlers:n,finalizer:r}},createUnaryExpression:function(e,t){return"++"===e||"--"===e?{type:Yn.UpdateExpression,operator:e,argument:t,prefix:!0}:{type:Yn.UnaryExpression,operator:e,argument:t,prefix:!0}},createVariableDeclaration:function(e,t){return{type:Yn.VariableDeclaration,declarations:e,kind:t}},createVariableDeclarator:function(e,t){return{type:Yn.VariableDeclarator,id:e,init:t}},createWhileStatement:function(e,t){return{type:Yn.WhileStatement,test:e,body:t}},createWithStatement:function(e,t){return{type:Yn.WithStatement,object:e,body:t}},createTemplateElement:function(e,t){return{type:Yn.TemplateElement,value:e,tail:t}},createTemplateLiteral:function(e,t){return{type:Yn.TemplateLiteral,quasis:e,expressions:t}},createSpreadElement:function(e){return{type:Yn.SpreadElement,argument:e}},createSpreadProperty:function(e){return{type:Yn.SpreadProperty,argument:e}},createTaggedTemplateExpression:function(e,t){return{type:Yn.TaggedTemplateExpression,
+tag:e,quasi:t}},createArrowFunctionExpression:function(e,t,n,r,i,a){var o={type:Yn.ArrowFunctionExpression,id:null,params:e,defaults:t,body:n,rest:r,generator:!1,expression:i};return a&&(o.async=!0),o},createMethodDefinition:function(e,t,n,r,i){return{type:Yn.MethodDefinition,key:n,value:r,kind:t,static:e===nr.static,computed:i}},createClassProperty:function(e,t,n,r){return{type:Yn.ClassProperty,key:e,typeAnnotation:t,computed:n,static:r}},createClassBody:function(e){return{type:Yn.ClassBody,body:e}},createClassImplements:function(e,t){return{type:Yn.ClassImplements,id:e,typeParameters:t}},createClassExpression:function(e,t,n,r,i,a){return{type:Yn.ClassExpression,id:e,superClass:t,body:n,typeParameters:r,superTypeParameters:i,implements:a}},createClassDeclaration:function(e,t,n,r,i,a){return{type:Yn.ClassDeclaration,id:e,superClass:t,body:n,typeParameters:r,superTypeParameters:i,implements:a}},createExportSpecifier:function(e,t){return{type:Yn.ExportSpecifier,id:e,name:t}},createExportBatchSpecifier:function(){return{type:Yn.ExportBatchSpecifier}},createImportDefaultSpecifier:function(e){return{type:Yn.ImportDefaultSpecifier,id:e}},createImportNamespaceSpecifier:function(e){return{type:Yn.ImportNamespaceSpecifier,id:e}},createExportDeclaration:function(e,t,n,r,i){return{type:Yn.ExportDeclaration,default:!!e,declaration:t,specifiers:n,source:r,exportKind:i}},createImportSpecifier:function(e,t){return{type:Yn.ImportSpecifier,id:e,name:t}},createImportDeclaration:function(e,t,n){return{type:Yn.ImportDeclaration,specifiers:e,source:t,importKind:n}},createYieldExpression:function(e,t){return{type:Yn.YieldExpression,argument:e,delegate:t}},createAwaitExpression:function(e){return{type:Yn.AwaitExpression,argument:e}},createComprehensionExpression:function(e,t,n){return{type:Yn.ComprehensionExpression,filter:e,blocks:t,body:n}}},tr={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},e.version="15001.1001.0-dev-harmony-fb",e.tokenize=zn,e.parse=Wn,e.Syntax=function(){var e,t={};"function"==typeof Object.create&&(t=Object.create(null));for(e in Yn)Yn.hasOwnProperty(e)&&(t[e]=Yn[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()})},{}],56:[function(e,t,n){"use strict";function r(e,t,n){if(p)try{p.call(c,e,t,{value:n})}catch(r){e[t]=n}else e[t]=n}function i(e){return e&&(r(e,"call",e.call),r(e,"apply",e.apply)),e}function a(e){return f?f.call(c,e):(y.prototype=e||null,new y)}function o(){do var e=s(m.call(h.call(g(),36),2));while(d.call(v,e));return v[e]=e}function s(e){var t={};return t[e]=!0,Object.keys(t)[0]}function l(e){return a(null)}function u(e){function t(t){function n(n,r){if(n===s)return r?a=null:a||(a=e(t))}var a;r(t,i,n)}function n(e){return d.call(e,i)||t(e),e[i](s)}var i=o(),s=a(null);return e=e||l,n.forget=function(e){d.call(e,i)&&e[i](s,!0)},n}var c=Object,p=Object.defineProperty,f=Object.create;i(p),i(f);var d=i(Object.prototype.hasOwnProperty),h=i(Number.prototype.toString),m=i(String.prototype.slice),y=function(){},g=Math.random,v=a(null);r(n,"makeUniqueKey",o);var b=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function(e){for(var t=b(e),n=0,r=0,i=t.length;n<i;++n)d.call(v,t[n])||(n>r&&(t[r]=t[n]),++r);return t.length=r,t},r(n,"makeAccessor",u)},{}],57:[function(e,t,n){function r(e,t){if(e){if(E.fixFaultyLocations(e),t){if(h.Node.check(e)&&h.SourceLocation.check(e.loc)){for(var n=t.length-1;n>=0&&!(S(t[n].loc.end,e.loc.start)<=0);--n);return void t.splice(n+1,0,e)}}else if(e[w])return e[w];var i;if(m.check(e))i=Object.keys(e);else{if(!y.check(e))return;i=d.getFieldNames(e)}t||Object.defineProperty(e,w,{value:t=[],enumerable:!1});for(var n=0,a=i.length;n<a;++n)r(e[i[n]],t);return t}}function i(e,t){for(var n=r(e),a=0,o=n.length;a<o;){var s=a+o>>1,l=n[s];if(S(l.loc.start,t.loc.start)<=0&&S(t.loc.end,l.loc.end)<=0)return void i(t.enclosingNode=l,t);if(S(l.loc.end,t.loc.start)<=0){var u=l;a=s+1}else{if(!(S(t.loc.end,l.loc.start)<=0))throw new Error("Comment location overlaps with node location");var c=l;o=s}}u&&(t.precedingNode=u),c&&(t.followingNode=c)}function a(e,t){var n=e.length;if(0!==n){for(var r=e[0].precedingNode,i=e[0].followingNode,a=i.loc.start,o=n;o>0;--o){var l=e[o-1];f.strictEqual(l.precedingNode,r),f.strictEqual(l.followingNode,i);var c=t.sliceString(l.loc.end,a);if(/\S/.test(c))break;a=l.loc.start}for(;o<=n&&(l=e[o])&&"Line"===l.type&&l.loc.start.column>i.loc.start.column;)++o;e.forEach(function(e,t){t<o?u(r,e):s(i,e)}),e.length=0}}function o(e,t){var n=e.comments||(e.comments=[]);n.push(t)}function s(e,t){t.leading=!0,t.trailing=!1,o(e,t)}function l(e,t){t.leading=!1,t.trailing=!1,o(e,t)}function u(e,t){t.leading=!1,t.trailing=!0,o(e,t)}function c(e,t){var n=e.getValue();h.Comment.assert(n);var r=n.loc,i=r&&r.lines,a=[t(e)];if(n.trailing)a.push("\n");else if(i instanceof v){var o=i.slice(r.end,i.skipSpaces(r.end));1===o.length?a.push(o):a.push(new Array(o.length).join("\n"))}else a.push("\n");return b(a)}function p(e,t){var n=e.getValue(e);h.Comment.assert(n);var r=n.loc,i=r&&r.lines,a=[];if(i instanceof v){var o=i.skipSpaces(r.start,!0)||i.firstPos(),s=i.slice(o,r.start);1===s.length?a.push(s):a.push(new Array(s.length).join("\n"))}return a.push(t(e)),b(a)}var f=e("assert"),d=e("./types"),h=d.namedTypes,m=d.builtInTypes.array,y=d.builtInTypes.object,g=e("./lines"),v=(g.fromString,g.Lines),b=g.concat,E=e("./util"),S=E.comparePos,w=e("private").makeUniqueKey();n.attach=function(e,t,n){if(m.check(e)){var r=[];e.forEach(function(e){e.loc.lines=n,i(t,e);var o=e.precedingNode,c=e.enclosingNode,p=e.followingNode;if(o&&p){var d=r.length;if(d>0){var h=r[d-1];f.strictEqual(h.precedingNode===e.precedingNode,h.followingNode===e.followingNode),h.followingNode!==e.followingNode&&a(r,n)}r.push(e)}else if(o)a(r,n),u(o,e);else if(p)a(r,n),s(p,e);else{if(!c)throw new Error("AST contains no nodes at all?");a(r,n),l(c,e)}}),a(r,n),e.forEach(function(e){delete e.precedingNode,delete e.enclosingNode,delete e.followingNode})}},n.printComments=function(e,t){var n=e.getValue(),r=t(e),i=h.Node.check(n)&&d.getFieldValue(n,"comments");if(!i||0===i.length)return r;var a=[],o=[r];return e.each(function(e){var n=e.getValue(),r=d.getFieldValue(n,"leading"),i=d.getFieldValue(n,"trailing");r||i&&"Block"!==n.type?a.push(c(e,t)):i&&(f.strictEqual(n.type,"Block"),o.push(p(e,t)))},"comments"),a.push.apply(a,o),b(a)}},{"./lines":59,"./types":65,"./util":66,assert:2,private:56}],58:[function(e,t,n){function r(e){s.ok(this instanceof r),this.stack=[e]}function i(e,t){for(var n=e.stack,r=n.length-1;r>=0;r-=2){var i=n[r];if(u.Node.check(i)&&--t<0)return i}return null}function a(e){return u.BinaryExpression.check(e)||u.LogicalExpression.check(e)}function o(e){return!!u.CallExpression.check(e)||(c.check(e)?e.some(o):!!u.Node.check(e)&&l.someField(e,function(e,t){return o(t)}))}var s=e("assert"),l=e("./types"),u=l.namedTypes,c=(u.Node,l.builtInTypes.array),p=l.builtInTypes.number,f=r.prototype;t.exports=r,r.from=function(e){if(e instanceof r)return e.copy();if(e instanceof l.NodePath){for(var t,n=Object.create(r.prototype),i=[e.value];t=e.parentPath;e=t)i.push(e.name,t.value);return n.stack=i.reverse(),n}return new r(e)},f.copy=function e(){var e=Object.create(r.prototype);return e.stack=this.stack.slice(0),e},f.getName=function(){var e=this.stack,t=e.length;return t>1?e[t-2]:null},f.getValue=function(){var e=this.stack;return e[e.length-1]},f.getNode=function(e){return i(this,~~e)},f.getParentNode=function(e){return i(this,~~e+1)},f.getRootValue=function(){var e=this.stack;return e.length%2===0?e[1]:e[0]},f.call=function(e){for(var t=this.stack,n=t.length,r=t[n-1],i=arguments.length,a=1;a<i;++a){var o=arguments[a];r=r[o],t.push(o,r)}var s=e(this);return t.length=n,s},f.each=function(e){for(var t=this.stack,n=t.length,r=t[n-1],i=arguments.length,a=1;a<i;++a){var o=arguments[a];r=r[o],t.push(o,r)}for(var a=0;a<r.length;++a)a in r&&(t.push(a,r[a]),e(this),t.length-=2);t.length=n},f.map=function(e){for(var t=this.stack,n=t.length,r=t[n-1],i=arguments.length,a=1;a<i;++a){var o=arguments[a];r=r[o],t.push(o,r)}for(var s=new Array(r.length),a=0;a<r.length;++a)a in r&&(t.push(a,r[a]),s[a]=e(this,a),t.length-=2);return t.length=n,s},f.needsParens=function(e){var t=this.getParentNode();if(!t)return!1;var n=this.getName(),r=this.getNode();if(this.getValue()!==r)return!1;if(!u.Expression.check(r))return!1;if("Identifier"===r.type)return!1;if("ParenthesizedExpression"===t.type)return!1;switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===t.type&&"object"===n&&t.object===r;case"BinaryExpression":case"LogicalExpression":switch(t.type){case"CallExpression":return"callee"===n&&t.callee===r;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===n&&t.object===r;case"BinaryExpression":case"LogicalExpression":var i=t.operator,l=d[i],c=r.operator,f=d[c];if(l>f)return!0;if(l===f&&"right"===n)return s.strictEqual(t.right,r),!0;default:return!1}case"SequenceExpression":switch(t.type){case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==n;default:return!0}case"YieldExpression":switch(t.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return"MemberExpression"===t.type&&p.check(r.value)&&"object"===n&&t.object===r;case"AssignmentExpression":case"ConditionalExpression":switch(t.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===n&&t.callee===r;case"ConditionalExpression":return"test"===n&&t.test===r;case"MemberExpression":return"object"===n&&t.object===r;default:return!1}case"ArrowFunctionExpression":return a(t);case"ObjectExpression":if("ArrowFunctionExpression"===t.type&&"body"===n)return!0;default:if("NewExpression"===t.type&&"callee"===n&&t.callee===r)return o(r)}return!(e===!0||this.canBeFirstInStatement()||!this.firstInStatement())};var d={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){d[e]=t})}),f.canBeFirstInStatement=function(){var e=this.getNode();return!u.FunctionExpression.check(e)&&!u.ObjectExpression.check(e)},f.firstInStatement=function(){for(var e,t,n,r,i=this.stack,o=i.length-1;o>=0;o-=2)if(u.Node.check(i[o])&&(n=e,r=t,e=i[o-1],t=i[o]),t&&r){if(u.BlockStatement.check(t)&&"body"===e&&0===n)return s.strictEqual(t.body[0],r),!0;if(u.ExpressionStatement.check(t)&&"expression"===n)return s.strictEqual(t.expression,r),!0;if(u.SequenceExpression.check(t)&&"expressions"===e&&0===n)s.strictEqual(t.expressions[0],r);else if(u.CallExpression.check(t)&&"callee"===n)s.strictEqual(t.callee,r);else if(u.MemberExpression.check(t)&&"object"===n)s.strictEqual(t.object,r);else if(u.ConditionalExpression.check(t)&&"test"===n)s.strictEqual(t.test,r);else if(a(t)&&"left"===n)s.strictEqual(t.left,r);else{if(!u.UnaryExpression.check(t)||t.prefix||"argument"!==n)return!1;s.strictEqual(t.argument,r)}}return!0}},{"./types":65,assert:2}],59:[function(e,t,n){function r(e){return e[d]}function i(e,t){c.ok(this instanceof i),c.ok(e.length>0),t?m.assert(t):t=null,Object.defineProperty(this,d,{value:{infos:e,mappings:[],name:t,cachedSourceMap:null}}),t&&r(this).mappings.push(new g(this,{start:this.firstPos(),end:this.lastPos()}))}function a(e){return{line:e.line,indent:e.indent,sliceStart:e.sliceStart,sliceEnd:e.sliceEnd}}function o(e,t){for(var n=0,r=e.length,i=0;i<r;++i)switch(e.charCodeAt(i)){case 9:c.strictEqual(typeof t,"number"),c.ok(t>0);var a=Math.ceil(n/t)*t;a===n?n+=t:n=a;break;case 11:case 12:case 13:case 65279:break;case 32:default:n+=1}return n}function s(e,t){if(e instanceof i)return e;e+="";var n=t&&t.tabWidth,r=e.indexOf("\t")<0,a=!t&&r&&e.length<=S;if(c.ok(n||r,"No tab width specified but encountered tabs in string\n"+e),a&&E.call(b,e))return b[e];var s=new i(e.split(x).map(function(e){var t=w.exec(e)[0];return{line:e,indent:o(t,n),sliceStart:t.length,sliceEnd:e.length}}),f(t).sourceFileName);return a&&(b[e]=s),s}function l(e){return!/\S/.test(e)}function u(e,t,n){var r=e.sliceStart,i=e.sliceEnd,a=Math.max(e.indent,0),o=a+i-r;return"undefined"==typeof n&&(n=o),t=Math.max(t,0),n=Math.min(n,o),n=Math.max(n,t),n<a?(a=n,i=r):i-=o-n,o=n,o-=t,t<a?a-=t:(t-=a,a=0,r+=t),c.ok(a>=0),c.ok(r<=i),c.strictEqual(o,a+i-r),e.indent===a&&e.sliceStart===r&&e.sliceEnd===i?e:{line:e.line,indent:a,sliceStart:r,sliceEnd:i}}var c=e("assert"),p=e("source-map"),f=e("./options").normalize,d=e("private").makeUniqueKey(),h=e("./types"),m=h.builtInTypes.string,y=e("./util").comparePos,g=e("./mapping");n.Lines=i;var v=i.prototype;Object.defineProperties(v,{length:{get:function(){return r(this).infos.length}},name:{get:function(){return r(this).name}}});var b={},E=b.hasOwnProperty,S=10;n.countSpaces=o;var w=/^\s*/,x=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;n.fromString=s,v.toString=function(e){return this.sliceString(this.firstPos(),this.lastPos(),e)},v.getSourceMap=function(e,t){function n(n){return n=n||{},m.assert(e),n.file=e,t&&(m.assert(t),n.sourceRoot=t),n}if(!e)return null;var i=this,a=r(i);if(a.cachedSourceMap)return n(a.cachedSourceMap.toJSON());var o=new p.SourceMapGenerator(n()),s={};return a.mappings.forEach(function(e){for(var t=e.sourceLines.skipSpaces(e.sourceLoc.start)||e.sourceLines.lastPos(),n=i.skipSpaces(e.targetLoc.start)||i.lastPos();y(t,e.sourceLoc.end)<0&&y(n,e.targetLoc.end)<0;){var r=e.sourceLines.charAt(t),a=i.charAt(n);c.strictEqual(r,a);var l=e.sourceLines.name;if(o.addMapping({source:l,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column}}),!E.call(s,l)){var u=e.sourceLines.toString();o.setSourceContent(l,u),s[l]=u}i.nextPos(n,!0),e.sourceLines.nextPos(t,!0)}}),a.cachedSourceMap=o,o.toJSON()},v.bootstrapCharAt=function(e){c.strictEqual(typeof e,"object"),c.strictEqual(typeof e.line,"number"),c.strictEqual(typeof e.column,"number");var t=e.line,n=e.column,r=this.toString().split(x),i=r[t-1];return"undefined"==typeof i?"":n===i.length&&t<r.length?"\n":n>=i.length?"":i.charAt(n)},v.charAt=function(e){c.strictEqual(typeof e,"object"),c.strictEqual(typeof e.line,"number"),c.strictEqual(typeof e.column,"number");var t=e.line,n=e.column,i=r(this),a=i.infos,o=a[t-1],s=n;if("undefined"==typeof o||s<0)return"";var l=this.getIndentAt(t);return s<l?" ":(s+=o.sliceStart-l,s===o.sliceEnd&&t<this.length?"\n":s>=o.sliceEnd?"":o.line.charAt(s))},v.stripMargin=function(e,t){if(0===e)return this;if(c.ok(e>0,"negative margin: "+e),t&&1===this.length)return this;var n=r(this),o=new i(n.infos.map(function(n,r){return n.line&&(r>0||!t)&&(n=a(n),n.indent=Math.max(0,n.indent-e)),n}));if(n.mappings.length>0){var s=r(o).mappings;c.strictEqual(s.length,0),n.mappings.forEach(function(n){s.push(n.indent(e,t,!0))})}return o},v.indent=function(e){if(0===e)return this;var t=r(this),n=new i(t.infos.map(function(t){return t.line&&(t=a(t),t.indent+=e),t}));if(t.mappings.length>0){var o=r(n).mappings;c.strictEqual(o.length,0),t.mappings.forEach(function(t){o.push(t.indent(e))})}return n},v.indentTail=function(e){if(0===e)return this;if(this.length<2)return this;var t=r(this),n=new i(t.infos.map(function(t,n){return n>0&&t.line&&(t=a(t),t.indent+=e),t}));if(t.mappings.length>0){var o=r(n).mappings;c.strictEqual(o.length,0),t.mappings.forEach(function(t){o.push(t.indent(e,!0))})}return n},v.getIndentAt=function(e){c.ok(e>=1,"no line "+e+" (line numbers start from 1)");var t=r(this),n=t.infos[e-1];return Math.max(n.indent,0)},v.guessTabWidth=function(){var e=r(this);if(E.call(e,"cachedTabWidth"))return e.cachedTabWidth;for(var t=[],n=0,i=1,a=this.length;i<=a;++i){var o=e.infos[i-1],s=o.line.slice(o.sliceStart,o.sliceEnd);if(!l(s)){var u=Math.abs(o.indent-n);t[u]=~~t[u]+1,n=o.indent}}for(var c=-1,p=2,f=1;f<t.length;f+=1)E.call(t,f)&&t[f]>c&&(c=t[f],p=f);return e.cachedTabWidth=p},v.isOnlyWhitespace=function(){return l(this.toString())},v.isPrecededOnlyByWhitespace=function(e){var t=r(this),n=t.infos[e.line-1],i=Math.max(n.indent,0),a=e.column-i;if(a<=0)return!0;var o=n.sliceStart,s=Math.min(o+a,n.sliceEnd),u=n.line.slice(o,s);return l(u)},v.getLineLength=function(e){var t=r(this),n=t.infos[e-1];return this.getIndentAt(e)+n.sliceEnd-n.sliceStart},v.nextPos=function(e,t){var n=Math.max(e.line,0),r=Math.max(e.column,0);return r<this.getLineLength(n)?(e.column+=1,!t||!!this.skipSpaces(e,!1,!0)):n<this.length&&(e.line+=1,e.column=0,!t||!!this.skipSpaces(e,!1,!0))},v.prevPos=function(e,t){var n=e.line,r=e.column;if(r<1){if(n-=1,n<1)return!1;r=this.getLineLength(n)}else r=Math.min(r-1,this.getLineLength(n));return e.line=n,e.column=r,!t||!!this.skipSpaces(e,!0,!0)},v.firstPos=function(){return{line:1,column:0}},v.lastPos=function(){return{line:this.length,column:this.getLineLength(this.length)}},v.skipSpaces=function(e,t,n){if(e=e?n?e:{line:e.line,column:e.column}:t?this.lastPos():this.firstPos(),t){for(;this.prevPos(e);)if(!l(this.charAt(e))&&this.nextPos(e))return e;return null}for(;l(this.charAt(e));)if(!this.nextPos(e))return null;return e},v.trimLeft=function(){var e=this.skipSpaces(this.firstPos(),!1,!0);return e?this.slice(e):k},v.trimRight=function(){var e=this.skipSpaces(this.lastPos(),!0,!0);return e?this.slice(this.firstPos(),e):k},v.trim=function(){var e=this.skipSpaces(this.firstPos(),!1,!0);if(null===e)return k;var t=this.skipSpaces(this.lastPos(),!0,!0);return c.notStrictEqual(t,null),this.slice(e,t)},v.eachPos=function(e,t,n){var r=this.firstPos();if(t&&(r.line=t.line,r.column=t.column),!n||this.skipSpaces(r,!1,!0))do e.call(this,r);while(this.nextPos(r,n))},v.bootstrapSlice=function(e,t){var n=this.toString().split(x).slice(e.line-1,t.line);return n.push(n.pop().slice(0,t.column)),n[0]=n[0].slice(e.column),s(n.join("\n"))},v.slice=function(e,t){if(!t){if(!e)return this;t=this.lastPos()}var n=r(this),a=n.infos.slice(e.line-1,t.line);e.line===t.line?a[0]=u(a[0],e.column,t.column):(c.ok(e.line<t.line),a[0]=u(a[0],e.column),a.push(u(a.pop(),0,t.column)));var o=new i(a);if(n.mappings.length>0){var s=r(o).mappings;c.strictEqual(s.length,0),n.mappings.forEach(function(n){var r=n.slice(this,e,t);r&&s.push(r)},this)}return o},v.bootstrapSliceString=function(e,t,n){return this.slice(e,t).toString(n)},v.sliceString=function(e,t,n){if(!t){if(!e)return this;t=this.lastPos()}n=f(n);for(var i=r(this).infos,a=[],s=n.tabWidth,c=e.line;c<=t.line;++c){var p=i[c-1];c===e.line?p=c===t.line?u(p,e.column,t.column):u(p,e.column):c===t.line&&(p=u(p,0,t.column));var d=Math.max(p.indent,0),h=p.line.slice(0,p.sliceStart);if(n.reuseWhitespace&&l(h)&&o(h,n.tabWidth)===d)a.push(p.line.slice(0,p.sliceEnd));else{var m=0,y=d;n.useTabs&&(m=Math.floor(d/s),y-=m*s);var g="";m>0&&(g+=new Array(m+1).join("\t")),y>0&&(g+=new Array(y+1).join(" ")),g+=p.line.slice(p.sliceStart,p.sliceEnd),a.push(g)}}return a.join(n.lineTerminator)},v.isEmpty=function(){return this.length<2&&this.getLineLength(1)<1},v.join=function(e){function t(e){if(null!==e){if(o){var t=e.infos[0],n=new Array(t.indent+1).join(" "),r=c.length,i=Math.max(o.indent,0)+o.sliceEnd-o.sliceStart;o.line=o.line.slice(0,o.sliceEnd)+n+t.line.slice(t.sliceStart,t.sliceEnd),o.sliceEnd=o.line.length,e.mappings.length>0&&e.mappings.forEach(function(e){p.push(e.add(r,i))})}else e.mappings.length>0&&p.push.apply(p,e.mappings);e.infos.forEach(function(e,t){(!o||t>0)&&(o=a(e),c.push(o))})}}function n(e,n){n>0&&t(u),t(e)}var o,l=this,u=r(l),c=[],p=[];if(e.map(function(e){var t=s(e);return t.isEmpty()?null:r(t)}).forEach(l.isEmpty()?t:n),c.length<1)return k;var f=new i(c);return r(f).mappings=p,f},n.concat=function(e){return k.join(e)},v.concat=function(e){var t=arguments,n=[this];return n.push.apply(n,t),c.strictEqual(n.length,t.length+1),k.join(n)};var k=s("")},{"./mapping":60,"./options":61,"./types":65,"./util":66,assert:2,private:56,"source-map":94}],60:[function(e,t,n){function r(e,t,n){s.ok(this instanceof r),s.ok(e instanceof f.Lines),c.assert(t),n?s.ok(u.check(n.start.line)&&u.check(n.start.column)&&u.check(n.end.line)&&u.check(n.end.column)):n=t,Object.defineProperties(this,{sourceLines:{value:e},sourceLoc:{value:t},targetLoc:{value:n}})}function i(e,t,n){return{line:e.line+t-1,column:1===e.line?e.column+n:e.column}}function a(e,t,n){return{line:e.line-t+1,column:e.line===t?e.column-n:e.column}}function o(e,t,n,r,i){s.ok(e instanceof f.Lines),s.ok(n instanceof f.Lines),p.assert(t),p.assert(r),p.assert(i);var a=d(r,i);if(0===a)return t;if(a<0){var o=e.skipSpaces(t),l=n.skipSpaces(r),u=i.line-l.line;for(o.line+=u,l.line+=u,u>0?(o.column=0,l.column=0):s.strictEqual(u,0);d(l,i)<0&&n.nextPos(l,!0);)s.ok(e.nextPos(o,!0)),s.strictEqual(e.charAt(o),n.charAt(l))}else{var o=e.skipSpaces(t,!0),l=n.skipSpaces(r,!0),u=i.line-l.line;for(o.line+=u,l.line+=u,u<0?(o.column=e.getLineLength(o.line),l.column=n.getLineLength(l.line)):s.strictEqual(u,0);d(i,l)<0&&n.prevPos(l,!0);)s.ok(e.prevPos(o,!0)),s.strictEqual(e.charAt(o),n.charAt(l))}return o}var s=e("assert"),l=e("./types"),u=(l.builtInTypes.string,l.builtInTypes.number),c=l.namedTypes.SourceLocation,p=l.namedTypes.Position,f=e("./lines"),d=e("./util").comparePos,h=r.prototype;t.exports=r,h.slice=function(e,t,n){function i(r){var i=u[r],a=c[r],p=t;return"end"===r?p=n:s.strictEqual(r,"start"),o(l,i,e,a,p)}s.ok(e instanceof f.Lines),p.assert(t),n?p.assert(n):n=e.lastPos();var l=this.sourceLines,u=this.sourceLoc,c=this.targetLoc;if(d(t,c.start)<=0)if(d(c.end,n)<=0)c={start:a(c.start,t.line,t.column),end:a(c.end,t.line,t.column)};else{if(d(n,c.start)<=0)return null;u={start:u.start,end:i("end")},c={start:a(c.start,t.line,t.column),end:a(n,t.line,t.column)}}else{if(d(c.end,t)<=0)return null;d(c.end,n)<=0?(u={start:i("start"),end:u.end},c={start:{line:1,column:0},end:a(c.end,t.line,t.column)}):(u={start:i("start"),end:i("end")},c={start:{line:1,column:0},end:a(n,t.line,t.column)})}return new r(this.sourceLines,u,c)},h.add=function(e,t){return new r(this.sourceLines,this.sourceLoc,{start:i(this.targetLoc.start,e,t),end:i(this.targetLoc.end,e,t)})},h.subtract=function(e,t){return new r(this.sourceLines,this.sourceLoc,{start:a(this.targetLoc.start,e,t),end:a(this.targetLoc.end,e,t)})},h.indent=function(e,t,n){if(0===e)return this;var i=this.targetLoc,a=i.start.line,o=i.end.line;if(t&&1===a&&1===o)return this;if(i={start:i.start,end:i.end},!t||a>1){var s=i.start.column+e;i.start={line:a,column:n?Math.max(0,s):s}}if(!t||o>1){var l=i.end.column+e;i.end={line:o,column:n?Math.max(0,l):l}}return new r(this.sourceLines,this.sourceLoc,i)}},{"./lines":59,"./types":65,"./util":66,assert:2}],61:[function(e,t,n){var r={esprima:e("esprima-fb"),tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:e("os").EOL,wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:!1,tolerant:!0,quote:null,trailingComma:!1},i=r.hasOwnProperty;n.normalize=function(e){function t(t){return i.call(e,t)?e[t]:r[t]}return e=e||r,{tabWidth:+t("tabWidth"),useTabs:!!t("useTabs"),reuseWhitespace:!!t("reuseWhitespace"),lineTerminator:t("lineTerminator"),wrapColumn:Math.max(t("wrapColumn"),0),sourceFileName:t("sourceFileName"),sourceMapName:t("sourceMapName"),sourceRoot:t("sourceRoot"),inputSourceMap:t("inputSourceMap"),esprima:t("esprima"),range:t("range"),tolerant:t("tolerant"),quote:t("quote"),trailingComma:t("trailingComma")}}},{"esprima-fb":55,os:11}],62:[function(e,t,n){function r(e){i.ok(this instanceof r),this.lines=e,this.indent=0}var i=e("assert"),a=e("./types"),o=(a.namedTypes,a.builders),s=a.builtInTypes.object,l=a.builtInTypes.array,u=(a.builtInTypes.function,e("./patcher").Patcher,e("./options").normalize),c=e("./lines").fromString,p=e("./comments").attach,f=e("./util");n.parse=function(e,t){t=u(t);var n=c(e,t),i=n.toString({tabWidth:t.tabWidth,reuseWhitespace:!1,useTabs:!1}),a=[],s=t.esprima.parse(i,{loc:!0,locations:!0,range:t.range,comment:!0,onComment:a,tolerant:t.tolerant,ecmaVersion:6,sourceType:"module"});s.loc=s.loc||{start:n.firstPos(),end:n.lastPos()},s.loc.lines=n,s.loc.indent=0;var l=f.getTrueLoc(s,n);s.loc.start=l.start,s.loc.end=l.end,s.comments&&(a=s.comments,delete s.comments);var d=o.file(s);return d.loc={lines:n,indent:0,start:n.firstPos(),end:n.lastPos()},p(a,s.body.length?d.program:d,n),new r(n).copy(d)};var d=r.prototype;d.copy=function(e){if(l.check(e))return e.map(this.copy,this);if(!s.check(e))return e;f.fixFaultyLocations(e);var t=Object.create(Object.getPrototypeOf(e),{original:{value:e,configurable:!1,enumerable:!1,writable:!0}}),n=e.loc,r=this.indent,i=r;n&&(("Block"===e.type||"Line"===e.type||this.lines.isPrecededOnlyByWhitespace(n.start))&&(i=this.indent=n.start.column),n.lines=this.lines,n.indent=i);for(var a=Object.keys(e),o=a.length,u=0;u<o;++u){var c=a[u];"loc"===c?t[c]=e[c]:t[c]=this.copy(e[c])}return this.indent=r,t}},{"./comments":57,"./lines":59,"./options":61,"./patcher":63,"./types":65,"./util":66,assert:2}],63:[function(e,t,n){function r(e){d.ok(this instanceof r),d.ok(e instanceof h.Lines);var t=this,n=[];t.replace=function(e,t){k.check(t)&&(t=h.fromString(t)),n.push({lines:t,start:e.start,end:e.end})},t.get=function(t){function r(t,n){d.ok(E(t,n)<=0),a.push(e.slice(t,n))}t=t||{start:{line:1,column:0},end:{line:e.length,column:e.getLineLength(e.length)}};var i=t.start,a=[];return n.sort(function(e,t){return E(e.start,t.start)}).forEach(function(e){E(i,e.start)>0||(r(i,e.start),a.push(e.lines),i=e.end)}),r(i,t.end),h.concat(a)}}function i(e){var t=[];return e.comments&&e.comments.length>0&&e.comments.forEach(function(e){(e.leading||e.trailing)&&t.push(e)}),t}function a(e,t){var n=e.getValue();y.assert(n);var r=n.original;if(y.assert(r),d.deepEqual(t,[]),n.type!==r.type)return!1;var i=new S(r),a=f(e,i,t);return a||(t.length=0),a}function o(e,t,n){var r=e.getValue(),i=t.getValue();return r===i||(x.check(r)?s(e,t,n):!!w.check(r)&&l(e,t,n))}function s(e,t,n){var r=e.getValue(),i=t.getValue();x.assert(r);var a=r.length;if(!x.check(i)||i.length!==a)return!1;for(var s=0;s<a;++s){e.stack.push(s,r[s]),t.stack.push(s,i[s]);var l=o(e,t,n);if(e.stack.length-=2,t.stack.length-=2,!l)return!1}return!0}function l(e,t,n){var r=e.getValue();if(w.assert(r),null===r.original)return!1;var i=t.getValue();if(!w.check(i))return!1;if(y.check(r)){if(!y.check(i))return!1;if(r.type===i.type){var a=[];if(f(e,t,a))n.push.apply(n,a);else{if(!i.loc)return!1;n.push({oldPath:t.copy(),newPath:e.copy()})}return!0}return!!(g.check(r)&&g.check(i)&&i.loc)&&(n.push({oldPath:t.copy(),newPath:e.copy()}),!0)}return f(e,t,n)}function u(e){var t=e.getValue(),n=t.loc,r=n&&n.lines;if(r){var i=L;for(i.line=n.start.line,i.column=n.start.column;r.prevPos(i);){var a=r.charAt(i);if("("===a)return E(e.getRootValue().loc.start,i)<=0;if(C.test(a))return!1}}return!1}function c(e){var t=e.getValue(),n=t.loc,r=n&&n.lines;if(r){var i=L;i.line=n.end.line,i.column=n.end.column;do{var a=r.charAt(i);if(")"===a)return E(i,e.getRootValue().loc.end)<=0;if(C.test(a))return!1}while(r.nextPos(i))}return!1}function p(e){return u(e)&&c(e)}function f(e,t,n){var r=e.getValue(),i=t.getValue();if(w.assert(r),w.assert(i),null===r.original)return!1;if(!e.canBeFirstInStatement()&&e.firstInStatement()&&!u(t))return!1;if(e.needsParens(!0)&&!p(t))return!1;for(var a in b.getUnionOfKeys(r,i))if("loc"!==a){e.stack.push(a,m.getFieldValue(r,a)),t.stack.push(a,m.getFieldValue(i,a));var s=o(e,t,n);if(e.stack.length-=2,t.stack.length-=2,!s)return!1}return!0}var d=e("assert"),h=e("./lines"),m=e("./types"),y=(m.getFieldValue,m.namedTypes.Printable),g=m.namedTypes.Expression,v=m.namedTypes.SourceLocation,b=e("./util"),E=b.comparePos,S=e("./fast-path"),w=m.builtInTypes.object,x=m.builtInTypes.array,k=m.builtInTypes.string,T=/[0-9a-z_$]/i;n.Patcher=r;var A=r.prototype;A.tryToReprintComments=function(e,t,n){var r=this;if(!e.comments&&!t.comments)return!0;var a=S.from(e),o=S.from(t);a.stack.push("comments",i(e)),o.stack.push("comments",i(t));var l=[],u=s(a,o,l);return u&&l.length>0&&l.forEach(function(e){var t=e.oldPath.getValue();d.ok(t.leading||t.trailing),r.replace(t.loc,n(e.newPath).indentTail(t.loc.indent))}),u},A.deleteComments=function(e){if(e.comments){var t=this;e.comments.forEach(function(n){n.leading?t.replace({start:n.loc.start,end:e.loc.lines.skipSpaces(n.loc.end,!1,!1)},""):n.trailing&&t.replace({start:e.loc.lines.skipSpaces(n.loc.start,!0,!1),end:n.loc.end},"")})}},n.getReprinter=function(e){d.ok(e instanceof S);var t=e.getValue();if(y.check(t)){var n=t.original,i=n&&n.loc,o=i&&i.lines,s=[];if(o&&a(e,s))return function(e){var t=new r(o);return s.forEach(function(n){var r=n.newPath.getValue(),i=n.oldPath.getValue();v.assert(i.loc,!0);var a=!t.tryToReprintComments(r,i,e);a&&t.deleteComments(i);var s=b.copyPos(i.loc.start),l=o.prevPos(s)&&T.test(o.charAt(s)),u=e(n.newPath,a).indentTail(i.loc.indent),c=T.test(o.charAt(i.loc.end));if(l||c){var p=[];l&&p.push(" "),p.push(u),c&&p.push(" "),u=h.concat(p)}t.replace(i.loc,u)}),t.get(i).indentTail(-n.loc.indent)}}};var L={line:1,column:0},C=/\S/},{"./fast-path":58,"./lines":59,"./types":65,"./util":66,assert:2}],64:[function(e,t,n){function r(e,t){E.ok(this instanceof r),P.assert(e),this.code=e,t&&(_.assert(t),this.map=t)}function i(e){function t(e){return E.ok(e instanceof I),S(e,n)}function n(e,n){if(n)return t(e);if(E.ok(e instanceof I),!c){var r=p.tabWidth,i=e.getNode().loc;if(i&&i.lines&&i.lines.guessTabWidth){p.tabWidth=i.lines.guessTabWidth();
+var a=s(e);return p.tabWidth=r,a}}return s(e)}function s(e){var t=A(e);return t?a(e,t(n)):l(e)}function l(e){return o(e,p,t)}function u(e){return o(e,p,u)}E.ok(this instanceof i);var c=e&&e.tabWidth,p=T(e);E.notStrictEqual(p,e),p.sourceFileName=null,this.print=function(e){if(!e)return N;var t=n(I.from(e),!0);return new r(t.toString(p),j.composeSourceMaps(p.inputSourceMap,t.getSourceMap(p.sourceMapName,p.sourceRoot)))},this.printGenerically=function(e){if(!e)return N;var t=I.from(e),n=p.reuseWhitespace;p.reuseWhitespace=!1;var i=new r(u(t).toString(p));return p.reuseWhitespace=n,i}}function a(e,t){return e.needsParens()?k(["(",t,")"]):t}function o(e,t,n){return E.ok(e instanceof I),a(e,s(e,t,n))}function s(e,t,n){var r=e.getValue();if(!r)return x("");if("string"==typeof r)return x(r,t);switch(C.Printable.assert(r),r.type){case"File":return e.call(n,"program");case"Program":return e.call(function(e){return l(e,t,n)},"body");case"Noop":case"EmptyStatement":return x("");case"ExpressionStatement":return k([e.call(n,"expression"),";"]);case"ParenthesizedExpression":return k(["(",e.call(n,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return x(" ").join([e.call(n,"left"),r.operator,e.call(n,"right")]);case"AssignmentPattern":return k([e.call(n,"left"),"=",e.call(n,"right")]);case"MemberExpression":var i=[e.call(n,"object")],a=e.call(n,"property");return r.computed?i.push("[",a,"]"):i.push(".",a),k(i);case"MetaProperty":return k([e.call(n,"meta"),".",e.call(n,"property")]);case"BindExpression":var i=[];return r.object&&i.push(e.call(n,"object")),i.push("::",e.call(n,"callee")),k(i);case"Path":return x(".").join(r.body);case"Identifier":return k([x(r.name,t),e.call(n,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"SpreadProperty":case"SpreadPropertyPattern":case"RestElement":return k(["...",e.call(n,"argument")]);case"FunctionDeclaration":case"FunctionExpression":var i=[];return r.async&&i.push("async "),i.push("function"),r.generator&&i.push("*"),r.id&&i.push(" ",e.call(n,"id"),e.call(n,"typeParameters")),i.push("(",d(e,t,n),")",e.call(n,"returnType")," ",e.call(n,"body")),k(i);case"ArrowFunctionExpression":var i=[];return r.async&&i.push("async "),1!==r.params.length||r.rest||"SpreadElementPattern"===r.params[0].type||"RestElement"===r.params[0].type?i.push("(",d(e,t,n),")"):i.push(e.call(n,"params",0)),i.push(" => ",e.call(n,"body")),k(i);case"MethodDefinition":var i=[];return r.static&&i.push("static "),i.push(c(e,t,n)),k(i);case"YieldExpression":var i=["yield"];return r.delegate&&i.push("*"),r.argument&&i.push(" ",e.call(n,"argument")),k(i);case"AwaitExpression":var i=["await"];return r.all&&i.push("*"),r.argument&&i.push(" ",e.call(n,"argument")),k(i);case"ModuleDeclaration":var i=["module",e.call(n,"id")];return r.source?(E.ok(!r.body),i.push("from",e.call(n,"source"))):i.push(e.call(n,"body")),x(" ").join(i);case"ImportSpecifier":var i=[];return r.imported?(i.push(e.call(n,"imported")),r.local&&r.local.name!==r.imported.name&&i.push(" as ",e.call(n,"local"))):r.id&&(i.push(e.call(n,"id")),r.name&&i.push(" as ",e.call(n,"name"))),k(i);case"ExportSpecifier":var i=[];return r.local?(i.push(e.call(n,"local")),r.exported&&r.exported.name!==r.local.name&&i.push(" as ",e.call(n,"exported"))):r.id&&(i.push(e.call(n,"id")),r.name&&i.push(" as ",e.call(n,"name"))),k(i);case"ExportBatchSpecifier":return x("*");case"ImportNamespaceSpecifier":var i=["* as "];return r.local?i.push(e.call(n,"local")):r.id&&i.push(e.call(n,"id")),k(i);case"ImportDefaultSpecifier":return r.local?e.call(n,"local"):e.call(n,"id");case"ExportDeclaration":var i=["export"];if(r.default)i.push(" default");else if(r.specifiers&&r.specifiers.length>0)return 1===r.specifiers.length&&"ExportBatchSpecifier"===r.specifiers[0].type?i.push(" *"):i.push(" { ",x(", ").join(e.map(n,"specifiers"))," }"),r.source&&i.push(" from ",e.call(n,"source")),i.push(";"),k(i);if(r.declaration){var o=e.call(n,"declaration");i.push(" ",o),";"!==m(o)&&i.push(";")}return k(i);case"ExportDefaultDeclaration":return k(["export default ",e.call(n,"declaration")]);case"ExportNamedDeclaration":var i=["export "];return r.declaration&&i.push(e.call(n,"declaration")),r.specifiers&&r.specifiers.length>0&&i.push(r.declaration?", {":"{",x(", ").join(e.map(n,"specifiers")),"}"),r.source&&i.push(" from ",e.call(n,"source")),k(i);case"ExportAllDeclaration":var i=["export *"];return r.exported&&i.push(" as ",e.call(n,"exported")),k([" from ",e.call(n,"source")]);case"ExportNamespaceSpecifier":return k(["* as ",e.call(n,"exported")]);case"ExportDefaultSpecifier":return e.call(n,"exported");case"ImportDeclaration":var i=["import "];if(r.importKind&&"value"!==r.importKind&&i.push(r.importKind+" "),r.specifiers&&r.specifiers.length>0){var s=!1;e.each(function(e){var t=e.getName();t>0&&i.push(", ");var r=e.getValue();C.ImportDefaultSpecifier.check(r)||C.ImportNamespaceSpecifier.check(r)?E.strictEqual(s,!1):(C.ImportSpecifier.assert(r),s||(s=!0,i.push("{"))),i.push(n(e))},"specifiers"),s&&i.push("}"),i.push(" from ")}return i.push(e.call(n,"source"),";"),k(i);case"BlockStatement":var u=e.call(function(e){return l(e,t,n)},"body");return u.isEmpty()?x("{}"):k(["{\n",u.indent(t.tabWidth),"\n}"]);case"ReturnStatement":var i=["return"];if(r.argument){var g=e.call(n,"argument");g.length>1&&(C.XJSElement&&C.XJSElement.check(r.argument)||C.JSXElement&&C.JSXElement.check(r.argument))?i.push(" (\n",g.indent(t.tabWidth),"\n)"):i.push(" ",g)}return i.push(";"),k(i);case"CallExpression":return k([e.call(n,"callee"),f(e,t,n)]);case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":var b=!1,S="ObjectTypeAnnotation"===r.type,w=S?";":",",T=[];S&&T.push("indexers","callProperties"),T.push("properties");var A=0;T.forEach(function(e){A+=r[e].length});var L=S&&1===A||0===A,i=[L?"{":"{\n"],P=0;return T.forEach(function(r){e.each(function(e){var r=n(e);L||(r=r.indent(t.tabWidth));var a=!S&&r.length>1;a&&b&&i.push("\n"),i.push(r),P<A-1?(i.push(w+(a?"\n\n":"\n")),b=!a):1!==A&&S?i.push(w):t.trailingComma&&i.push(w),P++},r)}),i.push(L?"}":"\n}"),k(i);case"PropertyPattern":return k([e.call(n,"key"),": ",e.call(n,"pattern")]);case"Property":if(r.method||"get"===r.kind||"set"===r.kind)return c(e,t,n);var i=[];r.decorators&&e.each(function(e){i.push(n(e),"\n")},"decorators");var _=e.call(n,"key");return r.computed?i.push("[",_,"]"):i.push(_),r.shorthand||i.push(": ",e.call(n,"value")),k(i);case"Decorator":return k(["@",e.call(n,"expression")]);case"ArrayExpression":case"ArrayPattern":var I=r.elements,A=I.length,j=e.map(n,"elements"),O=x(", ").join(j),L=O.getLineLength(1)<=t.wrapColumn,i=[L?"[":"[\n"];return e.each(function(e){var n=e.getName(),r=e.getValue();if(r){var a=j[n];L?n>0&&i.push(" "):a=a.indent(t.tabWidth),i.push(a),(n<A-1||!L&&t.trailingComma)&&i.push(","),L||i.push("\n")}else i.push(",")},"elements"),i.push("]"),k(i);case"SequenceExpression":return x(", ").join(e.map(n,"expressions"));case"ThisExpression":return x("this");case"Super":return x("super");case"Literal":return"string"!=typeof r.value?x(r.value,t):x(v(r.value,t),t);case"ModuleSpecifier":if(r.local)throw new Error("The ESTree ModuleSpecifier type should be abstract");return x(v(r.value,t),t);case"UnaryExpression":var i=[r.operator];return/[a-z]$/.test(r.operator)&&i.push(" "),i.push(e.call(n,"argument")),k(i);case"UpdateExpression":var i=[e.call(n,"argument"),r.operator];return r.prefix&&i.reverse(),k(i);case"ConditionalExpression":return k(["(",e.call(n,"test")," ? ",e.call(n,"consequent")," : ",e.call(n,"alternate"),")"]);case"NewExpression":var i=["new ",e.call(n,"callee")],M=r.arguments;return M&&i.push(f(e,t,n)),k(i);case"VariableDeclaration":var i=[r.kind," "],N=0,j=e.map(function(e){var t=n(e);return N=Math.max(t.length,N),t},"declarations");1===N?i.push(x(", ").join(j)):j.length>1?i.push(x(",\n").join(j).indentTail(r.kind.length+1)):i.push(j[0]);var D=e.getParentNode();return C.ForStatement.check(D)||C.ForInStatement.check(D)||C.ForOfStatement&&C.ForOfStatement.check(D)||i.push(";"),k(i);case"VariableDeclarator":return r.init?x(" = ").join([e.call(n,"id"),e.call(n,"init")]):e.call(n,"id");case"WithStatement":return k(["with (",e.call(n,"object"),") ",e.call(n,"body")]);case"IfStatement":var R=h(e.call(n,"consequent"),t),i=["if (",e.call(n,"test"),")",R];return r.alternate&&i.push(y(R)?" else":"\nelse",h(e.call(n,"alternate"),t)),k(i);case"ForStatement":var B=e.call(n,"init"),F=B.length>1?";\n":"; ",X="for (",U=x(F).join([B,e.call(n,"test"),e.call(n,"update")]).indentTail(X.length),J=k([X,U,")"]),q=h(e.call(n,"body"),t),i=[J];return J.length>1&&(i.push("\n"),q=q.trimLeft()),i.push(q),k(i);case"WhileStatement":return k(["while (",e.call(n,"test"),")",h(e.call(n,"body"),t)]);case"ForInStatement":return k([r.each?"for each (":"for (",e.call(n,"left")," in ",e.call(n,"right"),")",h(e.call(n,"body"),t)]);case"ForOfStatement":return k(["for (",e.call(n,"left")," of ",e.call(n,"right"),")",h(e.call(n,"body"),t)]);case"DoWhileStatement":var V=k(["do",h(e.call(n,"body"),t)]),i=[V];return y(V)?i.push(" while"):i.push("\nwhile"),i.push(" (",e.call(n,"test"),");"),k(i);case"DoExpression":var z=e.call(function(e){return l(e,t,n)},"body");return k(["do {\n",z.indent(t.tabWidth),"\n}"]);case"BreakStatement":var i=["break"];return r.label&&i.push(" ",e.call(n,"label")),i.push(";"),k(i);case"ContinueStatement":var i=["continue"];return r.label&&i.push(" ",e.call(n,"label")),i.push(";"),k(i);case"LabeledStatement":return k([e.call(n,"label"),":\n",e.call(n,"body")]);case"TryStatement":var i=["try ",e.call(n,"block")];return r.handler?i.push(" ",e.call(n,"handler")):r.handlers&&e.each(function(e){i.push(" ",n(e))},"handlers"),r.finalizer&&i.push(" finally ",e.call(n,"finalizer")),k(i);case"CatchClause":var i=["catch (",e.call(n,"param")];return r.guard&&i.push(" if ",e.call(n,"guard")),i.push(") ",e.call(n,"body")),k(i);case"ThrowStatement":return k(["throw ",e.call(n,"argument"),";"]);case"SwitchStatement":return k(["switch (",e.call(n,"discriminant"),") {\n",x("\n").join(e.map(n,"cases")),"\n}"]);case"SwitchCase":var i=[];return r.test?i.push("case ",e.call(n,"test"),":"):i.push("default:"),r.consequent.length>0&&i.push("\n",e.call(function(e){return l(e,t,n)},"consequent").indent(t.tabWidth)),k(i);case"DebuggerStatement":return x("debugger;");case"XJSAttribute":case"JSXAttribute":var i=[e.call(n,"name")];return r.value&&i.push("=",e.call(n,"value")),k(i);case"XJSIdentifier":case"JSXIdentifier":return x(r.name,t);case"XJSNamespacedName":case"JSXNamespacedName":return x(":").join([e.call(n,"namespace"),e.call(n,"name")]);case"XJSMemberExpression":case"JSXMemberExpression":return x(".").join([e.call(n,"object"),e.call(n,"property")]);case"XJSSpreadAttribute":case"JSXSpreadAttribute":return k(["{...",e.call(n,"argument"),"}"]);case"XJSExpressionContainer":case"JSXExpressionContainer":return k(["{",e.call(n,"expression"),"}"]);case"XJSElement":case"JSXElement":var W=e.call(n,"openingElement");if(r.openingElement.selfClosing)return E.ok(!r.closingElement),W;var $=k(e.map(function(e){var t=e.getValue();if(C.Literal.check(t)&&"string"==typeof t.value){if(/\S/.test(t.value))return t.value.replace(/^\s+|\s+$/g,"");if(/\n/.test(t.value))return"\n"}return n(e)},"children")).indentTail(t.tabWidth),H=e.call(n,"closingElement");return k([W,$,H]);case"XJSOpeningElement":case"JSXOpeningElement":var i=["<",e.call(n,"name")],G=[];e.each(function(e){G.push(" ",n(e))},"attributes");var Y=k(G),K=Y.length>1||Y.getLineLength(1)>t.wrapColumn;return K&&(G.forEach(function(e,t){" "===e&&(E.strictEqual(t%2,0),G[t]="\n")}),Y=k(G).indentTail(t.tabWidth)),i.push(Y,r.selfClosing?" />":">"),k(i);case"XJSClosingElement":case"JSXClosingElement":return k(["</",e.call(n,"name"),">"]);case"XJSText":case"JSXText":return x(r.value,t);case"XJSEmptyExpression":case"JSXEmptyExpression":return x("");case"TypeAnnotatedIdentifier":return k([e.call(n,"annotation")," ",e.call(n,"identifier")]);case"ClassBody":return 0===r.body.length?x("{}"):k(["{\n",e.call(function(e){return l(e,t,n)},"body").indent(t.tabWidth),"\n}"]);case"ClassPropertyDefinition":var i=["static ",e.call(n,"definition")];return C.MethodDefinition.check(r.definition)||i.push(";"),k(i);case"ClassProperty":var i=[];return r.static&&i.push("static "),i.push(e.call(n,"key")),r.typeAnnotation&&i.push(e.call(n,"typeAnnotation")),r.value&&i.push(" = ",e.call(n,"value")),i.push(";"),k(i);case"ClassDeclaration":case"ClassExpression":var i=["class"];return r.id&&i.push(" ",e.call(n,"id"),e.call(n,"typeParameters")),r.superClass&&i.push(" extends ",e.call(n,"superClass"),e.call(n,"superTypeParameters")),r.implements&&i.push(" implements ",x(", ").join(e.map(n,"implements"))),i.push(" ",e.call(n,"body")),k(i);case"TemplateElement":return x(r.value.raw,t);case"TemplateLiteral":var Q=e.map(n,"expressions"),i=["`"];return e.each(function(e){var t=e.getName();i.push(n(e)),t<Q.length&&i.push("${",Q[t],"}")},"quasis"),i.push("`"),k(i);case"TaggedTemplateExpression":return k([e.call(n,"tag"),e.call(n,"quasi")]);case"Node":case"Printable":case"SourceLocation":case"Position":case"Statement":case"Function":case"Pattern":case"Expression":case"Declaration":case"Specifier":case"NamedSpecifier":case"Comment":case"MemberTypeAnnotation":case"TupleTypeAnnotation":case"Type":throw new Error("unprintable type: "+JSON.stringify(r.type));case"CommentBlock":case"Block":return k(["/*",x(r.value,t),"*/"]);case"CommentLine":case"Line":return k(["//",x(r.value,t)]);case"TypeAnnotation":var i=[];return r.typeAnnotation?("FunctionTypeAnnotation"!==r.typeAnnotation.type&&i.push(": "),i.push(e.call(n,"typeAnnotation")),k(i)):x("");case"AnyTypeAnnotation":return x("any",t);case"MixedTypeAnnotation":return x("mixed",t);case"ArrayTypeAnnotation":return k([e.call(n,"elementType"),"[]"]);case"BooleanTypeAnnotation":return x("boolean",t);case"BooleanLiteralTypeAnnotation":return E.strictEqual(typeof r.value,"boolean"),x(""+r.value,t);case"DeclareClass":return k([x("declare class ",t),e.call(n,"id")," ",e.call(n,"body")]);case"DeclareFunction":return k([x("declare function ",t),e.call(n,"id"),";"]);case"DeclareModule":return k([x("declare module ",t),e.call(n,"id")," ",e.call(n,"body")]);case"DeclareVariable":return k([x("declare var ",t),e.call(n,"id"),";"]);case"FunctionTypeAnnotation":var i=[],Z=e.getParentNode(0),ee=!(C.ObjectTypeCallProperty.check(Z)||C.DeclareFunction.check(e.getParentNode(2))),te=ee&&!C.FunctionTypeParam.check(Z);return te&&i.push(": "),i.push("(",x(", ").join(e.map(n,"params")),")"),r.returnType&&i.push(ee?" => ":": ",e.call(n,"returnType")),k(i);case"FunctionTypeParam":return k([e.call(n,"name"),": ",e.call(n,"typeAnnotation")]);case"GenericTypeAnnotation":return k([e.call(n,"id"),e.call(n,"typeParameters")]);case"InterfaceDeclaration":var i=[x("interface ",t),e.call(n,"id"),e.call(n,"typeParameters")," "];return r.extends&&i.push("extends ",x(", ").join(e.map(n,"extends"))),i.push(" ",e.call(n,"body")),k(i);case"ClassImplements":case"InterfaceExtends":return k([e.call(n,"id"),e.call(n,"typeParameters")]);case"IntersectionTypeAnnotation":return x(" & ").join(e.map(n,"types"));case"NullableTypeAnnotation":return k(["?",e.call(n,"typeAnnotation")]);case"NumberTypeAnnotation":return x("number",t);case"ObjectTypeCallProperty":return e.call(n,"value");case"ObjectTypeIndexer":return k(["[",e.call(n,"id"),": ",e.call(n,"key"),"]: ",e.call(n,"value")]);case"ObjectTypeProperty":return k([e.call(n,"key"),": ",e.call(n,"value")]);case"QualifiedTypeIdentifier":return k([e.call(n,"qualification"),".",e.call(n,"id")]);case"StringLiteralTypeAnnotation":return x(v(r.value,t),t);case"NumberLiteralTypeAnnotation":return E.strictEqual(typeof r.value,"number"),x(""+r.value,t);case"StringTypeAnnotation":return x("string",t);case"TypeAlias":return k(["type ",e.call(n,"id")," = ",e.call(n,"right"),";"]);case"TypeCastExpression":return k(["(",e.call(n,"expression"),e.call(n,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return k(["<",x(", ").join(e.map(n,"params")),">"]);case"TypeofTypeAnnotation":return k([x("typeof ",t),e.call(n,"argument")]);case"UnionTypeAnnotation":return x(" | ").join(e.map(n,"types"));case"VoidTypeAnnotation":return x("void",t);case"ClassHeritage":case"ComprehensionBlock":case"ComprehensionExpression":case"Glob":case"GeneratorExpression":case"LetStatement":case"LetExpression":case"GraphExpression":case"GraphIndexExpression":case"XMLDefaultDeclaration":case"XMLAnyName":case"XMLQualifiedIdentifier":case"XMLFunctionQualifiedIdentifier":case"XMLAttributeSelector":case"XMLFilterExpression":case"XML":case"XMLElement":case"XMLList":case"XMLEscape":case"XMLText":case"XMLStartTag":case"XMLEndTag":case"XMLPointTag":case"XMLName":case"XMLAttribute":case"XMLCdata":case"XMLComment":case"XMLProcessingInstruction":default:throw new Error("unknown type: "+JSON.stringify(r.type))}return p}function l(e,t,n){var r=C.ClassBody&&C.ClassBody.check(e.getParentNode()),i=[],a=!1,o=!1;e.each(function(e){var t=(e.getName(),e.getValue());t&&"EmptyStatement"!==t.type&&(C.Comment.check(t)?a=!0:r||(C.Statement.assert(t),o=!0),i.push({node:t,printed:n(e)}))}),a&&E.strictEqual(o,!1,"Comments may appear as statements in otherwise empty statement lists, but may not coexist with non-Comment nodes.");var s=null,l=i.length,c=[];return i.forEach(function(e,n){var r,i,a=e.printed,o=e.node,p=a.length>1,f=n>0,d=n<l-1,h=o&&o.loc&&o.loc.lines,m=h&&t.reuseWhitespace&&j.getTrueLoc(o,h);if(f)if(m){var y=h.skipSpaces(m.start,!0),g=y?y.line:1,v=m.start.line-g;r=Array(v+1).join("\n")}else r=p?"\n\n":"\n";else r="";if(d)if(m){var b=h.skipSpaces(m.end),E=b?b.line:h.length,S=E-m.end.line;i=Array(S+1).join("\n")}else i=p?"\n\n":"\n";else i="";c.push(u(s,r),a),d?s=i:i&&c.push(i)}),k(c)}function u(e,t){if(!e&&!t)return x("");if(!e)return x(t);if(!t)return x(e);var n=x(e),r=x(t);return r.length>n.length?r:n}function c(e,t,n){var r=e.getNode(),i=r.kind,a=[];C.FunctionExpression.assert(r.value),r.decorators&&e.each(function(e){a.push(n(e),"\n")},"decorators"),r.value.async&&a.push("async "),i&&"init"!==i&&"method"!==i&&"constructor"!==i?(E.ok("get"===i||"set"===i),a.push(i," ")):r.value.generator&&a.push("*");var o=e.call(n,"key");return r.computed&&(o=k(["[",o,"]"])),a.push(o,e.call(n,"value","typeParameters"),"(",e.call(function(e){return d(e,t,n)},"value"),")",e.call(n,"value","returnType")," ",e.call(n,"value","body")),k(a)}function f(e,t,n){var r=e.map(n,"arguments"),i=x(", ").join(r);return i.getLineLength(1)>t.wrapColumn?(i=x(",\n").join(r),k(["(\n",i.indent(t.tabWidth),t.trailingComma?",\n)":"\n)"])):k(["(",i,")"])}function d(e,t,n){var r=e.getValue();C.Function.assert(r);var i=e.map(n,"params");r.defaults&&e.each(function(e){var t=e.getName(),r=i[t];r&&e.getValue()&&(i[t]=k([r,"=",n(e)]))},"defaults"),r.rest&&i.push(k(["...",e.call(n,"rest")]));var a=x(", ").join(i);return a.length>1||a.getLineLength(1)>t.wrapColumn?(a=x(",\n").join(i),t.trailingComma&&!r.rest&&(a=k([a,",\n"])),k(["\n",a.indent(t.tabWidth)])):a}function h(e,t){return k(e.length>1?[" ",e]:["\n",b(e).indent(t.tabWidth)])}function m(e){var t=e.lastPos();do{var n=e.charAt(t);if(/\S/.test(n))return n}while(e.prevPos(t))}function y(e){return"}"===m(e)}function g(e){return e.replace(/['"]/g,function(e){return'"'===e?"'":'"'})}function v(e,t){switch(P.assert(e),t.quote){case"auto":var n=JSON.stringify(e),r=g(JSON.stringify(g(e)));return n.length>r.length?r:n;case"single":return g(JSON.stringify(g(e)));case"double":default:return JSON.stringify(e)}}function b(e){var t=m(e);return!t||"\n};".indexOf(t)<0?k([e,";"]):e}var E=e("assert"),S=(e("source-map"),e("./comments").printComments),w=e("./lines"),x=w.fromString,k=w.concat,T=e("./options").normalize,A=e("./patcher").getReprinter,L=e("./types"),C=L.namedTypes,P=L.builtInTypes.string,_=L.builtInTypes.object,I=e("./fast-path"),j=e("./util"),O=r.prototype,M=!1;O.toString=function(){return M||(console.warn("Deprecation warning: recast.print now returns an object with a .code property. You appear to be treating the object as a string, which might still work but is strongly discouraged."),M=!0),this.code};var N=new r("");n.Printer=i},{"./comments":57,"./fast-path":58,"./lines":59,"./options":61,"./patcher":63,"./types":65,"./util":66,assert:2,"source-map":94}],65:[function(e,t,n){t.exports=e("ast-types")},{"ast-types":83}],66:[function(e,t,n){function r(){for(var e={},t=arguments.length,n=0;n<t;++n)for(var r=Object.keys(arguments[n]),i=r.length,a=0;a<i;++a)e[r[a]]=!0;return e}function i(e,t){return e.line-t.line||e.column-t.column}function a(e){return{line:e.line,column:e.column}}var o=(e("assert"),e("./types")),s=(o.getFieldValue,o.namedTypes),l=e("source-map"),u=l.SourceMapConsumer,c=l.SourceMapGenerator,p=Object.prototype.hasOwnProperty;n.getUnionOfKeys=r,n.comparePos=i,n.copyPos=a,n.composeSourceMaps=function(e,t){if(!e)return t||null;if(!t)return e;var n=new u(e),r=new u(t),i=new c({file:t.file,sourceRoot:t.sourceRoot}),o={};return r.eachMapping(function(e){var t=n.originalPositionFor({line:e.originalLine,column:e.originalColumn}),r=t.source;if(null!==r){i.addMapping({source:r,original:a(t),generated:{line:e.generatedLine,column:e.generatedColumn},name:e.name});var s=n.sourceContentFor(r);s&&!p.call(o,r)&&(o[r]=s,i.setSourceContent(r,s))}}),i.toJSON()},n.getTrueLoc=function(e,t){if(!e.loc)return null;var n=e.loc.start,r=e.loc.end;return e.comments&&e.comments.forEach(function(e){e.loc&&(i(e.loc.start,n)<0&&(n=e.loc.start),i(r,e.loc.end)<0&&(r=e.loc.end))}),{start:t.skipSpaces(n,!1,!1),end:t.skipSpaces(r,!0,!1)}},n.fixFaultyLocations=function(e){(s.MethodDefinition&&s.MethodDefinition.check(e)||s.Property.check(e)&&(e.method||e.shorthand))&&(e.value.loc=null,s.FunctionExpression.check(e.value)&&(e.value.id=null));var t=e.loc;t&&(t.start.line<1&&(t.start.line=1),t.end.line<1&&(t.end.line=1))}},{"./types":65,assert:2,"source-map":94}],67:[function(e,t,n){(function(t){function r(e,t){return new p(t).print(e)}function i(e,t){return new p(t).printGenerically(e)}function a(e,n){return o(t.argv[2],e,n)}function o(t,n,r){e("fs").readFile(t,"utf-8",function(e,t){return e?void console.error(e):void l(t,n,r)})}function s(e){t.stdout.write(e)}function l(e,t,n){var i=n&&n.writeback||s;t(c(e,n),function(e){i(r(e,n).code)})}var u=e("./lib/types"),c=e("./lib/parser").parse,p=e("./lib/printer").Printer;Object.defineProperties(n,{parse:{enumerable:!0,value:c},visit:{enumerable:!0,value:u.visit},print:{enumerable:!0,value:r},prettyPrint:{enumerable:!1,value:i},types:{enumerable:!1,value:u},run:{enumerable:!1,value:a}})}).call(this,e("_process"))},{"./lib/parser":62,"./lib/printer":64,"./lib/types":65,_process:13,fs:1}],68:[function(e,t,n){e("./es7");var r=e("../lib/types"),i=e("../lib/shared").defaults,a=r.Type.def,o=r.Type.or;a("Noop").bases("Node").build(),a("DoExpression").bases("Expression").build("body").field("body",[a("Statement")]),a("Super").bases("Expression").build(),a("BindExpression").bases("Expression").build("object","callee").field("object",o(a("Expression"),null)).field("callee",a("Expression")),a("Decorator").bases("Node").build("expression").field("expression",a("Expression")),a("Property").field("decorators",o([a("Decorator")],null),i.null),a("MethodDefinition").field("decorators",o([a("Decorator")],null),i.null),a("MetaProperty").bases("Expression").build("meta","property").field("meta",a("Identifier")).field("property",a("Identifier")),a("ParenthesizedExpression").bases("Expression").build("expression").field("expression",a("Expression")),a("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",a("Identifier")),a("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),a("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),a("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",o(a("Declaration"),a("Expression"))),a("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",o(a("Declaration"),null)).field("specifiers",[a("ExportSpecifier")],i.emptyArray).field("source",o(a("Literal"),null),i.null),a("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",a("Identifier")),a("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",a("Identifier")),a("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",a("Identifier")),a("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",o(a("Identifier"),null)).field("source",a("Literal")),a("CommentBlock").bases("Comment").build("value","leading","trailing"),a("CommentLine").bases("Comment").build("value","leading","trailing")},{"../lib/shared":81,"../lib/types":82,"./es7":72}],69:[function(e,t,n){var r=e("../lib/types"),i=r.Type,a=i.def,o=i.or,s=e("../lib/shared"),l=s.defaults,u=s.geq;a("Printable").field("loc",o(a("SourceLocation"),null),l.null,!0),a("Node").bases("Printable").field("type",String).field("comments",o([a("Comment")],null),l.null,!0),a("SourceLocation").build("start","end","source").field("start",a("Position")).field("end",a("Position")).field("source",o(String,null),l.null),a("Position").build("line","column").field("line",u(1)).field("column",u(0)),a("File").bases("Node").build("program").field("program",a("Program")),a("Program").bases("Node").build("body").field("body",[a("Statement")]),a("Function").bases("Node").field("id",o(a("Identifier"),null),l.null).field("params",[a("Pattern")]).field("body",a("BlockStatement")),a("Statement").bases("Node"),a("EmptyStatement").bases("Statement").build(),a("BlockStatement").bases("Statement").build("body").field("body",[a("Statement")]),a("ExpressionStatement").bases("Statement").build("expression").field("expression",a("Expression")),a("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",a("Expression")).field("consequent",a("Statement")).field("alternate",o(a("Statement"),null),l.null),a("LabeledStatement").bases("Statement").build("label","body").field("label",a("Identifier")).field("body",a("Statement")),a("BreakStatement").bases("Statement").build("label").field("label",o(a("Identifier"),null),l.null),a("ContinueStatement").bases("Statement").build("label").field("label",o(a("Identifier"),null),l.null),a("WithStatement").bases("Statement").build("object","body").field("object",a("Expression")).field("body",a("Statement")),a("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",a("Expression")).field("cases",[a("SwitchCase")]).field("lexical",Boolean,l.false),a("ReturnStatement").bases("Statement").build("argument").field("argument",o(a("Expression"),null)),a("ThrowStatement").bases("Statement").build("argument").field("argument",a("Expression")),a("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",a("BlockStatement")).field("handler",o(a("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[a("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[a("CatchClause")],l.emptyArray).field("finalizer",o(a("BlockStatement"),null),l.null),a("CatchClause").bases("Node").build("param","guard","body").field("param",a("Pattern")).field("guard",o(a("Expression"),null),l.null).field("body",a("BlockStatement")),a("WhileStatement").bases("Statement").build("test","body").field("test",a("Expression")).field("body",a("Statement")),a("DoWhileStatement").bases("Statement").build("body","test").field("body",a("Statement")).field("test",a("Expression")),a("ForStatement").bases("Statement").build("init","test","update","body").field("init",o(a("VariableDeclaration"),a("Expression"),null)).field("test",o(a("Expression"),null)).field("update",o(a("Expression"),null)).field("body",a("Statement")),a("ForInStatement").bases("Statement").build("left","right","body").field("left",o(a("VariableDeclaration"),a("Expression"))).field("right",a("Expression")).field("body",a("Statement")),a("DebuggerStatement").bases("Statement").build(),a("Declaration").bases("Statement"),a("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",a("Identifier")),a("FunctionExpression").bases("Function","Expression").build("id","params","body"),a("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",o("var","let","const")).field("declarations",[a("VariableDeclarator")]),a("VariableDeclarator").bases("Node").build("id","init").field("id",a("Pattern")).field("init",o(a("Expression"),null)),a("Expression").bases("Node","Pattern"),a("ThisExpression").bases("Expression").build(),a("ArrayExpression").bases("Expression").build("elements").field("elements",[o(a("Expression"),null)]),a("ObjectExpression").bases("Expression").build("properties").field("properties",[a("Property")]),a("Property").bases("Node").build("kind","key","value").field("kind",o("init","get","set")).field("key",o(a("Literal"),a("Identifier"))).field("value",a("Expression")),a("SequenceExpression").bases("Expression").build("expressions").field("expressions",[a("Expression")]);var c=o("-","+","!","~","typeof","void","delete");a("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",c).field("argument",a("Expression")).field("prefix",Boolean,l.true);var p=o("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");a("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",p).field("left",a("Expression")).field("right",a("Expression"));var f=o("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");a("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",f).field("left",a("Pattern")).field("right",a("Expression"));var d=o("++","--");a("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",d).field("argument",a("Expression")).field("prefix",Boolean);var h=o("||","&&");a("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",a("Expression")).field("right",a("Expression")),a("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",a("Expression")).field("consequent",a("Expression")).field("alternate",a("Expression")),a("NewExpression").bases("Expression").build("callee","arguments").field("callee",a("Expression")).field("arguments",[a("Expression")]),a("CallExpression").bases("Expression").build("callee","arguments").field("callee",a("Expression")).field("arguments",[a("Expression")]),a("MemberExpression").bases("Expression").build("object","property","computed").field("object",a("Expression")).field("property",o(a("Identifier"),a("Expression"))).field("computed",Boolean,l.false),a("Pattern").bases("Node"),a("SwitchCase").bases("Node").build("test","consequent").field("test",o(a("Expression"),null)).field("consequent",[a("Statement")]),a("Identifier").bases("Node","Expression","Pattern").build("name").field("name",String),a("Literal").bases("Node","Expression").build("value").field("value",o(String,Boolean,null,Number,RegExp)).field("regex",o({pattern:String,flags:String},null),function(){if(this.value instanceof RegExp){var e="";return this.value.ignoreCase&&(e+="i"),this.value.multiline&&(e+="m"),this.value.global&&(e+="g"),{pattern:this.value.source,flags:e}}return null}),a("Comment").bases("Printable").field("value",String).field("leading",Boolean,l.true).field("trailing",Boolean,l.false)},{"../lib/shared":81,"../lib/types":82}],70:[function(e,t,n){e("./core");var r=e("../lib/types"),i=r.Type.def,a=r.Type.or;i("XMLDefaultDeclaration").bases("Declaration").field("namespace",i("Expression")),i("XMLAnyName").bases("Expression"),i("XMLQualifiedIdentifier").bases("Expression").field("left",a(i("Identifier"),i("XMLAnyName"))).field("right",a(i("Identifier"),i("Expression"))).field("computed",Boolean),
+i("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",a(i("Identifier"),i("Expression"))).field("computed",Boolean),i("XMLAttributeSelector").bases("Expression").field("attribute",i("Expression")),i("XMLFilterExpression").bases("Expression").field("left",i("Expression")).field("right",i("Expression")),i("XMLElement").bases("XML","Expression").field("contents",[i("XML")]),i("XMLList").bases("XML","Expression").field("contents",[i("XML")]),i("XML").bases("Node"),i("XMLEscape").bases("XML").field("expression",i("Expression")),i("XMLText").bases("XML").field("text",String),i("XMLStartTag").bases("XML").field("contents",[i("XML")]),i("XMLEndTag").bases("XML").field("contents",[i("XML")]),i("XMLPointTag").bases("XML").field("contents",[i("XML")]),i("XMLName").bases("XML").field("contents",a(String,[i("XML")])),i("XMLAttribute").bases("XML").field("value",String),i("XMLCdata").bases("XML").field("contents",String),i("XMLComment").bases("XML").field("contents",String),i("XMLProcessingInstruction").bases("XML").field("target",String).field("contents",a(String,null))},{"../lib/types":82,"./core":69}],71:[function(e,t,n){e("./core");var r=e("../lib/types"),i=r.Type.def,a=r.Type.or,o=e("../lib/shared").defaults;i("Function").field("generator",Boolean,o.false).field("expression",Boolean,o.false).field("defaults",[a(i("Expression"),null)],o.emptyArray).field("rest",a(i("Identifier"),null),o.null),i("RestElement").bases("Pattern").build("argument").field("argument",i("Pattern")),i("SpreadElementPattern").bases("Pattern").build("argument").field("argument",i("Pattern")),i("FunctionDeclaration").build("id","params","body","generator","expression"),i("FunctionExpression").build("id","params","body","generator","expression"),i("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,o.null).field("body",a(i("BlockStatement"),i("Expression"))).field("generator",!1,o.false),i("YieldExpression").bases("Expression").build("argument","delegate").field("argument",a(i("Expression"),null)).field("delegate",Boolean,o.false),i("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",i("Expression")).field("blocks",[i("ComprehensionBlock")]).field("filter",a(i("Expression"),null)),i("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",i("Expression")).field("blocks",[i("ComprehensionBlock")]).field("filter",a(i("Expression"),null)),i("ComprehensionBlock").bases("Node").build("left","right","each").field("left",i("Pattern")).field("right",i("Expression")).field("each",Boolean),i("Property").field("key",a(i("Literal"),i("Identifier"),i("Expression"))).field("value",a(i("Expression"),i("Pattern"))).field("method",Boolean,o.false).field("shorthand",Boolean,o.false).field("computed",Boolean,o.false),i("PropertyPattern").bases("Pattern").build("key","pattern").field("key",a(i("Literal"),i("Identifier"),i("Expression"))).field("pattern",i("Pattern")).field("computed",Boolean,o.false),i("ObjectPattern").bases("Pattern").build("properties").field("properties",[a(i("PropertyPattern"),i("Property"))]),i("ArrayPattern").bases("Pattern").build("elements").field("elements",[a(i("Pattern"),null)]),i("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",a("constructor","method","get","set")).field("key",a(i("Literal"),i("Identifier"),i("Expression"))).field("value",i("Function")).field("computed",Boolean,o.false).field("static",Boolean,o.false),i("SpreadElement").bases("Node").build("argument").field("argument",i("Expression")),i("ArrayExpression").field("elements",[a(i("Expression"),i("SpreadElement"),i("RestElement"),null)]),i("NewExpression").field("arguments",[a(i("Expression"),i("SpreadElement"))]),i("CallExpression").field("arguments",[a(i("Expression"),i("SpreadElement"))]),i("AssignmentPattern").bases("Pattern").build("left","right").field("left",i("Pattern")).field("right",i("Expression"));var s=a(i("MethodDefinition"),i("VariableDeclarator"),i("ClassPropertyDefinition"),i("ClassProperty"));i("ClassProperty").bases("Declaration").build("key").field("key",a(i("Literal"),i("Identifier"),i("Expression"))).field("computed",Boolean,o.false),i("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",s),i("ClassBody").bases("Declaration").build("body").field("body",[s]),i("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",a(i("Identifier"),null)).field("body",i("ClassBody")).field("superClass",a(i("Expression"),null),o.null),i("ClassExpression").bases("Expression").build("id","body","superClass").field("id",a(i("Identifier"),null),o.null).field("body",i("ClassBody")).field("superClass",a(i("Expression"),null),o.null).field("implements",[i("ClassImplements")],o.emptyArray),i("ClassImplements").bases("Node").build("id").field("id",i("Identifier")).field("superClass",a(i("Expression"),null),o.null),i("Specifier").bases("Node"),i("ModuleSpecifier").bases("Specifier").field("local",a(i("Identifier"),null),o.null).field("id",a(i("Identifier"),null),o.null).field("name",a(i("Identifier"),null),o.null),i("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",i("Expression")).field("quasi",i("TemplateLiteral")),i("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[i("TemplateElement")]).field("expressions",[i("Expression")]),i("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean)},{"../lib/shared":81,"../lib/types":82,"./core":69}],72:[function(e,t,n){e("./es6");var r=e("../lib/types"),i=r.Type.def,a=r.Type.or,o=(r.builtInTypes,e("../lib/shared").defaults);i("Function").field("async",Boolean,o.false),i("SpreadProperty").bases("Node").build("argument").field("argument",i("Expression")),i("ObjectExpression").field("properties",[a(i("Property"),i("SpreadProperty"))]),i("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",i("Pattern")),i("ObjectPattern").field("properties",[a(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"))]),i("AwaitExpression").bases("Expression").build("argument","all").field("argument",a(i("Expression"),null)).field("all",Boolean,o.false)},{"../lib/shared":81,"../lib/types":82,"./es6":71}],73:[function(e,t,n){e("./es7");var r=e("../lib/types"),i=e("../lib/shared").defaults,a=r.Type.def,o=r.Type.or;a("VariableDeclaration").field("declarations",[o(a("VariableDeclarator"),a("Identifier"))]),a("Property").field("value",o(a("Expression"),a("Pattern"))),a("ArrayPattern").field("elements",[o(a("Pattern"),a("SpreadElement"),null)]),a("ObjectPattern").field("properties",[o(a("Property"),a("PropertyPattern"),a("SpreadPropertyPattern"),a("SpreadProperty"))]),a("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),a("ExportBatchSpecifier").bases("Specifier").build(),a("ImportSpecifier").bases("ModuleSpecifier").build("id","name"),a("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("id"),a("ImportDefaultSpecifier").bases("ModuleSpecifier").build("id"),a("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",o(a("Declaration"),a("Expression"),null)).field("specifiers",[o(a("ExportSpecifier"),a("ExportBatchSpecifier"))],i.emptyArray).field("source",o(a("Literal"),null),i.null),a("ImportDeclaration").bases("Declaration").build("specifiers","source").field("specifiers",[o(a("ImportSpecifier"),a("ImportNamespaceSpecifier"),a("ImportDefaultSpecifier"))],i.emptyArray).field("source",a("Literal")),a("Block").bases("Comment").build("value","leading","trailing"),a("Line").bases("Comment").build("value","leading","trailing")},{"../lib/shared":81,"../lib/types":82,"./es7":72}],74:[function(e,t,n){e("./es7");var r=e("../lib/types"),i=r.Type.def,a=r.Type.or,o=e("../lib/shared").defaults;i("JSXAttribute").bases("Node").build("name","value").field("name",a(i("JSXIdentifier"),i("JSXNamespacedName"))).field("value",a(i("Literal"),i("JSXExpressionContainer"),null),o.null),i("JSXIdentifier").bases("Identifier").build("name").field("name",String),i("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",i("JSXIdentifier")).field("name",i("JSXIdentifier")),i("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",a(i("JSXIdentifier"),i("JSXMemberExpression"))).field("property",i("JSXIdentifier")).field("computed",Boolean,o.false);var s=a(i("JSXIdentifier"),i("JSXNamespacedName"),i("JSXMemberExpression"));i("JSXSpreadAttribute").bases("Node").build("argument").field("argument",i("Expression"));var l=[a(i("JSXAttribute"),i("JSXSpreadAttribute"))];i("JSXExpressionContainer").bases("Expression").build("expression").field("expression",i("Expression")),i("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",i("JSXOpeningElement")).field("closingElement",a(i("JSXClosingElement"),null),o.null).field("children",[a(i("JSXElement"),i("JSXExpressionContainer"),i("JSXText"),i("Literal"))],o.emptyArray).field("name",s,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",l,function(){return this.openingElement.attributes},!0),i("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",s).field("attributes",l,o.emptyArray).field("selfClosing",Boolean,o.false),i("JSXClosingElement").bases("Node").build("name").field("name",s),i("JSXText").bases("Literal").build("value").field("value",String),i("JSXEmptyExpression").bases("Expression").build(),i("Type").bases("Node"),i("AnyTypeAnnotation").bases("Type").build(),i("MixedTypeAnnotation").bases("Type").build(),i("VoidTypeAnnotation").bases("Type").build(),i("NumberTypeAnnotation").bases("Type").build(),i("NumberLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),i("StringTypeAnnotation").bases("Type").build(),i("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",String).field("raw",String),i("BooleanTypeAnnotation").bases("Type").build(),i("BooleanLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Boolean).field("raw",String),i("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",i("Type")),i("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",i("Type")),i("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[i("FunctionTypeParam")]).field("returnType",i("Type")).field("rest",a(i("FunctionTypeParam"),null)).field("typeParameters",a(i("TypeParameterDeclaration"),null)),i("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",i("Identifier")).field("typeAnnotation",i("Type")).field("optional",Boolean),i("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",i("Type")),i("ObjectTypeAnnotation").bases("Type").build("properties").field("properties",[i("ObjectTypeProperty")]).field("indexers",[i("ObjectTypeIndexer")],o.emptyArray).field("callProperties",[i("ObjectTypeCallProperty")],o.emptyArray),i("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",a(i("Literal"),i("Identifier"))).field("value",i("Type")).field("optional",Boolean),i("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",i("Identifier")).field("key",i("Type")).field("value",i("Type")),i("ObjectTypeCallProperty").bases("Node").build("value").field("value",i("FunctionTypeAnnotation")).field("static",Boolean,!1),i("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",a(i("Identifier"),i("QualifiedTypeIdentifier"))).field("id",i("Identifier")),i("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",a(i("Identifier"),i("QualifiedTypeIdentifier"))).field("typeParameters",a(i("TypeParameterInstantiation"),null)),i("MemberTypeAnnotation").bases("Type").build("object","property").field("object",i("Identifier")).field("property",a(i("MemberTypeAnnotation"),i("GenericTypeAnnotation"))),i("UnionTypeAnnotation").bases("Type").build("types").field("types",[i("Type")]),i("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[i("Type")]),i("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",i("Type")),i("Identifier").field("typeAnnotation",a(i("TypeAnnotation"),null),o.null),i("TypeParameterDeclaration").bases("Node").build("params").field("params",[i("Identifier")]),i("TypeParameterInstantiation").bases("Node").build("params").field("params",[i("Type")]),i("Function").field("returnType",a(i("TypeAnnotation"),null),o.null).field("typeParameters",a(i("TypeParameterDeclaration"),null),o.null),i("ClassProperty").build("key","value","typeAnnotation","static").field("value",a(i("Expression"),null)).field("typeAnnotation",a(i("TypeAnnotation"),null)).field("static",Boolean,o.false),i("ClassImplements").field("typeParameters",a(i("TypeParameterInstantiation"),null),o.null),i("InterfaceDeclaration").bases("Statement").build("id","body","extends").field("id",i("Identifier")).field("typeParameters",a(i("TypeParameterDeclaration"),null),o.null).field("body",i("ObjectTypeAnnotation")).field("extends",[i("InterfaceExtends")]),i("InterfaceExtends").bases("Node").build("id").field("id",i("Identifier")).field("typeParameters",a(i("TypeParameterInstantiation"),null)),i("TypeAlias").bases("Statement").build("id","typeParameters","right").field("id",i("Identifier")).field("typeParameters",a(i("TypeParameterDeclaration"),null)).field("right",i("Type")),i("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",i("Expression")).field("typeAnnotation",i("TypeAnnotation")),i("TupleTypeAnnotation").bases("Type").build("types").field("types",[i("Type")]),i("DeclareVariable").bases("Statement").build("id").field("id",i("Identifier")),i("DeclareFunction").bases("Statement").build("id").field("id",i("Identifier")),i("DeclareClass").bases("InterfaceDeclaration").build("id"),i("DeclareModule").bases("Statement").build("id","body").field("id",a(i("Identifier"),i("Literal"))).field("body",i("BlockStatement"))},{"../lib/shared":81,"../lib/types":82,"./es7":72}],75:[function(e,t,n){e("./core");var r=e("../lib/types"),i=r.Type.def,a=r.Type.or,o=e("../lib/shared"),s=o.geq,l=o.defaults;i("Function").field("body",a(i("BlockStatement"),i("Expression"))),i("ForInStatement").build("left","right","body","each").field("each",Boolean,l.false),i("ForOfStatement").bases("Statement").build("left","right","body").field("left",a(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement")),i("LetStatement").bases("Statement").build("head","body").field("head",[i("VariableDeclarator")]).field("body",i("Statement")),i("LetExpression").bases("Expression").build("head","body").field("head",[i("VariableDeclarator")]).field("body",i("Expression")),i("GraphExpression").bases("Expression").build("index","expression").field("index",s(0)).field("expression",i("Literal")),i("GraphIndexExpression").bases("Expression").build("index").field("index",s(0))},{"../lib/shared":81,"../lib/types":82,"./core":69}],76:[function(e,t,n){function r(e,t,n){return p.check(n)?n.length=0:n=null,a(e,t,n)}function i(e){return/[_$a-z][_$a-z0-9]*/i.test(e)?"."+e:"["+JSON.stringify(e)+"]"}function a(e,t,n){return e===t||(p.check(e)?o(e,t,n):f.check(e)?s(e,t,n):d.check(e)?d.check(t)&&+e===+t:h.check(e)?h.check(t)&&e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.ignoreCase===t.ignoreCase:e==t)}function o(e,t,n){p.assert(e);var r=e.length;if(!p.check(t)||t.length!==r)return n&&n.push("length"),!1;for(var i=0;i<r;++i){if(n&&n.push(i),i in e!=i in t)return!1;if(!a(e[i],t[i],n))return!1;if(n){var o=n.pop();if(o!==i)throw new Error(""+o)}}return!0}function s(e,t,n){if(f.assert(e),!f.check(t))return!1;if(e.type!==t.type)return n&&n.push("type"),!1;var r=u(e),i=r.length,o=u(t),s=o.length;if(i===s){for(var l=0;l<i;++l){var p=r[l],d=c(e,p),h=c(t,p);if(n&&n.push(p),!a(d,h,n))return!1;if(n){var y=n.pop();if(y!==p)throw new Error(""+y)}}return!0}if(!n)return!1;var g=Object.create(null);for(l=0;l<i;++l)g[r[l]]=!0;for(l=0;l<s;++l){if(p=o[l],!m.call(g,p))return n.push(p),!1;delete g[p]}for(p in g){n.push(p);break}return!1}var l=e("../main"),u=l.getFieldNames,c=l.getFieldValue,p=l.builtInTypes.array,f=l.builtInTypes.object,d=l.builtInTypes.Date,h=l.builtInTypes.RegExp,m=Object.prototype.hasOwnProperty;r.assert=function(e,t){var n=[];if(!r(e,t,n)){if(0!==n.length)throw new Error("Nodes differ in the following path: "+n.map(i).join(""));if(e!==t)throw new Error("Nodes must be equal")}},t.exports=r},{"../main":83}],77:[function(e,t,n){function r(e,t,n){if(!(this instanceof r))throw new Error("NodePath constructor cannot be invoked without 'new'");h.call(this,e,t,n)}function i(e){return c.BinaryExpression.check(e)||c.LogicalExpression.check(e)}function a(e){return!!c.CallExpression.check(e)||(d.check(e)?e.some(a):!!c.Node.check(e)&&u.someField(e,function(e,t){return a(t)}))}function o(e){for(var t,n;e.parent;e=e.parent){if(t=e.node,n=e.parent.node,c.BlockStatement.check(n)&&"body"===e.parent.name&&0===e.name){if(n.body[0]!==t)throw new Error("Nodes must be equal");return!0}if(c.ExpressionStatement.check(n)&&"expression"===e.name){if(n.expression!==t)throw new Error("Nodes must be equal");return!0}if(c.SequenceExpression.check(n)&&"expressions"===e.parent.name&&0===e.name){if(n.expressions[0]!==t)throw new Error("Nodes must be equal")}else if(c.CallExpression.check(n)&&"callee"===e.name){if(n.callee!==t)throw new Error("Nodes must be equal")}else if(c.MemberExpression.check(n)&&"object"===e.name){if(n.object!==t)throw new Error("Nodes must be equal")}else if(c.ConditionalExpression.check(n)&&"test"===e.name){if(n.test!==t)throw new Error("Nodes must be equal")}else if(i(n)&&"left"===e.name){if(n.left!==t)throw new Error("Nodes must be equal")}else{if(!c.UnaryExpression.check(n)||n.prefix||"argument"!==e.name)return!1;if(n.argument!==t)throw new Error("Nodes must be equal")}}return!0}function s(e){if(c.VariableDeclaration.check(e.node)){var t=e.get("declarations").value;if(!t||0===t.length)return e.prune()}else if(c.ExpressionStatement.check(e.node)){if(!e.get("expression").value)return e.prune()}else c.IfStatement.check(e.node)&&l(e);return e}function l(e){var t=e.get("test").value,n=e.get("alternate").value,r=e.get("consequent").value;if(r||n){if(!r&&n){var i=p.unaryExpression("!",t,!0);c.UnaryExpression.check(t)&&"!"===t.operator&&(i=t.argument),e.get("test").replace(i),e.get("consequent").replace(n),e.get("alternate").replace()}}else{var a=p.expressionStatement(t);e.replace(a)}}var u=e("./types"),c=u.namedTypes,p=u.builders,f=u.builtInTypes.number,d=u.builtInTypes.array,h=e("./path"),m=e("./scope"),y=r.prototype=Object.create(h.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(y,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),y.replace=function(){return delete this.node,delete this.parent,delete this.scope,h.prototype.replace.apply(this,arguments)},y.prune=function(){var e=this.parent;return this.replace(),s(e)},y._computeNode=function(){var e=this.value;if(c.Node.check(e))return e;var t=this.parentPath;return t&&t.node||null},y._computeParent=function(){var e=this.value,t=this.parentPath;if(!c.Node.check(e)){for(;t&&!c.Node.check(t.value);)t=t.parentPath;t&&(t=t.parentPath)}for(;t&&!c.Node.check(t.value);)t=t.parentPath;return t||null},y._computeScope=function(){var e=this.value,t=this.parentPath,n=t&&t.scope;return c.Node.check(e)&&m.isEstablishedBy(e)&&(n=new m(this,n)),n||null},y.getValueProperty=function(e){return u.getFieldValue(this.value,e)},y.needsParens=function(e){var t=this.parentPath;if(!t)return!1;var n=this.value;if(!c.Expression.check(n))return!1;if("Identifier"===n.type)return!1;for(;!c.Node.check(t.value);)if(t=t.parentPath,!t)return!1;var r=t.value;switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===r.type&&"object"===this.name&&r.object===n;case"BinaryExpression":case"LogicalExpression":switch(r.type){case"CallExpression":return"callee"===this.name&&r.callee===n;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===this.name&&r.object===n;case"BinaryExpression":case"LogicalExpression":var i=r.operator,t=g[i],o=n.operator,s=g[o];if(t>s)return!0;if(t===s&&"right"===this.name){if(r.right!==n)throw new Error("Nodes must be equal");return!0}default:return!1}case"SequenceExpression":switch(r.type){case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==this.name;default:return!0}case"YieldExpression":switch(r.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return"MemberExpression"===r.type&&f.check(n.value)&&"object"===this.name&&r.object===n;case"AssignmentExpression":case"ConditionalExpression":switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===this.name&&r.callee===n;case"ConditionalExpression":return"test"===this.name&&r.test===n;case"MemberExpression":return"object"===this.name&&r.object===n;default:return!1}default:if("NewExpression"===r.type&&"callee"===this.name&&r.callee===n)return a(n)}return!(e===!0||this.canBeFirstInStatement()||!this.firstInStatement())};var g={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){g[e]=t})}),y.canBeFirstInStatement=function(){var e=this.node;return!c.FunctionExpression.check(e)&&!c.ObjectExpression.check(e)},y.firstInStatement=function(){return o(this)},t.exports=r},{"./path":79,"./scope":80,"./types":82}],78:[function(e,t,n){function r(){if(!(this instanceof r))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=i(this),this._shouldVisitComments=h.call(this._methodNameTable,"Block")||h.call(this._methodNameTable,"Line"),this.Context=s(this),this._visiting=!1,this._changeReported=!1}function i(e){var t=Object.create(null);for(var n in e)/^visit[A-Z]/.test(n)&&(t[n.slice("visit".length)]=!0);for(var r=u.computeSupertypeLookupTable(t),i=Object.create(null),t=Object.keys(r),a=t.length,o=0;o<a;++o){var s=t[o];n="visit"+r[s],d.check(e[n])&&(i[s]=n)}return i}function a(e,t){for(var n in t)h.call(t,n)&&(e[n]=t[n]);return e}function o(e,t){if(!(e instanceof c))throw new Error("");if(!(t instanceof r))throw new Error("");var n=e.value;if(p.check(n))e.each(t.visitWithoutReset,t);else if(f.check(n)){var i=u.getFieldNames(n);t._shouldVisitComments&&n.comments&&i.indexOf("comments")<0&&i.push("comments");for(var a=i.length,o=[],s=0;s<a;++s){var l=i[s];h.call(n,l)||(n[l]=u.getFieldValue(n,l)),o.push(e.get(l))}for(var s=0;s<a;++s)t.visitWithoutReset(o[s])}else;return e.value}function s(e){function t(n){if(!(this instanceof t))throw new Error("");if(!(this instanceof r))throw new Error("");if(!(n instanceof c))throw new Error("");Object.defineProperty(this,"visitor",{value:e,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=n,this.needToCallTraverse=!0,Object.seal(this)}if(!(e instanceof r))throw new Error("");var n=t.prototype=Object.create(e);return n.constructor=t,a(n,y),t}var l,u=e("./types"),c=e("./node-path"),p=(u.namedTypes.Printable,u.builtInTypes.array),f=u.builtInTypes.object,d=u.builtInTypes.function,h=Object.prototype.hasOwnProperty;r.fromMethodsObject=function(e){function t(){if(!(this instanceof t))throw new Error("Visitor constructor cannot be invoked without 'new'");r.call(this)}if(e instanceof r)return e;if(!f.check(e))return new r;var n=t.prototype=Object.create(m);return n.constructor=t,a(n,e),a(t,r),d.assert(t.fromMethodsObject),d.assert(t.visit),new t},r.visit=function(e,t){return r.fromMethodsObject(t).visit(e)};var m=r.prototype;m.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var e=arguments.length,t=new Array(e),n=0;n<e;++n)t[n]=arguments[n];t[0]instanceof c||(t[0]=new c({root:t[0]}).get("root")),this.reset.apply(this,t);try{var r=this.visitWithoutReset(t[0]),i=!0}finally{if(this._visiting=!1,!i&&this._abortRequested)return t[0].value}return r},m.AbortRequest=function(){},m.abort=function(){var e=this;e._abortRequested=!0;var t=new e.AbortRequest;throw t.cancel=function(){e._abortRequested=!1},t},m.reset=function(e){},m.visitWithoutReset=function(e){if(this instanceof this.Context)return this.visitor.visitWithoutReset(e);if(!(e instanceof c))throw new Error("");var t=e.value,n=t&&"object"==typeof t&&"string"==typeof t.type&&this._methodNameTable[t.type];if(!n)return o(e,this);var r=this.acquireContext(e);try{return r.invokeVisitorMethod(n)}finally{this.releaseContext(r)}},m.acquireContext=function(e){return 0===this._reusableContextStack.length?new this.Context(e):this._reusableContextStack.pop().reset(e)},m.releaseContext=function(e){if(!(e instanceof this.Context))throw new Error("");this._reusableContextStack.push(e),e.currentPath=null},m.reportChanged=function(){this._changeReported=!0},m.wasChangeReported=function(){return this._changeReported};var y=Object.create(null);y.reset=function(e){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof c))throw new Error("");return this.currentPath=e,this.needToCallTraverse=!0,this},y.invokeVisitorMethod=function(e){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof c))throw new Error("");var t=this.visitor[e].call(this,this.currentPath);if(t===!1?this.needToCallTraverse=!1:t!==l&&(this.currentPath=this.currentPath.replace(t)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw new Error("Must either call this.traverse or return false in "+e);var n=this.currentPath;return n&&n.value},y.traverse=function(e,t){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof c))throw new Error("");if(!(this.currentPath instanceof c))throw new Error("");return this.needToCallTraverse=!1,o(e,r.fromMethodsObject(t||this.visitor))},y.visit=function(e,t){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof c))throw new Error("");if(!(this.currentPath instanceof c))throw new Error("");return this.needToCallTraverse=!1,r.fromMethodsObject(t||this.visitor).visitWithoutReset(e)},y.reportChanged=function(){this.visitor.reportChanged()},y.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},t.exports=r},{"./node-path":77,"./types":82}],79:[function(e,t,n){function r(e,t,n){if(!(this instanceof r))throw new Error("Path constructor cannot be invoked without 'new'");if(t){if(!(t instanceof r))throw new Error("")}else t=null,n=null;this.value=e,this.parentPath=t,this.name=n,this.__childCache=null}function i(e){return e.__childCache||(e.__childCache=Object.create(null))}function a(e,t){var n=i(e),r=e.getValueProperty(t),a=n[t];return c.call(n,t)&&a.value===r||(a=n[t]=new e.constructor(r,e,t)),a}function o(){}function s(e,t,n,r){if(f.assert(e.value),0===t)return o;var a=e.value.length;if(a<1)return o;var s=arguments.length;2===s?(n=0,r=a):3===s?(n=Math.max(n,0),r=a):(n=Math.max(n,0),r=Math.min(r,a)),d.assert(n),d.assert(r);for(var l=Object.create(null),u=i(e),p=n;p<r;++p)if(c.call(e.value,p)){var h=e.get(p);if(h.name!==p)throw new Error("");var m=p+t;h.name=m,l[m]=h,delete u[p]}return delete u.length,function(){for(var t in l){var n=l[t];if(n.name!==+t)throw new Error("");u[t]=n,e.value[t]=n.value}}}function l(e){if(!(e instanceof r))throw new Error("");var t=e.parentPath;if(!t)return e;var n=t.value,a=i(t);if(n[e.name]===e.value)a[e.name]=e;else if(f.check(n)){var o=n.indexOf(e.value);o>=0&&(a[e.name=o]=e)}else n[e.name]=e.value,a[e.name]=e;if(n[e.name]!==e.value)throw new Error("");if(e.parentPath.get(e.name)!==e)throw new Error("");return e}var u=Object.prototype,c=u.hasOwnProperty,p=e("./types"),f=p.builtInTypes.array,d=p.builtInTypes.number,h=Array.prototype,m=(h.slice,h.map,r.prototype);m.getValueProperty=function(e){return this.value[e]},m.get=function(e){for(var t=this,n=arguments,r=n.length,i=0;i<r;++i)t=a(t,n[i]);return t},m.each=function(e,t){for(var n=[],r=this.value.length,i=0,i=0;i<r;++i)c.call(this.value,i)&&(n[i]=this.get(i));for(t=t||this,i=0;i<r;++i)c.call(n,i)&&e.call(t,n[i])},m.map=function(e,t){var n=[];return this.each(function(t){n.push(e.call(this,t))},t),n},m.filter=function(e,t){var n=[];return this.each(function(t){e.call(this,t)&&n.push(t)},t),n},m.shift=function(){var e=s(this,-1),t=this.value.shift();return e(),t},m.unshift=function(e){var t=s(this,arguments.length),n=this.value.unshift.apply(this.value,arguments);return t(),n},m.push=function(e){return f.assert(this.value),delete i(this).length,this.value.push.apply(this.value,arguments)},m.pop=function(){f.assert(this.value);var e=i(this);return delete e[this.value.length-1],delete e.length,this.value.pop()},m.insertAt=function(e,t){var n=arguments.length,r=s(this,n-1,e);if(r===o)return this;e=Math.max(e,0);for(var i=1;i<n;++i)this.value[e+i-1]=arguments[i];return r(),this},m.insertBefore=function(e){for(var t=this.parentPath,n=arguments.length,r=[this.name],i=0;i<n;++i)r.push(arguments[i]);return t.insertAt.apply(t,r)},m.insertAfter=function(e){for(var t=this.parentPath,n=arguments.length,r=[this.name+1],i=0;i<n;++i)r.push(arguments[i]);return t.insertAt.apply(t,r)},m.replace=function(e){var t=[],n=this.parentPath.value,r=i(this.parentPath),a=arguments.length;if(l(this),f.check(n)){for(var o=n.length,u=s(this.parentPath,a-1,this.name+1),c=[this.name,1],p=0;p<a;++p)c.push(arguments[p]);var d=n.splice.apply(n,c);if(d[0]!==this.value)throw new Error("");if(n.length!==o-1+a)throw new Error("");if(u(),0===a)delete this.value,delete r[this.name],this.__childCache=null;else{if(n[this.name]!==e)throw new Error("");for(this.value!==e&&(this.value=e,this.__childCache=null),p=0;p<a;++p)t.push(this.parentPath.get(this.name+p));if(t[0]!==this)throw new Error("")}}else if(1===a)this.value!==e&&(this.__childCache=null),this.value=n[this.name]=e,t.push(this);else{if(0!==a)throw new Error("Could not replace path");delete n[this.name],delete this.value,this.__childCache=null}return t},t.exports=r},{"./types":82}],80:[function(e,t,n){function r(t,n){if(!(this instanceof r))throw new Error("Scope constructor cannot be invoked without 'new'");if(!(t instanceof e("./node-path")))throw new Error("");g.assert(t.value);var i;if(n){if(!(n instanceof r))throw new Error("");i=n.depth+1}else n=null,i=0;Object.defineProperties(this,{path:{value:t},node:{value:t.value},isGlobal:{value:!n,enumerable:!0},depth:{value:i},parent:{value:n},bindings:{value:{}}})}function i(e,t){var n=e.value;g.assert(n),c.CatchClause.check(n)?s(e.get("param"),t):a(e,t)}function a(e,t){var n=e.value;e.parent&&c.FunctionExpression.check(e.parent.node)&&e.parent.node.id&&s(e.parent.get("id"),t),
+n&&(d.check(n)?e.each(function(e){o(e,t)}):c.Function.check(n)?(e.get("params").each(function(e){s(e,t)}),o(e.get("body"),t)):c.VariableDeclarator.check(n)?(s(e.get("id"),t),o(e.get("init"),t)):"ImportSpecifier"===n.type||"ImportNamespaceSpecifier"===n.type||"ImportDefaultSpecifier"===n.type?s(e.get(n.local?"local":n.name?"name":"id"),t):p.check(n)&&!f.check(n)&&l.eachField(n,function(n,r){var i=e.get(n);if(i.value!==r)throw new Error("");o(i,t)}))}function o(e,t){var n=e.value;if(!n||f.check(n));else if(c.FunctionDeclaration.check(n))s(e.get("id"),t);else if(c.ClassDeclaration&&c.ClassDeclaration.check(n))s(e.get("id"),t);else if(g.check(n)){if(c.CatchClause.check(n)){var r=n.param.name,i=h.call(t,r);a(e.get("body"),t),i||delete t[r]}}else a(e,t)}function s(e,t){var n=e.value;c.Pattern.assert(n),c.Identifier.check(n)?h.call(t,n.name)?t[n.name].push(e):t[n.name]=[e]:c.ObjectPattern&&c.ObjectPattern.check(n)?e.get("properties").each(function(e){var n=e.value;c.Pattern.check(n)?s(e,t):c.Property.check(n)?s(e.get("value"),t):c.SpreadProperty&&c.SpreadProperty.check(n)&&s(e.get("argument"),t)}):c.ArrayPattern&&c.ArrayPattern.check(n)?e.get("elements").each(function(e){var n=e.value;c.Pattern.check(n)?s(e,t):c.SpreadElement&&c.SpreadElement.check(n)&&s(e.get("argument"),t)}):c.PropertyPattern&&c.PropertyPattern.check(n)?s(e.get("pattern"),t):(c.SpreadElementPattern&&c.SpreadElementPattern.check(n)||c.SpreadPropertyPattern&&c.SpreadPropertyPattern.check(n))&&s(e.get("argument"),t)}var l=e("./types"),u=l.Type,c=l.namedTypes,p=c.Node,f=c.Expression,d=l.builtInTypes.array,h=Object.prototype.hasOwnProperty,m=l.builders,y=[c.Program,c.Function,c.CatchClause],g=u.or.apply(u,y);r.isEstablishedBy=function(e){return g.check(e)};var v=r.prototype;v.didScan=!1,v.declares=function(e){return this.scan(),h.call(this.bindings,e)},v.declareTemporary=function(e){if(e){if(!/^[a-z$_]/i.test(e))throw new Error("")}else e="t$";e+=this.depth.toString(36)+"$",this.scan();for(var t=0;this.declares(e+t);)++t;var n=e+t;return this.bindings[n]=l.builders.identifier(n)},v.injectTemporary=function(e,t){e||(e=this.declareTemporary());var n=this.path.get("body");return c.BlockStatement.check(n.value)&&(n=n.get("body")),n.unshift(m.variableDeclaration("var",[m.variableDeclarator(e,t||null)])),e},v.scan=function(e){if(e||!this.didScan){for(var t in this.bindings)delete this.bindings[t];i(this.path,this.bindings),this.didScan=!0}},v.getBindings=function(){return this.scan(),this.bindings},v.lookup=function(e){for(var t=this;t&&!t.declares(e);t=t.parent);return t},v.getGlobalScope=function(){for(var e=this;!e.isGlobal;)e=e.parent;return e},t.exports=r},{"./node-path":77,"./types":82}],81:[function(e,t,n){var r=e("../lib/types"),i=r.Type,a=r.builtInTypes,o=a.number;n.geq=function(e){return new i(function(t){return o.check(t)&&t>=e},o+" >= "+e)},n.defaults={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){}};var s=i.or(a.string,a.number,a.boolean,a.null,a.undefined);n.isPrimitive=new i(function(e){if(null===e)return!0;var t=typeof e;return!("object"===t||"function"===t)},s.toString())},{"../lib/types":82}],82:[function(e,t,n){function r(e,t){var n=this;if(!(n instanceof r))throw new Error("Type constructor cannot be invoked without 'new'");if(b.call(e)!==E)throw new Error(e+" is not a function");var i=b.call(t);if(i!==E&&i!==S)throw new Error(t+" is neither a function nor a string");Object.defineProperties(n,{name:{value:t},check:{value:function(t,r){var i=e.call(n,t,r);return!i&&r&&b.call(r)===E&&r(n,t),i}}})}function i(e){return _.check(e)?"{"+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+"}":P.check(e)?"["+e.map(i).join(", ")+"]":JSON.stringify(e)}function a(e,t){var n=b.call(e),i=new r(function(e){return b.call(e)===n},t);return A[t]=i,e&&"function"==typeof e.constructor&&(k.push(e.constructor),T.push(i)),i}function o(e,t){if(e instanceof r)return e;if(e instanceof l)return e.type;if(P.check(e))return r.fromArray(e);if(_.check(e))return r.fromObject(e);if(C.check(e)){var n=k.indexOf(e);return n>=0?T[n]:new r(e,t)}return new r(function(t){return t===e},j.check(t)?function(){return e+""}:t)}function s(e,t,n,r){var i=this;if(!(i instanceof s))throw new Error("Field constructor cannot be invoked without 'new'");L.assert(e),t=o(t);var a={name:{value:e},type:{value:t},hidden:{value:!!r}};C.check(n)&&(a.defaultFn={value:n}),Object.defineProperties(i,a)}function l(e){var t=this;if(!(t instanceof l))throw new Error("Def constructor cannot be invoked without 'new'");Object.defineProperties(t,{typeName:{value:e},baseNames:{value:[]},ownFields:{value:Object.create(null)},allSupertypes:{value:Object.create(null)},supertypeList:{value:[]},allFields:{value:Object.create(null)},fieldNames:{value:[]},type:{value:new r(function(e,n){return t.check(e,n)},e)}})}function u(e){return e.replace(/^[A-Z]+/,function(e){var t=e.length;switch(t){case 0:return"";case 1:return e.toLowerCase();default:return e.slice(0,t-1).toLowerCase()+e.charAt(t-1)}})}function c(e){return e=u(e),e.replace(/(Expression)?$/,"Statement")}function p(e){var t=l.fromValue(e);if(t)return t.fieldNames.slice(0);if("type"in e)throw new Error("did not recognize object of type "+JSON.stringify(e.type));return Object.keys(e)}function f(e,t){var n=l.fromValue(e);if(n){var r=n.allFields[t];if(r)return r.getValue(e)}return e[t]}function d(e){var t=c(e);if(!D[t]){var n=D[u(e)];n&&(D[t]=function(){return D.expressionStatement(n.apply(D,arguments))})}}function h(e,t){t.length=0,t.push(e);for(var n=Object.create(null),r=0;r<t.length;++r){e=t[r];var i=M[e];if(i.finalized!==!0)throw new Error("");w.call(n,e)&&delete t[n[e]],n[e]=r,t.push.apply(t,i.baseNames)}for(var a=0,o=a,s=t.length;o<s;++o)w.call(t,o)&&(t[a++]=t[o]);t.length=a}function m(e,t){return Object.keys(t).forEach(function(n){e[n]=t[n]}),e}var y=Array.prototype,g=y.slice,v=(y.map,y.forEach,Object.prototype),b=v.toString,E=b.call(function(){}),S=b.call(""),w=v.hasOwnProperty,x=r.prototype;n.Type=r,x.assert=function(e,t){if(!this.check(e,t)){var n=i(e);throw new Error(n+" does not match type "+this)}return!0},x.toString=function(){var e=this.name;return L.check(e)?e:C.check(e)?e.call(this)+"":e+" type"};var k=[],T=[],A={};n.builtInTypes=A;var L=a("truthy","string"),C=a(function(){},"function"),P=a([],"array"),_=a({},"object"),I=(a(/./,"RegExp"),a(new Date,"Date"),a(3,"number")),j=(a(!0,"boolean"),a(null,"null"),a(void 0,"undefined"));r.or=function(){for(var e=[],t=arguments.length,n=0;n<t;++n)e.push(o(arguments[n]));return new r(function(n,r){for(var i=0;i<t;++i)if(e[i].check(n,r))return!0;return!1},function(){return e.join(" | ")})},r.fromArray=function(e){if(!P.check(e))throw new Error("");if(1!==e.length)throw new Error("only one element type is permitted for typed arrays");return o(e[0]).arrayOf()},x.arrayOf=function(){var e=this;return new r(function(t,n){return P.check(t)&&t.every(function(t){return e.check(t,n)})},function(){return"["+e+"]"})},r.fromObject=function(e){var t=Object.keys(e).map(function(t){return new s(t,e[t])});return new r(function(e,n){return _.check(e)&&t.every(function(t){return t.type.check(e[t.name],n)})},function(){return"{ "+t.join(", ")+" }"})};var O=s.prototype;O.toString=function(){return JSON.stringify(this.name)+": "+this.type},O.getValue=function(e){var t=e[this.name];return j.check(t)?(this.defaultFn&&(t=this.defaultFn.call(e)),t):t},r.def=function(e){return L.assert(e),w.call(M,e)?M[e]:M[e]=new l(e)};var M=Object.create(null);l.fromValue=function(e){if(e&&"object"==typeof e){var t=e.type;if("string"==typeof t&&w.call(M,t)){var n=M[t];if(n.finalized)return n}}return null};var N=l.prototype;N.isSupertypeOf=function(e){if(e instanceof l){if(this.finalized!==!0||e.finalized!==!0)throw new Error("");return w.call(e.allSupertypes,this.typeName)}throw new Error(e+" is not a Def")},n.getSupertypeNames=function(e){if(!w.call(M,e))throw new Error("");var t=M[e];if(t.finalized!==!0)throw new Error("");return t.supertypeList.slice(1)},n.computeSupertypeLookupTable=function(e){for(var t={},n=Object.keys(M),r=n.length,i=0;i<r;++i){var a=n[i],o=M[a];if(o.finalized!==!0)throw new Error(""+a);for(var s=0;s<o.supertypeList.length;++s){var l=o.supertypeList[s];if(w.call(e,l)){t[a]=l;break}}}return t},N.checkAllFields=function(e,t){function n(n){var i=r[n],a=i.type,o=i.getValue(e);return a.check(o,t)}var r=this.allFields;if(this.finalized!==!0)throw new Error(""+this.typeName);return _.check(e)&&Object.keys(r).every(n)},N.check=function(e,t){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(!_.check(e))return!1;var n=l.fromValue(e);return n?t&&n===this?this.checkAllFields(e,t):!!this.isSupertypeOf(n)&&(!t||n.checkAllFields(e,t)&&this.checkAllFields(e,!1)):("SourceLocation"===this.typeName||"Position"===this.typeName)&&this.checkAllFields(e,t)},N.bases=function(){var e=g.call(arguments),t=this.baseNames;if(this.finalized){if(e.length!==t.length)throw new Error("");for(var n=0;n<e.length;n++)if(e[n]!==t[n])throw new Error("");return this}return e.forEach(function(e){L.assert(e),t.indexOf(e)<0&&t.push(e)}),this},Object.defineProperty(N,"buildable",{value:!1});var D={};n.builders=D;var R={};n.defineMethod=function(e,t){var n=R[e];return j.check(t)?delete R[e]:(C.assert(t),Object.defineProperty(R,e,{enumerable:!0,configurable:!0,value:t})),n};var B=L.arrayOf();N.build=function(){var e=this,t=g.call(arguments);return B.assert(t),Object.defineProperty(e,"buildParams",{value:t,writable:!1,enumerable:!1,configurable:!0}),e.buildable?e:(e.field("type",String,function(){return e.typeName}),Object.defineProperty(e,"buildable",{value:!0}),Object.defineProperty(D,u(e.typeName),{enumerable:!0,value:function(){function t(t,o){if(!w.call(a,t)){var s=e.allFields;if(!w.call(s,t))throw new Error(""+t);var l,u=s[t],c=u.type;if(I.check(o)&&o<r)l=n[o];else{if(!u.defaultFn){var p="no value or default function given for field "+JSON.stringify(t)+" of "+e.typeName+"("+e.buildParams.map(function(e){return s[e]}).join(", ")+")";throw new Error(p)}l=u.defaultFn.call(a)}if(!c.check(l))throw new Error(i(l)+" does not match field "+u+" of type "+e.typeName);a[t]=l}}var n=arguments,r=n.length,a=Object.create(R);if(!e.finalized)throw new Error("attempting to instantiate unfinalized type "+e.typeName);if(e.buildParams.forEach(function(e,n){t(e,n)}),Object.keys(e.allFields).forEach(function(e){t(e)}),a.type!==e.typeName)throw new Error("");return a}}),e)},n.getBuilderName=u,n.getStatementBuilderName=c,N.field=function(e,t,n,r){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(e)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[e]=new s(e,t,n,r),this)};var F={};n.namedTypes=F,n.getFieldNames=p,n.getFieldValue=f,n.eachField=function(e,t,n){p(e).forEach(function(n){t.call(this,n,f(e,n))},n)},n.someField=function(e,t,n){return p(e).some(function(n){return t.call(this,n,f(e,n))},n)},Object.defineProperty(N,"finalized",{value:!1}),N.finalize=function(){var e=this;if(!e.finalized){var t=e.allFields,n=e.allSupertypes;e.baseNames.forEach(function(r){var i=M[r];if(!(i instanceof l)){var a="unknown supertype name "+JSON.stringify(r)+" for subtype "+JSON.stringify(e.typeName);throw new Error(a)}i.finalize(),m(t,i.allFields),m(n,i.allSupertypes)}),m(t,e.ownFields),n[e.typeName]=e,e.fieldNames.length=0;for(var r in t)w.call(t,r)&&!t[r].hidden&&e.fieldNames.push(r);Object.defineProperty(F,e.typeName,{enumerable:!0,value:e.type}),Object.defineProperty(e,"finalized",{value:!0}),h(e.typeName,e.supertypeList),e.buildable&&e.supertypeList.lastIndexOf("Expression")>=0&&d(e.typeName)}},n.finalize=function(){Object.keys(M).forEach(function(e){M[e].finalize()})}},{}],83:[function(e,t,n){var r=e("./lib/types");e("./def/core"),e("./def/es6"),e("./def/es7"),e("./def/mozilla"),e("./def/e4x"),e("./def/fb-harmony"),e("./def/esprima"),e("./def/babel"),r.finalize(),n.Type=r.Type,n.builtInTypes=r.builtInTypes,n.namedTypes=r.namedTypes,n.builders=r.builders,n.defineMethod=r.defineMethod,n.getFieldNames=r.getFieldNames,n.getFieldValue=r.getFieldValue,n.eachField=r.eachField,n.someField=r.someField,n.getSupertypeNames=r.getSupertypeNames,n.astNodesAreEquivalent=e("./lib/equiv"),n.finalize=r.finalize,n.NodePath=e("./lib/node-path"),n.PathVisitor=e("./lib/path-visitor"),n.visit=n.PathVisitor.visit},{"./def/babel":68,"./def/core":69,"./def/e4x":70,"./def/es6":71,"./def/es7":72,"./def/esprima":73,"./def/fb-harmony":74,"./def/mozilla":75,"./lib/equiv":76,"./lib/node-path":77,"./lib/path-visitor":78,"./lib/types":82}],84:[function(e,t,n){function r(){this._array=[],this._set=Object.create(null)}var i=e("./util"),a=Object.prototype.hasOwnProperty;r.fromArray=function(e,t){for(var n=new r,i=0,a=e.length;i<a;i++)n.add(e[i],t);return n},r.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(e,t){var n=i.toSetString(e),r=a.call(this._set,n),o=this._array.length;r&&!t||this._array.push(e),r||(this._set[n]=o)},r.prototype.has=function(e){var t=i.toSetString(e);return a.call(this._set,t)},r.prototype.indexOf=function(e){var t=i.toSetString(e);if(a.call(this._set,t))return this._set[t];throw new Error('"'+e+'" is not in the set.')},r.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},r.prototype.toArray=function(){return this._array.slice()},n.ArraySet=r},{"./util":93}],85:[function(e,t,n){function r(e){return e<0?(-e<<1)+1:(e<<1)+0}function i(e){var t=1===(1&e),n=e>>1;return t?-n:n}var a=e("./base64"),o=5,s=1<<o,l=s-1,u=s;n.encode=function(e){var t,n="",i=r(e);do t=i&l,i>>>=o,i>0&&(t|=u),n+=a.encode(t);while(i>0);return n},n.decode=function(e,t,n){var r,s,c=e.length,p=0,f=0;do{if(t>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(s=a.decode(e.charCodeAt(t++)),s===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));r=!!(s&u),s&=l,p+=s<<f,f+=o}while(r);n.value=i(p),n.rest=t}},{"./base64":86}],86:[function(e,t,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 t=65,n=90,r=97,i=122,a=48,o=57,s=43,l=47,u=26,c=52;return t<=e&&e<=n?e-t:r<=e&&e<=i?e-r+u:a<=e&&e<=o?e-a+c:e==s?62:e==l?63:-1}},{}],87:[function(e,t,n){function r(e,t,i,a,o,s){var l=Math.floor((t-e)/2)+e,u=o(i,a[l],!0);return 0===u?l:u>0?t-l>1?r(l,t,i,a,o,s):s==n.LEAST_UPPER_BOUND?t<a.length?t:-1:l:l-e>1?r(e,l,i,a,o,s):s==n.LEAST_UPPER_BOUND?l:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,i,a){if(0===t.length)return-1;var o=r(-1,t.length,e,t,i,a||n.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===i(t[o],t[o-1],!0);)--o;return o}},{}],88:[function(e,t,n){function r(e,t){var n=e.generatedLine,r=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return r>n||r==n&&o>=i||a.compareByGeneratedPositionsInflated(e,t)<=0}function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var a=e("./util");i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){r(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(a.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=i},{"./util":93}],89:[function(e,t,n){function r(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function i(e,t){return Math.round(e+Math.random()*(t-e))}function a(e,t,n,o){if(n<o){var s=i(n,o),l=n-1;r(e,s,o);for(var u=e[o],c=n;c<o;c++)t(e[c],u)<=0&&(l+=1,r(e,l,c));r(e,l+1,c);var p=l+1;a(e,t,n,p-1),a(e,t,p+1,o)}}n.quickSort=function(e,t){a(e,t,0,e.length-1)}},{}],90:[function(e,t,n){function r(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new o(t):new i(t)}function i(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=s.getArg(t,"version"),r=s.getArg(t,"sources"),i=s.getArg(t,"names",[]),a=s.getArg(t,"sourceRoot",null),o=s.getArg(t,"sourcesContent",null),l=s.getArg(t,"mappings"),c=s.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);r=r.map(String).map(s.normalize).map(function(e){return a&&s.isAbsolute(a)&&s.isAbsolute(e)?s.relative(a,e):e}),this._names=u.fromArray(i.map(String),!0),this._sources=u.fromArray(r,!0),this.sourceRoot=a,this.sourcesContent=o,this._mappings=l,this.file=c}function a(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function o(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=s.getArg(t,"version"),i=s.getArg(t,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new u,this._names=new u;var a={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=s.getArg(e,"offset"),n=s.getArg(t,"line"),i=s.getArg(t,"column");if(n<a.line||n===a.line&&i<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=t,{generatedOffset:{generatedLine:n+1,generatedColumn:i+1},consumer:new r(s.getArg(e,"map"))}})}var s=e("./util"),l=e("./binary-search"),u=e("./array-set").ArraySet,c=e("./base64-vlq"),p=e("./quick-sort").quickSort;r.fromSourceMap=function(e){return i.fromSourceMap(e)},r.prototype._version=3,r.prototype.__generatedMappings=null,Object.defineProperty(r.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),r.prototype.__originalMappings=null,Object.defineProperty(r.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),r.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return";"===n||","===n},r.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},r.GENERATED_ORDER=1,r.ORIGINAL_ORDER=2,r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.prototype.eachMapping=function(e,t,n){var i,a=t||null,o=n||r.GENERATED_ORDER;switch(o){case r.GENERATED_ORDER:i=this._generatedMappings;break;case r.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var l=this.sourceRoot;i.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=l&&(t=s.join(l,t)),{source:t,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,a)},r.prototype.allGeneratedPositionsFor=function(e){var t=s.getArg(e,"line"),n={source:s.getArg(e,"source"),originalLine:t,originalColumn:s.getArg(e,"column",0)};if(null!=this.sourceRoot&&(n.source=s.relative(this.sourceRoot,n.source)),!this._sources.has(n.source))return[];n.source=this._sources.indexOf(n.source);var r=[],i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",s.compareByOriginalPositions,l.LEAST_UPPER_BOUND);if(i>=0){var a=this._originalMappings[i];if(void 0===e.column)for(var o=a.originalLine;a&&a.originalLine===o;)r.push({line:s.getArg(a,"generatedLine",null),column:s.getArg(a,"generatedColumn",null),lastColumn:s.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i];else for(var u=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==u;)r.push({line:s.getArg(a,"generatedLine",null),column:s.getArg(a,"generatedColumn",null),lastColumn:s.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i]}return r},n.SourceMapConsumer=r,i.prototype=Object.create(r.prototype),i.prototype.consumer=r,i.fromSourceMap=function(e){var t=Object.create(i.prototype),n=t._names=u.fromArray(e._names.toArray(),!0),r=t._sources=u.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var o=e._mappings.toArray().slice(),l=t.__generatedMappings=[],c=t.__originalMappings=[],f=0,d=o.length;f<d;f++){var h=o[f],m=new a;m.generatedLine=h.generatedLine,m.generatedColumn=h.generatedColumn,h.source&&(m.source=r.indexOf(h.source),m.originalLine=h.originalLine,m.originalColumn=h.originalColumn,h.name&&(m.name=n.indexOf(h.name)),c.push(m)),l.push(m)}return p(t.__originalMappings,s.compareByOriginalPositions),t},i.prototype._version=3,Object.defineProperty(i.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?s.join(this.sourceRoot,e):e},this)}}),i.prototype._parseMappings=function(e,t){for(var n,r,i,o,l,u=1,f=0,d=0,h=0,m=0,y=0,g=e.length,v=0,b={},E={},S=[],w=[];v<g;)if(";"===e.charAt(v))u++,v++,f=0;else if(","===e.charAt(v))v++;else{for(n=new a,n.generatedLine=u,o=v;o<g&&!this._charIsMappingSeparator(e,o);o++);if(r=e.slice(v,o),i=b[r])v+=r.length;else{for(i=[];v<o;)c.decode(e,v,E),l=E.value,v=E.rest,i.push(l);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");b[r]=i}n.generatedColumn=f+i[0],f=n.generatedColumn,i.length>1&&(n.source=m+i[1],m+=i[1],n.originalLine=d+i[2],d=n.originalLine,n.originalLine+=1,n.originalColumn=h+i[3],h=n.originalColumn,i.length>4&&(n.name=y+i[4],y+=i[4])),w.push(n),"number"==typeof n.originalLine&&S.push(n)}p(w,s.compareByGeneratedPositionsDeflated),this.__generatedMappings=w,p(S,s.compareByOriginalPositions),this.__originalMappings=S},i.prototype._findMapping=function(e,t,n,r,i,a){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return l.search(e,t,i,a)},i.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},i.prototype.originalPositionFor=function(e){var t={generatedLine:s.getArg(e,"line"),generatedColumn:s.getArg(e,"column")},n=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",s.compareByGeneratedPositionsDeflated,s.getArg(e,"bias",r.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===t.generatedLine){var a=s.getArg(i,"source",null);null!==a&&(a=this._sources.at(a),null!=this.sourceRoot&&(a=s.join(this.sourceRoot,a)));var o=s.getArg(i,"name",null);return null!==o&&(o=this._names.at(o)),{source:a,line:s.getArg(i,"originalLine",null),column:s.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=s.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(null!=this.sourceRoot&&(n=s.urlParse(this.sourceRoot))){var r=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=s.getArg(e,"source");if(null!=this.sourceRoot&&(t=s.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};t=this._sources.indexOf(t);var n={source:t,originalLine:s.getArg(e,"line"),originalColumn:s.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",s.compareByOriginalPositions,s.getArg(e,"bias",r.GREATEST_LOWER_BOUND));if(i>=0){var a=this._originalMappings[i];if(a.source===n.source)return{line:s.getArg(a,"generatedLine",null),column:s.getArg(a,"generatedColumn",null),lastColumn:s.getArg(a,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=i,o.prototype=Object.create(r.prototype),o.prototype.constructor=r,o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),o.prototype.originalPositionFor=function(e){var t={generatedLine:s.getArg(e,"line"),generatedColumn:s.getArg(e,"column")},n=l.search(t,this._sections,function(e,t){var n=e.generatedLine-t.generatedOffset.generatedLine;return n?n:e.generatedColumn-t.generatedOffset.generatedColumn}),r=this._sections[n];return r?r.consumer.originalPositionFor({line:t.generatedLine-(r.generatedOffset.generatedLine-1),column:t.generatedColumn-(r.generatedOffset.generatedLine===t.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},o.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n],i=r.consumer.sourceContentFor(e,!0);if(i)return i}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var n=this._sections[t];if(n.consumer.sources.indexOf(s.getArg(e,"source"))!==-1){var r=n.consumer.generatedPositionFor(e);if(r){var i={line:r.line+(n.generatedOffset.generatedLine-1),column:r.column+(n.generatedOffset.generatedLine===r.line?n.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}},o.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var r=this._sections[n],i=r.consumer._generatedMappings,a=0;a<i.length;a++){var o=i[a],l=r.consumer._sources.at(o.source);null!==r.consumer.sourceRoot&&(l=s.join(r.consumer.sourceRoot,l)),this._sources.add(l),l=this._sources.indexOf(l);var u=r.consumer._names.at(o.name);this._names.add(u),u=this._names.indexOf(u);var c={source:l,generatedLine:o.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(r.generatedOffset.generatedLine===o.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:u};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}p(this.__generatedMappings,s.compareByGeneratedPositionsDeflated),p(this.__originalMappings,s.compareByOriginalPositions)},n.IndexedSourceMapConsumer=o},{"./array-set":84,"./base64-vlq":85,"./binary-search":87,"./quick-sort":89,"./util":93}],91:[function(e,t,n){function r(e){e||(e={}),this._file=a.getArg(e,"file",null),this._sourceRoot=a.getArg(e,"sourceRoot",null),this._skipValidation=a.getArg(e,"skipValidation",!1),this._sources=new o,this._names=new o,this._mappings=new s,this._sourcesContents=null}var i=e("./base64-vlq"),a=e("./util"),o=e("./array-set").ArraySet,s=e("./mapping-list").MappingList;r.prototype._version=3,r.fromSourceMap=function(e){var t=e.sourceRoot,n=new r({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=a.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)}),e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&n.setSourceContent(t,r)}),n},r.prototype.addMapping=function(e){var t=a.getArg(e,"generated"),n=a.getArg(e,"original",null),r=a.getArg(e,"source",null),i=a.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,i),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})},r.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=a.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[a.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[a.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){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.');r=e.file}var i=this._sourceRoot;null!=i&&(r=a.relative(i,r));var s=new o,l=new o;this._mappings.unsortedForEach(function(t){if(t.source===r&&null!=t.originalLine){var o=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=o.source&&(t.source=o.source,null!=n&&(t.source=a.join(n,t.source)),null!=i&&(t.source=a.relative(i,t.source)),t.originalLine=o.line,t.originalColumn=o.column,null!=o.name&&(t.name=o.name))}var u=t.source;null==u||s.has(u)||s.add(u);var c=t.name;null==c||l.has(c)||l.add(c)},this),this._sources=s,this._names=l,e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=a.join(n,t)),null!=i&&(t=a.relative(i,t)),this.setSourceContent(t,r))},this)},r.prototype._validateMapping=function(e,t,n,r){if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},r.prototype._serializeMappings=function(){for(var e,t,n,r,o=0,s=1,l=0,u=0,c=0,p=0,f="",d=this._mappings.toArray(),h=0,m=d.length;h<m;h++){if(t=d[h],e="",t.generatedLine!==s)for(o=0;t.generatedLine!==s;)e+=";",s++;else if(h>0){if(!a.compareByGeneratedPositionsInflated(t,d[h-1]))continue;e+=","}e+=i.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(r=this._sources.indexOf(t.source),e+=i.encode(r-p),p=r,e+=i.encode(t.originalLine-1-u),u=t.originalLine-1,e+=i.encode(t.originalColumn-l),l=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=i.encode(n-c),c=n)),f+=e}return f},r.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=a.relative(t,e));var n=a.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},r.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},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=r},{"./array-set":84,"./base64-vlq":85,"./mapping-list":88,"./util":93}],92:[function(e,t,n){function r(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[l]=!0,null!=r&&this.add(r)}var i=e("./source-map-generator").SourceMapGenerator,a=e("./util"),o=/(\r?\n)/,s=10,l="$$$isSourceNode$$$";
+r.fromStringWithSourceMap=function(e,t,n){function i(e,t){if(null===e||void 0===e.source)s.add(t);else{var i=n?a.join(n,e.source):e.source;s.add(new r(e.originalLine,e.originalColumn,i,t,e.name))}}var s=new r,l=e.split(o),u=function(){var e=l.shift(),t=l.shift()||"";return e+t},c=1,p=0,f=null;return t.eachMapping(function(e){if(null!==f){if(!(c<e.generatedLine)){var t=l[0],n=t.substr(0,e.generatedColumn-p);return l[0]=t.substr(e.generatedColumn-p),p=e.generatedColumn,i(f,n),void(f=e)}i(f,u()),c++,p=0}for(;c<e.generatedLine;)s.add(u()),c++;if(p<e.generatedColumn){var t=l[0];s.add(t.substr(0,e.generatedColumn)),l[0]=t.substr(e.generatedColumn),p=e.generatedColumn}f=e},this),l.length>0&&(f&&i(f,u()),s.add(l.join(""))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);null!=r&&(null!=n&&(e=a.join(n,e)),s.setSourceContent(e,r))}),s},r.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[l]&&"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},r.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[l]&&"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},r.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)t=this.children[n],t[l]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},r.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},r.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[l]?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},r.prototype.setSourceContent=function(e,t){this.sourceContents[a.toSetString(e)]=t},r.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;t<n;t++)this.children[t][l]&&this.children[t].walkSourceContents(e);for(var r=Object.keys(this.sourceContents),t=0,n=r.length;t<n;t++)e(a.fromSetString(r[t]),this.sourceContents[r[t]])},r.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},r.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new i(e),r=!1,a=null,o=null,l=null,u=null;return this.walk(function(e,i){t.code+=e,null!==i.source&&null!==i.line&&null!==i.column?(a===i.source&&o===i.line&&l===i.column&&u===i.name||n.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name}),a=i.source,o=i.line,l=i.column,u=i.name,r=!0):r&&(n.addMapping({generated:{line:t.line,column:t.column}}),a=null,r=!1);for(var c=0,p=e.length;c<p;c++)e.charCodeAt(c)===s?(t.line++,t.column=0,c+1===p?(a=null,r=!1):r&&n.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name})):t.column++}),this.walkSourceContents(function(e,t){n.setSourceContent(e,t)}),{code:t.code,map:n}},n.SourceNode=r},{"./source-map-generator":91,"./util":93}],93:[function(e,t,n){function r(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')}function i(e){var t=e.match(g);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function a(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var t=e,r=i(e);if(r){if(!r.path)return e;t=r.path}for(var o,s=n.isAbsolute(t),l=t.split(/\/+/),u=0,c=l.length-1;c>=0;c--)o=l[c],"."===o?l.splice(c,1):".."===o?u++:u>0&&(""===o?(l.splice(c+1,u),u=0):(l.splice(c,2),u--));return t=l.join("/"),""===t&&(t=s?"/":"."),r?(r.path=t,a(r)):t}function s(e,t){""===e&&(e="."),""===t&&(t=".");var n=i(t),r=i(e);if(r&&(e=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),a(n);if(n||t.match(v))return t;if(r&&!r.host&&!r.path)return r.host=t,a(r);var s="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return r?(r.path=s,a(r)):s}function l(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)}function u(e){return e}function c(e){return f(e)?"$"+e:e}function p(e){return f(e)?e.slice(1):e}function f(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function d(e,t,n){var r=e.source-t.source;return 0!==r?r:(r=e.originalLine-t.originalLine,0!==r?r:(r=e.originalColumn-t.originalColumn,0!==r||n?r:(r=e.generatedColumn-t.generatedColumn,0!==r?r:(r=e.generatedLine-t.generatedLine,0!==r?r:e.name-t.name))))}function h(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r?r:(r=e.generatedColumn-t.generatedColumn,0!==r||n?r:(r=e.source-t.source,0!==r?r:(r=e.originalLine-t.originalLine,0!==r?r:(r=e.originalColumn-t.originalColumn,0!==r?r:e.name-t.name))))}function m(e,t){return e===t?0:e>t?1:-1}function y(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n?n:(n=e.generatedColumn-t.generatedColumn,0!==n?n:(n=m(e.source,t.source),0!==n?n:(n=e.originalLine-t.originalLine,0!==n?n:(n=e.originalColumn-t.originalColumn,0!==n?n:m(e.name,t.name)))))}n.getArg=r;var g=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,v=/^data:.+\,.+$/;n.urlParse=i,n.urlGenerate=a,n.normalize=o,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(g)},n.relative=l;var b=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=b?u:c,n.fromSetString=b?u:p,n.compareByOriginalPositions=d,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=y},{}],94:[function(e,t,n){n.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,n.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,n.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":90,"./lib/source-map-generator":91,"./lib/source-node":92}],95:[function(e,t,n){(function(r){function i(e,t,n){function i(){for(;u.length&&!p.paused;){var e=u.shift();if(null===e)return p.emit("end");p.emit("data",e)}}function o(){p.writable=!1,t.call(p),!p.readable&&p.autoDestroy&&p.destroy()}e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var s=!1,l=!1,u=[],c=!1,p=new a;return p.readable=p.writable=!0,p.paused=!1,p.autoDestroy=!(n&&n.autoDestroy===!1),p.write=function(t){return e.call(this,t),!p.paused},p.queue=p.push=function(e){return c?p:(null===e&&(c=!0),u.push(e),i(),p)},p.on("end",function(){p.readable=!1,!p.writable&&p.autoDestroy&&r.nextTick(function(){p.destroy()})}),p.end=function(e){if(!s)return s=!0,arguments.length&&p.write(e),o(),p},p.destroy=function(){if(!l)return l=!0,s=!0,u.length=0,p.writable=p.readable=!1,p.emit("close"),p},p.pause=function(){if(!p.paused)return p.paused=!0,p},p.resume=function(){return p.paused&&(p.paused=!1,p.emit("resume")),i(),p.paused||p.emit("drain"),p},p}var a=e("stream");n=t.exports=i,i.through=i}).call(this,e("_process"))},{_process:13,stream:30}],96:[function(e,t,n){(function(e,n){!function(n){"use strict";function r(e,t,n,r){var i=Object.create((t||a).prototype),o=new h(r||[]);return i._invoke=p(e,n,o),i}function i(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function a(){}function o(){}function s(){}function l(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){this.arg=e}function c(t){function n(e,r,a,o){var s=i(t[e],t,r);if("throw"!==s.type){var l=s.arg,c=l.value;return c instanceof u?Promise.resolve(c.arg).then(function(e){n("next",e,a,o)},function(e){n("throw",e,a,o)}):Promise.resolve(c).then(function(e){l.value=e,a(l)},o)}o(s.arg)}function r(e,t){function r(){return new Promise(function(r,i){n(e,t,r,i)})}return a=a?a.then(r,r):r()}"object"==typeof e&&e.domain&&(n=e.domain.bind(n));var a;this._invoke=r}function p(e,t,n){var r=k;return function(a,o){if(r===A)throw new Error("Generator is already running");if(r===L){if("throw"===a)throw o;return y()}for(;;){var s=n.delegate;if(s){if("return"===a||"throw"===a&&s.iterator[a]===g){n.delegate=null;var l=s.iterator.return;if(l){var u=i(l,s.iterator,o);if("throw"===u.type){a="throw",o=u.arg;continue}}if("return"===a)continue}var u=i(s.iterator[a],s.iterator,o);if("throw"===u.type){n.delegate=null,a="throw",o=u.arg;continue}a="next",o=g;var c=u.arg;if(!c.done)return r=T,c;n[s.resultName]=c.value,n.next=s.nextLoc,n.delegate=null}if("next"===a)r===T?n.sent=o:n.sent=g;else if("throw"===a){if(r===k)throw r=L,o;n.dispatchException(o)&&(a="next",o=g)}else"return"===a&&n.abrupt("return",o);r=A;var u=i(e,t,n);if("normal"===u.type){r=n.done?L:T;var c={value:u.arg,done:n.done};if(u.arg!==C)return c;n.delegate&&"next"===a&&(o=g)}else"throw"===u.type&&(r=L,a="throw",o=u.arg)}}}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function d(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function m(e){if(e){var t=e[E];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(v.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:y}}function y(){return{value:g,done:!0}}var g,v=Object.prototype.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},E=b.iterator||"@@iterator",S=b.toStringTag||"@@toStringTag",w="object"==typeof t,x=n.regeneratorRuntime;if(x)return void(w&&(t.exports=x));x=n.regeneratorRuntime=w?t.exports:{},x.wrap=r;var k="suspendedStart",T="suspendedYield",A="executing",L="completed",C={},P=s.prototype=a.prototype;o.prototype=P.constructor=s,s.constructor=o,s[S]=o.displayName="GeneratorFunction",x.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===o||"GeneratorFunction"===(t.displayName||t.name))},x.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,S in e||(e[S]="GeneratorFunction")),e.prototype=Object.create(P),e},x.awrap=function(e){return new u(e)},l(c.prototype),x.async=function(e,t,n,i){var a=new c(r(e,t,n,i));return x.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},l(P),P[E]=function(){return this},P[S]="Generator",P.toString=function(){return"[object Generator]"},x.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},x.values=m,h.prototype={constructor:h,reset:function(e){if(this.prev=0,this.next=0,this.sent=g,this.done=!1,this.delegate=null,this.tryEntries.forEach(d),!e)for(var t in this)"t"===t.charAt(0)&&v.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=v.call(i,"catchLoc"),s=v.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&v.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?this.next=i.finallyLoc:this.complete(a),C},complete:function(e,t){if("throw"===e.type)throw e.arg;"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=e.arg,this.next="end"):"normal"===e.type&&t&&(this.next=t)},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),d(n),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;d(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:m(e),resultName:t,nextLoc:n},C}}}("object"==typeof n?n:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:13}],regenerator:[function(e,t,n){(function(n){function r(e,t){function n(e){i.push(e)}function r(){this.queue(a(i.join(""),t).code),this.queue(null)}var i=[];return h(n,r)}function i(){e("./runtime")}function a(e,t){if(t=o(t),!b.test(e))return{code:(t.includeRuntime===!0?d.readFileSync(f.join(n,"runtime.js"),"utf-8")+"\n":"")+e};var r=s(t),i=g.parse(e,r),a=new v.NodePath(i),u=a.get("program");return l(e,t)&&c(u.node),m(u,t),g.print(a,r)}function o(t){return t=y.defaults(t||{},{includeRuntime:!1,supportBlockBinding:!0}),t.esprima||(t.esprima=e("esprima-fb")),p.ok(/harmony/.test(t.esprima.version),"Bad esprima version: "+t.esprima.version),t}function s(e){function t(t){t in e&&(n[t]=e[t])}var n={range:!0};return t("esprima"),t("sourceFileName"),t("sourceMapName"),t("inputSourceMap"),t("sourceRoot"),n}function l(e,t){var n=!!t.supportBlockBinding;return n&&(E.test(e)||(n=!1)),n}function u(e,t){var n=s(o(t)),r=g.parse(e,n);return c(r.program),g.print(r,n).code}function c(t){v.namedTypes.Program.assert(t);var n=e("defs")(t,{ast:!0,disallowUnknownReferences:!1,disallowDuplicated:!1,disallowVars:!1,loopClosures:"iife"});if(n.errors)throw new Error(n.errors.join("\n"));return t}var p=e("assert"),f=e("path"),d=e("fs"),h=e("through"),m=e("./lib/visit").transform,y=e("./lib/util"),g=e("recast"),v=g.types,b=/\bfunction\s*\*|\basync\b/,E=/\b(let|const)\s+/;t.exports=r,r.runtime=i,i.path=f.join(n,"runtime.js"),r.varify=u,r.types=v,r.compile=a,r.transform=m}).call(this,"/node_modules/regenerator")},{"./lib/util":39,"./lib/visit":40,"./runtime":96,assert:2,defs:41,"esprima-fb":55,fs:1,path:12,recast:67,through:95}]},{},[]); \ No newline at end of file
diff --git a/tools/eslint/node_modules/ajv/lib/ajv.d.ts b/tools/eslint/node_modules/ajv/lib/ajv.d.ts
new file mode 100644
index 0000000000..d25a7d1e4e
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/ajv.d.ts
@@ -0,0 +1,262 @@
+declare var ajv: {
+ (options?: ajv.Options): ajv.Ajv;
+ new (options?: ajv.Options): ajv.Ajv;
+}
+
+declare namespace ajv {
+ interface Ajv {
+ /**
+ * Validate data using schema
+ * Schema will be compiled and cached (using serialized JSON as key. [json-stable-stringify](https://github.com/substack/json-stable-stringify) is used to serialize.
+ * @param {String|Object} schemaKeyRef key, ref or schema object
+ * @param {Any} data to be validated
+ * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
+ */
+ validate(schemaKeyRef: Object | string, data: any): boolean;
+ /**
+ * Create validating function for passed schema.
+ * @param {Object} schema schema object
+ * @return {Function} validating function
+ */
+ compile(schema: Object): ValidateFunction;
+ /**
+ * Creates validating function for passed schema with asynchronous loading of missing schemas.
+ * `loadSchema` option should be a function that accepts schema uri and node-style callback.
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Function} callback node-style callback, it is always called with 2 parameters: error (or null) and validating function.
+ */
+ compileAsync(schema: Object, callback: (err: Error, validate: ValidateFunction) => any): void;
+ /**
+ * Adds schema to the instance.
+ * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
+ * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
+ */
+ addSchema(schema: Array<Object> | Object, key?: string): void;
+ /**
+ * Add schema that will be used to validate other schemas
+ * options in META_IGNORE_OPTIONS are alway set to false
+ * @param {Object} schema schema object
+ * @param {String} key optional schema key
+ */
+ addMetaSchema(schema: Object, key?: string): void;
+ /**
+ * Validate schema
+ * @param {Object} schema schema to validate
+ * @return {Boolean} true if schema is valid
+ */
+ validateSchema(schema: Object): boolean;
+ /**
+ * Get compiled schema from the instance by `key` or `ref`.
+ * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
+ * @return {Function} schema validating function (with property `schema`).
+ */
+ getSchema(keyRef: string): ValidateFunction;
+ /**
+ * Remove cached schema(s).
+ * If no parameter is passed all schemas but meta-schemas are removed.
+ * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
+ * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
+ * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
+ */
+ removeSchema(schemaKeyRef?: Object | string | RegExp): void;
+ /**
+ * Add custom format
+ * @param {String} name format name
+ * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
+ */
+ addFormat(name: string, format: FormatValidator | FormatDefinition): void;
+ /**
+ * Define custom keyword
+ * @this Ajv
+ * @param {String} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords.
+ * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
+ */
+ addKeyword(keyword: string, definition: KeywordDefinition): void;
+ /**
+ * Convert array of error message objects to string
+ * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
+ * @param {Object} options optional options with properties `separator` and `dataVar`.
+ * @return {String} human readable string with all errors descriptions
+ */
+ errorsText(errors?: Array<ErrorObject>, options?: ErrorsTextOptions): string;
+ errors?: Array<ErrorObject>;
+ }
+
+ interface Thenable <R> {
+ then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => U | Thenable<U>): Thenable<U>;
+ }
+
+ interface ValidateFunction {
+ (
+ data: any,
+ dataPath?: string,
+ parentData?: Object | Array<any>,
+ parentDataProperty?: string | number,
+ rootData?: Object | Array<any>
+ ): boolean | Thenable<boolean>;
+ errors?: Array<ErrorObject>;
+ schema?: Object;
+ }
+
+ interface Options {
+ v5?: boolean;
+ allErrors?: boolean;
+ verbose?: boolean;
+ jsonPointers?: boolean;
+ uniqueItems?: boolean;
+ unicode?: boolean;
+ format?: string;
+ formats?: Object;
+ schemas?: Array<Object> | Object;
+ ownProperties?: boolean;
+ missingRefs?: boolean | string;
+ loadSchema?: (uri: string, cb: (err: Error, schema: Object) => any) => any;
+ removeAdditional?: boolean | string;
+ useDefaults?: boolean | string;
+ coerceTypes?: boolean | string;
+ async?: boolean | string;
+ transpile?: string | ((code: string) => string);
+ meta?: boolean | Object;
+ validateSchema?: boolean | string;
+ addUsedSchema?: boolean;
+ inlineRefs?: boolean | number;
+ passContext?: boolean;
+ loopRequired?: number;
+ multipleOfPrecision?: number;
+ errorDataPath?: string;
+ messages?: boolean;
+ beautify?: boolean | Object;
+ cache?: Object;
+ }
+
+ type FormatValidator = string | RegExp | ((data: string) => boolean);
+
+ interface FormatDefinition {
+ validate: FormatValidator;
+ compare: (data1: string, data2: string) => number;
+ async?: boolean;
+ }
+
+ interface KeywordDefinition {
+ type?: string | Array<string>;
+ async?: boolean;
+ errors?: boolean | string;
+ // schema: false makes validate not to expect schema (ValidateFunction)
+ schema?: boolean;
+ // one and only one of the following properties should be present
+ validate?: ValidateFunction | SchemaValidateFunction;
+ compile?: (schema: Object, parentSchema: Object) => ValidateFunction;
+ macro?: (schema: Object, parentSchema: Object) => Object;
+ inline?: (it: Object, keyword: string, schema: Object, parentSchema: Object) => string;
+ }
+
+ interface SchemaValidateFunction {
+ (
+ schema: Object,
+ data: any,
+ parentSchema?: Object,
+ dataPath?: string,
+ parentData?: Object | Array<any>,
+ parentDataProperty?: string | number
+ ): boolean | Thenable<boolean>;
+ errors?: Array<ErrorObject>;
+ }
+
+ interface ErrorsTextOptions {
+ separator?: string;
+ dataVar?: string;
+ }
+
+ interface ErrorObject {
+ keyword: string;
+ dataPath: string;
+ schemaPath: string;
+ params: ErrorParameters;
+ // Excluded if messages set to false.
+ message?: string;
+ // These are added with the `verbose` option.
+ schema?: Object;
+ parentSchema?: Object;
+ data?: any;
+ }
+
+ type ErrorParameters = RefParams | LimitParams | AdditionalPropertiesParams |
+ DependenciesParams | FormatParams | ComparisonParams |
+ MultipleOfParams | PatternParams | RequiredParams |
+ TypeParams | UniqueItemsParams | CustomParams |
+ PatternGroupsParams | PatternRequiredParams |
+ SwitchParams | NoParams;
+
+ interface RefParams {
+ ref: string;
+ }
+
+ interface LimitParams {
+ limit: number;
+ }
+
+ interface AdditionalPropertiesParams {
+ additionalProperty: string;
+ }
+
+ interface DependenciesParams {
+ property: string;
+ missingProperty: string;
+ depsCount: number;
+ deps: string;
+ }
+
+ interface FormatParams {
+ format: string
+ }
+
+ interface ComparisonParams {
+ comparison: string;
+ limit: number | string;
+ exclusive: boolean;
+ }
+
+ interface MultipleOfParams {
+ multipleOf: number;
+ }
+
+ interface PatternParams {
+ pattern: string;
+ }
+
+ interface RequiredParams {
+ missingProperty: string;
+ }
+
+ interface TypeParams {
+ type: string;
+ }
+
+ interface UniqueItemsParams {
+ i: number;
+ j: number;
+ }
+
+ interface CustomParams {
+ keyword: string;
+ }
+
+ interface PatternGroupsParams {
+ reason: string;
+ limit: number;
+ pattern: string;
+ }
+
+ interface PatternRequiredParams {
+ missingPattern: string;
+ }
+
+ interface SwitchParams {
+ caseIndex: number;
+ }
+
+ interface NoParams {}
+}
+
+export = ajv;
diff --git a/tools/eslint/node_modules/ajv/lib/ajv.js b/tools/eslint/node_modules/ajv/lib/ajv.js
new file mode 100644
index 0000000000..02f3d4be18
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/ajv.js
@@ -0,0 +1,416 @@
+'use strict';
+
+var compileSchema = require('./compile')
+ , resolve = require('./compile/resolve')
+ , Cache = require('./cache')
+ , SchemaObject = require('./compile/schema_obj')
+ , stableStringify = require('json-stable-stringify')
+ , formats = require('./compile/formats')
+ , rules = require('./compile/rules')
+ , v5 = require('./v5')
+ , util = require('./compile/util')
+ , async = require('./async')
+ , co = require('co');
+
+module.exports = Ajv;
+
+Ajv.prototype.compileAsync = async.compile;
+Ajv.prototype.addKeyword = require('./keyword');
+Ajv.ValidationError = require('./compile/validation_error');
+
+var META_SCHEMA_ID = 'http://json-schema.org/draft-04/schema';
+var SCHEMA_URI_FORMAT = /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i;
+function SCHEMA_URI_FORMAT_FUNC(str) {
+ return SCHEMA_URI_FORMAT.test(str);
+}
+
+var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ];
+
+/**
+ * Creates validator instance.
+ * Usage: `Ajv(opts)`
+ * @param {Object} opts optional options
+ * @return {Object} ajv instance
+ */
+function Ajv(opts) {
+ if (!(this instanceof Ajv)) return new Ajv(opts);
+ var self = this;
+
+ opts = this._opts = util.copy(opts) || {};
+ this._schemas = {};
+ this._refs = {};
+ this._fragments = {};
+ this._formats = formats(opts.format);
+ this._cache = opts.cache || new Cache;
+ this._loadingSchemas = {};
+ this._compilations = [];
+ this.RULES = rules();
+
+ // this is done on purpose, so that methods are bound to the instance
+ // (without using bind) so that they can be used without the instance
+ this.validate = validate;
+ this.compile = compile;
+ this.addSchema = addSchema;
+ this.addMetaSchema = addMetaSchema;
+ this.validateSchema = validateSchema;
+ this.getSchema = getSchema;
+ this.removeSchema = removeSchema;
+ this.addFormat = addFormat;
+ this.errorsText = errorsText;
+
+ this._addSchema = _addSchema;
+ this._compile = _compile;
+
+ opts.loopRequired = opts.loopRequired || Infinity;
+ if (opts.async || opts.transpile) async.setup(opts);
+ if (opts.beautify === true) opts.beautify = { indent_size: 2 };
+ if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
+ this._metaOpts = getMetaSchemaOptions();
+
+ if (opts.formats) addInitialFormats();
+ addDraft4MetaSchema();
+ if (opts.v5) v5.enable(this);
+ if (typeof opts.meta == 'object') addMetaSchema(opts.meta);
+ addInitialSchemas();
+
+
+ /**
+ * Validate data using schema
+ * Schema will be compiled and cached (using serialized JSON as key. [json-stable-stringify](https://github.com/substack/json-stable-stringify) is used to serialize.
+ * @param {String|Object} schemaKeyRef key, ref or schema object
+ * @param {Any} data to be validated
+ * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
+ */
+ function validate(schemaKeyRef, data) {
+ var v;
+ if (typeof schemaKeyRef == 'string') {
+ v = getSchema(schemaKeyRef);
+ if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
+ } else {
+ var schemaObj = _addSchema(schemaKeyRef);
+ v = schemaObj.validate || _compile(schemaObj);
+ }
+
+ var valid = v(data);
+ if (v.$async === true)
+ return self._opts.async == '*' ? co(valid) : valid;
+ self.errors = v.errors;
+ return valid;
+ }
+
+
+ /**
+ * Create validating function for passed schema.
+ * @param {Object} schema schema object
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
+ * @return {Function} validating function
+ */
+ function compile(schema, _meta) {
+ var schemaObj = _addSchema(schema, undefined, _meta);
+ return schemaObj.validate || _compile(schemaObj);
+ }
+
+
+ /**
+ * Adds schema to the instance.
+ * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
+ * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
+ * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
+ */
+ function addSchema(schema, key, _skipValidation, _meta) {
+ if (Array.isArray(schema)){
+ for (var i=0; i<schema.length; i++) addSchema(schema[i], undefined, _skipValidation, _meta);
+ return;
+ }
+ // can key/id have # inside?
+ key = resolve.normalizeId(key || schema.id);
+ checkUnique(key);
+ self._schemas[key] = _addSchema(schema, _skipValidation, _meta, true);
+ }
+
+
+ /**
+ * Add schema that will be used to validate other schemas
+ * options in META_IGNORE_OPTIONS are alway set to false
+ * @param {Object} schema schema object
+ * @param {String} key optional schema key
+ * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
+ */
+ function addMetaSchema(schema, key, skipValidation) {
+ addSchema(schema, key, skipValidation, true);
+ }
+
+
+ /**
+ * Validate schema
+ * @param {Object} schema schema to validate
+ * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid
+ * @return {Boolean} true if schema is valid
+ */
+ function validateSchema(schema, throwOrLogError) {
+ var $schema = schema.$schema || self._opts.defaultMeta || defaultMeta();
+ var currentUriFormat = self._formats.uri;
+ self._formats.uri = typeof currentUriFormat == 'function'
+ ? SCHEMA_URI_FORMAT_FUNC
+ : SCHEMA_URI_FORMAT;
+ var valid;
+ try { valid = validate($schema, schema); }
+ finally { self._formats.uri = currentUriFormat; }
+ if (!valid && throwOrLogError) {
+ var message = 'schema is invalid: ' + errorsText();
+ if (self._opts.validateSchema == 'log') console.error(message);
+ else throw new Error(message);
+ }
+ return valid;
+ }
+
+
+ function defaultMeta() {
+ var meta = self._opts.meta;
+ self._opts.defaultMeta = typeof meta == 'object'
+ ? meta.id || meta
+ : self._opts.v5
+ ? v5.META_SCHEMA_ID
+ : META_SCHEMA_ID;
+ return self._opts.defaultMeta;
+ }
+
+
+ /**
+ * Get compiled schema from the instance by `key` or `ref`.
+ * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
+ * @return {Function} schema validating function (with property `schema`).
+ */
+ function getSchema(keyRef) {
+ var schemaObj = _getSchemaObj(keyRef);
+ switch (typeof schemaObj) {
+ case 'object': return schemaObj.validate || _compile(schemaObj);
+ case 'string': return getSchema(schemaObj);
+ case 'undefined': return _getSchemaFragment(keyRef);
+ }
+ }
+
+
+ function _getSchemaFragment(ref) {
+ var res = resolve.schema.call(self, { schema: {} }, ref);
+ if (res) {
+ var schema = res.schema
+ , root = res.root
+ , baseId = res.baseId;
+ var v = compileSchema.call(self, schema, root, undefined, baseId);
+ self._fragments[ref] = new SchemaObject({
+ ref: ref,
+ fragment: true,
+ schema: schema,
+ root: root,
+ baseId: baseId,
+ validate: v
+ });
+ return v;
+ }
+ }
+
+
+ function _getSchemaObj(keyRef) {
+ keyRef = resolve.normalizeId(keyRef);
+ return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
+ }
+
+
+ /**
+ * Remove cached schema(s).
+ * If no parameter is passed all schemas but meta-schemas are removed.
+ * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
+ * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
+ * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
+ */
+ function removeSchema(schemaKeyRef) {
+ if (schemaKeyRef instanceof RegExp) {
+ _removeAllSchemas(self._schemas, schemaKeyRef);
+ _removeAllSchemas(self._refs, schemaKeyRef);
+ return;
+ }
+ switch (typeof schemaKeyRef) {
+ case 'undefined':
+ _removeAllSchemas(self._schemas);
+ _removeAllSchemas(self._refs);
+ self._cache.clear();
+ return;
+ case 'string':
+ var schemaObj = _getSchemaObj(schemaKeyRef);
+ if (schemaObj) self._cache.del(schemaObj.jsonStr);
+ delete self._schemas[schemaKeyRef];
+ delete self._refs[schemaKeyRef];
+ return;
+ case 'object':
+ var jsonStr = stableStringify(schemaKeyRef);
+ self._cache.del(jsonStr);
+ var id = schemaKeyRef.id;
+ if (id) {
+ id = resolve.normalizeId(id);
+ delete self._schemas[id];
+ delete self._refs[id];
+ }
+ }
+ }
+
+
+ function _removeAllSchemas(schemas, regex) {
+ for (var keyRef in schemas) {
+ var schemaObj = schemas[keyRef];
+ if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
+ self._cache.del(schemaObj.jsonStr);
+ delete schemas[keyRef];
+ }
+ }
+ }
+
+
+ function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
+ if (typeof schema != 'object') throw new Error('schema should be object');
+ var jsonStr = stableStringify(schema);
+ var cached = self._cache.get(jsonStr);
+ if (cached) return cached;
+
+ shouldAddSchema = shouldAddSchema || self._opts.addUsedSchema !== false;
+
+ var id = resolve.normalizeId(schema.id);
+ if (id && shouldAddSchema) checkUnique(id);
+
+ var willValidate = self._opts.validateSchema !== false && !skipValidation;
+ var recursiveMeta;
+ if (willValidate && !(recursiveMeta = schema.id && schema.id == schema.$schema))
+ validateSchema(schema, true);
+
+ var localRefs = resolve.ids.call(self, schema);
+
+ var schemaObj = new SchemaObject({
+ id: id,
+ schema: schema,
+ localRefs: localRefs,
+ jsonStr: jsonStr,
+ meta: meta
+ });
+
+ if (id[0] != '#' && shouldAddSchema) self._refs[id] = schemaObj;
+ self._cache.put(jsonStr, schemaObj);
+
+ if (willValidate && recursiveMeta) validateSchema(schema, true);
+
+ return schemaObj;
+ }
+
+
+ function _compile(schemaObj, root) {
+ if (schemaObj.compiling) {
+ schemaObj.validate = callValidate;
+ callValidate.schema = schemaObj.schema;
+ callValidate.errors = null;
+ callValidate.root = root ? root : callValidate;
+ if (schemaObj.schema.$async === true)
+ callValidate.$async = true;
+ return callValidate;
+ }
+ schemaObj.compiling = true;
+
+ var currentOpts;
+ if (schemaObj.meta) {
+ currentOpts = self._opts;
+ self._opts = self._metaOpts;
+ }
+
+ var v;
+ try { v = compileSchema.call(self, schemaObj.schema, root, schemaObj.localRefs); }
+ finally {
+ schemaObj.compiling = false;
+ if (schemaObj.meta) self._opts = currentOpts;
+ }
+
+ schemaObj.validate = v;
+ schemaObj.refs = v.refs;
+ schemaObj.refVal = v.refVal;
+ schemaObj.root = v.root;
+ return v;
+
+
+ function callValidate() {
+ var _validate = schemaObj.validate;
+ var result = _validate.apply(null, arguments);
+ callValidate.errors = _validate.errors;
+ return result;
+ }
+ }
+
+
+ /**
+ * Convert array of error message objects to string
+ * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
+ * @param {Object} options optional options with properties `separator` and `dataVar`.
+ * @return {String} human readable string with all errors descriptions
+ */
+ function errorsText(errors, options) {
+ errors = errors || self.errors;
+ if (!errors) return 'No errors';
+ options = options || {};
+ var separator = options.separator === undefined ? ', ' : options.separator;
+ var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;
+
+ var text = '';
+ for (var i=0; i<errors.length; i++) {
+ var e = errors[i];
+ if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;
+ }
+ return text.slice(0, -separator.length);
+ }
+
+
+ /**
+ * Add custom format
+ * @param {String} name format name
+ * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
+ */
+ function addFormat(name, format) {
+ if (typeof format == 'string') format = new RegExp(format);
+ self._formats[name] = format;
+ }
+
+
+ function addDraft4MetaSchema() {
+ if (self._opts.meta !== false) {
+ var metaSchema = require('./refs/json-schema-draft-04.json');
+ addMetaSchema(metaSchema, META_SCHEMA_ID, true);
+ self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
+ }
+ }
+
+
+ function addInitialSchemas() {
+ var optsSchemas = self._opts.schemas;
+ if (!optsSchemas) return;
+ if (Array.isArray(optsSchemas)) addSchema(optsSchemas);
+ else for (var key in optsSchemas) addSchema(optsSchemas[key], key);
+ }
+
+
+ function addInitialFormats() {
+ for (var name in self._opts.formats) {
+ var format = self._opts.formats[name];
+ addFormat(name, format);
+ }
+ }
+
+
+ function checkUnique(id) {
+ if (self._schemas[id] || self._refs[id])
+ throw new Error('schema with key or id "' + id + '" already exists');
+ }
+
+
+ function getMetaSchemaOptions() {
+ var metaOpts = util.copy(self._opts);
+ for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
+ delete metaOpts[META_IGNORE_OPTIONS[i]];
+ return metaOpts;
+ }
+}
diff --git a/tools/eslint/node_modules/ajv/lib/async.js b/tools/eslint/node_modules/ajv/lib/async.js
new file mode 100644
index 0000000000..e5eac8c8bc
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/async.js
@@ -0,0 +1,214 @@
+'use strict';
+
+module.exports = {
+ setup: setupAsync,
+ compile: compileAsync
+};
+
+
+var util = require('./compile/util');
+
+var ASYNC = {
+ '*': checkGenerators,
+ 'co*': checkGenerators,
+ 'es7': checkAsyncFunction
+};
+
+var TRANSPILE = {
+ 'nodent': getNodent,
+ 'regenerator': getRegenerator
+};
+
+var MODES = [
+ { async: 'co*' },
+ { async: 'es7', transpile: 'nodent' },
+ { async: 'co*', transpile: 'regenerator' }
+];
+
+
+var regenerator, nodent;
+
+
+function setupAsync(opts, required) {
+ if (required !== false) required = true;
+ var async = opts.async
+ , transpile = opts.transpile
+ , check;
+
+ switch (typeof transpile) {
+ case 'string':
+ var get = TRANSPILE[transpile];
+ if (!get) throw new Error('bad transpiler: ' + transpile);
+ return (opts._transpileFunc = get(opts, required));
+ case 'undefined':
+ case 'boolean':
+ if (typeof async == 'string') {
+ check = ASYNC[async];
+ if (!check) throw new Error('bad async mode: ' + async);
+ return (opts.transpile = check(opts, required));
+ }
+
+ for (var i=0; i<MODES.length; i++) {
+ var _opts = MODES[i];
+ if (setupAsync(_opts, false)) {
+ util.copy(_opts, opts);
+ return opts.transpile;
+ }
+ }
+ /* istanbul ignore next */
+ throw new Error('generators, nodent and regenerator are not available');
+ case 'function':
+ return (opts._transpileFunc = opts.transpile);
+ default:
+ throw new Error('bad transpiler: ' + transpile);
+ }
+}
+
+
+function checkGenerators(opts, required) {
+ /* jshint evil: true */
+ try {
+ (new Function('(function*(){})()'))();
+ return true;
+ } catch(e) {
+ /* istanbul ignore next */
+ if (required) throw new Error('generators not supported');
+ }
+}
+
+
+function checkAsyncFunction(opts, required) {
+ /* jshint evil: true */
+ try {
+ (new Function('(async function(){})()'))();
+ /* istanbul ignore next */
+ return true;
+ } catch(e) {
+ if (required) throw new Error('es7 async functions not supported');
+ }
+}
+
+
+function getRegenerator(opts, required) {
+ try {
+ if (!regenerator) {
+ regenerator = require('' + 'regenerator');
+ regenerator.runtime();
+ }
+ if (!opts.async || opts.async === true)
+ opts.async = 'es7';
+ return regeneratorTranspile;
+ } catch(e) {
+ /* istanbul ignore next */
+ if (required) throw new Error('regenerator not available');
+ }
+}
+
+
+function regeneratorTranspile(code) {
+ return regenerator.compile(code).code;
+}
+
+
+function getNodent(opts, required) {
+ /* jshint evil: true */
+ try {
+ if (!nodent) nodent = require('' + 'nodent')({ log: false, dontInstallRequireHook: true });
+ if (opts.async != 'es7') {
+ if (opts.async && opts.async !== true) console.warn('nodent transpiles only es7 async functions');
+ opts.async = 'es7';
+ }
+ return nodentTranspile;
+ } catch(e) {
+ /* istanbul ignore next */
+ if (required) throw new Error('nodent not available');
+ }
+}
+
+
+function nodentTranspile(code) {
+ return nodent.compile(code, '', { promises: true, sourcemap: false }).code;
+}
+
+
+/**
+ * Creates validating function for passed schema with asynchronous loading of missing schemas.
+ * `loadSchema` option should be a function that accepts schema uri and node-style callback.
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Function} callback node-style callback, it is always called with 2 parameters: error (or null) and validating function.
+ */
+function compileAsync(schema, callback) {
+ /* eslint no-shadow: 0 */
+ /* jshint validthis: true */
+ var schemaObj;
+ var self = this;
+ try {
+ schemaObj = this._addSchema(schema);
+ } catch(e) {
+ setTimeout(function() { callback(e); });
+ return;
+ }
+ if (schemaObj.validate) {
+ setTimeout(function() { callback(null, schemaObj.validate); });
+ } else {
+ if (typeof this._opts.loadSchema != 'function')
+ throw new Error('options.loadSchema should be a function');
+ _compileAsync(schema, callback, true);
+ }
+
+
+ function _compileAsync(schema, callback, firstCall) {
+ var validate;
+ try { validate = self.compile(schema); }
+ catch(e) {
+ if (e.missingSchema) loadMissingSchema(e);
+ else deferCallback(e);
+ return;
+ }
+ deferCallback(null, validate);
+
+ function loadMissingSchema(e) {
+ var ref = e.missingSchema;
+ if (self._refs[ref] || self._schemas[ref])
+ return callback(new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved'));
+ var _callbacks = self._loadingSchemas[ref];
+ if (_callbacks) {
+ if (typeof _callbacks == 'function')
+ self._loadingSchemas[ref] = [_callbacks, schemaLoaded];
+ else
+ _callbacks[_callbacks.length] = schemaLoaded;
+ } else {
+ self._loadingSchemas[ref] = schemaLoaded;
+ self._opts.loadSchema(ref, function (err, sch) {
+ var _callbacks = self._loadingSchemas[ref];
+ delete self._loadingSchemas[ref];
+ if (typeof _callbacks == 'function') {
+ _callbacks(err, sch);
+ } else {
+ for (var i=0; i<_callbacks.length; i++)
+ _callbacks[i](err, sch);
+ }
+ });
+ }
+
+ function schemaLoaded(err, sch) {
+ if (err) return callback(err);
+ if (!(self._refs[ref] || self._schemas[ref])) {
+ try {
+ self.addSchema(sch, ref);
+ } catch(e) {
+ callback(e);
+ return;
+ }
+ }
+ _compileAsync(schema, callback);
+ }
+ }
+
+ function deferCallback(err, validate) {
+ if (firstCall) setTimeout(function() { callback(err, validate); });
+ else return callback(err, validate);
+ }
+ }
+}
diff --git a/tools/eslint/node_modules/ajv/lib/cache.js b/tools/eslint/node_modules/ajv/lib/cache.js
new file mode 100644
index 0000000000..7558874c73
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/cache.js
@@ -0,0 +1,26 @@
+'use strict';
+
+
+var Cache = module.exports = function Cache() {
+ this._cache = {};
+};
+
+
+Cache.prototype.put = function Cache_put(key, value) {
+ this._cache[key] = value;
+};
+
+
+Cache.prototype.get = function Cache_get(key) {
+ return this._cache[key];
+};
+
+
+Cache.prototype.del = function Cache_del(key) {
+ delete this._cache[key];
+};
+
+
+Cache.prototype.clear = function Cache_clear() {
+ this._cache = {};
+};
diff --git a/tools/eslint/node_modules/ajv/lib/compile/_rules.js b/tools/eslint/node_modules/ajv/lib/compile/_rules.js
new file mode 100644
index 0000000000..c98610e41a
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/compile/_rules.js
@@ -0,0 +1,28 @@
+'use strict';
+
+//all requires must be explicit because browserify won't work with dynamic requires
+module.exports = {
+ '$ref': require('../dotjs/ref'),
+ allOf: require('../dotjs/allOf'),
+ anyOf: require('../dotjs/anyOf'),
+ dependencies: require('../dotjs/dependencies'),
+ 'enum': require('../dotjs/enum'),
+ format: require('../dotjs/format'),
+ items: require('../dotjs/items'),
+ maximum: require('../dotjs/_limit'),
+ minimum: require('../dotjs/_limit'),
+ maxItems: require('../dotjs/_limitItems'),
+ minItems: require('../dotjs/_limitItems'),
+ maxLength: require('../dotjs/_limitLength'),
+ minLength: require('../dotjs/_limitLength'),
+ maxProperties: require('../dotjs/_limitProperties'),
+ minProperties: require('../dotjs/_limitProperties'),
+ multipleOf: require('../dotjs/multipleOf'),
+ not: require('../dotjs/not'),
+ oneOf: require('../dotjs/oneOf'),
+ pattern: require('../dotjs/pattern'),
+ properties: require('../dotjs/properties'),
+ required: require('../dotjs/required'),
+ uniqueItems: require('../dotjs/uniqueItems'),
+ validate: require('../dotjs/validate')
+};
diff --git a/tools/eslint/node_modules/ajv/lib/compile/equal.js b/tools/eslint/node_modules/ajv/lib/compile/equal.js
new file mode 100644
index 0000000000..7b07ea1711
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/compile/equal.js
@@ -0,0 +1,34 @@
+'use strict';
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ var arrA = Array.isArray(a)
+ , arrB = Array.isArray(b)
+ , i;
+
+ if (arrA && arrB) {
+ if (a.length != b.length) return false;
+ for (i = 0; i < a.length; i++)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+ if (arrA != arrB) return false;
+
+ if (a && b && typeof a === 'object' && typeof b === 'object') {
+ var keys = Object.keys(a);
+
+ if (keys.length !== Object.keys(b).length) return false;
+
+ for (i = 0; i < keys.length; i++)
+ if (b[keys[i]] === undefined) return false;
+
+ for (i = 0; i < keys.length; i++)
+ if(!equal(a[keys[i]], b[keys[i]])) return false;
+
+ return true;
+ }
+
+ return false;
+};
diff --git a/tools/eslint/node_modules/ajv/lib/compile/formats.js b/tools/eslint/node_modules/ajv/lib/compile/formats.js
new file mode 100644
index 0000000000..4b5fbfbfa7
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/compile/formats.js
@@ -0,0 +1,164 @@
+'use strict';
+
+var util = require('./util');
+
+var DATE = /^\d\d\d\d-(\d\d)-(\d\d)$/;
+var DAYS = [0,31,29,31,30,31,30,31,31,30,31,30,31];
+var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;
+var HOSTNAME = /^[0-9a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?(\.[0-9a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?)*$/i;
+var URI = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i;
+var UUID = /^(?:urn\:uuid\:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
+var JSON_POINTER = /^(?:\/(?:[^~\/]|~0|~1)+)*(?:\/)?$|^\#(?:\/(?:[a-z0-9_\-\.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)+)*(?:\/)?$/i;
+var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)+)*(?:\/)?)$/;
+
+
+module.exports = formats;
+
+function formats(mode) {
+ mode = mode == 'full' ? 'full' : 'fast';
+ var formatDefs = util.copy(formats[mode]);
+ for (var fName in formats.compare) {
+ formatDefs[fName] = {
+ validate: formatDefs[fName],
+ compare: formats.compare[fName]
+ };
+ }
+ return formatDefs;
+}
+
+
+formats.fast = {
+ // date: http://tools.ietf.org/html/rfc3339#section-5.6
+ date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
+ // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
+ time: /^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,
+ 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,
+ // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
+ uri: /^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i,
+ // email (sources from jsen validator):
+ // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
+ // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation')
+ email: /^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
+ hostname: HOSTNAME,
+ // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
+ ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
+ // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses
+ ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
+ regex: regex,
+ // uuid: http://tools.ietf.org/html/rfc4122
+ uuid: UUID,
+ // JSON-pointer: https://tools.ietf.org/html/rfc6901
+ // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
+ 'json-pointer': JSON_POINTER,
+ // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
+};
+
+
+formats.full = {
+ date: date,
+ time: time,
+ 'date-time': date_time,
+ uri: uri,
+ email: /^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
+ hostname: hostname,
+ ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
+ ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
+ regex: regex,
+ uuid: UUID,
+ 'json-pointer': JSON_POINTER,
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
+};
+
+
+formats.compare = {
+ date: compareDate,
+ time: compareTime,
+ 'date-time': compareDateTime
+};
+
+
+function date(str) {
+ // full-date from http://tools.ietf.org/html/rfc3339#section-5.6
+ var matches = str.match(DATE);
+ if (!matches) return false;
+
+ var month = +matches[1];
+ var day = +matches[2];
+ return month >= 1 && month <= 12 && day >= 1 && day <= DAYS[month];
+}
+
+
+function time(str, full) {
+ var matches = str.match(TIME);
+ if (!matches) return false;
+
+ var hour = matches[1];
+ var minute = matches[2];
+ var second = matches[3];
+ var timeZone = matches[5];
+ return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone);
+}
+
+
+var DATE_TIME_SEPARATOR = /t|\s/i;
+function date_time(str) {
+ // http://tools.ietf.org/html/rfc3339#section-5.6
+ var dateTime = str.split(DATE_TIME_SEPARATOR);
+ return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true);
+}
+
+
+function hostname(str) {
+ // https://tools.ietf.org/html/rfc1034#section-3.5
+ // https://tools.ietf.org/html/rfc1123#section-2
+ return str.length <= 255 && HOSTNAME.test(str);
+}
+
+
+var NOT_URI_FRAGMENT = /\/|\:/;
+function uri(str) {
+ // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "."
+ return NOT_URI_FRAGMENT.test(str) && URI.test(str);
+}
+
+
+function regex(str) {
+ try {
+ new RegExp(str);
+ return true;
+ } catch(e) {
+ return false;
+ }
+}
+
+
+function compareDate(d1, d2) {
+ if (!(d1 && d2)) return;
+ if (d1 > d2) return 1;
+ if (d1 < d2) return -1;
+ if (d1 === d2) return 0;
+}
+
+
+function compareTime(t1, t2) {
+ if (!(t1 && t2)) return;
+ t1 = t1.match(TIME);
+ t2 = t2.match(TIME);
+ if (!(t1 && t2)) return;
+ t1 = t1[1] + t1[2] + t1[3] + (t1[4]||'');
+ t2 = t2[1] + t2[2] + t2[3] + (t2[4]||'');
+ if (t1 > t2) return 1;
+ if (t1 < t2) return -1;
+ if (t1 === t2) return 0;
+}
+
+
+function compareDateTime(dt1, dt2) {
+ if (!(dt1 && dt2)) return;
+ dt1 = dt1.split(DATE_TIME_SEPARATOR);
+ dt2 = dt2.split(DATE_TIME_SEPARATOR);
+ var res = compareDate(dt1[0], dt2[0]);
+ if (res === undefined) return;
+ return res || compareTime(dt1[1], dt2[1]);
+}
diff --git a/tools/eslint/node_modules/ajv/lib/compile/index.js b/tools/eslint/node_modules/ajv/lib/compile/index.js
new file mode 100644
index 0000000000..546a7d454a
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/compile/index.js
@@ -0,0 +1,381 @@
+'use strict';
+
+var resolve = require('./resolve')
+ , util = require('./util')
+ , stableStringify = require('json-stable-stringify')
+ , async = require('../async');
+
+var beautify = (function() { try { return require('' + 'js-beautify').js_beautify; } catch(e) {/*empty*/} })();
+
+var validateGenerator = require('../dotjs/validate');
+
+/**
+ * Functions below are used inside compiled validations function
+ */
+
+var co = require('co');
+var ucs2length = util.ucs2length;
+var equal = require('./equal');
+
+// this error is thrown by async schemas to return validation errors via exception
+var ValidationError = require('./validation_error');
+
+module.exports = compile;
+
+
+/**
+ * Compiles schema to validation function
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Object} root object with information about the root schema for this schema
+ * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution
+ * @param {String} baseId base ID for IDs in the schema
+ * @return {Function} validation function
+ */
+function compile(schema, root, localRefs, baseId) {
+ /* jshint validthis: true, evil: true */
+ /* eslint no-shadow: 0 */
+ var self = this
+ , opts = this._opts
+ , refVal = [ undefined ]
+ , refs = {}
+ , patterns = []
+ , patternsHash = {}
+ , defaults = []
+ , defaultsHash = {}
+ , customRules = []
+ , keepSourceCode = opts.sourceCode !== false;
+
+ root = root || { schema: schema, refVal: refVal, refs: refs };
+
+ var c = checkCompiling.call(this, schema, root, baseId);
+ var compilation = this._compilations[c.index];
+ if (c.compiling) return (compilation.callValidate = callValidate);
+
+ var formats = this._formats;
+ var RULES = this.RULES;
+
+ try {
+ var v = localCompile(schema, root, localRefs, baseId);
+ compilation.validate = v;
+ var cv = compilation.callValidate;
+ if (cv) {
+ cv.schema = v.schema;
+ cv.errors = null;
+ cv.refs = v.refs;
+ cv.refVal = v.refVal;
+ cv.root = v.root;
+ cv.$async = v.$async;
+ if (keepSourceCode) cv.sourceCode = v.sourceCode;
+ }
+ return v;
+ } finally {
+ endCompiling.call(this, schema, root, baseId);
+ }
+
+ function callValidate() {
+ var validate = compilation.validate;
+ var result = validate.apply(null, arguments);
+ callValidate.errors = validate.errors;
+ return result;
+ }
+
+ function localCompile(_schema, _root, localRefs, baseId) {
+ var isRoot = !_root || (_root && _root.schema == _schema);
+ if (_root.schema != root.schema)
+ return compile.call(self, _schema, _root, localRefs, baseId);
+
+ var $async = _schema.$async === true;
+ if ($async && !opts.transpile) async.setup(opts);
+
+ var sourceCode = validateGenerator({
+ isTop: true,
+ schema: _schema,
+ isRoot: isRoot,
+ baseId: baseId,
+ root: _root,
+ schemaPath: '',
+ errSchemaPath: '#',
+ errorPath: '""',
+ RULES: RULES,
+ validate: validateGenerator,
+ util: util,
+ resolve: resolve,
+ resolveRef: resolveRef,
+ usePattern: usePattern,
+ useDefault: useDefault,
+ useCustomRule: useCustomRule,
+ opts: opts,
+ formats: formats,
+ self: self
+ });
+
+ sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
+ + vars(defaults, defaultCode) + vars(customRules, customRuleCode)
+ + sourceCode + 'return validate;';
+
+ if (opts.beautify) {
+ /* istanbul ignore else */
+ if (beautify) sourceCode = beautify(sourceCode, opts.beautify);
+ else console.error('"npm install js-beautify" to use beautify option');
+ }
+ // console.log('\n\n\n *** \n', sourceCode);
+ var validate, validateCode
+ , transpile = opts._transpileFunc;
+ try {
+ validateCode = $async && transpile
+ ? transpile(sourceCode)
+ : sourceCode;
+
+ var makeValidate = new Function(
+ 'self',
+ 'RULES',
+ 'formats',
+ 'root',
+ 'refVal',
+ 'defaults',
+ 'customRules',
+ 'co',
+ 'equal',
+ 'ucs2length',
+ 'ValidationError',
+ validateCode
+ );
+
+ validate = makeValidate(
+ self,
+ RULES,
+ formats,
+ root,
+ refVal,
+ defaults,
+ customRules,
+ co,
+ equal,
+ ucs2length,
+ ValidationError
+ );
+
+ refVal[0] = validate;
+ } catch(e) {
+ console.error('Error compiling schema, function code:', validateCode);
+ throw e;
+ }
+
+ validate.schema = _schema;
+ validate.errors = null;
+ validate.refs = refs;
+ validate.refVal = refVal;
+ validate.root = isRoot ? validate : _root;
+ if ($async) validate.$async = true;
+ if (keepSourceCode) validate.sourceCode = sourceCode;
+ if (opts.sourceCode === true) {
+ validate.source = {
+ patterns: patterns,
+ defaults: defaults
+ };
+ }
+
+ return validate;
+ }
+
+ function resolveRef(baseId, ref, isRoot) {
+ ref = resolve.url(baseId, ref);
+ var refIndex = refs[ref];
+ var _refVal, refCode;
+ if (refIndex !== undefined) {
+ _refVal = refVal[refIndex];
+ refCode = 'refVal[' + refIndex + ']';
+ return resolvedRef(_refVal, refCode);
+ }
+ if (!isRoot && root.refs) {
+ var rootRefId = root.refs[ref];
+ if (rootRefId !== undefined) {
+ _refVal = root.refVal[rootRefId];
+ refCode = addLocalRef(ref, _refVal);
+ return resolvedRef(_refVal, refCode);
+ }
+ }
+
+ refCode = addLocalRef(ref);
+ var v = resolve.call(self, localCompile, root, ref);
+ if (!v) {
+ var localSchema = localRefs && localRefs[ref];
+ if (localSchema) {
+ v = resolve.inlineRef(localSchema, opts.inlineRefs)
+ ? localSchema
+ : compile.call(self, localSchema, root, localRefs, baseId);
+ }
+ }
+
+ if (v) {
+ replaceLocalRef(ref, v);
+ return resolvedRef(v, refCode);
+ }
+ }
+
+ function addLocalRef(ref, v) {
+ var refId = refVal.length;
+ refVal[refId] = v;
+ refs[ref] = refId;
+ return 'refVal' + refId;
+ }
+
+ function replaceLocalRef(ref, v) {
+ var refId = refs[ref];
+ refVal[refId] = v;
+ }
+
+ function resolvedRef(refVal, code) {
+ return typeof refVal == 'object'
+ ? { code: code, schema: refVal, inline: true }
+ : { code: code, $async: refVal && refVal.$async };
+ }
+
+ function usePattern(regexStr) {
+ var index = patternsHash[regexStr];
+ if (index === undefined) {
+ index = patternsHash[regexStr] = patterns.length;
+ patterns[index] = regexStr;
+ }
+ return 'pattern' + index;
+ }
+
+ function useDefault(value) {
+ switch (typeof value) {
+ case 'boolean':
+ case 'number':
+ return '' + value;
+ case 'string':
+ return util.toQuotedString(value);
+ case 'object':
+ if (value === null) return 'null';
+ var valueStr = stableStringify(value);
+ var index = defaultsHash[valueStr];
+ if (index === undefined) {
+ index = defaultsHash[valueStr] = defaults.length;
+ defaults[index] = value;
+ }
+ return 'default' + index;
+ }
+ }
+
+ function useCustomRule(rule, schema, parentSchema, it) {
+ var validateSchema = rule.definition.validateSchema;
+ if (validateSchema && self._opts.validateSchema !== false) {
+ var valid = validateSchema(schema);
+ if (!valid) {
+ var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
+ if (self._opts.validateSchema == 'log') console.error(message);
+ else throw new Error(message);
+ }
+ }
+
+ var compile = rule.definition.compile
+ , inline = rule.definition.inline
+ , macro = rule.definition.macro;
+
+ var validate;
+ if (compile) {
+ validate = compile.call(self, schema, parentSchema, it);
+ } else if (macro) {
+ validate = macro.call(self, schema, parentSchema, it);
+ if (opts.validateSchema !== false) self.validateSchema(validate, true);
+ } else if (inline) {
+ validate = inline.call(self, it, rule.keyword, schema, parentSchema);
+ } else {
+ validate = rule.definition.validate;
+ }
+
+ var index = customRules.length;
+ customRules[index] = validate;
+
+ return {
+ code: 'customRule' + index,
+ validate: validate
+ };
+ }
+}
+
+
+/**
+ * Checks if the schema is currently compiled
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean)
+ */
+function checkCompiling(schema, root, baseId) {
+ /* jshint validthis: true */
+ var index = compIndex.call(this, schema, root, baseId);
+ if (index >= 0) return { index: index, compiling: true };
+ index = this._compilations.length;
+ this._compilations[index] = {
+ schema: schema,
+ root: root,
+ baseId: baseId
+ };
+ return { index: index, compiling: false };
+}
+
+
+/**
+ * Removes the schema from the currently compiled list
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ */
+function endCompiling(schema, root, baseId) {
+ /* jshint validthis: true */
+ var i = compIndex.call(this, schema, root, baseId);
+ if (i >= 0) this._compilations.splice(i, 1);
+}
+
+
+/**
+ * Index of schema compilation in the currently compiled list
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ * @return {Integer} compilation index
+ */
+function compIndex(schema, root, baseId) {
+ /* jshint validthis: true */
+ for (var i=0; i<this._compilations.length; i++) {
+ var c = this._compilations[i];
+ if (c.schema == schema && c.root == root && c.baseId == baseId) return i;
+ }
+ return -1;
+}
+
+
+function patternCode(i, patterns) {
+ return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
+}
+
+
+function defaultCode(i) {
+ return 'var default' + i + ' = defaults[' + i + '];';
+}
+
+
+function refValCode(i, refVal) {
+ return refVal[i] ? 'var refVal' + i + ' = refVal[' + i + '];' : '';
+}
+
+
+function customRuleCode(i) {
+ return 'var customRule' + i + ' = customRules[' + i + '];';
+}
+
+
+function vars(arr, statement) {
+ if (!arr.length) return '';
+ var code = '';
+ for (var i=0; i<arr.length; i++)
+ code += statement(i, arr);
+ return code;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/compile/resolve.js b/tools/eslint/node_modules/ajv/lib/compile/resolve.js
new file mode 100644
index 0000000000..db2b91fbf1
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/compile/resolve.js
@@ -0,0 +1,267 @@
+'use strict';
+
+var url = require('url')
+ , equal = require('./equal')
+ , util = require('./util')
+ , SchemaObject = require('./schema_obj');
+
+module.exports = resolve;
+
+resolve.normalizeId = normalizeId;
+resolve.fullPath = getFullPath;
+resolve.url = resolveUrl;
+resolve.ids = resolveIds;
+resolve.inlineRef = inlineRef;
+resolve.schema = resolveSchema;
+
+/**
+ * [resolve and compile the references ($ref)]
+ * @this Ajv
+ * @param {Function} compile reference to schema compilation funciton (localCompile)
+ * @param {Object} root object with information about the root schema for the current schema
+ * @param {String} ref reference to resolve
+ * @return {Object|Function} schema object (if the schema can be inlined) or validation function
+ */
+function resolve(compile, root, ref) {
+ /* jshint validthis: true */
+ var refVal = this._refs[ref];
+ if (typeof refVal == 'string') {
+ if (this._refs[refVal]) refVal = this._refs[refVal];
+ else return resolve.call(this, compile, root, refVal);
+ }
+
+ refVal = refVal || this._schemas[ref];
+ if (refVal instanceof SchemaObject) {
+ return inlineRef(refVal.schema, this._opts.inlineRefs)
+ ? refVal.schema
+ : refVal.validate || this._compile(refVal);
+ }
+
+ var res = resolveSchema.call(this, root, ref);
+ var schema, v, baseId;
+ if (res) {
+ schema = res.schema;
+ root = res.root;
+ baseId = res.baseId;
+ }
+
+ if (schema instanceof SchemaObject) {
+ v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
+ } else if (schema) {
+ v = inlineRef(schema, this._opts.inlineRefs)
+ ? schema
+ : compile.call(this, schema, root, undefined, baseId);
+ }
+
+ return v;
+}
+
+
+/**
+ * Resolve schema, its root and baseId
+ * @this Ajv
+ * @param {Object} root root object with properties schema, refVal, refs
+ * @param {String} ref reference to resolve
+ * @return {Object} object with properties schema, root, baseId
+ */
+function resolveSchema(root, ref) {
+ /* jshint validthis: true */
+ var p = url.parse(ref, false, true)
+ , refPath = _getFullPath(p)
+ , baseId = getFullPath(root.schema.id);
+ if (refPath !== baseId) {
+ var id = normalizeId(refPath);
+ var refVal = this._refs[id];
+ if (typeof refVal == 'string') {
+ return resolveRecursive.call(this, root, refVal, p);
+ } else if (refVal instanceof SchemaObject) {
+ if (!refVal.validate) this._compile(refVal);
+ root = refVal;
+ } else {
+ refVal = this._schemas[id];
+ if (refVal instanceof SchemaObject) {
+ if (!refVal.validate) this._compile(refVal);
+ if (id == normalizeId(ref))
+ return { schema: refVal, root: root, baseId: baseId };
+ root = refVal;
+ } else {
+ return;
+ }
+ }
+ if (!root.schema) return;
+ baseId = getFullPath(root.schema.id);
+ }
+ return getJsonPointer.call(this, p, baseId, root.schema, root);
+}
+
+
+/* @this Ajv */
+function resolveRecursive(root, ref, parsedRef) {
+ /* jshint validthis: true */
+ var res = resolveSchema.call(this, root, ref);
+ if (res) {
+ var schema = res.schema;
+ var baseId = res.baseId;
+ root = res.root;
+ if (schema.id) baseId = resolveUrl(baseId, schema.id);
+ return getJsonPointer.call(this, parsedRef, baseId, schema, root);
+ }
+}
+
+
+var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
+/* @this Ajv */
+function getJsonPointer(parsedRef, baseId, schema, root) {
+ /* jshint validthis: true */
+ parsedRef.hash = parsedRef.hash || '';
+ if (parsedRef.hash.slice(0,2) != '#/') return;
+ var parts = parsedRef.hash.split('/');
+
+ for (var i = 1; i < parts.length; i++) {
+ var part = parts[i];
+ if (part) {
+ part = util.unescapeFragment(part);
+ schema = schema[part];
+ if (!schema) break;
+ if (schema.id && !PREVENT_SCOPE_CHANGE[part]) baseId = resolveUrl(baseId, schema.id);
+ if (schema.$ref) {
+ var $ref = resolveUrl(baseId, schema.$ref);
+ var res = resolveSchema.call(this, root, $ref);
+ if (res) {
+ schema = res.schema;
+ root = res.root;
+ baseId = res.baseId;
+ }
+ }
+ }
+ }
+ if (schema && schema != root.schema)
+ return { schema: schema, root: root, baseId: baseId };
+}
+
+
+var SIMPLE_INLINED = util.toHash([
+ 'type', 'format', 'pattern',
+ 'maxLength', 'minLength',
+ 'maxProperties', 'minProperties',
+ 'maxItems', 'minItems',
+ 'maximum', 'minimum',
+ 'uniqueItems', 'multipleOf',
+ 'required', 'enum'
+]);
+function inlineRef(schema, limit) {
+ if (limit === false) return false;
+ if (limit === undefined || limit === true) return checkNoRef(schema);
+ else if (limit) return countKeys(schema) <= limit;
+}
+
+
+function checkNoRef(schema) {
+ var item;
+ if (Array.isArray(schema)) {
+ for (var i=0; i<schema.length; i++) {
+ item = schema[i];
+ if (typeof item == 'object' && !checkNoRef(item)) return false;
+ }
+ } else {
+ for (var key in schema) {
+ if (key == '$ref') return false;
+ item = schema[key];
+ if (typeof item == 'object' && !checkNoRef(item)) return false;
+ }
+ }
+ return true;
+}
+
+
+function countKeys(schema) {
+ var count = 0, item;
+ if (Array.isArray(schema)) {
+ for (var i=0; i<schema.length; i++) {
+ item = schema[i];
+ if (typeof item == 'object') count += countKeys(item);
+ if (count == Infinity) return Infinity;
+ }
+ } else {
+ for (var key in schema) {
+ if (key == '$ref') return Infinity;
+ if (SIMPLE_INLINED[key]) {
+ count++;
+ } else {
+ item = schema[key];
+ if (typeof item == 'object') count += countKeys(item) + 1;
+ if (count == Infinity) return Infinity;
+ }
+ }
+ }
+ return count;
+}
+
+
+function getFullPath(id, normalize) {
+ if (normalize !== false) id = normalizeId(id);
+ var p = url.parse(id, false, true);
+ return _getFullPath(p);
+}
+
+
+function _getFullPath(p) {
+ var protocolSeparator = p.protocol || p.href.slice(0,2) == '//' ? '//' : '';
+ return (p.protocol||'') + protocolSeparator + (p.host||'') + (p.path||'') + '#';
+}
+
+
+var TRAILING_SLASH_HASH = /#\/?$/;
+function normalizeId(id) {
+ return id ? id.replace(TRAILING_SLASH_HASH, '') : '';
+}
+
+
+function resolveUrl(baseId, id) {
+ id = normalizeId(id);
+ return url.resolve(baseId, id);
+}
+
+
+/* @this Ajv */
+function resolveIds(schema) {
+ /* eslint no-shadow: 0 */
+ /* jshint validthis: true */
+ var id = normalizeId(schema.id);
+ var localRefs = {};
+ _resolveIds.call(this, schema, getFullPath(id, false), id);
+ return localRefs;
+
+ /* @this Ajv */
+ function _resolveIds(schema, fullPath, baseId) {
+ /* jshint validthis: true */
+ if (Array.isArray(schema)) {
+ for (var i=0; i<schema.length; i++)
+ _resolveIds.call(this, schema[i], fullPath+'/'+i, baseId);
+ } else if (schema && typeof schema == 'object') {
+ if (typeof schema.id == 'string') {
+ var id = baseId = baseId
+ ? url.resolve(baseId, schema.id)
+ : schema.id;
+ id = normalizeId(id);
+
+ var refVal = this._refs[id];
+ if (typeof refVal == 'string') refVal = this._refs[refVal];
+ if (refVal && refVal.schema) {
+ if (!equal(schema, refVal.schema))
+ throw new Error('id "' + id + '" resolves to more than one schema');
+ } else if (id != normalizeId(fullPath)) {
+ if (id[0] == '#') {
+ if (localRefs[id] && !equal(schema, localRefs[id]))
+ throw new Error('id "' + id + '" resolves to more than one schema');
+ localRefs[id] = schema;
+ } else {
+ this._refs[id] = fullPath;
+ }
+ }
+ }
+ for (var key in schema)
+ _resolveIds.call(this, schema[key], fullPath+'/'+util.escapeFragment(key), baseId);
+ }
+ }
+}
diff --git a/tools/eslint/node_modules/ajv/lib/compile/rules.js b/tools/eslint/node_modules/ajv/lib/compile/rules.js
new file mode 100644
index 0000000000..39b1708d96
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/compile/rules.js
@@ -0,0 +1,40 @@
+'use strict';
+
+var ruleModules = require('./_rules')
+ , toHash = require('./util').toHash;
+
+module.exports = function rules() {
+ var RULES = [
+ { type: 'number',
+ rules: [ 'maximum', 'minimum', 'multipleOf'] },
+ { type: 'string',
+ rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },
+ { type: 'array',
+ rules: [ 'maxItems', 'minItems', 'uniqueItems', 'items' ] },
+ { type: 'object',
+ rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'properties' ] },
+ { rules: [ '$ref', 'enum', 'not', 'anyOf', 'oneOf', 'allOf' ] }
+ ];
+
+ var ALL = [ 'type', 'additionalProperties', 'patternProperties' ];
+ var KEYWORDS = [ 'additionalItems', '$schema', 'id', 'title', 'description', 'default' ];
+ var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
+ RULES.all = toHash(ALL);
+
+ RULES.forEach(function (group) {
+ group.rules = group.rules.map(function (keyword) {
+ ALL.push(keyword);
+ var rule = RULES.all[keyword] = {
+ keyword: keyword,
+ code: ruleModules[keyword]
+ };
+ return rule;
+ });
+ });
+
+ RULES.keywords = toHash(ALL.concat(KEYWORDS));
+ RULES.types = toHash(TYPES);
+ RULES.custom = {};
+
+ return RULES;
+};
diff --git a/tools/eslint/node_modules/ajv/lib/compile/schema_obj.js b/tools/eslint/node_modules/ajv/lib/compile/schema_obj.js
new file mode 100644
index 0000000000..e7903b0f46
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/compile/schema_obj.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var util = require('./util');
+
+module.exports = SchemaObject;
+
+function SchemaObject(obj) {
+ util.copy(obj, this);
+}
diff --git a/tools/eslint/node_modules/ajv/lib/compile/ucs2length.js b/tools/eslint/node_modules/ajv/lib/compile/ucs2length.js
new file mode 100644
index 0000000000..d193fb1700
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/compile/ucs2length.js
@@ -0,0 +1,20 @@
+'use strict';
+
+// https://mathiasbynens.be/notes/javascript-encoding
+// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
+module.exports = function ucs2length(str) {
+ var length = 0
+ , len = str.length
+ , pos = 0
+ , value;
+ while (pos < len) {
+ length++;
+ value = str.charCodeAt(pos++);
+ if (value >= 0xD800 && value <= 0xDBFF && pos < len) {
+ // high surrogate, and there is a next character
+ value = str.charCodeAt(pos);
+ if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate
+ }
+ }
+ return length;
+};
diff --git a/tools/eslint/node_modules/ajv/lib/compile/util.js b/tools/eslint/node_modules/ajv/lib/compile/util.js
new file mode 100644
index 0000000000..8451f83ae2
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/compile/util.js
@@ -0,0 +1,257 @@
+'use strict';
+
+
+module.exports = {
+ copy: copy,
+ checkDataType: checkDataType,
+ checkDataTypes: checkDataTypes,
+ coerceToTypes: coerceToTypes,
+ toHash: toHash,
+ getProperty: getProperty,
+ escapeQuotes: escapeQuotes,
+ ucs2length: require('./ucs2length'),
+ varOccurences: varOccurences,
+ varReplace: varReplace,
+ cleanUpCode: cleanUpCode,
+ cleanUpVarErrors: cleanUpVarErrors,
+ schemaHasRules: schemaHasRules,
+ schemaHasRulesExcept: schemaHasRulesExcept,
+ stableStringify: require('json-stable-stringify'),
+ toQuotedString: toQuotedString,
+ getPathExpr: getPathExpr,
+ getPath: getPath,
+ getData: getData,
+ unescapeFragment: unescapeFragment,
+ escapeFragment: escapeFragment,
+ escapeJsonPointer: escapeJsonPointer
+};
+
+
+function copy(o, to) {
+ to = to || {};
+ for (var key in o) to[key] = o[key];
+ return to;
+}
+
+
+function checkDataType(dataType, data, negate) {
+ var EQUAL = negate ? ' !== ' : ' === '
+ , AND = negate ? ' || ' : ' && '
+ , OK = negate ? '!' : ''
+ , NOT = negate ? '' : '!';
+ switch (dataType) {
+ case 'null': return data + EQUAL + 'null';
+ case 'array': return OK + 'Array.isArray(' + data + ')';
+ case 'object': return '(' + OK + data + AND +
+ 'typeof ' + data + EQUAL + '"object"' + AND +
+ NOT + 'Array.isArray(' + data + '))';
+ case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND +
+ NOT + '(' + data + ' % 1)' +
+ AND + data + EQUAL + data + ')';
+ default: return 'typeof ' + data + EQUAL + '"' + dataType + '"';
+ }
+}
+
+
+function checkDataTypes(dataTypes, data) {
+ switch (dataTypes.length) {
+ case 1: return checkDataType(dataTypes[0], data, true);
+ default:
+ var code = '';
+ var types = toHash(dataTypes);
+ if (types.array && types.object) {
+ code = types.null ? '(': '(!' + data + ' || ';
+ code += 'typeof ' + data + ' !== "object")';
+ delete types.null;
+ delete types.array;
+ delete types.object;
+ }
+ if (types.number) delete types.integer;
+ for (var t in types)
+ code += (code ? ' && ' : '' ) + checkDataType(t, data, true);
+
+ return code;
+ }
+}
+
+
+var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
+function coerceToTypes(optionCoerceTypes, dataTypes) {
+ if (Array.isArray(dataTypes)) {
+ var types = [];
+ for (var i=0; i<dataTypes.length; i++) {
+ var t = dataTypes[i];
+ if (COERCE_TO_TYPES[t]) types[types.length] = t;
+ else if (optionCoerceTypes === 'array' && t === 'array') types[types.length] = t;
+ }
+ if (types.length) return types;
+ } else if (COERCE_TO_TYPES[dataTypes]) {
+ return [dataTypes];
+ } else if (optionCoerceTypes === 'array' && dataTypes === 'array') {
+ return ['array'];
+ }
+}
+
+
+function toHash(arr) {
+ var hash = {};
+ for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
+ return hash;
+}
+
+
+var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
+var SINGLE_QUOTE = /'|\\/g;
+function getProperty(key) {
+ return typeof key == 'number'
+ ? '[' + key + ']'
+ : IDENTIFIER.test(key)
+ ? '.' + key
+ : "['" + escapeQuotes(key) + "']";
+}
+
+
+function escapeQuotes(str) {
+ return str.replace(SINGLE_QUOTE, '\\$&')
+ .replace(/\n/g, '\\n')
+ .replace(/\r/g, '\\r')
+ .replace(/\f/g, '\\f')
+ .replace(/\t/g, '\\t');
+}
+
+
+function varOccurences(str, dataVar) {
+ dataVar += '[^0-9]';
+ var matches = str.match(new RegExp(dataVar, 'g'));
+ return matches ? matches.length : 0;
+}
+
+
+function varReplace(str, dataVar, expr) {
+ dataVar += '([^0-9])';
+ expr = expr.replace(/\$/g, '$$$$');
+ return str.replace(new RegExp(dataVar, 'g'), expr + '$1');
+}
+
+
+var EMPTY_ELSE = /else\s*{\s*}/g
+ , EMPTY_IF_NO_ELSE = /if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g
+ , EMPTY_IF_WITH_ELSE = /if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;
+function cleanUpCode(out) {
+ return out.replace(EMPTY_ELSE, '')
+ .replace(EMPTY_IF_NO_ELSE, '')
+ .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))');
+}
+
+
+var ERRORS_REGEXP = /[^v\.]errors/g
+ , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g
+ , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g
+ , RETURN_VALID = 'return errors === 0;'
+ , RETURN_TRUE = 'validate.errors = null; return true;'
+ , RETURN_ASYNC = /if \(errors === 0\) return true;\s*else throw new ValidationError\(vErrors\);/
+ , RETURN_TRUE_ASYNC = 'return true;';
+
+function cleanUpVarErrors(out, async) {
+ var matches = out.match(ERRORS_REGEXP);
+ if (!matches || matches.length !== 2) return out;
+ return async
+ ? out.replace(REMOVE_ERRORS_ASYNC, '')
+ .replace(RETURN_ASYNC, RETURN_TRUE_ASYNC)
+ : out.replace(REMOVE_ERRORS, '')
+ .replace(RETURN_VALID, RETURN_TRUE);
+}
+
+
+function schemaHasRules(schema, rules) {
+ for (var key in schema) if (rules[key]) return true;
+}
+
+
+function schemaHasRulesExcept(schema, rules, exceptKeyword) {
+ for (var key in schema) if (key != exceptKeyword && rules[key]) return true;
+}
+
+
+function toQuotedString(str) {
+ return '\'' + escapeQuotes(str) + '\'';
+}
+
+
+function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
+ var path = jsonPointers // false by default
+ ? '\'/\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \'~0\').replace(/\\//g, \'~1\')')
+ : (isNumber ? '\'[\' + ' + expr + ' + \']\'' : '\'[\\\'\' + ' + expr + ' + \'\\\']\'');
+ return joinPaths(currentPath, path);
+}
+
+
+function getPath(currentPath, prop, jsonPointers) {
+ var path = jsonPointers // false by default
+ ? toQuotedString('/' + escapeJsonPointer(prop))
+ : toQuotedString(getProperty(prop));
+ return joinPaths(currentPath, path);
+}
+
+
+var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
+var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
+function getData($data, lvl, paths) {
+ var up, jsonPointer, data, matches;
+ if ($data === '') return 'rootData';
+ if ($data[0] == '/') {
+ if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
+ jsonPointer = $data;
+ data = 'rootData';
+ } else {
+ matches = $data.match(RELATIVE_JSON_POINTER);
+ if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
+ up = +matches[1];
+ jsonPointer = matches[2];
+ if (jsonPointer == '#') {
+ if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);
+ return paths[lvl - up];
+ }
+
+ if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);
+ data = 'data' + ((lvl - up) || '');
+ if (!jsonPointer) return data;
+ }
+
+ var expr = data;
+ var segments = jsonPointer.split('/');
+ for (var i=0; i<segments.length; i++) {
+ var segment = segments[i];
+ if (segment) {
+ data += getProperty(unescapeJsonPointer(segment));
+ expr += ' && ' + data;
+ }
+ }
+ return expr;
+}
+
+
+function joinPaths (a, b) {
+ if (a == '""') return b;
+ return (a + ' + ' + b).replace(/' \+ '/g, '');
+}
+
+
+function unescapeFragment(str) {
+ return unescapeJsonPointer(decodeURIComponent(str));
+}
+
+
+function escapeFragment(str) {
+ return encodeURIComponent(escapeJsonPointer(str));
+}
+
+
+function escapeJsonPointer(str) {
+ return str.replace(/~/g, '~0').replace(/\//g, '~1');
+}
+
+
+function unescapeJsonPointer(str) {
+ return str.replace(/~1/g, '/').replace(/~0/g, '~');
+}
diff --git a/tools/eslint/node_modules/ajv/lib/compile/validation_error.js b/tools/eslint/node_modules/ajv/lib/compile/validation_error.js
new file mode 100644
index 0000000000..3c5c59478c
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/compile/validation_error.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = ValidationError;
+
+
+function ValidationError(errors) {
+ this.message = 'validation failed';
+ this.errors = errors;
+ this.ajv = this.validation = true;
+}
+
+
+ValidationError.prototype = Object.create(Error.prototype);
+ValidationError.prototype.constructor = ValidationError;
diff --git a/tools/eslint/node_modules/ajv/lib/dot/_limit.jst b/tools/eslint/node_modules/ajv/lib/dot/_limit.jst
new file mode 100644
index 0000000000..21793d874c
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/_limit.jst
@@ -0,0 +1,49 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{
+ var $isMax = $keyword == 'maximum'
+ , $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum'
+ , $schemaExcl = it.schema[$exclusiveKeyword]
+ , $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data
+ , $op = $isMax ? '<' : '>'
+ , $notOp = $isMax ? '>' : '<';
+}}
+
+{{? $isDataExcl }}
+ {{
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr)
+ , $exclusive = 'exclusive' + $lvl
+ , $opExpr = 'op' + $lvl
+ , $opStr = '\' + ' + $opExpr + ' + \'';
+ }}
+ var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}};
+ {{ $schemaValueExcl = 'schemaExcl' + $lvl; }}
+
+ var exclusive{{=$lvl}};
+ if (typeof {{=$schemaValueExcl}} != 'boolean' && typeof {{=$schemaValueExcl}} != 'undefined') {
+ {{ var $errorKeyword = $exclusiveKeyword; }}
+ {{# def.error:'_exclusiveLimit' }}
+ } else if({{# def.$dataNotType:'number' }}
+ ((exclusive{{=$lvl}} = {{=$schemaValueExcl}} === true)
+ ? {{=$data}} {{=$notOp}}= {{=$schemaValue}}
+ : {{=$data}} {{=$notOp}} {{=$schemaValue}})
+ || {{=$data}} !== {{=$data}}) {
+ var op{{=$lvl}} = exclusive{{=$lvl}} ? '{{=$op}}' : '{{=$op}}=';
+{{??}}
+ {{
+ var $exclusive = $schemaExcl === true
+ , $opStr = $op; /*used in error*/
+ if (!$exclusive) $opStr += '=';
+ var $opExpr = '\'' + $opStr + '\''; /*used in error*/
+ }}
+
+ if ({{# def.$dataNotType:'number' }}
+ {{=$data}} {{=$notOp}}{{?$exclusive}}={{?}} {{=$schemaValue}}
+ || {{=$data}} !== {{=$data}}) {
+{{?}}
+ {{ var $errorKeyword = $keyword; }}
+ {{# def.error:'_limit' }}
+ } {{? $breakOnError }} else { {{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/_limitItems.jst b/tools/eslint/node_modules/ajv/lib/dot/_limitItems.jst
new file mode 100644
index 0000000000..a3e078e513
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/_limitItems.jst
@@ -0,0 +1,10 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{ var $op = $keyword == 'maxItems' ? '>' : '<'; }}
+if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) {
+ {{ var $errorKeyword = $keyword; }}
+ {{# def.error:'_limitItems' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/_limitLength.jst b/tools/eslint/node_modules/ajv/lib/dot/_limitLength.jst
new file mode 100644
index 0000000000..cfc8dbb016
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/_limitLength.jst
@@ -0,0 +1,10 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{ var $op = $keyword == 'maxLength' ? '>' : '<'; }}
+if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) {
+ {{ var $errorKeyword = $keyword; }}
+ {{# def.error:'_limitLength' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/_limitProperties.jst b/tools/eslint/node_modules/ajv/lib/dot/_limitProperties.jst
new file mode 100644
index 0000000000..da7ea776f1
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/_limitProperties.jst
@@ -0,0 +1,10 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }}
+if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) {
+ {{ var $errorKeyword = $keyword; }}
+ {{# def.error:'_limitProperties' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/allOf.jst b/tools/eslint/node_modules/ajv/lib/dot/allOf.jst
new file mode 100644
index 0000000000..614579d7a6
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/allOf.jst
@@ -0,0 +1,26 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{ var $currentBaseId = $it.baseId; }}
+
+{{~ $schema:$sch:$i }}
+ {{? {{# def.nonEmptySchema:$sch }} }}
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ }}
+
+ {{# def.insertSubschemaCode }}
+
+ {{# def.ifResultValid }}
+ {{?}}
+{{~}}
+
+{{? $breakOnError }}
+ {{= $closingBraces.slice(0,-1) }}
+{{?}}
+
+{{# def.cleanUp }}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/anyOf.jst b/tools/eslint/node_modules/ajv/lib/dot/anyOf.jst
new file mode 100644
index 0000000000..2a4456087e
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/anyOf.jst
@@ -0,0 +1,48 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{
+ var $noEmptySchema = $schema.every(function($sch) {
+ return {{# def.nonEmptySchema:$sch }};
+ });
+}}
+{{? $noEmptySchema }}
+ {{ var $currentBaseId = $it.baseId; }}
+ var {{=$errs}} = errors;
+ var {{=$valid}} = false;
+
+ {{# def.setCompositeRule }}
+
+ {{~ $schema:$sch:$i }}
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ }}
+
+ {{# def.insertSubschemaCode }}
+
+ {{=$valid}} = {{=$valid}} || valid{{=$it.level}};
+
+ if (!{{=$valid}}) {
+ {{ $closingBraces += '}'; }}
+ {{~}}
+
+ {{# def.resetCompositeRule }}
+
+ {{= $closingBraces }}
+
+ if (!{{=$valid}}) {
+ {{# def.addError:'anyOf' }}
+ } else {
+ {{# def.resetErrors }}
+ {{? it.opts.allErrors }} } {{?}}
+
+ {{# def.cleanUp }}
+{{??}}
+ {{? $breakOnError }}
+ if (true) {
+ {{?}}
+{{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/coerce.def b/tools/eslint/node_modules/ajv/lib/dot/coerce.def
new file mode 100644
index 0000000000..f3ff718d5c
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/coerce.def
@@ -0,0 +1,67 @@
+{{## def.coerceType:
+ {{
+ var $dataType = 'dataType' + $lvl
+ , $coerced = 'coerced' + $lvl;
+ }}
+ var {{=$dataType}} = typeof {{=$data}};
+ {{? it.opts.coerceTypes == 'array'}}
+ if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array';
+ {{?}}
+
+ var {{=$coerced}} = undefined;
+
+ {{ var $bracesCoercion = ''; }}
+ {{~ $coerceToTypes:$type:$i }}
+ {{? $i }}
+ if ({{=$coerced}} === undefined) {
+ {{ $bracesCoercion += '}'; }}
+ {{?}}
+
+ {{? it.opts.coerceTypes == 'array' && $type != 'array' }}
+ if ({{=$dataType}} == 'array' && {{=$data}}.length == 1) {
+ {{=$coerced}} = {{=$data}} = {{=$data}}[0];
+ {{=$dataType}} = typeof {{=$data}};
+ /*if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array';*/
+ }
+ {{?}}
+
+ {{? $type == 'string' }}
+ if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean')
+ {{=$coerced}} = '' + {{=$data}};
+ else if ({{=$data}} === null) {{=$coerced}} = '';
+ {{?? $type == 'number' || $type == 'integer' }}
+ if ({{=$dataType}} == 'boolean' || {{=$data}} === null
+ || ({{=$dataType}} == 'string' && {{=$data}} && {{=$data}} == +{{=$data}}
+ {{? $type == 'integer' }} && !({{=$data}} % 1){{?}}))
+ {{=$coerced}} = +{{=$data}};
+ {{?? $type == 'boolean' }}
+ if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null)
+ {{=$coerced}} = false;
+ else if ({{=$data}} === 'true' || {{=$data}} === 1)
+ {{=$coerced}} = true;
+ {{?? $type == 'null' }}
+ if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false)
+ {{=$coerced}} = null;
+ {{?? it.opts.coerceTypes == 'array' && $type == 'array' }}
+ if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null)
+ {{=$coerced}} = [{{=$data}}];
+ {{?}}
+ {{~}}
+
+ {{= $bracesCoercion }}
+
+ if ({{=$coerced}} === undefined) {
+ {{# def.error:'type' }}
+ } else {
+ {{? $dataLvl }}
+ {{
+ var $parentData = 'data' + (($dataLvl-1)||'')
+ , $dataProperty = it.dataPathArr[$dataLvl];
+ }}
+ {{=$data}} = {{=$parentData}}[{{=$dataProperty}}] = {{=$coerced}};
+ {{??}}
+ data = {{=$coerced}};
+ if (parentData !== undefined) parentData[parentDataProperty] = {{=$coerced}};
+ {{?}}
+ }
+#}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/custom.jst b/tools/eslint/node_modules/ajv/lib/dot/custom.jst
new file mode 100644
index 0000000000..9195bf1cad
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/custom.jst
@@ -0,0 +1,182 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{
+ var $rule = this
+ , $definition = 'definition' + $lvl
+ , $rDef = $rule.definition
+ , $validate = $rDef.validate
+ , $compile
+ , $inline
+ , $macro
+ , $ruleValidate
+ , $validateCode;
+}}
+
+{{? $isData && $rDef.$data }}
+ {{
+ $validateCode = 'keywordValidate' + $lvl;
+ var $validateSchema = $rDef.validateSchema;
+ }}
+ var {{=$definition}} = RULES.custom['{{=$keyword}}'].definition;
+ var {{=$validateCode}} = {{=$definition}}.validate;
+{{??}}
+ {{
+ $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
+ $schemaValue = 'validate.schema' + $schemaPath;
+ $validateCode = $ruleValidate.code;
+ $compile = $rDef.compile;
+ $inline = $rDef.inline;
+ $macro = $rDef.macro;
+ }}
+{{?}}
+
+{{
+ var $ruleErrs = $validateCode + '.errors'
+ , $i = 'i' + $lvl
+ , $ruleErr = 'ruleErr' + $lvl
+ , $asyncKeyword = $rDef.async;
+
+ if ($asyncKeyword && !it.async)
+ throw new Error('async keyword in sync schema');
+}}
+
+
+{{? !($inline || $macro) }}{{=$ruleErrs}} = null;{{?}}
+var {{=$errs}} = errors;
+var valid{{=$lvl}};
+
+{{## def.callRuleValidate:
+ {{=$validateCode}}.call(
+ {{? it.opts.passContext }}this{{??}}self{{?}}
+ {{? $compile || $rDef.schema === false }}
+ , {{=$data}}
+ {{??}}
+ , {{=$schemaValue}}
+ , {{=$data}}
+ , validate.schema{{=it.schemaPath}}
+ {{?}}
+ , {{# def.dataPath }}
+ {{# def.passParentData }}
+ , rootData
+ )
+#}}
+
+{{## def.ruleValidationResult:
+ {{? $inline }}
+ {{? $rDef.statements }}
+ valid{{=$lvl}}
+ {{??}}
+ ({{= $ruleValidate.validate }})
+ {{?}}
+ {{?? $macro }}
+ valid{{=$it.level}}
+ {{??}}
+ {{? $asyncKeyword }}
+ {{? $rDef.errors === false }}
+ ({{=it.yieldAwait}}{{= def_callRuleValidate }})
+ {{??}}
+ valid{{=$lvl}}
+ {{?}}
+ {{??}}
+ {{= def_callRuleValidate }}
+ {{?}}
+ {{?}}
+#}}
+
+{{## def.extendErrors:_inline:
+ for (var {{=$i}}={{=$errs}}; {{=$i}}<errors; {{=$i}}++) {
+ var {{=$ruleErr}} = vErrors[{{=$i}}];
+ {{# _inline ? 'if (\{\{=$ruleErr\}\}.dataPath === undefined) {' : '' }}
+ {{=$ruleErr}}.dataPath = (dataPath || '') + {{= it.errorPath }};
+ {{# _inline ? '}' : '' }}
+ {{# _inline ? 'if (\{\{=$ruleErr\}\}.schemaPath === undefined) {' : '' }}
+ {{=$ruleErr}}.schemaPath = "{{=$errSchemaPath}}";
+ {{# _inline ? '}' : '' }}
+ {{? it.opts.verbose }}
+ {{=$ruleErr}}.schema = {{=$schemaValue}};
+ {{=$ruleErr}}.data = {{=$data}};
+ {{?}}
+ }
+#}}
+
+{{? $inline && $rDef.statements }}
+ {{= $ruleValidate.validate }}
+{{?? $macro }}
+ {{# def.setupNextLevel }}
+ {{
+ $it.schema = $ruleValidate.validate;
+ $it.schemaPath = '';
+ }}
+ {{# def.setCompositeRule }}
+ {{ var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); }}
+ {{# def.resetCompositeRule }}
+ {{= $code }}
+{{?? !$inline }}
+ {{# def.beginDefOut}}
+ {{# def.callRuleValidate }}
+ {{# def.storeDefOut:def_callRuleValidate }}
+
+ {{? $rDef.errors !== false }}
+ {{? $asyncKeyword }}
+ {{ $ruleErrs = 'customErrors' + $lvl; }}
+ var {{=$ruleErrs}} = null;
+ try {
+ valid{{=$lvl}} = {{=it.yieldAwait}}{{= def_callRuleValidate }};
+ } catch (e) {
+ valid{{=$lvl}} = false;
+ if (e instanceof ValidationError) {{=$ruleErrs}} = e.errors;
+ else throw e;
+ }
+ {{??}}
+ {{=$validateCode}}.errors = null;
+ {{?}}
+ {{?}}
+{{?}}
+
+
+if ({{? $validateSchema }}
+ !{{=$definition}}.validateSchema({{=$schemaValue}}) ||
+ {{?}}
+ !{{# def.ruleValidationResult }}) {
+ {{ $errorKeyword = $rule.keyword; }}
+ {{# def.beginDefOut}}
+ {{# def.error:'custom' }}
+ {{# def.storeDefOut:def_customError }}
+
+ {{? $inline }}
+ {{? $rDef.errors }}
+ {{? $rDef.errors != 'full' }}
+ {{# def.extendErrors:true }}
+ {{?}}
+ {{??}}
+ {{? $rDef.errors === false}}
+ {{= def_customError }}
+ {{??}}
+ if ({{=$errs}} == errors) {
+ {{= def_customError }}
+ } else {
+ {{# def.extendErrors:true }}
+ }
+ {{?}}
+ {{?}}
+ {{?? $macro }}
+ {{# def.extraError:'custom' }}
+ {{??}}
+ {{? $rDef.errors === false}}
+ {{= def_customError }}
+ {{??}}
+ if (Array.isArray({{=$ruleErrs}})) {
+ if (vErrors === null) vErrors = {{=$ruleErrs}};
+ else vErrors = vErrors.concat({{=$ruleErrs}});
+ errors = vErrors.length;
+ {{# def.extendErrors:false }}
+ } else {
+ {{= def_customError }}
+ }
+ {{?}}
+ {{?}}
+
+ } {{? $breakOnError }} else { {{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/defaults.def b/tools/eslint/node_modules/ajv/lib/dot/defaults.def
new file mode 100644
index 0000000000..5ad8d1d2d2
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/defaults.def
@@ -0,0 +1,32 @@
+{{## def.assignDefault:
+ if ({{=$passData}} === undefined)
+ {{=$passData}} = {{? it.opts.useDefaults == 'shared' }}
+ {{= it.useDefault($sch.default) }}
+ {{??}}
+ {{= JSON.stringify($sch.default) }}
+ {{?}};
+#}}
+
+
+{{## def.defaultProperties:
+ {{
+ var $schema = it.schema.properties
+ , $schemaKeys = Object.keys($schema); }}
+ {{~ $schemaKeys:$propertyKey }}
+ {{ var $sch = $schema[$propertyKey]; }}
+ {{? $sch.default !== undefined }}
+ {{ var $passData = $data + it.util.getProperty($propertyKey); }}
+ {{# def.assignDefault }}
+ {{?}}
+ {{~}}
+#}}
+
+
+{{## def.defaultItems:
+ {{~ it.schema.items:$sch:$i }}
+ {{? $sch.default !== undefined }}
+ {{ var $passData = $data + '[' + $i + ']'; }}
+ {{# def.assignDefault }}
+ {{?}}
+ {{~}}
+#}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/definitions.def b/tools/eslint/node_modules/ajv/lib/dot/definitions.def
new file mode 100644
index 0000000000..162c737038
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/definitions.def
@@ -0,0 +1,179 @@
+{{## def.setupKeyword:
+ {{
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ }}
+#}}
+
+
+{{## def.setCompositeRule:
+ {{
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ }}
+#}}
+
+
+{{## def.resetCompositeRule:
+ {{ it.compositeRule = $it.compositeRule = $wasComposite; }}
+#}}
+
+
+{{## def.setupNextLevel:
+ {{
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ }}
+#}}
+
+
+{{## def.ifValid:
+ {{? $breakOnError }}
+ if ({{=$valid}}) {
+ {{ $closingBraces += '}'; }}
+ {{?}}
+#}}
+
+
+{{## def.ifResultValid:
+ {{? $breakOnError }}
+ if (valid{{=$it.level}}) {
+ {{ $closingBraces += '}'; }}
+ {{?}}
+#}}
+
+
+{{## def.elseIfValid:
+ {{? $breakOnError }}
+ {{ $closingBraces += '}'; }}
+ else {
+ {{?}}
+#}}
+
+
+{{## def.nonEmptySchema:_schema:
+ it.util.schemaHasRules(_schema, it.RULES.all)
+#}}
+
+
+{{## def.strLength:
+ {{? it.opts.unicode === false }}
+ {{=$data}}.length
+ {{??}}
+ ucs2length({{=$data}})
+ {{?}}
+#}}
+
+
+{{## def.willOptimize:
+ it.util.varOccurences($code, $nextData) < 2
+#}}
+
+
+{{## def.generateSubschemaCode:
+ {{
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ }}
+#}}
+
+
+{{## def.insertSubschemaCode:
+ {{= it.validate($it) }}
+ {{ $it.baseId = $currentBaseId; }}
+#}}
+
+
+{{## def._optimizeValidate:
+ it.util.varReplace($code, $nextData, $passData)
+#}}
+
+
+{{## def.optimizeValidate:
+ {{? {{# def.willOptimize}} }}
+ {{= {{# def._optimizeValidate }} }}
+ {{??}}
+ var {{=$nextData}} = {{=$passData}};
+ {{= $code }}
+ {{?}}
+#}}
+
+
+{{## def.cleanUp: {{ out = it.util.cleanUpCode(out); }} #}}
+
+
+{{## def.cleanUpVarErrors: {{ out = it.util.cleanUpVarErrors(out, $async); }} #}}
+
+
+{{## def.$data:
+ {{
+ var $isData = it.opts.v5 && $schema && $schema.$data
+ , $schemaValue;
+ }}
+ {{? $isData }}
+ var schema{{=$lvl}} = {{= it.util.getData($schema.$data, $dataLvl, it.dataPathArr) }};
+ {{ $schemaValue = 'schema' + $lvl; }}
+ {{??}}
+ {{ $schemaValue = $schema; }}
+ {{?}}
+#}}
+
+
+{{## def.$dataNotType:_type:
+ {{?$isData}} ({{=$schemaValue}} !== undefined && typeof {{=$schemaValue}} != _type) || {{?}}
+#}}
+
+
+{{## def.check$dataIsArray:
+ if (schema{{=$lvl}} === undefined) {{=$valid}} = true;
+ else if (!Array.isArray(schema{{=$lvl}})) {{=$valid}} = false;
+ else {
+#}}
+
+
+{{## def.beginDefOut:
+ {{
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ }}
+#}}
+
+
+{{## def.storeDefOut:_variable:
+ {{
+ var _variable = out;
+ out = $$outStack.pop();
+ }}
+#}}
+
+
+{{## def.dataPath:(dataPath || ''){{? it.errorPath != '""'}} + {{= it.errorPath }}{{?}}#}}
+
+
+{{## def.passParentData:
+ {{? $dataLvl }}
+ , data{{= ($dataLvl-1)||'' }}
+ , {{= it.dataPathArr[$dataLvl] }}
+ {{??}}
+ , parentData
+ , parentDataProperty
+ {{?}}
+#}}
+
+
+{{## def.checkOwnProperty:
+ {{? $ownProperties }}
+ if (!Object.prototype.hasOwnProperty.call({{=$data}}, {{=$key}})) continue;
+ {{?}}
+#}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/dependencies.jst b/tools/eslint/node_modules/ajv/lib/dot/dependencies.jst
new file mode 100644
index 0000000000..4fdb3f4591
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/dependencies.jst
@@ -0,0 +1,69 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.missing }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{
+ var $schemaDeps = {}
+ , $propertyDeps = {};
+
+ for ($property in $schema) {
+ var $sch = $schema[$property];
+ var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
+ $deps[$property] = $sch;
+ }
+}}
+
+var {{=$errs}} = errors;
+
+{{ var $currentErrorPath = it.errorPath; }}
+
+var missing{{=$lvl}};
+{{ for (var $property in $propertyDeps) { }}
+ {{ $deps = $propertyDeps[$property]; }}
+ if ({{=$data}}{{= it.util.getProperty($property) }} !== undefined
+ {{? $breakOnError }}
+ && ({{# def.checkMissingProperty:$deps }})) {
+ {{# def.errorMissingProperty:'dependencies' }}
+ {{??}}
+ ) {
+ {{~ $deps:$reqProperty }}
+ {{# def.allErrorsMissingProperty:'dependencies' }}
+ {{~}}
+ {{?}}
+ } {{# def.elseIfValid }}
+{{ } }}
+
+{{
+ it.errorPath = $currentErrorPath;
+ var $currentBaseId = $it.baseId;
+}}
+
+
+{{ for (var $property in $schemaDeps) { }}
+ {{ var $sch = $schemaDeps[$property]; }}
+ {{? {{# def.nonEmptySchema:$sch }} }}
+ valid{{=$it.level}} = true;
+
+ if ({{=$data}}['{{= $property }}'] !== undefined) {
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + it.util.getProperty($property);
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
+ }}
+
+ {{# def.insertSubschemaCode }}
+ }
+
+ {{# def.ifResultValid }}
+ {{?}}
+{{ } }}
+
+{{? $breakOnError }}
+ {{= $closingBraces }}
+ if ({{=$errs}} == errors) {
+{{?}}
+
+{{# def.cleanUp }}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/enum.jst b/tools/eslint/node_modules/ajv/lib/dot/enum.jst
new file mode 100644
index 0000000000..f82ed274c7
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/enum.jst
@@ -0,0 +1,26 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{ var $i = 'i' + $lvl; }}
+{{? !$isData }}
+ var schema{{=$lvl}} = validate.schema{{=$schemaPath}};
+{{?}}
+var {{=$valid}};
+
+{{?$isData}}{{# def.check$dataIsArray }}{{?}}
+
+{{=$valid}} = false;
+
+for (var {{=$i}}=0; {{=$i}}<schema{{=$lvl}}.length; {{=$i}}++)
+ if (equal({{=$data}}, schema{{=$lvl}}[{{=$i}}])) {
+ {{=$valid}} = true;
+ break;
+ }
+
+{{? $isData }} } {{?}}
+
+{{# def.checkError:'enum' }}
+
+{{? $breakOnError }} else { {{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/errors.def b/tools/eslint/node_modules/ajv/lib/dot/errors.def
new file mode 100644
index 0000000000..530e5f5cb1
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/errors.def
@@ -0,0 +1,185 @@
+{{# def.definitions }}
+
+{{## def._error:_rule:
+ {{ 'istanbul ignore else'; }}
+ {{? it.createErrors !== false }}
+ {
+ keyword: '{{= $errorKeyword || _rule }}'
+ , dataPath: (dataPath || '') + {{= it.errorPath }}
+ , schemaPath: {{=it.util.toQuotedString($errSchemaPath)}}
+ , params: {{# def._errorParams[_rule] }}
+ {{? it.opts.messages !== false }}
+ , message: {{# def._errorMessages[_rule] }}
+ {{?}}
+ {{? it.opts.verbose }}
+ , schema: {{# def._errorSchemas[_rule] }}
+ , parentSchema: validate.schema{{=it.schemaPath}}
+ , data: {{=$data}}
+ {{?}}
+ }
+ {{??}}
+ {}
+ {{?}}
+#}}
+
+
+{{## def._addError:_rule:
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+#}}
+
+
+{{## def.addError:_rule:
+ var err = {{# def._error:_rule }};
+ {{# def._addError:_rule }}
+#}}
+
+
+{{## def.error:_rule:
+ {{# def.beginDefOut}}
+ {{# def._error:_rule }}
+ {{# def.storeDefOut:__err }}
+
+ {{? !it.compositeRule && $breakOnError }}
+ {{ 'istanbul ignore if'; }}
+ {{? it.async }}
+ throw new ValidationError([{{=__err}}]);
+ {{??}}
+ validate.errors = [{{=__err}}];
+ return false;
+ {{?}}
+ {{??}}
+ var err = {{=__err}};
+ {{# def._addError:_rule }}
+ {{?}}
+#}}
+
+
+{{## def.extraError:_rule:
+ {{# def.addError:_rule}}
+ {{? !it.compositeRule && $breakOnError }}
+ {{ 'istanbul ignore if'; }}
+ {{? it.async }}
+ throw new ValidationError(vErrors);
+ {{??}}
+ validate.errors = vErrors;
+ return false
+ {{?}}
+ {{?}}
+#}}
+
+
+{{## def.checkError:_rule:
+ if (!{{=$valid}}) {
+ {{# def.error:_rule }}
+ }
+#}}
+
+
+{{## def.resetErrors:
+ errors = {{=$errs}};
+ if (vErrors !== null) {
+ if ({{=$errs}}) vErrors.length = {{=$errs}};
+ else vErrors = null;
+ }
+#}}
+
+
+{{## def.concatSchema:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=$schema}}{{?}}#}}
+{{## def.appendSchema:{{?$isData}}' + {{=$schemaValue}}{{??}}{{=$schema}}'{{?}}#}}
+{{## def.concatSchemaEQ:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=it.util.escapeQuotes($schema)}}{{?}}#}}
+
+{{## def._errorMessages = {
+ $ref: "'can\\\'t resolve reference {{=it.util.escapeQuotes($schema)}}'",
+ additionalItems: "'should NOT have more than {{=$schema.length}} items'",
+ additionalProperties: "'should NOT have additional properties'",
+ anyOf: "'should match some schema in anyOf'",
+ dependencies: "'should have {{? $deps.length == 1 }}property {{= it.util.escapeQuotes($deps[0]) }}{{??}}properties {{= it.util.escapeQuotes($deps.join(\", \")) }}{{?}} when property {{= it.util.escapeQuotes($property) }} is present'",
+ 'enum': "'should be equal to one of the allowed values'",
+ format: "'should match format \"{{#def.concatSchemaEQ}}\"'",
+ _limit: "'should be {{=$opStr}} {{#def.appendSchema}}",
+ _exclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'",
+ _limitItems: "'should NOT have {{?$keyword=='maxItems'}}more{{??}}less{{?}} than {{#def.concatSchema}} items'",
+ _limitLength: "'should NOT be {{?$keyword=='maxLength'}}longer{{??}}shorter{{?}} than {{#def.concatSchema}} characters'",
+ _limitProperties:"'should NOT have {{?$keyword=='maxProperties'}}more{{??}}less{{?}} than {{#def.concatSchema}} properties'",
+ multipleOf: "'should be multiple of {{#def.appendSchema}}",
+ not: "'should NOT be valid'",
+ oneOf: "'should match exactly one schema in oneOf'",
+ pattern: "'should match pattern \"{{#def.concatSchemaEQ}}\"'",
+ required: "'{{? it.opts._errorDataPathProperty }}is a required property{{??}}should have required property \\'{{=$missingProperty}}\\'{{?}}'",
+ type: "'should be {{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}'",
+ uniqueItems: "'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)'",
+ custom: "'should pass \"{{=$rule.keyword}}\" keyword validation'",
+ patternGroups: "'should NOT have {{=$moreOrLess}} than {{=$limit}} properties matching pattern \"{{=it.util.escapeQuotes($pgProperty)}}\"'",
+ patternRequired: "'should have property matching pattern \\'{{=$missingPattern}}\\''",
+ switch: "'should pass \"switch\" keyword validation'",
+ constant: "'should be equal to constant'",
+ _formatLimit: "'should be {{=$opStr}} \"{{#def.concatSchemaEQ}}\"'",
+ _formatExclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'"
+} #}}
+
+
+{{## def.schemaRefOrVal: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=$schema}}{{?}} #}}
+{{## def.schemaRefOrQS: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
+
+{{## def._errorSchemas = {
+ $ref: "{{=it.util.toQuotedString($schema)}}",
+ additionalItems: "false",
+ additionalProperties: "false",
+ anyOf: "validate.schema{{=$schemaPath}}",
+ dependencies: "validate.schema{{=$schemaPath}}",
+ 'enum': "validate.schema{{=$schemaPath}}",
+ format: "{{#def.schemaRefOrQS}}",
+ _limit: "{{#def.schemaRefOrVal}}",
+ _exclusiveLimit: "validate.schema{{=$schemaPath}}",
+ _limitItems: "{{#def.schemaRefOrVal}}",
+ _limitLength: "{{#def.schemaRefOrVal}}",
+ _limitProperties:"{{#def.schemaRefOrVal}}",
+ multipleOf: "{{#def.schemaRefOrVal}}",
+ not: "validate.schema{{=$schemaPath}}",
+ oneOf: "validate.schema{{=$schemaPath}}",
+ pattern: "{{#def.schemaRefOrQS}}",
+ required: "validate.schema{{=$schemaPath}}",
+ type: "validate.schema{{=$schemaPath}}",
+ uniqueItems: "{{#def.schemaRefOrVal}}",
+ custom: "validate.schema{{=$schemaPath}}",
+ patternGroups: "validate.schema{{=$schemaPath}}",
+ patternRequired: "validate.schema{{=$schemaPath}}",
+ switch: "validate.schema{{=$schemaPath}}",
+ constant: "validate.schema{{=$schemaPath}}",
+ _formatLimit: "{{#def.schemaRefOrQS}}",
+ _formatExclusiveLimit: "validate.schema{{=$schemaPath}}"
+} #}}
+
+
+{{## def.schemaValueQS: {{?$isData}}{{=$schemaValue}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
+
+{{## def._errorParams = {
+ $ref: "{ ref: '{{=it.util.escapeQuotes($schema)}}' }",
+ additionalItems: "{ limit: {{=$schema.length}} }",
+ additionalProperties: "{ additionalProperty: '{{=$additionalProperty}}' }",
+ anyOf: "{}",
+ dependencies: "{ property: '{{= it.util.escapeQuotes($property) }}', missingProperty: '{{=$missingProperty}}', depsCount: {{=$deps.length}}, deps: '{{= it.util.escapeQuotes($deps.length==1 ? $deps[0] : $deps.join(\", \")) }}' }",
+ 'enum': "{ allowedValues: schema{{=$lvl}} }",
+ format: "{ format: {{#def.schemaValueQS}} }",
+ _limit: "{ comparison: {{=$opExpr}}, limit: {{=$schemaValue}}, exclusive: {{=$exclusive}} }",
+ _exclusiveLimit: "{}",
+ _limitItems: "{ limit: {{=$schemaValue}} }",
+ _limitLength: "{ limit: {{=$schemaValue}} }",
+ _limitProperties:"{ limit: {{=$schemaValue}} }",
+ multipleOf: "{ multipleOf: {{=$schemaValue}} }",
+ not: "{}",
+ oneOf: "{}",
+ pattern: "{ pattern: {{#def.schemaValueQS}} }",
+ required: "{ missingProperty: '{{=$missingProperty}}' }",
+ type: "{ type: '{{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}' }",
+ uniqueItems: "{ i: i, j: j }",
+ custom: "{ keyword: '{{=$rule.keyword}}' }",
+ patternGroups: "{ reason: '{{=$reason}}', limit: {{=$limit}}, pattern: '{{=it.util.escapeQuotes($pgProperty)}}' }",
+ patternRequired: "{ missingPattern: '{{=$missingPattern}}' }",
+ switch: "{ caseIndex: {{=$caseIndex}} }",
+ constant: "{}",
+ _formatLimit: "{ comparison: {{=$opExpr}}, limit: {{#def.schemaValueQS}}, exclusive: {{=$exclusive}} }",
+ _formatExclusiveLimit: "{}"
+} #}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/format.jst b/tools/eslint/node_modules/ajv/lib/dot/format.jst
new file mode 100644
index 0000000000..59d63a2fc7
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/format.jst
@@ -0,0 +1,74 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+
+{{## def.skipFormat:
+ {{? $breakOnError }} if (true) { {{?}}
+ {{ return out; }}
+#}}
+
+{{? it.opts.format === false }}{{# def.skipFormat }}{{?}}
+
+
+{{# def.$data }}
+
+
+{{## def.$dataCheckFormat:
+ {{# def.$dataNotType:'string' }}
+ ({{=$format}} && !(typeof {{=$format}} == 'function'
+ ? {{? it.async}}
+ (async{{=$lvl}} ? {{=it.yieldAwait}} {{=$format}}({{=$data}}) : {{=$format}}({{=$data}}))
+ {{??}}
+ {{=$format}}({{=$data}})
+ {{?}}
+ : {{=$format}}.test({{=$data}})))
+#}}
+
+{{## def.checkFormat:
+ {{
+ var $formatRef = 'formats' + it.util.getProperty($schema);
+ if ($isObject) $formatRef += '.validate';
+ }}
+ {{? typeof $format == 'function' }}
+ {{=$formatRef}}({{=$data}})
+ {{??}}
+ {{=$formatRef}}.test({{=$data}})
+ {{?}}
+#}}
+
+
+{{? $isData }}
+ {{ var $format = 'format' + $lvl; }}
+ var {{=$format}} = formats[{{=$schemaValue}}];
+ var isObject{{=$lvl}} = typeof {{=$format}} == 'object'
+ && !({{=$format}} instanceof RegExp)
+ && {{=$format}}.validate;
+ if (isObject{{=$lvl}}) {
+ var async{{=$lvl}} = {{=$format}}.async;
+ {{=$format}} = {{=$format}}.validate;
+ }
+ if ({{# def.$dataCheckFormat }}) {
+{{??}}
+ {{ var $format = it.formats[$schema]; }}
+ {{? !$format }}{{# def.skipFormat }}{{?}}
+ {{
+ var $isObject = typeof $format == 'object'
+ && !($format instanceof RegExp)
+ && $format.validate;
+ if ($isObject) {
+ var $async = $format.async === true;
+ $format = $format.validate;
+ }
+ }}
+ {{? $async }}
+ {{
+ if (!it.async) throw new Error('async format in sync schema');
+ var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
+ }}
+ if (!({{=it.yieldAwait}} {{=$formatRef}}({{=$data}}))) {
+ {{??}}
+ if (!{{# def.checkFormat }}) {
+ {{?}}
+{{?}}
+ {{# def.error:'format' }}
+ } {{? $breakOnError }} else { {{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/items.jst b/tools/eslint/node_modules/ajv/lib/dot/items.jst
new file mode 100644
index 0000000000..c43f8e4b43
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/items.jst
@@ -0,0 +1,100 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.validateItems:startFrom:
+ for (var i{{=$lvl}} = {{=startFrom}}; i{{=$lvl}} < {{=$data}}.length; i{{=$lvl}}++) {
+ {{
+ $it.errorPath = it.util.getPathExpr(it.errorPath, 'i' + $lvl, it.opts.jsonPointers, true);
+ var $passData = $data + '[i' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'i' + $lvl;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+
+ {{? $breakOnError }}
+ if (!valid{{=$it.level}}) break;
+ {{?}}
+ }
+#}}
+
+{{
+ var $dataNxt = $it.dataLevel = it.dataLevel + 1
+ , $nextData = 'data' + $dataNxt
+ , $currentBaseId = it.baseId;
+}}
+
+var {{=$errs}} = errors;
+var {{=$valid}};
+
+{{? Array.isArray($schema) }}
+ {{ /* 'items' is an array of schemas */}}
+ {{ var $additionalItems = it.schema.additionalItems; }}
+ {{? $additionalItems === false }}
+ {{=$valid}} = {{=$data}}.length <= {{= $schema.length }};
+ {{
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalItems';
+ }}
+ {{# def.checkError:'additionalItems' }}
+ {{ $errSchemaPath = $currErrSchemaPath; }}
+ {{# def.elseIfValid}}
+ {{?}}
+
+ {{~ $schema:$sch:$i }}
+ {{? {{# def.nonEmptySchema:$sch }} }}
+ valid{{=$it.level}} = true;
+
+ if ({{=$data}}.length > {{=$i}}) {
+ {{
+ var $passData = $data + '[' + $i + ']';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
+ $it.dataPathArr[$dataNxt] = $i;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+ }
+
+ {{# def.ifResultValid }}
+ {{?}}
+ {{~}}
+
+ {{? typeof $additionalItems == 'object' && {{# def.nonEmptySchema:$additionalItems }} }}
+ {{
+ $it.schema = $additionalItems;
+ $it.schemaPath = it.schemaPath + '.additionalItems';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalItems';
+ }}
+ valid{{=$it.level}} = true;
+
+ if ({{=$data}}.length > {{= $schema.length }}) {
+ {{# def.validateItems: $schema.length }}
+ }
+
+ {{# def.ifResultValid }}
+ {{?}}
+
+{{?? {{# def.nonEmptySchema:$schema }} }}
+ {{ /* 'items' is a single schema */}}
+ {{
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ }}
+ {{# def.validateItems: 0 }}
+ {{# def.ifResultValid }}
+{{?}}
+
+{{? $breakOnError }}
+ {{= $closingBraces }}
+ if ({{=$errs}} == errors) {
+{{?}}
+
+{{# def.cleanUp }}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/missing.def b/tools/eslint/node_modules/ajv/lib/dot/missing.def
new file mode 100644
index 0000000000..23ad04cf43
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/missing.def
@@ -0,0 +1,34 @@
+{{## def.checkMissingProperty:_properties:
+ {{~ _properties:_$property:$i }}
+ {{?$i}} || {{?}}
+ {{ var $prop = it.util.getProperty(_$property); }}
+ ( {{=$data}}{{=$prop}} === undefined && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop) }}) )
+ {{~}}
+#}}
+
+
+{{## def.errorMissingProperty:_error:
+ {{
+ var $propertyPath = 'missing' + $lvl
+ , $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers
+ ? it.util.getPathExpr($currentErrorPath, $propertyPath, true)
+ : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ }}
+ {{# def.error:_error }}
+#}}
+
+{{## def.allErrorsMissingProperty:_error:
+ {{
+ var $prop = it.util.getProperty($reqProperty)
+ , $missingProperty = it.util.escapeQuotes($reqProperty);
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers);
+ }
+ }}
+ if ({{=$data}}{{=$prop}} === undefined) {
+ {{# def.addError:_error }}
+ }
+#}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/multipleOf.jst b/tools/eslint/node_modules/ajv/lib/dot/multipleOf.jst
new file mode 100644
index 0000000000..5f8dd33b5d
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/multipleOf.jst
@@ -0,0 +1,20 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+var division{{=$lvl}};
+if ({{?$isData}}
+ {{=$schemaValue}} !== undefined && (
+ typeof {{=$schemaValue}} != 'number' ||
+ {{?}}
+ (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}},
+ {{? it.opts.multipleOfPrecision }}
+ Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}}
+ {{??}}
+ division{{=$lvl}} !== parseInt(division{{=$lvl}})
+ {{?}}
+ )
+ {{?$isData}} ) {{?}} ) {
+ {{# def.error:'multipleOf' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/not.jst b/tools/eslint/node_modules/ajv/lib/dot/not.jst
new file mode 100644
index 0000000000..9943be830f
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/not.jst
@@ -0,0 +1,43 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{? {{# def.nonEmptySchema:$schema }} }}
+ {{
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ }}
+
+ var {{=$errs}} = errors;
+
+ {{# def.setCompositeRule }}
+
+ {{
+ $it.createErrors = false;
+ var $allErrorsOption;
+ if ($it.opts.allErrors) {
+ $allErrorsOption = $it.opts.allErrors;
+ $it.opts.allErrors = false;
+ }
+ }}
+ {{= it.validate($it) }}
+ {{
+ $it.createErrors = true;
+ if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
+ }}
+
+ {{# def.resetCompositeRule }}
+
+ if (valid{{=$it.level}}) {
+ {{# def.error:'not' }}
+ } else {
+ {{# def.resetErrors }}
+ {{? it.opts.allErrors }} } {{?}}
+{{??}}
+ {{# def.addError:'not' }}
+ {{? $breakOnError}}
+ if (false) {
+ {{?}}
+{{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/oneOf.jst b/tools/eslint/node_modules/ajv/lib/dot/oneOf.jst
new file mode 100644
index 0000000000..b42b70ebf6
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/oneOf.jst
@@ -0,0 +1,44 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+var {{=$errs}} = errors;
+var prevValid{{=$lvl}} = false;
+var {{=$valid}} = false;
+
+{{ var $currentBaseId = $it.baseId; }}
+{{# def.setCompositeRule }}
+
+{{~ $schema:$sch:$i }}
+ {{? {{# def.nonEmptySchema:$sch }} }}
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ }}
+
+ {{# def.insertSubschemaCode }}
+ {{??}}
+ var valid{{=$it.level}} = true;
+ {{?}}
+
+ {{? $i }}
+ if (valid{{=$it.level}} && prevValid{{=$lvl}})
+ {{=$valid}} = false;
+ else {
+ {{ $closingBraces += '}'; }}
+ {{?}}
+
+ if (valid{{=$it.level}}) {{=$valid}} = prevValid{{=$lvl}} = true;
+{{~}}
+
+{{# def.resetCompositeRule }}
+
+{{= $closingBraces }}
+
+if (!{{=$valid}}) {
+ {{# def.error:'oneOf' }}
+} else {
+ {{# def.resetErrors }}
+{{? it.opts.allErrors }} } {{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/pattern.jst b/tools/eslint/node_modules/ajv/lib/dot/pattern.jst
new file mode 100644
index 0000000000..3a37ef6cb8
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/pattern.jst
@@ -0,0 +1,14 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{
+ var $regexp = $isData
+ ? '(new RegExp(' + $schemaValue + '))'
+ : it.usePattern($schema);
+}}
+
+if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) {
+ {{# def.error:'pattern' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/properties.jst b/tools/eslint/node_modules/ajv/lib/dot/properties.jst
new file mode 100644
index 0000000000..1b969fffcc
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/properties.jst
@@ -0,0 +1,319 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.validateAdditional:
+ {{ /* additionalProperties is schema */
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty
+ ? it.errorPath
+ : it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);
+ var $passData = $data + '[key' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'key' + $lvl;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+#}}
+
+
+{{
+ var $key = 'key' + $lvl
+ , $dataNxt = $it.dataLevel = it.dataLevel + 1
+ , $nextData = 'data' + $dataNxt;
+
+ var $schemaKeys = Object.keys($schema || {})
+ , $pProperties = it.schema.patternProperties || {}
+ , $pPropertyKeys = Object.keys($pProperties)
+ , $aProperties = it.schema.additionalProperties
+ , $someProperties = $schemaKeys.length || $pPropertyKeys.length
+ , $noAdditional = $aProperties === false
+ , $additionalIsSchema = typeof $aProperties == 'object'
+ && Object.keys($aProperties).length
+ , $removeAdditional = it.opts.removeAdditional
+ , $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional
+ , $ownProperties = it.opts.ownProperties
+ , $currentBaseId = it.baseId;
+
+ var $required = it.schema.required;
+ if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired)
+ var $requiredHash = it.util.toHash($required);
+
+ if (it.opts.v5) {
+ var $pgProperties = it.schema.patternGroups || {}
+ , $pgPropertyKeys = Object.keys($pgProperties);
+ }
+}}
+
+
+var {{=$errs}} = errors;
+var valid{{=$it.level}} = true;
+
+{{? $checkAdditional }}
+ for (var {{=$key}} in {{=$data}}) {
+ {{# def.checkOwnProperty }}
+ {{? $someProperties }}
+ var isAdditional{{=$lvl}} = !(false
+ {{? $schemaKeys.length }}
+ {{? $schemaKeys.length > 5 }}
+ || validate.schema{{=$schemaPath}}[{{=$key}}]
+ {{??}}
+ {{~ $schemaKeys:$propertyKey }}
+ || {{=$key}} == {{= it.util.toQuotedString($propertyKey) }}
+ {{~}}
+ {{?}}
+ {{?}}
+ {{? $pPropertyKeys.length }}
+ {{~ $pPropertyKeys:$pProperty:$i }}
+ || {{= it.usePattern($pProperty) }}.test({{=$key}})
+ {{~}}
+ {{?}}
+ {{? it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length }}
+ {{~ $pgPropertyKeys:$pgProperty:$i }}
+ || {{= it.usePattern($pgProperty) }}.test({{=$key}})
+ {{~}}
+ {{?}}
+ );
+
+ if (isAdditional{{=$lvl}}) {
+ {{?}}
+ {{? $removeAdditional == 'all' }}
+ delete {{=$data}}[{{=$key}}];
+ {{??}}
+ {{
+ var $currentErrorPath = it.errorPath;
+ var $additionalProperty = '\' + key' + $lvl + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);
+ }
+ }}
+ {{? $noAdditional }}
+ {{? $removeAdditional }}
+ delete {{=$data}}[{{=$key}}];
+ {{??}}
+ valid{{=$it.level}} = false;
+ {{
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ }}
+ {{# def.error:'additionalProperties' }}
+ {{ $errSchemaPath = $currErrSchemaPath; }}
+ {{? $breakOnError }} break; {{?}}
+ {{?}}
+ {{?? $additionalIsSchema }}
+ {{? $removeAdditional == 'failing' }}
+ var {{=$errs}} = errors;
+ {{# def.setCompositeRule }}
+
+ {{# def.validateAdditional }}
+
+ if (!valid{{=$it.level}}) {
+ errors = {{=$errs}};
+ if (validate.errors !== null) {
+ if (errors) validate.errors.length = errors;
+ else validate.errors = null;
+ }
+ delete {{=$data}}[{{=$key}}];
+ }
+
+ {{# def.resetCompositeRule }}
+ {{??}}
+ {{# def.validateAdditional }}
+ {{? $breakOnError }} if (!valid{{=$it.level}}) break; {{?}}
+ {{?}}
+ {{?}}
+ {{ it.errorPath = $currentErrorPath; }}
+ {{?}}
+ {{? $someProperties }}
+ }
+ {{?}}
+ }
+
+ {{# def.ifResultValid }}
+{{?}}
+
+{{ var $useDefaults = it.opts.useDefaults && !it.compositeRule; }}
+
+{{? $schemaKeys.length }}
+ {{~ $schemaKeys:$propertyKey }}
+ {{ var $sch = $schema[$propertyKey]; }}
+
+ {{? {{# def.nonEmptySchema:$sch}} }}
+ {{
+ var $prop = it.util.getProperty($propertyKey)
+ , $passData = $data + $prop
+ , $hasDefault = $useDefaults && $sch.default !== undefined;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + $prop;
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
+ $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
+ $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
+ }}
+
+ {{# def.generateSubschemaCode }}
+
+ {{? {{# def.willOptimize }} }}
+ {{
+ $code = {{# def._optimizeValidate }};
+ var $useData = $passData;
+ }}
+ {{??}}
+ {{ var $useData = $nextData; }}
+ var {{=$nextData}} = {{=$passData}};
+ {{?}}
+
+ {{? $hasDefault }}
+ {{= $code }}
+ {{??}}
+ {{? $requiredHash && $requiredHash[$propertyKey] }}
+ if ({{=$useData}} === undefined) {
+ valid{{=$it.level}} = false;
+ {{
+ var $currentErrorPath = it.errorPath
+ , $currErrSchemaPath = $errSchemaPath
+ , $missingProperty = it.util.escapeQuotes($propertyKey);
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ $errSchemaPath = it.errSchemaPath + '/required';
+ }}
+ {{# def.error:'required' }}
+ {{ $errSchemaPath = $currErrSchemaPath; }}
+ {{ it.errorPath = $currentErrorPath; }}
+ } else {
+ {{??}}
+ {{? $breakOnError }}
+ if ({{=$useData}} === undefined) {
+ valid{{=$it.level}} = true;
+ } else {
+ {{??}}
+ if ({{=$useData}} !== undefined) {
+ {{?}}
+ {{?}}
+
+ {{= $code }}
+ }
+ {{?}} {{ /* $hasDefault */ }}
+ {{?}} {{ /* def.nonEmptySchema */ }}
+
+ {{# def.ifResultValid }}
+ {{~}}
+{{?}}
+
+{{~ $pPropertyKeys:$pProperty }}
+ {{ var $sch = $pProperties[$pProperty]; }}
+
+ {{? {{# def.nonEmptySchema:$sch}} }}
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
+ $it.errSchemaPath = it.errSchemaPath + '/patternProperties/'
+ + it.util.escapeFragment($pProperty);
+ }}
+
+ for (var {{=$key}} in {{=$data}}) {
+ {{# def.checkOwnProperty }}
+ if ({{= it.usePattern($pProperty) }}.test({{=$key}})) {
+ {{
+ $it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);
+ var $passData = $data + '[key' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'key' + $lvl;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+
+ {{? $breakOnError }} if (!valid{{=$it.level}}) break; {{?}}
+ }
+ {{? $breakOnError }} else valid{{=$it.level}} = true; {{?}}
+ }
+
+ {{# def.ifResultValid }}
+ {{?}} {{ /* def.nonEmptySchema */ }}
+{{~}}
+
+
+{{? it.opts.v5 }}
+ {{~ $pgPropertyKeys:$pgProperty }}
+ {{
+ var $pgSchema = $pgProperties[$pgProperty]
+ , $sch = $pgSchema.schema;
+ }}
+
+ {{? {{# def.nonEmptySchema:$sch}} }}
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema';
+ $it.errSchemaPath = it.errSchemaPath + '/patternGroups/'
+ + it.util.escapeFragment($pgProperty)
+ + '/schema';
+ }}
+
+ var pgPropCount{{=$lvl}} = 0;
+
+ for (var {{=$key}} in {{=$data}}) {
+ {{# def.checkOwnProperty }}
+ if ({{= it.usePattern($pgProperty) }}.test({{=$key}})) {
+ pgPropCount{{=$lvl}}++;
+
+ {{
+ $it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);
+ var $passData = $data + '[key' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'key' + $lvl;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+
+ {{? $breakOnError }} if (!valid{{=$it.level}}) break; {{?}}
+ }
+ {{? $breakOnError }} else valid{{=$it.level}} = true; {{?}}
+ }
+
+ {{# def.ifResultValid }}
+
+ {{
+ var $pgMin = $pgSchema.minimum
+ , $pgMax = $pgSchema.maximum;
+ }}
+ {{? $pgMin !== undefined || $pgMax !== undefined }}
+ var {{=$valid}} = true;
+
+ {{ var $currErrSchemaPath = $errSchemaPath; }}
+
+ {{? $pgMin !== undefined }}
+ {{ var $limit = $pgMin, $reason = 'minimum', $moreOrLess = 'less'; }}
+ {{=$valid}} = pgPropCount{{=$lvl}} >= {{=$pgMin}};
+ {{ $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum'; }}
+ {{# def.checkError:'patternGroups' }}
+ {{? $pgMax !== undefined }}
+ else
+ {{?}}
+ {{?}}
+
+ {{? $pgMax !== undefined }}
+ {{ var $limit = $pgMax, $reason = 'maximum', $moreOrLess = 'more'; }}
+ {{=$valid}} = pgPropCount{{=$lvl}} <= {{=$pgMax}};
+ {{ $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum'; }}
+ {{# def.checkError:'patternGroups' }}
+ {{?}}
+
+ {{ $errSchemaPath = $currErrSchemaPath; }}
+
+ {{# def.ifValid }}
+ {{?}}
+ {{?}} {{ /* def.nonEmptySchema */ }}
+ {{~}}
+{{?}}
+
+
+{{? $breakOnError }}
+ {{= $closingBraces }}
+ if ({{=$errs}} == errors) {
+{{?}}
+
+{{# def.cleanUp }}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/ref.jst b/tools/eslint/node_modules/ajv/lib/dot/ref.jst
new file mode 100644
index 0000000000..6bafe312ad
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/ref.jst
@@ -0,0 +1,86 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+
+{{## def._validateRef:_v:
+ {{? it.opts.passContext }}
+ {{=_v}}.call(this,
+ {{??}}
+ {{=_v}}(
+ {{?}}
+ {{=$data}}, {{# def.dataPath }}{{# def.passParentData }}, rootData)
+#}}
+
+{{ var $async, $refCode; }}
+{{? $schema == '#' || $schema == '#/' }}
+ {{
+ if (it.isRoot) {
+ $async = it.async;
+ $refCode = 'validate';
+ } else {
+ $async = it.root.schema.$async === true;
+ $refCode = 'root.refVal[0]';
+ }
+ }}
+{{??}}
+ {{ var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); }}
+ {{? $refVal === undefined }}
+ {{ var $message = 'can\'t resolve reference ' + $schema + ' from id ' + it.baseId; }}
+ {{? it.opts.missingRefs == 'fail' }}
+ {{ console.log($message); }}
+ {{# def.error:'$ref' }}
+ {{? $breakOnError }} if (false) { {{?}}
+ {{?? it.opts.missingRefs == 'ignore' }}
+ {{ console.log($message); }}
+ {{? $breakOnError }} if (true) { {{?}}
+ {{??}}
+ {{
+ var $error = new Error($message);
+ $error.missingRef = it.resolve.url(it.baseId, $schema);
+ $error.missingSchema = it.resolve.normalizeId(it.resolve.fullPath($error.missingRef));
+ throw $error;
+ }}
+ {{?}}
+ {{?? $refVal.inline }}
+ {{# def.setupNextLevel }}
+ {{
+ $it.schema = $refVal.schema;
+ $it.schemaPath = '';
+ $it.errSchemaPath = $schema;
+ }}
+ {{ var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); }}
+ {{= $code }}
+ {{? $breakOnError}}
+ if (valid{{=$it.level}}) {
+ {{?}}
+ {{??}}
+ {{
+ $async = $refVal.$async === true;
+ $refCode = $refVal.code;
+ }}
+ {{?}}
+{{?}}
+
+{{? $refCode }}
+ {{# def.beginDefOut}}
+ {{# def._validateRef:$refCode }}
+ {{# def.storeDefOut:__callValidate }}
+
+ {{? $async }}
+ {{ if (!it.async) throw new Error('async schema referenced by sync schema'); }}
+ try { {{? $breakOnError }}var {{=$valid}} ={{?}} {{=it.yieldAwait}} {{=__callValidate}}; }
+ catch (e) {
+ if (!(e instanceof ValidationError)) throw e;
+ if (vErrors === null) vErrors = e.errors;
+ else vErrors = vErrors.concat(e.errors);
+ errors = vErrors.length;
+ }
+ {{? $breakOnError }} if ({{=$valid}}) { {{?}}
+ {{??}}
+ if (!{{=__callValidate}}) {
+ if (vErrors === null) vErrors = {{=$refCode}}.errors;
+ else vErrors = vErrors.concat({{=$refCode}}.errors);
+ errors = vErrors.length;
+ } {{? $breakOnError }} else { {{?}}
+ {{?}}
+{{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/required.jst b/tools/eslint/node_modules/ajv/lib/dot/required.jst
new file mode 100644
index 0000000000..974cd1a56b
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/required.jst
@@ -0,0 +1,95 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.missing }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+
+{{## def.setupLoop:
+ {{? !$isData }}
+ var schema{{=$lvl}} = validate.schema{{=$schemaPath}};
+ {{?}}
+
+ {{
+ var $i = 'i' + $lvl
+ , $propertyPath = 'schema' + $lvl + '[' + $i + ']'
+ , $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ }}
+#}}
+
+
+{{? !$isData }}
+ {{? $schema.length < it.opts.loopRequired &&
+ it.schema.properties && Object.keys(it.schema.properties).length }}
+ {{ var $required = []; }}
+ {{~ $schema:$property }}
+ {{ var $propertySch = it.schema.properties[$property]; }}
+ {{? !($propertySch && {{# def.nonEmptySchema:$propertySch}}) }}
+ {{ $required[$required.length] = $property; }}
+ {{?}}
+ {{~}}
+ {{??}}
+ {{ var $required = $schema; }}
+ {{?}}
+{{?}}
+
+
+{{? $isData || $required.length }}
+ {{
+ var $currentErrorPath = it.errorPath
+ , $loopRequired = $isData || $required.length >= it.opts.loopRequired;
+ }}
+
+ {{? $breakOnError }}
+ var missing{{=$lvl}};
+ {{? $loopRequired }}
+ {{# def.setupLoop }}
+ var {{=$valid}} = true;
+
+ {{?$isData}}{{# def.check$dataIsArray }}{{?}}
+
+ for (var {{=$i}} = 0; {{=$i}} < schema{{=$lvl}}.length; {{=$i}}++) {
+ {{=$valid}} = {{=$data}}[schema{{=$lvl}}[{{=$i}}]] !== undefined;
+ if (!{{=$valid}}) break;
+ }
+
+ {{? $isData }} } {{?}}
+
+ {{# def.checkError:'required' }}
+ else {
+ {{??}}
+ if ({{# def.checkMissingProperty:$required }}) {
+ {{# def.errorMissingProperty:'required' }}
+ } else {
+ {{?}}
+ {{??}}
+ {{? $loopRequired }}
+ {{# def.setupLoop }}
+ {{? $isData }}
+ if (schema{{=$lvl}} && !Array.isArray(schema{{=$lvl}})) {
+ {{# def.addError:'required' }}
+ } else if (schema{{=$lvl}} !== undefined) {
+ {{?}}
+
+ for (var {{=$i}} = 0; {{=$i}} < schema{{=$lvl}}.length; {{=$i}}++) {
+ if ({{=$data}}[schema{{=$lvl}}[{{=$i}}]] === undefined) {
+ {{# def.addError:'required' }}
+ }
+ }
+
+ {{? $isData }} } {{?}}
+ {{??}}
+ {{~ $required:$reqProperty }}
+ {{# def.allErrorsMissingProperty:'required' }}
+ {{~}}
+ {{?}}
+ {{?}}
+
+ {{ it.errorPath = $currentErrorPath; }}
+
+{{?? $breakOnError }}
+ if (true) {
+{{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/uniqueItems.jst b/tools/eslint/node_modules/ajv/lib/dot/uniqueItems.jst
new file mode 100644
index 0000000000..dfc42b03b2
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/uniqueItems.jst
@@ -0,0 +1,38 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+
+{{? ($schema || $isData) && it.opts.uniqueItems !== false }}
+ {{? $isData }}
+ var {{=$valid}};
+ if ({{=$schemaValue}} === false || {{=$schemaValue}} === undefined)
+ {{=$valid}} = true;
+ else if (typeof {{=$schemaValue}} != 'boolean')
+ {{=$valid}} = false;
+ else {
+ {{?}}
+
+ var {{=$valid}} = true;
+ if ({{=$data}}.length > 1) {
+ var i = {{=$data}}.length, j;
+ outer:
+ for (;i--;) {
+ for (j = i; j--;) {
+ if (equal({{=$data}}[i], {{=$data}}[j])) {
+ {{=$valid}} = false;
+ break outer;
+ }
+ }
+ }
+ }
+
+ {{? $isData }} } {{?}}
+
+ if (!{{=$valid}}) {
+ {{# def.error:'uniqueItems' }}
+ } {{? $breakOnError }} else { {{?}}
+{{??}}
+ {{? $breakOnError }} if (true) { {{?}}
+{{?}}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/v5/_formatLimit.jst b/tools/eslint/node_modules/ajv/lib/dot/v5/_formatLimit.jst
new file mode 100644
index 0000000000..af16b88d84
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/v5/_formatLimit.jst
@@ -0,0 +1,116 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+
+var {{=$valid}} = undefined;
+
+{{## def.skipFormatLimit:
+ {{=$valid}} = true;
+ {{ return out; }}
+#}}
+
+{{## def.compareFormat:
+ {{? $isData }}
+ if ({{=$schemaValue}} === undefined) {{=$valid}} = true;
+ else if (typeof {{=$schemaValue}} != 'string') {{=$valid}} = false;
+ else {
+ {{ $closingBraces += '}'; }}
+ {{?}}
+
+ {{? $isDataFormat }}
+ if (!{{=$compare}}) {{=$valid}} = true;
+ else {
+ {{ $closingBraces += '}'; }}
+ {{?}}
+
+ var {{=$result}} = {{=$compare}}({{=$data}}, {{# def.schemaValueQS }});
+
+ if ({{=$result}} === undefined) {{=$valid}} = false;
+#}}
+
+
+{{? it.opts.format === false }}{{# def.skipFormatLimit }}{{?}}
+
+{{
+ var $schemaFormat = it.schema.format
+ , $isDataFormat = it.opts.v5 && $schemaFormat.$data
+ , $closingBraces = '';
+}}
+
+{{? $isDataFormat }}
+ {{
+ var $schemaValueFormat = it.util.getData($schemaFormat.$data, $dataLvl, it.dataPathArr)
+ , $format = 'format' + $lvl
+ , $compare = 'compare' + $lvl;
+ }}
+
+ var {{=$format}} = formats[{{=$schemaValueFormat}}]
+ , {{=$compare}} = {{=$format}} && {{=$format}}.compare;
+{{??}}
+ {{ var $format = it.formats[$schemaFormat]; }}
+ {{? !($format && $format.compare) }}
+ {{# def.skipFormatLimit }}
+ {{?}}
+ {{ var $compare = 'formats' + it.util.getProperty($schemaFormat) + '.compare'; }}
+{{?}}
+
+{{
+ var $isMax = $keyword == 'formatMaximum'
+ , $exclusiveKeyword = 'formatExclusive' + ($isMax ? 'Maximum' : 'Minimum')
+ , $schemaExcl = it.schema[$exclusiveKeyword]
+ , $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data
+ , $op = $isMax ? '<' : '>'
+ , $result = 'result' + $lvl;
+}}
+
+{{# def.$data }}
+
+
+{{? $isDataExcl }}
+ {{
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr)
+ , $exclusive = 'exclusive' + $lvl
+ , $opExpr = 'op' + $lvl
+ , $opStr = '\' + ' + $opExpr + ' + \'';
+ }}
+ var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}};
+ {{ $schemaValueExcl = 'schemaExcl' + $lvl; }}
+
+ if (typeof {{=$schemaValueExcl}} != 'boolean' && {{=$schemaValueExcl}} !== undefined) {
+ {{=$valid}} = false;
+ {{ var $errorKeyword = $exclusiveKeyword; }}
+ {{# def.error:'_formatExclusiveLimit' }}
+ }
+
+ {{# def.elseIfValid }}
+
+ {{# def.compareFormat }}
+ var {{=$exclusive}} = {{=$schemaValueExcl}} === true;
+
+ if ({{=$valid}} === undefined) {
+ {{=$valid}} = {{=$exclusive}}
+ ? {{=$result}} {{=$op}} 0
+ : {{=$result}} {{=$op}}= 0;
+ }
+
+ if (!{{=$valid}}) var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}=';
+{{??}}
+ {{
+ var $exclusive = $schemaExcl === true
+ , $opStr = $op; /*used in error*/
+ if (!$exclusive) $opStr += '=';
+ var $opExpr = '\'' + $opStr + '\''; /*used in error*/
+ }}
+
+ {{# def.compareFormat }}
+
+ if ({{=$valid}} === undefined)
+ {{=$valid}} = {{=$result}} {{=$op}}{{?!$exclusive}}={{?}} 0;
+{{?}}
+
+{{= $closingBraces }}
+
+if (!{{=$valid}}) {
+ {{ var $errorKeyword = $keyword; }}
+ {{# def.error:'_formatLimit' }}
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/v5/constant.jst b/tools/eslint/node_modules/ajv/lib/dot/v5/constant.jst
new file mode 100644
index 0000000000..67969c1b9f
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/v5/constant.jst
@@ -0,0 +1,10 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{? !$isData }}
+ var schema{{=$lvl}} = validate.schema{{=$schemaPath}};
+{{?}}
+var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}});
+{{# def.checkError:'constant' }}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/v5/patternRequired.jst b/tools/eslint/node_modules/ajv/lib/dot/v5/patternRequired.jst
new file mode 100644
index 0000000000..9af2cdc9d0
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/v5/patternRequired.jst
@@ -0,0 +1,28 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+
+{{
+ var $key = 'key' + $lvl
+ , $matched = 'patternMatched' + $lvl
+ , $closingBraces = ''
+ , $ownProperties = it.opts.ownProperties;
+}}
+
+var {{=$valid}} = true;
+{{~ $schema:$pProperty }}
+ var {{=$matched}} = false;
+ for (var {{=$key}} in {{=$data}}) {
+ {{# def.checkOwnProperty }}
+ {{=$matched}} = {{= it.usePattern($pProperty) }}.test({{=$key}});
+ if ({{=$matched}}) break;
+ }
+
+ {{ var $missingPattern = it.util.escapeQuotes($pProperty); }}
+ if (!{{=$matched}}) {
+ {{=$valid}} = false;
+ {{# def.addError:'patternRequired' }}
+ } {{# def.elseIfValid }}
+{{~}}
+
+{{= $closingBraces }}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/v5/switch.jst b/tools/eslint/node_modules/ajv/lib/dot/v5/switch.jst
new file mode 100644
index 0000000000..7b2906a60b
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/v5/switch.jst
@@ -0,0 +1,73 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.validateIf:
+ {{# def.setCompositeRule }}
+ {{ $it.createErrors = false; }}
+ {{# def._validateSwitchRule:if }}
+ {{ $it.createErrors = true; }}
+ {{# def.resetCompositeRule }}
+ {{=$ifPassed}} = valid{{=$it.level}};
+#}}
+
+{{## def.validateThen:
+ {{? typeof $sch.then == 'boolean' }}
+ {{? $sch.then === false }}
+ {{# def.error:'switch' }}
+ {{?}}
+ var valid{{=$it.level}} = {{= $sch.then }};
+ {{??}}
+ {{# def._validateSwitchRule:then }}
+ {{?}}
+#}}
+
+{{## def._validateSwitchRule:_clause:
+ {{
+ $it.schema = $sch._clause;
+ $it.schemaPath = $schemaPath + '[' + $caseIndex + ']._clause';
+ $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/_clause';
+ }}
+ {{# def.insertSubschemaCode }}
+#}}
+
+{{## def.switchCase:
+ {{? $sch.if && {{# def.nonEmptySchema:$sch.if }} }}
+ var {{=$errs}} = errors;
+ {{# def.validateIf }}
+ if ({{=$ifPassed}}) {
+ {{# def.validateThen }}
+ } else {
+ {{# def.resetErrors }}
+ }
+ {{??}}
+ {{=$ifPassed}} = true;
+ {{# def.validateThen }}
+ {{?}}
+#}}
+
+
+{{
+ var $ifPassed = 'ifPassed' + it.level
+ , $currentBaseId = $it.baseId
+ , $shouldContinue;
+}}
+var {{=$ifPassed}};
+
+{{~ $schema:$sch:$caseIndex }}
+ {{? $caseIndex && !$shouldContinue }}
+ if (!{{=$ifPassed}}) {
+ {{ $closingBraces+= '}'; }}
+ {{?}}
+
+ {{# def.switchCase }}
+ {{ $shouldContinue = $sch.continue }}
+{{~}}
+
+{{= $closingBraces }}
+
+var {{=$valid}} = valid{{=$it.level}};
+
+{{# def.cleanUp }}
diff --git a/tools/eslint/node_modules/ajv/lib/dot/validate.jst b/tools/eslint/node_modules/ajv/lib/dot/validate.jst
new file mode 100644
index 0000000000..1b08758701
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dot/validate.jst
@@ -0,0 +1,210 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.defaults }}
+{{# def.coerce }}
+
+{{ /**
+ * schema compilation (render) time:
+ * it = { schema, RULES, _validate, opts }
+ * it.validate - this template function,
+ * it is used recursively to generate code for subschemas
+ *
+ * runtime:
+ * "validate" is a variable name to which this function will be assigned
+ * validateRef etc. are defined in the parent scope in index.js
+ */ }}
+
+{{ var $async = it.schema.$async === true; }}
+
+{{? it.isTop}}
+ {{
+ var $top = it.isTop
+ , $lvl = it.level = 0
+ , $dataLvl = it.dataLevel = 0
+ , $data = 'data';
+ it.rootId = it.resolve.fullPath(it.root.schema.id);
+ it.baseId = it.baseId || it.rootId;
+ if ($async) {
+ it.async = true;
+ var $es7 = it.opts.async == 'es7';
+ it.yieldAwait = $es7 ? 'await' : 'yield';
+ }
+ delete it.isTop;
+
+ it.dataPathArr = [undefined];
+ }}
+
+ var validate =
+ {{? $async }}
+ {{? $es7 }}
+ (async function
+ {{??}}
+ {{? it.opts.async == 'co*'}}co.wrap{{?}}(function*
+ {{?}}
+ {{??}}
+ (function
+ {{?}}
+ (data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict';
+ var vErrors = null; {{ /* don't edit, used in replace */ }}
+ var errors = 0; {{ /* don't edit, used in replace */ }}
+ if (rootData === undefined) rootData = data;
+{{??}}
+ {{
+ var $lvl = it.level
+ , $dataLvl = it.dataLevel
+ , $data = 'data' + ($dataLvl || '');
+
+ if (it.schema.id) it.baseId = it.resolve.url(it.baseId, it.schema.id);
+
+ if ($async && !it.async) throw new Error('async schema in sync schema');
+ }}
+
+ var errs_{{=$lvl}} = errors;
+{{?}}
+
+{{
+ var $valid = 'valid' + $lvl
+ , $breakOnError = !it.opts.allErrors
+ , $closingBraces1 = ''
+ , $closingBraces2 = ''
+ , $errorKeyword;
+
+ var $typeSchema = it.schema.type
+ , $typeIsArray = Array.isArray($typeSchema);
+}}
+
+{{## def.checkType:
+ {{
+ var $schemaPath = it.schemaPath + '.type'
+ , $errSchemaPath = it.errSchemaPath + '/type'
+ , $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+ }}
+
+ if ({{= it.util[$method]($typeSchema, $data, true) }}) {
+#}}
+
+{{? $typeSchema && it.opts.coerceTypes }}
+ {{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }}
+ {{? $coerceToTypes }}
+ {{# def.checkType }}
+ {{# def.coerceType }}
+ }
+ {{?}}
+{{?}}
+
+{{ var $refKeywords; }}
+{{? it.schema.$ref && ($refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref')) }}
+ {{? it.opts.extendRefs == 'fail' }}
+ {{ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '"'); }}
+ {{?? it.opts.extendRefs == 'ignore' }}
+ {{
+ $refKeywords = false;
+ console.log('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
+ }}
+ {{?? it.opts.extendRefs !== true }}
+ {{ console.log('$ref: all keywords used in schema at path "' + it.errSchemaPath + '". It will change in the next major version, see issue #260. Use option { extendRefs: true } to keep current behaviour'); }}
+ {{?}}
+{{?}}
+
+{{? it.schema.$ref && !$refKeywords }}
+ {{= it.RULES.all.$ref.code(it, '$ref') }}
+ {{? $breakOnError }}
+ }
+ if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) {
+ {{ $closingBraces2 += '}'; }}
+ {{?}}
+{{??}}
+ {{~ it.RULES:$rulesGroup }}
+ {{? $shouldUseGroup($rulesGroup) }}
+ {{? $rulesGroup.type }}
+ if ({{= it.util.checkDataType($rulesGroup.type, $data) }}) {
+ {{?}}
+ {{? it.opts.useDefaults && !it.compositeRule }}
+ {{? $rulesGroup.type == 'object' && it.schema.properties }}
+ {{# def.defaultProperties }}
+ {{?? $rulesGroup.type == 'array' && Array.isArray(it.schema.items) }}
+ {{# def.defaultItems }}
+ {{?}}
+ {{?}}
+ {{~ $rulesGroup.rules:$rule }}
+ {{? $shouldUseRule($rule) }}
+ {{= $rule.code(it, $rule.keyword) }}
+ {{? $breakOnError }}
+ {{ $closingBraces1 += '}'; }}
+ {{?}}
+ {{?}}
+ {{~}}
+ {{? $breakOnError }}
+ {{= $closingBraces1 }}
+ {{ $closingBraces1 = ''; }}
+ {{?}}
+ {{? $rulesGroup.type }}
+ }
+ {{? $typeSchema && $typeSchema === $rulesGroup.type }}
+ {{ var $typeChecked = true; }}
+ else {
+ {{
+ var $schemaPath = it.schemaPath + '.type'
+ , $errSchemaPath = it.errSchemaPath + '/type';
+ }}
+ {{# def.error:'type' }}
+ }
+ {{?}}
+ {{?}}
+
+ {{? $breakOnError }}
+ if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) {
+ {{ $closingBraces2 += '}'; }}
+ {{?}}
+ {{?}}
+ {{~}}
+{{?}}
+
+{{? $typeSchema && !$typeChecked && !(it.opts.coerceTypes && $coerceToTypes) }}
+ {{# def.checkType }}
+ {{# def.error:'type' }}
+ }
+{{?}}
+
+{{? $breakOnError }} {{= $closingBraces2 }} {{?}}
+
+{{? $top }}
+ {{? $async }}
+ if (errors === 0) return true; {{ /* don't edit, used in replace */ }}
+ else throw new ValidationError(vErrors); {{ /* don't edit, used in replace */ }}
+ {{??}}
+ validate.errors = vErrors; {{ /* don't edit, used in replace */ }}
+ return errors === 0; {{ /* don't edit, used in replace */ }}
+ {{?}}
+ });
+
+ return validate;
+{{??}}
+ var {{=$valid}} = errors === errs_{{=$lvl}};
+{{?}}
+
+{{# def.cleanUp }}
+
+{{? $top && $breakOnError }}
+ {{# def.cleanUpVarErrors }}
+{{?}}
+
+{{
+ function $shouldUseGroup($rulesGroup) {
+ for (var i=0; i < $rulesGroup.rules.length; i++)
+ if ($shouldUseRule($rulesGroup.rules[i]))
+ return true;
+ }
+
+ function $shouldUseRule($rule) {
+ return it.schema[$rule.keyword] !== undefined ||
+ ( $rule.keyword == 'properties' &&
+ ( it.schema.additionalProperties === false ||
+ typeof it.schema.additionalProperties == 'object'
+ || ( it.schema.patternProperties &&
+ Object.keys(it.schema.patternProperties).length )
+ || ( it.opts.v5 && it.schema.patternGroups &&
+ Object.keys(it.schema.patternGroups).length )));
+ }
+}}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/README.md b/tools/eslint/node_modules/ajv/lib/dotjs/README.md
new file mode 100644
index 0000000000..4d994846c8
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/README.md
@@ -0,0 +1,3 @@
+These files are compiled dot templates from dot folder.
+
+Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder.
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/_formatLimit.js b/tools/eslint/node_modules/ajv/lib/dotjs/_formatLimit.js
new file mode 100644
index 0000000000..0f2a5e9380
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/_formatLimit.js
@@ -0,0 +1,176 @@
+'use strict';
+module.exports = function generate__formatLimit(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ out += 'var ' + ($valid) + ' = undefined;';
+ if (it.opts.format === false) {
+ out += ' ' + ($valid) + ' = true; ';
+ return out;
+ }
+ var $schemaFormat = it.schema.format,
+ $isDataFormat = it.opts.v5 && $schemaFormat.$data,
+ $closingBraces = '';
+ if ($isDataFormat) {
+ var $schemaValueFormat = it.util.getData($schemaFormat.$data, $dataLvl, it.dataPathArr),
+ $format = 'format' + $lvl,
+ $compare = 'compare' + $lvl;
+ out += ' var ' + ($format) + ' = formats[' + ($schemaValueFormat) + '] , ' + ($compare) + ' = ' + ($format) + ' && ' + ($format) + '.compare;';
+ } else {
+ var $format = it.formats[$schemaFormat];
+ if (!($format && $format.compare)) {
+ out += ' ' + ($valid) + ' = true; ';
+ return out;
+ }
+ var $compare = 'formats' + it.util.getProperty($schemaFormat) + '.compare';
+ }
+ var $isMax = $keyword == 'formatMaximum',
+ $exclusiveKeyword = 'formatExclusive' + ($isMax ? 'Maximum' : 'Minimum'),
+ $schemaExcl = it.schema[$exclusiveKeyword],
+ $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data,
+ $op = $isMax ? '<' : '>',
+ $result = 'result' + $lvl;
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if ($isDataExcl) {
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
+ $exclusive = 'exclusive' + $lvl,
+ $opExpr = 'op' + $lvl,
+ $opStr = '\' + ' + $opExpr + ' + \'';
+ out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
+ $schemaValueExcl = 'schemaExcl' + $lvl;
+ out += ' if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && ' + ($schemaValueExcl) + ' !== undefined) { ' + ($valid) + ' = false; ';
+ var $errorKeyword = $exclusiveKeyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_formatExclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ if ($isData) {
+ out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { ';
+ $closingBraces += '}';
+ }
+ if ($isDataFormat) {
+ out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';
+ $closingBraces += '}';
+ }
+ out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; var ' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true; if (' + ($valid) + ' === undefined) { ' + ($valid) + ' = ' + ($exclusive) + ' ? ' + ($result) + ' ' + ($op) + ' 0 : ' + ($result) + ' ' + ($op) + '= 0; } if (!' + ($valid) + ') var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
+ } else {
+ var $exclusive = $schemaExcl === true,
+ $opStr = $op;
+ if (!$exclusive) $opStr += '=';
+ var $opExpr = '\'' + $opStr + '\'';
+ if ($isData) {
+ out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { ';
+ $closingBraces += '}';
+ }
+ if ($isDataFormat) {
+ out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';
+ $closingBraces += '}';
+ }
+ out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; if (' + ($valid) + ' === undefined) ' + ($valid) + ' = ' + ($result) + ' ' + ($op);
+ if (!$exclusive) {
+ out += '=';
+ }
+ out += ' 0;';
+ }
+ out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_formatLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , exclusive: ' + ($exclusive) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ' + ($opStr) + ' "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '}';
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/_limit.js b/tools/eslint/node_modules/ajv/lib/dotjs/_limit.js
new file mode 100644
index 0000000000..c830ec26ef
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/_limit.js
@@ -0,0 +1,124 @@
+'use strict';
+module.exports = function generate__limit(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $isMax = $keyword == 'maximum',
+ $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',
+ $schemaExcl = it.schema[$exclusiveKeyword],
+ $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data,
+ $op = $isMax ? '<' : '>',
+ $notOp = $isMax ? '>' : '<';
+ if ($isDataExcl) {
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
+ $exclusive = 'exclusive' + $lvl,
+ $opExpr = 'op' + $lvl,
+ $opStr = '\' + ' + $opExpr + ' + \'';
+ out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
+ $schemaValueExcl = 'schemaExcl' + $lvl;
+ out += ' var exclusive' + ($lvl) + '; if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && typeof ' + ($schemaValueExcl) + ' != \'undefined\') { ';
+ var $errorKeyword = $exclusiveKeyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else if( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ((exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ') || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
+ } else {
+ var $exclusive = $schemaExcl === true,
+ $opStr = $op;
+ if (!$exclusive) $opStr += '=';
+ var $opExpr = '\'' + $opStr + '\'';
+ out += ' if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($data) + ' ' + ($notOp);
+ if ($exclusive) {
+ out += '=';
+ }
+ out += ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') {';
+ }
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ' + ($opStr) + ' ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue);
+ } else {
+ out += '' + ($schema) + '\'';
+ }
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/_limitItems.js b/tools/eslint/node_modules/ajv/lib/dotjs/_limitItems.js
new file mode 100644
index 0000000000..1f2ac543b3
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/_limitItems.js
@@ -0,0 +1,76 @@
+'use strict';
+module.exports = function generate__limitItems(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $op = $keyword == 'maxItems' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ';
+ if ($keyword == 'maxItems') {
+ out += 'more';
+ } else {
+ out += 'less';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' items\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/_limitLength.js b/tools/eslint/node_modules/ajv/lib/dotjs/_limitLength.js
new file mode 100644
index 0000000000..a6976374b8
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/_limitLength.js
@@ -0,0 +1,81 @@
+'use strict';
+module.exports = function generate__limitLength(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $op = $keyword == 'maxLength' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ if (it.opts.unicode === false) {
+ out += ' ' + ($data) + '.length ';
+ } else {
+ out += ' ucs2length(' + ($data) + ') ';
+ }
+ out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be ';
+ if ($keyword == 'maxLength') {
+ out += 'longer';
+ } else {
+ out += 'shorter';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' characters\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/_limitProperties.js b/tools/eslint/node_modules/ajv/lib/dotjs/_limitProperties.js
new file mode 100644
index 0000000000..60a6702f64
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/_limitProperties.js
@@ -0,0 +1,76 @@
+'use strict';
+module.exports = function generate__limitProperties(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $op = $keyword == 'maxProperties' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ';
+ if ($keyword == 'maxProperties') {
+ out += 'more';
+ } else {
+ out += 'less';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' properties\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/allOf.js b/tools/eslint/node_modules/ajv/lib/dotjs/allOf.js
new file mode 100644
index 0000000000..eaada3faeb
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/allOf.js
@@ -0,0 +1,36 @@
+'use strict';
+module.exports = function generate_allOf(it, $keyword) {
+ var out = ' ';
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $currentBaseId = $it.baseId;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces.slice(0, -1));
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/anyOf.js b/tools/eslint/node_modules/ajv/lib/dotjs/anyOf.js
new file mode 100644
index 0000000000..23e1d13b98
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/anyOf.js
@@ -0,0 +1,65 @@
+'use strict';
+module.exports = function generate_anyOf(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $noEmptySchema = $schema.every(function($sch) {
+ return it.util.schemaHasRules($sch, it.RULES.all);
+ });
+ if ($noEmptySchema) {
+ var $currentBaseId = $it.baseId;
+ out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' ' + ($valid) + ' = ' + ($valid) + ' || valid' + ($it.level) + '; if (!' + ($valid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match some schema in anyOf\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ out = it.util.cleanUpCode(out);
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/constant.js b/tools/eslint/node_modules/ajv/lib/dotjs/constant.js
new file mode 100644
index 0000000000..7afe7c2704
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/constant.js
@@ -0,0 +1,53 @@
+'use strict';
+module.exports = function generate_constant(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!$isData) {
+ out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';
+ }
+ out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'constant') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be equal to constant\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' }';
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/custom.js b/tools/eslint/node_modules/ajv/lib/dotjs/custom.js
new file mode 100644
index 0000000000..36758aee18
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/custom.js
@@ -0,0 +1,210 @@
+'use strict';
+module.exports = function generate_custom(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $rule = this,
+ $definition = 'definition' + $lvl,
+ $rDef = $rule.definition,
+ $validate = $rDef.validate,
+ $compile, $inline, $macro, $ruleValidate, $validateCode;
+ if ($isData && $rDef.$data) {
+ $validateCode = 'keywordValidate' + $lvl;
+ var $validateSchema = $rDef.validateSchema;
+ out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;';
+ } else {
+ $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
+ $schemaValue = 'validate.schema' + $schemaPath;
+ $validateCode = $ruleValidate.code;
+ $compile = $rDef.compile;
+ $inline = $rDef.inline;
+ $macro = $rDef.macro;
+ }
+ var $ruleErrs = $validateCode + '.errors',
+ $i = 'i' + $lvl,
+ $ruleErr = 'ruleErr' + $lvl,
+ $asyncKeyword = $rDef.async;
+ if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');
+ if (!($inline || $macro)) {
+ out += '' + ($ruleErrs) + ' = null;';
+ }
+ out += 'var ' + ($errs) + ' = errors;var valid' + ($lvl) + ';';
+ if ($inline && $rDef.statements) {
+ out += ' ' + ($ruleValidate.validate);
+ } else if ($macro) {
+ var $it = it.util.copy(it);
+ $it.level++;
+ $it.schema = $ruleValidate.validate;
+ $it.schemaPath = '';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var $code = it.validate($it).replace(/validate\.schema/g, $validateCode);
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($code);
+ } else if (!$inline) {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ out += ' ' + ($validateCode) + '.call( ';
+ if (it.opts.passContext) {
+ out += 'this';
+ } else {
+ out += 'self';
+ }
+ if ($compile || $rDef.schema === false) {
+ out += ' , ' + ($data) + ' ';
+ } else {
+ out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';
+ }
+ out += ' , (dataPath || \'\')';
+ if (it.errorPath != '""') {
+ out += ' + ' + (it.errorPath);
+ }
+ if ($dataLvl) {
+ out += ' , data' + (($dataLvl - 1) || '') + ' , ' + (it.dataPathArr[$dataLvl]) + ' ';
+ } else {
+ out += ' , parentData , parentDataProperty ';
+ }
+ out += ' , rootData ) ';
+ var def_callRuleValidate = out;
+ out = $$outStack.pop();
+ if ($rDef.errors !== false) {
+ if ($asyncKeyword) {
+ $ruleErrs = 'customErrors' + $lvl;
+ out += ' var ' + ($ruleErrs) + ' = null; try { valid' + ($lvl) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { valid' + ($lvl) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';
+ } else {
+ out += ' ' + ($validateCode) + '.errors = null; ';
+ }
+ }
+ }
+ out += 'if (';
+ if ($validateSchema) {
+ out += ' !' + ($definition) + '.validateSchema(' + ($schemaValue) + ') || ';
+ }
+ out += ' ! ';
+ if ($inline) {
+ if ($rDef.statements) {
+ out += ' valid' + ($lvl) + ' ';
+ } else {
+ out += ' (' + ($ruleValidate.validate) + ') ';
+ }
+ } else if ($macro) {
+ out += ' valid' + ($it.level) + ' ';
+ } else {
+ if ($asyncKeyword) {
+ if ($rDef.errors === false) {
+ out += ' (' + (it.yieldAwait) + (def_callRuleValidate) + ') ';
+ } else {
+ out += ' valid' + ($lvl) + ' ';
+ }
+ } else {
+ out += ' ' + (def_callRuleValidate) + ' ';
+ }
+ }
+ out += ') { ';
+ $errorKeyword = $rule.keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ var def_customError = out;
+ out = $$outStack.pop();
+ if ($inline) {
+ if ($rDef.errors) {
+ if ($rDef.errors != 'full') {
+ out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) { ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; } if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } ';
+ }
+ } else {
+ if ($rDef.errors === false) {
+ out += ' ' + (def_customError) + ' ';
+ } else {
+ out += ' if (' + ($errs) + ' == errors) { ' + (def_customError) + ' } else { for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) { ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; } if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } } ';
+ }
+ }
+ } else if ($macro) {
+ out += ' var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false ';
+ }
+ }
+ } else {
+ if ($rDef.errors === false) {
+ out += ' ' + (def_customError) + ' ';
+ } else {
+ out += ' if (Array.isArray(' + ($ruleErrs) + ')) { if (vErrors === null) vErrors = ' + ($ruleErrs) + '; else vErrors = vErrors.concat(' + ($ruleErrs) + '); errors = vErrors.length; for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } } else { ' + (def_customError) + ' } ';
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/dependencies.js b/tools/eslint/node_modules/ajv/lib/dotjs/dependencies.js
new file mode 100644
index 0000000000..0fef637930
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/dependencies.js
@@ -0,0 +1,147 @@
+'use strict';
+module.exports = function generate_dependencies(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $schemaDeps = {},
+ $propertyDeps = {};
+ for ($property in $schema) {
+ var $sch = $schema[$property];
+ var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
+ $deps[$property] = $sch;
+ }
+ out += 'var ' + ($errs) + ' = errors;';
+ var $currentErrorPath = it.errorPath;
+ out += 'var missing' + ($lvl) + ';';
+ for (var $property in $propertyDeps) {
+ $deps = $propertyDeps[$property];
+ out += ' if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
+ if ($breakOnError) {
+ out += ' && ( ';
+ var arr1 = $deps;
+ if (arr1) {
+ var _$property, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ _$property = arr1[$i += 1];
+ if ($i) {
+ out += ' || ';
+ }
+ var $prop = it.util.getProperty(_$property);
+ out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';
+ }
+ }
+ out += ')) { ';
+ var $propertyPath = 'missing' + $lvl,
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have ';
+ if ($deps.length == 1) {
+ out += 'property ' + (it.util.escapeQuotes($deps[0]));
+ } else {
+ out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
+ }
+ out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ } else {
+ out += ' ) { ';
+ var arr2 = $deps;
+ if (arr2) {
+ var $reqProperty, i2 = -1,
+ l2 = arr2.length - 1;
+ while (i2 < l2) {
+ $reqProperty = arr2[i2 += 1];
+ var $prop = it.util.getProperty($reqProperty),
+ $missingProperty = it.util.escapeQuotes($reqProperty);
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers);
+ }
+ out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have ';
+ if ($deps.length == 1) {
+ out += 'property ' + (it.util.escapeQuotes($deps[0]));
+ } else {
+ out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
+ }
+ out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ }
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ var $currentBaseId = $it.baseId;
+ for (var $property in $schemaDeps) {
+ var $sch = $schemaDeps[$property];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ out += ' valid' + ($it.level) + ' = true; if (' + ($data) + '[\'' + ($property) + '\'] !== undefined) { ';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + it.util.getProperty($property);
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/enum.js b/tools/eslint/node_modules/ajv/lib/dotjs/enum.js
new file mode 100644
index 0000000000..dff0828248
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/enum.js
@@ -0,0 +1,65 @@
+'use strict';
+module.exports = function generate_enum(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $i = 'i' + $lvl;
+ if (!$isData) {
+ out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';
+ }
+ out += 'var ' + ($valid) + ';';
+ if ($isData) {
+ out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
+ }
+ out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<schema' + ($lvl) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', schema' + ($lvl) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be equal to one of the allowed values\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' }';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/format.js b/tools/eslint/node_modules/ajv/lib/dotjs/format.js
new file mode 100644
index 0000000000..15253b4ba7
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/format.js
@@ -0,0 +1,117 @@
+'use strict';
+module.exports = function generate_format(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ if (it.opts.format === false) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ }
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if ($isData) {
+ var $format = 'format' + $lvl;
+ out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var isObject' + ($lvl) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; if (isObject' + ($lvl) + ') { var async' + ($lvl) + ' = ' + ($format) + '.async; ' + ($format) + ' = ' + ($format) + '.validate; } if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
+ }
+ out += ' (' + ($format) + ' && !(typeof ' + ($format) + ' == \'function\' ? ';
+ if (it.async) {
+ out += ' (async' + ($lvl) + ' ? ' + (it.yieldAwait) + ' ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
+ } else {
+ out += ' ' + ($format) + '(' + ($data) + ') ';
+ }
+ out += ' : ' + ($format) + '.test(' + ($data) + ')))) {';
+ } else {
+ var $format = it.formats[$schema];
+ if (!$format) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ }
+ var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
+ if ($isObject) {
+ var $async = $format.async === true;
+ $format = $format.validate;
+ }
+ if ($async) {
+ if (!it.async) throw new Error('async format in sync schema');
+ var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
+ out += ' if (!(' + (it.yieldAwait) + ' ' + ($formatRef) + '(' + ($data) + '))) { ';
+ } else {
+ out += ' if (! ';
+ var $formatRef = 'formats' + it.util.getProperty($schema);
+ if ($isObject) $formatRef += '.validate';
+ if (typeof $format == 'function') {
+ out += ' ' + ($formatRef) + '(' + ($data) + ') ';
+ } else {
+ out += ' ' + ($formatRef) + '.test(' + ($data) + ') ';
+ }
+ out += ') { ';
+ }
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match format "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/items.js b/tools/eslint/node_modules/ajv/lib/dotjs/items.js
new file mode 100644
index 0000000000..8aa36efdcc
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/items.js
@@ -0,0 +1,143 @@
+'use strict';
+module.exports = function generate_items(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $currentBaseId = it.baseId;
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if (Array.isArray($schema)) {
+ var $additionalItems = it.schema.additionalItems;
+ if ($additionalItems === false) {
+ out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalItems';
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ out += ' valid' + ($it.level) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
+ var $passData = $data + '[' + $i + ']';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
+ $it.dataPathArr[$dataNxt] = $i;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) {
+ $it.schema = $additionalItems;
+ $it.schemaPath = it.schemaPath + '.additionalItems';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalItems';
+ out += ' valid' + ($it.level) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var i' + ($lvl) + ' = ' + ($schema.length) + '; i' + ($lvl) + ' < ' + ($data) + '.length; i' + ($lvl) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, 'i' + $lvl, it.opts.jsonPointers, true);
+ var $passData = $data + '[i' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'i' + $lvl;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!valid' + ($it.level) + ') break; ';
+ }
+ out += ' } } ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ } else if (it.util.schemaHasRules($schema, it.RULES.all)) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' for (var i' + ($lvl) + ' = ' + (0) + '; i' + ($lvl) + ' < ' + ($data) + '.length; i' + ($lvl) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, 'i' + $lvl, it.opts.jsonPointers, true);
+ var $passData = $data + '[i' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'i' + $lvl;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!valid' + ($it.level) + ') break; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/multipleOf.js b/tools/eslint/node_modules/ajv/lib/dotjs/multipleOf.js
new file mode 100644
index 0000000000..010cb3831b
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/multipleOf.js
@@ -0,0 +1,77 @@
+'use strict';
+module.exports = function generate_multipleOf(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ out += 'var division' + ($lvl) + ';if (';
+ if ($isData) {
+ out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || ';
+ }
+ out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';
+ if (it.opts.multipleOfPrecision) {
+ out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';
+ } else {
+ out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';
+ }
+ out += ' ) ';
+ if ($isData) {
+ out += ' ) ';
+ }
+ out += ' ) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be multiple of ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue);
+ } else {
+ out += '' + ($schema) + '\'';
+ }
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/not.js b/tools/eslint/node_modules/ajv/lib/dotjs/not.js
new file mode 100644
index 0000000000..6c0e277c25
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/not.js
@@ -0,0 +1,83 @@
+'use strict';
+module.exports = function generate_not(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ $it.level++;
+ if (it.util.schemaHasRules($schema, it.RULES.all)) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.createErrors = false;
+ var $allErrorsOption;
+ if ($it.opts.allErrors) {
+ $allErrorsOption = $it.opts.allErrors;
+ $it.opts.allErrors = false;
+ }
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.createErrors = true;
+ if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' if (valid' + ($it.level) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be valid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ } else {
+ out += ' var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be valid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if ($breakOnError) {
+ out += ' if (false) { ';
+ }
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/oneOf.js b/tools/eslint/node_modules/ajv/lib/dotjs/oneOf.js
new file mode 100644
index 0000000000..688a45eec5
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/oneOf.js
@@ -0,0 +1,76 @@
+'use strict';
+module.exports = function generate_oneOf(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false;';
+ var $currentBaseId = $it.baseId;
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ } else {
+ out += ' var valid' + ($it.level) + ' = true; ';
+ }
+ if ($i) {
+ out += ' if (valid' + ($it.level) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { ';
+ $closingBraces += '}';
+ }
+ out += ' if (valid' + ($it.level) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;';
+ }
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match exactly one schema in oneOf\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/pattern.js b/tools/eslint/node_modules/ajv/lib/dotjs/pattern.js
new file mode 100644
index 0000000000..ddb18197fe
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/pattern.js
@@ -0,0 +1,75 @@
+'use strict';
+module.exports = function generate_pattern(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
+ }
+ out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match pattern "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/patternRequired.js b/tools/eslint/node_modules/ajv/lib/dotjs/patternRequired.js
new file mode 100644
index 0000000000..196443aefe
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/patternRequired.js
@@ -0,0 +1,52 @@
+'use strict';
+module.exports = function generate_patternRequired(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $key = 'key' + $lvl,
+ $matched = 'patternMatched' + $lvl,
+ $closingBraces = '',
+ $ownProperties = it.opts.ownProperties;
+ out += 'var ' + ($valid) + ' = true;';
+ var arr1 = $schema;
+ if (arr1) {
+ var $pProperty, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $pProperty = arr1[i1 += 1];
+ out += ' var ' + ($matched) + ' = false; for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ if ($ownProperties) {
+ out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
+ }
+ out += ' ' + ($matched) + ' = ' + (it.usePattern($pProperty)) + '.test(' + ($key) + '); if (' + ($matched) + ') break; } ';
+ var $missingPattern = it.util.escapeQuotes($pProperty);
+ out += ' if (!' + ($matched) + ') { ' + ($valid) + ' = false; var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'patternRequired') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingPattern: \'' + ($missingPattern) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have property matching pattern \\\'' + ($missingPattern) + '\\\'\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ }
+ out += '' + ($closingBraces);
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/properties.js b/tools/eslint/node_modules/ajv/lib/dotjs/properties.js
new file mode 100644
index 0000000000..0d31e6963e
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/properties.js
@@ -0,0 +1,445 @@
+'use strict';
+module.exports = function generate_properties(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $key = 'key' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt;
+ var $schemaKeys = Object.keys($schema || {}),
+ $pProperties = it.schema.patternProperties || {},
+ $pPropertyKeys = Object.keys($pProperties),
+ $aProperties = it.schema.additionalProperties,
+ $someProperties = $schemaKeys.length || $pPropertyKeys.length,
+ $noAdditional = $aProperties === false,
+ $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,
+ $removeAdditional = it.opts.removeAdditional,
+ $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional,
+ $ownProperties = it.opts.ownProperties,
+ $currentBaseId = it.baseId;
+ var $required = it.schema.required;
+ if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required);
+ if (it.opts.v5) {
+ var $pgProperties = it.schema.patternGroups || {},
+ $pgPropertyKeys = Object.keys($pgProperties);
+ }
+ out += 'var ' + ($errs) + ' = errors;var valid' + ($it.level) + ' = true;';
+ if ($checkAdditional) {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ if ($ownProperties) {
+ out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
+ }
+ if ($someProperties) {
+ out += ' var isAdditional' + ($lvl) + ' = !(false ';
+ if ($schemaKeys.length) {
+ if ($schemaKeys.length > 5) {
+ out += ' || validate.schema' + ($schemaPath) + '[' + ($key) + '] ';
+ } else {
+ var arr1 = $schemaKeys;
+ if (arr1) {
+ var $propertyKey, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $propertyKey = arr1[i1 += 1];
+ out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';
+ }
+ }
+ }
+ }
+ if ($pPropertyKeys.length) {
+ var arr2 = $pPropertyKeys;
+ if (arr2) {
+ var $pProperty, $i = -1,
+ l2 = arr2.length - 1;
+ while ($i < l2) {
+ $pProperty = arr2[$i += 1];
+ out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') ';
+ }
+ }
+ }
+ if (it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length) {
+ var arr3 = $pgPropertyKeys;
+ if (arr3) {
+ var $pgProperty, $i = -1,
+ l3 = arr3.length - 1;
+ while ($i < l3) {
+ $pgProperty = arr3[$i += 1];
+ out += ' || ' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ') ';
+ }
+ }
+ }
+ out += ' ); if (isAdditional' + ($lvl) + ') { ';
+ }
+ if ($removeAdditional == 'all') {
+ out += ' delete ' + ($data) + '[' + ($key) + ']; ';
+ } else {
+ var $currentErrorPath = it.errorPath;
+ var $additionalProperty = '\' + key' + $lvl + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);
+ }
+ if ($noAdditional) {
+ if ($removeAdditional) {
+ out += ' delete ' + ($data) + '[' + ($key) + ']; ';
+ } else {
+ out += ' valid' + ($it.level) + ' = false; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have additional properties\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ out += ' break; ';
+ }
+ }
+ } else if ($additionalIsSchema) {
+ if ($removeAdditional == 'failing') {
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);
+ var $passData = $data + '[key' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'key' + $lvl;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' if (!valid' + ($it.level) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ } else {
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);
+ var $passData = $data + '[key' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'key' + $lvl;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!valid' + ($it.level) + ') break; ';
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ }
+ if ($someProperties) {
+ out += ' } ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ var $useDefaults = it.opts.useDefaults && !it.compositeRule;
+ if ($schemaKeys.length) {
+ var arr4 = $schemaKeys;
+ if (arr4) {
+ var $propertyKey, i4 = -1,
+ l4 = arr4.length - 1;
+ while (i4 < l4) {
+ $propertyKey = arr4[i4 += 1];
+ var $sch = $schema[$propertyKey];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ var $prop = it.util.getProperty($propertyKey),
+ $passData = $data + $prop,
+ $hasDefault = $useDefaults && $sch.default !== undefined;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + $prop;
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
+ $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
+ $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ $code = it.util.varReplace($code, $nextData, $passData);
+ var $useData = $passData;
+ } else {
+ var $useData = $nextData;
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';
+ }
+ if ($hasDefault) {
+ out += ' ' + ($code) + ' ';
+ } else {
+ if ($requiredHash && $requiredHash[$propertyKey]) {
+ out += ' if (' + ($useData) + ' === undefined) { valid' + ($it.level) + ' = false; ';
+ var $currentErrorPath = it.errorPath,
+ $currErrSchemaPath = $errSchemaPath,
+ $missingProperty = it.util.escapeQuotes($propertyKey);
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ $errSchemaPath = it.errSchemaPath + '/required';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ it.errorPath = $currentErrorPath;
+ out += ' } else { ';
+ } else {
+ if ($breakOnError) {
+ out += ' if (' + ($useData) + ' === undefined) { valid' + ($it.level) + ' = true; } else { ';
+ } else {
+ out += ' if (' + ($useData) + ' !== undefined) { ';
+ }
+ }
+ out += ' ' + ($code) + ' } ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ var arr5 = $pPropertyKeys;
+ if (arr5) {
+ var $pProperty, i5 = -1,
+ l5 = arr5.length - 1;
+ while (i5 < l5) {
+ $pProperty = arr5[i5 += 1];
+ var $sch = $pProperties[$pProperty];
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
+ $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ if ($ownProperties) {
+ out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
+ }
+ out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);
+ var $passData = $data + '[key' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'key' + $lvl;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!valid' + ($it.level) + ') break; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else valid' + ($it.level) + ' = true; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if (it.opts.v5) {
+ var arr6 = $pgPropertyKeys;
+ if (arr6) {
+ var $pgProperty, i6 = -1,
+ l6 = arr6.length - 1;
+ while (i6 < l6) {
+ $pgProperty = arr6[i6 += 1];
+ var $pgSchema = $pgProperties[$pgProperty],
+ $sch = $pgSchema.schema;
+ if (it.util.schemaHasRules($sch, it.RULES.all)) {
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema';
+ $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema';
+ out += ' var pgPropCount' + ($lvl) + ' = 0; for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ if ($ownProperties) {
+ out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
+ }
+ out += ' if (' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ')) { pgPropCount' + ($lvl) + '++; ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);
+ var $passData = $data + '[key' + $lvl + ']';
+ $it.dataPathArr[$dataNxt] = 'key' + $lvl;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!valid' + ($it.level) + ') break; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else valid' + ($it.level) + ' = true; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ $closingBraces += '}';
+ }
+ var $pgMin = $pgSchema.minimum,
+ $pgMax = $pgSchema.maximum;
+ if ($pgMin !== undefined || $pgMax !== undefined) {
+ out += ' var ' + ($valid) + ' = true; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ if ($pgMin !== undefined) {
+ var $limit = $pgMin,
+ $reason = 'minimum',
+ $moreOrLess = 'less';
+ out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; ';
+ $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum';
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($pgMax !== undefined) {
+ out += ' else ';
+ }
+ }
+ if ($pgMax !== undefined) {
+ var $limit = $pgMax,
+ $reason = 'maximum',
+ $moreOrLess = 'more';
+ out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; ';
+ $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum';
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ out += ' if (' + ($valid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/ref.js b/tools/eslint/node_modules/ajv/lib/dotjs/ref.js
new file mode 100644
index 0000000000..743057180b
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/ref.js
@@ -0,0 +1,122 @@
+'use strict';
+module.exports = function generate_ref(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $async, $refCode;
+ if ($schema == '#' || $schema == '#/') {
+ if (it.isRoot) {
+ $async = it.async;
+ $refCode = 'validate';
+ } else {
+ $async = it.root.schema.$async === true;
+ $refCode = 'root.refVal[0]';
+ }
+ } else {
+ var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);
+ if ($refVal === undefined) {
+ var $message = 'can\'t resolve reference ' + $schema + ' from id ' + it.baseId;
+ if (it.opts.missingRefs == 'fail') {
+ console.log($message);
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ if ($breakOnError) {
+ out += ' if (false) { ';
+ }
+ } else if (it.opts.missingRefs == 'ignore') {
+ console.log($message);
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ } else {
+ var $error = new Error($message);
+ $error.missingRef = it.resolve.url(it.baseId, $schema);
+ $error.missingSchema = it.resolve.normalizeId(it.resolve.fullPath($error.missingRef));
+ throw $error;
+ }
+ } else if ($refVal.inline) {
+ var $it = it.util.copy(it);
+ $it.level++;
+ $it.schema = $refVal.schema;
+ $it.schemaPath = '';
+ $it.errSchemaPath = $schema;
+ var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code);
+ out += ' ' + ($code) + ' ';
+ if ($breakOnError) {
+ out += ' if (valid' + ($it.level) + ') { ';
+ }
+ } else {
+ $async = $refVal.$async === true;
+ $refCode = $refVal.code;
+ }
+ }
+ if ($refCode) {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ if (it.opts.passContext) {
+ out += ' ' + ($refCode) + '.call(this, ';
+ } else {
+ out += ' ' + ($refCode) + '( ';
+ }
+ out += ' ' + ($data) + ', (dataPath || \'\')';
+ if (it.errorPath != '""') {
+ out += ' + ' + (it.errorPath);
+ }
+ if ($dataLvl) {
+ out += ' , data' + (($dataLvl - 1) || '') + ' , ' + (it.dataPathArr[$dataLvl]) + ' ';
+ } else {
+ out += ' , parentData , parentDataProperty ';
+ }
+ out += ', rootData) ';
+ var __callValidate = out;
+ out = $$outStack.pop();
+ if ($async) {
+ if (!it.async) throw new Error('async schema referenced by sync schema');
+ out += ' try { ';
+ if ($breakOnError) {
+ out += 'var ' + ($valid) + ' =';
+ }
+ out += ' ' + (it.yieldAwait) + ' ' + (__callValidate) + '; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ';
+ if ($breakOnError) {
+ out += ' if (' + ($valid) + ') { ';
+ }
+ } else {
+ out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ }
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/required.js b/tools/eslint/node_modules/ajv/lib/dotjs/required.js
new file mode 100644
index 0000000000..b69bc06d12
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/required.js
@@ -0,0 +1,249 @@
+'use strict';
+module.exports = function generate_required(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!$isData) {
+ if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {
+ var $required = [];
+ var arr1 = $schema;
+ if (arr1) {
+ var $property, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $property = arr1[i1 += 1];
+ var $propertySch = it.schema.properties[$property];
+ if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) {
+ $required[$required.length] = $property;
+ }
+ }
+ }
+ } else {
+ var $required = $schema;
+ }
+ }
+ if ($isData || $required.length) {
+ var $currentErrorPath = it.errorPath,
+ $loopRequired = $isData || $required.length >= it.opts.loopRequired;
+ if ($breakOnError) {
+ out += ' var missing' + ($lvl) + '; ';
+ if ($loopRequired) {
+ if (!$isData) {
+ out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + '; ';
+ }
+ var $i = 'i' + $lvl,
+ $propertyPath = 'schema' + $lvl + '[' + $i + ']',
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ out += ' var ' + ($valid) + ' = true; ';
+ if ($isData) {
+ out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
+ }
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < schema' + ($lvl) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[schema' + ($lvl) + '[' + ($i) + ']] !== undefined; if (!' + ($valid) + ') break; } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ } else {
+ out += ' if ( ';
+ var arr2 = $required;
+ if (arr2) {
+ var _$property, $i = -1,
+ l2 = arr2.length - 1;
+ while ($i < l2) {
+ _$property = arr2[$i += 1];
+ if ($i) {
+ out += ' || ';
+ }
+ var $prop = it.util.getProperty(_$property);
+ out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';
+ }
+ }
+ out += ') { ';
+ var $propertyPath = 'missing' + $lvl,
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ }
+ } else {
+ if ($loopRequired) {
+ if (!$isData) {
+ out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + '; ';
+ }
+ var $i = 'i' + $lvl,
+ $propertyPath = 'schema' + $lvl + '[' + $i + ']',
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ if ($isData) {
+ out += ' if (schema' + ($lvl) + ' && !Array.isArray(schema' + ($lvl) + ')) { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (schema' + ($lvl) + ' !== undefined) { ';
+ }
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < schema' + ($lvl) + '.length; ' + ($i) + '++) { if (' + ($data) + '[schema' + ($lvl) + '[' + ($i) + ']] === undefined) { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ } else {
+ var arr3 = $required;
+ if (arr3) {
+ var $reqProperty, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $reqProperty = arr3[i3 += 1];
+ var $prop = it.util.getProperty($reqProperty),
+ $missingProperty = it.util.escapeQuotes($reqProperty);
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers);
+ }
+ out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ }
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ } else if ($breakOnError) {
+ out += ' if (true) {';
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/switch.js b/tools/eslint/node_modules/ajv/lib/dotjs/switch.js
new file mode 100644
index 0000000000..b40ab0268c
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/switch.js
@@ -0,0 +1,128 @@
+'use strict';
+module.exports = function generate_switch(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $ifPassed = 'ifPassed' + it.level,
+ $currentBaseId = $it.baseId,
+ $shouldContinue;
+ out += 'var ' + ($ifPassed) + ';';
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $caseIndex = -1,
+ l1 = arr1.length - 1;
+ while ($caseIndex < l1) {
+ $sch = arr1[$caseIndex += 1];
+ if ($caseIndex && !$shouldContinue) {
+ out += ' if (!' + ($ifPassed) + ') { ';
+ $closingBraces += '}';
+ }
+ if ($sch.if && it.util.schemaHasRules($sch.if, it.RULES.all)) {
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.createErrors = false;
+ $it.schema = $sch.if;
+ $it.schemaPath = $schemaPath + '[' + $caseIndex + '].if';
+ $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/if';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ $it.createErrors = true;
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($ifPassed) + ' = valid' + ($it.level) + '; if (' + ($ifPassed) + ') { ';
+ if (typeof $sch.then == 'boolean') {
+ if ($sch.then === false) {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "switch" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ }
+ out += ' var valid' + ($it.level) + ' = ' + ($sch.then) + '; ';
+ } else {
+ $it.schema = $sch.then;
+ $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';
+ $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } } ';
+ } else {
+ out += ' ' + ($ifPassed) + ' = true; ';
+ if (typeof $sch.then == 'boolean') {
+ if ($sch.then === false) {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "switch" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ }
+ out += ' var valid' + ($it.level) + ' = ' + ($sch.then) + '; ';
+ } else {
+ $it.schema = $sch.then;
+ $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';
+ $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ }
+ }
+ $shouldContinue = $sch.continue
+ }
+ }
+ out += '' + ($closingBraces) + 'var ' + ($valid) + ' = valid' + ($it.level) + '; ';
+ out = it.util.cleanUpCode(out);
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/uniqueItems.js b/tools/eslint/node_modules/ajv/lib/dotjs/uniqueItems.js
new file mode 100644
index 0000000000..682c022962
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/uniqueItems.js
@@ -0,0 +1,72 @@
+'use strict';
+module.exports = function generate_uniqueItems(it, $keyword) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + '.' + $keyword;
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.v5 && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (($schema || $isData) && it.opts.uniqueItems !== false) {
+ if ($isData) {
+ out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { ';
+ }
+ out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/dotjs/validate.js b/tools/eslint/node_modules/ajv/lib/dotjs/validate.js
new file mode 100644
index 0000000000..dc756fc891
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/dotjs/validate.js
@@ -0,0 +1,377 @@
+'use strict';
+module.exports = function generate_validate(it, $keyword) {
+ var out = '';
+ var $async = it.schema.$async === true;
+ if (it.isTop) {
+ var $top = it.isTop,
+ $lvl = it.level = 0,
+ $dataLvl = it.dataLevel = 0,
+ $data = 'data';
+ it.rootId = it.resolve.fullPath(it.root.schema.id);
+ it.baseId = it.baseId || it.rootId;
+ if ($async) {
+ it.async = true;
+ var $es7 = it.opts.async == 'es7';
+ it.yieldAwait = $es7 ? 'await' : 'yield';
+ }
+ delete it.isTop;
+ it.dataPathArr = [undefined];
+ out += ' var validate = ';
+ if ($async) {
+ if ($es7) {
+ out += ' (async function ';
+ } else {
+ if (it.opts.async == 'co*') {
+ out += 'co.wrap';
+ }
+ out += '(function* ';
+ }
+ } else {
+ out += ' (function ';
+ }
+ out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; var vErrors = null; ';
+ out += ' var errors = 0; ';
+ out += ' if (rootData === undefined) rootData = data;';
+ } else {
+ var $lvl = it.level,
+ $dataLvl = it.dataLevel,
+ $data = 'data' + ($dataLvl || '');
+ if (it.schema.id) it.baseId = it.resolve.url(it.baseId, it.schema.id);
+ if ($async && !it.async) throw new Error('async schema in sync schema');
+ out += ' var errs_' + ($lvl) + ' = errors;';
+ }
+ var $valid = 'valid' + $lvl,
+ $breakOnError = !it.opts.allErrors,
+ $closingBraces1 = '',
+ $closingBraces2 = '',
+ $errorKeyword;
+ var $typeSchema = it.schema.type,
+ $typeIsArray = Array.isArray($typeSchema);
+ if ($typeSchema && it.opts.coerceTypes) {
+ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);
+ if ($coerceToTypes) {
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type',
+ $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+ out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';
+ var $dataType = 'dataType' + $lvl,
+ $coerced = 'coerced' + $lvl;
+ out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; ';
+ if (it.opts.coerceTypes == 'array') {
+ out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; ';
+ }
+ out += ' var ' + ($coerced) + ' = undefined; ';
+ var $bracesCoercion = '';
+ var arr1 = $coerceToTypes;
+ if (arr1) {
+ var $type, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $type = arr1[$i += 1];
+ if ($i) {
+ out += ' if (' + ($coerced) + ' === undefined) { ';
+ $bracesCoercion += '}';
+ }
+ if (it.opts.coerceTypes == 'array' && $type != 'array') {
+ out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } ';
+ }
+ if ($type == 'string') {
+ out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; ';
+ } else if ($type == 'number' || $type == 'integer') {
+ out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';
+ if ($type == 'integer') {
+ out += ' && !(' + ($data) + ' % 1)';
+ }
+ out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';
+ } else if ($type == 'boolean') {
+ out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';
+ } else if ($type == 'null') {
+ out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';
+ } else if (it.opts.coerceTypes == 'array' && $type == 'array') {
+ out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; ';
+ }
+ }
+ }
+ out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ if ($dataLvl) {
+ var $parentData = 'data' + (($dataLvl - 1) || ''),
+ $dataProperty = it.dataPathArr[$dataLvl];
+ out += ' ' + ($data) + ' = ' + ($parentData) + '[' + ($dataProperty) + '] = ' + ($coerced) + '; ';
+ } else {
+ out += ' data = ' + ($coerced) + '; if (parentData !== undefined) parentData[parentDataProperty] = ' + ($coerced) + '; ';
+ }
+ out += ' } } ';
+ }
+ }
+ var $refKeywords;
+ if (it.schema.$ref && ($refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'))) {
+ if (it.opts.extendRefs == 'fail') {
+ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '"');
+ } else if (it.opts.extendRefs == 'ignore') {
+ $refKeywords = false;
+ console.log('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
+ } else if (it.opts.extendRefs !== true) {
+ console.log('$ref: all keywords used in schema at path "' + it.errSchemaPath + '". It will change in the next major version, see issue #260. Use option { extendRefs: true } to keep current behaviour');
+ }
+ }
+ if (it.schema.$ref && !$refKeywords) {
+ out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' ';
+ if ($breakOnError) {
+ out += ' } if (errors === ';
+ if ($top) {
+ out += '0';
+ } else {
+ out += 'errs_' + ($lvl);
+ }
+ out += ') { ';
+ $closingBraces2 += '}';
+ }
+ } else {
+ var arr2 = it.RULES;
+ if (arr2) {
+ var $rulesGroup, i2 = -1,
+ l2 = arr2.length - 1;
+ while (i2 < l2) {
+ $rulesGroup = arr2[i2 += 1];
+ if ($shouldUseGroup($rulesGroup)) {
+ if ($rulesGroup.type) {
+ out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { ';
+ }
+ if (it.opts.useDefaults && !it.compositeRule) {
+ if ($rulesGroup.type == 'object' && it.schema.properties) {
+ var $schema = it.schema.properties,
+ $schemaKeys = Object.keys($schema);
+ var arr3 = $schemaKeys;
+ if (arr3) {
+ var $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $sch = $schema[$propertyKey];
+ if ($sch.default !== undefined) {
+ var $passData = $data + it.util.getProperty($propertyKey);
+ out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';
+ if (it.opts.useDefaults == 'shared') {
+ out += ' ' + (it.useDefault($sch.default)) + ' ';
+ } else {
+ out += ' ' + (JSON.stringify($sch.default)) + ' ';
+ }
+ out += '; ';
+ }
+ }
+ }
+ } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {
+ var arr4 = it.schema.items;
+ if (arr4) {
+ var $sch, $i = -1,
+ l4 = arr4.length - 1;
+ while ($i < l4) {
+ $sch = arr4[$i += 1];
+ if ($sch.default !== undefined) {
+ var $passData = $data + '[' + $i + ']';
+ out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';
+ if (it.opts.useDefaults == 'shared') {
+ out += ' ' + (it.useDefault($sch.default)) + ' ';
+ } else {
+ out += ' ' + (JSON.stringify($sch.default)) + ' ';
+ }
+ out += '; ';
+ }
+ }
+ }
+ }
+ }
+ var arr5 = $rulesGroup.rules;
+ if (arr5) {
+ var $rule, i5 = -1,
+ l5 = arr5.length - 1;
+ while (i5 < l5) {
+ $rule = arr5[i5 += 1];
+ if ($shouldUseRule($rule)) {
+ out += ' ' + ($rule.code(it, $rule.keyword)) + ' ';
+ if ($breakOnError) {
+ $closingBraces1 += '}';
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces1) + ' ';
+ $closingBraces1 = '';
+ }
+ if ($rulesGroup.type) {
+ out += ' } ';
+ if ($typeSchema && $typeSchema === $rulesGroup.type) {
+ var $typeChecked = true;
+ out += ' else { ';
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' if (errors === ';
+ if ($top) {
+ out += '0';
+ } else {
+ out += 'errs_' + ($lvl);
+ }
+ out += ') { ';
+ $closingBraces2 += '}';
+ }
+ }
+ }
+ }
+ }
+ if ($typeSchema && !$typeChecked && !(it.opts.coerceTypes && $coerceToTypes)) {
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type',
+ $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+ out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' }';
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces2) + ' ';
+ }
+ if ($top) {
+ if ($async) {
+ out += ' if (errors === 0) return true; ';
+ out += ' else throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; ';
+ out += ' return errors === 0; ';
+ }
+ out += ' }); return validate;';
+ } else {
+ out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';';
+ }
+ out = it.util.cleanUpCode(out);
+ if ($top && $breakOnError) {
+ out = it.util.cleanUpVarErrors(out, $async);
+ }
+
+ function $shouldUseGroup($rulesGroup) {
+ for (var i = 0; i < $rulesGroup.rules.length; i++)
+ if ($shouldUseRule($rulesGroup.rules[i])) return true;
+ }
+
+ function $shouldUseRule($rule) {
+ return it.schema[$rule.keyword] !== undefined || ($rule.keyword == 'properties' && (it.schema.additionalProperties === false || typeof it.schema.additionalProperties == 'object' || (it.schema.patternProperties && Object.keys(it.schema.patternProperties).length) || (it.opts.v5 && it.schema.patternGroups && Object.keys(it.schema.patternGroups).length)));
+ }
+ return out;
+}
diff --git a/tools/eslint/node_modules/ajv/lib/keyword.js b/tools/eslint/node_modules/ajv/lib/keyword.js
new file mode 100644
index 0000000000..0b4d70a3a0
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/keyword.js
@@ -0,0 +1,82 @@
+'use strict';
+
+var IDENTIFIER = /^[a-z_$][a-z0-9_$]*$/i;
+var customRuleCode = require('./dotjs/custom');
+
+/**
+ * Define custom keyword
+ * @this Ajv
+ * @param {String} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords.
+ * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
+ */
+module.exports = function addKeyword(keyword, definition) {
+ /* eslint no-shadow: 0 */
+ var self = this;
+ if (this.RULES.keywords[keyword])
+ throw new Error('Keyword ' + keyword + ' is already defined');
+
+ if (!IDENTIFIER.test(keyword))
+ throw new Error('Keyword ' + keyword + ' is not a valid identifier');
+
+ if (definition) {
+ var dataType = definition.type;
+ if (Array.isArray(dataType)) {
+ var i, len = dataType.length;
+ for (i=0; i<len; i++) checkDataType(dataType[i]);
+ for (i=0; i<len; i++) _addRule(keyword, dataType[i], definition);
+ } else {
+ if (dataType) checkDataType(dataType);
+ _addRule(keyword, dataType, definition);
+ }
+
+ var $data = definition.$data === true && this._opts.v5;
+ if ($data && !definition.validate)
+ throw new Error('$data support: neither "validate" nor "compile" functions are defined');
+
+ var metaSchema = definition.metaSchema;
+ if (metaSchema) {
+ if ($data) {
+ metaSchema = {
+ anyOf: [
+ metaSchema,
+ { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#/definitions/$data' }
+ ]
+ };
+ }
+ definition.validateSchema = self.compile(metaSchema, true);
+ }
+ }
+
+ this.RULES.keywords[keyword] = this.RULES.all[keyword] = true;
+
+
+ function _addRule(keyword, dataType, definition) {
+ var ruleGroup;
+ for (var i=0; i<self.RULES.length; i++) {
+ var rg = self.RULES[i];
+ if (rg.type == dataType) {
+ ruleGroup = rg;
+ break;
+ }
+ }
+
+ if (!ruleGroup) {
+ ruleGroup = { type: dataType, rules: [] };
+ self.RULES.push(ruleGroup);
+ }
+
+ var rule = {
+ keyword: keyword,
+ definition: definition,
+ custom: true,
+ code: customRuleCode
+ };
+ ruleGroup.rules.push(rule);
+ self.RULES.custom[keyword] = rule;
+ }
+
+
+ function checkDataType(dataType) {
+ if (!self.RULES.types[dataType]) throw new Error('Unknown type ' + dataType);
+ }
+};
diff --git a/tools/eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json b/tools/eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json
new file mode 100644
index 0000000000..85eb502a68
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json
@@ -0,0 +1,150 @@
+{
+ "id": "http://json-schema.org/draft-04/schema#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "description": "Core schema meta-schema",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "#" }
+ },
+ "positiveInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "positiveIntegerDefault0": {
+ "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
+ },
+ "simpleTypes": {
+ "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": { "type": "string" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ },
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uri"
+ },
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": {},
+ "multipleOf": {
+ "type": "number",
+ "minimum": 0,
+ "exclusiveMinimum": true
+ },
+ "maximum": {
+ "type": "number"
+ },
+ "exclusiveMaximum": {
+ "type": "boolean",
+ "default": false
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "exclusiveMinimum": {
+ "type": "boolean",
+ "default": false
+ },
+ "maxLength": { "$ref": "#/definitions/positiveInteger" },
+ "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
+ "pattern": {
+ "type": "string",
+ "format": "regex"
+ },
+ "additionalItems": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" }
+ ],
+ "default": {}
+ },
+ "items": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/schemaArray" }
+ ],
+ "default": {}
+ },
+ "maxItems": { "$ref": "#/definitions/positiveInteger" },
+ "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
+ "uniqueItems": {
+ "type": "boolean",
+ "default": false
+ },
+ "maxProperties": { "$ref": "#/definitions/positiveInteger" },
+ "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
+ "required": { "$ref": "#/definitions/stringArray" },
+ "additionalProperties": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" }
+ ],
+ "default": {}
+ },
+ "definitions": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/stringArray" }
+ ]
+ }
+ },
+ "enum": {
+ "type": "array",
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "type": {
+ "anyOf": [
+ { "$ref": "#/definitions/simpleTypes" },
+ {
+ "type": "array",
+ "items": { "$ref": "#/definitions/simpleTypes" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "allOf": { "$ref": "#/definitions/schemaArray" },
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
+ "not": { "$ref": "#" }
+ },
+ "dependencies": {
+ "exclusiveMaximum": [ "maximum" ],
+ "exclusiveMinimum": [ "minimum" ]
+ },
+ "default": {}
+}
diff --git a/tools/eslint/node_modules/ajv/lib/refs/json-schema-v5.json b/tools/eslint/node_modules/ajv/lib/refs/json-schema-v5.json
new file mode 100644
index 0000000000..5964042bb0
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/refs/json-schema-v5.json
@@ -0,0 +1,328 @@
+{
+ "id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "description": "Core schema meta-schema (v5 proposals)",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "#" }
+ },
+ "positiveInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "positiveIntegerDefault0": {
+ "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
+ },
+ "simpleTypes": {
+ "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": { "type": "string" },
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "$data": {
+ "type": "object",
+ "required": [ "$data" ],
+ "properties": {
+ "$data": {
+ "type": "string",
+ "anyOf": [
+ { "format": "relative-json-pointer" },
+ { "format": "json-pointer" }
+ ]
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uri"
+ },
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": {},
+ "multipleOf": {
+ "anyOf": [
+ {
+ "type": "number",
+ "minimum": 0,
+ "exclusiveMinimum": true
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "maximum": {
+ "anyOf": [
+ { "type": "number" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "exclusiveMaximum": {
+ "anyOf": [
+ {
+ "type": "boolean",
+ "default": false
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "minimum": {
+ "anyOf": [
+ { "type": "number" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "exclusiveMinimum": {
+ "anyOf": [
+ {
+ "type": "boolean",
+ "default": false
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "maxLength": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveInteger" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "minLength": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveIntegerDefault0" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "pattern": {
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "regex"
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "additionalItems": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" },
+ { "$ref": "#/definitions/$data" }
+ ],
+ "default": {}
+ },
+ "items": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/schemaArray" }
+ ],
+ "default": {}
+ },
+ "maxItems": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveInteger" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "minItems": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveIntegerDefault0" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "uniqueItems": {
+ "anyOf": [
+ {
+ "type": "boolean",
+ "default": false
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "maxProperties": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveInteger" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "minProperties": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveIntegerDefault0" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "required": {
+ "anyOf": [
+ { "$ref": "#/definitions/stringArray" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "additionalProperties": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" },
+ { "$ref": "#/definitions/$data" }
+ ],
+ "default": {}
+ },
+ "definitions": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/stringArray" }
+ ]
+ }
+ },
+ "enum": {
+ "anyOf": [
+ {
+ "type": "array",
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "type": {
+ "anyOf": [
+ { "$ref": "#/definitions/simpleTypes" },
+ {
+ "type": "array",
+ "items": { "$ref": "#/definitions/simpleTypes" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "allOf": { "$ref": "#/definitions/schemaArray" },
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
+ "not": { "$ref": "#" },
+ "format": {
+ "anyOf": [
+ { "type": "string" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "formatMaximum": {
+ "anyOf": [
+ { "type": "string" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "formatMinimum": {
+ "anyOf": [
+ { "type": "string" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "formatExclusiveMaximum": {
+ "anyOf": [
+ {
+ "type": "boolean",
+ "default": false
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "formatExclusiveMinimum": {
+ "anyOf": [
+ {
+ "type": "boolean",
+ "default": false
+ },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "constant": {
+ "anyOf": [
+ {},
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "contains": { "$ref": "#" },
+ "patternGroups": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "required": [ "schema" ],
+ "properties": {
+ "maximum": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveInteger" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "minimum": {
+ "anyOf": [
+ { "$ref": "#/definitions/positiveIntegerDefault0" },
+ { "$ref": "#/definitions/$data" }
+ ]
+ },
+ "schema": { "$ref": "#" }
+ },
+ "additionalProperties": false
+ },
+ "default": {}
+ },
+ "switch": {
+ "type": "array",
+ "items": {
+ "required": [ "then" ],
+ "properties": {
+ "if": { "$ref": "#" },
+ "then": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" }
+ ]
+ },
+ "continue": { "type": "boolean" }
+ },
+ "additionalProperties": false,
+ "dependencies": {
+ "continue": [ "if" ]
+ }
+ }
+ }
+ },
+ "dependencies": {
+ "exclusiveMaximum": [ "maximum" ],
+ "exclusiveMinimum": [ "minimum" ],
+ "formatMaximum": [ "format" ],
+ "formatMinimum": [ "format" ],
+ "formatExclusiveMaximum": [ "formatMaximum" ],
+ "formatExclusiveMinimum": [ "formatMinimum" ]
+ },
+ "default": {}
+}
diff --git a/tools/eslint/node_modules/ajv/lib/v5.js b/tools/eslint/node_modules/ajv/lib/v5.js
new file mode 100644
index 0000000000..8f6e53f0f1
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/lib/v5.js
@@ -0,0 +1,52 @@
+'use strict';
+
+var META_SCHEMA_ID = 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json';
+
+module.exports = {
+ enable: enableV5,
+ META_SCHEMA_ID: META_SCHEMA_ID
+};
+
+
+function enableV5(ajv) {
+ var inlineFunctions = {
+ 'switch': require('./dotjs/switch'),
+ 'constant': require('./dotjs/constant'),
+ '_formatLimit': require('./dotjs/_formatLimit'),
+ 'patternRequired': require('./dotjs/patternRequired')
+ };
+
+ if (ajv._opts.meta !== false) {
+ var metaSchema = require('./refs/json-schema-v5.json');
+ ajv.addMetaSchema(metaSchema, META_SCHEMA_ID);
+ }
+ _addKeyword('constant');
+ ajv.addKeyword('contains', { type: 'array', macro: containsMacro });
+
+ _addKeyword('formatMaximum', 'string', inlineFunctions._formatLimit);
+ _addKeyword('formatMinimum', 'string', inlineFunctions._formatLimit);
+ ajv.addKeyword('formatExclusiveMaximum');
+ ajv.addKeyword('formatExclusiveMinimum');
+
+ ajv.addKeyword('patternGroups'); // implemented in properties.jst
+ _addKeyword('patternRequired', 'object');
+ _addKeyword('switch');
+
+
+ function _addKeyword(keyword, types, inlineFunc) {
+ var definition = {
+ inline: inlineFunc || inlineFunctions[keyword],
+ statements: true,
+ errors: 'full'
+ };
+ if (types) definition.type = types;
+ ajv.addKeyword(keyword, definition);
+ }
+}
+
+
+function containsMacro(schema) {
+ return {
+ not: { items: { not: schema } }
+ };
+}
diff --git a/tools/eslint/node_modules/ajv/package.json b/tools/eslint/node_modules/ajv/package.json
new file mode 100644
index 0000000000..ae31768640
--- /dev/null
+++ b/tools/eslint/node_modules/ajv/package.json
@@ -0,0 +1,164 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "ajv@^4.7.0",
+ "scope": null,
+ "escapedName": "ajv",
+ "name": "ajv",
+ "rawSpec": "^4.7.0",
+ "spec": ">=4.7.0 <5.0.0",
+ "type": "range"
+ },
+ "/Users/trott/io.js/tools/node_modules/table"
+ ]
+ ],
+ "_from": "ajv@>=4.7.0 <5.0.0",
+ "_id": "ajv@4.7.7",
+ "_inCache": true,
+ "_location": "/ajv",
+ "_nodeVersion": "4.4.4",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/ajv-4.7.7.tgz_1475693184318_0.560827705077827"
+ },
+ "_npmUser": {
+ "name": "esp",
+ "email": "e.poberezkin@me.com"
+ },
+ "_npmVersion": "2.15.1",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "ajv@^4.7.0",
+ "scope": null,
+ "escapedName": "ajv",
+ "name": "ajv",
+ "rawSpec": "^4.7.0",
+ "spec": ">=4.7.0 <5.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/table"
+ ],
+ "_resolved": "https://registry.npmjs.org/ajv/-/ajv-4.7.7.tgz",
+ "_shasum": "4980d5f65ce90a2579532eec66429f320dea0321",
+ "_shrinkwrap": null,
+ "_spec": "ajv@^4.7.0",
+ "_where": "/Users/trott/io.js/tools/node_modules/table",
+ "author": {
+ "name": "Evgeny Poberezkin"
+ },
+ "bugs": {
+ "url": "https://github.com/epoberezkin/ajv/issues"
+ },
+ "dependencies": {
+ "co": "^4.6.0",
+ "json-stable-stringify": "^1.0.1"
+ },
+ "description": "Another JSON Schema Validator",
+ "devDependencies": {
+ "bluebird": "^3.1.5",
+ "brfs": "^1.4.3",
+ "browserify": "^13.0.0",
+ "chai": "^3.5.0",
+ "coveralls": "^2.11.4",
+ "dot": "^1.0.3",
+ "eslint": "^3.2.2",
+ "gh-pages-generator": "^0.2.0",
+ "glob": "^7.0.0",
+ "if-node-version": "^1.0.0",
+ "js-beautify": "^1.5.6",
+ "jshint": "^2.8.0",
+ "json-schema-test": "^1.1.1",
+ "karma": "^1.0.0",
+ "karma-chrome-launcher": "^2.0.0",
+ "karma-mocha": "^1.1.1",
+ "karma-phantomjs-launcher": "^1.0.0",
+ "karma-sauce-launcher": "^0.3.0",
+ "mocha": "^3.0.0",
+ "nodent": "^2.5.3",
+ "nyc": "^8.3.0",
+ "phantomjs-prebuilt": "^2.1.4",
+ "pre-commit": "^1.1.1",
+ "regenerator": "0.8.42",
+ "require-globify": "^1.3.0",
+ "typescript": "^2.0.3",
+ "uglify-js": "^2.6.1",
+ "watch": "^0.19.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "4980d5f65ce90a2579532eec66429f320dea0321",
+ "tarball": "https://registry.npmjs.org/ajv/-/ajv-4.7.7.tgz"
+ },
+ "files": [
+ "lib/",
+ "dist/",
+ "LICENSE",
+ ".tonic_example.js"
+ ],
+ "gitHead": "40319b9e228a20b7d9a9577ce76affe5ca6fc7d8",
+ "homepage": "https://github.com/epoberezkin/ajv",
+ "keywords": [
+ "JSON",
+ "schema",
+ "validator",
+ "validation",
+ "jsonschema",
+ "json-schema",
+ "json-schema-validator",
+ "json-schema-validation"
+ ],
+ "license": "MIT",
+ "main": "lib/ajv.js",
+ "maintainers": [
+ {
+ "name": "blakeembrey",
+ "email": "hello@blakeembrey.com"
+ },
+ {
+ "name": "esp",
+ "email": "e.poberezkin@me.com"
+ }
+ ],
+ "name": "ajv",
+ "nyc": {
+ "exclude": [
+ "**/spec/**",
+ "node_modules"
+ ],
+ "reporter": [
+ "lcov",
+ "text-summary"
+ ]
+ },
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/epoberezkin/ajv.git"
+ },
+ "scripts": {
+ "build": "node scripts/compile-dots.js",
+ "bundle": "./scripts/bundle . Ajv pure_getters",
+ "bundle-all": "npm run bundle && npm run bundle-regenerator && npm run bundle-nodent",
+ "bundle-beautify": "./scripts/bundle js-beautify",
+ "bundle-nodent": "./scripts/bundle nodent",
+ "bundle-regenerator": "./scripts/bundle regenerator",
+ "eslint": "if-node-version '>=4' eslint lib/*.js lib/compile/*.js spec",
+ "jshint": "jshint lib/*.js lib/**/*.js --exclude lib/dotjs/**/*",
+ "prepublish": "npm run build && npm run bundle-all",
+ "test": "npm run jshint && npm run eslint && npm run test-ts && npm run build && npm run test-cov && npm run test-browser",
+ "test-browser": "npm run bundle-all && scripts/prepare-tests && karma start --single-run --browsers PhantomJS",
+ "test-cov": "nyc npm run test-spec",
+ "test-debug": "mocha spec/*.spec.js --debug-brk -R spec",
+ "test-fast": "AJV_FAST_TEST=true npm run test-spec",
+ "test-spec": "mocha spec/*.spec.js -R spec",
+ "test-ts": "tsc --target ES5 --noImplicitAny lib/ajv.d.ts",
+ "watch": "watch 'npm run build' ./lib/dot"
+ },
+ "tonicExampleFilename": ".tonic_example.js",
+ "typings": "lib/ajv.d.ts",
+ "version": "4.7.7",
+ "webpack": "dist/ajv.bundle.js"
+}
diff --git a/tools/eslint/node_modules/ansi-escapes/package.json b/tools/eslint/node_modules/ansi-escapes/package.json
index a3b3fc5065..41964454fc 100644
--- a/tools/eslint/node_modules/ansi-escapes/package.json
+++ b/tools/eslint/node_modules/ansi-escapes/package.json
@@ -16,7 +16,6 @@
"_from": "ansi-escapes@>=1.1.0 <2.0.0",
"_id": "ansi-escapes@1.4.0",
"_inCache": true,
- "_installable": true,
"_location": "/ansi-escapes",
"_nodeVersion": "4.4.2",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/ansi-regex/package.json b/tools/eslint/node_modules/ansi-regex/package.json
index fc7f81510e..4b6c93b69c 100644
--- a/tools/eslint/node_modules/ansi-regex/package.json
+++ b/tools/eslint/node_modules/ansi-regex/package.json
@@ -16,7 +16,6 @@
"_from": "ansi-regex@>=2.0.0 <3.0.0",
"_id": "ansi-regex@2.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/ansi-regex",
"_nodeVersion": "0.12.5",
"_npmUser": {
diff --git a/tools/eslint/node_modules/ansi-styles/package.json b/tools/eslint/node_modules/ansi-styles/package.json
index 485c4f6706..eedae9a3f9 100644
--- a/tools/eslint/node_modules/ansi-styles/package.json
+++ b/tools/eslint/node_modules/ansi-styles/package.json
@@ -16,7 +16,6 @@
"_from": "ansi-styles@>=2.2.1 <3.0.0",
"_id": "ansi-styles@2.2.1",
"_inCache": true,
- "_installable": true,
"_location": "/ansi-styles",
"_nodeVersion": "4.3.0",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/argparse/lib/action_container.js b/tools/eslint/node_modules/argparse/lib/action_container.js
index 86aa017ae6..6f1237bea2 100644
--- a/tools/eslint/node_modules/argparse/lib/action_container.js
+++ b/tools/eslint/node_modules/argparse/lib/action_container.js
@@ -323,8 +323,8 @@ ActionContainer.prototype._addContainerActions = function (container) {
var mutexGroup;
container._mutuallyExclusiveGroups.forEach(function (group) {
mutexGroup = this.addMutuallyExclusiveGroup({
- required: group.required
- });
+ required: group.required
+ });
// map the actions to their new mutex group
group._groupActions.forEach(function (action) {
groupMap[actionHash(action)] = mutexGroup;
diff --git a/tools/eslint/node_modules/argparse/lib/argument_parser.js b/tools/eslint/node_modules/argparse/lib/argument_parser.js
index eca1ad685e..bd9a59a453 100644
--- a/tools/eslint/node_modules/argparse/lib/argument_parser.js
+++ b/tools/eslint/node_modules/argparse/lib/argument_parser.js
@@ -649,19 +649,19 @@ ArgumentParser.prototype._matchArgument = function (action, regexpArgStrings) {
// throw an exception if we weren't able to find a match
if (!matches) {
switch (action.nargs) {
- /*eslint-disable no-undefined*/
- case undefined:
- case null:
- message = 'Expected one argument.';
- break;
- case c.OPTIONAL:
- message = 'Expected at most one argument.';
- break;
- case c.ONE_OR_MORE:
- message = 'Expected at least one argument.';
- break;
- default:
- message = 'Expected %s argument(s)';
+ /*eslint-disable no-undefined*/
+ case undefined:
+ case null:
+ message = 'Expected one argument.';
+ break;
+ case c.OPTIONAL:
+ message = 'Expected at most one argument.';
+ break;
+ case c.ONE_OR_MORE:
+ message = 'Expected at least one argument.';
+ break;
+ default:
+ message = 'Expected %s argument(s)';
}
throw argumentErrorHelper(
@@ -840,34 +840,34 @@ ArgumentParser.prototype._getNargsPattern = function (action) {
var regexpNargs;
switch (action.nargs) {
- // the default (null) is assumed to be a single argument
- case undefined:
- case null:
- regexpNargs = '(-*A-*)';
- break;
- // allow zero or more arguments
- case c.OPTIONAL:
- regexpNargs = '(-*A?-*)';
- break;
- // allow zero or more arguments
- case c.ZERO_OR_MORE:
- regexpNargs = '(-*[A-]*)';
- break;
- // allow one or more arguments
- case c.ONE_OR_MORE:
- regexpNargs = '(-*A[A-]*)';
- break;
- // allow any number of options or arguments
- case c.REMAINDER:
- regexpNargs = '([-AO]*)';
- break;
- // allow one argument followed by any number of options or arguments
- case c.PARSER:
- regexpNargs = '(-*A[-AO]*)';
- break;
- // all others should be integers
- default:
- regexpNargs = '(-*' + $$.repeat('-*A', action.nargs) + '-*)';
+ // the default (null) is assumed to be a single argument
+ case undefined:
+ case null:
+ regexpNargs = '(-*A-*)';
+ break;
+ // allow zero or more arguments
+ case c.OPTIONAL:
+ regexpNargs = '(-*A?-*)';
+ break;
+ // allow zero or more arguments
+ case c.ZERO_OR_MORE:
+ regexpNargs = '(-*[A-]*)';
+ break;
+ // allow one or more arguments
+ case c.ONE_OR_MORE:
+ regexpNargs = '(-*A[A-]*)';
+ break;
+ // allow any number of options or arguments
+ case c.REMAINDER:
+ regexpNargs = '([-AO]*)';
+ break;
+ // allow one argument followed by any number of options or arguments
+ case c.PARSER:
+ regexpNargs = '(-*A[-AO]*)';
+ break;
+ // all others should be integers
+ default:
+ regexpNargs = '(-*' + $$.repeat('-*A', action.nargs) + '-*)';
}
// if this is an optional action, -- is not allowed
diff --git a/tools/eslint/node_modules/argparse/lib/help/added_formatters.js b/tools/eslint/node_modules/argparse/lib/help/added_formatters.js
index f0fbe5da85..f8e42998e9 100644
--- a/tools/eslint/node_modules/argparse/lib/help/added_formatters.js
+++ b/tools/eslint/node_modules/argparse/lib/help/added_formatters.js
@@ -58,8 +58,8 @@ util.inherits(RawDescriptionHelpFormatter, HelpFormatter);
RawDescriptionHelpFormatter.prototype._fillText = function (text, width, indent) {
var lines = text.split('\n');
lines = lines.map(function (line) {
- return $$.trimEnd(indent + line);
- });
+ return $$.trimEnd(indent + line);
+ });
return lines.join('\n');
};
module.exports.RawDescriptionHelpFormatter = RawDescriptionHelpFormatter;
diff --git a/tools/eslint/node_modules/argparse/lib/help/formatter.js b/tools/eslint/node_modules/argparse/lib/help/formatter.js
index 61c4f41344..a8e4148910 100644
--- a/tools/eslint/node_modules/argparse/lib/help/formatter.js
+++ b/tools/eslint/node_modules/argparse/lib/help/formatter.js
@@ -688,34 +688,34 @@ HelpFormatter.prototype._formatArgs = function (action, metavarDefault) {
var buildMetavar = this._metavarFormatter(action, metavarDefault);
switch (action.nargs) {
- /*eslint-disable no-undefined*/
- case undefined:
- case null:
- metavars = buildMetavar(1);
- result = '' + metavars[0];
- break;
- case c.OPTIONAL:
- metavars = buildMetavar(1);
- result = '[' + metavars[0] + ']';
- break;
- case c.ZERO_OR_MORE:
- metavars = buildMetavar(2);
- result = '[' + metavars[0] + ' [' + metavars[1] + ' ...]]';
- break;
- case c.ONE_OR_MORE:
- metavars = buildMetavar(2);
- result = '' + metavars[0] + ' [' + metavars[1] + ' ...]';
- break;
- case c.REMAINDER:
- result = '...';
- break;
- case c.PARSER:
- metavars = buildMetavar(1);
- result = metavars[0] + ' ...';
- break;
- default:
- metavars = buildMetavar(action.nargs);
- result = metavars.join(' ');
+ /*eslint-disable no-undefined*/
+ case undefined:
+ case null:
+ metavars = buildMetavar(1);
+ result = '' + metavars[0];
+ break;
+ case c.OPTIONAL:
+ metavars = buildMetavar(1);
+ result = '[' + metavars[0] + ']';
+ break;
+ case c.ZERO_OR_MORE:
+ metavars = buildMetavar(2);
+ result = '[' + metavars[0] + ' [' + metavars[1] + ' ...]]';
+ break;
+ case c.ONE_OR_MORE:
+ metavars = buildMetavar(2);
+ result = '' + metavars[0] + ' [' + metavars[1] + ' ...]';
+ break;
+ case c.REMAINDER:
+ result = '...';
+ break;
+ case c.PARSER:
+ metavars = buildMetavar(1);
+ result = metavars[0] + ' ...';
+ break;
+ default:
+ metavars = buildMetavar(action.nargs);
+ result = metavars.join(' ');
}
return result;
};
diff --git a/tools/eslint/node_modules/argparse/package.json b/tools/eslint/node_modules/argparse/package.json
index 86244a6123..b3229177ec 100644
--- a/tools/eslint/node_modules/argparse/package.json
+++ b/tools/eslint/node_modules/argparse/package.json
@@ -14,20 +14,19 @@
]
],
"_from": "argparse@>=1.0.7 <2.0.0",
- "_id": "argparse@1.0.7",
+ "_id": "argparse@1.0.9",
"_inCache": true,
- "_installable": true,
"_location": "/argparse",
- "_nodeVersion": "4.3.0",
+ "_nodeVersion": "6.5.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/argparse-1.0.7.tgz_1458226887302_0.8524546672124416"
+ "tmp": "tmp/argparse-1.0.9.tgz_1475177461025_0.33920647646300495"
},
"_npmUser": {
"name": "vitaly",
"email": "vitaly@rcdesign.ru"
},
- "_npmVersion": "2.14.12",
+ "_npmVersion": "3.10.3",
"_phantomChildren": {},
"_requested": {
"raw": "argparse@^1.0.7",
@@ -41,8 +40,8 @@
"_requiredBy": [
"/js-yaml"
],
- "_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.7.tgz",
- "_shasum": "c289506480557810f14a8bc62d7a06f63ed7f951",
+ "_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz",
+ "_shasum": "73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86",
"_shrinkwrap": null,
"_spec": "argparse@^1.0.7",
"_where": "/Users/trott/io.js/tools/node_modules/js-yaml",
@@ -62,22 +61,22 @@
},
"description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library",
"devDependencies": {
- "eslint": "2.0.0-rc.0",
- "eslint-plugin-nodeca": "~1.0.3",
- "mocha": "*",
- "ndoc": "^3.1.0"
+ "eslint": "^2.13.1",
+ "istanbul": "^0.4.5",
+ "mocha": "^3.1.0",
+ "ndoc": "^5.0.1"
},
"directories": {},
"dist": {
- "shasum": "c289506480557810f14a8bc62d7a06f63ed7f951",
- "tarball": "https://registry.npmjs.org/argparse/-/argparse-1.0.7.tgz"
+ "shasum": "73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86",
+ "tarball": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz"
},
"files": [
"index.js",
"lib/"
],
- "gitHead": "2d243d3062affb01f49f5f00e8ca8464a15e9374",
- "homepage": "https://github.com/nodeca/argparse",
+ "gitHead": "acb39f2d726b90d2eadf9e6574a938d6250ad248",
+ "homepage": "https://github.com/nodeca/argparse#readme",
"keywords": [
"cli",
"parser",
@@ -102,5 +101,5 @@
"scripts": {
"test": "make test"
},
- "version": "1.0.7"
+ "version": "1.0.9"
}
diff --git a/tools/eslint/node_modules/array-union/package.json b/tools/eslint/node_modules/array-union/package.json
index ecb557b5f5..958a286bd1 100644
--- a/tools/eslint/node_modules/array-union/package.json
+++ b/tools/eslint/node_modules/array-union/package.json
@@ -16,7 +16,6 @@
"_from": "array-union@>=1.0.1 <2.0.0",
"_id": "array-union@1.0.2",
"_inCache": true,
- "_installable": true,
"_location": "/array-union",
"_nodeVersion": "4.4.2",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/array-uniq/package.json b/tools/eslint/node_modules/array-uniq/package.json
index f270f73827..11973aff65 100644
--- a/tools/eslint/node_modules/array-uniq/package.json
+++ b/tools/eslint/node_modules/array-uniq/package.json
@@ -16,7 +16,6 @@
"_from": "array-uniq@>=1.0.1 <2.0.0",
"_id": "array-uniq@1.0.3",
"_inCache": true,
- "_installable": true,
"_location": "/array-uniq",
"_nodeVersion": "4.4.2",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/arrify/package.json b/tools/eslint/node_modules/arrify/package.json
index e25e31f7cb..d2a65c133d 100644
--- a/tools/eslint/node_modules/arrify/package.json
+++ b/tools/eslint/node_modules/arrify/package.json
@@ -16,7 +16,6 @@
"_from": "arrify@>=1.0.0 <2.0.0",
"_id": "arrify@1.0.1",
"_inCache": true,
- "_installable": true,
"_location": "/arrify",
"_nodeVersion": "4.2.1",
"_npmUser": {
diff --git a/tools/eslint/node_modules/balanced-match/package.json b/tools/eslint/node_modules/balanced-match/package.json
index 1e15de116f..47fd23aa34 100644
--- a/tools/eslint/node_modules/balanced-match/package.json
+++ b/tools/eslint/node_modules/balanced-match/package.json
@@ -16,7 +16,6 @@
"_from": "balanced-match@>=0.4.1 <0.5.0",
"_id": "balanced-match@0.4.2",
"_inCache": true,
- "_installable": true,
"_location": "/balanced-match",
"_nodeVersion": "4.4.7",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/bluebird/README.md b/tools/eslint/node_modules/bluebird/README.md
deleted file mode 100644
index 3772161e7d..0000000000
--- a/tools/eslint/node_modules/bluebird/README.md
+++ /dev/null
@@ -1,51 +0,0 @@
-<a href="http://promisesaplus.com/">
- <img src="http://promisesaplus.com/assets/logo-small.png" alt="Promises/A+ logo"
- title="Promises/A+ 1.1 compliant" align="right" />
-</a>
-[![Build Status](https://travis-ci.org/petkaantonov/bluebird.svg?branch=master)](https://travis-ci.org/petkaantonov/bluebird)
-[![coverage-98%](http://img.shields.io/badge/coverage-98%-brightgreen.svg?style=flat)](http://petkaantonov.github.io/bluebird/coverage/debug/index.html)
-
-**Got a question?** Join us on [stackoverflow](http://stackoverflow.com/questions/tagged/bluebird), the [mailing list](https://groups.google.com/forum/#!forum/bluebird-js) or chat on [IRC](https://webchat.freenode.net/?channels=#promises)
-
-# Introduction
-
-Bluebird is a fully featured promise library with focus on innovative features and performance
-
-See the [**bluebird website**](http://bluebirdjs.com/docs/getting-started.html) for further documentation, references and instructions. See the [**API reference**](http://bluebirdjs.com/docs/api-reference.html) here.
-
-For bluebird 2.x documentation and files, see the [2.x tree](https://github.com/petkaantonov/bluebird/tree/2.x).
-
-# Questions and issues
-
-The [github issue tracker](https://github.com/petkaantonov/bluebird/issues) is **_only_** for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`.
-
-
-
-## Thanks
-
-Thanks to BrowserStack for providing us with a free account which lets us support old browsers like IE8.
-
-# License
-
-The MIT License (MIT)
-
-Copyright (c) 2013-2016 Petka Antonov
-
-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/eslint/node_modules/bluebird/changelog.md b/tools/eslint/node_modules/bluebird/changelog.md
deleted file mode 100644
index 73b2eb6c79..0000000000
--- a/tools/eslint/node_modules/bluebird/changelog.md
+++ /dev/null
@@ -1 +0,0 @@
-[http://bluebirdjs.com/docs/changelog.html](http://bluebirdjs.com/docs/changelog.html)
diff --git a/tools/eslint/node_modules/bluebird/js/browser/bluebird.core.js b/tools/eslint/node_modules/bluebird/js/browser/bluebird.core.js
deleted file mode 100644
index b63d53a7c9..0000000000
--- a/tools/eslint/node_modules/bluebird/js/browser/bluebird.core.js
+++ /dev/null
@@ -1,3756 +0,0 @@
-/* @preserve
- * The MIT License (MIT)
- *
- * Copyright (c) 2013-2015 Petka Antonov
- *
- * 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.
- *
- */
-/**
- * bluebird build version 3.4.6
- * Features enabled: core
- * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
-*/
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
-"use strict";
-var firstLineError;
-try {throw new Error(); } catch (e) {firstLineError = e;}
-var schedule = _dereq_("./schedule");
-var Queue = _dereq_("./queue");
-var util = _dereq_("./util");
-
-function Async() {
- this._customScheduler = false;
- this._isTickUsed = false;
- this._lateQueue = new Queue(16);
- this._normalQueue = new Queue(16);
- this._haveDrainedQueues = false;
- this._trampolineEnabled = true;
- var self = this;
- this.drainQueues = function () {
- self._drainQueues();
- };
- this._schedule = schedule;
-}
-
-Async.prototype.setScheduler = function(fn) {
- var prev = this._schedule;
- this._schedule = fn;
- this._customScheduler = true;
- return prev;
-};
-
-Async.prototype.hasCustomScheduler = function() {
- return this._customScheduler;
-};
-
-Async.prototype.enableTrampoline = function() {
- this._trampolineEnabled = true;
-};
-
-Async.prototype.disableTrampolineIfNecessary = function() {
- if (util.hasDevTools) {
- this._trampolineEnabled = false;
- }
-};
-
-Async.prototype.haveItemsQueued = function () {
- return this._isTickUsed || this._haveDrainedQueues;
-};
-
-
-Async.prototype.fatalError = function(e, isNode) {
- if (isNode) {
- process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) +
- "\n");
- process.exit(2);
- } else {
- this.throwLater(e);
- }
-};
-
-Async.prototype.throwLater = function(fn, arg) {
- if (arguments.length === 1) {
- arg = fn;
- fn = function () { throw arg; };
- }
- if (typeof setTimeout !== "undefined") {
- setTimeout(function() {
- fn(arg);
- }, 0);
- } else try {
- this._schedule(function() {
- fn(arg);
- });
- } catch (e) {
- throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
-};
-
-function AsyncInvokeLater(fn, receiver, arg) {
- this._lateQueue.push(fn, receiver, arg);
- this._queueTick();
-}
-
-function AsyncInvoke(fn, receiver, arg) {
- this._normalQueue.push(fn, receiver, arg);
- this._queueTick();
-}
-
-function AsyncSettlePromises(promise) {
- this._normalQueue._pushOne(promise);
- this._queueTick();
-}
-
-if (!util.hasDevTools) {
- Async.prototype.invokeLater = AsyncInvokeLater;
- Async.prototype.invoke = AsyncInvoke;
- Async.prototype.settlePromises = AsyncSettlePromises;
-} else {
- Async.prototype.invokeLater = function (fn, receiver, arg) {
- if (this._trampolineEnabled) {
- AsyncInvokeLater.call(this, fn, receiver, arg);
- } else {
- this._schedule(function() {
- setTimeout(function() {
- fn.call(receiver, arg);
- }, 100);
- });
- }
- };
-
- Async.prototype.invoke = function (fn, receiver, arg) {
- if (this._trampolineEnabled) {
- AsyncInvoke.call(this, fn, receiver, arg);
- } else {
- this._schedule(function() {
- fn.call(receiver, arg);
- });
- }
- };
-
- Async.prototype.settlePromises = function(promise) {
- if (this._trampolineEnabled) {
- AsyncSettlePromises.call(this, promise);
- } else {
- this._schedule(function() {
- promise._settlePromises();
- });
- }
- };
-}
-
-Async.prototype.invokeFirst = function (fn, receiver, arg) {
- this._normalQueue.unshift(fn, receiver, arg);
- this._queueTick();
-};
-
-Async.prototype._drainQueue = function(queue) {
- while (queue.length() > 0) {
- var fn = queue.shift();
- if (typeof fn !== "function") {
- fn._settlePromises();
- continue;
- }
- var receiver = queue.shift();
- var arg = queue.shift();
- fn.call(receiver, arg);
- }
-};
-
-Async.prototype._drainQueues = function () {
- this._drainQueue(this._normalQueue);
- this._reset();
- this._haveDrainedQueues = true;
- this._drainQueue(this._lateQueue);
-};
-
-Async.prototype._queueTick = function () {
- if (!this._isTickUsed) {
- this._isTickUsed = true;
- this._schedule(this.drainQueues);
- }
-};
-
-Async.prototype._reset = function () {
- this._isTickUsed = false;
-};
-
-module.exports = Async;
-module.exports.firstLineError = firstLineError;
-
-},{"./queue":17,"./schedule":18,"./util":21}],2:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) {
-var calledBind = false;
-var rejectThis = function(_, e) {
- this._reject(e);
-};
-
-var targetRejected = function(e, context) {
- context.promiseRejectionQueued = true;
- context.bindingPromise._then(rejectThis, rejectThis, null, this, e);
-};
-
-var bindingResolved = function(thisArg, context) {
- if (((this._bitField & 50397184) === 0)) {
- this._resolveCallback(context.target);
- }
-};
-
-var bindingRejected = function(e, context) {
- if (!context.promiseRejectionQueued) this._reject(e);
-};
-
-Promise.prototype.bind = function (thisArg) {
- if (!calledBind) {
- calledBind = true;
- Promise.prototype._propagateFrom = debug.propagateFromFunction();
- Promise.prototype._boundValue = debug.boundValueFunction();
- }
- var maybePromise = tryConvertToPromise(thisArg);
- var ret = new Promise(INTERNAL);
- ret._propagateFrom(this, 1);
- var target = this._target();
- ret._setBoundTo(maybePromise);
- if (maybePromise instanceof Promise) {
- var context = {
- promiseRejectionQueued: false,
- promise: ret,
- target: target,
- bindingPromise: maybePromise
- };
- target._then(INTERNAL, targetRejected, undefined, ret, context);
- maybePromise._then(
- bindingResolved, bindingRejected, undefined, ret, context);
- ret._setOnCancel(maybePromise);
- } else {
- ret._resolveCallback(target);
- }
- return ret;
-};
-
-Promise.prototype._setBoundTo = function (obj) {
- if (obj !== undefined) {
- this._bitField = this._bitField | 2097152;
- this._boundTo = obj;
- } else {
- this._bitField = this._bitField & (~2097152);
- }
-};
-
-Promise.prototype._isBound = function () {
- return (this._bitField & 2097152) === 2097152;
-};
-
-Promise.bind = function (thisArg, value) {
- return Promise.resolve(value).bind(thisArg);
-};
-};
-
-},{}],3:[function(_dereq_,module,exports){
-"use strict";
-var old;
-if (typeof Promise !== "undefined") old = Promise;
-function noConflict() {
- try { if (Promise === bluebird) Promise = old; }
- catch (e) {}
- return bluebird;
-}
-var bluebird = _dereq_("./promise")();
-bluebird.noConflict = noConflict;
-module.exports = bluebird;
-
-},{"./promise":15}],4:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, PromiseArray, apiRejection, debug) {
-var util = _dereq_("./util");
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-var async = Promise._async;
-
-Promise.prototype["break"] = Promise.prototype.cancel = function() {
- if (!debug.cancellation()) return this._warn("cancellation is disabled");
-
- var promise = this;
- var child = promise;
- while (promise._isCancellable()) {
- if (!promise._cancelBy(child)) {
- if (child._isFollowing()) {
- child._followee().cancel();
- } else {
- child._cancelBranched();
- }
- break;
- }
-
- var parent = promise._cancellationParent;
- if (parent == null || !parent._isCancellable()) {
- if (promise._isFollowing()) {
- promise._followee().cancel();
- } else {
- promise._cancelBranched();
- }
- break;
- } else {
- if (promise._isFollowing()) promise._followee().cancel();
- promise._setWillBeCancelled();
- child = promise;
- promise = parent;
- }
- }
-};
-
-Promise.prototype._branchHasCancelled = function() {
- this._branchesRemainingToCancel--;
-};
-
-Promise.prototype._enoughBranchesHaveCancelled = function() {
- return this._branchesRemainingToCancel === undefined ||
- this._branchesRemainingToCancel <= 0;
-};
-
-Promise.prototype._cancelBy = function(canceller) {
- if (canceller === this) {
- this._branchesRemainingToCancel = 0;
- this._invokeOnCancel();
- return true;
- } else {
- this._branchHasCancelled();
- if (this._enoughBranchesHaveCancelled()) {
- this._invokeOnCancel();
- return true;
- }
- }
- return false;
-};
-
-Promise.prototype._cancelBranched = function() {
- if (this._enoughBranchesHaveCancelled()) {
- this._cancel();
- }
-};
-
-Promise.prototype._cancel = function() {
- if (!this._isCancellable()) return;
- this._setCancelled();
- async.invoke(this._cancelPromises, this, undefined);
-};
-
-Promise.prototype._cancelPromises = function() {
- if (this._length() > 0) this._settlePromises();
-};
-
-Promise.prototype._unsetOnCancel = function() {
- this._onCancelField = undefined;
-};
-
-Promise.prototype._isCancellable = function() {
- return this.isPending() && !this._isCancelled();
-};
-
-Promise.prototype.isCancellable = function() {
- return this.isPending() && !this.isCancelled();
-};
-
-Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) {
- if (util.isArray(onCancelCallback)) {
- for (var i = 0; i < onCancelCallback.length; ++i) {
- this._doInvokeOnCancel(onCancelCallback[i], internalOnly);
- }
- } else if (onCancelCallback !== undefined) {
- if (typeof onCancelCallback === "function") {
- if (!internalOnly) {
- var e = tryCatch(onCancelCallback).call(this._boundValue());
- if (e === errorObj) {
- this._attachExtraTrace(e.e);
- async.throwLater(e.e);
- }
- }
- } else {
- onCancelCallback._resultCancelled(this);
- }
- }
-};
-
-Promise.prototype._invokeOnCancel = function() {
- var onCancelCallback = this._onCancel();
- this._unsetOnCancel();
- async.invoke(this._doInvokeOnCancel, this, onCancelCallback);
-};
-
-Promise.prototype._invokeInternalOnCancel = function() {
- if (this._isCancellable()) {
- this._doInvokeOnCancel(this._onCancel(), true);
- this._unsetOnCancel();
- }
-};
-
-Promise.prototype._resultCancelled = function() {
- this.cancel();
-};
-
-};
-
-},{"./util":21}],5:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(NEXT_FILTER) {
-var util = _dereq_("./util");
-var getKeys = _dereq_("./es5").keys;
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-
-function catchFilter(instances, cb, promise) {
- return function(e) {
- var boundTo = promise._boundValue();
- predicateLoop: for (var i = 0; i < instances.length; ++i) {
- var item = instances[i];
-
- if (item === Error ||
- (item != null && item.prototype instanceof Error)) {
- if (e instanceof item) {
- return tryCatch(cb).call(boundTo, e);
- }
- } else if (typeof item === "function") {
- var matchesPredicate = tryCatch(item).call(boundTo, e);
- if (matchesPredicate === errorObj) {
- return matchesPredicate;
- } else if (matchesPredicate) {
- return tryCatch(cb).call(boundTo, e);
- }
- } else if (util.isObject(e)) {
- var keys = getKeys(item);
- for (var j = 0; j < keys.length; ++j) {
- var key = keys[j];
- if (item[key] != e[key]) {
- continue predicateLoop;
- }
- }
- return tryCatch(cb).call(boundTo, e);
- }
- }
- return NEXT_FILTER;
- };
-}
-
-return catchFilter;
-};
-
-},{"./es5":10,"./util":21}],6:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-var longStackTraces = false;
-var contextStack = [];
-
-Promise.prototype._promiseCreated = function() {};
-Promise.prototype._pushContext = function() {};
-Promise.prototype._popContext = function() {return null;};
-Promise._peekContext = Promise.prototype._peekContext = function() {};
-
-function Context() {
- this._trace = new Context.CapturedTrace(peekContext());
-}
-Context.prototype._pushContext = function () {
- if (this._trace !== undefined) {
- this._trace._promiseCreated = null;
- contextStack.push(this._trace);
- }
-};
-
-Context.prototype._popContext = function () {
- if (this._trace !== undefined) {
- var trace = contextStack.pop();
- var ret = trace._promiseCreated;
- trace._promiseCreated = null;
- return ret;
- }
- return null;
-};
-
-function createContext() {
- if (longStackTraces) return new Context();
-}
-
-function peekContext() {
- var lastIndex = contextStack.length - 1;
- if (lastIndex >= 0) {
- return contextStack[lastIndex];
- }
- return undefined;
-}
-Context.CapturedTrace = null;
-Context.create = createContext;
-Context.deactivateLongStackTraces = function() {};
-Context.activateLongStackTraces = function() {
- var Promise_pushContext = Promise.prototype._pushContext;
- var Promise_popContext = Promise.prototype._popContext;
- var Promise_PeekContext = Promise._peekContext;
- var Promise_peekContext = Promise.prototype._peekContext;
- var Promise_promiseCreated = Promise.prototype._promiseCreated;
- Context.deactivateLongStackTraces = function() {
- Promise.prototype._pushContext = Promise_pushContext;
- Promise.prototype._popContext = Promise_popContext;
- Promise._peekContext = Promise_PeekContext;
- Promise.prototype._peekContext = Promise_peekContext;
- Promise.prototype._promiseCreated = Promise_promiseCreated;
- longStackTraces = false;
- };
- longStackTraces = true;
- Promise.prototype._pushContext = Context.prototype._pushContext;
- Promise.prototype._popContext = Context.prototype._popContext;
- Promise._peekContext = Promise.prototype._peekContext = peekContext;
- Promise.prototype._promiseCreated = function() {
- var ctx = this._peekContext();
- if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this;
- };
-};
-return Context;
-};
-
-},{}],7:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, Context) {
-var getDomain = Promise._getDomain;
-var async = Promise._async;
-var Warning = _dereq_("./errors").Warning;
-var util = _dereq_("./util");
-var canAttachTrace = util.canAttachTrace;
-var unhandledRejectionHandled;
-var possiblyUnhandledRejection;
-var bluebirdFramePattern =
- /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;
-var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/;
-var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/;
-var stackFramePattern = null;
-var formatStack = null;
-var indentStackFrames = false;
-var printWarning;
-var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 &&
- (true ||
- util.env("BLUEBIRD_DEBUG") ||
- util.env("NODE_ENV") === "development"));
-
-var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 &&
- (debugging || util.env("BLUEBIRD_WARNINGS")));
-
-var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 &&
- (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES")));
-
-var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 &&
- (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN"));
-
-Promise.prototype.suppressUnhandledRejections = function() {
- var target = this._target();
- target._bitField = ((target._bitField & (~1048576)) |
- 524288);
-};
-
-Promise.prototype._ensurePossibleRejectionHandled = function () {
- if ((this._bitField & 524288) !== 0) return;
- this._setRejectionIsUnhandled();
- async.invokeLater(this._notifyUnhandledRejection, this, undefined);
-};
-
-Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
- fireRejectionEvent("rejectionHandled",
- unhandledRejectionHandled, undefined, this);
-};
-
-Promise.prototype._setReturnedNonUndefined = function() {
- this._bitField = this._bitField | 268435456;
-};
-
-Promise.prototype._returnedNonUndefined = function() {
- return (this._bitField & 268435456) !== 0;
-};
-
-Promise.prototype._notifyUnhandledRejection = function () {
- if (this._isRejectionUnhandled()) {
- var reason = this._settledValue();
- this._setUnhandledRejectionIsNotified();
- fireRejectionEvent("unhandledRejection",
- possiblyUnhandledRejection, reason, this);
- }
-};
-
-Promise.prototype._setUnhandledRejectionIsNotified = function () {
- this._bitField = this._bitField | 262144;
-};
-
-Promise.prototype._unsetUnhandledRejectionIsNotified = function () {
- this._bitField = this._bitField & (~262144);
-};
-
-Promise.prototype._isUnhandledRejectionNotified = function () {
- return (this._bitField & 262144) > 0;
-};
-
-Promise.prototype._setRejectionIsUnhandled = function () {
- this._bitField = this._bitField | 1048576;
-};
-
-Promise.prototype._unsetRejectionIsUnhandled = function () {
- this._bitField = this._bitField & (~1048576);
- if (this._isUnhandledRejectionNotified()) {
- this._unsetUnhandledRejectionIsNotified();
- this._notifyUnhandledRejectionIsHandled();
- }
-};
-
-Promise.prototype._isRejectionUnhandled = function () {
- return (this._bitField & 1048576) > 0;
-};
-
-Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) {
- return warn(message, shouldUseOwnTrace, promise || this);
-};
-
-Promise.onPossiblyUnhandledRejection = function (fn) {
- var domain = getDomain();
- possiblyUnhandledRejection =
- typeof fn === "function" ? (domain === null ?
- fn : util.domainBind(domain, fn))
- : undefined;
-};
-
-Promise.onUnhandledRejectionHandled = function (fn) {
- var domain = getDomain();
- unhandledRejectionHandled =
- typeof fn === "function" ? (domain === null ?
- fn : util.domainBind(domain, fn))
- : undefined;
-};
-
-var disableLongStackTraces = function() {};
-Promise.longStackTraces = function () {
- if (async.haveItemsQueued() && !config.longStackTraces) {
- throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- if (!config.longStackTraces && longStackTracesIsSupported()) {
- var Promise_captureStackTrace = Promise.prototype._captureStackTrace;
- var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;
- config.longStackTraces = true;
- disableLongStackTraces = function() {
- if (async.haveItemsQueued() && !config.longStackTraces) {
- throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- Promise.prototype._captureStackTrace = Promise_captureStackTrace;
- Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;
- Context.deactivateLongStackTraces();
- async.enableTrampoline();
- config.longStackTraces = false;
- };
- Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;
- Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;
- Context.activateLongStackTraces();
- async.disableTrampolineIfNecessary();
- }
-};
-
-Promise.hasLongStackTraces = function () {
- return config.longStackTraces && longStackTracesIsSupported();
-};
-
-var fireDomEvent = (function() {
- try {
- if (typeof CustomEvent === "function") {
- var event = new CustomEvent("CustomEvent");
- util.global.dispatchEvent(event);
- return function(name, event) {
- var domEvent = new CustomEvent(name.toLowerCase(), {
- detail: event,
- cancelable: true
- });
- return !util.global.dispatchEvent(domEvent);
- };
- } else if (typeof Event === "function") {
- var event = new Event("CustomEvent");
- util.global.dispatchEvent(event);
- return function(name, event) {
- var domEvent = new Event(name.toLowerCase(), {
- cancelable: true
- });
- domEvent.detail = event;
- return !util.global.dispatchEvent(domEvent);
- };
- } else {
- var event = document.createEvent("CustomEvent");
- event.initCustomEvent("testingtheevent", false, true, {});
- util.global.dispatchEvent(event);
- return function(name, event) {
- var domEvent = document.createEvent("CustomEvent");
- domEvent.initCustomEvent(name.toLowerCase(), false, true,
- event);
- return !util.global.dispatchEvent(domEvent);
- };
- }
- } catch (e) {}
- return function() {
- return false;
- };
-})();
-
-var fireGlobalEvent = (function() {
- if (util.isNode) {
- return function() {
- return process.emit.apply(process, arguments);
- };
- } else {
- if (!util.global) {
- return function() {
- return false;
- };
- }
- return function(name) {
- var methodName = "on" + name.toLowerCase();
- var method = util.global[methodName];
- if (!method) return false;
- method.apply(util.global, [].slice.call(arguments, 1));
- return true;
- };
- }
-})();
-
-function generatePromiseLifecycleEventObject(name, promise) {
- return {promise: promise};
-}
-
-var eventToObjectGenerator = {
- promiseCreated: generatePromiseLifecycleEventObject,
- promiseFulfilled: generatePromiseLifecycleEventObject,
- promiseRejected: generatePromiseLifecycleEventObject,
- promiseResolved: generatePromiseLifecycleEventObject,
- promiseCancelled: generatePromiseLifecycleEventObject,
- promiseChained: function(name, promise, child) {
- return {promise: promise, child: child};
- },
- warning: function(name, warning) {
- return {warning: warning};
- },
- unhandledRejection: function (name, reason, promise) {
- return {reason: reason, promise: promise};
- },
- rejectionHandled: generatePromiseLifecycleEventObject
-};
-
-var activeFireEvent = function (name) {
- var globalEventFired = false;
- try {
- globalEventFired = fireGlobalEvent.apply(null, arguments);
- } catch (e) {
- async.throwLater(e);
- globalEventFired = true;
- }
-
- var domEventFired = false;
- try {
- domEventFired = fireDomEvent(name,
- eventToObjectGenerator[name].apply(null, arguments));
- } catch (e) {
- async.throwLater(e);
- domEventFired = true;
- }
-
- return domEventFired || globalEventFired;
-};
-
-Promise.config = function(opts) {
- opts = Object(opts);
- if ("longStackTraces" in opts) {
- if (opts.longStackTraces) {
- Promise.longStackTraces();
- } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {
- disableLongStackTraces();
- }
- }
- if ("warnings" in opts) {
- var warningsOption = opts.warnings;
- config.warnings = !!warningsOption;
- wForgottenReturn = config.warnings;
-
- if (util.isObject(warningsOption)) {
- if ("wForgottenReturn" in warningsOption) {
- wForgottenReturn = !!warningsOption.wForgottenReturn;
- }
- }
- }
- if ("cancellation" in opts && opts.cancellation && !config.cancellation) {
- if (async.haveItemsQueued()) {
- throw new Error(
- "cannot enable cancellation after promises are in use");
- }
- Promise.prototype._clearCancellationData =
- cancellationClearCancellationData;
- Promise.prototype._propagateFrom = cancellationPropagateFrom;
- Promise.prototype._onCancel = cancellationOnCancel;
- Promise.prototype._setOnCancel = cancellationSetOnCancel;
- Promise.prototype._attachCancellationCallback =
- cancellationAttachCancellationCallback;
- Promise.prototype._execute = cancellationExecute;
- propagateFromFunction = cancellationPropagateFrom;
- config.cancellation = true;
- }
- if ("monitoring" in opts) {
- if (opts.monitoring && !config.monitoring) {
- config.monitoring = true;
- Promise.prototype._fireEvent = activeFireEvent;
- } else if (!opts.monitoring && config.monitoring) {
- config.monitoring = false;
- Promise.prototype._fireEvent = defaultFireEvent;
- }
- }
-};
-
-function defaultFireEvent() { return false; }
-
-Promise.prototype._fireEvent = defaultFireEvent;
-Promise.prototype._execute = function(executor, resolve, reject) {
- try {
- executor(resolve, reject);
- } catch (e) {
- return e;
- }
-};
-Promise.prototype._onCancel = function () {};
-Promise.prototype._setOnCancel = function (handler) { ; };
-Promise.prototype._attachCancellationCallback = function(onCancel) {
- ;
-};
-Promise.prototype._captureStackTrace = function () {};
-Promise.prototype._attachExtraTrace = function () {};
-Promise.prototype._clearCancellationData = function() {};
-Promise.prototype._propagateFrom = function (parent, flags) {
- ;
- ;
-};
-
-function cancellationExecute(executor, resolve, reject) {
- var promise = this;
- try {
- executor(resolve, reject, function(onCancel) {
- if (typeof onCancel !== "function") {
- throw new TypeError("onCancel must be a function, got: " +
- util.toString(onCancel));
- }
- promise._attachCancellationCallback(onCancel);
- });
- } catch (e) {
- return e;
- }
-}
-
-function cancellationAttachCancellationCallback(onCancel) {
- if (!this._isCancellable()) return this;
-
- var previousOnCancel = this._onCancel();
- if (previousOnCancel !== undefined) {
- if (util.isArray(previousOnCancel)) {
- previousOnCancel.push(onCancel);
- } else {
- this._setOnCancel([previousOnCancel, onCancel]);
- }
- } else {
- this._setOnCancel(onCancel);
- }
-}
-
-function cancellationOnCancel() {
- return this._onCancelField;
-}
-
-function cancellationSetOnCancel(onCancel) {
- this._onCancelField = onCancel;
-}
-
-function cancellationClearCancellationData() {
- this._cancellationParent = undefined;
- this._onCancelField = undefined;
-}
-
-function cancellationPropagateFrom(parent, flags) {
- if ((flags & 1) !== 0) {
- this._cancellationParent = parent;
- var branchesRemainingToCancel = parent._branchesRemainingToCancel;
- if (branchesRemainingToCancel === undefined) {
- branchesRemainingToCancel = 0;
- }
- parent._branchesRemainingToCancel = branchesRemainingToCancel + 1;
- }
- if ((flags & 2) !== 0 && parent._isBound()) {
- this._setBoundTo(parent._boundTo);
- }
-}
-
-function bindingPropagateFrom(parent, flags) {
- if ((flags & 2) !== 0 && parent._isBound()) {
- this._setBoundTo(parent._boundTo);
- }
-}
-var propagateFromFunction = bindingPropagateFrom;
-
-function boundValueFunction() {
- var ret = this._boundTo;
- if (ret !== undefined) {
- if (ret instanceof Promise) {
- if (ret.isFulfilled()) {
- return ret.value();
- } else {
- return undefined;
- }
- }
- }
- return ret;
-}
-
-function longStackTracesCaptureStackTrace() {
- this._trace = new CapturedTrace(this._peekContext());
-}
-
-function longStackTracesAttachExtraTrace(error, ignoreSelf) {
- if (canAttachTrace(error)) {
- var trace = this._trace;
- if (trace !== undefined) {
- if (ignoreSelf) trace = trace._parent;
- }
- if (trace !== undefined) {
- trace.attachExtraTrace(error);
- } else if (!error.__stackCleaned__) {
- var parsed = parseStackAndMessage(error);
- util.notEnumerableProp(error, "stack",
- parsed.message + "\n" + parsed.stack.join("\n"));
- util.notEnumerableProp(error, "__stackCleaned__", true);
- }
- }
-}
-
-function checkForgottenReturns(returnValue, promiseCreated, name, promise,
- parent) {
- if (returnValue === undefined && promiseCreated !== null &&
- wForgottenReturn) {
- if (parent !== undefined && parent._returnedNonUndefined()) return;
- if ((promise._bitField & 65535) === 0) return;
-
- if (name) name = name + " ";
- var handlerLine = "";
- var creatorLine = "";
- if (promiseCreated._trace) {
- var traceLines = promiseCreated._trace.stack.split("\n");
- var stack = cleanStack(traceLines);
- for (var i = stack.length - 1; i >= 0; --i) {
- var line = stack[i];
- if (!nodeFramePattern.test(line)) {
- var lineMatches = line.match(parseLinePattern);
- if (lineMatches) {
- handlerLine = "at " + lineMatches[1] +
- ":" + lineMatches[2] + ":" + lineMatches[3] + " ";
- }
- break;
- }
- }
-
- if (stack.length > 0) {
- var firstUserLine = stack[0];
- for (var i = 0; i < traceLines.length; ++i) {
-
- if (traceLines[i] === firstUserLine) {
- if (i > 0) {
- creatorLine = "\n" + traceLines[i - 1];
- }
- break;
- }
- }
-
- }
- }
- var msg = "a promise was created in a " + name +
- "handler " + handlerLine + "but was not returned from it, " +
- "see http://goo.gl/rRqMUw" +
- creatorLine;
- promise._warn(msg, true, promiseCreated);
- }
-}
-
-function deprecated(name, replacement) {
- var message = name +
- " is deprecated and will be removed in a future version.";
- if (replacement) message += " Use " + replacement + " instead.";
- return warn(message);
-}
-
-function warn(message, shouldUseOwnTrace, promise) {
- if (!config.warnings) return;
- var warning = new Warning(message);
- var ctx;
- if (shouldUseOwnTrace) {
- promise._attachExtraTrace(warning);
- } else if (config.longStackTraces && (ctx = Promise._peekContext())) {
- ctx.attachExtraTrace(warning);
- } else {
- var parsed = parseStackAndMessage(warning);
- warning.stack = parsed.message + "\n" + parsed.stack.join("\n");
- }
-
- if (!activeFireEvent("warning", warning)) {
- formatAndLogError(warning, "", true);
- }
-}
-
-function reconstructStack(message, stacks) {
- for (var i = 0; i < stacks.length - 1; ++i) {
- stacks[i].push("From previous event:");
- stacks[i] = stacks[i].join("\n");
- }
- if (i < stacks.length) {
- stacks[i] = stacks[i].join("\n");
- }
- return message + "\n" + stacks.join("\n");
-}
-
-function removeDuplicateOrEmptyJumps(stacks) {
- for (var i = 0; i < stacks.length; ++i) {
- if (stacks[i].length === 0 ||
- ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {
- stacks.splice(i, 1);
- i--;
- }
- }
-}
-
-function removeCommonRoots(stacks) {
- var current = stacks[0];
- for (var i = 1; i < stacks.length; ++i) {
- var prev = stacks[i];
- var currentLastIndex = current.length - 1;
- var currentLastLine = current[currentLastIndex];
- var commonRootMeetPoint = -1;
-
- for (var j = prev.length - 1; j >= 0; --j) {
- if (prev[j] === currentLastLine) {
- commonRootMeetPoint = j;
- break;
- }
- }
-
- for (var j = commonRootMeetPoint; j >= 0; --j) {
- var line = prev[j];
- if (current[currentLastIndex] === line) {
- current.pop();
- currentLastIndex--;
- } else {
- break;
- }
- }
- current = prev;
- }
-}
-
-function cleanStack(stack) {
- var ret = [];
- for (var i = 0; i < stack.length; ++i) {
- var line = stack[i];
- var isTraceLine = " (No stack trace)" === line ||
- stackFramePattern.test(line);
- var isInternalFrame = isTraceLine && shouldIgnore(line);
- if (isTraceLine && !isInternalFrame) {
- if (indentStackFrames && line.charAt(0) !== " ") {
- line = " " + line;
- }
- ret.push(line);
- }
- }
- return ret;
-}
-
-function stackFramesAsArray(error) {
- var stack = error.stack.replace(/\s+$/g, "").split("\n");
- for (var i = 0; i < stack.length; ++i) {
- var line = stack[i];
- if (" (No stack trace)" === line || stackFramePattern.test(line)) {
- break;
- }
- }
- if (i > 0) {
- stack = stack.slice(i);
- }
- return stack;
-}
-
-function parseStackAndMessage(error) {
- var stack = error.stack;
- var message = error.toString();
- stack = typeof stack === "string" && stack.length > 0
- ? stackFramesAsArray(error) : [" (No stack trace)"];
- return {
- message: message,
- stack: cleanStack(stack)
- };
-}
-
-function formatAndLogError(error, title, isSoft) {
- if (typeof console !== "undefined") {
- var message;
- if (util.isObject(error)) {
- var stack = error.stack;
- message = title + formatStack(stack, error);
- } else {
- message = title + String(error);
- }
- if (typeof printWarning === "function") {
- printWarning(message, isSoft);
- } else if (typeof console.log === "function" ||
- typeof console.log === "object") {
- console.log(message);
- }
- }
-}
-
-function fireRejectionEvent(name, localHandler, reason, promise) {
- var localEventFired = false;
- try {
- if (typeof localHandler === "function") {
- localEventFired = true;
- if (name === "rejectionHandled") {
- localHandler(promise);
- } else {
- localHandler(reason, promise);
- }
- }
- } catch (e) {
- async.throwLater(e);
- }
-
- if (name === "unhandledRejection") {
- if (!activeFireEvent(name, reason, promise) && !localEventFired) {
- formatAndLogError(reason, "Unhandled rejection ");
- }
- } else {
- activeFireEvent(name, promise);
- }
-}
-
-function formatNonError(obj) {
- var str;
- if (typeof obj === "function") {
- str = "[function " +
- (obj.name || "anonymous") +
- "]";
- } else {
- str = obj && typeof obj.toString === "function"
- ? obj.toString() : util.toString(obj);
- var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
- if (ruselessToString.test(str)) {
- try {
- var newStr = JSON.stringify(obj);
- str = newStr;
- }
- catch(e) {
-
- }
- }
- if (str.length === 0) {
- str = "(empty array)";
- }
- }
- return ("(<" + snip(str) + ">, no stack trace)");
-}
-
-function snip(str) {
- var maxChars = 41;
- if (str.length < maxChars) {
- return str;
- }
- return str.substr(0, maxChars - 3) + "...";
-}
-
-function longStackTracesIsSupported() {
- return typeof captureStackTrace === "function";
-}
-
-var shouldIgnore = function() { return false; };
-var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
-function parseLineInfo(line) {
- var matches = line.match(parseLineInfoRegex);
- if (matches) {
- return {
- fileName: matches[1],
- line: parseInt(matches[2], 10)
- };
- }
-}
-
-function setBounds(firstLineError, lastLineError) {
- if (!longStackTracesIsSupported()) return;
- var firstStackLines = firstLineError.stack.split("\n");
- var lastStackLines = lastLineError.stack.split("\n");
- var firstIndex = -1;
- var lastIndex = -1;
- var firstFileName;
- var lastFileName;
- for (var i = 0; i < firstStackLines.length; ++i) {
- var result = parseLineInfo(firstStackLines[i]);
- if (result) {
- firstFileName = result.fileName;
- firstIndex = result.line;
- break;
- }
- }
- for (var i = 0; i < lastStackLines.length; ++i) {
- var result = parseLineInfo(lastStackLines[i]);
- if (result) {
- lastFileName = result.fileName;
- lastIndex = result.line;
- break;
- }
- }
- if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||
- firstFileName !== lastFileName || firstIndex >= lastIndex) {
- return;
- }
-
- shouldIgnore = function(line) {
- if (bluebirdFramePattern.test(line)) return true;
- var info = parseLineInfo(line);
- if (info) {
- if (info.fileName === firstFileName &&
- (firstIndex <= info.line && info.line <= lastIndex)) {
- return true;
- }
- }
- return false;
- };
-}
-
-function CapturedTrace(parent) {
- this._parent = parent;
- this._promisesCreated = 0;
- var length = this._length = 1 + (parent === undefined ? 0 : parent._length);
- captureStackTrace(this, CapturedTrace);
- if (length > 32) this.uncycle();
-}
-util.inherits(CapturedTrace, Error);
-Context.CapturedTrace = CapturedTrace;
-
-CapturedTrace.prototype.uncycle = function() {
- var length = this._length;
- if (length < 2) return;
- var nodes = [];
- var stackToIndex = {};
-
- for (var i = 0, node = this; node !== undefined; ++i) {
- nodes.push(node);
- node = node._parent;
- }
- length = this._length = i;
- for (var i = length - 1; i >= 0; --i) {
- var stack = nodes[i].stack;
- if (stackToIndex[stack] === undefined) {
- stackToIndex[stack] = i;
- }
- }
- for (var i = 0; i < length; ++i) {
- var currentStack = nodes[i].stack;
- var index = stackToIndex[currentStack];
- if (index !== undefined && index !== i) {
- if (index > 0) {
- nodes[index - 1]._parent = undefined;
- nodes[index - 1]._length = 1;
- }
- nodes[i]._parent = undefined;
- nodes[i]._length = 1;
- var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;
-
- if (index < length - 1) {
- cycleEdgeNode._parent = nodes[index + 1];
- cycleEdgeNode._parent.uncycle();
- cycleEdgeNode._length =
- cycleEdgeNode._parent._length + 1;
- } else {
- cycleEdgeNode._parent = undefined;
- cycleEdgeNode._length = 1;
- }
- var currentChildLength = cycleEdgeNode._length + 1;
- for (var j = i - 2; j >= 0; --j) {
- nodes[j]._length = currentChildLength;
- currentChildLength++;
- }
- return;
- }
- }
-};
-
-CapturedTrace.prototype.attachExtraTrace = function(error) {
- if (error.__stackCleaned__) return;
- this.uncycle();
- var parsed = parseStackAndMessage(error);
- var message = parsed.message;
- var stacks = [parsed.stack];
-
- var trace = this;
- while (trace !== undefined) {
- stacks.push(cleanStack(trace.stack.split("\n")));
- trace = trace._parent;
- }
- removeCommonRoots(stacks);
- removeDuplicateOrEmptyJumps(stacks);
- util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));
- util.notEnumerableProp(error, "__stackCleaned__", true);
-};
-
-var captureStackTrace = (function stackDetection() {
- var v8stackFramePattern = /^\s*at\s*/;
- var v8stackFormatter = function(stack, error) {
- if (typeof stack === "string") return stack;
-
- if (error.name !== undefined &&
- error.message !== undefined) {
- return error.toString();
- }
- return formatNonError(error);
- };
-
- if (typeof Error.stackTraceLimit === "number" &&
- typeof Error.captureStackTrace === "function") {
- Error.stackTraceLimit += 6;
- stackFramePattern = v8stackFramePattern;
- formatStack = v8stackFormatter;
- var captureStackTrace = Error.captureStackTrace;
-
- shouldIgnore = function(line) {
- return bluebirdFramePattern.test(line);
- };
- return function(receiver, ignoreUntil) {
- Error.stackTraceLimit += 6;
- captureStackTrace(receiver, ignoreUntil);
- Error.stackTraceLimit -= 6;
- };
- }
- var err = new Error();
-
- if (typeof err.stack === "string" &&
- err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) {
- stackFramePattern = /@/;
- formatStack = v8stackFormatter;
- indentStackFrames = true;
- return function captureStackTrace(o) {
- o.stack = new Error().stack;
- };
- }
-
- var hasStackAfterThrow;
- try { throw new Error(); }
- catch(e) {
- hasStackAfterThrow = ("stack" in e);
- }
- if (!("stack" in err) && hasStackAfterThrow &&
- typeof Error.stackTraceLimit === "number") {
- stackFramePattern = v8stackFramePattern;
- formatStack = v8stackFormatter;
- return function captureStackTrace(o) {
- Error.stackTraceLimit += 6;
- try { throw new Error(); }
- catch(e) { o.stack = e.stack; }
- Error.stackTraceLimit -= 6;
- };
- }
-
- formatStack = function(stack, error) {
- if (typeof stack === "string") return stack;
-
- if ((typeof error === "object" ||
- typeof error === "function") &&
- error.name !== undefined &&
- error.message !== undefined) {
- return error.toString();
- }
- return formatNonError(error);
- };
-
- return null;
-
-})([]);
-
-if (typeof console !== "undefined" && typeof console.warn !== "undefined") {
- printWarning = function (message) {
- console.warn(message);
- };
- if (util.isNode && process.stderr.isTTY) {
- printWarning = function(message, isSoft) {
- var color = isSoft ? "\u001b[33m" : "\u001b[31m";
- console.warn(color + message + "\u001b[0m\n");
- };
- } else if (!util.isNode && typeof (new Error().stack) === "string") {
- printWarning = function(message, isSoft) {
- console.warn("%c" + message,
- isSoft ? "color: darkorange" : "color: red");
- };
- }
-}
-
-var config = {
- warnings: warnings,
- longStackTraces: false,
- cancellation: false,
- monitoring: false
-};
-
-if (longStackTraces) Promise.longStackTraces();
-
-return {
- longStackTraces: function() {
- return config.longStackTraces;
- },
- warnings: function() {
- return config.warnings;
- },
- cancellation: function() {
- return config.cancellation;
- },
- monitoring: function() {
- return config.monitoring;
- },
- propagateFromFunction: function() {
- return propagateFromFunction;
- },
- boundValueFunction: function() {
- return boundValueFunction;
- },
- checkForgottenReturns: checkForgottenReturns,
- setBounds: setBounds,
- warn: warn,
- deprecated: deprecated,
- CapturedTrace: CapturedTrace,
- fireDomEvent: fireDomEvent,
- fireGlobalEvent: fireGlobalEvent
-};
-};
-
-},{"./errors":9,"./util":21}],8:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-function returner() {
- return this.value;
-}
-function thrower() {
- throw this.reason;
-}
-
-Promise.prototype["return"] =
-Promise.prototype.thenReturn = function (value) {
- if (value instanceof Promise) value.suppressUnhandledRejections();
- return this._then(
- returner, undefined, undefined, {value: value}, undefined);
-};
-
-Promise.prototype["throw"] =
-Promise.prototype.thenThrow = function (reason) {
- return this._then(
- thrower, undefined, undefined, {reason: reason}, undefined);
-};
-
-Promise.prototype.catchThrow = function (reason) {
- if (arguments.length <= 1) {
- return this._then(
- undefined, thrower, undefined, {reason: reason}, undefined);
- } else {
- var _reason = arguments[1];
- var handler = function() {throw _reason;};
- return this.caught(reason, handler);
- }
-};
-
-Promise.prototype.catchReturn = function (value) {
- if (arguments.length <= 1) {
- if (value instanceof Promise) value.suppressUnhandledRejections();
- return this._then(
- undefined, returner, undefined, {value: value}, undefined);
- } else {
- var _value = arguments[1];
- if (_value instanceof Promise) _value.suppressUnhandledRejections();
- var handler = function() {return _value;};
- return this.caught(value, handler);
- }
-};
-};
-
-},{}],9:[function(_dereq_,module,exports){
-"use strict";
-var es5 = _dereq_("./es5");
-var Objectfreeze = es5.freeze;
-var util = _dereq_("./util");
-var inherits = util.inherits;
-var notEnumerableProp = util.notEnumerableProp;
-
-function subError(nameProperty, defaultMessage) {
- function SubError(message) {
- if (!(this instanceof SubError)) return new SubError(message);
- notEnumerableProp(this, "message",
- typeof message === "string" ? message : defaultMessage);
- notEnumerableProp(this, "name", nameProperty);
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- } else {
- Error.call(this);
- }
- }
- inherits(SubError, Error);
- return SubError;
-}
-
-var _TypeError, _RangeError;
-var Warning = subError("Warning", "warning");
-var CancellationError = subError("CancellationError", "cancellation error");
-var TimeoutError = subError("TimeoutError", "timeout error");
-var AggregateError = subError("AggregateError", "aggregate error");
-try {
- _TypeError = TypeError;
- _RangeError = RangeError;
-} catch(e) {
- _TypeError = subError("TypeError", "type error");
- _RangeError = subError("RangeError", "range error");
-}
-
-var methods = ("join pop push shift unshift slice filter forEach some " +
- "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
-
-for (var i = 0; i < methods.length; ++i) {
- if (typeof Array.prototype[methods[i]] === "function") {
- AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
- }
-}
-
-es5.defineProperty(AggregateError.prototype, "length", {
- value: 0,
- configurable: false,
- writable: true,
- enumerable: true
-});
-AggregateError.prototype["isOperational"] = true;
-var level = 0;
-AggregateError.prototype.toString = function() {
- var indent = Array(level * 4 + 1).join(" ");
- var ret = "\n" + indent + "AggregateError of:" + "\n";
- level++;
- indent = Array(level * 4 + 1).join(" ");
- for (var i = 0; i < this.length; ++i) {
- var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
- var lines = str.split("\n");
- for (var j = 0; j < lines.length; ++j) {
- lines[j] = indent + lines[j];
- }
- str = lines.join("\n");
- ret += str + "\n";
- }
- level--;
- return ret;
-};
-
-function OperationalError(message) {
- if (!(this instanceof OperationalError))
- return new OperationalError(message);
- notEnumerableProp(this, "name", "OperationalError");
- notEnumerableProp(this, "message", message);
- this.cause = message;
- this["isOperational"] = true;
-
- if (message instanceof Error) {
- notEnumerableProp(this, "message", message.message);
- notEnumerableProp(this, "stack", message.stack);
- } else if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- }
-
-}
-inherits(OperationalError, Error);
-
-var errorTypes = Error["__BluebirdErrorTypes__"];
-if (!errorTypes) {
- errorTypes = Objectfreeze({
- CancellationError: CancellationError,
- TimeoutError: TimeoutError,
- OperationalError: OperationalError,
- RejectionError: OperationalError,
- AggregateError: AggregateError
- });
- es5.defineProperty(Error, "__BluebirdErrorTypes__", {
- value: errorTypes,
- writable: false,
- enumerable: false,
- configurable: false
- });
-}
-
-module.exports = {
- Error: Error,
- TypeError: _TypeError,
- RangeError: _RangeError,
- CancellationError: errorTypes.CancellationError,
- OperationalError: errorTypes.OperationalError,
- TimeoutError: errorTypes.TimeoutError,
- AggregateError: errorTypes.AggregateError,
- Warning: Warning
-};
-
-},{"./es5":10,"./util":21}],10:[function(_dereq_,module,exports){
-var isES5 = (function(){
- "use strict";
- return this === undefined;
-})();
-
-if (isES5) {
- module.exports = {
- freeze: Object.freeze,
- defineProperty: Object.defineProperty,
- getDescriptor: Object.getOwnPropertyDescriptor,
- keys: Object.keys,
- names: Object.getOwnPropertyNames,
- getPrototypeOf: Object.getPrototypeOf,
- isArray: Array.isArray,
- isES5: isES5,
- propertyIsWritable: function(obj, prop) {
- var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
- return !!(!descriptor || descriptor.writable || descriptor.set);
- }
- };
-} else {
- var has = {}.hasOwnProperty;
- var str = {}.toString;
- var proto = {}.constructor.prototype;
-
- var ObjectKeys = function (o) {
- var ret = [];
- for (var key in o) {
- if (has.call(o, key)) {
- ret.push(key);
- }
- }
- return ret;
- };
-
- var ObjectGetDescriptor = function(o, key) {
- return {value: o[key]};
- };
-
- var ObjectDefineProperty = function (o, key, desc) {
- o[key] = desc.value;
- return o;
- };
-
- var ObjectFreeze = function (obj) {
- return obj;
- };
-
- var ObjectGetPrototypeOf = function (obj) {
- try {
- return Object(obj).constructor.prototype;
- }
- catch (e) {
- return proto;
- }
- };
-
- var ArrayIsArray = function (obj) {
- try {
- return str.call(obj) === "[object Array]";
- }
- catch(e) {
- return false;
- }
- };
-
- module.exports = {
- isArray: ArrayIsArray,
- keys: ObjectKeys,
- names: ObjectKeys,
- defineProperty: ObjectDefineProperty,
- getDescriptor: ObjectGetDescriptor,
- freeze: ObjectFreeze,
- getPrototypeOf: ObjectGetPrototypeOf,
- isES5: isES5,
- propertyIsWritable: function() {
- return true;
- }
- };
-}
-
-},{}],11:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, tryConvertToPromise) {
-var util = _dereq_("./util");
-var CancellationError = Promise.CancellationError;
-var errorObj = util.errorObj;
-
-function PassThroughHandlerContext(promise, type, handler) {
- this.promise = promise;
- this.type = type;
- this.handler = handler;
- this.called = false;
- this.cancelPromise = null;
-}
-
-PassThroughHandlerContext.prototype.isFinallyHandler = function() {
- return this.type === 0;
-};
-
-function FinallyHandlerCancelReaction(finallyHandler) {
- this.finallyHandler = finallyHandler;
-}
-
-FinallyHandlerCancelReaction.prototype._resultCancelled = function() {
- checkCancel(this.finallyHandler);
-};
-
-function checkCancel(ctx, reason) {
- if (ctx.cancelPromise != null) {
- if (arguments.length > 1) {
- ctx.cancelPromise._reject(reason);
- } else {
- ctx.cancelPromise._cancel();
- }
- ctx.cancelPromise = null;
- return true;
- }
- return false;
-}
-
-function succeed() {
- return finallyHandler.call(this, this.promise._target()._settledValue());
-}
-function fail(reason) {
- if (checkCancel(this, reason)) return;
- errorObj.e = reason;
- return errorObj;
-}
-function finallyHandler(reasonOrValue) {
- var promise = this.promise;
- var handler = this.handler;
-
- if (!this.called) {
- this.called = true;
- var ret = this.isFinallyHandler()
- ? handler.call(promise._boundValue())
- : handler.call(promise._boundValue(), reasonOrValue);
- if (ret !== undefined) {
- promise._setReturnedNonUndefined();
- var maybePromise = tryConvertToPromise(ret, promise);
- if (maybePromise instanceof Promise) {
- if (this.cancelPromise != null) {
- if (maybePromise._isCancelled()) {
- var reason =
- new CancellationError("late cancellation observer");
- promise._attachExtraTrace(reason);
- errorObj.e = reason;
- return errorObj;
- } else if (maybePromise.isPending()) {
- maybePromise._attachCancellationCallback(
- new FinallyHandlerCancelReaction(this));
- }
- }
- return maybePromise._then(
- succeed, fail, undefined, this, undefined);
- }
- }
- }
-
- if (promise.isRejected()) {
- checkCancel(this);
- errorObj.e = reasonOrValue;
- return errorObj;
- } else {
- checkCancel(this);
- return reasonOrValue;
- }
-}
-
-Promise.prototype._passThrough = function(handler, type, success, fail) {
- if (typeof handler !== "function") return this.then();
- return this._then(success,
- fail,
- undefined,
- new PassThroughHandlerContext(this, type, handler),
- undefined);
-};
-
-Promise.prototype.lastly =
-Promise.prototype["finally"] = function (handler) {
- return this._passThrough(handler,
- 0,
- finallyHandler,
- finallyHandler);
-};
-
-Promise.prototype.tap = function (handler) {
- return this._passThrough(handler, 1, finallyHandler);
-};
-
-return PassThroughHandlerContext;
-};
-
-},{"./util":21}],12:[function(_dereq_,module,exports){
-"use strict";
-module.exports =
-function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async,
- getDomain) {
-var util = _dereq_("./util");
-var canEvaluate = util.canEvaluate;
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-var reject;
-
-if (!true) {
-if (canEvaluate) {
- var thenCallback = function(i) {
- return new Function("value", "holder", " \n\
- 'use strict'; \n\
- holder.pIndex = value; \n\
- holder.checkFulfillment(this); \n\
- ".replace(/Index/g, i));
- };
-
- var promiseSetter = function(i) {
- return new Function("promise", "holder", " \n\
- 'use strict'; \n\
- holder.pIndex = promise; \n\
- ".replace(/Index/g, i));
- };
-
- var generateHolderClass = function(total) {
- var props = new Array(total);
- for (var i = 0; i < props.length; ++i) {
- props[i] = "this.p" + (i+1);
- }
- var assignment = props.join(" = ") + " = null;";
- var cancellationCode= "var promise;\n" + props.map(function(prop) {
- return " \n\
- promise = " + prop + "; \n\
- if (promise instanceof Promise) { \n\
- promise.cancel(); \n\
- } \n\
- ";
- }).join("\n");
- var passedArguments = props.join(", ");
- var name = "Holder$" + total;
-
-
- var code = "return function(tryCatch, errorObj, Promise, async) { \n\
- 'use strict'; \n\
- function [TheName](fn) { \n\
- [TheProperties] \n\
- this.fn = fn; \n\
- this.asyncNeeded = true; \n\
- this.now = 0; \n\
- } \n\
- \n\
- [TheName].prototype._callFunction = function(promise) { \n\
- promise._pushContext(); \n\
- var ret = tryCatch(this.fn)([ThePassedArguments]); \n\
- promise._popContext(); \n\
- if (ret === errorObj) { \n\
- promise._rejectCallback(ret.e, false); \n\
- } else { \n\
- promise._resolveCallback(ret); \n\
- } \n\
- }; \n\
- \n\
- [TheName].prototype.checkFulfillment = function(promise) { \n\
- var now = ++this.now; \n\
- if (now === [TheTotal]) { \n\
- if (this.asyncNeeded) { \n\
- async.invoke(this._callFunction, this, promise); \n\
- } else { \n\
- this._callFunction(promise); \n\
- } \n\
- \n\
- } \n\
- }; \n\
- \n\
- [TheName].prototype._resultCancelled = function() { \n\
- [CancellationCode] \n\
- }; \n\
- \n\
- return [TheName]; \n\
- }(tryCatch, errorObj, Promise, async); \n\
- ";
-
- code = code.replace(/\[TheName\]/g, name)
- .replace(/\[TheTotal\]/g, total)
- .replace(/\[ThePassedArguments\]/g, passedArguments)
- .replace(/\[TheProperties\]/g, assignment)
- .replace(/\[CancellationCode\]/g, cancellationCode);
-
- return new Function("tryCatch", "errorObj", "Promise", "async", code)
- (tryCatch, errorObj, Promise, async);
- };
-
- var holderClasses = [];
- var thenCallbacks = [];
- var promiseSetters = [];
-
- for (var i = 0; i < 8; ++i) {
- holderClasses.push(generateHolderClass(i + 1));
- thenCallbacks.push(thenCallback(i + 1));
- promiseSetters.push(promiseSetter(i + 1));
- }
-
- reject = function (reason) {
- this._reject(reason);
- };
-}}
-
-Promise.join = function () {
- var last = arguments.length - 1;
- var fn;
- if (last > 0 && typeof arguments[last] === "function") {
- fn = arguments[last];
- if (!true) {
- if (last <= 8 && canEvaluate) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- var HolderClass = holderClasses[last - 1];
- var holder = new HolderClass(fn);
- var callbacks = thenCallbacks;
-
- for (var i = 0; i < last; ++i) {
- var maybePromise = tryConvertToPromise(arguments[i], ret);
- if (maybePromise instanceof Promise) {
- maybePromise = maybePromise._target();
- var bitField = maybePromise._bitField;
- ;
- if (((bitField & 50397184) === 0)) {
- maybePromise._then(callbacks[i], reject,
- undefined, ret, holder);
- promiseSetters[i](maybePromise, holder);
- holder.asyncNeeded = false;
- } else if (((bitField & 33554432) !== 0)) {
- callbacks[i].call(ret,
- maybePromise._value(), holder);
- } else if (((bitField & 16777216) !== 0)) {
- ret._reject(maybePromise._reason());
- } else {
- ret._cancel();
- }
- } else {
- callbacks[i].call(ret, maybePromise, holder);
- }
- }
-
- if (!ret._isFateSealed()) {
- if (holder.asyncNeeded) {
- var domain = getDomain();
- if (domain !== null) {
- holder.fn = util.domainBind(domain, holder.fn);
- }
- }
- ret._setAsyncGuaranteed();
- ret._setOnCancel(holder);
- }
- return ret;
- }
- }
- }
- var args = [].slice.call(arguments);;
- if (fn) args.pop();
- var ret = new PromiseArray(args).promise();
- return fn !== undefined ? ret.spread(fn) : ret;
-};
-
-};
-
-},{"./util":21}],13:[function(_dereq_,module,exports){
-"use strict";
-module.exports =
-function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {
-var util = _dereq_("./util");
-var tryCatch = util.tryCatch;
-
-Promise.method = function (fn) {
- if (typeof fn !== "function") {
- throw new Promise.TypeError("expecting a function but got " + util.classString(fn));
- }
- return function () {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._pushContext();
- var value = tryCatch(fn).apply(this, arguments);
- var promiseCreated = ret._popContext();
- debug.checkForgottenReturns(
- value, promiseCreated, "Promise.method", ret);
- ret._resolveFromSyncValue(value);
- return ret;
- };
-};
-
-Promise.attempt = Promise["try"] = function (fn) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._pushContext();
- var value;
- if (arguments.length > 1) {
- debug.deprecated("calling Promise.try with more than 1 argument");
- var arg = arguments[1];
- var ctx = arguments[2];
- value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg)
- : tryCatch(fn).call(ctx, arg);
- } else {
- value = tryCatch(fn)();
- }
- var promiseCreated = ret._popContext();
- debug.checkForgottenReturns(
- value, promiseCreated, "Promise.try", ret);
- ret._resolveFromSyncValue(value);
- return ret;
-};
-
-Promise.prototype._resolveFromSyncValue = function (value) {
- if (value === util.errorObj) {
- this._rejectCallback(value.e, false);
- } else {
- this._resolveCallback(value, true);
- }
-};
-};
-
-},{"./util":21}],14:[function(_dereq_,module,exports){
-"use strict";
-var util = _dereq_("./util");
-var maybeWrapAsError = util.maybeWrapAsError;
-var errors = _dereq_("./errors");
-var OperationalError = errors.OperationalError;
-var es5 = _dereq_("./es5");
-
-function isUntypedError(obj) {
- return obj instanceof Error &&
- es5.getPrototypeOf(obj) === Error.prototype;
-}
-
-var rErrorKey = /^(?:name|message|stack|cause)$/;
-function wrapAsOperationalError(obj) {
- var ret;
- if (isUntypedError(obj)) {
- ret = new OperationalError(obj);
- ret.name = obj.name;
- ret.message = obj.message;
- ret.stack = obj.stack;
- var keys = es5.keys(obj);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (!rErrorKey.test(key)) {
- ret[key] = obj[key];
- }
- }
- return ret;
- }
- util.markAsOriginatingFromRejection(obj);
- return obj;
-}
-
-function nodebackForPromise(promise, multiArgs) {
- return function(err, value) {
- if (promise === null) return;
- if (err) {
- var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
- promise._attachExtraTrace(wrapped);
- promise._reject(wrapped);
- } else if (!multiArgs) {
- promise._fulfill(value);
- } else {
- var args = [].slice.call(arguments, 1);;
- promise._fulfill(args);
- }
- promise = null;
- };
-}
-
-module.exports = nodebackForPromise;
-
-},{"./errors":9,"./es5":10,"./util":21}],15:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function() {
-var makeSelfResolutionError = function () {
- return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a");
-};
-var reflectHandler = function() {
- return new Promise.PromiseInspection(this._target());
-};
-var apiRejection = function(msg) {
- return Promise.reject(new TypeError(msg));
-};
-function Proxyable() {}
-var UNDEFINED_BINDING = {};
-var util = _dereq_("./util");
-
-var getDomain;
-if (util.isNode) {
- getDomain = function() {
- var ret = process.domain;
- if (ret === undefined) ret = null;
- return ret;
- };
-} else {
- getDomain = function() {
- return null;
- };
-}
-util.notEnumerableProp(Promise, "_getDomain", getDomain);
-
-var es5 = _dereq_("./es5");
-var Async = _dereq_("./async");
-var async = new Async();
-es5.defineProperty(Promise, "_async", {value: async});
-var errors = _dereq_("./errors");
-var TypeError = Promise.TypeError = errors.TypeError;
-Promise.RangeError = errors.RangeError;
-var CancellationError = Promise.CancellationError = errors.CancellationError;
-Promise.TimeoutError = errors.TimeoutError;
-Promise.OperationalError = errors.OperationalError;
-Promise.RejectionError = errors.OperationalError;
-Promise.AggregateError = errors.AggregateError;
-var INTERNAL = function(){};
-var APPLY = {};
-var NEXT_FILTER = {};
-var tryConvertToPromise = _dereq_("./thenables")(Promise, INTERNAL);
-var PromiseArray =
- _dereq_("./promise_array")(Promise, INTERNAL,
- tryConvertToPromise, apiRejection, Proxyable);
-var Context = _dereq_("./context")(Promise);
- /*jshint unused:false*/
-var createContext = Context.create;
-var debug = _dereq_("./debuggability")(Promise, Context);
-var CapturedTrace = debug.CapturedTrace;
-var PassThroughHandlerContext =
- _dereq_("./finally")(Promise, tryConvertToPromise);
-var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER);
-var nodebackForPromise = _dereq_("./nodeback");
-var errorObj = util.errorObj;
-var tryCatch = util.tryCatch;
-function check(self, executor) {
- if (typeof executor !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(executor));
- }
- if (self.constructor !== Promise) {
- throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
-}
-
-function Promise(executor) {
- this._bitField = 0;
- this._fulfillmentHandler0 = undefined;
- this._rejectionHandler0 = undefined;
- this._promise0 = undefined;
- this._receiver0 = undefined;
- if (executor !== INTERNAL) {
- check(this, executor);
- this._resolveFromExecutor(executor);
- }
- this._promiseCreated();
- this._fireEvent("promiseCreated", this);
-}
-
-Promise.prototype.toString = function () {
- return "[object Promise]";
-};
-
-Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
- var len = arguments.length;
- if (len > 1) {
- var catchInstances = new Array(len - 1),
- j = 0, i;
- for (i = 0; i < len - 1; ++i) {
- var item = arguments[i];
- if (util.isObject(item)) {
- catchInstances[j++] = item;
- } else {
- return apiRejection("expecting an object but got " +
- "A catch statement predicate " + util.classString(item));
- }
- }
- catchInstances.length = j;
- fn = arguments[i];
- return this.then(undefined, catchFilter(catchInstances, fn, this));
- }
- return this.then(undefined, fn);
-};
-
-Promise.prototype.reflect = function () {
- return this._then(reflectHandler,
- reflectHandler, undefined, this, undefined);
-};
-
-Promise.prototype.then = function (didFulfill, didReject) {
- if (debug.warnings() && arguments.length > 0 &&
- typeof didFulfill !== "function" &&
- typeof didReject !== "function") {
- var msg = ".then() only accepts functions but was passed: " +
- util.classString(didFulfill);
- if (arguments.length > 1) {
- msg += ", " + util.classString(didReject);
- }
- this._warn(msg);
- }
- return this._then(didFulfill, didReject, undefined, undefined, undefined);
-};
-
-Promise.prototype.done = function (didFulfill, didReject) {
- var promise =
- this._then(didFulfill, didReject, undefined, undefined, undefined);
- promise._setIsFinal();
-};
-
-Promise.prototype.spread = function (fn) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- return this.all()._then(fn, undefined, undefined, APPLY, undefined);
-};
-
-Promise.prototype.toJSON = function () {
- var ret = {
- isFulfilled: false,
- isRejected: false,
- fulfillmentValue: undefined,
- rejectionReason: undefined
- };
- if (this.isFulfilled()) {
- ret.fulfillmentValue = this.value();
- ret.isFulfilled = true;
- } else if (this.isRejected()) {
- ret.rejectionReason = this.reason();
- ret.isRejected = true;
- }
- return ret;
-};
-
-Promise.prototype.all = function () {
- if (arguments.length > 0) {
- this._warn(".all() was passed arguments but it does not take any");
- }
- return new PromiseArray(this).promise();
-};
-
-Promise.prototype.error = function (fn) {
- return this.caught(util.originatesFromRejection, fn);
-};
-
-Promise.getNewLibraryCopy = module.exports;
-
-Promise.is = function (val) {
- return val instanceof Promise;
-};
-
-Promise.fromNode = Promise.fromCallback = function(fn) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs
- : false;
- var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs));
- if (result === errorObj) {
- ret._rejectCallback(result.e, true);
- }
- if (!ret._isFateSealed()) ret._setAsyncGuaranteed();
- return ret;
-};
-
-Promise.all = function (promises) {
- return new PromiseArray(promises).promise();
-};
-
-Promise.cast = function (obj) {
- var ret = tryConvertToPromise(obj);
- if (!(ret instanceof Promise)) {
- ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._setFulfilled();
- ret._rejectionHandler0 = obj;
- }
- return ret;
-};
-
-Promise.resolve = Promise.fulfilled = Promise.cast;
-
-Promise.reject = Promise.rejected = function (reason) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._rejectCallback(reason, true);
- return ret;
-};
-
-Promise.setScheduler = function(fn) {
- if (typeof fn !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(fn));
- }
- return async.setScheduler(fn);
-};
-
-Promise.prototype._then = function (
- didFulfill,
- didReject,
- _, receiver,
- internalData
-) {
- var haveInternalData = internalData !== undefined;
- var promise = haveInternalData ? internalData : new Promise(INTERNAL);
- var target = this._target();
- var bitField = target._bitField;
-
- if (!haveInternalData) {
- promise._propagateFrom(this, 3);
- promise._captureStackTrace();
- if (receiver === undefined &&
- ((this._bitField & 2097152) !== 0)) {
- if (!((bitField & 50397184) === 0)) {
- receiver = this._boundValue();
- } else {
- receiver = target === this ? undefined : this._boundTo;
- }
- }
- this._fireEvent("promiseChained", this, promise);
- }
-
- var domain = getDomain();
- if (!((bitField & 50397184) === 0)) {
- var handler, value, settler = target._settlePromiseCtx;
- if (((bitField & 33554432) !== 0)) {
- value = target._rejectionHandler0;
- handler = didFulfill;
- } else if (((bitField & 16777216) !== 0)) {
- value = target._fulfillmentHandler0;
- handler = didReject;
- target._unsetRejectionIsUnhandled();
- } else {
- settler = target._settlePromiseLateCancellationObserver;
- value = new CancellationError("late cancellation observer");
- target._attachExtraTrace(value);
- handler = didReject;
- }
-
- async.invoke(settler, target, {
- handler: domain === null ? handler
- : (typeof handler === "function" &&
- util.domainBind(domain, handler)),
- promise: promise,
- receiver: receiver,
- value: value
- });
- } else {
- target._addCallbacks(didFulfill, didReject, promise, receiver, domain);
- }
-
- return promise;
-};
-
-Promise.prototype._length = function () {
- return this._bitField & 65535;
-};
-
-Promise.prototype._isFateSealed = function () {
- return (this._bitField & 117506048) !== 0;
-};
-
-Promise.prototype._isFollowing = function () {
- return (this._bitField & 67108864) === 67108864;
-};
-
-Promise.prototype._setLength = function (len) {
- this._bitField = (this._bitField & -65536) |
- (len & 65535);
-};
-
-Promise.prototype._setFulfilled = function () {
- this._bitField = this._bitField | 33554432;
- this._fireEvent("promiseFulfilled", this);
-};
-
-Promise.prototype._setRejected = function () {
- this._bitField = this._bitField | 16777216;
- this._fireEvent("promiseRejected", this);
-};
-
-Promise.prototype._setFollowing = function () {
- this._bitField = this._bitField | 67108864;
- this._fireEvent("promiseResolved", this);
-};
-
-Promise.prototype._setIsFinal = function () {
- this._bitField = this._bitField | 4194304;
-};
-
-Promise.prototype._isFinal = function () {
- return (this._bitField & 4194304) > 0;
-};
-
-Promise.prototype._unsetCancelled = function() {
- this._bitField = this._bitField & (~65536);
-};
-
-Promise.prototype._setCancelled = function() {
- this._bitField = this._bitField | 65536;
- this._fireEvent("promiseCancelled", this);
-};
-
-Promise.prototype._setWillBeCancelled = function() {
- this._bitField = this._bitField | 8388608;
-};
-
-Promise.prototype._setAsyncGuaranteed = function() {
- if (async.hasCustomScheduler()) return;
- this._bitField = this._bitField | 134217728;
-};
-
-Promise.prototype._receiverAt = function (index) {
- var ret = index === 0 ? this._receiver0 : this[
- index * 4 - 4 + 3];
- if (ret === UNDEFINED_BINDING) {
- return undefined;
- } else if (ret === undefined && this._isBound()) {
- return this._boundValue();
- }
- return ret;
-};
-
-Promise.prototype._promiseAt = function (index) {
- return this[
- index * 4 - 4 + 2];
-};
-
-Promise.prototype._fulfillmentHandlerAt = function (index) {
- return this[
- index * 4 - 4 + 0];
-};
-
-Promise.prototype._rejectionHandlerAt = function (index) {
- return this[
- index * 4 - 4 + 1];
-};
-
-Promise.prototype._boundValue = function() {};
-
-Promise.prototype._migrateCallback0 = function (follower) {
- var bitField = follower._bitField;
- var fulfill = follower._fulfillmentHandler0;
- var reject = follower._rejectionHandler0;
- var promise = follower._promise0;
- var receiver = follower._receiverAt(0);
- if (receiver === undefined) receiver = UNDEFINED_BINDING;
- this._addCallbacks(fulfill, reject, promise, receiver, null);
-};
-
-Promise.prototype._migrateCallbackAt = function (follower, index) {
- var fulfill = follower._fulfillmentHandlerAt(index);
- var reject = follower._rejectionHandlerAt(index);
- var promise = follower._promiseAt(index);
- var receiver = follower._receiverAt(index);
- if (receiver === undefined) receiver = UNDEFINED_BINDING;
- this._addCallbacks(fulfill, reject, promise, receiver, null);
-};
-
-Promise.prototype._addCallbacks = function (
- fulfill,
- reject,
- promise,
- receiver,
- domain
-) {
- var index = this._length();
-
- if (index >= 65535 - 4) {
- index = 0;
- this._setLength(0);
- }
-
- if (index === 0) {
- this._promise0 = promise;
- this._receiver0 = receiver;
- if (typeof fulfill === "function") {
- this._fulfillmentHandler0 =
- domain === null ? fulfill : util.domainBind(domain, fulfill);
- }
- if (typeof reject === "function") {
- this._rejectionHandler0 =
- domain === null ? reject : util.domainBind(domain, reject);
- }
- } else {
- var base = index * 4 - 4;
- this[base + 2] = promise;
- this[base + 3] = receiver;
- if (typeof fulfill === "function") {
- this[base + 0] =
- domain === null ? fulfill : util.domainBind(domain, fulfill);
- }
- if (typeof reject === "function") {
- this[base + 1] =
- domain === null ? reject : util.domainBind(domain, reject);
- }
- }
- this._setLength(index + 1);
- return index;
-};
-
-Promise.prototype._proxy = function (proxyable, arg) {
- this._addCallbacks(undefined, undefined, arg, proxyable, null);
-};
-
-Promise.prototype._resolveCallback = function(value, shouldBind) {
- if (((this._bitField & 117506048) !== 0)) return;
- if (value === this)
- return this._rejectCallback(makeSelfResolutionError(), false);
- var maybePromise = tryConvertToPromise(value, this);
- if (!(maybePromise instanceof Promise)) return this._fulfill(value);
-
- if (shouldBind) this._propagateFrom(maybePromise, 2);
-
- var promise = maybePromise._target();
-
- if (promise === this) {
- this._reject(makeSelfResolutionError());
- return;
- }
-
- var bitField = promise._bitField;
- if (((bitField & 50397184) === 0)) {
- var len = this._length();
- if (len > 0) promise._migrateCallback0(this);
- for (var i = 1; i < len; ++i) {
- promise._migrateCallbackAt(this, i);
- }
- this._setFollowing();
- this._setLength(0);
- this._setFollowee(promise);
- } else if (((bitField & 33554432) !== 0)) {
- this._fulfill(promise._value());
- } else if (((bitField & 16777216) !== 0)) {
- this._reject(promise._reason());
- } else {
- var reason = new CancellationError("late cancellation observer");
- promise._attachExtraTrace(reason);
- this._reject(reason);
- }
-};
-
-Promise.prototype._rejectCallback =
-function(reason, synchronous, ignoreNonErrorWarnings) {
- var trace = util.ensureErrorObject(reason);
- var hasStack = trace === reason;
- if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {
- var message = "a promise was rejected with a non-error: " +
- util.classString(reason);
- this._warn(message, true);
- }
- this._attachExtraTrace(trace, synchronous ? hasStack : false);
- this._reject(reason);
-};
-
-Promise.prototype._resolveFromExecutor = function (executor) {
- var promise = this;
- this._captureStackTrace();
- this._pushContext();
- var synchronous = true;
- var r = this._execute(executor, function(value) {
- promise._resolveCallback(value);
- }, function (reason) {
- promise._rejectCallback(reason, synchronous);
- });
- synchronous = false;
- this._popContext();
-
- if (r !== undefined) {
- promise._rejectCallback(r, true);
- }
-};
-
-Promise.prototype._settlePromiseFromHandler = function (
- handler, receiver, value, promise
-) {
- var bitField = promise._bitField;
- if (((bitField & 65536) !== 0)) return;
- promise._pushContext();
- var x;
- if (receiver === APPLY) {
- if (!value || typeof value.length !== "number") {
- x = errorObj;
- x.e = new TypeError("cannot .spread() a non-array: " +
- util.classString(value));
- } else {
- x = tryCatch(handler).apply(this._boundValue(), value);
- }
- } else {
- x = tryCatch(handler).call(receiver, value);
- }
- var promiseCreated = promise._popContext();
- bitField = promise._bitField;
- if (((bitField & 65536) !== 0)) return;
-
- if (x === NEXT_FILTER) {
- promise._reject(value);
- } else if (x === errorObj) {
- promise._rejectCallback(x.e, false);
- } else {
- debug.checkForgottenReturns(x, promiseCreated, "", promise, this);
- promise._resolveCallback(x);
- }
-};
-
-Promise.prototype._target = function() {
- var ret = this;
- while (ret._isFollowing()) ret = ret._followee();
- return ret;
-};
-
-Promise.prototype._followee = function() {
- return this._rejectionHandler0;
-};
-
-Promise.prototype._setFollowee = function(promise) {
- this._rejectionHandler0 = promise;
-};
-
-Promise.prototype._settlePromise = function(promise, handler, receiver, value) {
- var isPromise = promise instanceof Promise;
- var bitField = this._bitField;
- var asyncGuaranteed = ((bitField & 134217728) !== 0);
- if (((bitField & 65536) !== 0)) {
- if (isPromise) promise._invokeInternalOnCancel();
-
- if (receiver instanceof PassThroughHandlerContext &&
- receiver.isFinallyHandler()) {
- receiver.cancelPromise = promise;
- if (tryCatch(handler).call(receiver, value) === errorObj) {
- promise._reject(errorObj.e);
- }
- } else if (handler === reflectHandler) {
- promise._fulfill(reflectHandler.call(receiver));
- } else if (receiver instanceof Proxyable) {
- receiver._promiseCancelled(promise);
- } else if (isPromise || promise instanceof PromiseArray) {
- promise._cancel();
- } else {
- receiver.cancel();
- }
- } else if (typeof handler === "function") {
- if (!isPromise) {
- handler.call(receiver, value, promise);
- } else {
- if (asyncGuaranteed) promise._setAsyncGuaranteed();
- this._settlePromiseFromHandler(handler, receiver, value, promise);
- }
- } else if (receiver instanceof Proxyable) {
- if (!receiver._isResolved()) {
- if (((bitField & 33554432) !== 0)) {
- receiver._promiseFulfilled(value, promise);
- } else {
- receiver._promiseRejected(value, promise);
- }
- }
- } else if (isPromise) {
- if (asyncGuaranteed) promise._setAsyncGuaranteed();
- if (((bitField & 33554432) !== 0)) {
- promise._fulfill(value);
- } else {
- promise._reject(value);
- }
- }
-};
-
-Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) {
- var handler = ctx.handler;
- var promise = ctx.promise;
- var receiver = ctx.receiver;
- var value = ctx.value;
- if (typeof handler === "function") {
- if (!(promise instanceof Promise)) {
- handler.call(receiver, value, promise);
- } else {
- this._settlePromiseFromHandler(handler, receiver, value, promise);
- }
- } else if (promise instanceof Promise) {
- promise._reject(value);
- }
-};
-
-Promise.prototype._settlePromiseCtx = function(ctx) {
- this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value);
-};
-
-Promise.prototype._settlePromise0 = function(handler, value, bitField) {
- var promise = this._promise0;
- var receiver = this._receiverAt(0);
- this._promise0 = undefined;
- this._receiver0 = undefined;
- this._settlePromise(promise, handler, receiver, value);
-};
-
-Promise.prototype._clearCallbackDataAtIndex = function(index) {
- var base = index * 4 - 4;
- this[base + 2] =
- this[base + 3] =
- this[base + 0] =
- this[base + 1] = undefined;
-};
-
-Promise.prototype._fulfill = function (value) {
- var bitField = this._bitField;
- if (((bitField & 117506048) >>> 16)) return;
- if (value === this) {
- var err = makeSelfResolutionError();
- this._attachExtraTrace(err);
- return this._reject(err);
- }
- this._setFulfilled();
- this._rejectionHandler0 = value;
-
- if ((bitField & 65535) > 0) {
- if (((bitField & 134217728) !== 0)) {
- this._settlePromises();
- } else {
- async.settlePromises(this);
- }
- }
-};
-
-Promise.prototype._reject = function (reason) {
- var bitField = this._bitField;
- if (((bitField & 117506048) >>> 16)) return;
- this._setRejected();
- this._fulfillmentHandler0 = reason;
-
- if (this._isFinal()) {
- return async.fatalError(reason, util.isNode);
- }
-
- if ((bitField & 65535) > 0) {
- async.settlePromises(this);
- } else {
- this._ensurePossibleRejectionHandled();
- }
-};
-
-Promise.prototype._fulfillPromises = function (len, value) {
- for (var i = 1; i < len; i++) {
- var handler = this._fulfillmentHandlerAt(i);
- var promise = this._promiseAt(i);
- var receiver = this._receiverAt(i);
- this._clearCallbackDataAtIndex(i);
- this._settlePromise(promise, handler, receiver, value);
- }
-};
-
-Promise.prototype._rejectPromises = function (len, reason) {
- for (var i = 1; i < len; i++) {
- var handler = this._rejectionHandlerAt(i);
- var promise = this._promiseAt(i);
- var receiver = this._receiverAt(i);
- this._clearCallbackDataAtIndex(i);
- this._settlePromise(promise, handler, receiver, reason);
- }
-};
-
-Promise.prototype._settlePromises = function () {
- var bitField = this._bitField;
- var len = (bitField & 65535);
-
- if (len > 0) {
- if (((bitField & 16842752) !== 0)) {
- var reason = this._fulfillmentHandler0;
- this._settlePromise0(this._rejectionHandler0, reason, bitField);
- this._rejectPromises(len, reason);
- } else {
- var value = this._rejectionHandler0;
- this._settlePromise0(this._fulfillmentHandler0, value, bitField);
- this._fulfillPromises(len, value);
- }
- this._setLength(0);
- }
- this._clearCancellationData();
-};
-
-Promise.prototype._settledValue = function() {
- var bitField = this._bitField;
- if (((bitField & 33554432) !== 0)) {
- return this._rejectionHandler0;
- } else if (((bitField & 16777216) !== 0)) {
- return this._fulfillmentHandler0;
- }
-};
-
-function deferResolve(v) {this.promise._resolveCallback(v);}
-function deferReject(v) {this.promise._rejectCallback(v, false);}
-
-Promise.defer = Promise.pending = function() {
- debug.deprecated("Promise.defer", "new Promise");
- var promise = new Promise(INTERNAL);
- return {
- promise: promise,
- resolve: deferResolve,
- reject: deferReject
- };
-};
-
-util.notEnumerableProp(Promise,
- "_makeSelfResolutionError",
- makeSelfResolutionError);
-
-_dereq_("./method")(Promise, INTERNAL, tryConvertToPromise, apiRejection,
- debug);
-_dereq_("./bind")(Promise, INTERNAL, tryConvertToPromise, debug);
-_dereq_("./cancel")(Promise, PromiseArray, apiRejection, debug);
-_dereq_("./direct_resolve")(Promise);
-_dereq_("./synchronous_inspection")(Promise);
-_dereq_("./join")(
- Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain);
-Promise.Promise = Promise;
-Promise.version = "3.4.6";
-
- util.toFastProperties(Promise);
- util.toFastProperties(Promise.prototype);
- function fillTypes(value) {
- var p = new Promise(INTERNAL);
- p._fulfillmentHandler0 = value;
- p._rejectionHandler0 = value;
- p._promise0 = value;
- p._receiver0 = value;
- }
- // Complete slack tracking, opt out of field-type tracking and
- // stabilize map
- fillTypes({a: 1});
- fillTypes({b: 2});
- fillTypes({c: 3});
- fillTypes(1);
- fillTypes(function(){});
- fillTypes(undefined);
- fillTypes(false);
- fillTypes(new Promise(INTERNAL));
- debug.setBounds(Async.firstLineError, util.lastLineError);
- return Promise;
-
-};
-
-},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21}],16:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL, tryConvertToPromise,
- apiRejection, Proxyable) {
-var util = _dereq_("./util");
-var isArray = util.isArray;
-
-function toResolutionValue(val) {
- switch(val) {
- case -2: return [];
- case -3: return {};
- }
-}
-
-function PromiseArray(values) {
- var promise = this._promise = new Promise(INTERNAL);
- if (values instanceof Promise) {
- promise._propagateFrom(values, 3);
- }
- promise._setOnCancel(this);
- this._values = values;
- this._length = 0;
- this._totalResolved = 0;
- this._init(undefined, -2);
-}
-util.inherits(PromiseArray, Proxyable);
-
-PromiseArray.prototype.length = function () {
- return this._length;
-};
-
-PromiseArray.prototype.promise = function () {
- return this._promise;
-};
-
-PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
- var values = tryConvertToPromise(this._values, this._promise);
- if (values instanceof Promise) {
- values = values._target();
- var bitField = values._bitField;
- ;
- this._values = values;
-
- if (((bitField & 50397184) === 0)) {
- this._promise._setAsyncGuaranteed();
- return values._then(
- init,
- this._reject,
- undefined,
- this,
- resolveValueIfEmpty
- );
- } else if (((bitField & 33554432) !== 0)) {
- values = values._value();
- } else if (((bitField & 16777216) !== 0)) {
- return this._reject(values._reason());
- } else {
- return this._cancel();
- }
- }
- values = util.asArray(values);
- if (values === null) {
- var err = apiRejection(
- "expecting an array or an iterable object but got " + util.classString(values)).reason();
- this._promise._rejectCallback(err, false);
- return;
- }
-
- if (values.length === 0) {
- if (resolveValueIfEmpty === -5) {
- this._resolveEmptyArray();
- }
- else {
- this._resolve(toResolutionValue(resolveValueIfEmpty));
- }
- return;
- }
- this._iterate(values);
-};
-
-PromiseArray.prototype._iterate = function(values) {
- var len = this.getActualLength(values.length);
- this._length = len;
- this._values = this.shouldCopyValues() ? new Array(len) : this._values;
- var result = this._promise;
- var isResolved = false;
- var bitField = null;
- for (var i = 0; i < len; ++i) {
- var maybePromise = tryConvertToPromise(values[i], result);
-
- if (maybePromise instanceof Promise) {
- maybePromise = maybePromise._target();
- bitField = maybePromise._bitField;
- } else {
- bitField = null;
- }
-
- if (isResolved) {
- if (bitField !== null) {
- maybePromise.suppressUnhandledRejections();
- }
- } else if (bitField !== null) {
- if (((bitField & 50397184) === 0)) {
- maybePromise._proxy(this, i);
- this._values[i] = maybePromise;
- } else if (((bitField & 33554432) !== 0)) {
- isResolved = this._promiseFulfilled(maybePromise._value(), i);
- } else if (((bitField & 16777216) !== 0)) {
- isResolved = this._promiseRejected(maybePromise._reason(), i);
- } else {
- isResolved = this._promiseCancelled(i);
- }
- } else {
- isResolved = this._promiseFulfilled(maybePromise, i);
- }
- }
- if (!isResolved) result._setAsyncGuaranteed();
-};
-
-PromiseArray.prototype._isResolved = function () {
- return this._values === null;
-};
-
-PromiseArray.prototype._resolve = function (value) {
- this._values = null;
- this._promise._fulfill(value);
-};
-
-PromiseArray.prototype._cancel = function() {
- if (this._isResolved() || !this._promise._isCancellable()) return;
- this._values = null;
- this._promise._cancel();
-};
-
-PromiseArray.prototype._reject = function (reason) {
- this._values = null;
- this._promise._rejectCallback(reason, false);
-};
-
-PromiseArray.prototype._promiseFulfilled = function (value, index) {
- this._values[index] = value;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- this._resolve(this._values);
- return true;
- }
- return false;
-};
-
-PromiseArray.prototype._promiseCancelled = function() {
- this._cancel();
- return true;
-};
-
-PromiseArray.prototype._promiseRejected = function (reason) {
- this._totalResolved++;
- this._reject(reason);
- return true;
-};
-
-PromiseArray.prototype._resultCancelled = function() {
- if (this._isResolved()) return;
- var values = this._values;
- this._cancel();
- if (values instanceof Promise) {
- values.cancel();
- } else {
- for (var i = 0; i < values.length; ++i) {
- if (values[i] instanceof Promise) {
- values[i].cancel();
- }
- }
- }
-};
-
-PromiseArray.prototype.shouldCopyValues = function () {
- return true;
-};
-
-PromiseArray.prototype.getActualLength = function (len) {
- return len;
-};
-
-return PromiseArray;
-};
-
-},{"./util":21}],17:[function(_dereq_,module,exports){
-"use strict";
-function arrayMove(src, srcIndex, dst, dstIndex, len) {
- for (var j = 0; j < len; ++j) {
- dst[j + dstIndex] = src[j + srcIndex];
- src[j + srcIndex] = void 0;
- }
-}
-
-function Queue(capacity) {
- this._capacity = capacity;
- this._length = 0;
- this._front = 0;
-}
-
-Queue.prototype._willBeOverCapacity = function (size) {
- return this._capacity < size;
-};
-
-Queue.prototype._pushOne = function (arg) {
- var length = this.length();
- this._checkCapacity(length + 1);
- var i = (this._front + length) & (this._capacity - 1);
- this[i] = arg;
- this._length = length + 1;
-};
-
-Queue.prototype._unshiftOne = function(value) {
- var capacity = this._capacity;
- this._checkCapacity(this.length() + 1);
- var front = this._front;
- var i = (((( front - 1 ) &
- ( capacity - 1) ) ^ capacity ) - capacity );
- this[i] = value;
- this._front = i;
- this._length = this.length() + 1;
-};
-
-Queue.prototype.unshift = function(fn, receiver, arg) {
- this._unshiftOne(arg);
- this._unshiftOne(receiver);
- this._unshiftOne(fn);
-};
-
-Queue.prototype.push = function (fn, receiver, arg) {
- var length = this.length() + 3;
- if (this._willBeOverCapacity(length)) {
- this._pushOne(fn);
- this._pushOne(receiver);
- this._pushOne(arg);
- return;
- }
- var j = this._front + length - 3;
- this._checkCapacity(length);
- var wrapMask = this._capacity - 1;
- this[(j + 0) & wrapMask] = fn;
- this[(j + 1) & wrapMask] = receiver;
- this[(j + 2) & wrapMask] = arg;
- this._length = length;
-};
-
-Queue.prototype.shift = function () {
- var front = this._front,
- ret = this[front];
-
- this[front] = undefined;
- this._front = (front + 1) & (this._capacity - 1);
- this._length--;
- return ret;
-};
-
-Queue.prototype.length = function () {
- return this._length;
-};
-
-Queue.prototype._checkCapacity = function (size) {
- if (this._capacity < size) {
- this._resizeTo(this._capacity << 1);
- }
-};
-
-Queue.prototype._resizeTo = function (capacity) {
- var oldCapacity = this._capacity;
- this._capacity = capacity;
- var front = this._front;
- var length = this._length;
- var moveItemsCount = (front + length) & (oldCapacity - 1);
- arrayMove(this, 0, this, oldCapacity, moveItemsCount);
-};
-
-module.exports = Queue;
-
-},{}],18:[function(_dereq_,module,exports){
-"use strict";
-var util = _dereq_("./util");
-var schedule;
-var noAsyncScheduler = function() {
- throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
-};
-var NativePromise = util.getNativePromise();
-if (util.isNode && typeof MutationObserver === "undefined") {
- var GlobalSetImmediate = global.setImmediate;
- var ProcessNextTick = process.nextTick;
- schedule = util.isRecentNode
- ? function(fn) { GlobalSetImmediate.call(global, fn); }
- : function(fn) { ProcessNextTick.call(process, fn); };
-} else if (typeof NativePromise === "function" &&
- typeof NativePromise.resolve === "function") {
- var nativePromise = NativePromise.resolve();
- schedule = function(fn) {
- nativePromise.then(fn);
- };
-} else if ((typeof MutationObserver !== "undefined") &&
- !(typeof window !== "undefined" &&
- window.navigator &&
- (window.navigator.standalone || window.cordova))) {
- schedule = (function() {
- var div = document.createElement("div");
- var opts = {attributes: true};
- var toggleScheduled = false;
- var div2 = document.createElement("div");
- var o2 = new MutationObserver(function() {
- div.classList.toggle("foo");
- toggleScheduled = false;
- });
- o2.observe(div2, opts);
-
- var scheduleToggle = function() {
- if (toggleScheduled) return;
- toggleScheduled = true;
- div2.classList.toggle("foo");
- };
-
- return function schedule(fn) {
- var o = new MutationObserver(function() {
- o.disconnect();
- fn();
- });
- o.observe(div, opts);
- scheduleToggle();
- };
- })();
-} else if (typeof setImmediate !== "undefined") {
- schedule = function (fn) {
- setImmediate(fn);
- };
-} else if (typeof setTimeout !== "undefined") {
- schedule = function (fn) {
- setTimeout(fn, 0);
- };
-} else {
- schedule = noAsyncScheduler;
-}
-module.exports = schedule;
-
-},{"./util":21}],19:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-function PromiseInspection(promise) {
- if (promise !== undefined) {
- promise = promise._target();
- this._bitField = promise._bitField;
- this._settledValueField = promise._isFateSealed()
- ? promise._settledValue() : undefined;
- }
- else {
- this._bitField = 0;
- this._settledValueField = undefined;
- }
-}
-
-PromiseInspection.prototype._settledValue = function() {
- return this._settledValueField;
-};
-
-var value = PromiseInspection.prototype.value = function () {
- if (!this.isFulfilled()) {
- throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- return this._settledValue();
-};
-
-var reason = PromiseInspection.prototype.error =
-PromiseInspection.prototype.reason = function () {
- if (!this.isRejected()) {
- throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- return this._settledValue();
-};
-
-var isFulfilled = PromiseInspection.prototype.isFulfilled = function() {
- return (this._bitField & 33554432) !== 0;
-};
-
-var isRejected = PromiseInspection.prototype.isRejected = function () {
- return (this._bitField & 16777216) !== 0;
-};
-
-var isPending = PromiseInspection.prototype.isPending = function () {
- return (this._bitField & 50397184) === 0;
-};
-
-var isResolved = PromiseInspection.prototype.isResolved = function () {
- return (this._bitField & 50331648) !== 0;
-};
-
-PromiseInspection.prototype.isCancelled = function() {
- return (this._bitField & 8454144) !== 0;
-};
-
-Promise.prototype.__isCancelled = function() {
- return (this._bitField & 65536) === 65536;
-};
-
-Promise.prototype._isCancelled = function() {
- return this._target().__isCancelled();
-};
-
-Promise.prototype.isCancelled = function() {
- return (this._target()._bitField & 8454144) !== 0;
-};
-
-Promise.prototype.isPending = function() {
- return isPending.call(this._target());
-};
-
-Promise.prototype.isRejected = function() {
- return isRejected.call(this._target());
-};
-
-Promise.prototype.isFulfilled = function() {
- return isFulfilled.call(this._target());
-};
-
-Promise.prototype.isResolved = function() {
- return isResolved.call(this._target());
-};
-
-Promise.prototype.value = function() {
- return value.call(this._target());
-};
-
-Promise.prototype.reason = function() {
- var target = this._target();
- target._unsetRejectionIsUnhandled();
- return reason.call(target);
-};
-
-Promise.prototype._value = function() {
- return this._settledValue();
-};
-
-Promise.prototype._reason = function() {
- this._unsetRejectionIsUnhandled();
- return this._settledValue();
-};
-
-Promise.PromiseInspection = PromiseInspection;
-};
-
-},{}],20:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var util = _dereq_("./util");
-var errorObj = util.errorObj;
-var isObject = util.isObject;
-
-function tryConvertToPromise(obj, context) {
- if (isObject(obj)) {
- if (obj instanceof Promise) return obj;
- var then = getThen(obj);
- if (then === errorObj) {
- if (context) context._pushContext();
- var ret = Promise.reject(then.e);
- if (context) context._popContext();
- return ret;
- } else if (typeof then === "function") {
- if (isAnyBluebirdPromise(obj)) {
- var ret = new Promise(INTERNAL);
- obj._then(
- ret._fulfill,
- ret._reject,
- undefined,
- ret,
- null
- );
- return ret;
- }
- return doThenable(obj, then, context);
- }
- }
- return obj;
-}
-
-function doGetThen(obj) {
- return obj.then;
-}
-
-function getThen(obj) {
- try {
- return doGetThen(obj);
- } catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-var hasProp = {}.hasOwnProperty;
-function isAnyBluebirdPromise(obj) {
- try {
- return hasProp.call(obj, "_promise0");
- } catch (e) {
- return false;
- }
-}
-
-function doThenable(x, then, context) {
- var promise = new Promise(INTERNAL);
- var ret = promise;
- if (context) context._pushContext();
- promise._captureStackTrace();
- if (context) context._popContext();
- var synchronous = true;
- var result = util.tryCatch(then).call(x, resolve, reject);
- synchronous = false;
-
- if (promise && result === errorObj) {
- promise._rejectCallback(result.e, true, true);
- promise = null;
- }
-
- function resolve(value) {
- if (!promise) return;
- promise._resolveCallback(value);
- promise = null;
- }
-
- function reject(reason) {
- if (!promise) return;
- promise._rejectCallback(reason, synchronous, true);
- promise = null;
- }
- return ret;
-}
-
-return tryConvertToPromise;
-};
-
-},{"./util":21}],21:[function(_dereq_,module,exports){
-"use strict";
-var es5 = _dereq_("./es5");
-var canEvaluate = typeof navigator == "undefined";
-
-var errorObj = {e: {}};
-var tryCatchTarget;
-var globalObject = typeof self !== "undefined" ? self :
- typeof window !== "undefined" ? window :
- typeof global !== "undefined" ? global :
- this !== undefined ? this : null;
-
-function tryCatcher() {
- try {
- var target = tryCatchTarget;
- tryCatchTarget = null;
- return target.apply(this, arguments);
- } catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-function tryCatch(fn) {
- tryCatchTarget = fn;
- return tryCatcher;
-}
-
-var inherits = function(Child, Parent) {
- var hasProp = {}.hasOwnProperty;
-
- function T() {
- this.constructor = Child;
- this.constructor$ = Parent;
- for (var propertyName in Parent.prototype) {
- if (hasProp.call(Parent.prototype, propertyName) &&
- propertyName.charAt(propertyName.length-1) !== "$"
- ) {
- this[propertyName + "$"] = Parent.prototype[propertyName];
- }
- }
- }
- T.prototype = Parent.prototype;
- Child.prototype = new T();
- return Child.prototype;
-};
-
-
-function isPrimitive(val) {
- return val == null || val === true || val === false ||
- typeof val === "string" || typeof val === "number";
-
-}
-
-function isObject(value) {
- return typeof value === "function" ||
- typeof value === "object" && value !== null;
-}
-
-function maybeWrapAsError(maybeError) {
- if (!isPrimitive(maybeError)) return maybeError;
-
- return new Error(safeToString(maybeError));
-}
-
-function withAppended(target, appendee) {
- var len = target.length;
- var ret = new Array(len + 1);
- var i;
- for (i = 0; i < len; ++i) {
- ret[i] = target[i];
- }
- ret[i] = appendee;
- return ret;
-}
-
-function getDataPropertyOrDefault(obj, key, defaultValue) {
- if (es5.isES5) {
- var desc = Object.getOwnPropertyDescriptor(obj, key);
-
- if (desc != null) {
- return desc.get == null && desc.set == null
- ? desc.value
- : defaultValue;
- }
- } else {
- return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
- }
-}
-
-function notEnumerableProp(obj, name, value) {
- if (isPrimitive(obj)) return obj;
- var descriptor = {
- value: value,
- configurable: true,
- enumerable: false,
- writable: true
- };
- es5.defineProperty(obj, name, descriptor);
- return obj;
-}
-
-function thrower(r) {
- throw r;
-}
-
-var inheritedDataKeys = (function() {
- var excludedPrototypes = [
- Array.prototype,
- Object.prototype,
- Function.prototype
- ];
-
- var isExcludedProto = function(val) {
- for (var i = 0; i < excludedPrototypes.length; ++i) {
- if (excludedPrototypes[i] === val) {
- return true;
- }
- }
- return false;
- };
-
- if (es5.isES5) {
- var getKeys = Object.getOwnPropertyNames;
- return function(obj) {
- var ret = [];
- var visitedKeys = Object.create(null);
- while (obj != null && !isExcludedProto(obj)) {
- var keys;
- try {
- keys = getKeys(obj);
- } catch (e) {
- return ret;
- }
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (visitedKeys[key]) continue;
- visitedKeys[key] = true;
- var desc = Object.getOwnPropertyDescriptor(obj, key);
- if (desc != null && desc.get == null && desc.set == null) {
- ret.push(key);
- }
- }
- obj = es5.getPrototypeOf(obj);
- }
- return ret;
- };
- } else {
- var hasProp = {}.hasOwnProperty;
- return function(obj) {
- if (isExcludedProto(obj)) return [];
- var ret = [];
-
- /*jshint forin:false */
- enumeration: for (var key in obj) {
- if (hasProp.call(obj, key)) {
- ret.push(key);
- } else {
- for (var i = 0; i < excludedPrototypes.length; ++i) {
- if (hasProp.call(excludedPrototypes[i], key)) {
- continue enumeration;
- }
- }
- ret.push(key);
- }
- }
- return ret;
- };
- }
-
-})();
-
-var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/;
-function isClass(fn) {
- try {
- if (typeof fn === "function") {
- var keys = es5.names(fn.prototype);
-
- var hasMethods = es5.isES5 && keys.length > 1;
- var hasMethodsOtherThanConstructor = keys.length > 0 &&
- !(keys.length === 1 && keys[0] === "constructor");
- var hasThisAssignmentAndStaticMethods =
- thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0;
-
- if (hasMethods || hasMethodsOtherThanConstructor ||
- hasThisAssignmentAndStaticMethods) {
- return true;
- }
- }
- return false;
- } catch (e) {
- return false;
- }
-}
-
-function toFastProperties(obj) {
- /*jshint -W027,-W055,-W031*/
- function FakeConstructor() {}
- FakeConstructor.prototype = obj;
- var l = 8;
- while (l--) new FakeConstructor();
- return obj;
- eval(obj);
-}
-
-var rident = /^[a-z$_][a-z$_0-9]*$/i;
-function isIdentifier(str) {
- return rident.test(str);
-}
-
-function filledRange(count, prefix, suffix) {
- var ret = new Array(count);
- for(var i = 0; i < count; ++i) {
- ret[i] = prefix + i + suffix;
- }
- return ret;
-}
-
-function safeToString(obj) {
- try {
- return obj + "";
- } catch (e) {
- return "[no string representation]";
- }
-}
-
-function isError(obj) {
- return obj !== null &&
- typeof obj === "object" &&
- typeof obj.message === "string" &&
- typeof obj.name === "string";
-}
-
-function markAsOriginatingFromRejection(e) {
- try {
- notEnumerableProp(e, "isOperational", true);
- }
- catch(ignore) {}
-}
-
-function originatesFromRejection(e) {
- if (e == null) return false;
- return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
- e["isOperational"] === true);
-}
-
-function canAttachTrace(obj) {
- return isError(obj) && es5.propertyIsWritable(obj, "stack");
-}
-
-var ensureErrorObject = (function() {
- if (!("stack" in new Error())) {
- return function(value) {
- if (canAttachTrace(value)) return value;
- try {throw new Error(safeToString(value));}
- catch(err) {return err;}
- };
- } else {
- return function(value) {
- if (canAttachTrace(value)) return value;
- return new Error(safeToString(value));
- };
- }
-})();
-
-function classString(obj) {
- return {}.toString.call(obj);
-}
-
-function copyDescriptors(from, to, filter) {
- var keys = es5.names(from);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (filter(key)) {
- try {
- es5.defineProperty(to, key, es5.getDescriptor(from, key));
- } catch (ignore) {}
- }
- }
-}
-
-var asArray = function(v) {
- if (es5.isArray(v)) {
- return v;
- }
- return null;
-};
-
-if (typeof Symbol !== "undefined" && Symbol.iterator) {
- var ArrayFrom = typeof Array.from === "function" ? function(v) {
- return Array.from(v);
- } : function(v) {
- var ret = [];
- var it = v[Symbol.iterator]();
- var itResult;
- while (!((itResult = it.next()).done)) {
- ret.push(itResult.value);
- }
- return ret;
- };
-
- asArray = function(v) {
- if (es5.isArray(v)) {
- return v;
- } else if (v != null && typeof v[Symbol.iterator] === "function") {
- return ArrayFrom(v);
- }
- return null;
- };
-}
-
-var isNode = typeof process !== "undefined" &&
- classString(process).toLowerCase() === "[object process]";
-
-function env(key, def) {
- return isNode ? process.env[key] : def;
-}
-
-function getNativePromise() {
- if (typeof Promise === "function") {
- try {
- var promise = new Promise(function(){});
- if ({}.toString.call(promise) === "[object Promise]") {
- return Promise;
- }
- } catch (e) {}
- }
-}
-
-function domainBind(self, cb) {
- return self.bind(cb);
-}
-
-var ret = {
- isClass: isClass,
- isIdentifier: isIdentifier,
- inheritedDataKeys: inheritedDataKeys,
- getDataPropertyOrDefault: getDataPropertyOrDefault,
- thrower: thrower,
- isArray: es5.isArray,
- asArray: asArray,
- notEnumerableProp: notEnumerableProp,
- isPrimitive: isPrimitive,
- isObject: isObject,
- isError: isError,
- canEvaluate: canEvaluate,
- errorObj: errorObj,
- tryCatch: tryCatch,
- inherits: inherits,
- withAppended: withAppended,
- maybeWrapAsError: maybeWrapAsError,
- toFastProperties: toFastProperties,
- filledRange: filledRange,
- toString: safeToString,
- canAttachTrace: canAttachTrace,
- ensureErrorObject: ensureErrorObject,
- originatesFromRejection: originatesFromRejection,
- markAsOriginatingFromRejection: markAsOriginatingFromRejection,
- classString: classString,
- copyDescriptors: copyDescriptors,
- hasDevTools: typeof chrome !== "undefined" && chrome &&
- typeof chrome.loadTimes === "function",
- isNode: isNode,
- env: env,
- global: globalObject,
- getNativePromise: getNativePromise,
- domainBind: domainBind
-};
-ret.isRecentNode = ret.isNode && (function() {
- var version = process.versions.node.split(".").map(Number);
- return (version[0] === 0 && version[1] > 10) || (version[0] > 0);
-})();
-
-if (ret.isNode) ret.toFastProperties(process);
-
-try {throw new Error(); } catch (e) {ret.lastLineError = e;}
-module.exports = ret;
-
-},{"./es5":10}]},{},[3])(3)
-}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file
diff --git a/tools/eslint/node_modules/bluebird/js/browser/bluebird.core.min.js b/tools/eslint/node_modules/bluebird/js/browser/bluebird.core.min.js
deleted file mode 100644
index d5f6e66e68..0000000000
--- a/tools/eslint/node_modules/bluebird/js/browser/bluebird.core.min.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/* @preserve
- * The MIT License (MIT)
- *
- * Copyright (c) 2013-2015 Petka Antonov
- *
- * 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.
- *
- */
-/**
- * bluebird build version 3.4.6
- * Features enabled: core
- * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
-*/
-!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(a,s){if(!e[a]){if(!t[a]){var c="function"==typeof _dereq_&&_dereq_;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(t,e,n){"use strict";function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new u(16),this._normalQueue=new u(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=l}function i(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function o(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function a(t){this._normalQueue._pushOne(t),this._queueTick()}var s;try{throw new Error}catch(c){s=c}var l=t("./schedule"),u=t("./queue"),p=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){p.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},p.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?a.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=a),r.prototype.invokeFirst=function(t,e,n){this._normalQueue.unshift(t,e,n),this._queueTick()},r.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=s},{"./queue":17,"./schedule":18,"./util":21}],2:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var f={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,a,void 0,u,f),l._then(s,c,void 0,u,f),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],3:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":15}],4:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n<t.length;++n)this._doInvokeOnCancel(t[n],e);else if(void 0!==t)if("function"==typeof t){if(!e){var r=a(t).call(this._boundValue());r===s&&(this._attachExtraTrace(r.e),c.throwLater(r.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":21}],5:[function(t,e,n){"use strict";e.exports=function(e){function n(t,n,s){return function(c){var l=s._boundValue();t:for(var u=0;u<t.length;++u){var p=t[u];if(p===Error||null!=p&&p.prototype instanceof Error){if(c instanceof p)return o(n).call(l,c)}else if("function"==typeof p){var f=o(p).call(l,c);if(f===a)return f;if(f)return o(n).call(l,c)}else if(r.isObject(c)){for(var h=i(p),_=0;_<h.length;++_){var d=h[_];if(p[d]!=c[d])continue t}return o(n).call(l,c)}}return e}}var r=t("./util"),i=t("./es5").keys,o=r.tryCatch,a=r.errorObj;return n}},{"./es5":10,"./util":21}],6:[function(t,e,n){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(r())}function n(){return i?new e:void 0}function r(){var t=o.length-1;return t>=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],7:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+I.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function a(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?I.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function s(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function f(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function h(){this._trace=new S(this._peekContext())}function _(t,e){if(H(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=k(t);I.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),I.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(t,e,n,r,i){if(void 0===t&&null!==e&&X){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),c=C(s),l=c.length-1;l>=0;--l){var u=c[l];if(!V.test(u)){var p=u.match(Q);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var f=c[0],l=0;l<s.length;++l)if(s[l]===f){l>0&&(a="\n"+s[l-1]);break}}var h="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,e)}}function v(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),y(n)}function y(t,n,r){if(ot.warnings){var i,o=new U(t);if(n)r._attachExtraTrace(o);else if(ot.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var a=k(o);o.stack=a.message+"\n"+a.stack.join("\n")}tt("warning",o)||E(o,"",!0)}}function g(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}function m(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function b(t){for(var e=t[0],n=1;n<t.length;++n){for(var r=t[n],i=e.length-1,o=e[i],a=-1,s=r.length-1;s>=0;--s)if(r[s]===o){a=s;break}for(var s=a;s>=0;--s){var c=r[s];if(e[i]!==c)break;e.pop(),i--}e=r}}function C(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],i=" (No stack trace)"===r||q.test(r),o=i&&nt(r);i&&!o&&(M&&" "!==r.charAt(0)&&(r=" "+r),e.push(r))}return e}function w(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var r=e[n];if(" (No stack trace)"===r||q.test(r))break}return n>0&&(e=e.slice(n)),e}function k(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?w(t):[" (No stack trace)"],{message:n,stack:C(e)}}function E(t,e,n){if("undefined"!=typeof console){var r;if(I.isObject(t)){var i=t.stack;r=e+G(i,t)}else r=e+String(t);"function"==typeof L?L(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function j(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){B.throwLater(o)}"unhandledRejection"===t?tt(t,n,r)||i||E(n,"Unhandled rejection "):tt(t,r)}function F(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():I.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+T(e)+">, no stack trace)"}function T(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function O(){return"function"==typeof it}function P(t){var e=t.match(rt);return e?{fileName:e[1],line:parseInt(e[2],10)}:void 0}function R(t,e){if(O()){for(var n,r,i=t.stack.split("\n"),o=e.stack.split("\n"),a=-1,s=-1,c=0;c<i.length;++c){var l=P(i[c]);if(l){n=l.fileName,a=l.line;break}}for(var c=0;c<o.length;++c){var l=P(o[c]);if(l){r=l.fileName,s=l.line;break}}0>a||0>s||!n||!r||n!==r||a>=s||(nt=function(t){if(D.test(t))return!0;var e=P(t);return e&&e.fileName===n&&a<=e.line&&e.line<=s?!0:!1})}}function S(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);it(this,S),e>32&&this.uncycle()}var x,A,L,N=e._getDomain,B=e._async,U=t("./errors").Warning,I=t("./util"),H=I.canAttachTrace,D=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,V=/\((?:timers\.js):\d+:\d+\)/,Q=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,q=null,G=null,M=!1,W=!(0==I.env("BLUEBIRD_DEBUG")||!I.env("BLUEBIRD_DEBUG")&&"development"!==I.env("NODE_ENV")),$=!(0==I.env("BLUEBIRD_WARNINGS")||!W&&!I.env("BLUEBIRD_WARNINGS")),z=!(0==I.env("BLUEBIRD_LONG_STACK_TRACES")||!W&&!I.env("BLUEBIRD_LONG_STACK_TRACES")),X=0!=I.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&($||!!I.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),B.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){j("rejectionHandled",x,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),j("unhandledRejection",A,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return y(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=N();A="function"==typeof t?null===e?t:I.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=N();x="function"==typeof t?null===e?t:I.domainBind(e,t):void 0};var K=function(){};e.longStackTraces=function(){if(B.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ot.longStackTraces&&O()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace;ot.longStackTraces=!0,K=function(){if(B.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,n.deactivateLongStackTraces(),B.enableTrampoline(),ot.longStackTraces=!1},e.prototype._captureStackTrace=h,e.prototype._attachExtraTrace=_,n.activateLongStackTraces(),B.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return ot.longStackTraces&&O()};var J=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return I.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!I.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return I.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!I.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),I.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!I.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),Y=function(){return I.isNode?function(){return process.emit.apply(process,arguments)}:I.global?function(t){var e="on"+t.toLowerCase(),n=I.global[e];return n?(n.apply(I.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),Z={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},tt=function(t){var e=!1;try{e=Y.apply(null,arguments)}catch(n){B.throwLater(n),e=!0}var r=!1;try{r=J(t,Z[t].apply(null,arguments))}catch(n){B.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&K()),"warnings"in t){var n=t.warnings;ot.warnings=!!n,X=ot.warnings,I.isObject(n)&&"wForgottenReturn"in n&&(X=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ot.cancellation){if(B.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=s,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=a,e.prototype._execute=o,et=u,ot.cancellation=!0}"monitoring"in t&&(t.monitoring&&!ot.monitoring?(ot.monitoring=!0,e.prototype._fireEvent=tt):!t.monitoring&&ot.monitoring&&(ot.monitoring=!1,e.prototype._fireEvent=i))},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var et=p,nt=function(){return!1},rt=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;I.inherits(S,Error),n.CapturedTrace=S,S.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var a=e[r].stack,s=n[a];if(void 0!==s&&s!==r){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>s?(c._parent=e[s+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},S.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=k(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(C(i.stack.split("\n"))),i=i._parent;b(r),m(r),I.notEnumerableProp(t,"stack",g(n,r)),I.notEnumerableProp(t,"__stackCleaned__",!0)}};var it=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():F(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,q=t,G=e;var n=Error.captureStackTrace;return nt=function(t){return D.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return q=/@/,G=e,M=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(G=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?F(e):e.toString()},null):(q=t,G=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(L=function(t){console.warn(t)},I.isNode&&process.stderr.isTTY?L=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:I.isNode||"string"!=typeof(new Error).stack||(L=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ot={warnings:$,longStackTraces:!1,cancellation:!1,monitoring:!1};return z&&e.longStackTraces(),{longStackTraces:function(){return ot.longStackTraces},warnings:function(){return ot.warnings},cancellation:function(){return ot.cancellation},monitoring:function(){return ot.monitoring},propagateFromFunction:function(){return et},boundValueFunction:function(){return f},checkForgottenReturns:d,setBounds:R,warn:y,deprecated:v,CapturedTrace:S,fireDomEvent:J,fireGlobalEvent:Y}}},{"./errors":9,"./util":21}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],9:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,a,s=t("./es5"),c=s.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,f=r("Warning","warning"),h=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(v){o=r("TypeError","type error"),a=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g<y.length;++g)"function"==typeof Array.prototype[y[g]]&&(d.prototype[y[g]]=Array.prototype[y[g]]);s.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var m=0;d.prototype.toString=function(){var t=Array(4*m+1).join(" "),e="\n"+t+"AggregateError of:\n";m++,t=Array(4*m+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",i=r.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];r=i.join("\n"),e+=r+"\n"}return m--,e},u(i,Error);var b=Error.__BluebirdErrorTypes__;b||(b=c({CancellationError:h,TimeoutError:_,OperationalError:i,RejectionError:i,AggregateError:d}),s.defineProperty(Error,"__BluebirdErrorTypes__",{value:b,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:a,CancellationError:b.CancellationError,OperationalError:b.OperationalError,TimeoutError:b.TimeoutError,AggregateError:b.AggregateError,Warning:f}},{"./es5":10,"./util":21}],10:[function(t,e,n){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var i={}.hasOwnProperty,o={}.toString,a={}.constructor.prototype,s=function(t){var e=[];for(var n in t)i.call(t,n)&&e.push(n);return e},c=function(t,e){return{value:t[e]}},l=function(t,e,n){return t[e]=n.value,t},u=function(t){return t},p=function(t){try{return Object(t).constructor.prototype}catch(e){return a}},f=function(t){try{return"[object Array]"===o.call(t)}catch(e){return!1}};e.exports={isArray:f,keys:s,names:s,defineProperty:l,getDescriptor:c,freeze:u,getPrototypeOf:p,isES5:r,propertyIsWritable:function(){return!0}}}},{}],11:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function i(t){this.finallyHandler=t}function o(t,e){return null!=t.cancelPromise?(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function a(){return c.call(this,this.promise._target()._settledValue())}function s(t){return o(this,t)?void 0:(p.e=t,p)}function c(t){var r=this.promise,c=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?c.call(r._boundValue()):c.call(r._boundValue(),t);if(void 0!==l){r._setReturnedNonUndefined();var f=n(l,r);if(f instanceof e){if(null!=this.cancelPromise){if(f._isCancelled()){var h=new u("late cancellation observer");return r._attachExtraTrace(h),p.e=h,p}f.isPending()&&f._attachCancellationCallback(new i(this))}return f._then(a,s,void 0,this,void 0)}}}return r.isRejected()?(o(this),p.e=t,p):(o(this),t)}var l=t("./util"),u=e.CancellationError,p=l.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,c,c)},e.prototype.tap=function(t){return this._passThrough(t,1,c)},r}},{"./util":21}],12:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":21}],13:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=s(t).apply(this,arguments),a=r._popContext();return o.checkForgottenReturns(i,a,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+a.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=a.isArray(l)?s(t).apply(u,l):s(t).call(u,l)}else c=s(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":21}],14:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i<n.length;++i){var o=n[i];p.test(o)||(e[o]=t[o])}return e}return a.markAsOriginatingFromRejection(t),t}function o(t,e){return function(n,r){if(null!==t){if(n){var o=i(s(n));t._attachExtraTrace(o),t._reject(o)}else if(e){var a=[].slice.call(arguments,1);t._fulfill(a)}else t._fulfill(r);t=null}}}var a=t("./util"),s=a.maybeWrapAsError,c=t("./errors"),l=c.OperationalError,u=t("./es5"),p=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":9,"./es5":10,"./util":21}],15:[function(t,e,n){"use strict";e.exports=function(){function n(){}function r(t,e){if("function"!=typeof e)throw new g("expecting a function but got "+h.classString(e));if(t.constructor!==i)throw new g("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function i(t){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,t!==b&&(r(this,t),this._resolveFromExecutor(t)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function o(t){this.promise._resolveCallback(t)}function a(t){this.promise._rejectCallback(t,!1)}function s(t){var e=new i(b);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new g("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},u=function(){return new i.PromiseInspection(this._target())},p=function(t){return i.reject(new g(t))},f={},h=t("./util");c=h.isNode?function(){var t=process.domain;return void 0===t&&(t=null),t}:function(){return null},h.notEnumerableProp(i,"_getDomain",c);var _=t("./es5"),d=t("./async"),v=new d;_.defineProperty(i,"_async",{value:v});var y=t("./errors"),g=i.TypeError=y.TypeError;i.RangeError=y.RangeError;var m=i.CancellationError=y.CancellationError;i.TimeoutError=y.TimeoutError,i.OperationalError=y.OperationalError,i.RejectionError=y.OperationalError,i.AggregateError=y.AggregateError;var b=function(){},C={},w={},k=t("./thenables")(i,b),E=t("./promise_array")(i,b,k,p,n),j=t("./context")(i),F=(j.create,t("./debuggability")(i,j)),T=(F.CapturedTrace,t("./finally")(i,k)),O=t("./catch_filter")(w),P=t("./nodeback"),R=h.errorObj,S=h.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype["catch"]=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!h.isObject(o))return p("expecting an object but got A catch statement predicate "+h.classString(o));r[i++]=o}return r.length=i,t=arguments[n],this.then(void 0,O(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(F.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+h.classString(t);arguments.length>1&&(n+=", "+h.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+h.classString(t)):this.all()._then(t,void 0,void 0,C,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),
-new E(this).promise()},i.prototype.error=function(t){return this.caught(h.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=S(t)(P(e,n));return r===R&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new E(t).promise()},i.cast=function(t){var e=k(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+h.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var a=void 0!==o,s=a?o:new i(b),l=this._target(),u=l._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var p=c();if(0!==(50397184&u)){var f,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,f=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,f=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new m("late cancellation observer"),l._attachExtraTrace(_),f=e),v.invoke(d,l,{handler:null===p?f:"function"==typeof f&&h.domainBind(p,f),promise:s,receiver:r,value:_})}else l._addCallbacks(t,e,s,r,p);return s},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===f?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=f),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=f),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:h.domainBind(i,e));else{var a=4*o-4;this[a+2]=n,this[a+3]=r,"function"==typeof t&&(this[a+0]=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this[a+1]=null===i?e:h.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=k(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;a>s;++s)r._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new m("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=h.ensureErrorObject(t),i=r===t;if(!i&&!n&&F.warnings()){var o="a promise was rejected with a non-error: "+h.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===C?n&&"number"==typeof n.length?o=S(t).apply(this._boundValue(),n):(o=R,o.e=new g("cannot .spread() a non-array: "+h.classString(n))):o=S(t).call(e,n);var a=r._popContext();i=r._bitField,0===(65536&i)&&(o===w?r._reject(n):o===R?r._rejectCallback(o.e,!1):(F.checkForgottenReturns(o,a,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var a=t instanceof i,s=this._bitField,c=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,S(e).call(r,o)===R&&t._reject(R.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?a?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):a&&(c&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this))}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,h.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){F.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:a}},h.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,k,p,F),t("./bind")(i,b,k,F),t("./cancel")(i,E,p,F),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,E,k,b,v,c),i.Promise=i,i.version="3.4.6",h.toFastProperties(i),h.toFastProperties(i.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new i(b)),F.setBounds(d.firstLineError,h.lastLineError),i}},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function a(t){switch(t){case-2:return[];case-3:return{}}}function s(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var s=o._bitField;if(this._values=o,0===(50397184&s))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&s))return 0!==(16777216&s)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(a(n))):void this._iterate(o)},s.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,a=null,s=0;n>s;++s){var c=r(t[s],i);c instanceof e?(c=c._target(),a=c._bitField):a=null,o?null!==a&&c.suppressUnhandledRejections():null!==a?0===(50397184&a)?(c._proxy(this,s),this._values[s]=c):o=0!==(33554432&a)?this._promiseFulfilled(c._value(),s):0!==(16777216&a)?this._promiseRejected(c._reason(),s):this._promiseCancelled(s):o=this._promiseFulfilled(c,s)}o||i._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n<t.length;++n)t[n]instanceof e&&t[n].cancel()}},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},{"./util":21}],17:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var n=this._front+e&this._capacity-1;this[n]=t,this._length=e+1},i.prototype._unshiftOne=function(t){var e=this._capacity;this._checkCapacity(this.length()+1);var n=this._front,r=(n-1&e-1^e)-e;this[r]=t,this._front=r,this._length=this.length()+1},i.prototype.unshift=function(t,e,n){this._unshiftOne(n),this._unshiftOne(e),this._unshiftOne(t)},i.prototype.push=function(t,e,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var i=this._front+r-3;this._checkCapacity(r);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=n,this._length=r},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var n=this._front,i=this._length,o=n+i&e-1;r(this,0,this,e,o)},e.exports=i},{}],18:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},a=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var s=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){s.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof a&&"function"==typeof a.resolve){var l=a.resolve();r=function(t){l.then(t)}}else r="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o:function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});i.observe(r,e);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),o()}}();e.exports=r},{"./util":21}],19:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],20:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var i=o(t);if(i===l){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(a(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return s(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(e){return l.e=e,l}}function a(t){try{return p.call(t,"_promise0")}catch(e){return!1}}function s(t,r,i){function o(t){s&&(s._resolveCallback(t),s=null)}function a(t){s&&(s._rejectCallback(t,p,!0),s=null)}var s=new e(n),u=s;i&&i._pushContext(),s._captureStackTrace(),i&&i._popContext();var p=!0,f=c.tryCatch(r).call(t,o,a);return p=!1,s&&f===l&&(s._rejectCallback(f.e,!0,!0),s=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":21}],21:[function(t,e,n){"use strict";function r(){try{var t=P;return P=null,t.apply(this,arguments)}catch(e){return O.e=e,O}}function i(t){return P=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function a(t){return"function"==typeof t||"object"==typeof t&&null!==t}function s(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function f(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function h(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function _(t){return L.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{u(t,"isOperational",!0)}catch(e){}}function m(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function C(t){return{}.toString.call(t)}function w(t,e,n){for(var r=F.names(t),i=0;i<r.length;++i){var o=r[i];if(n(o))try{F.defineProperty(e,o,F.getDescriptor(t,o))}catch(a){}}}function k(t,e){return I?process.env[t]:e}function E(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(e){}}function j(t,e){return t.bind(e)}var F=t("./es5"),T="undefined"==typeof navigator,O={e:{}},P,R="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,S=function(t,e){function n(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}var r={}.hasOwnProperty;return n.prototype=e.prototype,t.prototype=new n,t.prototype},x=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var n=0;n<t.length;++n)if(t[n]===e)return!0;return!1};if(F.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=n(t)}catch(a){return r}for(var s=0;s<o.length;++s){var c=o[s];if(!i[c]){i[c]=!0;var l=Object.getOwnPropertyDescriptor(t,c);null!=l&&null==l.get&&null==l.set&&r.push(c)}}t=F.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var i=[];t:for(var o in n)if(r.call(n,o))i.push(o);else{for(var a=0;a<t.length;++a)if(r.call(t[a],o))continue t;i.push(o)}return i}}(),A=/this\s*\.\s*\S+\s*=/,L=/^[a-z$_][a-z$_0-9]*$/i,N=function(){return"stack"in new Error?function(t){return b(t)?t:new Error(v(t))}:function(t){if(b(t))return t;try{throw new Error(v(t))}catch(e){return e}}}(),B=function(t){return F.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var U="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],r=t[Symbol.iterator]();!(e=r.next()).done;)n.push(e.value);return n};B=function(t){return F.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?U(t):null}}var I="undefined"!=typeof process&&"[object process]"===C(process).toLowerCase(),H={isClass:f,isIdentifier:_,inheritedDataKeys:x,getDataPropertyOrDefault:l,thrower:p,isArray:F.isArray,asArray:B,notEnumerableProp:u,isPrimitive:o,isObject:a,isError:y,canEvaluate:T,errorObj:O,tryCatch:i,inherits:S,withAppended:c,maybeWrapAsError:s,toFastProperties:h,filledRange:d,toString:v,canAttachTrace:b,ensureErrorObject:N,originatesFromRejection:m,markAsOriginatingFromRejection:g,classString:C,copyDescriptors:w,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:I,env:k,global:R,getNativePromise:E,domainBind:j};H.isRecentNode=H.isNode&&function(){var t=process.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),H.isNode&&H.toFastProperties(process);try{throw new Error}catch(D){H.lastLineError=D}e.exports=H},{"./es5":10}]},{},[3])(3)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file
diff --git a/tools/eslint/node_modules/bluebird/js/browser/bluebird.js b/tools/eslint/node_modules/bluebird/js/browser/bluebird.js
deleted file mode 100644
index 4bae478b9e..0000000000
--- a/tools/eslint/node_modules/bluebird/js/browser/bluebird.js
+++ /dev/null
@@ -1,5598 +0,0 @@
-/* @preserve
- * The MIT License (MIT)
- *
- * Copyright (c) 2013-2015 Petka Antonov
- *
- * 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.
- *
- */
-/**
- * bluebird build version 3.4.6
- * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
-*/
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-var SomePromiseArray = Promise._SomePromiseArray;
-function any(promises) {
- var ret = new SomePromiseArray(promises);
- var promise = ret.promise();
- ret.setHowMany(1);
- ret.setUnwrap();
- ret.init();
- return promise;
-}
-
-Promise.any = function (promises) {
- return any(promises);
-};
-
-Promise.prototype.any = function () {
- return any(this);
-};
-
-};
-
-},{}],2:[function(_dereq_,module,exports){
-"use strict";
-var firstLineError;
-try {throw new Error(); } catch (e) {firstLineError = e;}
-var schedule = _dereq_("./schedule");
-var Queue = _dereq_("./queue");
-var util = _dereq_("./util");
-
-function Async() {
- this._customScheduler = false;
- this._isTickUsed = false;
- this._lateQueue = new Queue(16);
- this._normalQueue = new Queue(16);
- this._haveDrainedQueues = false;
- this._trampolineEnabled = true;
- var self = this;
- this.drainQueues = function () {
- self._drainQueues();
- };
- this._schedule = schedule;
-}
-
-Async.prototype.setScheduler = function(fn) {
- var prev = this._schedule;
- this._schedule = fn;
- this._customScheduler = true;
- return prev;
-};
-
-Async.prototype.hasCustomScheduler = function() {
- return this._customScheduler;
-};
-
-Async.prototype.enableTrampoline = function() {
- this._trampolineEnabled = true;
-};
-
-Async.prototype.disableTrampolineIfNecessary = function() {
- if (util.hasDevTools) {
- this._trampolineEnabled = false;
- }
-};
-
-Async.prototype.haveItemsQueued = function () {
- return this._isTickUsed || this._haveDrainedQueues;
-};
-
-
-Async.prototype.fatalError = function(e, isNode) {
- if (isNode) {
- process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) +
- "\n");
- process.exit(2);
- } else {
- this.throwLater(e);
- }
-};
-
-Async.prototype.throwLater = function(fn, arg) {
- if (arguments.length === 1) {
- arg = fn;
- fn = function () { throw arg; };
- }
- if (typeof setTimeout !== "undefined") {
- setTimeout(function() {
- fn(arg);
- }, 0);
- } else try {
- this._schedule(function() {
- fn(arg);
- });
- } catch (e) {
- throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
-};
-
-function AsyncInvokeLater(fn, receiver, arg) {
- this._lateQueue.push(fn, receiver, arg);
- this._queueTick();
-}
-
-function AsyncInvoke(fn, receiver, arg) {
- this._normalQueue.push(fn, receiver, arg);
- this._queueTick();
-}
-
-function AsyncSettlePromises(promise) {
- this._normalQueue._pushOne(promise);
- this._queueTick();
-}
-
-if (!util.hasDevTools) {
- Async.prototype.invokeLater = AsyncInvokeLater;
- Async.prototype.invoke = AsyncInvoke;
- Async.prototype.settlePromises = AsyncSettlePromises;
-} else {
- Async.prototype.invokeLater = function (fn, receiver, arg) {
- if (this._trampolineEnabled) {
- AsyncInvokeLater.call(this, fn, receiver, arg);
- } else {
- this._schedule(function() {
- setTimeout(function() {
- fn.call(receiver, arg);
- }, 100);
- });
- }
- };
-
- Async.prototype.invoke = function (fn, receiver, arg) {
- if (this._trampolineEnabled) {
- AsyncInvoke.call(this, fn, receiver, arg);
- } else {
- this._schedule(function() {
- fn.call(receiver, arg);
- });
- }
- };
-
- Async.prototype.settlePromises = function(promise) {
- if (this._trampolineEnabled) {
- AsyncSettlePromises.call(this, promise);
- } else {
- this._schedule(function() {
- promise._settlePromises();
- });
- }
- };
-}
-
-Async.prototype.invokeFirst = function (fn, receiver, arg) {
- this._normalQueue.unshift(fn, receiver, arg);
- this._queueTick();
-};
-
-Async.prototype._drainQueue = function(queue) {
- while (queue.length() > 0) {
- var fn = queue.shift();
- if (typeof fn !== "function") {
- fn._settlePromises();
- continue;
- }
- var receiver = queue.shift();
- var arg = queue.shift();
- fn.call(receiver, arg);
- }
-};
-
-Async.prototype._drainQueues = function () {
- this._drainQueue(this._normalQueue);
- this._reset();
- this._haveDrainedQueues = true;
- this._drainQueue(this._lateQueue);
-};
-
-Async.prototype._queueTick = function () {
- if (!this._isTickUsed) {
- this._isTickUsed = true;
- this._schedule(this.drainQueues);
- }
-};
-
-Async.prototype._reset = function () {
- this._isTickUsed = false;
-};
-
-module.exports = Async;
-module.exports.firstLineError = firstLineError;
-
-},{"./queue":26,"./schedule":29,"./util":36}],3:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) {
-var calledBind = false;
-var rejectThis = function(_, e) {
- this._reject(e);
-};
-
-var targetRejected = function(e, context) {
- context.promiseRejectionQueued = true;
- context.bindingPromise._then(rejectThis, rejectThis, null, this, e);
-};
-
-var bindingResolved = function(thisArg, context) {
- if (((this._bitField & 50397184) === 0)) {
- this._resolveCallback(context.target);
- }
-};
-
-var bindingRejected = function(e, context) {
- if (!context.promiseRejectionQueued) this._reject(e);
-};
-
-Promise.prototype.bind = function (thisArg) {
- if (!calledBind) {
- calledBind = true;
- Promise.prototype._propagateFrom = debug.propagateFromFunction();
- Promise.prototype._boundValue = debug.boundValueFunction();
- }
- var maybePromise = tryConvertToPromise(thisArg);
- var ret = new Promise(INTERNAL);
- ret._propagateFrom(this, 1);
- var target = this._target();
- ret._setBoundTo(maybePromise);
- if (maybePromise instanceof Promise) {
- var context = {
- promiseRejectionQueued: false,
- promise: ret,
- target: target,
- bindingPromise: maybePromise
- };
- target._then(INTERNAL, targetRejected, undefined, ret, context);
- maybePromise._then(
- bindingResolved, bindingRejected, undefined, ret, context);
- ret._setOnCancel(maybePromise);
- } else {
- ret._resolveCallback(target);
- }
- return ret;
-};
-
-Promise.prototype._setBoundTo = function (obj) {
- if (obj !== undefined) {
- this._bitField = this._bitField | 2097152;
- this._boundTo = obj;
- } else {
- this._bitField = this._bitField & (~2097152);
- }
-};
-
-Promise.prototype._isBound = function () {
- return (this._bitField & 2097152) === 2097152;
-};
-
-Promise.bind = function (thisArg, value) {
- return Promise.resolve(value).bind(thisArg);
-};
-};
-
-},{}],4:[function(_dereq_,module,exports){
-"use strict";
-var old;
-if (typeof Promise !== "undefined") old = Promise;
-function noConflict() {
- try { if (Promise === bluebird) Promise = old; }
- catch (e) {}
- return bluebird;
-}
-var bluebird = _dereq_("./promise")();
-bluebird.noConflict = noConflict;
-module.exports = bluebird;
-
-},{"./promise":22}],5:[function(_dereq_,module,exports){
-"use strict";
-var cr = Object.create;
-if (cr) {
- var callerCache = cr(null);
- var getterCache = cr(null);
- callerCache[" size"] = getterCache[" size"] = 0;
-}
-
-module.exports = function(Promise) {
-var util = _dereq_("./util");
-var canEvaluate = util.canEvaluate;
-var isIdentifier = util.isIdentifier;
-
-var getMethodCaller;
-var getGetter;
-if (!true) {
-var makeMethodCaller = function (methodName) {
- return new Function("ensureMethod", " \n\
- return function(obj) { \n\
- 'use strict' \n\
- var len = this.length; \n\
- ensureMethod(obj, 'methodName'); \n\
- switch(len) { \n\
- case 1: return obj.methodName(this[0]); \n\
- case 2: return obj.methodName(this[0], this[1]); \n\
- case 3: return obj.methodName(this[0], this[1], this[2]); \n\
- case 0: return obj.methodName(); \n\
- default: \n\
- return obj.methodName.apply(obj, this); \n\
- } \n\
- }; \n\
- ".replace(/methodName/g, methodName))(ensureMethod);
-};
-
-var makeGetter = function (propertyName) {
- return new Function("obj", " \n\
- 'use strict'; \n\
- return obj.propertyName; \n\
- ".replace("propertyName", propertyName));
-};
-
-var getCompiled = function(name, compiler, cache) {
- var ret = cache[name];
- if (typeof ret !== "function") {
- if (!isIdentifier(name)) {
- return null;
- }
- ret = compiler(name);
- cache[name] = ret;
- cache[" size"]++;
- if (cache[" size"] > 512) {
- var keys = Object.keys(cache);
- for (var i = 0; i < 256; ++i) delete cache[keys[i]];
- cache[" size"] = keys.length - 256;
- }
- }
- return ret;
-};
-
-getMethodCaller = function(name) {
- return getCompiled(name, makeMethodCaller, callerCache);
-};
-
-getGetter = function(name) {
- return getCompiled(name, makeGetter, getterCache);
-};
-}
-
-function ensureMethod(obj, methodName) {
- var fn;
- if (obj != null) fn = obj[methodName];
- if (typeof fn !== "function") {
- var message = "Object " + util.classString(obj) + " has no method '" +
- util.toString(methodName) + "'";
- throw new Promise.TypeError(message);
- }
- return fn;
-}
-
-function caller(obj) {
- var methodName = this.pop();
- var fn = ensureMethod(obj, methodName);
- return fn.apply(obj, this);
-}
-Promise.prototype.call = function (methodName) {
- var args = [].slice.call(arguments, 1);;
- if (!true) {
- if (canEvaluate) {
- var maybeCaller = getMethodCaller(methodName);
- if (maybeCaller !== null) {
- return this._then(
- maybeCaller, undefined, undefined, args, undefined);
- }
- }
- }
- args.push(methodName);
- return this._then(caller, undefined, undefined, args, undefined);
-};
-
-function namedGetter(obj) {
- return obj[this];
-}
-function indexedGetter(obj) {
- var index = +this;
- if (index < 0) index = Math.max(0, index + obj.length);
- return obj[index];
-}
-Promise.prototype.get = function (propertyName) {
- var isIndex = (typeof propertyName === "number");
- var getter;
- if (!isIndex) {
- if (canEvaluate) {
- var maybeGetter = getGetter(propertyName);
- getter = maybeGetter !== null ? maybeGetter : namedGetter;
- } else {
- getter = namedGetter;
- }
- } else {
- getter = indexedGetter;
- }
- return this._then(getter, undefined, undefined, propertyName, undefined);
-};
-};
-
-},{"./util":36}],6:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, PromiseArray, apiRejection, debug) {
-var util = _dereq_("./util");
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-var async = Promise._async;
-
-Promise.prototype["break"] = Promise.prototype.cancel = function() {
- if (!debug.cancellation()) return this._warn("cancellation is disabled");
-
- var promise = this;
- var child = promise;
- while (promise._isCancellable()) {
- if (!promise._cancelBy(child)) {
- if (child._isFollowing()) {
- child._followee().cancel();
- } else {
- child._cancelBranched();
- }
- break;
- }
-
- var parent = promise._cancellationParent;
- if (parent == null || !parent._isCancellable()) {
- if (promise._isFollowing()) {
- promise._followee().cancel();
- } else {
- promise._cancelBranched();
- }
- break;
- } else {
- if (promise._isFollowing()) promise._followee().cancel();
- promise._setWillBeCancelled();
- child = promise;
- promise = parent;
- }
- }
-};
-
-Promise.prototype._branchHasCancelled = function() {
- this._branchesRemainingToCancel--;
-};
-
-Promise.prototype._enoughBranchesHaveCancelled = function() {
- return this._branchesRemainingToCancel === undefined ||
- this._branchesRemainingToCancel <= 0;
-};
-
-Promise.prototype._cancelBy = function(canceller) {
- if (canceller === this) {
- this._branchesRemainingToCancel = 0;
- this._invokeOnCancel();
- return true;
- } else {
- this._branchHasCancelled();
- if (this._enoughBranchesHaveCancelled()) {
- this._invokeOnCancel();
- return true;
- }
- }
- return false;
-};
-
-Promise.prototype._cancelBranched = function() {
- if (this._enoughBranchesHaveCancelled()) {
- this._cancel();
- }
-};
-
-Promise.prototype._cancel = function() {
- if (!this._isCancellable()) return;
- this._setCancelled();
- async.invoke(this._cancelPromises, this, undefined);
-};
-
-Promise.prototype._cancelPromises = function() {
- if (this._length() > 0) this._settlePromises();
-};
-
-Promise.prototype._unsetOnCancel = function() {
- this._onCancelField = undefined;
-};
-
-Promise.prototype._isCancellable = function() {
- return this.isPending() && !this._isCancelled();
-};
-
-Promise.prototype.isCancellable = function() {
- return this.isPending() && !this.isCancelled();
-};
-
-Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) {
- if (util.isArray(onCancelCallback)) {
- for (var i = 0; i < onCancelCallback.length; ++i) {
- this._doInvokeOnCancel(onCancelCallback[i], internalOnly);
- }
- } else if (onCancelCallback !== undefined) {
- if (typeof onCancelCallback === "function") {
- if (!internalOnly) {
- var e = tryCatch(onCancelCallback).call(this._boundValue());
- if (e === errorObj) {
- this._attachExtraTrace(e.e);
- async.throwLater(e.e);
- }
- }
- } else {
- onCancelCallback._resultCancelled(this);
- }
- }
-};
-
-Promise.prototype._invokeOnCancel = function() {
- var onCancelCallback = this._onCancel();
- this._unsetOnCancel();
- async.invoke(this._doInvokeOnCancel, this, onCancelCallback);
-};
-
-Promise.prototype._invokeInternalOnCancel = function() {
- if (this._isCancellable()) {
- this._doInvokeOnCancel(this._onCancel(), true);
- this._unsetOnCancel();
- }
-};
-
-Promise.prototype._resultCancelled = function() {
- this.cancel();
-};
-
-};
-
-},{"./util":36}],7:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(NEXT_FILTER) {
-var util = _dereq_("./util");
-var getKeys = _dereq_("./es5").keys;
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-
-function catchFilter(instances, cb, promise) {
- return function(e) {
- var boundTo = promise._boundValue();
- predicateLoop: for (var i = 0; i < instances.length; ++i) {
- var item = instances[i];
-
- if (item === Error ||
- (item != null && item.prototype instanceof Error)) {
- if (e instanceof item) {
- return tryCatch(cb).call(boundTo, e);
- }
- } else if (typeof item === "function") {
- var matchesPredicate = tryCatch(item).call(boundTo, e);
- if (matchesPredicate === errorObj) {
- return matchesPredicate;
- } else if (matchesPredicate) {
- return tryCatch(cb).call(boundTo, e);
- }
- } else if (util.isObject(e)) {
- var keys = getKeys(item);
- for (var j = 0; j < keys.length; ++j) {
- var key = keys[j];
- if (item[key] != e[key]) {
- continue predicateLoop;
- }
- }
- return tryCatch(cb).call(boundTo, e);
- }
- }
- return NEXT_FILTER;
- };
-}
-
-return catchFilter;
-};
-
-},{"./es5":13,"./util":36}],8:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-var longStackTraces = false;
-var contextStack = [];
-
-Promise.prototype._promiseCreated = function() {};
-Promise.prototype._pushContext = function() {};
-Promise.prototype._popContext = function() {return null;};
-Promise._peekContext = Promise.prototype._peekContext = function() {};
-
-function Context() {
- this._trace = new Context.CapturedTrace(peekContext());
-}
-Context.prototype._pushContext = function () {
- if (this._trace !== undefined) {
- this._trace._promiseCreated = null;
- contextStack.push(this._trace);
- }
-};
-
-Context.prototype._popContext = function () {
- if (this._trace !== undefined) {
- var trace = contextStack.pop();
- var ret = trace._promiseCreated;
- trace._promiseCreated = null;
- return ret;
- }
- return null;
-};
-
-function createContext() {
- if (longStackTraces) return new Context();
-}
-
-function peekContext() {
- var lastIndex = contextStack.length - 1;
- if (lastIndex >= 0) {
- return contextStack[lastIndex];
- }
- return undefined;
-}
-Context.CapturedTrace = null;
-Context.create = createContext;
-Context.deactivateLongStackTraces = function() {};
-Context.activateLongStackTraces = function() {
- var Promise_pushContext = Promise.prototype._pushContext;
- var Promise_popContext = Promise.prototype._popContext;
- var Promise_PeekContext = Promise._peekContext;
- var Promise_peekContext = Promise.prototype._peekContext;
- var Promise_promiseCreated = Promise.prototype._promiseCreated;
- Context.deactivateLongStackTraces = function() {
- Promise.prototype._pushContext = Promise_pushContext;
- Promise.prototype._popContext = Promise_popContext;
- Promise._peekContext = Promise_PeekContext;
- Promise.prototype._peekContext = Promise_peekContext;
- Promise.prototype._promiseCreated = Promise_promiseCreated;
- longStackTraces = false;
- };
- longStackTraces = true;
- Promise.prototype._pushContext = Context.prototype._pushContext;
- Promise.prototype._popContext = Context.prototype._popContext;
- Promise._peekContext = Promise.prototype._peekContext = peekContext;
- Promise.prototype._promiseCreated = function() {
- var ctx = this._peekContext();
- if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this;
- };
-};
-return Context;
-};
-
-},{}],9:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, Context) {
-var getDomain = Promise._getDomain;
-var async = Promise._async;
-var Warning = _dereq_("./errors").Warning;
-var util = _dereq_("./util");
-var canAttachTrace = util.canAttachTrace;
-var unhandledRejectionHandled;
-var possiblyUnhandledRejection;
-var bluebirdFramePattern =
- /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;
-var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/;
-var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/;
-var stackFramePattern = null;
-var formatStack = null;
-var indentStackFrames = false;
-var printWarning;
-var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 &&
- (true ||
- util.env("BLUEBIRD_DEBUG") ||
- util.env("NODE_ENV") === "development"));
-
-var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 &&
- (debugging || util.env("BLUEBIRD_WARNINGS")));
-
-var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 &&
- (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES")));
-
-var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 &&
- (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN"));
-
-Promise.prototype.suppressUnhandledRejections = function() {
- var target = this._target();
- target._bitField = ((target._bitField & (~1048576)) |
- 524288);
-};
-
-Promise.prototype._ensurePossibleRejectionHandled = function () {
- if ((this._bitField & 524288) !== 0) return;
- this._setRejectionIsUnhandled();
- async.invokeLater(this._notifyUnhandledRejection, this, undefined);
-};
-
-Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
- fireRejectionEvent("rejectionHandled",
- unhandledRejectionHandled, undefined, this);
-};
-
-Promise.prototype._setReturnedNonUndefined = function() {
- this._bitField = this._bitField | 268435456;
-};
-
-Promise.prototype._returnedNonUndefined = function() {
- return (this._bitField & 268435456) !== 0;
-};
-
-Promise.prototype._notifyUnhandledRejection = function () {
- if (this._isRejectionUnhandled()) {
- var reason = this._settledValue();
- this._setUnhandledRejectionIsNotified();
- fireRejectionEvent("unhandledRejection",
- possiblyUnhandledRejection, reason, this);
- }
-};
-
-Promise.prototype._setUnhandledRejectionIsNotified = function () {
- this._bitField = this._bitField | 262144;
-};
-
-Promise.prototype._unsetUnhandledRejectionIsNotified = function () {
- this._bitField = this._bitField & (~262144);
-};
-
-Promise.prototype._isUnhandledRejectionNotified = function () {
- return (this._bitField & 262144) > 0;
-};
-
-Promise.prototype._setRejectionIsUnhandled = function () {
- this._bitField = this._bitField | 1048576;
-};
-
-Promise.prototype._unsetRejectionIsUnhandled = function () {
- this._bitField = this._bitField & (~1048576);
- if (this._isUnhandledRejectionNotified()) {
- this._unsetUnhandledRejectionIsNotified();
- this._notifyUnhandledRejectionIsHandled();
- }
-};
-
-Promise.prototype._isRejectionUnhandled = function () {
- return (this._bitField & 1048576) > 0;
-};
-
-Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) {
- return warn(message, shouldUseOwnTrace, promise || this);
-};
-
-Promise.onPossiblyUnhandledRejection = function (fn) {
- var domain = getDomain();
- possiblyUnhandledRejection =
- typeof fn === "function" ? (domain === null ?
- fn : util.domainBind(domain, fn))
- : undefined;
-};
-
-Promise.onUnhandledRejectionHandled = function (fn) {
- var domain = getDomain();
- unhandledRejectionHandled =
- typeof fn === "function" ? (domain === null ?
- fn : util.domainBind(domain, fn))
- : undefined;
-};
-
-var disableLongStackTraces = function() {};
-Promise.longStackTraces = function () {
- if (async.haveItemsQueued() && !config.longStackTraces) {
- throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- if (!config.longStackTraces && longStackTracesIsSupported()) {
- var Promise_captureStackTrace = Promise.prototype._captureStackTrace;
- var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;
- config.longStackTraces = true;
- disableLongStackTraces = function() {
- if (async.haveItemsQueued() && !config.longStackTraces) {
- throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- Promise.prototype._captureStackTrace = Promise_captureStackTrace;
- Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;
- Context.deactivateLongStackTraces();
- async.enableTrampoline();
- config.longStackTraces = false;
- };
- Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;
- Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;
- Context.activateLongStackTraces();
- async.disableTrampolineIfNecessary();
- }
-};
-
-Promise.hasLongStackTraces = function () {
- return config.longStackTraces && longStackTracesIsSupported();
-};
-
-var fireDomEvent = (function() {
- try {
- if (typeof CustomEvent === "function") {
- var event = new CustomEvent("CustomEvent");
- util.global.dispatchEvent(event);
- return function(name, event) {
- var domEvent = new CustomEvent(name.toLowerCase(), {
- detail: event,
- cancelable: true
- });
- return !util.global.dispatchEvent(domEvent);
- };
- } else if (typeof Event === "function") {
- var event = new Event("CustomEvent");
- util.global.dispatchEvent(event);
- return function(name, event) {
- var domEvent = new Event(name.toLowerCase(), {
- cancelable: true
- });
- domEvent.detail = event;
- return !util.global.dispatchEvent(domEvent);
- };
- } else {
- var event = document.createEvent("CustomEvent");
- event.initCustomEvent("testingtheevent", false, true, {});
- util.global.dispatchEvent(event);
- return function(name, event) {
- var domEvent = document.createEvent("CustomEvent");
- domEvent.initCustomEvent(name.toLowerCase(), false, true,
- event);
- return !util.global.dispatchEvent(domEvent);
- };
- }
- } catch (e) {}
- return function() {
- return false;
- };
-})();
-
-var fireGlobalEvent = (function() {
- if (util.isNode) {
- return function() {
- return process.emit.apply(process, arguments);
- };
- } else {
- if (!util.global) {
- return function() {
- return false;
- };
- }
- return function(name) {
- var methodName = "on" + name.toLowerCase();
- var method = util.global[methodName];
- if (!method) return false;
- method.apply(util.global, [].slice.call(arguments, 1));
- return true;
- };
- }
-})();
-
-function generatePromiseLifecycleEventObject(name, promise) {
- return {promise: promise};
-}
-
-var eventToObjectGenerator = {
- promiseCreated: generatePromiseLifecycleEventObject,
- promiseFulfilled: generatePromiseLifecycleEventObject,
- promiseRejected: generatePromiseLifecycleEventObject,
- promiseResolved: generatePromiseLifecycleEventObject,
- promiseCancelled: generatePromiseLifecycleEventObject,
- promiseChained: function(name, promise, child) {
- return {promise: promise, child: child};
- },
- warning: function(name, warning) {
- return {warning: warning};
- },
- unhandledRejection: function (name, reason, promise) {
- return {reason: reason, promise: promise};
- },
- rejectionHandled: generatePromiseLifecycleEventObject
-};
-
-var activeFireEvent = function (name) {
- var globalEventFired = false;
- try {
- globalEventFired = fireGlobalEvent.apply(null, arguments);
- } catch (e) {
- async.throwLater(e);
- globalEventFired = true;
- }
-
- var domEventFired = false;
- try {
- domEventFired = fireDomEvent(name,
- eventToObjectGenerator[name].apply(null, arguments));
- } catch (e) {
- async.throwLater(e);
- domEventFired = true;
- }
-
- return domEventFired || globalEventFired;
-};
-
-Promise.config = function(opts) {
- opts = Object(opts);
- if ("longStackTraces" in opts) {
- if (opts.longStackTraces) {
- Promise.longStackTraces();
- } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {
- disableLongStackTraces();
- }
- }
- if ("warnings" in opts) {
- var warningsOption = opts.warnings;
- config.warnings = !!warningsOption;
- wForgottenReturn = config.warnings;
-
- if (util.isObject(warningsOption)) {
- if ("wForgottenReturn" in warningsOption) {
- wForgottenReturn = !!warningsOption.wForgottenReturn;
- }
- }
- }
- if ("cancellation" in opts && opts.cancellation && !config.cancellation) {
- if (async.haveItemsQueued()) {
- throw new Error(
- "cannot enable cancellation after promises are in use");
- }
- Promise.prototype._clearCancellationData =
- cancellationClearCancellationData;
- Promise.prototype._propagateFrom = cancellationPropagateFrom;
- Promise.prototype._onCancel = cancellationOnCancel;
- Promise.prototype._setOnCancel = cancellationSetOnCancel;
- Promise.prototype._attachCancellationCallback =
- cancellationAttachCancellationCallback;
- Promise.prototype._execute = cancellationExecute;
- propagateFromFunction = cancellationPropagateFrom;
- config.cancellation = true;
- }
- if ("monitoring" in opts) {
- if (opts.monitoring && !config.monitoring) {
- config.monitoring = true;
- Promise.prototype._fireEvent = activeFireEvent;
- } else if (!opts.monitoring && config.monitoring) {
- config.monitoring = false;
- Promise.prototype._fireEvent = defaultFireEvent;
- }
- }
-};
-
-function defaultFireEvent() { return false; }
-
-Promise.prototype._fireEvent = defaultFireEvent;
-Promise.prototype._execute = function(executor, resolve, reject) {
- try {
- executor(resolve, reject);
- } catch (e) {
- return e;
- }
-};
-Promise.prototype._onCancel = function () {};
-Promise.prototype._setOnCancel = function (handler) { ; };
-Promise.prototype._attachCancellationCallback = function(onCancel) {
- ;
-};
-Promise.prototype._captureStackTrace = function () {};
-Promise.prototype._attachExtraTrace = function () {};
-Promise.prototype._clearCancellationData = function() {};
-Promise.prototype._propagateFrom = function (parent, flags) {
- ;
- ;
-};
-
-function cancellationExecute(executor, resolve, reject) {
- var promise = this;
- try {
- executor(resolve, reject, function(onCancel) {
- if (typeof onCancel !== "function") {
- throw new TypeError("onCancel must be a function, got: " +
- util.toString(onCancel));
- }
- promise._attachCancellationCallback(onCancel);
- });
- } catch (e) {
- return e;
- }
-}
-
-function cancellationAttachCancellationCallback(onCancel) {
- if (!this._isCancellable()) return this;
-
- var previousOnCancel = this._onCancel();
- if (previousOnCancel !== undefined) {
- if (util.isArray(previousOnCancel)) {
- previousOnCancel.push(onCancel);
- } else {
- this._setOnCancel([previousOnCancel, onCancel]);
- }
- } else {
- this._setOnCancel(onCancel);
- }
-}
-
-function cancellationOnCancel() {
- return this._onCancelField;
-}
-
-function cancellationSetOnCancel(onCancel) {
- this._onCancelField = onCancel;
-}
-
-function cancellationClearCancellationData() {
- this._cancellationParent = undefined;
- this._onCancelField = undefined;
-}
-
-function cancellationPropagateFrom(parent, flags) {
- if ((flags & 1) !== 0) {
- this._cancellationParent = parent;
- var branchesRemainingToCancel = parent._branchesRemainingToCancel;
- if (branchesRemainingToCancel === undefined) {
- branchesRemainingToCancel = 0;
- }
- parent._branchesRemainingToCancel = branchesRemainingToCancel + 1;
- }
- if ((flags & 2) !== 0 && parent._isBound()) {
- this._setBoundTo(parent._boundTo);
- }
-}
-
-function bindingPropagateFrom(parent, flags) {
- if ((flags & 2) !== 0 && parent._isBound()) {
- this._setBoundTo(parent._boundTo);
- }
-}
-var propagateFromFunction = bindingPropagateFrom;
-
-function boundValueFunction() {
- var ret = this._boundTo;
- if (ret !== undefined) {
- if (ret instanceof Promise) {
- if (ret.isFulfilled()) {
- return ret.value();
- } else {
- return undefined;
- }
- }
- }
- return ret;
-}
-
-function longStackTracesCaptureStackTrace() {
- this._trace = new CapturedTrace(this._peekContext());
-}
-
-function longStackTracesAttachExtraTrace(error, ignoreSelf) {
- if (canAttachTrace(error)) {
- var trace = this._trace;
- if (trace !== undefined) {
- if (ignoreSelf) trace = trace._parent;
- }
- if (trace !== undefined) {
- trace.attachExtraTrace(error);
- } else if (!error.__stackCleaned__) {
- var parsed = parseStackAndMessage(error);
- util.notEnumerableProp(error, "stack",
- parsed.message + "\n" + parsed.stack.join("\n"));
- util.notEnumerableProp(error, "__stackCleaned__", true);
- }
- }
-}
-
-function checkForgottenReturns(returnValue, promiseCreated, name, promise,
- parent) {
- if (returnValue === undefined && promiseCreated !== null &&
- wForgottenReturn) {
- if (parent !== undefined && parent._returnedNonUndefined()) return;
- if ((promise._bitField & 65535) === 0) return;
-
- if (name) name = name + " ";
- var handlerLine = "";
- var creatorLine = "";
- if (promiseCreated._trace) {
- var traceLines = promiseCreated._trace.stack.split("\n");
- var stack = cleanStack(traceLines);
- for (var i = stack.length - 1; i >= 0; --i) {
- var line = stack[i];
- if (!nodeFramePattern.test(line)) {
- var lineMatches = line.match(parseLinePattern);
- if (lineMatches) {
- handlerLine = "at " + lineMatches[1] +
- ":" + lineMatches[2] + ":" + lineMatches[3] + " ";
- }
- break;
- }
- }
-
- if (stack.length > 0) {
- var firstUserLine = stack[0];
- for (var i = 0; i < traceLines.length; ++i) {
-
- if (traceLines[i] === firstUserLine) {
- if (i > 0) {
- creatorLine = "\n" + traceLines[i - 1];
- }
- break;
- }
- }
-
- }
- }
- var msg = "a promise was created in a " + name +
- "handler " + handlerLine + "but was not returned from it, " +
- "see http://goo.gl/rRqMUw" +
- creatorLine;
- promise._warn(msg, true, promiseCreated);
- }
-}
-
-function deprecated(name, replacement) {
- var message = name +
- " is deprecated and will be removed in a future version.";
- if (replacement) message += " Use " + replacement + " instead.";
- return warn(message);
-}
-
-function warn(message, shouldUseOwnTrace, promise) {
- if (!config.warnings) return;
- var warning = new Warning(message);
- var ctx;
- if (shouldUseOwnTrace) {
- promise._attachExtraTrace(warning);
- } else if (config.longStackTraces && (ctx = Promise._peekContext())) {
- ctx.attachExtraTrace(warning);
- } else {
- var parsed = parseStackAndMessage(warning);
- warning.stack = parsed.message + "\n" + parsed.stack.join("\n");
- }
-
- if (!activeFireEvent("warning", warning)) {
- formatAndLogError(warning, "", true);
- }
-}
-
-function reconstructStack(message, stacks) {
- for (var i = 0; i < stacks.length - 1; ++i) {
- stacks[i].push("From previous event:");
- stacks[i] = stacks[i].join("\n");
- }
- if (i < stacks.length) {
- stacks[i] = stacks[i].join("\n");
- }
- return message + "\n" + stacks.join("\n");
-}
-
-function removeDuplicateOrEmptyJumps(stacks) {
- for (var i = 0; i < stacks.length; ++i) {
- if (stacks[i].length === 0 ||
- ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {
- stacks.splice(i, 1);
- i--;
- }
- }
-}
-
-function removeCommonRoots(stacks) {
- var current = stacks[0];
- for (var i = 1; i < stacks.length; ++i) {
- var prev = stacks[i];
- var currentLastIndex = current.length - 1;
- var currentLastLine = current[currentLastIndex];
- var commonRootMeetPoint = -1;
-
- for (var j = prev.length - 1; j >= 0; --j) {
- if (prev[j] === currentLastLine) {
- commonRootMeetPoint = j;
- break;
- }
- }
-
- for (var j = commonRootMeetPoint; j >= 0; --j) {
- var line = prev[j];
- if (current[currentLastIndex] === line) {
- current.pop();
- currentLastIndex--;
- } else {
- break;
- }
- }
- current = prev;
- }
-}
-
-function cleanStack(stack) {
- var ret = [];
- for (var i = 0; i < stack.length; ++i) {
- var line = stack[i];
- var isTraceLine = " (No stack trace)" === line ||
- stackFramePattern.test(line);
- var isInternalFrame = isTraceLine && shouldIgnore(line);
- if (isTraceLine && !isInternalFrame) {
- if (indentStackFrames && line.charAt(0) !== " ") {
- line = " " + line;
- }
- ret.push(line);
- }
- }
- return ret;
-}
-
-function stackFramesAsArray(error) {
- var stack = error.stack.replace(/\s+$/g, "").split("\n");
- for (var i = 0; i < stack.length; ++i) {
- var line = stack[i];
- if (" (No stack trace)" === line || stackFramePattern.test(line)) {
- break;
- }
- }
- if (i > 0) {
- stack = stack.slice(i);
- }
- return stack;
-}
-
-function parseStackAndMessage(error) {
- var stack = error.stack;
- var message = error.toString();
- stack = typeof stack === "string" && stack.length > 0
- ? stackFramesAsArray(error) : [" (No stack trace)"];
- return {
- message: message,
- stack: cleanStack(stack)
- };
-}
-
-function formatAndLogError(error, title, isSoft) {
- if (typeof console !== "undefined") {
- var message;
- if (util.isObject(error)) {
- var stack = error.stack;
- message = title + formatStack(stack, error);
- } else {
- message = title + String(error);
- }
- if (typeof printWarning === "function") {
- printWarning(message, isSoft);
- } else if (typeof console.log === "function" ||
- typeof console.log === "object") {
- console.log(message);
- }
- }
-}
-
-function fireRejectionEvent(name, localHandler, reason, promise) {
- var localEventFired = false;
- try {
- if (typeof localHandler === "function") {
- localEventFired = true;
- if (name === "rejectionHandled") {
- localHandler(promise);
- } else {
- localHandler(reason, promise);
- }
- }
- } catch (e) {
- async.throwLater(e);
- }
-
- if (name === "unhandledRejection") {
- if (!activeFireEvent(name, reason, promise) && !localEventFired) {
- formatAndLogError(reason, "Unhandled rejection ");
- }
- } else {
- activeFireEvent(name, promise);
- }
-}
-
-function formatNonError(obj) {
- var str;
- if (typeof obj === "function") {
- str = "[function " +
- (obj.name || "anonymous") +
- "]";
- } else {
- str = obj && typeof obj.toString === "function"
- ? obj.toString() : util.toString(obj);
- var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
- if (ruselessToString.test(str)) {
- try {
- var newStr = JSON.stringify(obj);
- str = newStr;
- }
- catch(e) {
-
- }
- }
- if (str.length === 0) {
- str = "(empty array)";
- }
- }
- return ("(<" + snip(str) + ">, no stack trace)");
-}
-
-function snip(str) {
- var maxChars = 41;
- if (str.length < maxChars) {
- return str;
- }
- return str.substr(0, maxChars - 3) + "...";
-}
-
-function longStackTracesIsSupported() {
- return typeof captureStackTrace === "function";
-}
-
-var shouldIgnore = function() { return false; };
-var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
-function parseLineInfo(line) {
- var matches = line.match(parseLineInfoRegex);
- if (matches) {
- return {
- fileName: matches[1],
- line: parseInt(matches[2], 10)
- };
- }
-}
-
-function setBounds(firstLineError, lastLineError) {
- if (!longStackTracesIsSupported()) return;
- var firstStackLines = firstLineError.stack.split("\n");
- var lastStackLines = lastLineError.stack.split("\n");
- var firstIndex = -1;
- var lastIndex = -1;
- var firstFileName;
- var lastFileName;
- for (var i = 0; i < firstStackLines.length; ++i) {
- var result = parseLineInfo(firstStackLines[i]);
- if (result) {
- firstFileName = result.fileName;
- firstIndex = result.line;
- break;
- }
- }
- for (var i = 0; i < lastStackLines.length; ++i) {
- var result = parseLineInfo(lastStackLines[i]);
- if (result) {
- lastFileName = result.fileName;
- lastIndex = result.line;
- break;
- }
- }
- if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||
- firstFileName !== lastFileName || firstIndex >= lastIndex) {
- return;
- }
-
- shouldIgnore = function(line) {
- if (bluebirdFramePattern.test(line)) return true;
- var info = parseLineInfo(line);
- if (info) {
- if (info.fileName === firstFileName &&
- (firstIndex <= info.line && info.line <= lastIndex)) {
- return true;
- }
- }
- return false;
- };
-}
-
-function CapturedTrace(parent) {
- this._parent = parent;
- this._promisesCreated = 0;
- var length = this._length = 1 + (parent === undefined ? 0 : parent._length);
- captureStackTrace(this, CapturedTrace);
- if (length > 32) this.uncycle();
-}
-util.inherits(CapturedTrace, Error);
-Context.CapturedTrace = CapturedTrace;
-
-CapturedTrace.prototype.uncycle = function() {
- var length = this._length;
- if (length < 2) return;
- var nodes = [];
- var stackToIndex = {};
-
- for (var i = 0, node = this; node !== undefined; ++i) {
- nodes.push(node);
- node = node._parent;
- }
- length = this._length = i;
- for (var i = length - 1; i >= 0; --i) {
- var stack = nodes[i].stack;
- if (stackToIndex[stack] === undefined) {
- stackToIndex[stack] = i;
- }
- }
- for (var i = 0; i < length; ++i) {
- var currentStack = nodes[i].stack;
- var index = stackToIndex[currentStack];
- if (index !== undefined && index !== i) {
- if (index > 0) {
- nodes[index - 1]._parent = undefined;
- nodes[index - 1]._length = 1;
- }
- nodes[i]._parent = undefined;
- nodes[i]._length = 1;
- var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;
-
- if (index < length - 1) {
- cycleEdgeNode._parent = nodes[index + 1];
- cycleEdgeNode._parent.uncycle();
- cycleEdgeNode._length =
- cycleEdgeNode._parent._length + 1;
- } else {
- cycleEdgeNode._parent = undefined;
- cycleEdgeNode._length = 1;
- }
- var currentChildLength = cycleEdgeNode._length + 1;
- for (var j = i - 2; j >= 0; --j) {
- nodes[j]._length = currentChildLength;
- currentChildLength++;
- }
- return;
- }
- }
-};
-
-CapturedTrace.prototype.attachExtraTrace = function(error) {
- if (error.__stackCleaned__) return;
- this.uncycle();
- var parsed = parseStackAndMessage(error);
- var message = parsed.message;
- var stacks = [parsed.stack];
-
- var trace = this;
- while (trace !== undefined) {
- stacks.push(cleanStack(trace.stack.split("\n")));
- trace = trace._parent;
- }
- removeCommonRoots(stacks);
- removeDuplicateOrEmptyJumps(stacks);
- util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));
- util.notEnumerableProp(error, "__stackCleaned__", true);
-};
-
-var captureStackTrace = (function stackDetection() {
- var v8stackFramePattern = /^\s*at\s*/;
- var v8stackFormatter = function(stack, error) {
- if (typeof stack === "string") return stack;
-
- if (error.name !== undefined &&
- error.message !== undefined) {
- return error.toString();
- }
- return formatNonError(error);
- };
-
- if (typeof Error.stackTraceLimit === "number" &&
- typeof Error.captureStackTrace === "function") {
- Error.stackTraceLimit += 6;
- stackFramePattern = v8stackFramePattern;
- formatStack = v8stackFormatter;
- var captureStackTrace = Error.captureStackTrace;
-
- shouldIgnore = function(line) {
- return bluebirdFramePattern.test(line);
- };
- return function(receiver, ignoreUntil) {
- Error.stackTraceLimit += 6;
- captureStackTrace(receiver, ignoreUntil);
- Error.stackTraceLimit -= 6;
- };
- }
- var err = new Error();
-
- if (typeof err.stack === "string" &&
- err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) {
- stackFramePattern = /@/;
- formatStack = v8stackFormatter;
- indentStackFrames = true;
- return function captureStackTrace(o) {
- o.stack = new Error().stack;
- };
- }
-
- var hasStackAfterThrow;
- try { throw new Error(); }
- catch(e) {
- hasStackAfterThrow = ("stack" in e);
- }
- if (!("stack" in err) && hasStackAfterThrow &&
- typeof Error.stackTraceLimit === "number") {
- stackFramePattern = v8stackFramePattern;
- formatStack = v8stackFormatter;
- return function captureStackTrace(o) {
- Error.stackTraceLimit += 6;
- try { throw new Error(); }
- catch(e) { o.stack = e.stack; }
- Error.stackTraceLimit -= 6;
- };
- }
-
- formatStack = function(stack, error) {
- if (typeof stack === "string") return stack;
-
- if ((typeof error === "object" ||
- typeof error === "function") &&
- error.name !== undefined &&
- error.message !== undefined) {
- return error.toString();
- }
- return formatNonError(error);
- };
-
- return null;
-
-})([]);
-
-if (typeof console !== "undefined" && typeof console.warn !== "undefined") {
- printWarning = function (message) {
- console.warn(message);
- };
- if (util.isNode && process.stderr.isTTY) {
- printWarning = function(message, isSoft) {
- var color = isSoft ? "\u001b[33m" : "\u001b[31m";
- console.warn(color + message + "\u001b[0m\n");
- };
- } else if (!util.isNode && typeof (new Error().stack) === "string") {
- printWarning = function(message, isSoft) {
- console.warn("%c" + message,
- isSoft ? "color: darkorange" : "color: red");
- };
- }
-}
-
-var config = {
- warnings: warnings,
- longStackTraces: false,
- cancellation: false,
- monitoring: false
-};
-
-if (longStackTraces) Promise.longStackTraces();
-
-return {
- longStackTraces: function() {
- return config.longStackTraces;
- },
- warnings: function() {
- return config.warnings;
- },
- cancellation: function() {
- return config.cancellation;
- },
- monitoring: function() {
- return config.monitoring;
- },
- propagateFromFunction: function() {
- return propagateFromFunction;
- },
- boundValueFunction: function() {
- return boundValueFunction;
- },
- checkForgottenReturns: checkForgottenReturns,
- setBounds: setBounds,
- warn: warn,
- deprecated: deprecated,
- CapturedTrace: CapturedTrace,
- fireDomEvent: fireDomEvent,
- fireGlobalEvent: fireGlobalEvent
-};
-};
-
-},{"./errors":12,"./util":36}],10:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-function returner() {
- return this.value;
-}
-function thrower() {
- throw this.reason;
-}
-
-Promise.prototype["return"] =
-Promise.prototype.thenReturn = function (value) {
- if (value instanceof Promise) value.suppressUnhandledRejections();
- return this._then(
- returner, undefined, undefined, {value: value}, undefined);
-};
-
-Promise.prototype["throw"] =
-Promise.prototype.thenThrow = function (reason) {
- return this._then(
- thrower, undefined, undefined, {reason: reason}, undefined);
-};
-
-Promise.prototype.catchThrow = function (reason) {
- if (arguments.length <= 1) {
- return this._then(
- undefined, thrower, undefined, {reason: reason}, undefined);
- } else {
- var _reason = arguments[1];
- var handler = function() {throw _reason;};
- return this.caught(reason, handler);
- }
-};
-
-Promise.prototype.catchReturn = function (value) {
- if (arguments.length <= 1) {
- if (value instanceof Promise) value.suppressUnhandledRejections();
- return this._then(
- undefined, returner, undefined, {value: value}, undefined);
- } else {
- var _value = arguments[1];
- if (_value instanceof Promise) _value.suppressUnhandledRejections();
- var handler = function() {return _value;};
- return this.caught(value, handler);
- }
-};
-};
-
-},{}],11:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var PromiseReduce = Promise.reduce;
-var PromiseAll = Promise.all;
-
-function promiseAllThis() {
- return PromiseAll(this);
-}
-
-function PromiseMapSeries(promises, fn) {
- return PromiseReduce(promises, fn, INTERNAL, INTERNAL);
-}
-
-Promise.prototype.each = function (fn) {
- return PromiseReduce(this, fn, INTERNAL, 0)
- ._then(promiseAllThis, undefined, undefined, this, undefined);
-};
-
-Promise.prototype.mapSeries = function (fn) {
- return PromiseReduce(this, fn, INTERNAL, INTERNAL);
-};
-
-Promise.each = function (promises, fn) {
- return PromiseReduce(promises, fn, INTERNAL, 0)
- ._then(promiseAllThis, undefined, undefined, promises, undefined);
-};
-
-Promise.mapSeries = PromiseMapSeries;
-};
-
-
-},{}],12:[function(_dereq_,module,exports){
-"use strict";
-var es5 = _dereq_("./es5");
-var Objectfreeze = es5.freeze;
-var util = _dereq_("./util");
-var inherits = util.inherits;
-var notEnumerableProp = util.notEnumerableProp;
-
-function subError(nameProperty, defaultMessage) {
- function SubError(message) {
- if (!(this instanceof SubError)) return new SubError(message);
- notEnumerableProp(this, "message",
- typeof message === "string" ? message : defaultMessage);
- notEnumerableProp(this, "name", nameProperty);
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- } else {
- Error.call(this);
- }
- }
- inherits(SubError, Error);
- return SubError;
-}
-
-var _TypeError, _RangeError;
-var Warning = subError("Warning", "warning");
-var CancellationError = subError("CancellationError", "cancellation error");
-var TimeoutError = subError("TimeoutError", "timeout error");
-var AggregateError = subError("AggregateError", "aggregate error");
-try {
- _TypeError = TypeError;
- _RangeError = RangeError;
-} catch(e) {
- _TypeError = subError("TypeError", "type error");
- _RangeError = subError("RangeError", "range error");
-}
-
-var methods = ("join pop push shift unshift slice filter forEach some " +
- "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
-
-for (var i = 0; i < methods.length; ++i) {
- if (typeof Array.prototype[methods[i]] === "function") {
- AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
- }
-}
-
-es5.defineProperty(AggregateError.prototype, "length", {
- value: 0,
- configurable: false,
- writable: true,
- enumerable: true
-});
-AggregateError.prototype["isOperational"] = true;
-var level = 0;
-AggregateError.prototype.toString = function() {
- var indent = Array(level * 4 + 1).join(" ");
- var ret = "\n" + indent + "AggregateError of:" + "\n";
- level++;
- indent = Array(level * 4 + 1).join(" ");
- for (var i = 0; i < this.length; ++i) {
- var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
- var lines = str.split("\n");
- for (var j = 0; j < lines.length; ++j) {
- lines[j] = indent + lines[j];
- }
- str = lines.join("\n");
- ret += str + "\n";
- }
- level--;
- return ret;
-};
-
-function OperationalError(message) {
- if (!(this instanceof OperationalError))
- return new OperationalError(message);
- notEnumerableProp(this, "name", "OperationalError");
- notEnumerableProp(this, "message", message);
- this.cause = message;
- this["isOperational"] = true;
-
- if (message instanceof Error) {
- notEnumerableProp(this, "message", message.message);
- notEnumerableProp(this, "stack", message.stack);
- } else if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- }
-
-}
-inherits(OperationalError, Error);
-
-var errorTypes = Error["__BluebirdErrorTypes__"];
-if (!errorTypes) {
- errorTypes = Objectfreeze({
- CancellationError: CancellationError,
- TimeoutError: TimeoutError,
- OperationalError: OperationalError,
- RejectionError: OperationalError,
- AggregateError: AggregateError
- });
- es5.defineProperty(Error, "__BluebirdErrorTypes__", {
- value: errorTypes,
- writable: false,
- enumerable: false,
- configurable: false
- });
-}
-
-module.exports = {
- Error: Error,
- TypeError: _TypeError,
- RangeError: _RangeError,
- CancellationError: errorTypes.CancellationError,
- OperationalError: errorTypes.OperationalError,
- TimeoutError: errorTypes.TimeoutError,
- AggregateError: errorTypes.AggregateError,
- Warning: Warning
-};
-
-},{"./es5":13,"./util":36}],13:[function(_dereq_,module,exports){
-var isES5 = (function(){
- "use strict";
- return this === undefined;
-})();
-
-if (isES5) {
- module.exports = {
- freeze: Object.freeze,
- defineProperty: Object.defineProperty,
- getDescriptor: Object.getOwnPropertyDescriptor,
- keys: Object.keys,
- names: Object.getOwnPropertyNames,
- getPrototypeOf: Object.getPrototypeOf,
- isArray: Array.isArray,
- isES5: isES5,
- propertyIsWritable: function(obj, prop) {
- var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
- return !!(!descriptor || descriptor.writable || descriptor.set);
- }
- };
-} else {
- var has = {}.hasOwnProperty;
- var str = {}.toString;
- var proto = {}.constructor.prototype;
-
- var ObjectKeys = function (o) {
- var ret = [];
- for (var key in o) {
- if (has.call(o, key)) {
- ret.push(key);
- }
- }
- return ret;
- };
-
- var ObjectGetDescriptor = function(o, key) {
- return {value: o[key]};
- };
-
- var ObjectDefineProperty = function (o, key, desc) {
- o[key] = desc.value;
- return o;
- };
-
- var ObjectFreeze = function (obj) {
- return obj;
- };
-
- var ObjectGetPrototypeOf = function (obj) {
- try {
- return Object(obj).constructor.prototype;
- }
- catch (e) {
- return proto;
- }
- };
-
- var ArrayIsArray = function (obj) {
- try {
- return str.call(obj) === "[object Array]";
- }
- catch(e) {
- return false;
- }
- };
-
- module.exports = {
- isArray: ArrayIsArray,
- keys: ObjectKeys,
- names: ObjectKeys,
- defineProperty: ObjectDefineProperty,
- getDescriptor: ObjectGetDescriptor,
- freeze: ObjectFreeze,
- getPrototypeOf: ObjectGetPrototypeOf,
- isES5: isES5,
- propertyIsWritable: function() {
- return true;
- }
- };
-}
-
-},{}],14:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var PromiseMap = Promise.map;
-
-Promise.prototype.filter = function (fn, options) {
- return PromiseMap(this, fn, options, INTERNAL);
-};
-
-Promise.filter = function (promises, fn, options) {
- return PromiseMap(promises, fn, options, INTERNAL);
-};
-};
-
-},{}],15:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, tryConvertToPromise) {
-var util = _dereq_("./util");
-var CancellationError = Promise.CancellationError;
-var errorObj = util.errorObj;
-
-function PassThroughHandlerContext(promise, type, handler) {
- this.promise = promise;
- this.type = type;
- this.handler = handler;
- this.called = false;
- this.cancelPromise = null;
-}
-
-PassThroughHandlerContext.prototype.isFinallyHandler = function() {
- return this.type === 0;
-};
-
-function FinallyHandlerCancelReaction(finallyHandler) {
- this.finallyHandler = finallyHandler;
-}
-
-FinallyHandlerCancelReaction.prototype._resultCancelled = function() {
- checkCancel(this.finallyHandler);
-};
-
-function checkCancel(ctx, reason) {
- if (ctx.cancelPromise != null) {
- if (arguments.length > 1) {
- ctx.cancelPromise._reject(reason);
- } else {
- ctx.cancelPromise._cancel();
- }
- ctx.cancelPromise = null;
- return true;
- }
- return false;
-}
-
-function succeed() {
- return finallyHandler.call(this, this.promise._target()._settledValue());
-}
-function fail(reason) {
- if (checkCancel(this, reason)) return;
- errorObj.e = reason;
- return errorObj;
-}
-function finallyHandler(reasonOrValue) {
- var promise = this.promise;
- var handler = this.handler;
-
- if (!this.called) {
- this.called = true;
- var ret = this.isFinallyHandler()
- ? handler.call(promise._boundValue())
- : handler.call(promise._boundValue(), reasonOrValue);
- if (ret !== undefined) {
- promise._setReturnedNonUndefined();
- var maybePromise = tryConvertToPromise(ret, promise);
- if (maybePromise instanceof Promise) {
- if (this.cancelPromise != null) {
- if (maybePromise._isCancelled()) {
- var reason =
- new CancellationError("late cancellation observer");
- promise._attachExtraTrace(reason);
- errorObj.e = reason;
- return errorObj;
- } else if (maybePromise.isPending()) {
- maybePromise._attachCancellationCallback(
- new FinallyHandlerCancelReaction(this));
- }
- }
- return maybePromise._then(
- succeed, fail, undefined, this, undefined);
- }
- }
- }
-
- if (promise.isRejected()) {
- checkCancel(this);
- errorObj.e = reasonOrValue;
- return errorObj;
- } else {
- checkCancel(this);
- return reasonOrValue;
- }
-}
-
-Promise.prototype._passThrough = function(handler, type, success, fail) {
- if (typeof handler !== "function") return this.then();
- return this._then(success,
- fail,
- undefined,
- new PassThroughHandlerContext(this, type, handler),
- undefined);
-};
-
-Promise.prototype.lastly =
-Promise.prototype["finally"] = function (handler) {
- return this._passThrough(handler,
- 0,
- finallyHandler,
- finallyHandler);
-};
-
-Promise.prototype.tap = function (handler) {
- return this._passThrough(handler, 1, finallyHandler);
-};
-
-return PassThroughHandlerContext;
-};
-
-},{"./util":36}],16:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise,
- apiRejection,
- INTERNAL,
- tryConvertToPromise,
- Proxyable,
- debug) {
-var errors = _dereq_("./errors");
-var TypeError = errors.TypeError;
-var util = _dereq_("./util");
-var errorObj = util.errorObj;
-var tryCatch = util.tryCatch;
-var yieldHandlers = [];
-
-function promiseFromYieldHandler(value, yieldHandlers, traceParent) {
- for (var i = 0; i < yieldHandlers.length; ++i) {
- traceParent._pushContext();
- var result = tryCatch(yieldHandlers[i])(value);
- traceParent._popContext();
- if (result === errorObj) {
- traceParent._pushContext();
- var ret = Promise.reject(errorObj.e);
- traceParent._popContext();
- return ret;
- }
- var maybePromise = tryConvertToPromise(result, traceParent);
- if (maybePromise instanceof Promise) return maybePromise;
- }
- return null;
-}
-
-function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
- if (debug.cancellation()) {
- var internal = new Promise(INTERNAL);
- var _finallyPromise = this._finallyPromise = new Promise(INTERNAL);
- this._promise = internal.lastly(function() {
- return _finallyPromise;
- });
- internal._captureStackTrace();
- internal._setOnCancel(this);
- } else {
- var promise = this._promise = new Promise(INTERNAL);
- promise._captureStackTrace();
- }
- this._stack = stack;
- this._generatorFunction = generatorFunction;
- this._receiver = receiver;
- this._generator = undefined;
- this._yieldHandlers = typeof yieldHandler === "function"
- ? [yieldHandler].concat(yieldHandlers)
- : yieldHandlers;
- this._yieldedPromise = null;
- this._cancellationPhase = false;
-}
-util.inherits(PromiseSpawn, Proxyable);
-
-PromiseSpawn.prototype._isResolved = function() {
- return this._promise === null;
-};
-
-PromiseSpawn.prototype._cleanup = function() {
- this._promise = this._generator = null;
- if (debug.cancellation() && this._finallyPromise !== null) {
- this._finallyPromise._fulfill();
- this._finallyPromise = null;
- }
-};
-
-PromiseSpawn.prototype._promiseCancelled = function() {
- if (this._isResolved()) return;
- var implementsReturn = typeof this._generator["return"] !== "undefined";
-
- var result;
- if (!implementsReturn) {
- var reason = new Promise.CancellationError(
- "generator .return() sentinel");
- Promise.coroutine.returnSentinel = reason;
- this._promise._attachExtraTrace(reason);
- this._promise._pushContext();
- result = tryCatch(this._generator["throw"]).call(this._generator,
- reason);
- this._promise._popContext();
- } else {
- this._promise._pushContext();
- result = tryCatch(this._generator["return"]).call(this._generator,
- undefined);
- this._promise._popContext();
- }
- this._cancellationPhase = true;
- this._yieldedPromise = null;
- this._continue(result);
-};
-
-PromiseSpawn.prototype._promiseFulfilled = function(value) {
- this._yieldedPromise = null;
- this._promise._pushContext();
- var result = tryCatch(this._generator.next).call(this._generator, value);
- this._promise._popContext();
- this._continue(result);
-};
-
-PromiseSpawn.prototype._promiseRejected = function(reason) {
- this._yieldedPromise = null;
- this._promise._attachExtraTrace(reason);
- this._promise._pushContext();
- var result = tryCatch(this._generator["throw"])
- .call(this._generator, reason);
- this._promise._popContext();
- this._continue(result);
-};
-
-PromiseSpawn.prototype._resultCancelled = function() {
- if (this._yieldedPromise instanceof Promise) {
- var promise = this._yieldedPromise;
- this._yieldedPromise = null;
- promise.cancel();
- }
-};
-
-PromiseSpawn.prototype.promise = function () {
- return this._promise;
-};
-
-PromiseSpawn.prototype._run = function () {
- this._generator = this._generatorFunction.call(this._receiver);
- this._receiver =
- this._generatorFunction = undefined;
- this._promiseFulfilled(undefined);
-};
-
-PromiseSpawn.prototype._continue = function (result) {
- var promise = this._promise;
- if (result === errorObj) {
- this._cleanup();
- if (this._cancellationPhase) {
- return promise.cancel();
- } else {
- return promise._rejectCallback(result.e, false);
- }
- }
-
- var value = result.value;
- if (result.done === true) {
- this._cleanup();
- if (this._cancellationPhase) {
- return promise.cancel();
- } else {
- return promise._resolveCallback(value);
- }
- } else {
- var maybePromise = tryConvertToPromise(value, this._promise);
- if (!(maybePromise instanceof Promise)) {
- maybePromise =
- promiseFromYieldHandler(maybePromise,
- this._yieldHandlers,
- this._promise);
- if (maybePromise === null) {
- this._promiseRejected(
- new TypeError(
- "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", value) +
- "From coroutine:\u000a" +
- this._stack.split("\n").slice(1, -7).join("\n")
- )
- );
- return;
- }
- }
- maybePromise = maybePromise._target();
- var bitField = maybePromise._bitField;
- ;
- if (((bitField & 50397184) === 0)) {
- this._yieldedPromise = maybePromise;
- maybePromise._proxy(this, null);
- } else if (((bitField & 33554432) !== 0)) {
- Promise._async.invoke(
- this._promiseFulfilled, this, maybePromise._value()
- );
- } else if (((bitField & 16777216) !== 0)) {
- Promise._async.invoke(
- this._promiseRejected, this, maybePromise._reason()
- );
- } else {
- this._promiseCancelled();
- }
- }
-};
-
-Promise.coroutine = function (generatorFunction, options) {
- if (typeof generatorFunction !== "function") {
- throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- var yieldHandler = Object(options).yieldHandler;
- var PromiseSpawn$ = PromiseSpawn;
- var stack = new Error().stack;
- return function () {
- var generator = generatorFunction.apply(this, arguments);
- var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,
- stack);
- var ret = spawn.promise();
- spawn._generator = generator;
- spawn._promiseFulfilled(undefined);
- return ret;
- };
-};
-
-Promise.coroutine.addYieldHandler = function(fn) {
- if (typeof fn !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(fn));
- }
- yieldHandlers.push(fn);
-};
-
-Promise.spawn = function (generatorFunction) {
- debug.deprecated("Promise.spawn()", "Promise.coroutine()");
- if (typeof generatorFunction !== "function") {
- return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- var spawn = new PromiseSpawn(generatorFunction, this);
- var ret = spawn.promise();
- spawn._run(Promise.spawn);
- return ret;
-};
-};
-
-},{"./errors":12,"./util":36}],17:[function(_dereq_,module,exports){
-"use strict";
-module.exports =
-function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async,
- getDomain) {
-var util = _dereq_("./util");
-var canEvaluate = util.canEvaluate;
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-var reject;
-
-if (!true) {
-if (canEvaluate) {
- var thenCallback = function(i) {
- return new Function("value", "holder", " \n\
- 'use strict'; \n\
- holder.pIndex = value; \n\
- holder.checkFulfillment(this); \n\
- ".replace(/Index/g, i));
- };
-
- var promiseSetter = function(i) {
- return new Function("promise", "holder", " \n\
- 'use strict'; \n\
- holder.pIndex = promise; \n\
- ".replace(/Index/g, i));
- };
-
- var generateHolderClass = function(total) {
- var props = new Array(total);
- for (var i = 0; i < props.length; ++i) {
- props[i] = "this.p" + (i+1);
- }
- var assignment = props.join(" = ") + " = null;";
- var cancellationCode= "var promise;\n" + props.map(function(prop) {
- return " \n\
- promise = " + prop + "; \n\
- if (promise instanceof Promise) { \n\
- promise.cancel(); \n\
- } \n\
- ";
- }).join("\n");
- var passedArguments = props.join(", ");
- var name = "Holder$" + total;
-
-
- var code = "return function(tryCatch, errorObj, Promise, async) { \n\
- 'use strict'; \n\
- function [TheName](fn) { \n\
- [TheProperties] \n\
- this.fn = fn; \n\
- this.asyncNeeded = true; \n\
- this.now = 0; \n\
- } \n\
- \n\
- [TheName].prototype._callFunction = function(promise) { \n\
- promise._pushContext(); \n\
- var ret = tryCatch(this.fn)([ThePassedArguments]); \n\
- promise._popContext(); \n\
- if (ret === errorObj) { \n\
- promise._rejectCallback(ret.e, false); \n\
- } else { \n\
- promise._resolveCallback(ret); \n\
- } \n\
- }; \n\
- \n\
- [TheName].prototype.checkFulfillment = function(promise) { \n\
- var now = ++this.now; \n\
- if (now === [TheTotal]) { \n\
- if (this.asyncNeeded) { \n\
- async.invoke(this._callFunction, this, promise); \n\
- } else { \n\
- this._callFunction(promise); \n\
- } \n\
- \n\
- } \n\
- }; \n\
- \n\
- [TheName].prototype._resultCancelled = function() { \n\
- [CancellationCode] \n\
- }; \n\
- \n\
- return [TheName]; \n\
- }(tryCatch, errorObj, Promise, async); \n\
- ";
-
- code = code.replace(/\[TheName\]/g, name)
- .replace(/\[TheTotal\]/g, total)
- .replace(/\[ThePassedArguments\]/g, passedArguments)
- .replace(/\[TheProperties\]/g, assignment)
- .replace(/\[CancellationCode\]/g, cancellationCode);
-
- return new Function("tryCatch", "errorObj", "Promise", "async", code)
- (tryCatch, errorObj, Promise, async);
- };
-
- var holderClasses = [];
- var thenCallbacks = [];
- var promiseSetters = [];
-
- for (var i = 0; i < 8; ++i) {
- holderClasses.push(generateHolderClass(i + 1));
- thenCallbacks.push(thenCallback(i + 1));
- promiseSetters.push(promiseSetter(i + 1));
- }
-
- reject = function (reason) {
- this._reject(reason);
- };
-}}
-
-Promise.join = function () {
- var last = arguments.length - 1;
- var fn;
- if (last > 0 && typeof arguments[last] === "function") {
- fn = arguments[last];
- if (!true) {
- if (last <= 8 && canEvaluate) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- var HolderClass = holderClasses[last - 1];
- var holder = new HolderClass(fn);
- var callbacks = thenCallbacks;
-
- for (var i = 0; i < last; ++i) {
- var maybePromise = tryConvertToPromise(arguments[i], ret);
- if (maybePromise instanceof Promise) {
- maybePromise = maybePromise._target();
- var bitField = maybePromise._bitField;
- ;
- if (((bitField & 50397184) === 0)) {
- maybePromise._then(callbacks[i], reject,
- undefined, ret, holder);
- promiseSetters[i](maybePromise, holder);
- holder.asyncNeeded = false;
- } else if (((bitField & 33554432) !== 0)) {
- callbacks[i].call(ret,
- maybePromise._value(), holder);
- } else if (((bitField & 16777216) !== 0)) {
- ret._reject(maybePromise._reason());
- } else {
- ret._cancel();
- }
- } else {
- callbacks[i].call(ret, maybePromise, holder);
- }
- }
-
- if (!ret._isFateSealed()) {
- if (holder.asyncNeeded) {
- var domain = getDomain();
- if (domain !== null) {
- holder.fn = util.domainBind(domain, holder.fn);
- }
- }
- ret._setAsyncGuaranteed();
- ret._setOnCancel(holder);
- }
- return ret;
- }
- }
- }
- var args = [].slice.call(arguments);;
- if (fn) args.pop();
- var ret = new PromiseArray(args).promise();
- return fn !== undefined ? ret.spread(fn) : ret;
-};
-
-};
-
-},{"./util":36}],18:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise,
- PromiseArray,
- apiRejection,
- tryConvertToPromise,
- INTERNAL,
- debug) {
-var getDomain = Promise._getDomain;
-var util = _dereq_("./util");
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-var async = Promise._async;
-
-function MappingPromiseArray(promises, fn, limit, _filter) {
- this.constructor$(promises);
- this._promise._captureStackTrace();
- var domain = getDomain();
- this._callback = domain === null ? fn : util.domainBind(domain, fn);
- this._preservedValues = _filter === INTERNAL
- ? new Array(this.length())
- : null;
- this._limit = limit;
- this._inFlight = 0;
- this._queue = [];
- async.invoke(this._asyncInit, this, undefined);
-}
-util.inherits(MappingPromiseArray, PromiseArray);
-
-MappingPromiseArray.prototype._asyncInit = function() {
- this._init$(undefined, -2);
-};
-
-MappingPromiseArray.prototype._init = function () {};
-
-MappingPromiseArray.prototype._promiseFulfilled = function (value, index) {
- var values = this._values;
- var length = this.length();
- var preservedValues = this._preservedValues;
- var limit = this._limit;
-
- if (index < 0) {
- index = (index * -1) - 1;
- values[index] = value;
- if (limit >= 1) {
- this._inFlight--;
- this._drainQueue();
- if (this._isResolved()) return true;
- }
- } else {
- if (limit >= 1 && this._inFlight >= limit) {
- values[index] = value;
- this._queue.push(index);
- return false;
- }
- if (preservedValues !== null) preservedValues[index] = value;
-
- var promise = this._promise;
- var callback = this._callback;
- var receiver = promise._boundValue();
- promise._pushContext();
- var ret = tryCatch(callback).call(receiver, value, index, length);
- var promiseCreated = promise._popContext();
- debug.checkForgottenReturns(
- ret,
- promiseCreated,
- preservedValues !== null ? "Promise.filter" : "Promise.map",
- promise
- );
- if (ret === errorObj) {
- this._reject(ret.e);
- return true;
- }
-
- var maybePromise = tryConvertToPromise(ret, this._promise);
- if (maybePromise instanceof Promise) {
- maybePromise = maybePromise._target();
- var bitField = maybePromise._bitField;
- ;
- if (((bitField & 50397184) === 0)) {
- if (limit >= 1) this._inFlight++;
- values[index] = maybePromise;
- maybePromise._proxy(this, (index + 1) * -1);
- return false;
- } else if (((bitField & 33554432) !== 0)) {
- ret = maybePromise._value();
- } else if (((bitField & 16777216) !== 0)) {
- this._reject(maybePromise._reason());
- return true;
- } else {
- this._cancel();
- return true;
- }
- }
- values[index] = ret;
- }
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= length) {
- if (preservedValues !== null) {
- this._filter(values, preservedValues);
- } else {
- this._resolve(values);
- }
- return true;
- }
- return false;
-};
-
-MappingPromiseArray.prototype._drainQueue = function () {
- var queue = this._queue;
- var limit = this._limit;
- var values = this._values;
- while (queue.length > 0 && this._inFlight < limit) {
- if (this._isResolved()) return;
- var index = queue.pop();
- this._promiseFulfilled(values[index], index);
- }
-};
-
-MappingPromiseArray.prototype._filter = function (booleans, values) {
- var len = values.length;
- var ret = new Array(len);
- var j = 0;
- for (var i = 0; i < len; ++i) {
- if (booleans[i]) ret[j++] = values[i];
- }
- ret.length = j;
- this._resolve(ret);
-};
-
-MappingPromiseArray.prototype.preservedValues = function () {
- return this._preservedValues;
-};
-
-function map(promises, fn, options, _filter) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
-
- var limit = 0;
- if (options !== undefined) {
- if (typeof options === "object" && options !== null) {
- if (typeof options.concurrency !== "number") {
- return Promise.reject(
- new TypeError("'concurrency' must be a number but it is " +
- util.classString(options.concurrency)));
- }
- limit = options.concurrency;
- } else {
- return Promise.reject(new TypeError(
- "options argument must be an object but it is " +
- util.classString(options)));
- }
- }
- limit = typeof limit === "number" &&
- isFinite(limit) && limit >= 1 ? limit : 0;
- return new MappingPromiseArray(promises, fn, limit, _filter).promise();
-}
-
-Promise.prototype.map = function (fn, options) {
- return map(this, fn, options, null);
-};
-
-Promise.map = function (promises, fn, options, _filter) {
- return map(promises, fn, options, _filter);
-};
-
-
-};
-
-},{"./util":36}],19:[function(_dereq_,module,exports){
-"use strict";
-module.exports =
-function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {
-var util = _dereq_("./util");
-var tryCatch = util.tryCatch;
-
-Promise.method = function (fn) {
- if (typeof fn !== "function") {
- throw new Promise.TypeError("expecting a function but got " + util.classString(fn));
- }
- return function () {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._pushContext();
- var value = tryCatch(fn).apply(this, arguments);
- var promiseCreated = ret._popContext();
- debug.checkForgottenReturns(
- value, promiseCreated, "Promise.method", ret);
- ret._resolveFromSyncValue(value);
- return ret;
- };
-};
-
-Promise.attempt = Promise["try"] = function (fn) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._pushContext();
- var value;
- if (arguments.length > 1) {
- debug.deprecated("calling Promise.try with more than 1 argument");
- var arg = arguments[1];
- var ctx = arguments[2];
- value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg)
- : tryCatch(fn).call(ctx, arg);
- } else {
- value = tryCatch(fn)();
- }
- var promiseCreated = ret._popContext();
- debug.checkForgottenReturns(
- value, promiseCreated, "Promise.try", ret);
- ret._resolveFromSyncValue(value);
- return ret;
-};
-
-Promise.prototype._resolveFromSyncValue = function (value) {
- if (value === util.errorObj) {
- this._rejectCallback(value.e, false);
- } else {
- this._resolveCallback(value, true);
- }
-};
-};
-
-},{"./util":36}],20:[function(_dereq_,module,exports){
-"use strict";
-var util = _dereq_("./util");
-var maybeWrapAsError = util.maybeWrapAsError;
-var errors = _dereq_("./errors");
-var OperationalError = errors.OperationalError;
-var es5 = _dereq_("./es5");
-
-function isUntypedError(obj) {
- return obj instanceof Error &&
- es5.getPrototypeOf(obj) === Error.prototype;
-}
-
-var rErrorKey = /^(?:name|message|stack|cause)$/;
-function wrapAsOperationalError(obj) {
- var ret;
- if (isUntypedError(obj)) {
- ret = new OperationalError(obj);
- ret.name = obj.name;
- ret.message = obj.message;
- ret.stack = obj.stack;
- var keys = es5.keys(obj);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (!rErrorKey.test(key)) {
- ret[key] = obj[key];
- }
- }
- return ret;
- }
- util.markAsOriginatingFromRejection(obj);
- return obj;
-}
-
-function nodebackForPromise(promise, multiArgs) {
- return function(err, value) {
- if (promise === null) return;
- if (err) {
- var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
- promise._attachExtraTrace(wrapped);
- promise._reject(wrapped);
- } else if (!multiArgs) {
- promise._fulfill(value);
- } else {
- var args = [].slice.call(arguments, 1);;
- promise._fulfill(args);
- }
- promise = null;
- };
-}
-
-module.exports = nodebackForPromise;
-
-},{"./errors":12,"./es5":13,"./util":36}],21:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-var util = _dereq_("./util");
-var async = Promise._async;
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-
-function spreadAdapter(val, nodeback) {
- var promise = this;
- if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);
- var ret =
- tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));
- if (ret === errorObj) {
- async.throwLater(ret.e);
- }
-}
-
-function successAdapter(val, nodeback) {
- var promise = this;
- var receiver = promise._boundValue();
- var ret = val === undefined
- ? tryCatch(nodeback).call(receiver, null)
- : tryCatch(nodeback).call(receiver, null, val);
- if (ret === errorObj) {
- async.throwLater(ret.e);
- }
-}
-function errorAdapter(reason, nodeback) {
- var promise = this;
- if (!reason) {
- var newReason = new Error(reason + "");
- newReason.cause = reason;
- reason = newReason;
- }
- var ret = tryCatch(nodeback).call(promise._boundValue(), reason);
- if (ret === errorObj) {
- async.throwLater(ret.e);
- }
-}
-
-Promise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback,
- options) {
- if (typeof nodeback == "function") {
- var adapter = successAdapter;
- if (options !== undefined && Object(options).spread) {
- adapter = spreadAdapter;
- }
- this._then(
- adapter,
- errorAdapter,
- undefined,
- this,
- nodeback
- );
- }
- return this;
-};
-};
-
-},{"./util":36}],22:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function() {
-var makeSelfResolutionError = function () {
- return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a");
-};
-var reflectHandler = function() {
- return new Promise.PromiseInspection(this._target());
-};
-var apiRejection = function(msg) {
- return Promise.reject(new TypeError(msg));
-};
-function Proxyable() {}
-var UNDEFINED_BINDING = {};
-var util = _dereq_("./util");
-
-var getDomain;
-if (util.isNode) {
- getDomain = function() {
- var ret = process.domain;
- if (ret === undefined) ret = null;
- return ret;
- };
-} else {
- getDomain = function() {
- return null;
- };
-}
-util.notEnumerableProp(Promise, "_getDomain", getDomain);
-
-var es5 = _dereq_("./es5");
-var Async = _dereq_("./async");
-var async = new Async();
-es5.defineProperty(Promise, "_async", {value: async});
-var errors = _dereq_("./errors");
-var TypeError = Promise.TypeError = errors.TypeError;
-Promise.RangeError = errors.RangeError;
-var CancellationError = Promise.CancellationError = errors.CancellationError;
-Promise.TimeoutError = errors.TimeoutError;
-Promise.OperationalError = errors.OperationalError;
-Promise.RejectionError = errors.OperationalError;
-Promise.AggregateError = errors.AggregateError;
-var INTERNAL = function(){};
-var APPLY = {};
-var NEXT_FILTER = {};
-var tryConvertToPromise = _dereq_("./thenables")(Promise, INTERNAL);
-var PromiseArray =
- _dereq_("./promise_array")(Promise, INTERNAL,
- tryConvertToPromise, apiRejection, Proxyable);
-var Context = _dereq_("./context")(Promise);
- /*jshint unused:false*/
-var createContext = Context.create;
-var debug = _dereq_("./debuggability")(Promise, Context);
-var CapturedTrace = debug.CapturedTrace;
-var PassThroughHandlerContext =
- _dereq_("./finally")(Promise, tryConvertToPromise);
-var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER);
-var nodebackForPromise = _dereq_("./nodeback");
-var errorObj = util.errorObj;
-var tryCatch = util.tryCatch;
-function check(self, executor) {
- if (typeof executor !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(executor));
- }
- if (self.constructor !== Promise) {
- throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
-}
-
-function Promise(executor) {
- this._bitField = 0;
- this._fulfillmentHandler0 = undefined;
- this._rejectionHandler0 = undefined;
- this._promise0 = undefined;
- this._receiver0 = undefined;
- if (executor !== INTERNAL) {
- check(this, executor);
- this._resolveFromExecutor(executor);
- }
- this._promiseCreated();
- this._fireEvent("promiseCreated", this);
-}
-
-Promise.prototype.toString = function () {
- return "[object Promise]";
-};
-
-Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
- var len = arguments.length;
- if (len > 1) {
- var catchInstances = new Array(len - 1),
- j = 0, i;
- for (i = 0; i < len - 1; ++i) {
- var item = arguments[i];
- if (util.isObject(item)) {
- catchInstances[j++] = item;
- } else {
- return apiRejection("expecting an object but got " +
- "A catch statement predicate " + util.classString(item));
- }
- }
- catchInstances.length = j;
- fn = arguments[i];
- return this.then(undefined, catchFilter(catchInstances, fn, this));
- }
- return this.then(undefined, fn);
-};
-
-Promise.prototype.reflect = function () {
- return this._then(reflectHandler,
- reflectHandler, undefined, this, undefined);
-};
-
-Promise.prototype.then = function (didFulfill, didReject) {
- if (debug.warnings() && arguments.length > 0 &&
- typeof didFulfill !== "function" &&
- typeof didReject !== "function") {
- var msg = ".then() only accepts functions but was passed: " +
- util.classString(didFulfill);
- if (arguments.length > 1) {
- msg += ", " + util.classString(didReject);
- }
- this._warn(msg);
- }
- return this._then(didFulfill, didReject, undefined, undefined, undefined);
-};
-
-Promise.prototype.done = function (didFulfill, didReject) {
- var promise =
- this._then(didFulfill, didReject, undefined, undefined, undefined);
- promise._setIsFinal();
-};
-
-Promise.prototype.spread = function (fn) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- return this.all()._then(fn, undefined, undefined, APPLY, undefined);
-};
-
-Promise.prototype.toJSON = function () {
- var ret = {
- isFulfilled: false,
- isRejected: false,
- fulfillmentValue: undefined,
- rejectionReason: undefined
- };
- if (this.isFulfilled()) {
- ret.fulfillmentValue = this.value();
- ret.isFulfilled = true;
- } else if (this.isRejected()) {
- ret.rejectionReason = this.reason();
- ret.isRejected = true;
- }
- return ret;
-};
-
-Promise.prototype.all = function () {
- if (arguments.length > 0) {
- this._warn(".all() was passed arguments but it does not take any");
- }
- return new PromiseArray(this).promise();
-};
-
-Promise.prototype.error = function (fn) {
- return this.caught(util.originatesFromRejection, fn);
-};
-
-Promise.getNewLibraryCopy = module.exports;
-
-Promise.is = function (val) {
- return val instanceof Promise;
-};
-
-Promise.fromNode = Promise.fromCallback = function(fn) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs
- : false;
- var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs));
- if (result === errorObj) {
- ret._rejectCallback(result.e, true);
- }
- if (!ret._isFateSealed()) ret._setAsyncGuaranteed();
- return ret;
-};
-
-Promise.all = function (promises) {
- return new PromiseArray(promises).promise();
-};
-
-Promise.cast = function (obj) {
- var ret = tryConvertToPromise(obj);
- if (!(ret instanceof Promise)) {
- ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._setFulfilled();
- ret._rejectionHandler0 = obj;
- }
- return ret;
-};
-
-Promise.resolve = Promise.fulfilled = Promise.cast;
-
-Promise.reject = Promise.rejected = function (reason) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._rejectCallback(reason, true);
- return ret;
-};
-
-Promise.setScheduler = function(fn) {
- if (typeof fn !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(fn));
- }
- return async.setScheduler(fn);
-};
-
-Promise.prototype._then = function (
- didFulfill,
- didReject,
- _, receiver,
- internalData
-) {
- var haveInternalData = internalData !== undefined;
- var promise = haveInternalData ? internalData : new Promise(INTERNAL);
- var target = this._target();
- var bitField = target._bitField;
-
- if (!haveInternalData) {
- promise._propagateFrom(this, 3);
- promise._captureStackTrace();
- if (receiver === undefined &&
- ((this._bitField & 2097152) !== 0)) {
- if (!((bitField & 50397184) === 0)) {
- receiver = this._boundValue();
- } else {
- receiver = target === this ? undefined : this._boundTo;
- }
- }
- this._fireEvent("promiseChained", this, promise);
- }
-
- var domain = getDomain();
- if (!((bitField & 50397184) === 0)) {
- var handler, value, settler = target._settlePromiseCtx;
- if (((bitField & 33554432) !== 0)) {
- value = target._rejectionHandler0;
- handler = didFulfill;
- } else if (((bitField & 16777216) !== 0)) {
- value = target._fulfillmentHandler0;
- handler = didReject;
- target._unsetRejectionIsUnhandled();
- } else {
- settler = target._settlePromiseLateCancellationObserver;
- value = new CancellationError("late cancellation observer");
- target._attachExtraTrace(value);
- handler = didReject;
- }
-
- async.invoke(settler, target, {
- handler: domain === null ? handler
- : (typeof handler === "function" &&
- util.domainBind(domain, handler)),
- promise: promise,
- receiver: receiver,
- value: value
- });
- } else {
- target._addCallbacks(didFulfill, didReject, promise, receiver, domain);
- }
-
- return promise;
-};
-
-Promise.prototype._length = function () {
- return this._bitField & 65535;
-};
-
-Promise.prototype._isFateSealed = function () {
- return (this._bitField & 117506048) !== 0;
-};
-
-Promise.prototype._isFollowing = function () {
- return (this._bitField & 67108864) === 67108864;
-};
-
-Promise.prototype._setLength = function (len) {
- this._bitField = (this._bitField & -65536) |
- (len & 65535);
-};
-
-Promise.prototype._setFulfilled = function () {
- this._bitField = this._bitField | 33554432;
- this._fireEvent("promiseFulfilled", this);
-};
-
-Promise.prototype._setRejected = function () {
- this._bitField = this._bitField | 16777216;
- this._fireEvent("promiseRejected", this);
-};
-
-Promise.prototype._setFollowing = function () {
- this._bitField = this._bitField | 67108864;
- this._fireEvent("promiseResolved", this);
-};
-
-Promise.prototype._setIsFinal = function () {
- this._bitField = this._bitField | 4194304;
-};
-
-Promise.prototype._isFinal = function () {
- return (this._bitField & 4194304) > 0;
-};
-
-Promise.prototype._unsetCancelled = function() {
- this._bitField = this._bitField & (~65536);
-};
-
-Promise.prototype._setCancelled = function() {
- this._bitField = this._bitField | 65536;
- this._fireEvent("promiseCancelled", this);
-};
-
-Promise.prototype._setWillBeCancelled = function() {
- this._bitField = this._bitField | 8388608;
-};
-
-Promise.prototype._setAsyncGuaranteed = function() {
- if (async.hasCustomScheduler()) return;
- this._bitField = this._bitField | 134217728;
-};
-
-Promise.prototype._receiverAt = function (index) {
- var ret = index === 0 ? this._receiver0 : this[
- index * 4 - 4 + 3];
- if (ret === UNDEFINED_BINDING) {
- return undefined;
- } else if (ret === undefined && this._isBound()) {
- return this._boundValue();
- }
- return ret;
-};
-
-Promise.prototype._promiseAt = function (index) {
- return this[
- index * 4 - 4 + 2];
-};
-
-Promise.prototype._fulfillmentHandlerAt = function (index) {
- return this[
- index * 4 - 4 + 0];
-};
-
-Promise.prototype._rejectionHandlerAt = function (index) {
- return this[
- index * 4 - 4 + 1];
-};
-
-Promise.prototype._boundValue = function() {};
-
-Promise.prototype._migrateCallback0 = function (follower) {
- var bitField = follower._bitField;
- var fulfill = follower._fulfillmentHandler0;
- var reject = follower._rejectionHandler0;
- var promise = follower._promise0;
- var receiver = follower._receiverAt(0);
- if (receiver === undefined) receiver = UNDEFINED_BINDING;
- this._addCallbacks(fulfill, reject, promise, receiver, null);
-};
-
-Promise.prototype._migrateCallbackAt = function (follower, index) {
- var fulfill = follower._fulfillmentHandlerAt(index);
- var reject = follower._rejectionHandlerAt(index);
- var promise = follower._promiseAt(index);
- var receiver = follower._receiverAt(index);
- if (receiver === undefined) receiver = UNDEFINED_BINDING;
- this._addCallbacks(fulfill, reject, promise, receiver, null);
-};
-
-Promise.prototype._addCallbacks = function (
- fulfill,
- reject,
- promise,
- receiver,
- domain
-) {
- var index = this._length();
-
- if (index >= 65535 - 4) {
- index = 0;
- this._setLength(0);
- }
-
- if (index === 0) {
- this._promise0 = promise;
- this._receiver0 = receiver;
- if (typeof fulfill === "function") {
- this._fulfillmentHandler0 =
- domain === null ? fulfill : util.domainBind(domain, fulfill);
- }
- if (typeof reject === "function") {
- this._rejectionHandler0 =
- domain === null ? reject : util.domainBind(domain, reject);
- }
- } else {
- var base = index * 4 - 4;
- this[base + 2] = promise;
- this[base + 3] = receiver;
- if (typeof fulfill === "function") {
- this[base + 0] =
- domain === null ? fulfill : util.domainBind(domain, fulfill);
- }
- if (typeof reject === "function") {
- this[base + 1] =
- domain === null ? reject : util.domainBind(domain, reject);
- }
- }
- this._setLength(index + 1);
- return index;
-};
-
-Promise.prototype._proxy = function (proxyable, arg) {
- this._addCallbacks(undefined, undefined, arg, proxyable, null);
-};
-
-Promise.prototype._resolveCallback = function(value, shouldBind) {
- if (((this._bitField & 117506048) !== 0)) return;
- if (value === this)
- return this._rejectCallback(makeSelfResolutionError(), false);
- var maybePromise = tryConvertToPromise(value, this);
- if (!(maybePromise instanceof Promise)) return this._fulfill(value);
-
- if (shouldBind) this._propagateFrom(maybePromise, 2);
-
- var promise = maybePromise._target();
-
- if (promise === this) {
- this._reject(makeSelfResolutionError());
- return;
- }
-
- var bitField = promise._bitField;
- if (((bitField & 50397184) === 0)) {
- var len = this._length();
- if (len > 0) promise._migrateCallback0(this);
- for (var i = 1; i < len; ++i) {
- promise._migrateCallbackAt(this, i);
- }
- this._setFollowing();
- this._setLength(0);
- this._setFollowee(promise);
- } else if (((bitField & 33554432) !== 0)) {
- this._fulfill(promise._value());
- } else if (((bitField & 16777216) !== 0)) {
- this._reject(promise._reason());
- } else {
- var reason = new CancellationError("late cancellation observer");
- promise._attachExtraTrace(reason);
- this._reject(reason);
- }
-};
-
-Promise.prototype._rejectCallback =
-function(reason, synchronous, ignoreNonErrorWarnings) {
- var trace = util.ensureErrorObject(reason);
- var hasStack = trace === reason;
- if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {
- var message = "a promise was rejected with a non-error: " +
- util.classString(reason);
- this._warn(message, true);
- }
- this._attachExtraTrace(trace, synchronous ? hasStack : false);
- this._reject(reason);
-};
-
-Promise.prototype._resolveFromExecutor = function (executor) {
- var promise = this;
- this._captureStackTrace();
- this._pushContext();
- var synchronous = true;
- var r = this._execute(executor, function(value) {
- promise._resolveCallback(value);
- }, function (reason) {
- promise._rejectCallback(reason, synchronous);
- });
- synchronous = false;
- this._popContext();
-
- if (r !== undefined) {
- promise._rejectCallback(r, true);
- }
-};
-
-Promise.prototype._settlePromiseFromHandler = function (
- handler, receiver, value, promise
-) {
- var bitField = promise._bitField;
- if (((bitField & 65536) !== 0)) return;
- promise._pushContext();
- var x;
- if (receiver === APPLY) {
- if (!value || typeof value.length !== "number") {
- x = errorObj;
- x.e = new TypeError("cannot .spread() a non-array: " +
- util.classString(value));
- } else {
- x = tryCatch(handler).apply(this._boundValue(), value);
- }
- } else {
- x = tryCatch(handler).call(receiver, value);
- }
- var promiseCreated = promise._popContext();
- bitField = promise._bitField;
- if (((bitField & 65536) !== 0)) return;
-
- if (x === NEXT_FILTER) {
- promise._reject(value);
- } else if (x === errorObj) {
- promise._rejectCallback(x.e, false);
- } else {
- debug.checkForgottenReturns(x, promiseCreated, "", promise, this);
- promise._resolveCallback(x);
- }
-};
-
-Promise.prototype._target = function() {
- var ret = this;
- while (ret._isFollowing()) ret = ret._followee();
- return ret;
-};
-
-Promise.prototype._followee = function() {
- return this._rejectionHandler0;
-};
-
-Promise.prototype._setFollowee = function(promise) {
- this._rejectionHandler0 = promise;
-};
-
-Promise.prototype._settlePromise = function(promise, handler, receiver, value) {
- var isPromise = promise instanceof Promise;
- var bitField = this._bitField;
- var asyncGuaranteed = ((bitField & 134217728) !== 0);
- if (((bitField & 65536) !== 0)) {
- if (isPromise) promise._invokeInternalOnCancel();
-
- if (receiver instanceof PassThroughHandlerContext &&
- receiver.isFinallyHandler()) {
- receiver.cancelPromise = promise;
- if (tryCatch(handler).call(receiver, value) === errorObj) {
- promise._reject(errorObj.e);
- }
- } else if (handler === reflectHandler) {
- promise._fulfill(reflectHandler.call(receiver));
- } else if (receiver instanceof Proxyable) {
- receiver._promiseCancelled(promise);
- } else if (isPromise || promise instanceof PromiseArray) {
- promise._cancel();
- } else {
- receiver.cancel();
- }
- } else if (typeof handler === "function") {
- if (!isPromise) {
- handler.call(receiver, value, promise);
- } else {
- if (asyncGuaranteed) promise._setAsyncGuaranteed();
- this._settlePromiseFromHandler(handler, receiver, value, promise);
- }
- } else if (receiver instanceof Proxyable) {
- if (!receiver._isResolved()) {
- if (((bitField & 33554432) !== 0)) {
- receiver._promiseFulfilled(value, promise);
- } else {
- receiver._promiseRejected(value, promise);
- }
- }
- } else if (isPromise) {
- if (asyncGuaranteed) promise._setAsyncGuaranteed();
- if (((bitField & 33554432) !== 0)) {
- promise._fulfill(value);
- } else {
- promise._reject(value);
- }
- }
-};
-
-Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) {
- var handler = ctx.handler;
- var promise = ctx.promise;
- var receiver = ctx.receiver;
- var value = ctx.value;
- if (typeof handler === "function") {
- if (!(promise instanceof Promise)) {
- handler.call(receiver, value, promise);
- } else {
- this._settlePromiseFromHandler(handler, receiver, value, promise);
- }
- } else if (promise instanceof Promise) {
- promise._reject(value);
- }
-};
-
-Promise.prototype._settlePromiseCtx = function(ctx) {
- this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value);
-};
-
-Promise.prototype._settlePromise0 = function(handler, value, bitField) {
- var promise = this._promise0;
- var receiver = this._receiverAt(0);
- this._promise0 = undefined;
- this._receiver0 = undefined;
- this._settlePromise(promise, handler, receiver, value);
-};
-
-Promise.prototype._clearCallbackDataAtIndex = function(index) {
- var base = index * 4 - 4;
- this[base + 2] =
- this[base + 3] =
- this[base + 0] =
- this[base + 1] = undefined;
-};
-
-Promise.prototype._fulfill = function (value) {
- var bitField = this._bitField;
- if (((bitField & 117506048) >>> 16)) return;
- if (value === this) {
- var err = makeSelfResolutionError();
- this._attachExtraTrace(err);
- return this._reject(err);
- }
- this._setFulfilled();
- this._rejectionHandler0 = value;
-
- if ((bitField & 65535) > 0) {
- if (((bitField & 134217728) !== 0)) {
- this._settlePromises();
- } else {
- async.settlePromises(this);
- }
- }
-};
-
-Promise.prototype._reject = function (reason) {
- var bitField = this._bitField;
- if (((bitField & 117506048) >>> 16)) return;
- this._setRejected();
- this._fulfillmentHandler0 = reason;
-
- if (this._isFinal()) {
- return async.fatalError(reason, util.isNode);
- }
-
- if ((bitField & 65535) > 0) {
- async.settlePromises(this);
- } else {
- this._ensurePossibleRejectionHandled();
- }
-};
-
-Promise.prototype._fulfillPromises = function (len, value) {
- for (var i = 1; i < len; i++) {
- var handler = this._fulfillmentHandlerAt(i);
- var promise = this._promiseAt(i);
- var receiver = this._receiverAt(i);
- this._clearCallbackDataAtIndex(i);
- this._settlePromise(promise, handler, receiver, value);
- }
-};
-
-Promise.prototype._rejectPromises = function (len, reason) {
- for (var i = 1; i < len; i++) {
- var handler = this._rejectionHandlerAt(i);
- var promise = this._promiseAt(i);
- var receiver = this._receiverAt(i);
- this._clearCallbackDataAtIndex(i);
- this._settlePromise(promise, handler, receiver, reason);
- }
-};
-
-Promise.prototype._settlePromises = function () {
- var bitField = this._bitField;
- var len = (bitField & 65535);
-
- if (len > 0) {
- if (((bitField & 16842752) !== 0)) {
- var reason = this._fulfillmentHandler0;
- this._settlePromise0(this._rejectionHandler0, reason, bitField);
- this._rejectPromises(len, reason);
- } else {
- var value = this._rejectionHandler0;
- this._settlePromise0(this._fulfillmentHandler0, value, bitField);
- this._fulfillPromises(len, value);
- }
- this._setLength(0);
- }
- this._clearCancellationData();
-};
-
-Promise.prototype._settledValue = function() {
- var bitField = this._bitField;
- if (((bitField & 33554432) !== 0)) {
- return this._rejectionHandler0;
- } else if (((bitField & 16777216) !== 0)) {
- return this._fulfillmentHandler0;
- }
-};
-
-function deferResolve(v) {this.promise._resolveCallback(v);}
-function deferReject(v) {this.promise._rejectCallback(v, false);}
-
-Promise.defer = Promise.pending = function() {
- debug.deprecated("Promise.defer", "new Promise");
- var promise = new Promise(INTERNAL);
- return {
- promise: promise,
- resolve: deferResolve,
- reject: deferReject
- };
-};
-
-util.notEnumerableProp(Promise,
- "_makeSelfResolutionError",
- makeSelfResolutionError);
-
-_dereq_("./method")(Promise, INTERNAL, tryConvertToPromise, apiRejection,
- debug);
-_dereq_("./bind")(Promise, INTERNAL, tryConvertToPromise, debug);
-_dereq_("./cancel")(Promise, PromiseArray, apiRejection, debug);
-_dereq_("./direct_resolve")(Promise);
-_dereq_("./synchronous_inspection")(Promise);
-_dereq_("./join")(
- Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain);
-Promise.Promise = Promise;
-Promise.version = "3.4.6";
-_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
-_dereq_('./call_get.js')(Promise);
-_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug);
-_dereq_('./timers.js')(Promise, INTERNAL, debug);
-_dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug);
-_dereq_('./nodeify.js')(Promise);
-_dereq_('./promisify.js')(Promise, INTERNAL);
-_dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);
-_dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);
-_dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
-_dereq_('./settle.js')(Promise, PromiseArray, debug);
-_dereq_('./some.js')(Promise, PromiseArray, apiRejection);
-_dereq_('./filter.js')(Promise, INTERNAL);
-_dereq_('./each.js')(Promise, INTERNAL);
-_dereq_('./any.js')(Promise);
-
- util.toFastProperties(Promise);
- util.toFastProperties(Promise.prototype);
- function fillTypes(value) {
- var p = new Promise(INTERNAL);
- p._fulfillmentHandler0 = value;
- p._rejectionHandler0 = value;
- p._promise0 = value;
- p._receiver0 = value;
- }
- // Complete slack tracking, opt out of field-type tracking and
- // stabilize map
- fillTypes({a: 1});
- fillTypes({b: 2});
- fillTypes({c: 3});
- fillTypes(1);
- fillTypes(function(){});
- fillTypes(undefined);
- fillTypes(false);
- fillTypes(new Promise(INTERNAL));
- debug.setBounds(Async.firstLineError, util.lastLineError);
- return Promise;
-
-};
-
-},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL, tryConvertToPromise,
- apiRejection, Proxyable) {
-var util = _dereq_("./util");
-var isArray = util.isArray;
-
-function toResolutionValue(val) {
- switch(val) {
- case -2: return [];
- case -3: return {};
- }
-}
-
-function PromiseArray(values) {
- var promise = this._promise = new Promise(INTERNAL);
- if (values instanceof Promise) {
- promise._propagateFrom(values, 3);
- }
- promise._setOnCancel(this);
- this._values = values;
- this._length = 0;
- this._totalResolved = 0;
- this._init(undefined, -2);
-}
-util.inherits(PromiseArray, Proxyable);
-
-PromiseArray.prototype.length = function () {
- return this._length;
-};
-
-PromiseArray.prototype.promise = function () {
- return this._promise;
-};
-
-PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
- var values = tryConvertToPromise(this._values, this._promise);
- if (values instanceof Promise) {
- values = values._target();
- var bitField = values._bitField;
- ;
- this._values = values;
-
- if (((bitField & 50397184) === 0)) {
- this._promise._setAsyncGuaranteed();
- return values._then(
- init,
- this._reject,
- undefined,
- this,
- resolveValueIfEmpty
- );
- } else if (((bitField & 33554432) !== 0)) {
- values = values._value();
- } else if (((bitField & 16777216) !== 0)) {
- return this._reject(values._reason());
- } else {
- return this._cancel();
- }
- }
- values = util.asArray(values);
- if (values === null) {
- var err = apiRejection(
- "expecting an array or an iterable object but got " + util.classString(values)).reason();
- this._promise._rejectCallback(err, false);
- return;
- }
-
- if (values.length === 0) {
- if (resolveValueIfEmpty === -5) {
- this._resolveEmptyArray();
- }
- else {
- this._resolve(toResolutionValue(resolveValueIfEmpty));
- }
- return;
- }
- this._iterate(values);
-};
-
-PromiseArray.prototype._iterate = function(values) {
- var len = this.getActualLength(values.length);
- this._length = len;
- this._values = this.shouldCopyValues() ? new Array(len) : this._values;
- var result = this._promise;
- var isResolved = false;
- var bitField = null;
- for (var i = 0; i < len; ++i) {
- var maybePromise = tryConvertToPromise(values[i], result);
-
- if (maybePromise instanceof Promise) {
- maybePromise = maybePromise._target();
- bitField = maybePromise._bitField;
- } else {
- bitField = null;
- }
-
- if (isResolved) {
- if (bitField !== null) {
- maybePromise.suppressUnhandledRejections();
- }
- } else if (bitField !== null) {
- if (((bitField & 50397184) === 0)) {
- maybePromise._proxy(this, i);
- this._values[i] = maybePromise;
- } else if (((bitField & 33554432) !== 0)) {
- isResolved = this._promiseFulfilled(maybePromise._value(), i);
- } else if (((bitField & 16777216) !== 0)) {
- isResolved = this._promiseRejected(maybePromise._reason(), i);
- } else {
- isResolved = this._promiseCancelled(i);
- }
- } else {
- isResolved = this._promiseFulfilled(maybePromise, i);
- }
- }
- if (!isResolved) result._setAsyncGuaranteed();
-};
-
-PromiseArray.prototype._isResolved = function () {
- return this._values === null;
-};
-
-PromiseArray.prototype._resolve = function (value) {
- this._values = null;
- this._promise._fulfill(value);
-};
-
-PromiseArray.prototype._cancel = function() {
- if (this._isResolved() || !this._promise._isCancellable()) return;
- this._values = null;
- this._promise._cancel();
-};
-
-PromiseArray.prototype._reject = function (reason) {
- this._values = null;
- this._promise._rejectCallback(reason, false);
-};
-
-PromiseArray.prototype._promiseFulfilled = function (value, index) {
- this._values[index] = value;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- this._resolve(this._values);
- return true;
- }
- return false;
-};
-
-PromiseArray.prototype._promiseCancelled = function() {
- this._cancel();
- return true;
-};
-
-PromiseArray.prototype._promiseRejected = function (reason) {
- this._totalResolved++;
- this._reject(reason);
- return true;
-};
-
-PromiseArray.prototype._resultCancelled = function() {
- if (this._isResolved()) return;
- var values = this._values;
- this._cancel();
- if (values instanceof Promise) {
- values.cancel();
- } else {
- for (var i = 0; i < values.length; ++i) {
- if (values[i] instanceof Promise) {
- values[i].cancel();
- }
- }
- }
-};
-
-PromiseArray.prototype.shouldCopyValues = function () {
- return true;
-};
-
-PromiseArray.prototype.getActualLength = function (len) {
- return len;
-};
-
-return PromiseArray;
-};
-
-},{"./util":36}],24:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var THIS = {};
-var util = _dereq_("./util");
-var nodebackForPromise = _dereq_("./nodeback");
-var withAppended = util.withAppended;
-var maybeWrapAsError = util.maybeWrapAsError;
-var canEvaluate = util.canEvaluate;
-var TypeError = _dereq_("./errors").TypeError;
-var defaultSuffix = "Async";
-var defaultPromisified = {__isPromisified__: true};
-var noCopyProps = [
- "arity", "length",
- "name",
- "arguments",
- "caller",
- "callee",
- "prototype",
- "__isPromisified__"
-];
-var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$");
-
-var defaultFilter = function(name) {
- return util.isIdentifier(name) &&
- name.charAt(0) !== "_" &&
- name !== "constructor";
-};
-
-function propsFilter(key) {
- return !noCopyPropsPattern.test(key);
-}
-
-function isPromisified(fn) {
- try {
- return fn.__isPromisified__ === true;
- }
- catch (e) {
- return false;
- }
-}
-
-function hasPromisified(obj, key, suffix) {
- var val = util.getDataPropertyOrDefault(obj, key + suffix,
- defaultPromisified);
- return val ? isPromisified(val) : false;
-}
-function checkValid(ret, suffix, suffixRegexp) {
- for (var i = 0; i < ret.length; i += 2) {
- var key = ret[i];
- if (suffixRegexp.test(key)) {
- var keyWithoutAsyncSuffix = key.replace(suffixRegexp, "");
- for (var j = 0; j < ret.length; j += 2) {
- if (ret[j] === keyWithoutAsyncSuffix) {
- throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/MqrFmX\u000a"
- .replace("%s", suffix));
- }
- }
- }
- }
-}
-
-function promisifiableMethods(obj, suffix, suffixRegexp, filter) {
- var keys = util.inheritedDataKeys(obj);
- var ret = [];
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- var value = obj[key];
- var passesDefaultFilter = filter === defaultFilter
- ? true : defaultFilter(key, value, obj);
- if (typeof value === "function" &&
- !isPromisified(value) &&
- !hasPromisified(obj, key, suffix) &&
- filter(key, value, obj, passesDefaultFilter)) {
- ret.push(key, value);
- }
- }
- checkValid(ret, suffix, suffixRegexp);
- return ret;
-}
-
-var escapeIdentRegex = function(str) {
- return str.replace(/([$])/, "\\$");
-};
-
-var makeNodePromisifiedEval;
-if (!true) {
-var switchCaseArgumentOrder = function(likelyArgumentCount) {
- var ret = [likelyArgumentCount];
- var min = Math.max(0, likelyArgumentCount - 1 - 3);
- for(var i = likelyArgumentCount - 1; i >= min; --i) {
- ret.push(i);
- }
- for(var i = likelyArgumentCount + 1; i <= 3; ++i) {
- ret.push(i);
- }
- return ret;
-};
-
-var argumentSequence = function(argumentCount) {
- return util.filledRange(argumentCount, "_arg", "");
-};
-
-var parameterDeclaration = function(parameterCount) {
- return util.filledRange(
- Math.max(parameterCount, 3), "_arg", "");
-};
-
-var parameterCount = function(fn) {
- if (typeof fn.length === "number") {
- return Math.max(Math.min(fn.length, 1023 + 1), 0);
- }
- return 0;
-};
-
-makeNodePromisifiedEval =
-function(callback, receiver, originalName, fn, _, multiArgs) {
- var newParameterCount = Math.max(0, parameterCount(fn) - 1);
- var argumentOrder = switchCaseArgumentOrder(newParameterCount);
- var shouldProxyThis = typeof callback === "string" || receiver === THIS;
-
- function generateCallForArgumentCount(count) {
- var args = argumentSequence(count).join(", ");
- var comma = count > 0 ? ", " : "";
- var ret;
- if (shouldProxyThis) {
- ret = "ret = callback.call(this, {{args}}, nodeback); break;\n";
- } else {
- ret = receiver === undefined
- ? "ret = callback({{args}}, nodeback); break;\n"
- : "ret = callback.call(receiver, {{args}}, nodeback); break;\n";
- }
- return ret.replace("{{args}}", args).replace(", ", comma);
- }
-
- function generateArgumentSwitchCase() {
- var ret = "";
- for (var i = 0; i < argumentOrder.length; ++i) {
- ret += "case " + argumentOrder[i] +":" +
- generateCallForArgumentCount(argumentOrder[i]);
- }
-
- ret += " \n\
- default: \n\
- var args = new Array(len + 1); \n\
- var i = 0; \n\
- for (var i = 0; i < len; ++i) { \n\
- args[i] = arguments[i]; \n\
- } \n\
- args[i] = nodeback; \n\
- [CodeForCall] \n\
- break; \n\
- ".replace("[CodeForCall]", (shouldProxyThis
- ? "ret = callback.apply(this, args);\n"
- : "ret = callback.apply(receiver, args);\n"));
- return ret;
- }
-
- var getFunctionCode = typeof callback === "string"
- ? ("this != null ? this['"+callback+"'] : fn")
- : "fn";
- var body = "'use strict'; \n\
- var ret = function (Parameters) { \n\
- 'use strict'; \n\
- var len = arguments.length; \n\
- var promise = new Promise(INTERNAL); \n\
- promise._captureStackTrace(); \n\
- var nodeback = nodebackForPromise(promise, " + multiArgs + "); \n\
- var ret; \n\
- var callback = tryCatch([GetFunctionCode]); \n\
- switch(len) { \n\
- [CodeForSwitchCase] \n\
- } \n\
- if (ret === errorObj) { \n\
- promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\
- } \n\
- if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n\
- return promise; \n\
- }; \n\
- notEnumerableProp(ret, '__isPromisified__', true); \n\
- return ret; \n\
- ".replace("[CodeForSwitchCase]", generateArgumentSwitchCase())
- .replace("[GetFunctionCode]", getFunctionCode);
- body = body.replace("Parameters", parameterDeclaration(newParameterCount));
- return new Function("Promise",
- "fn",
- "receiver",
- "withAppended",
- "maybeWrapAsError",
- "nodebackForPromise",
- "tryCatch",
- "errorObj",
- "notEnumerableProp",
- "INTERNAL",
- body)(
- Promise,
- fn,
- receiver,
- withAppended,
- maybeWrapAsError,
- nodebackForPromise,
- util.tryCatch,
- util.errorObj,
- util.notEnumerableProp,
- INTERNAL);
-};
-}
-
-function makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) {
- var defaultThis = (function() {return this;})();
- var method = callback;
- if (typeof method === "string") {
- callback = fn;
- }
- function promisified() {
- var _receiver = receiver;
- if (receiver === THIS) _receiver = this;
- var promise = new Promise(INTERNAL);
- promise._captureStackTrace();
- var cb = typeof method === "string" && this !== defaultThis
- ? this[method] : callback;
- var fn = nodebackForPromise(promise, multiArgs);
- try {
- cb.apply(_receiver, withAppended(arguments, fn));
- } catch(e) {
- promise._rejectCallback(maybeWrapAsError(e), true, true);
- }
- if (!promise._isFateSealed()) promise._setAsyncGuaranteed();
- return promise;
- }
- util.notEnumerableProp(promisified, "__isPromisified__", true);
- return promisified;
-}
-
-var makeNodePromisified = canEvaluate
- ? makeNodePromisifiedEval
- : makeNodePromisifiedClosure;
-
-function promisifyAll(obj, suffix, filter, promisifier, multiArgs) {
- var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$");
- var methods =
- promisifiableMethods(obj, suffix, suffixRegexp, filter);
-
- for (var i = 0, len = methods.length; i < len; i+= 2) {
- var key = methods[i];
- var fn = methods[i+1];
- var promisifiedKey = key + suffix;
- if (promisifier === makeNodePromisified) {
- obj[promisifiedKey] =
- makeNodePromisified(key, THIS, key, fn, suffix, multiArgs);
- } else {
- var promisified = promisifier(fn, function() {
- return makeNodePromisified(key, THIS, key,
- fn, suffix, multiArgs);
- });
- util.notEnumerableProp(promisified, "__isPromisified__", true);
- obj[promisifiedKey] = promisified;
- }
- }
- util.toFastProperties(obj);
- return obj;
-}
-
-function promisify(callback, receiver, multiArgs) {
- return makeNodePromisified(callback, receiver, undefined,
- callback, null, multiArgs);
-}
-
-Promise.promisify = function (fn, options) {
- if (typeof fn !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(fn));
- }
- if (isPromisified(fn)) {
- return fn;
- }
- options = Object(options);
- var receiver = options.context === undefined ? THIS : options.context;
- var multiArgs = !!options.multiArgs;
- var ret = promisify(fn, receiver, multiArgs);
- util.copyDescriptors(fn, ret, propsFilter);
- return ret;
-};
-
-Promise.promisifyAll = function (target, options) {
- if (typeof target !== "function" && typeof target !== "object") {
- throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- options = Object(options);
- var multiArgs = !!options.multiArgs;
- var suffix = options.suffix;
- if (typeof suffix !== "string") suffix = defaultSuffix;
- var filter = options.filter;
- if (typeof filter !== "function") filter = defaultFilter;
- var promisifier = options.promisifier;
- if (typeof promisifier !== "function") promisifier = makeNodePromisified;
-
- if (!util.isIdentifier(suffix)) {
- throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
-
- var keys = util.inheritedDataKeys(target);
- for (var i = 0; i < keys.length; ++i) {
- var value = target[keys[i]];
- if (keys[i] !== "constructor" &&
- util.isClass(value)) {
- promisifyAll(value.prototype, suffix, filter, promisifier,
- multiArgs);
- promisifyAll(value, suffix, filter, promisifier, multiArgs);
- }
- }
-
- return promisifyAll(target, suffix, filter, promisifier, multiArgs);
-};
-};
-
-
-},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(
- Promise, PromiseArray, tryConvertToPromise, apiRejection) {
-var util = _dereq_("./util");
-var isObject = util.isObject;
-var es5 = _dereq_("./es5");
-var Es6Map;
-if (typeof Map === "function") Es6Map = Map;
-
-var mapToEntries = (function() {
- var index = 0;
- var size = 0;
-
- function extractEntry(value, key) {
- this[index] = value;
- this[index + size] = key;
- index++;
- }
-
- return function mapToEntries(map) {
- size = map.size;
- index = 0;
- var ret = new Array(map.size * 2);
- map.forEach(extractEntry, ret);
- return ret;
- };
-})();
-
-var entriesToMap = function(entries) {
- var ret = new Es6Map();
- var length = entries.length / 2 | 0;
- for (var i = 0; i < length; ++i) {
- var key = entries[length + i];
- var value = entries[i];
- ret.set(key, value);
- }
- return ret;
-};
-
-function PropertiesPromiseArray(obj) {
- var isMap = false;
- var entries;
- if (Es6Map !== undefined && obj instanceof Es6Map) {
- entries = mapToEntries(obj);
- isMap = true;
- } else {
- var keys = es5.keys(obj);
- var len = keys.length;
- entries = new Array(len * 2);
- for (var i = 0; i < len; ++i) {
- var key = keys[i];
- entries[i] = obj[key];
- entries[i + len] = key;
- }
- }
- this.constructor$(entries);
- this._isMap = isMap;
- this._init$(undefined, -3);
-}
-util.inherits(PropertiesPromiseArray, PromiseArray);
-
-PropertiesPromiseArray.prototype._init = function () {};
-
-PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {
- this._values[index] = value;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- var val;
- if (this._isMap) {
- val = entriesToMap(this._values);
- } else {
- val = {};
- var keyOffset = this.length();
- for (var i = 0, len = this.length(); i < len; ++i) {
- val[this._values[i + keyOffset]] = this._values[i];
- }
- }
- this._resolve(val);
- return true;
- }
- return false;
-};
-
-PropertiesPromiseArray.prototype.shouldCopyValues = function () {
- return false;
-};
-
-PropertiesPromiseArray.prototype.getActualLength = function (len) {
- return len >> 1;
-};
-
-function props(promises) {
- var ret;
- var castValue = tryConvertToPromise(promises);
-
- if (!isObject(castValue)) {
- return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- } else if (castValue instanceof Promise) {
- ret = castValue._then(
- Promise.props, undefined, undefined, undefined, undefined);
- } else {
- ret = new PropertiesPromiseArray(castValue).promise();
- }
-
- if (castValue instanceof Promise) {
- ret._propagateFrom(castValue, 2);
- }
- return ret;
-}
-
-Promise.prototype.props = function () {
- return props(this);
-};
-
-Promise.props = function (promises) {
- return props(promises);
-};
-};
-
-},{"./es5":13,"./util":36}],26:[function(_dereq_,module,exports){
-"use strict";
-function arrayMove(src, srcIndex, dst, dstIndex, len) {
- for (var j = 0; j < len; ++j) {
- dst[j + dstIndex] = src[j + srcIndex];
- src[j + srcIndex] = void 0;
- }
-}
-
-function Queue(capacity) {
- this._capacity = capacity;
- this._length = 0;
- this._front = 0;
-}
-
-Queue.prototype._willBeOverCapacity = function (size) {
- return this._capacity < size;
-};
-
-Queue.prototype._pushOne = function (arg) {
- var length = this.length();
- this._checkCapacity(length + 1);
- var i = (this._front + length) & (this._capacity - 1);
- this[i] = arg;
- this._length = length + 1;
-};
-
-Queue.prototype._unshiftOne = function(value) {
- var capacity = this._capacity;
- this._checkCapacity(this.length() + 1);
- var front = this._front;
- var i = (((( front - 1 ) &
- ( capacity - 1) ) ^ capacity ) - capacity );
- this[i] = value;
- this._front = i;
- this._length = this.length() + 1;
-};
-
-Queue.prototype.unshift = function(fn, receiver, arg) {
- this._unshiftOne(arg);
- this._unshiftOne(receiver);
- this._unshiftOne(fn);
-};
-
-Queue.prototype.push = function (fn, receiver, arg) {
- var length = this.length() + 3;
- if (this._willBeOverCapacity(length)) {
- this._pushOne(fn);
- this._pushOne(receiver);
- this._pushOne(arg);
- return;
- }
- var j = this._front + length - 3;
- this._checkCapacity(length);
- var wrapMask = this._capacity - 1;
- this[(j + 0) & wrapMask] = fn;
- this[(j + 1) & wrapMask] = receiver;
- this[(j + 2) & wrapMask] = arg;
- this._length = length;
-};
-
-Queue.prototype.shift = function () {
- var front = this._front,
- ret = this[front];
-
- this[front] = undefined;
- this._front = (front + 1) & (this._capacity - 1);
- this._length--;
- return ret;
-};
-
-Queue.prototype.length = function () {
- return this._length;
-};
-
-Queue.prototype._checkCapacity = function (size) {
- if (this._capacity < size) {
- this._resizeTo(this._capacity << 1);
- }
-};
-
-Queue.prototype._resizeTo = function (capacity) {
- var oldCapacity = this._capacity;
- this._capacity = capacity;
- var front = this._front;
- var length = this._length;
- var moveItemsCount = (front + length) & (oldCapacity - 1);
- arrayMove(this, 0, this, oldCapacity, moveItemsCount);
-};
-
-module.exports = Queue;
-
-},{}],27:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(
- Promise, INTERNAL, tryConvertToPromise, apiRejection) {
-var util = _dereq_("./util");
-
-var raceLater = function (promise) {
- return promise.then(function(array) {
- return race(array, promise);
- });
-};
-
-function race(promises, parent) {
- var maybePromise = tryConvertToPromise(promises);
-
- if (maybePromise instanceof Promise) {
- return raceLater(maybePromise);
- } else {
- promises = util.asArray(promises);
- if (promises === null)
- return apiRejection("expecting an array or an iterable object but got " + util.classString(promises));
- }
-
- var ret = new Promise(INTERNAL);
- if (parent !== undefined) {
- ret._propagateFrom(parent, 3);
- }
- var fulfill = ret._fulfill;
- var reject = ret._reject;
- for (var i = 0, len = promises.length; i < len; ++i) {
- var val = promises[i];
-
- if (val === undefined && !(i in promises)) {
- continue;
- }
-
- Promise.cast(val)._then(fulfill, reject, undefined, ret, null);
- }
- return ret;
-}
-
-Promise.race = function (promises) {
- return race(promises, undefined);
-};
-
-Promise.prototype.race = function () {
- return race(this, undefined);
-};
-
-};
-
-},{"./util":36}],28:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise,
- PromiseArray,
- apiRejection,
- tryConvertToPromise,
- INTERNAL,
- debug) {
-var getDomain = Promise._getDomain;
-var util = _dereq_("./util");
-var tryCatch = util.tryCatch;
-
-function ReductionPromiseArray(promises, fn, initialValue, _each) {
- this.constructor$(promises);
- var domain = getDomain();
- this._fn = domain === null ? fn : util.domainBind(domain, fn);
- if (initialValue !== undefined) {
- initialValue = Promise.resolve(initialValue);
- initialValue._attachCancellationCallback(this);
- }
- this._initialValue = initialValue;
- this._currentCancellable = null;
- if(_each === INTERNAL) {
- this._eachValues = Array(this._length);
- } else if (_each === 0) {
- this._eachValues = null;
- } else {
- this._eachValues = undefined;
- }
- this._promise._captureStackTrace();
- this._init$(undefined, -5);
-}
-util.inherits(ReductionPromiseArray, PromiseArray);
-
-ReductionPromiseArray.prototype._gotAccum = function(accum) {
- if (this._eachValues !== undefined &&
- this._eachValues !== null &&
- accum !== INTERNAL) {
- this._eachValues.push(accum);
- }
-};
-
-ReductionPromiseArray.prototype._eachComplete = function(value) {
- if (this._eachValues !== null) {
- this._eachValues.push(value);
- }
- return this._eachValues;
-};
-
-ReductionPromiseArray.prototype._init = function() {};
-
-ReductionPromiseArray.prototype._resolveEmptyArray = function() {
- this._resolve(this._eachValues !== undefined ? this._eachValues
- : this._initialValue);
-};
-
-ReductionPromiseArray.prototype.shouldCopyValues = function () {
- return false;
-};
-
-ReductionPromiseArray.prototype._resolve = function(value) {
- this._promise._resolveCallback(value);
- this._values = null;
-};
-
-ReductionPromiseArray.prototype._resultCancelled = function(sender) {
- if (sender === this._initialValue) return this._cancel();
- if (this._isResolved()) return;
- this._resultCancelled$();
- if (this._currentCancellable instanceof Promise) {
- this._currentCancellable.cancel();
- }
- if (this._initialValue instanceof Promise) {
- this._initialValue.cancel();
- }
-};
-
-ReductionPromiseArray.prototype._iterate = function (values) {
- this._values = values;
- var value;
- var i;
- var length = values.length;
- if (this._initialValue !== undefined) {
- value = this._initialValue;
- i = 0;
- } else {
- value = Promise.resolve(values[0]);
- i = 1;
- }
-
- this._currentCancellable = value;
-
- if (!value.isRejected()) {
- for (; i < length; ++i) {
- var ctx = {
- accum: null,
- value: values[i],
- index: i,
- length: length,
- array: this
- };
- value = value._then(gotAccum, undefined, undefined, ctx, undefined);
- }
- }
-
- if (this._eachValues !== undefined) {
- value = value
- ._then(this._eachComplete, undefined, undefined, this, undefined);
- }
- value._then(completed, completed, undefined, value, this);
-};
-
-Promise.prototype.reduce = function (fn, initialValue) {
- return reduce(this, fn, initialValue, null);
-};
-
-Promise.reduce = function (promises, fn, initialValue, _each) {
- return reduce(promises, fn, initialValue, _each);
-};
-
-function completed(valueOrReason, array) {
- if (this.isFulfilled()) {
- array._resolve(valueOrReason);
- } else {
- array._reject(valueOrReason);
- }
-}
-
-function reduce(promises, fn, initialValue, _each) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
- return array.promise();
-}
-
-function gotAccum(accum) {
- this.accum = accum;
- this.array._gotAccum(accum);
- var value = tryConvertToPromise(this.value, this.array._promise);
- if (value instanceof Promise) {
- this.array._currentCancellable = value;
- return value._then(gotValue, undefined, undefined, this, undefined);
- } else {
- return gotValue.call(this, value);
- }
-}
-
-function gotValue(value) {
- var array = this.array;
- var promise = array._promise;
- var fn = tryCatch(array._fn);
- promise._pushContext();
- var ret;
- if (array._eachValues !== undefined) {
- ret = fn.call(promise._boundValue(), value, this.index, this.length);
- } else {
- ret = fn.call(promise._boundValue(),
- this.accum, value, this.index, this.length);
- }
- if (ret instanceof Promise) {
- array._currentCancellable = ret;
- }
- var promiseCreated = promise._popContext();
- debug.checkForgottenReturns(
- ret,
- promiseCreated,
- array._eachValues !== undefined ? "Promise.each" : "Promise.reduce",
- promise
- );
- return ret;
-}
-};
-
-},{"./util":36}],29:[function(_dereq_,module,exports){
-"use strict";
-var util = _dereq_("./util");
-var schedule;
-var noAsyncScheduler = function() {
- throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
-};
-var NativePromise = util.getNativePromise();
-if (util.isNode && typeof MutationObserver === "undefined") {
- var GlobalSetImmediate = global.setImmediate;
- var ProcessNextTick = process.nextTick;
- schedule = util.isRecentNode
- ? function(fn) { GlobalSetImmediate.call(global, fn); }
- : function(fn) { ProcessNextTick.call(process, fn); };
-} else if (typeof NativePromise === "function" &&
- typeof NativePromise.resolve === "function") {
- var nativePromise = NativePromise.resolve();
- schedule = function(fn) {
- nativePromise.then(fn);
- };
-} else if ((typeof MutationObserver !== "undefined") &&
- !(typeof window !== "undefined" &&
- window.navigator &&
- (window.navigator.standalone || window.cordova))) {
- schedule = (function() {
- var div = document.createElement("div");
- var opts = {attributes: true};
- var toggleScheduled = false;
- var div2 = document.createElement("div");
- var o2 = new MutationObserver(function() {
- div.classList.toggle("foo");
- toggleScheduled = false;
- });
- o2.observe(div2, opts);
-
- var scheduleToggle = function() {
- if (toggleScheduled) return;
- toggleScheduled = true;
- div2.classList.toggle("foo");
- };
-
- return function schedule(fn) {
- var o = new MutationObserver(function() {
- o.disconnect();
- fn();
- });
- o.observe(div, opts);
- scheduleToggle();
- };
- })();
-} else if (typeof setImmediate !== "undefined") {
- schedule = function (fn) {
- setImmediate(fn);
- };
-} else if (typeof setTimeout !== "undefined") {
- schedule = function (fn) {
- setTimeout(fn, 0);
- };
-} else {
- schedule = noAsyncScheduler;
-}
-module.exports = schedule;
-
-},{"./util":36}],30:[function(_dereq_,module,exports){
-"use strict";
-module.exports =
- function(Promise, PromiseArray, debug) {
-var PromiseInspection = Promise.PromiseInspection;
-var util = _dereq_("./util");
-
-function SettledPromiseArray(values) {
- this.constructor$(values);
-}
-util.inherits(SettledPromiseArray, PromiseArray);
-
-SettledPromiseArray.prototype._promiseResolved = function (index, inspection) {
- this._values[index] = inspection;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- this._resolve(this._values);
- return true;
- }
- return false;
-};
-
-SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {
- var ret = new PromiseInspection();
- ret._bitField = 33554432;
- ret._settledValueField = value;
- return this._promiseResolved(index, ret);
-};
-SettledPromiseArray.prototype._promiseRejected = function (reason, index) {
- var ret = new PromiseInspection();
- ret._bitField = 16777216;
- ret._settledValueField = reason;
- return this._promiseResolved(index, ret);
-};
-
-Promise.settle = function (promises) {
- debug.deprecated(".settle()", ".reflect()");
- return new SettledPromiseArray(promises).promise();
-};
-
-Promise.prototype.settle = function () {
- return Promise.settle(this);
-};
-};
-
-},{"./util":36}],31:[function(_dereq_,module,exports){
-"use strict";
-module.exports =
-function(Promise, PromiseArray, apiRejection) {
-var util = _dereq_("./util");
-var RangeError = _dereq_("./errors").RangeError;
-var AggregateError = _dereq_("./errors").AggregateError;
-var isArray = util.isArray;
-var CANCELLATION = {};
-
-
-function SomePromiseArray(values) {
- this.constructor$(values);
- this._howMany = 0;
- this._unwrap = false;
- this._initialized = false;
-}
-util.inherits(SomePromiseArray, PromiseArray);
-
-SomePromiseArray.prototype._init = function () {
- if (!this._initialized) {
- return;
- }
- if (this._howMany === 0) {
- this._resolve([]);
- return;
- }
- this._init$(undefined, -5);
- var isArrayResolved = isArray(this._values);
- if (!this._isResolved() &&
- isArrayResolved &&
- this._howMany > this._canPossiblyFulfill()) {
- this._reject(this._getRangeError(this.length()));
- }
-};
-
-SomePromiseArray.prototype.init = function () {
- this._initialized = true;
- this._init();
-};
-
-SomePromiseArray.prototype.setUnwrap = function () {
- this._unwrap = true;
-};
-
-SomePromiseArray.prototype.howMany = function () {
- return this._howMany;
-};
-
-SomePromiseArray.prototype.setHowMany = function (count) {
- this._howMany = count;
-};
-
-SomePromiseArray.prototype._promiseFulfilled = function (value) {
- this._addFulfilled(value);
- if (this._fulfilled() === this.howMany()) {
- this._values.length = this.howMany();
- if (this.howMany() === 1 && this._unwrap) {
- this._resolve(this._values[0]);
- } else {
- this._resolve(this._values);
- }
- return true;
- }
- return false;
-
-};
-SomePromiseArray.prototype._promiseRejected = function (reason) {
- this._addRejected(reason);
- return this._checkOutcome();
-};
-
-SomePromiseArray.prototype._promiseCancelled = function () {
- if (this._values instanceof Promise || this._values == null) {
- return this._cancel();
- }
- this._addRejected(CANCELLATION);
- return this._checkOutcome();
-};
-
-SomePromiseArray.prototype._checkOutcome = function() {
- if (this.howMany() > this._canPossiblyFulfill()) {
- var e = new AggregateError();
- for (var i = this.length(); i < this._values.length; ++i) {
- if (this._values[i] !== CANCELLATION) {
- e.push(this._values[i]);
- }
- }
- if (e.length > 0) {
- this._reject(e);
- } else {
- this._cancel();
- }
- return true;
- }
- return false;
-};
-
-SomePromiseArray.prototype._fulfilled = function () {
- return this._totalResolved;
-};
-
-SomePromiseArray.prototype._rejected = function () {
- return this._values.length - this.length();
-};
-
-SomePromiseArray.prototype._addRejected = function (reason) {
- this._values.push(reason);
-};
-
-SomePromiseArray.prototype._addFulfilled = function (value) {
- this._values[this._totalResolved++] = value;
-};
-
-SomePromiseArray.prototype._canPossiblyFulfill = function () {
- return this.length() - this._rejected();
-};
-
-SomePromiseArray.prototype._getRangeError = function (count) {
- var message = "Input array must contain at least " +
- this._howMany + " items but contains only " + count + " items";
- return new RangeError(message);
-};
-
-SomePromiseArray.prototype._resolveEmptyArray = function () {
- this._reject(this._getRangeError(0));
-};
-
-function some(promises, howMany) {
- if ((howMany | 0) !== howMany || howMany < 0) {
- return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- var ret = new SomePromiseArray(promises);
- var promise = ret.promise();
- ret.setHowMany(howMany);
- ret.init();
- return promise;
-}
-
-Promise.some = function (promises, howMany) {
- return some(promises, howMany);
-};
-
-Promise.prototype.some = function (howMany) {
- return some(this, howMany);
-};
-
-Promise._SomePromiseArray = SomePromiseArray;
-};
-
-},{"./errors":12,"./util":36}],32:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-function PromiseInspection(promise) {
- if (promise !== undefined) {
- promise = promise._target();
- this._bitField = promise._bitField;
- this._settledValueField = promise._isFateSealed()
- ? promise._settledValue() : undefined;
- }
- else {
- this._bitField = 0;
- this._settledValueField = undefined;
- }
-}
-
-PromiseInspection.prototype._settledValue = function() {
- return this._settledValueField;
-};
-
-var value = PromiseInspection.prototype.value = function () {
- if (!this.isFulfilled()) {
- throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- return this._settledValue();
-};
-
-var reason = PromiseInspection.prototype.error =
-PromiseInspection.prototype.reason = function () {
- if (!this.isRejected()) {
- throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- return this._settledValue();
-};
-
-var isFulfilled = PromiseInspection.prototype.isFulfilled = function() {
- return (this._bitField & 33554432) !== 0;
-};
-
-var isRejected = PromiseInspection.prototype.isRejected = function () {
- return (this._bitField & 16777216) !== 0;
-};
-
-var isPending = PromiseInspection.prototype.isPending = function () {
- return (this._bitField & 50397184) === 0;
-};
-
-var isResolved = PromiseInspection.prototype.isResolved = function () {
- return (this._bitField & 50331648) !== 0;
-};
-
-PromiseInspection.prototype.isCancelled = function() {
- return (this._bitField & 8454144) !== 0;
-};
-
-Promise.prototype.__isCancelled = function() {
- return (this._bitField & 65536) === 65536;
-};
-
-Promise.prototype._isCancelled = function() {
- return this._target().__isCancelled();
-};
-
-Promise.prototype.isCancelled = function() {
- return (this._target()._bitField & 8454144) !== 0;
-};
-
-Promise.prototype.isPending = function() {
- return isPending.call(this._target());
-};
-
-Promise.prototype.isRejected = function() {
- return isRejected.call(this._target());
-};
-
-Promise.prototype.isFulfilled = function() {
- return isFulfilled.call(this._target());
-};
-
-Promise.prototype.isResolved = function() {
- return isResolved.call(this._target());
-};
-
-Promise.prototype.value = function() {
- return value.call(this._target());
-};
-
-Promise.prototype.reason = function() {
- var target = this._target();
- target._unsetRejectionIsUnhandled();
- return reason.call(target);
-};
-
-Promise.prototype._value = function() {
- return this._settledValue();
-};
-
-Promise.prototype._reason = function() {
- this._unsetRejectionIsUnhandled();
- return this._settledValue();
-};
-
-Promise.PromiseInspection = PromiseInspection;
-};
-
-},{}],33:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var util = _dereq_("./util");
-var errorObj = util.errorObj;
-var isObject = util.isObject;
-
-function tryConvertToPromise(obj, context) {
- if (isObject(obj)) {
- if (obj instanceof Promise) return obj;
- var then = getThen(obj);
- if (then === errorObj) {
- if (context) context._pushContext();
- var ret = Promise.reject(then.e);
- if (context) context._popContext();
- return ret;
- } else if (typeof then === "function") {
- if (isAnyBluebirdPromise(obj)) {
- var ret = new Promise(INTERNAL);
- obj._then(
- ret._fulfill,
- ret._reject,
- undefined,
- ret,
- null
- );
- return ret;
- }
- return doThenable(obj, then, context);
- }
- }
- return obj;
-}
-
-function doGetThen(obj) {
- return obj.then;
-}
-
-function getThen(obj) {
- try {
- return doGetThen(obj);
- } catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-var hasProp = {}.hasOwnProperty;
-function isAnyBluebirdPromise(obj) {
- try {
- return hasProp.call(obj, "_promise0");
- } catch (e) {
- return false;
- }
-}
-
-function doThenable(x, then, context) {
- var promise = new Promise(INTERNAL);
- var ret = promise;
- if (context) context._pushContext();
- promise._captureStackTrace();
- if (context) context._popContext();
- var synchronous = true;
- var result = util.tryCatch(then).call(x, resolve, reject);
- synchronous = false;
-
- if (promise && result === errorObj) {
- promise._rejectCallback(result.e, true, true);
- promise = null;
- }
-
- function resolve(value) {
- if (!promise) return;
- promise._resolveCallback(value);
- promise = null;
- }
-
- function reject(reason) {
- if (!promise) return;
- promise._rejectCallback(reason, synchronous, true);
- promise = null;
- }
- return ret;
-}
-
-return tryConvertToPromise;
-};
-
-},{"./util":36}],34:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL, debug) {
-var util = _dereq_("./util");
-var TimeoutError = Promise.TimeoutError;
-
-function HandleWrapper(handle) {
- this.handle = handle;
-}
-
-HandleWrapper.prototype._resultCancelled = function() {
- clearTimeout(this.handle);
-};
-
-var afterValue = function(value) { return delay(+this).thenReturn(value); };
-var delay = Promise.delay = function (ms, value) {
- var ret;
- var handle;
- if (value !== undefined) {
- ret = Promise.resolve(value)
- ._then(afterValue, null, null, ms, undefined);
- if (debug.cancellation() && value instanceof Promise) {
- ret._setOnCancel(value);
- }
- } else {
- ret = new Promise(INTERNAL);
- handle = setTimeout(function() { ret._fulfill(); }, +ms);
- if (debug.cancellation()) {
- ret._setOnCancel(new HandleWrapper(handle));
- }
- ret._captureStackTrace();
- }
- ret._setAsyncGuaranteed();
- return ret;
-};
-
-Promise.prototype.delay = function (ms) {
- return delay(ms, this);
-};
-
-var afterTimeout = function (promise, message, parent) {
- var err;
- if (typeof message !== "string") {
- if (message instanceof Error) {
- err = message;
- } else {
- err = new TimeoutError("operation timed out");
- }
- } else {
- err = new TimeoutError(message);
- }
- util.markAsOriginatingFromRejection(err);
- promise._attachExtraTrace(err);
- promise._reject(err);
-
- if (parent != null) {
- parent.cancel();
- }
-};
-
-function successClear(value) {
- clearTimeout(this.handle);
- return value;
-}
-
-function failureClear(reason) {
- clearTimeout(this.handle);
- throw reason;
-}
-
-Promise.prototype.timeout = function (ms, message) {
- ms = +ms;
- var ret, parent;
-
- var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() {
- if (ret.isPending()) {
- afterTimeout(ret, message, parent);
- }
- }, ms));
-
- if (debug.cancellation()) {
- parent = this.then();
- ret = parent._then(successClear, failureClear,
- undefined, handleWrapper, undefined);
- ret._setOnCancel(handleWrapper);
- } else {
- ret = this._then(successClear, failureClear,
- undefined, handleWrapper, undefined);
- }
-
- return ret;
-};
-
-};
-
-},{"./util":36}],35:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function (Promise, apiRejection, tryConvertToPromise,
- createContext, INTERNAL, debug) {
- var util = _dereq_("./util");
- var TypeError = _dereq_("./errors").TypeError;
- var inherits = _dereq_("./util").inherits;
- var errorObj = util.errorObj;
- var tryCatch = util.tryCatch;
- var NULL = {};
-
- function thrower(e) {
- setTimeout(function(){throw e;}, 0);
- }
-
- function castPreservingDisposable(thenable) {
- var maybePromise = tryConvertToPromise(thenable);
- if (maybePromise !== thenable &&
- typeof thenable._isDisposable === "function" &&
- typeof thenable._getDisposer === "function" &&
- thenable._isDisposable()) {
- maybePromise._setDisposable(thenable._getDisposer());
- }
- return maybePromise;
- }
- function dispose(resources, inspection) {
- var i = 0;
- var len = resources.length;
- var ret = new Promise(INTERNAL);
- function iterator() {
- if (i >= len) return ret._fulfill();
- var maybePromise = castPreservingDisposable(resources[i++]);
- if (maybePromise instanceof Promise &&
- maybePromise._isDisposable()) {
- try {
- maybePromise = tryConvertToPromise(
- maybePromise._getDisposer().tryDispose(inspection),
- resources.promise);
- } catch (e) {
- return thrower(e);
- }
- if (maybePromise instanceof Promise) {
- return maybePromise._then(iterator, thrower,
- null, null, null);
- }
- }
- iterator();
- }
- iterator();
- return ret;
- }
-
- function Disposer(data, promise, context) {
- this._data = data;
- this._promise = promise;
- this._context = context;
- }
-
- Disposer.prototype.data = function () {
- return this._data;
- };
-
- Disposer.prototype.promise = function () {
- return this._promise;
- };
-
- Disposer.prototype.resource = function () {
- if (this.promise().isFulfilled()) {
- return this.promise().value();
- }
- return NULL;
- };
-
- Disposer.prototype.tryDispose = function(inspection) {
- var resource = this.resource();
- var context = this._context;
- if (context !== undefined) context._pushContext();
- var ret = resource !== NULL
- ? this.doDispose(resource, inspection) : null;
- if (context !== undefined) context._popContext();
- this._promise._unsetDisposable();
- this._data = null;
- return ret;
- };
-
- Disposer.isDisposer = function (d) {
- return (d != null &&
- typeof d.resource === "function" &&
- typeof d.tryDispose === "function");
- };
-
- function FunctionDisposer(fn, promise, context) {
- this.constructor$(fn, promise, context);
- }
- inherits(FunctionDisposer, Disposer);
-
- FunctionDisposer.prototype.doDispose = function (resource, inspection) {
- var fn = this.data();
- return fn.call(resource, resource, inspection);
- };
-
- function maybeUnwrapDisposer(value) {
- if (Disposer.isDisposer(value)) {
- this.resources[this.index]._setDisposable(value);
- return value.promise();
- }
- return value;
- }
-
- function ResourceList(length) {
- this.length = length;
- this.promise = null;
- this[length-1] = null;
- }
-
- ResourceList.prototype._resultCancelled = function() {
- var len = this.length;
- for (var i = 0; i < len; ++i) {
- var item = this[i];
- if (item instanceof Promise) {
- item.cancel();
- }
- }
- };
-
- Promise.using = function () {
- var len = arguments.length;
- if (len < 2) return apiRejection(
- "you must pass at least 2 arguments to Promise.using");
- var fn = arguments[len - 1];
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- var input;
- var spreadArgs = true;
- if (len === 2 && Array.isArray(arguments[0])) {
- input = arguments[0];
- len = input.length;
- spreadArgs = false;
- } else {
- input = arguments;
- len--;
- }
- var resources = new ResourceList(len);
- for (var i = 0; i < len; ++i) {
- var resource = input[i];
- if (Disposer.isDisposer(resource)) {
- var disposer = resource;
- resource = resource.promise();
- resource._setDisposable(disposer);
- } else {
- var maybePromise = tryConvertToPromise(resource);
- if (maybePromise instanceof Promise) {
- resource =
- maybePromise._then(maybeUnwrapDisposer, null, null, {
- resources: resources,
- index: i
- }, undefined);
- }
- }
- resources[i] = resource;
- }
-
- var reflectedResources = new Array(resources.length);
- for (var i = 0; i < reflectedResources.length; ++i) {
- reflectedResources[i] = Promise.resolve(resources[i]).reflect();
- }
-
- var resultPromise = Promise.all(reflectedResources)
- .then(function(inspections) {
- for (var i = 0; i < inspections.length; ++i) {
- var inspection = inspections[i];
- if (inspection.isRejected()) {
- errorObj.e = inspection.error();
- return errorObj;
- } else if (!inspection.isFulfilled()) {
- resultPromise.cancel();
- return;
- }
- inspections[i] = inspection.value();
- }
- promise._pushContext();
-
- fn = tryCatch(fn);
- var ret = spreadArgs
- ? fn.apply(undefined, inspections) : fn(inspections);
- var promiseCreated = promise._popContext();
- debug.checkForgottenReturns(
- ret, promiseCreated, "Promise.using", promise);
- return ret;
- });
-
- var promise = resultPromise.lastly(function() {
- var inspection = new Promise.PromiseInspection(resultPromise);
- return dispose(resources, inspection);
- });
- resources.promise = promise;
- promise._setOnCancel(resources);
- return promise;
- };
-
- Promise.prototype._setDisposable = function (disposer) {
- this._bitField = this._bitField | 131072;
- this._disposer = disposer;
- };
-
- Promise.prototype._isDisposable = function () {
- return (this._bitField & 131072) > 0;
- };
-
- Promise.prototype._getDisposer = function () {
- return this._disposer;
- };
-
- Promise.prototype._unsetDisposable = function () {
- this._bitField = this._bitField & (~131072);
- this._disposer = undefined;
- };
-
- Promise.prototype.disposer = function (fn) {
- if (typeof fn === "function") {
- return new FunctionDisposer(fn, this, createContext());
- }
- throw new TypeError();
- };
-
-};
-
-},{"./errors":12,"./util":36}],36:[function(_dereq_,module,exports){
-"use strict";
-var es5 = _dereq_("./es5");
-var canEvaluate = typeof navigator == "undefined";
-
-var errorObj = {e: {}};
-var tryCatchTarget;
-var globalObject = typeof self !== "undefined" ? self :
- typeof window !== "undefined" ? window :
- typeof global !== "undefined" ? global :
- this !== undefined ? this : null;
-
-function tryCatcher() {
- try {
- var target = tryCatchTarget;
- tryCatchTarget = null;
- return target.apply(this, arguments);
- } catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-function tryCatch(fn) {
- tryCatchTarget = fn;
- return tryCatcher;
-}
-
-var inherits = function(Child, Parent) {
- var hasProp = {}.hasOwnProperty;
-
- function T() {
- this.constructor = Child;
- this.constructor$ = Parent;
- for (var propertyName in Parent.prototype) {
- if (hasProp.call(Parent.prototype, propertyName) &&
- propertyName.charAt(propertyName.length-1) !== "$"
- ) {
- this[propertyName + "$"] = Parent.prototype[propertyName];
- }
- }
- }
- T.prototype = Parent.prototype;
- Child.prototype = new T();
- return Child.prototype;
-};
-
-
-function isPrimitive(val) {
- return val == null || val === true || val === false ||
- typeof val === "string" || typeof val === "number";
-
-}
-
-function isObject(value) {
- return typeof value === "function" ||
- typeof value === "object" && value !== null;
-}
-
-function maybeWrapAsError(maybeError) {
- if (!isPrimitive(maybeError)) return maybeError;
-
- return new Error(safeToString(maybeError));
-}
-
-function withAppended(target, appendee) {
- var len = target.length;
- var ret = new Array(len + 1);
- var i;
- for (i = 0; i < len; ++i) {
- ret[i] = target[i];
- }
- ret[i] = appendee;
- return ret;
-}
-
-function getDataPropertyOrDefault(obj, key, defaultValue) {
- if (es5.isES5) {
- var desc = Object.getOwnPropertyDescriptor(obj, key);
-
- if (desc != null) {
- return desc.get == null && desc.set == null
- ? desc.value
- : defaultValue;
- }
- } else {
- return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
- }
-}
-
-function notEnumerableProp(obj, name, value) {
- if (isPrimitive(obj)) return obj;
- var descriptor = {
- value: value,
- configurable: true,
- enumerable: false,
- writable: true
- };
- es5.defineProperty(obj, name, descriptor);
- return obj;
-}
-
-function thrower(r) {
- throw r;
-}
-
-var inheritedDataKeys = (function() {
- var excludedPrototypes = [
- Array.prototype,
- Object.prototype,
- Function.prototype
- ];
-
- var isExcludedProto = function(val) {
- for (var i = 0; i < excludedPrototypes.length; ++i) {
- if (excludedPrototypes[i] === val) {
- return true;
- }
- }
- return false;
- };
-
- if (es5.isES5) {
- var getKeys = Object.getOwnPropertyNames;
- return function(obj) {
- var ret = [];
- var visitedKeys = Object.create(null);
- while (obj != null && !isExcludedProto(obj)) {
- var keys;
- try {
- keys = getKeys(obj);
- } catch (e) {
- return ret;
- }
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (visitedKeys[key]) continue;
- visitedKeys[key] = true;
- var desc = Object.getOwnPropertyDescriptor(obj, key);
- if (desc != null && desc.get == null && desc.set == null) {
- ret.push(key);
- }
- }
- obj = es5.getPrototypeOf(obj);
- }
- return ret;
- };
- } else {
- var hasProp = {}.hasOwnProperty;
- return function(obj) {
- if (isExcludedProto(obj)) return [];
- var ret = [];
-
- /*jshint forin:false */
- enumeration: for (var key in obj) {
- if (hasProp.call(obj, key)) {
- ret.push(key);
- } else {
- for (var i = 0; i < excludedPrototypes.length; ++i) {
- if (hasProp.call(excludedPrototypes[i], key)) {
- continue enumeration;
- }
- }
- ret.push(key);
- }
- }
- return ret;
- };
- }
-
-})();
-
-var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/;
-function isClass(fn) {
- try {
- if (typeof fn === "function") {
- var keys = es5.names(fn.prototype);
-
- var hasMethods = es5.isES5 && keys.length > 1;
- var hasMethodsOtherThanConstructor = keys.length > 0 &&
- !(keys.length === 1 && keys[0] === "constructor");
- var hasThisAssignmentAndStaticMethods =
- thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0;
-
- if (hasMethods || hasMethodsOtherThanConstructor ||
- hasThisAssignmentAndStaticMethods) {
- return true;
- }
- }
- return false;
- } catch (e) {
- return false;
- }
-}
-
-function toFastProperties(obj) {
- /*jshint -W027,-W055,-W031*/
- function FakeConstructor() {}
- FakeConstructor.prototype = obj;
- var l = 8;
- while (l--) new FakeConstructor();
- return obj;
- eval(obj);
-}
-
-var rident = /^[a-z$_][a-z$_0-9]*$/i;
-function isIdentifier(str) {
- return rident.test(str);
-}
-
-function filledRange(count, prefix, suffix) {
- var ret = new Array(count);
- for(var i = 0; i < count; ++i) {
- ret[i] = prefix + i + suffix;
- }
- return ret;
-}
-
-function safeToString(obj) {
- try {
- return obj + "";
- } catch (e) {
- return "[no string representation]";
- }
-}
-
-function isError(obj) {
- return obj !== null &&
- typeof obj === "object" &&
- typeof obj.message === "string" &&
- typeof obj.name === "string";
-}
-
-function markAsOriginatingFromRejection(e) {
- try {
- notEnumerableProp(e, "isOperational", true);
- }
- catch(ignore) {}
-}
-
-function originatesFromRejection(e) {
- if (e == null) return false;
- return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
- e["isOperational"] === true);
-}
-
-function canAttachTrace(obj) {
- return isError(obj) && es5.propertyIsWritable(obj, "stack");
-}
-
-var ensureErrorObject = (function() {
- if (!("stack" in new Error())) {
- return function(value) {
- if (canAttachTrace(value)) return value;
- try {throw new Error(safeToString(value));}
- catch(err) {return err;}
- };
- } else {
- return function(value) {
- if (canAttachTrace(value)) return value;
- return new Error(safeToString(value));
- };
- }
-})();
-
-function classString(obj) {
- return {}.toString.call(obj);
-}
-
-function copyDescriptors(from, to, filter) {
- var keys = es5.names(from);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (filter(key)) {
- try {
- es5.defineProperty(to, key, es5.getDescriptor(from, key));
- } catch (ignore) {}
- }
- }
-}
-
-var asArray = function(v) {
- if (es5.isArray(v)) {
- return v;
- }
- return null;
-};
-
-if (typeof Symbol !== "undefined" && Symbol.iterator) {
- var ArrayFrom = typeof Array.from === "function" ? function(v) {
- return Array.from(v);
- } : function(v) {
- var ret = [];
- var it = v[Symbol.iterator]();
- var itResult;
- while (!((itResult = it.next()).done)) {
- ret.push(itResult.value);
- }
- return ret;
- };
-
- asArray = function(v) {
- if (es5.isArray(v)) {
- return v;
- } else if (v != null && typeof v[Symbol.iterator] === "function") {
- return ArrayFrom(v);
- }
- return null;
- };
-}
-
-var isNode = typeof process !== "undefined" &&
- classString(process).toLowerCase() === "[object process]";
-
-function env(key, def) {
- return isNode ? process.env[key] : def;
-}
-
-function getNativePromise() {
- if (typeof Promise === "function") {
- try {
- var promise = new Promise(function(){});
- if ({}.toString.call(promise) === "[object Promise]") {
- return Promise;
- }
- } catch (e) {}
- }
-}
-
-function domainBind(self, cb) {
- return self.bind(cb);
-}
-
-var ret = {
- isClass: isClass,
- isIdentifier: isIdentifier,
- inheritedDataKeys: inheritedDataKeys,
- getDataPropertyOrDefault: getDataPropertyOrDefault,
- thrower: thrower,
- isArray: es5.isArray,
- asArray: asArray,
- notEnumerableProp: notEnumerableProp,
- isPrimitive: isPrimitive,
- isObject: isObject,
- isError: isError,
- canEvaluate: canEvaluate,
- errorObj: errorObj,
- tryCatch: tryCatch,
- inherits: inherits,
- withAppended: withAppended,
- maybeWrapAsError: maybeWrapAsError,
- toFastProperties: toFastProperties,
- filledRange: filledRange,
- toString: safeToString,
- canAttachTrace: canAttachTrace,
- ensureErrorObject: ensureErrorObject,
- originatesFromRejection: originatesFromRejection,
- markAsOriginatingFromRejection: markAsOriginatingFromRejection,
- classString: classString,
- copyDescriptors: copyDescriptors,
- hasDevTools: typeof chrome !== "undefined" && chrome &&
- typeof chrome.loadTimes === "function",
- isNode: isNode,
- env: env,
- global: globalObject,
- getNativePromise: getNativePromise,
- domainBind: domainBind
-};
-ret.isRecentNode = ret.isNode && (function() {
- var version = process.versions.node.split(".").map(Number);
- return (version[0] === 0 && version[1] > 10) || (version[0] > 0);
-})();
-
-if (ret.isNode) ret.toFastProperties(process);
-
-try {throw new Error(); } catch (e) {ret.lastLineError = e;}
-module.exports = ret;
-
-},{"./es5":13}]},{},[4])(4)
-}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file
diff --git a/tools/eslint/node_modules/bluebird/js/browser/bluebird.min.js b/tools/eslint/node_modules/bluebird/js/browser/bluebird.min.js
deleted file mode 100644
index 485c12ad6a..0000000000
--- a/tools/eslint/node_modules/bluebird/js/browser/bluebird.min.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/* @preserve
- * The MIT License (MIT)
- *
- * Copyright (c) 2013-2015 Petka Antonov
- *
- * 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.
- *
- */
-/**
- * bluebird build version 3.4.6
- * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
-*/
-!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(s,a){if(!e[s]){if(!t[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,n){"use strict";e.exports=function(t){function e(t){var e=new n(t),r=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),r}var n=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,e,n){"use strict";function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new u(16),this._normalQueue=new u(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=l}function i(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function o(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}var a;try{throw new Error}catch(c){a=c}var l=t("./schedule"),u=t("./queue"),p=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){p.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},p.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=s),r.prototype.invokeFirst=function(t,e,n){this._normalQueue.unshift(t,e,n),this._queueTick()},r.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=a},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,s,void 0,u,h),l._then(a,c,void 0,u,h),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){var e=this.pop(),r=n(t,e);return r.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),c=a.canEvaluate;a.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(c){var r=s(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n<t.length;++n)this._doInvokeOnCancel(t[n],e);else if(void 0!==t)if("function"==typeof t){if(!e){var r=s(t).call(this._boundValue());r===a&&(this._attachExtraTrace(r.e),c.throwLater(r.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,n){"use strict";e.exports=function(e){function n(t,n,a){return function(c){var l=a._boundValue();t:for(var u=0;u<t.length;++u){var p=t[u];if(p===Error||null!=p&&p.prototype instanceof Error){if(c instanceof p)return o(n).call(l,c)}else if("function"==typeof p){var h=o(p).call(l,c);if(h===s)return h;if(h)return o(n).call(l,c)}else if(r.isObject(c)){for(var f=i(p),_=0;_<f.length;++_){var d=f[_];if(p[d]!=c[d])continue t}return o(n).call(l,c)}}return e}}var r=t("./util"),i=t("./es5").keys,o=r.tryCatch,s=r.errorObj;return n}},{"./es5":13,"./util":36}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(r())}function n(){return i?new e:void 0}function r(){var t=o.length-1;return t>=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+H.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?H.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function a(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function f(){this._trace=new S(this._peekContext())}function _(t,e){if(N(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=j(t);H.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),H.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(t,e,n,r,i){if(void 0===t&&null!==e&&W){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=w(a),l=c.length-1;l>=0;--l){var u=c[l];if(!U.test(u)){var p=u.match(M);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var h=c[0],l=0;l<a.length;++l)if(a[l]===h){l>0&&(s="\n"+a[l-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(f,!0,e)}}function v(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),y(n)}function y(t,n,r){if(ot.warnings){var i,o=new L(t);if(n)r._attachExtraTrace(o);else if(ot.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=j(o);o.stack=s.message+"\n"+s.stack.join("\n")}tt("warning",o)||k(o,"",!0)}}function m(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}function g(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function b(t){for(var e=t[0],n=1;n<t.length;++n){for(var r=t[n],i=e.length-1,o=e[i],s=-1,a=r.length-1;a>=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}function w(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],i=" (No stack trace)"===r||q.test(r),o=i&&nt(r);i&&!o&&($&&" "!==r.charAt(0)&&(r=" "+r),e.push(r))}return e}function C(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var r=e[n];if(" (No stack trace)"===r||q.test(r))break}return n>0&&(e=e.slice(n)),e}function j(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?C(t):[" (No stack trace)"],{message:n,stack:w(e)}}function k(t,e,n){if("undefined"!=typeof console){var r;if(H.isObject(t)){var i=t.stack;r=e+Q(i,t)}else r=e+String(t);"function"==typeof D?D(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function E(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){I.throwLater(o)}"unhandledRejection"===t?tt(t,n,r)||i||k(n,"Unhandled rejection "):tt(t,r)}function F(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():H.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+x(e)+">, no stack trace)"}function x(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function T(){return"function"==typeof it}function P(t){var e=t.match(rt);return e?{fileName:e[1],line:parseInt(e[2],10)}:void 0}function R(t,e){if(T()){for(var n,r,i=t.stack.split("\n"),o=e.stack.split("\n"),s=-1,a=-1,c=0;c<i.length;++c){var l=P(i[c]);if(l){n=l.fileName,s=l.line;break}}for(var c=0;c<o.length;++c){var l=P(o[c]);if(l){r=l.fileName,a=l.line;break}}0>s||0>a||!n||!r||n!==r||s>=a||(nt=function(t){if(B.test(t))return!0;var e=P(t);return e&&e.fileName===n&&s<=e.line&&e.line<=a?!0:!1})}}function S(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);it(this,S),e>32&&this.uncycle()}var O,A,D,V=e._getDomain,I=e._async,L=t("./errors").Warning,H=t("./util"),N=H.canAttachTrace,B=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,U=/\((?:timers\.js):\d+:\d+\)/,M=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,q=null,Q=null,$=!1,G=!(0==H.env("BLUEBIRD_DEBUG")||!H.env("BLUEBIRD_DEBUG")&&"development"!==H.env("NODE_ENV")),z=!(0==H.env("BLUEBIRD_WARNINGS")||!G&&!H.env("BLUEBIRD_WARNINGS")),X=!(0==H.env("BLUEBIRD_LONG_STACK_TRACES")||!G&&!H.env("BLUEBIRD_LONG_STACK_TRACES")),W=0!=H.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(z||!!H.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),I.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){E("rejectionHandled",O,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),E("unhandledRejection",A,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return y(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=V();A="function"==typeof t?null===e?t:H.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=V();O="function"==typeof t?null===e?t:H.domainBind(e,t):void 0};var K=function(){};e.longStackTraces=function(){if(I.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ot.longStackTraces&&T()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace;ot.longStackTraces=!0,K=function(){if(I.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,n.deactivateLongStackTraces(),I.enableTrampoline(),ot.longStackTraces=!1},e.prototype._captureStackTrace=f,e.prototype._attachExtraTrace=_,n.activateLongStackTraces(),I.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return ot.longStackTraces&&T()};var J=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!H.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!H.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),H.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!H.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),Y=function(){return H.isNode?function(){return process.emit.apply(process,arguments)}:H.global?function(t){var e="on"+t.toLowerCase(),n=H.global[e];return n?(n.apply(H.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),Z={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},tt=function(t){var e=!1;try{e=Y.apply(null,arguments)}catch(n){I.throwLater(n),e=!0}var r=!1;try{r=J(t,Z[t].apply(null,arguments))}catch(n){I.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&K()),"warnings"in t){var n=t.warnings;ot.warnings=!!n,W=ot.warnings,H.isObject(n)&&"wForgottenReturn"in n&&(W=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ot.cancellation){if(I.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=a,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=s,e.prototype._execute=o,et=u,ot.cancellation=!0}"monitoring"in t&&(t.monitoring&&!ot.monitoring?(ot.monitoring=!0,e.prototype._fireEvent=tt):!t.monitoring&&ot.monitoring&&(ot.monitoring=!1,e.prototype._fireEvent=i))},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var et=p,nt=function(){return!1},rt=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;H.inherits(S,Error),n.CapturedTrace=S,S.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var s=e[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>a?(c._parent=e[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},S.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=j(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(w(i.stack.split("\n"))),i=i._parent;b(r),g(r),H.notEnumerableProp(t,"stack",m(n,r)),H.notEnumerableProp(t,"__stackCleaned__",!0)}};var it=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():F(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,q=t,Q=e;var n=Error.captureStackTrace;return nt=function(t){return B.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return q=/@/,Q=e,$=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(Q=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?F(e):e.toString()},null):(q=t,Q=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(D=function(t){console.warn(t)},H.isNode&&process.stderr.isTTY?D=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:H.isNode||"string"!=typeof(new Error).stack||(D=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ot={warnings:z,longStackTraces:!1,cancellation:!1,monitoring:!1};return X&&e.longStackTraces(),{longStackTraces:function(){return ot.longStackTraces},warnings:function(){return ot.warnings},cancellation:function(){return ot.cancellation},monitoring:function(){return ot.monitoring},propagateFromFunction:function(){return et},boundValueFunction:function(){return h},checkForgottenReturns:d,setBounds:R,warn:y,deprecated:v,CapturedTrace:S,fireDomEvent:J,fireGlobalEvent:Y}}},{"./errors":12,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5"),c=a.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,h=r("Warning","warning"),f=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(v){o=r("TypeError","type error"),s=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m<y.length;++m)"function"==typeof Array.prototype[y[m]]&&(d.prototype[y[m]]=Array.prototype[y[m]]);a.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var g=0;d.prototype.toString=function(){var t=Array(4*g+1).join(" "),e="\n"+t+"AggregateError of:\n";g++,t=Array(4*g+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",i=r.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];r=i.join("\n"),e+=r+"\n"}return g--,e},u(i,Error);var b=Error.__BluebirdErrorTypes__;b||(b=c({CancellationError:f,TimeoutError:_,OperationalError:i,RejectionError:i,AggregateError:d}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:b,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:s,CancellationError:b.CancellationError,OperationalError:b.OperationalError,TimeoutError:b.TimeoutError,AggregateError:b.AggregateError,Warning:h}},{"./es5":13,"./util":36}],13:[function(t,e,n){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var i={}.hasOwnProperty,o={}.toString,s={}.constructor.prototype,a=function(t){var e=[];for(var n in t)i.call(t,n)&&e.push(n);return e},c=function(t,e){return{value:t[e]}},l=function(t,e,n){return t[e]=n.value,t},u=function(t){return t},p=function(t){try{return Object(t).constructor.prototype}catch(e){return s}},h=function(t){try{return"[object Array]"===o.call(t)}catch(e){return!1}};e.exports={isArray:h,keys:a,names:a,defineProperty:l,getDescriptor:c,freeze:u,getPrototypeOf:p,isES5:r,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.map;t.prototype.filter=function(t,r){return n(this,t,r,e)},t.filter=function(t,r,i){return n(t,r,i,e)}}},{}],15:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function i(t){this.finallyHandler=t}function o(t,e){return null!=t.cancelPromise?(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function s(){return c.call(this,this.promise._target()._settledValue())}function a(t){return o(this,t)?void 0:(p.e=t,p)}function c(t){var r=this.promise,c=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?c.call(r._boundValue()):c.call(r._boundValue(),t);if(void 0!==l){r._setReturnedNonUndefined();var h=n(l,r);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var f=new u("late cancellation observer");return r._attachExtraTrace(f),p.e=f,p}h.isPending()&&h._attachCancellationCallback(new i(this))}return h._then(s,a,void 0,this,void 0)}}}return r.isRejected()?(o(this),p.e=t,p):(o(this),t)}var l=t("./util"),u=e.CancellationError,p=l.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,c,c)},e.prototype.tap=function(t){return this._passThrough(t,1,c)},r}},{"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r){for(var o=0;o<n.length;++o){r._pushContext();var s=f(n[o])(t);if(r._popContext(),s===h){r._pushContext();var a=e.reject(h.e);return r._popContext(),a}var c=i(s,r);if(c instanceof e)return c}return null}function c(t,n,i,o){if(s.cancellation()){var a=new e(r),c=this._finallyPromise=new e(r);this._promise=a.lastly(function(){return c}),a._captureStackTrace(),a._setOnCancel(this)}else{var l=this._promise=new e(r);l._captureStackTrace()}this._stack=o,this._generatorFunction=t,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(_):_,this._yieldedPromise=null,this._cancellationPhase=!1}var l=t("./errors"),u=l.TypeError,p=t("./util"),h=p.errorObj,f=p.tryCatch,_=[];p.inherits(c,o),c.prototype._isResolved=function(){return null===this._promise},c.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},c.prototype._promiseCancelled=function(){if(!this._isResolved()){var t,n="undefined"!=typeof this._generator["return"];if(n)this._promise._pushContext(),t=f(this._generator["return"]).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=f(this._generator["throw"]).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},c.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=f(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=f(this._generator["throw"]).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},c.prototype.promise=function(){return this._promise},c.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},c.prototype._continue=function(t){var n=this._promise;if(t===h)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(t.e,!1);var r=t.value;if(t.done===!0)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);var o=i(r,this._promise);if(!(o instanceof e)&&(o=a(o,this._yieldHandlers,this._promise),null===o))return void this._promiseRejected(new u("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",r)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));o=o._target();var s=o._bitField;0===(50397184&s)?(this._yieldedPromise=o,o._proxy(this,null)):0!==(33554432&s)?e._async.invoke(this._promiseFulfilled,this,o._value()):0!==(16777216&s)?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new u("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(e).yieldHandler,r=c,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new r(void 0,void 0,n,i),s=o.promise();return o._generator=e,
-o._promiseFulfilled(void 0),s}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new u("expecting a function but got "+p.classString(t));_.push(t)},e.spawn=function(t){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=new c(t,this),i=r.promise();return r._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){var a=t("./util");a.canEvaluate,a.tryCatch,a.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=l();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function c(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+u.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new a(t,n,s,o).promise()}var l=e._getDomain,u=t("./util"),p=u.tryCatch,h=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(0>n){if(n=-1*n-1,r[n]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var l=this._promise,u=this._callback,f=l._boundValue();l._pushContext();var _=p(u).call(f,t,n,o),d=l._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",l),_===h)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0===(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}var m=++this._totalResolved;return m>=o?(null!==a?this._filter(r,a):this._resolve(r),!0):!1},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var r=t.pop();this._promiseFulfilled(n[r],r)}},a.prototype._filter=function(t,e){for(var n=e.length,r=new Array(n),i=0,o=0;n>o;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return c(this,t,e,null)},e.map=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=s.isArray(l)?a(t).apply(u,l):a(t).call(u,l)}else c=a(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i<n.length;++i){var o=n[i];p.test(o)||(e[o]=t[o])}return e}return s.markAsOriginatingFromRejection(t),t}function o(t,e){return function(n,r){if(null!==t){if(n){var o=i(a(n));t._attachExtraTrace(o),t._reject(o)}else if(e){var s=[].slice.call(arguments,1);t._fulfill(s)}else t._fulfill(r);t=null}}}var s=t("./util"),a=s.maybeWrapAsError,c=t("./errors"),l=c.OperationalError,u=t("./es5"),p=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,n){"use strict";e.exports=function(e){function n(t,e){var n=this;if(!o.isArray(t))return r.call(n,t,e);var i=a(e).apply(n._boundValue(),[null].concat(t));i===c&&s.throwLater(i.e)}function r(t,e){var n=this,r=n._boundValue(),i=void 0===t?a(e).call(r,null):a(e).call(r,null,t);i===c&&s.throwLater(i.e)}function i(t,e){var n=this;if(!t){var r=new Error(t+"");r.cause=t,t=r}var i=a(e).call(n._boundValue(),t);i===c&&s.throwLater(i.e)}var o=t("./util"),s=e._async,a=o.tryCatch,c=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=r;void 0!==e&&Object(e).spread&&(o=n),this._then(o,i,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,e,n){"use strict";e.exports=function(){function n(){}function r(t,e){if("function"!=typeof e)throw new m("expecting a function but got "+f.classString(e));if(t.constructor!==i)throw new m("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function i(t){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,t!==b&&(r(this,t),this._resolveFromExecutor(t)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function o(t){this.promise._resolveCallback(t)}function s(t){this.promise._rejectCallback(t,!1)}function a(t){var e=new i(b);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new m("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},u=function(){return new i.PromiseInspection(this._target())},p=function(t){return i.reject(new m(t))},h={},f=t("./util");c=f.isNode?function(){var t=process.domain;return void 0===t&&(t=null),t}:function(){return null},f.notEnumerableProp(i,"_getDomain",c);var _=t("./es5"),d=t("./async"),v=new d;_.defineProperty(i,"_async",{value:v});var y=t("./errors"),m=i.TypeError=y.TypeError;i.RangeError=y.RangeError;var g=i.CancellationError=y.CancellationError;i.TimeoutError=y.TimeoutError,i.OperationalError=y.OperationalError,i.RejectionError=y.OperationalError,i.AggregateError=y.AggregateError;var b=function(){},w={},C={},j=t("./thenables")(i,b),k=t("./promise_array")(i,b,j,p,n),E=t("./context")(i),F=E.create,x=t("./debuggability")(i,E),T=(x.CapturedTrace,t("./finally")(i,j)),P=t("./catch_filter")(C),R=t("./nodeback"),S=f.errorObj,O=f.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype["catch"]=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return p("expecting an object but got A catch statement predicate "+f.classString(o));r[i++]=o}return r.length=i,t=arguments[n],this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(x.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new k(this).promise()},i.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=O(t)(R(e,n));return r===S&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new k(t).promise()},i.cast=function(t){var e=j(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(b),l=this._target(),u=l._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var p=c();if(0!==(50397184&u)){var h,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,h=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,h=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new g("late cancellation observer"),l._attachExtraTrace(_),h=e),v.invoke(d,l,{handler:null===p?h:"function"==typeof h&&f.domainBind(p,h),promise:a,receiver:r,value:_})}else l._addCallbacks(t,e,a,r,p);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===h?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:f.domainBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:f.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=j(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;s>a;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new g("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),i=r===t;if(!i&&!n&&x.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===w?n&&"number"==typeof n.length?o=O(t).apply(this._boundValue(),n):(o=S,o.e=new m("cannot .spread() a non-array: "+f.classString(n))):o=O(t).call(e,n);var s=r._popContext();i=r._bitField,0===(65536&i)&&(o===C?r._reject(n):o===S?r._rejectCallback(o.e,!1):(x.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var s=t instanceof i,a=this._bitField,c=0!==(134217728&a);0!==(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,O(e).call(r,o)===S&&t._reject(S.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof k?t._cancel():r.cancel()):"function"==typeof e?s?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&a)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):s&&(c&&t._setAsyncGuaranteed(),0!==(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this))}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,f.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){x.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:s}},f.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,j,p,x),t("./bind")(i,b,j,x),t("./cancel")(i,k,p,x),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,k,j,b,v,c),i.Promise=i,i.version="3.4.6",t("./map.js")(i,k,p,j,b,x),t("./call_get.js")(i),t("./using.js")(i,p,j,F,b,x),t("./timers.js")(i,b,x),t("./generators.js")(i,p,b,j,n,x),t("./nodeify.js")(i),t("./promisify.js")(i,b),t("./props.js")(i,k,j,p),t("./race.js")(i,b,j,p),t("./reduce.js")(i,k,p,j,b,x),t("./settle.js")(i,k,x),t("./some.js")(i,k,p),t("./filter.js")(i,b),t("./each.js")(i,b),t("./any.js")(i),f.toFastProperties(i),f.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(b)),x.setBounds(d.firstLineError,f.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{}}}function a(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var a=o._bitField;if(this._values=o,0===(50397184&a))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&a))return 0!==(16777216&a)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(s(n))):void this._iterate(o)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;n>a;++a){var c=r(t[a],i);c instanceof e?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0===(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!==(33554432&s)?this._promiseFulfilled(c._value(),a):0!==(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n<t.length;++n)t[n]instanceof e&&t[n].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(t){return t},a}},{"./util":36}],24:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t){return!C.test(t)}function i(t){try{return t.__isPromisified__===!0}catch(e){return!1}}function o(t,e,n){var r=f.getDataPropertyOrDefault(t,e+n,b);return r?i(r):!1}function s(t,e,n){for(var r=0;r<t.length;r+=2){var i=t[r];if(n.test(i))for(var o=i.replace(n,""),s=0;s<t.length;s+=2)if(t[s]===o)throw new m("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function a(t,e,n,r){for(var a=f.inheritedDataKeys(t),c=[],l=0;l<a.length;++l){var u=a[l],p=t[u],h=r===j?!0:j(u,p,t);"function"!=typeof p||i(p)||o(t,u,e)||!r(u,p,t,h)||c.push(u,p)}return s(c,e,n),c}function c(t,r,i,o,s,a){function c(){var i=r;r===h&&(i=this);var o=new e(n);o._captureStackTrace();var s="string"==typeof u&&this!==l?this[u]:t,c=_(o,a);try{s.apply(i,d(arguments,c))}catch(p){o._rejectCallback(v(p),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var l=function(){return this}(),u=t;return"string"==typeof u&&(t=o),f.notEnumerableProp(c,"__isPromisified__",!0),c}function l(t,e,n,r,i){for(var o=new RegExp(k(e)+"$"),s=a(t,e,o,n),c=0,l=s.length;l>c;c+=2){var u=s[c],p=s[c+1],_=u+e;if(r===E)t[_]=E(u,h,u,p,e,i);else{var d=r(p,function(){return E(u,h,u,p,e,i)});f.notEnumerableProp(d,"__isPromisified__",!0),t[_]=d}}return f.toFastProperties(t),t}function u(t,e,n){return E(t,e,void 0,t,null,n)}var p,h={},f=t("./util"),_=t("./nodeback"),d=f.withAppended,v=f.maybeWrapAsError,y=f.canEvaluate,m=t("./errors").TypeError,g="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],C=new RegExp("^(?:"+w.join("|")+")$"),j=function(t){return f.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},k=function(t){return t.replace(/([$])/,"\\$")},E=y?p:c;e.promisify=function(t,e){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?h:e.context,o=!!e.multiArgs,s=u(t,n,o);return f.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new m("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r=g);var i=e.filter;"function"!=typeof i&&(i=j);var o=e.promisifier;if("function"!=typeof o&&(o=E),!f.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=f.inheritedDataKeys(t),a=0;a<s.length;++a){var c=t[s[a]];"constructor"!==s[a]&&f.isClass(c)&&(l(c.prototype,r,i,o,n),l(c,r,i,o,n))}return l(t,r,i,o,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t){var e,n=!1;if(void 0!==a&&t instanceof a)e=p(t),n=!0;else{var r=u.keys(t),i=r.length;e=new Array(2*i);for(var o=0;i>o;++o){var s=r[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,-3)}function s(t){var n,s=r(t);return l(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,c=t("./util"),l=c.isObject,u=t("./es5");"function"==typeof Map&&(a=Map);var p=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),h=function(t){for(var e=new a,n=t.length/2|0,r=0;n>r;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};c.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=h(this._values);else{r={};for(var i=this.length(),o=0,s=this.length();s>o;++o)r[this._values[o+i]]=this._values[o]}return this._resolve(r),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var n=this._front+e&this._capacity-1;this[n]=t,this._length=e+1},i.prototype._unshiftOne=function(t){var e=this._capacity;this._checkCapacity(this.length()+1);var n=this._front,r=(n-1&e-1^e)-e;this[r]=t,this._front=r,this._length=this.length()+1},i.prototype.unshift=function(t,e,n){this._unshiftOne(n),this._unshiftOne(e),this._unshiftOne(t)},i.prototype.push=function(t,e,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var i=this._front+r-3;this._checkCapacity(r);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=n,this._length=r},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var n=this._front,i=this._length,o=n+i&e-1;r(this,0,this,e,o)},e.exports=i},{}],27:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t,o){var c=r(t);if(c instanceof e)return a(c);if(t=s.asArray(t),null===t)return i("expecting an array or an iterable object but got "+s.classString(t));var l=new e(n);void 0!==o&&l._propagateFrom(o,3);for(var u=l._fulfill,p=l._reject,h=0,f=t.length;f>h;++h){var _=t[h];(void 0!==_||h in t)&&e.cast(_)._then(u,p,void 0,l,null)}return l}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t);var s=h();this._fn=null===s?n:f.domainBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,n,i){if("function"!=typeof e)return r("expecting a function but got "+f.classString(e));var o=new a(t,e,n,i);return o.promise()}function u(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(t){var n=this.array,r=n._promise,i=_(n._fn);r._pushContext();var o;o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var h=e._getDomain,f=t("./util"),_=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;i>r;++r){var o={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(u,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(c,c,void 0,n,this)},e.prototype.reduce=function(t,e){return l(this,t,e,null)},e.reduce=function(t,e,n,r){return l(t,e,n,r)}}},{"./util":36}],29:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var l=s.resolve();r=function(t){l.then(t)}}else r="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o:function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});i.observe(r,e);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),o()}}();e.exports=r},{"./util":36}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection,s=t("./util");s.inherits(i,n),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){
-if((0|e)!==e||0>e)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,c=t("./errors").AggregateError,l=s.isArray,u={};s.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=l(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new c,e=this.length();e<this._values.length;++e)this._values[e]!==u&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var i=o(t);if(i===l){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(s(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return a(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(e){return l.e=e,l}}function s(t){try{return p.call(t,"_promise0")}catch(e){return!1}}function a(t,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new e(n),u=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,h=c.tryCatch(r).call(t,o,s);return p=!1,a&&h===l&&(a._rejectCallback(h.e,!0,!0),a=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var l=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(l,null,null,t,void 0),r.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return u(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new c("operation timed out"):new c(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,c=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,c,void 0),n._setOnCancel(c)):n=this._then(o,s,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function c(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function l(t,n){function i(){if(s>=l)return u._fulfill();var o=c(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(p){return a(p)}if(o instanceof e)return o._then(i,a,null,null,null)}i()}var s=0,l=t.length,u=new e(o);return i(),u}function u(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function h(t){return u.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function f(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,m=_.tryCatch,g={};u.prototype.data=function(){return this._data},u.prototype.promise=function(){return this._promise},u.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():g},u.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==g?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},u.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(p,u),p.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},f.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+_.classString(i));var o,a=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,a=!1):(o=arguments,t--);for(var c=new f(t),p=0;t>p;++p){var d=o[p];if(u.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var g=r(d);g instanceof e&&(d=g._then(h,null,null,{resources:c,index:p},void 0))}c[p]=d}for(var b=new Array(c.length),p=0;p<b.length;++p)b[p]=e.resolve(c[p]).reflect();var w=e.all(b).then(function(t){for(var e=0;e<t.length;++e){var n=t[e];if(n.isRejected())return y.e=n.error(),y;if(!n.isFulfilled())return void w.cancel();t[e]=n.value()}C._pushContext(),i=m(i);var r=a?i.apply(void 0,t):i(t),o=C._popContext();return s.checkForgottenReturns(r,o,"Promise.using",C),r}),C=w.lastly(function(){var t=new e.PromiseInspection(w);return l(c,t)});return c.promise=C,C._setOnCancel(c),C},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function r(){try{var t=P;return P=null,t.apply(this,arguments)}catch(e){return T.e=e,T}}function i(t){return P=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function h(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function f(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function _(t){return D.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function m(t){try{u(t,"isOperational",!0)}catch(e){}}function g(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function w(t){return{}.toString.call(t)}function C(t,e,n){for(var r=F.names(t),i=0;i<r.length;++i){var o=r[i];if(n(o))try{F.defineProperty(e,o,F.getDescriptor(t,o))}catch(s){}}}function j(t,e){return H?process.env[t]:e}function k(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(e){}}function E(t,e){return t.bind(e)}var F=t("./es5"),x="undefined"==typeof navigator,T={e:{}},P,R="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,S=function(t,e){function n(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}var r={}.hasOwnProperty;return n.prototype=e.prototype,t.prototype=new n,t.prototype},O=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var n=0;n<t.length;++n)if(t[n]===e)return!0;return!1};if(F.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=n(t)}catch(s){return r}for(var a=0;a<o.length;++a){var c=o[a];if(!i[c]){i[c]=!0;var l=Object.getOwnPropertyDescriptor(t,c);null!=l&&null==l.get&&null==l.set&&r.push(c)}}t=F.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var i=[];t:for(var o in n)if(r.call(n,o))i.push(o);else{for(var s=0;s<t.length;++s)if(r.call(t[s],o))continue t;i.push(o)}return i}}(),A=/this\s*\.\s*\S+\s*=/,D=/^[a-z$_][a-z$_0-9]*$/i,V=function(){return"stack"in new Error?function(t){return b(t)?t:new Error(v(t))}:function(t){if(b(t))return t;try{throw new Error(v(t))}catch(e){return e}}}(),I=function(t){return F.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var L="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],r=t[Symbol.iterator]();!(e=r.next()).done;)n.push(e.value);return n};I=function(t){return F.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?L(t):null}}var H="undefined"!=typeof process&&"[object process]"===w(process).toLowerCase(),N={isClass:h,isIdentifier:_,inheritedDataKeys:O,getDataPropertyOrDefault:l,thrower:p,isArray:F.isArray,asArray:I,notEnumerableProp:u,isPrimitive:o,isObject:s,isError:y,canEvaluate:x,errorObj:T,tryCatch:i,inherits:S,withAppended:c,maybeWrapAsError:a,toFastProperties:f,filledRange:d,toString:v,canAttachTrace:b,ensureErrorObject:V,originatesFromRejection:g,markAsOriginatingFromRejection:m,classString:w,copyDescriptors:C,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:H,env:j,global:R,getNativePromise:k,domainBind:E};N.isRecentNode=N.isNode&&function(){var t=process.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),N.isNode&&N.toFastProperties(process);try{throw new Error}catch(B){N.lastLineError=B}e.exports=N},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file
diff --git a/tools/eslint/node_modules/bluebird/package.json b/tools/eslint/node_modules/bluebird/package.json
deleted file mode 100644
index 0851e09409..0000000000
--- a/tools/eslint/node_modules/bluebird/package.json
+++ /dev/null
@@ -1,137 +0,0 @@
-{
- "_args": [
- [
- {
- "raw": "bluebird@^3.1.1",
- "scope": null,
- "escapedName": "bluebird",
- "name": "bluebird",
- "rawSpec": "^3.1.1",
- "spec": ">=3.1.1 <4.0.0",
- "type": "range"
- },
- "/Users/trott/io.js/tools/node_modules/table"
- ]
- ],
- "_from": "bluebird@>=3.1.1 <4.0.0",
- "_id": "bluebird@3.4.6",
- "_inCache": true,
- "_installable": true,
- "_location": "/bluebird",
- "_nodeVersion": "5.6.0",
- "_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/bluebird-3.4.6.tgz_1472763137386_0.698919479502365"
- },
- "_npmUser": {
- "name": "esailija",
- "email": "petka_antonov@hotmail.com"
- },
- "_npmVersion": "3.6.0",
- "_phantomChildren": {},
- "_requested": {
- "raw": "bluebird@^3.1.1",
- "scope": null,
- "escapedName": "bluebird",
- "name": "bluebird",
- "rawSpec": "^3.1.1",
- "spec": ">=3.1.1 <4.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/table"
- ],
- "_resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.6.tgz",
- "_shasum": "01da8d821d87813d158967e743d5fe6c62cf8c0f",
- "_shrinkwrap": null,
- "_spec": "bluebird@^3.1.1",
- "_where": "/Users/trott/io.js/tools/node_modules/table",
- "author": {
- "name": "Petka Antonov",
- "email": "petka_antonov@hotmail.com",
- "url": "http://github.com/petkaantonov/"
- },
- "browser": "./js/browser/bluebird.js",
- "bugs": {
- "url": "http://github.com/petkaantonov/bluebird/issues"
- },
- "dependencies": {},
- "description": "Full featured Promises/A+ implementation with exceptionally good performance",
- "devDependencies": {
- "acorn": "~0.6.0",
- "baconjs": "^0.7.43",
- "bluebird": "^2.9.2",
- "body-parser": "^1.10.2",
- "browserify": "^8.1.1",
- "cli-table": "~0.3.1",
- "co": "^4.2.0",
- "cross-spawn": "^0.2.3",
- "glob": "^4.3.2",
- "grunt-saucelabs": "~8.4.1",
- "highland": "^2.3.0",
- "istanbul": "^0.3.5",
- "jshint": "^2.6.0",
- "jshint-stylish": "~0.2.0",
- "kefir": "^2.4.1",
- "mkdirp": "~0.5.0",
- "mocha": "~2.1",
- "open": "~0.0.5",
- "optimist": "~0.6.1",
- "rimraf": "~2.2.6",
- "rx": "^2.3.25",
- "serve-static": "^1.7.1",
- "sinon": "~1.7.3",
- "uglify-js": "~2.4.16"
- },
- "directories": {},
- "dist": {
- "shasum": "01da8d821d87813d158967e743d5fe6c62cf8c0f",
- "tarball": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.6.tgz"
- },
- "files": [
- "js/browser",
- "js/release",
- "LICENSE"
- ],
- "gitHead": "b466418e1d8cafd93c807f84b4dceee715c70b35",
- "homepage": "https://github.com/petkaantonov/bluebird",
- "keywords": [
- "promise",
- "performance",
- "promises",
- "promises-a",
- "promises-aplus",
- "async",
- "await",
- "deferred",
- "deferreds",
- "future",
- "flow control",
- "dsl",
- "fluent interface"
- ],
- "license": "MIT",
- "main": "./js/release/bluebird.js",
- "maintainers": [
- {
- "name": "esailija",
- "email": "petka_antonov@hotmail.com"
- }
- ],
- "name": "bluebird",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/petkaantonov/bluebird.git"
- },
- "scripts": {
- "generate-browser-core": "node tools/build.js --features=core --no-debug --release --zalgo --browser --minify && mv js/browser/bluebird.js js/browser/bluebird.core.js && mv js/browser/bluebird.min.js js/browser/bluebird.core.min.js",
- "generate-browser-full": "node tools/build.js --no-clean --no-debug --release --browser --minify",
- "istanbul": "istanbul",
- "lint": "node scripts/jshint.js",
- "prepublish": "npm run generate-browser-core && npm run generate-browser-full",
- "test": "node tools/test.js"
- },
- "version": "3.4.6"
-}
diff --git a/tools/eslint/node_modules/brace-expansion/package.json b/tools/eslint/node_modules/brace-expansion/package.json
index 8073d9549f..cc3f0e078b 100644
--- a/tools/eslint/node_modules/brace-expansion/package.json
+++ b/tools/eslint/node_modules/brace-expansion/package.json
@@ -16,7 +16,6 @@
"_from": "brace-expansion@>=1.0.0 <2.0.0",
"_id": "brace-expansion@1.1.6",
"_inCache": true,
- "_installable": true,
"_location": "/brace-expansion",
"_nodeVersion": "4.4.7",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/caller-path/package.json b/tools/eslint/node_modules/caller-path/package.json
index 21028e0b77..e84f89600a 100644
--- a/tools/eslint/node_modules/caller-path/package.json
+++ b/tools/eslint/node_modules/caller-path/package.json
@@ -16,7 +16,6 @@
"_from": "caller-path@>=0.1.0 <0.2.0",
"_id": "caller-path@0.1.0",
"_inCache": true,
- "_installable": true,
"_location": "/caller-path",
"_npmUser": {
"name": "sindresorhus",
diff --git a/tools/eslint/node_modules/callsites/package.json b/tools/eslint/node_modules/callsites/package.json
index a497ebcb7a..63e65b5403 100644
--- a/tools/eslint/node_modules/callsites/package.json
+++ b/tools/eslint/node_modules/callsites/package.json
@@ -16,7 +16,6 @@
"_from": "callsites@>=0.2.0 <0.3.0",
"_id": "callsites@0.2.0",
"_inCache": true,
- "_installable": true,
"_location": "/callsites",
"_npmUser": {
"name": "sindresorhus",
diff --git a/tools/eslint/node_modules/chalk/package.json b/tools/eslint/node_modules/chalk/package.json
index ba8e53a66a..f74ee9546e 100644
--- a/tools/eslint/node_modules/chalk/package.json
+++ b/tools/eslint/node_modules/chalk/package.json
@@ -16,7 +16,6 @@
"_from": "chalk@>=1.1.3 <2.0.0",
"_id": "chalk@1.1.3",
"_inCache": true,
- "_installable": true,
"_location": "/chalk",
"_nodeVersion": "0.10.32",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/circular-json/package.json b/tools/eslint/node_modules/circular-json/package.json
index 7b1290514e..6ac94a5b2b 100644
--- a/tools/eslint/node_modules/circular-json/package.json
+++ b/tools/eslint/node_modules/circular-json/package.json
@@ -16,7 +16,6 @@
"_from": "circular-json@>=0.3.0 <0.4.0",
"_id": "circular-json@0.3.1",
"_inCache": true,
- "_installable": true,
"_location": "/circular-json",
"_nodeVersion": "6.3.1",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/cli-cursor/package.json b/tools/eslint/node_modules/cli-cursor/package.json
index 3b1995eb4a..e86e095e34 100644
--- a/tools/eslint/node_modules/cli-cursor/package.json
+++ b/tools/eslint/node_modules/cli-cursor/package.json
@@ -16,7 +16,6 @@
"_from": "cli-cursor@>=1.0.1 <2.0.0",
"_id": "cli-cursor@1.0.2",
"_inCache": true,
- "_installable": true,
"_location": "/cli-cursor",
"_nodeVersion": "4.1.0",
"_npmUser": {
diff --git a/tools/eslint/node_modules/cli-width/package.json b/tools/eslint/node_modules/cli-width/package.json
index 54cd04e174..77524d737d 100644
--- a/tools/eslint/node_modules/cli-width/package.json
+++ b/tools/eslint/node_modules/cli-width/package.json
@@ -16,7 +16,6 @@
"_from": "cli-width@>=2.0.0 <3.0.0",
"_id": "cli-width@2.1.0",
"_inCache": true,
- "_installable": true,
"_location": "/cli-width",
"_nodeVersion": "4.2.6",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/co/LICENSE b/tools/eslint/node_modules/co/LICENSE
new file mode 100644
index 0000000000..92faba5db3
--- /dev/null
+++ b/tools/eslint/node_modules/co/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+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/eslint/node_modules/co/Readme.md b/tools/eslint/node_modules/co/Readme.md
new file mode 100644
index 0000000000..c1d4882a13
--- /dev/null
+++ b/tools/eslint/node_modules/co/Readme.md
@@ -0,0 +1,212 @@
+# co
+
+[![Gitter][gitter-image]][gitter-url]
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![Downloads][downloads-image]][downloads-url]
+
+ Generator based control flow goodness for nodejs and the browser,
+ using promises, letting you write non-blocking code in a nice-ish way.
+
+## Co v4
+
+ `co@4.0.0` has been released, which now relies on promises.
+ It is a stepping stone towards [ES7 async/await](https://github.com/lukehoban/ecmascript-asyncawait).
+ The primary API change is how `co()` is invoked.
+ Before, `co` returned a "thunk", which you then called with a callback and optional arguments.
+ Now, `co()` returns a promise.
+
+```js
+co(function* () {
+ var result = yield Promise.resolve(true);
+ return result;
+}).then(function (value) {
+ console.log(value);
+}, function (err) {
+ console.error(err.stack);
+});
+```
+
+ If you want to convert a `co`-generator-function into a regular function that returns a promise,
+ you now use `co.wrap(fn*)`.
+
+```js
+var fn = co.wrap(function* (val) {
+ return yield Promise.resolve(val);
+});
+
+fn(true).then(function (val) {
+
+});
+```
+
+## Platform Compatibility
+
+ `co@4+` requires a `Promise` implementation.
+ For versions of node `< 0.11` and for many older browsers,
+ you should/must include your own `Promise` polyfill.
+
+ When using node 0.11.x or greater, you must use the `--harmony-generators`
+ flag or just `--harmony` to get access to generators.
+
+ When using node 0.10.x and lower or browsers without generator support,
+ you must use [gnode](https://github.com/TooTallNate/gnode) and/or [regenerator](http://facebook.github.io/regenerator/).
+
+ io.js is supported out of the box, you can use `co` without flags or polyfills.
+
+## Installation
+
+```
+$ npm install co
+```
+
+## Associated libraries
+
+Any library that returns promises work well with `co`.
+
+- [mz](https://github.com/normalize/mz) - wrap all of node's code libraries as promises.
+
+View the [wiki](https://github.com/visionmedia/co/wiki) for more libraries.
+
+## Examples
+
+```js
+var co = require('co');
+
+co(function *(){
+ // yield any promise
+ var result = yield Promise.resolve(true);
+}).catch(onerror);
+
+co(function *(){
+ // resolve multiple promises in parallel
+ var a = Promise.resolve(1);
+ var b = Promise.resolve(2);
+ var c = Promise.resolve(3);
+ var res = yield [a, b, c];
+ console.log(res);
+ // => [1, 2, 3]
+}).catch(onerror);
+
+// errors can be try/catched
+co(function *(){
+ try {
+ yield Promise.reject(new Error('boom'));
+ } catch (err) {
+ console.error(err.message); // "boom"
+ }
+}).catch(onerror);
+
+function onerror(err) {
+ // log any uncaught errors
+ // co will not throw any errors you do not handle!!!
+ // HANDLE ALL YOUR ERRORS!!!
+ console.error(err.stack);
+}
+```
+
+## Yieldables
+
+ The `yieldable` objects currently supported are:
+
+ - promises
+ - thunks (functions)
+ - array (parallel execution)
+ - objects (parallel execution)
+ - generators (delegation)
+ - generator functions (delegation)
+
+Nested `yieldable` objects are supported, meaning you can nest
+promises within objects within arrays, and so on!
+
+### Promises
+
+[Read more on promises!](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
+
+### Thunks
+
+Thunks are functions that only have a single argument, a callback.
+Thunk support only remains for backwards compatibility and may
+be removed in future versions of `co`.
+
+### Arrays
+
+`yield`ing an array will resolve all the `yieldables` in parallel.
+
+```js
+co(function* () {
+ var res = yield [
+ Promise.resolve(1),
+ Promise.resolve(2),
+ Promise.resolve(3),
+ ];
+ console.log(res); // => [1, 2, 3]
+}).catch(onerror);
+```
+
+### Objects
+
+Just like arrays, objects resolve all `yieldable`s in parallel.
+
+```js
+co(function* () {
+ var res = yield {
+ 1: Promise.resolve(1),
+ 2: Promise.resolve(2),
+ };
+ console.log(res); // => { 1: 1, 2: 2 }
+}).catch(onerror);
+```
+
+### Generators and Generator Functions
+
+Any generator or generator function you can pass into `co`
+can be yielded as well. This should generally be avoided
+as we should be moving towards spec-compliant `Promise`s instead.
+
+## API
+
+### co(fn*).then( val => )
+
+Returns a promise that resolves a generator, generator function,
+or any function that returns a generator.
+
+```js
+co(function* () {
+ return yield Promise.resolve(true);
+}).then(function (val) {
+ console.log(val);
+}, function (err) {
+ console.error(err.stack);
+});
+```
+
+### var fn = co.wrap(fn*)
+
+Convert a generator into a regular function that returns a `Promise`.
+
+```js
+var fn = co.wrap(function* (val) {
+ return yield Promise.resolve(val);
+});
+
+fn(true).then(function (val) {
+
+});
+```
+
+## License
+
+ MIT
+
+[npm-image]: https://img.shields.io/npm/v/co.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/co
+[travis-image]: https://img.shields.io/travis/tj/co.svg?style=flat-square
+[travis-url]: https://travis-ci.org/tj/co
+[coveralls-image]: https://img.shields.io/coveralls/tj/co.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/tj/co
+[downloads-image]: http://img.shields.io/npm/dm/co.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/co
+[gitter-image]: https://badges.gitter.im/Join%20Chat.svg
+[gitter-url]: https://gitter.im/tj/co?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
diff --git a/tools/eslint/node_modules/co/index.js b/tools/eslint/node_modules/co/index.js
new file mode 100644
index 0000000000..87ba8ba8b4
--- /dev/null
+++ b/tools/eslint/node_modules/co/index.js
@@ -0,0 +1,237 @@
+
+/**
+ * slice() reference.
+ */
+
+var slice = Array.prototype.slice;
+
+/**
+ * Expose `co`.
+ */
+
+module.exports = co['default'] = co.co = co;
+
+/**
+ * Wrap the given generator `fn` into a
+ * function that returns a promise.
+ * This is a separate function so that
+ * every `co()` call doesn't create a new,
+ * unnecessary closure.
+ *
+ * @param {GeneratorFunction} fn
+ * @return {Function}
+ * @api public
+ */
+
+co.wrap = function (fn) {
+ createPromise.__generatorFunction__ = fn;
+ return createPromise;
+ function createPromise() {
+ return co.call(this, fn.apply(this, arguments));
+ }
+};
+
+/**
+ * Execute the generator function or a generator
+ * and return a promise.
+ *
+ * @param {Function} fn
+ * @return {Promise}
+ * @api public
+ */
+
+function co(gen) {
+ var ctx = this;
+ var args = slice.call(arguments, 1)
+
+ // we wrap everything in a promise to avoid promise chaining,
+ // which leads to memory leak errors.
+ // see https://github.com/tj/co/issues/180
+ return new Promise(function(resolve, reject) {
+ if (typeof gen === 'function') gen = gen.apply(ctx, args);
+ if (!gen || typeof gen.next !== 'function') return resolve(gen);
+
+ onFulfilled();
+
+ /**
+ * @param {Mixed} res
+ * @return {Promise}
+ * @api private
+ */
+
+ function onFulfilled(res) {
+ var ret;
+ try {
+ ret = gen.next(res);
+ } catch (e) {
+ return reject(e);
+ }
+ next(ret);
+ }
+
+ /**
+ * @param {Error} err
+ * @return {Promise}
+ * @api private
+ */
+
+ function onRejected(err) {
+ var ret;
+ try {
+ ret = gen.throw(err);
+ } catch (e) {
+ return reject(e);
+ }
+ next(ret);
+ }
+
+ /**
+ * Get the next value in the generator,
+ * return a promise.
+ *
+ * @param {Object} ret
+ * @return {Promise}
+ * @api private
+ */
+
+ function next(ret) {
+ if (ret.done) return resolve(ret.value);
+ var value = toPromise.call(ctx, ret.value);
+ if (value && isPromise(value)) return value.then(onFulfilled, onRejected);
+ return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, '
+ + 'but the following object was passed: "' + String(ret.value) + '"'));
+ }
+ });
+}
+
+/**
+ * Convert a `yield`ed value into a promise.
+ *
+ * @param {Mixed} obj
+ * @return {Promise}
+ * @api private
+ */
+
+function toPromise(obj) {
+ if (!obj) return obj;
+ if (isPromise(obj)) return obj;
+ if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj);
+ if ('function' == typeof obj) return thunkToPromise.call(this, obj);
+ if (Array.isArray(obj)) return arrayToPromise.call(this, obj);
+ if (isObject(obj)) return objectToPromise.call(this, obj);
+ return obj;
+}
+
+/**
+ * Convert a thunk to a promise.
+ *
+ * @param {Function}
+ * @return {Promise}
+ * @api private
+ */
+
+function thunkToPromise(fn) {
+ var ctx = this;
+ return new Promise(function (resolve, reject) {
+ fn.call(ctx, function (err, res) {
+ if (err) return reject(err);
+ if (arguments.length > 2) res = slice.call(arguments, 1);
+ resolve(res);
+ });
+ });
+}
+
+/**
+ * Convert an array of "yieldables" to a promise.
+ * Uses `Promise.all()` internally.
+ *
+ * @param {Array} obj
+ * @return {Promise}
+ * @api private
+ */
+
+function arrayToPromise(obj) {
+ return Promise.all(obj.map(toPromise, this));
+}
+
+/**
+ * Convert an object of "yieldables" to a promise.
+ * Uses `Promise.all()` internally.
+ *
+ * @param {Object} obj
+ * @return {Promise}
+ * @api private
+ */
+
+function objectToPromise(obj){
+ var results = new obj.constructor();
+ var keys = Object.keys(obj);
+ var promises = [];
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var promise = toPromise.call(this, obj[key]);
+ if (promise && isPromise(promise)) defer(promise, key);
+ else results[key] = obj[key];
+ }
+ return Promise.all(promises).then(function () {
+ return results;
+ });
+
+ function defer(promise, key) {
+ // predefine the key in the result
+ results[key] = undefined;
+ promises.push(promise.then(function (res) {
+ results[key] = res;
+ }));
+ }
+}
+
+/**
+ * Check if `obj` is a promise.
+ *
+ * @param {Object} obj
+ * @return {Boolean}
+ * @api private
+ */
+
+function isPromise(obj) {
+ return 'function' == typeof obj.then;
+}
+
+/**
+ * Check if `obj` is a generator.
+ *
+ * @param {Mixed} obj
+ * @return {Boolean}
+ * @api private
+ */
+
+function isGenerator(obj) {
+ return 'function' == typeof obj.next && 'function' == typeof obj.throw;
+}
+
+/**
+ * Check if `obj` is a generator function.
+ *
+ * @param {Mixed} obj
+ * @return {Boolean}
+ * @api private
+ */
+function isGeneratorFunction(obj) {
+ var constructor = obj.constructor;
+ if (!constructor) return false;
+ if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true;
+ return isGenerator(constructor.prototype);
+}
+
+/**
+ * Check for plain object.
+ *
+ * @param {Mixed} val
+ * @return {Boolean}
+ * @api private
+ */
+
+function isObject(val) {
+ return Object == val.constructor;
+}
diff --git a/tools/eslint/node_modules/co/package.json b/tools/eslint/node_modules/co/package.json
new file mode 100644
index 0000000000..4efd1dd46c
--- /dev/null
+++ b/tools/eslint/node_modules/co/package.json
@@ -0,0 +1,106 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "co@^4.6.0",
+ "scope": null,
+ "escapedName": "co",
+ "name": "co",
+ "rawSpec": "^4.6.0",
+ "spec": ">=4.6.0 <5.0.0",
+ "type": "range"
+ },
+ "/Users/trott/io.js/tools/node_modules/ajv"
+ ]
+ ],
+ "_from": "co@>=4.6.0 <5.0.0",
+ "_id": "co@4.6.0",
+ "_inCache": true,
+ "_location": "/co",
+ "_nodeVersion": "2.3.3",
+ "_npmUser": {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ "_npmVersion": "2.11.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "co@^4.6.0",
+ "scope": null,
+ "escapedName": "co",
+ "name": "co",
+ "rawSpec": "^4.6.0",
+ "spec": ">=4.6.0 <5.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/ajv"
+ ],
+ "_resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
+ "_shasum": "6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184",
+ "_shrinkwrap": null,
+ "_spec": "co@^4.6.0",
+ "_where": "/Users/trott/io.js/tools/node_modules/ajv",
+ "bugs": {
+ "url": "https://github.com/tj/co/issues"
+ },
+ "dependencies": {},
+ "description": "generator async control flow goodness",
+ "devDependencies": {
+ "browserify": "^10.0.0",
+ "istanbul-harmony": "0",
+ "mocha": "^2.0.0",
+ "mz": "^1.0.2"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184",
+ "tarball": "https://registry.npmjs.org/co/-/co-4.6.0.tgz"
+ },
+ "engines": {
+ "iojs": ">= 1.0.0",
+ "node": ">= 0.12.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "b54d18f8f472ad1314800e786993c4169a5ff9f8",
+ "homepage": "https://github.com/tj/co#readme",
+ "keywords": [
+ "async",
+ "flow",
+ "generator",
+ "coro",
+ "coroutine"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "name": "co",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/tj/co.git"
+ },
+ "scripts": {
+ "browserify": "browserify index.js -o ./co-browser.js -s co",
+ "prepublish": "npm run browserify",
+ "test": "mocha --harmony",
+ "test-cov": "node --harmony node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter dot",
+ "test-travis": "node --harmony node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- --reporter dot"
+ },
+ "version": "4.6.0"
+}
diff --git a/tools/eslint/node_modules/code-point-at/package.json b/tools/eslint/node_modules/code-point-at/package.json
index f749becd6b..4f90819336 100644
--- a/tools/eslint/node_modules/code-point-at/package.json
+++ b/tools/eslint/node_modules/code-point-at/package.json
@@ -14,16 +14,19 @@
]
],
"_from": "code-point-at@>=1.0.0 <2.0.0",
- "_id": "code-point-at@1.0.0",
+ "_id": "code-point-at@1.0.1",
"_inCache": true,
- "_installable": true,
"_location": "/code-point-at",
- "_nodeVersion": "0.12.5",
+ "_nodeVersion": "4.5.0",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/code-point-at-1.0.1.tgz_1475223183649_0.724906453397125"
+ },
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
- "_npmVersion": "2.11.2",
+ "_npmVersion": "2.15.9",
"_phantomChildren": {},
"_requested": {
"raw": "code-point-at@^1.0.0",
@@ -38,8 +41,8 @@
"/readline2",
"/string-width"
],
- "_resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz",
- "_shasum": "f69b192d3f7d91e382e4b71bddb77878619ab0c6",
+ "_resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.1.tgz",
+ "_shasum": "1104cd34f9b5b45d3eba88f1babc1924e1ce35fb",
"_shrinkwrap": null,
"_spec": "code-point-at@^1.0.0",
"_where": "/Users/trott/io.js/tools/node_modules/readline2",
@@ -56,12 +59,12 @@
},
"description": "ES2015 String#codePointAt() ponyfill",
"devDependencies": {
- "ava": "0.0.4"
+ "ava": "*"
},
"directories": {},
"dist": {
- "shasum": "f69b192d3f7d91e382e4b71bddb77878619ab0c6",
- "tarball": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz"
+ "shasum": "1104cd34f9b5b45d3eba88f1babc1924e1ce35fb",
+ "tarball": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.1.tgz"
},
"engines": {
"node": ">=0.10.0"
@@ -69,11 +72,10 @@
"files": [
"index.js"
],
- "gitHead": "c2ffa4064718b37c84c73a633abeeed5b486a469",
- "homepage": "https://github.com/sindresorhus/code-point-at",
+ "gitHead": "502d72c5a959275e5d90f9c6641589756af44085",
+ "homepage": "https://github.com/sindresorhus/code-point-at#readme",
"keywords": [
"es2015",
- "es6",
"ponyfill",
"polyfill",
"shim",
@@ -100,7 +102,7 @@
"url": "git+https://github.com/sindresorhus/code-point-at.git"
},
"scripts": {
- "test": "node test.js"
+ "test": "ava"
},
- "version": "1.0.0"
+ "version": "1.0.1"
}
diff --git a/tools/eslint/node_modules/code-point-at/readme.md b/tools/eslint/node_modules/code-point-at/readme.md
index 71e7d0931b..ef9713f1b0 100644
--- a/tools/eslint/node_modules/code-point-at/readme.md
+++ b/tools/eslint/node_modules/code-point-at/readme.md
@@ -1,8 +1,6 @@
# code-point-at [![Build Status](https://travis-ci.org/sindresorhus/code-point-at.svg?branch=master)](https://travis-ci.org/sindresorhus/code-point-at)
-> ES2015 [`String#codePointAt()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt) ponyfill
-
-> Ponyfill: A polyfill that doesn't overwrite the native method
+> ES2015 [`String#codePointAt()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt) [ponyfill](https://ponyfill.com)
## Install
diff --git a/tools/eslint/node_modules/concat-map/package.json b/tools/eslint/node_modules/concat-map/package.json
index 74476a28b4..59aabc31f5 100644
--- a/tools/eslint/node_modules/concat-map/package.json
+++ b/tools/eslint/node_modules/concat-map/package.json
@@ -16,7 +16,6 @@
"_from": "concat-map@0.0.1",
"_id": "concat-map@0.0.1",
"_inCache": true,
- "_installable": true,
"_location": "/concat-map",
"_npmUser": {
"name": "substack",
diff --git a/tools/eslint/node_modules/concat-stream/package.json b/tools/eslint/node_modules/concat-stream/package.json
index abca47f9cd..39076975ad 100644
--- a/tools/eslint/node_modules/concat-stream/package.json
+++ b/tools/eslint/node_modules/concat-stream/package.json
@@ -16,7 +16,6 @@
"_from": "concat-stream@>=1.4.6 <2.0.0",
"_id": "concat-stream@1.5.2",
"_inCache": true,
- "_installable": true,
"_location": "/concat-stream",
"_nodeVersion": "4.4.3",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/core-util-is/package.json b/tools/eslint/node_modules/core-util-is/package.json
index 48af30153b..69ed3faa62 100644
--- a/tools/eslint/node_modules/core-util-is/package.json
+++ b/tools/eslint/node_modules/core-util-is/package.json
@@ -16,7 +16,6 @@
"_from": "core-util-is@>=1.0.0 <1.1.0",
"_id": "core-util-is@1.0.2",
"_inCache": true,
- "_installable": true,
"_location": "/core-util-is",
"_nodeVersion": "4.0.0",
"_npmUser": {
diff --git a/tools/eslint/node_modules/d/package.json b/tools/eslint/node_modules/d/package.json
index 0f43c1a5ba..5b3534509d 100644
--- a/tools/eslint/node_modules/d/package.json
+++ b/tools/eslint/node_modules/d/package.json
@@ -16,7 +16,6 @@
"_from": "d@>=0.1.1 <0.2.0",
"_id": "d@0.1.1",
"_inCache": true,
- "_installable": true,
"_location": "/d",
"_npmUser": {
"name": "medikoo",
diff --git a/tools/eslint/node_modules/debug/package.json b/tools/eslint/node_modules/debug/package.json
index 310a8a8b03..ba8ba322eb 100644
--- a/tools/eslint/node_modules/debug/package.json
+++ b/tools/eslint/node_modules/debug/package.json
@@ -16,7 +16,6 @@
"_from": "debug@>=2.1.1 <3.0.0",
"_id": "debug@2.2.0",
"_inCache": true,
- "_installable": true,
"_location": "/debug",
"_nodeVersion": "0.12.2",
"_npmUser": {
diff --git a/tools/eslint/node_modules/deep-is/package.json b/tools/eslint/node_modules/deep-is/package.json
index d62401579e..d54f38bd68 100644
--- a/tools/eslint/node_modules/deep-is/package.json
+++ b/tools/eslint/node_modules/deep-is/package.json
@@ -16,7 +16,6 @@
"_from": "deep-is@>=0.1.3 <0.2.0",
"_id": "deep-is@0.1.3",
"_inCache": true,
- "_installable": true,
"_location": "/deep-is",
"_npmUser": {
"name": "thlorenz",
diff --git a/tools/eslint/node_modules/del/package.json b/tools/eslint/node_modules/del/package.json
index 81e63a265b..dca7b106f2 100644
--- a/tools/eslint/node_modules/del/package.json
+++ b/tools/eslint/node_modules/del/package.json
@@ -16,7 +16,6 @@
"_from": "del@>=2.0.2 <3.0.0",
"_id": "del@2.2.2",
"_inCache": true,
- "_installable": true,
"_location": "/del",
"_nodeVersion": "4.4.5",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/doctrine/lib/doctrine.js b/tools/eslint/node_modules/doctrine/lib/doctrine.js
index d9a408170a..095eeeb4ee 100644
--- a/tools/eslint/node_modules/doctrine/lib/doctrine.js
+++ b/tools/eslint/node_modules/doctrine/lib/doctrine.js
@@ -72,6 +72,10 @@
return isProperty(title) || isParamTitle(title);
}
+ function isAllowedOptional(title) {
+ return isProperty(title) || isParamTitle(title);
+ }
+
function isTypeParameterRequired(title) {
return isParamTitle(title) || isReturnTitle(title) ||
title === 'define' || title === 'enum' ||
@@ -255,9 +259,10 @@
return utility.throwError('Braces are not balanced');
}
- if (isParamTitle(title)) {
+ if (isAllowedOptional(title)) {
return typed.parseParamType(type);
}
+
return typed.parseType(type);
}
@@ -284,6 +289,7 @@
useBrackets,
insideString;
+
skipWhiteSpace(last);
if (index >= last) {
@@ -469,7 +475,7 @@
TagParser.prototype._parseNamePath = function (optional) {
var name;
- name = parseName(this._last, sloppy && isParamTitle(this._title), true);
+ name = parseName(this._last, sloppy && isAllowedOptional(this._title), true);
if (!name) {
if (!optional) {
if (!this.addError('Missing or invalid tag name')) {
@@ -495,7 +501,7 @@
// param, property requires name
if (isAllowedName(this._title)) {
- this._tag.name = parseName(this._last, sloppy && isParamTitle(this._title), isAllowedNested(this._title));
+ this._tag.name = parseName(this._last, sloppy && isAllowedOptional(this._title), isAllowedNested(this._title));
if (!this._tag.name) {
if (!isNameParameterRequired(this._title)) {
return true;
@@ -535,6 +541,7 @@
}
}
+
return true;
};
@@ -647,7 +654,7 @@
description = this._tag.description;
// un-fix potentially sloppy declaration
- if (isParamTitle(this._title) && !this._tag.type && description && description.charAt(0) === '[') {
+ if (isAllowedOptional(this._title) && !this._tag.type && description && description.charAt(0) === '[') {
this._tag.type = this._extra.name;
if (!this._tag.name) {
this._tag.name = undefined;
@@ -739,6 +746,7 @@
TagParser.prototype.parse = function parse() {
var i, iz, sequences, method;
+
// empty title
if (!this._title) {
if (!this.addError('Missing or invalid title')) {
@@ -785,6 +793,7 @@
while (index < parser._last) {
advance();
}
+
return tag;
}
diff --git a/tools/eslint/node_modules/doctrine/lib/typed.js b/tools/eslint/node_modules/doctrine/lib/typed.js
index a4c282f8fd..f0d759bcba 100644
--- a/tools/eslint/node_modules/doctrine/lib/typed.js
+++ b/tools/eslint/node_modules/doctrine/lib/typed.js
@@ -43,7 +43,8 @@
NameExpression: 'NameExpression',
TypeApplication: 'TypeApplication',
StringLiteralType: 'StringLiteralType',
- NumericLiteralType: 'NumericLiteralType'
+ NumericLiteralType: 'NumericLiteralType',
+ BooleanLiteralType: 'BooleanLiteralType'
};
Token = {
@@ -883,6 +884,14 @@
};
}
+ if (value === 'true' || value === 'false') {
+ consume(Token.NAME);
+ return {
+ type: Syntax.BooleanLiteralType,
+ value: value === 'true'
+ };
+ }
+
context = Context.save();
if (value === 'function') {
try {
@@ -1248,6 +1257,10 @@
result = String(node.value);
break;
+ case Syntax.BooleanLiteralType:
+ result = String(node.value);
+ break;
+
default:
utility.throwError('Unknown type ' + node.type);
}
diff --git a/tools/eslint/node_modules/doctrine/package.json b/tools/eslint/node_modules/doctrine/package.json
index 09fd0f89d0..d1e888fad3 100644
--- a/tools/eslint/node_modules/doctrine/package.json
+++ b/tools/eslint/node_modules/doctrine/package.json
@@ -14,14 +14,13 @@
]
],
"_from": "doctrine@>=1.2.2 <2.0.0",
- "_id": "doctrine@1.3.0",
+ "_id": "doctrine@1.5.0",
"_inCache": true,
- "_installable": true,
"_location": "/doctrine",
"_nodeVersion": "4.4.7",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/doctrine-1.3.0.tgz_1471897078408_0.6770147804636508"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/doctrine-1.5.0.tgz_1476393949423_0.8078370734583586"
},
"_npmUser": {
"name": "eslint",
@@ -41,8 +40,8 @@
"_requiredBy": [
"/eslint"
],
- "_resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.3.0.tgz",
- "_shasum": "13e75682b55518424276f7c173783456ef913d26",
+ "_resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
+ "_shasum": "379dce730f6166f76cefa4e6707a159b02c5a6fa",
"_shrinkwrap": null,
"_spec": "doctrine@^1.2.2",
"_where": "/Users/trott/io.js/tools/node_modules/eslint",
@@ -72,8 +71,8 @@
"lib": "./lib"
},
"dist": {
- "shasum": "13e75682b55518424276f7c173783456ef913d26",
- "tarball": "https://registry.npmjs.org/doctrine/-/doctrine-1.3.0.tgz"
+ "shasum": "379dce730f6166f76cefa4e6707a159b02c5a6fa",
+ "tarball": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz"
},
"engines": {
"node": ">=0.10.0"
@@ -85,7 +84,7 @@
"LICENSE.esprima",
"README.md"
],
- "gitHead": "b4b2870ccb4e47977fafce8e6055740e4dda28af",
+ "gitHead": "dcd631feb5dd5bcd0899dd35548da2752ea2263e",
"homepage": "https://github.com/eslint/doctrine",
"licenses": [
{
@@ -123,5 +122,5 @@
"release": "eslint-release",
"test": "npm run lint && node Makefile.js test"
},
- "version": "1.3.0"
+ "version": "1.5.0"
}
diff --git a/tools/eslint/node_modules/es5-ext/package.json b/tools/eslint/node_modules/es5-ext/package.json
index d7b6d15ca2..f83eaaea1f 100644
--- a/tools/eslint/node_modules/es5-ext/package.json
+++ b/tools/eslint/node_modules/es5-ext/package.json
@@ -16,7 +16,6 @@
"_from": "es5-ext@>=0.10.11 <0.11.0",
"_id": "es5-ext@0.10.12",
"_inCache": true,
- "_installable": true,
"_location": "/es5-ext",
"_nodeVersion": "4.4.5",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/es6-iterator/package.json b/tools/eslint/node_modules/es6-iterator/package.json
index e36e7b7b70..5fb6c93512 100644
--- a/tools/eslint/node_modules/es6-iterator/package.json
+++ b/tools/eslint/node_modules/es6-iterator/package.json
@@ -16,7 +16,6 @@
"_from": "es6-iterator@>=2.0.0 <3.0.0",
"_id": "es6-iterator@2.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/es6-iterator",
"_nodeVersion": "0.12.7",
"_npmUser": {
diff --git a/tools/eslint/node_modules/es6-map/package.json b/tools/eslint/node_modules/es6-map/package.json
index fc0af63efb..4f5d3f45c9 100644
--- a/tools/eslint/node_modules/es6-map/package.json
+++ b/tools/eslint/node_modules/es6-map/package.json
@@ -16,7 +16,6 @@
"_from": "es6-map@>=0.1.3 <0.2.0",
"_id": "es6-map@0.1.4",
"_inCache": true,
- "_installable": true,
"_location": "/es6-map",
"_nodeVersion": "4.4.5",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/es6-set/package.json b/tools/eslint/node_modules/es6-set/package.json
index d7fa809e73..53d0089681 100644
--- a/tools/eslint/node_modules/es6-set/package.json
+++ b/tools/eslint/node_modules/es6-set/package.json
@@ -16,7 +16,6 @@
"_from": "es6-set@>=0.1.3 <0.2.0",
"_id": "es6-set@0.1.4",
"_inCache": true,
- "_installable": true,
"_location": "/es6-set",
"_nodeVersion": "4.2.4",
"_npmUser": {
diff --git a/tools/eslint/node_modules/es6-symbol/package.json b/tools/eslint/node_modules/es6-symbol/package.json
index 6143895243..fa5b683860 100644
--- a/tools/eslint/node_modules/es6-symbol/package.json
+++ b/tools/eslint/node_modules/es6-symbol/package.json
@@ -16,7 +16,6 @@
"_from": "es6-symbol@>=3.1.0 <3.2.0",
"_id": "es6-symbol@3.1.0",
"_inCache": true,
- "_installable": true,
"_location": "/es6-symbol",
"_nodeVersion": "4.4.5",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/es6-weak-map/package.json b/tools/eslint/node_modules/es6-weak-map/package.json
index 4882e6c75b..d31366401a 100644
--- a/tools/eslint/node_modules/es6-weak-map/package.json
+++ b/tools/eslint/node_modules/es6-weak-map/package.json
@@ -16,7 +16,6 @@
"_from": "es6-weak-map@>=2.0.1 <3.0.0",
"_id": "es6-weak-map@2.0.1",
"_inCache": true,
- "_installable": true,
"_location": "/es6-weak-map",
"_nodeVersion": "0.12.7",
"_npmUser": {
diff --git a/tools/eslint/node_modules/escape-string-regexp/package.json b/tools/eslint/node_modules/escape-string-regexp/package.json
index 078128e098..001e6a5dbf 100644
--- a/tools/eslint/node_modules/escape-string-regexp/package.json
+++ b/tools/eslint/node_modules/escape-string-regexp/package.json
@@ -16,7 +16,6 @@
"_from": "escape-string-regexp@>=1.0.2 <2.0.0",
"_id": "escape-string-regexp@1.0.5",
"_inCache": true,
- "_installable": true,
"_location": "/escape-string-regexp",
"_nodeVersion": "4.2.6",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/escope/package.json b/tools/eslint/node_modules/escope/package.json
index 87e60751eb..20bd9dc0c7 100644
--- a/tools/eslint/node_modules/escope/package.json
+++ b/tools/eslint/node_modules/escope/package.json
@@ -16,7 +16,6 @@
"_from": "escope@>=3.6.0 <4.0.0",
"_id": "escope@3.6.0",
"_inCache": true,
- "_installable": true,
"_location": "/escope",
"_nodeVersion": "0.12.9",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/espree/README.md b/tools/eslint/node_modules/espree/README.md
index 80ca0482bf..97e7be423f 100644
--- a/tools/eslint/node_modules/espree/README.md
+++ b/tools/eslint/node_modules/espree/README.md
@@ -41,7 +41,7 @@ var ast = espree.parse(code, {
// create a top-level tokens array containing all tokens
tokens: true,
- // specify the language version (3, 5, 6, or 7, default is 5)
+ // specify the language version (3, 5, 6, 7, or 8, default is 5)
ecmaVersion: 5,
// specify which type of script you're parsing (script or module, default is script)
@@ -130,10 +130,17 @@ We are building on top of Acorn, however, so that we can contribute back and hel
All of them.
-### What ECMAScript 7 features do you support?
+### What ECMAScript 7/2016 features do you support?
There is only one ECMAScript 7 syntax change: the exponentiation operator. Espree supports this.
+### What ECMAScript 2017 features do you support?
+
+Because ECMAScript 2017 is still under development, we are implementing features as they are finalized. Currently, Espree supports:
+
+* `async` functions
+* Trailing commas in function declarations and calls (including arrow functions and concise methods)
+
### How do you determine which experimental features to support?
In general, we do not support experimental JavaScript features. We may make exceptions from time to time depending on the maturity of the features.
diff --git a/tools/eslint/node_modules/espree/espree.js b/tools/eslint/node_modules/espree/espree.js
index 9ad6e2e78c..d6e65c8d53 100644
--- a/tools/eslint/node_modules/espree/espree.js
+++ b/tools/eslint/node_modules/espree/espree.js
@@ -340,6 +340,7 @@ acorn.plugins.espree = function(instance) {
var prop = this.startNode(),
isGenerator,
+ isAsync,
startPos,
startLoc;
@@ -369,8 +370,25 @@ acorn.plugins.espree = function(instance) {
}
}
- this.parsePropertyName(prop);
- this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos);
+ // grab the property name or "async"
+ this.parsePropertyName(prop, refShorthandDefaultPos);
+ if (this.options.ecmaVersion >= 8 &&
+ !isPattern &&
+ !isGenerator &&
+ !prop.computed &&
+ prop.key.type === "Identifier" &&
+ prop.key.name === "async" &&
+ this.type !== tt.parenL &&
+ this.type !== tt.colon &&
+ !this.canInsertSemicolon()
+ ) {
+ this.parsePropertyName(prop, refShorthandDefaultPos);
+ isAsync = true;
+ } else {
+ isAsync = false;
+ }
+
+ this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refShorthandDefaultPos);
this.checkPropClash(prop, propHash);
node.properties.push(this.finishNode(prop, "Property"));
}
@@ -506,12 +524,13 @@ function tokenize(code, options) {
case 5:
case 6:
case 7:
+ case 8:
acornOptions.ecmaVersion = options.ecmaVersion;
extra.ecmaVersion = options.ecmaVersion;
break;
default:
- throw new Error("ecmaVersion must be 3, 5, 6, or 7.");
+ throw new Error("ecmaVersion must be 3, 5, 6, 7, or 8.");
}
}
@@ -643,12 +662,13 @@ function parse(code, options) {
case 5:
case 6:
case 7:
+ case 8:
acornOptions.ecmaVersion = options.ecmaVersion;
extra.ecmaVersion = options.ecmaVersion;
break;
default:
- throw new Error("ecmaVersion must be 3, 5, 6, or 7.");
+ throw new Error("ecmaVersion must be 3, 5, 6, 7, or 8.");
}
}
diff --git a/tools/eslint/node_modules/espree/lib/token-translator.js b/tools/eslint/node_modules/espree/lib/token-translator.js
index 2894f35706..3921ac7814 100644
--- a/tools/eslint/node_modules/espree/lib/token-translator.js
+++ b/tools/eslint/node_modules/espree/lib/token-translator.js
@@ -201,6 +201,13 @@ TokenTranslator.prototype = {
}
if (token.type === tt.backQuote) {
+
+ // if there's already a curly, it's not part of the template
+ if (this._curlyBrace) {
+ tokens.push(this.translate(this._curlyBrace, extra));
+ this._curlyBrace = null;
+ }
+
templateTokens.push(token);
// it's the end
@@ -217,7 +224,6 @@ TokenTranslator.prototype = {
// if there's already a curly, it's not part of the template
if (this._curlyBrace) {
-
tokens.push(this.translate(this._curlyBrace, extra));
}
diff --git a/tools/eslint/node_modules/espree/package.json b/tools/eslint/node_modules/espree/package.json
index 1329a56298..0c0f1f52d2 100644
--- a/tools/eslint/node_modules/espree/package.json
+++ b/tools/eslint/node_modules/espree/package.json
@@ -2,26 +2,25 @@
"_args": [
[
{
- "raw": "espree@^3.1.6",
+ "raw": "espree@^3.3.1",
"scope": null,
"escapedName": "espree",
"name": "espree",
- "rawSpec": "^3.1.6",
- "spec": ">=3.1.6 <4.0.0",
+ "rawSpec": "^3.3.1",
+ "spec": ">=3.3.1 <4.0.0",
"type": "range"
},
"/Users/trott/io.js/tools/node_modules/eslint"
]
],
- "_from": "espree@>=3.1.6 <4.0.0",
- "_id": "espree@3.1.7",
+ "_from": "espree@>=3.3.1 <4.0.0",
+ "_id": "espree@3.3.2",
"_inCache": true,
- "_installable": true,
"_location": "/espree",
"_nodeVersion": "4.4.7",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/espree-3.1.7.tgz_1469818741131_0.25705570145510137"
+ "tmp": "tmp/espree-3.3.2.tgz_1475184001667_0.6324210215825588"
},
"_npmUser": {
"name": "eslint",
@@ -30,21 +29,21 @@
"_npmVersion": "2.15.8",
"_phantomChildren": {},
"_requested": {
- "raw": "espree@^3.1.6",
+ "raw": "espree@^3.3.1",
"scope": null,
"escapedName": "espree",
"name": "espree",
- "rawSpec": "^3.1.6",
- "spec": ">=3.1.6 <4.0.0",
+ "rawSpec": "^3.3.1",
+ "spec": ">=3.3.1 <4.0.0",
"type": "range"
},
"_requiredBy": [
"/eslint"
],
- "_resolved": "https://registry.npmjs.org/espree/-/espree-3.1.7.tgz",
- "_shasum": "fd5deec76a97a5120a9cd3a7cb1177a0923b11d2",
+ "_resolved": "https://registry.npmjs.org/espree/-/espree-3.3.2.tgz",
+ "_shasum": "dbf3fadeb4ecb4d4778303e50103b3d36c88b89c",
"_shrinkwrap": null,
- "_spec": "espree@^3.1.6",
+ "_spec": "espree@^3.3.1",
"_where": "/Users/trott/io.js/tools/node_modules/eslint",
"author": {
"name": "Nicholas C. Zakas",
@@ -54,7 +53,7 @@
"url": "http://github.com/eslint/espree.git"
},
"dependencies": {
- "acorn": "^3.3.0",
+ "acorn": "^4.0.1",
"acorn-jsx": "^3.0.0"
},
"description": "An Esprima-compatible JavaScript parser built on Acorn",
@@ -63,7 +62,7 @@
"chai": "^1.10.0",
"eslint": "^2.0.0-beta.1",
"eslint-config-eslint": "^3.0.0",
- "eslint-release": "^0.6.4",
+ "eslint-release": "^0.10.0",
"esprima": "latest",
"esprima-fb": "^8001.2001.0-dev-harmony-fb",
"istanbul": "~0.2.6",
@@ -77,8 +76,8 @@
},
"directories": {},
"dist": {
- "shasum": "fd5deec76a97a5120a9cd3a7cb1177a0923b11d2",
- "tarball": "https://registry.npmjs.org/espree/-/espree-3.1.7.tgz"
+ "shasum": "dbf3fadeb4ecb4d4778303e50103b3d36c88b89c",
+ "tarball": "https://registry.npmjs.org/espree/-/espree-3.3.2.tgz"
},
"engines": {
"node": ">=0.10.0"
@@ -87,7 +86,7 @@
"lib",
"espree.js"
],
- "gitHead": "4ddfacba95c96732541d94521efbcdccce2fad99",
+ "gitHead": "c8ca13a205ecd3572045872cd0471e174a060281",
"homepage": "https://github.com/eslint/espree",
"keywords": [
"ast",
@@ -114,7 +113,7 @@
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
- "url": "git+ssh://git@github.com/eslint/espree.git"
+ "url": "git+https://github.com/eslint/espree.git"
},
"scripts": {
"alpharelease": "eslint-prelease alpha",
@@ -122,9 +121,10 @@
"browserify": "node Makefile.js browserify",
"ci-release": "eslint-ci-release",
"generate-regex": "node tools/generate-identifier-regex.js",
+ "gh-release": "eslint-gh-release",
"lint": "node Makefile.js lint",
"release": "eslint-release",
"test": "npm run-script lint && node Makefile.js test"
},
- "version": "3.1.7"
+ "version": "3.3.2"
}
diff --git a/tools/eslint/node_modules/esprima/package.json b/tools/eslint/node_modules/esprima/package.json
index ddee8dbee8..2f9a5afe1c 100644
--- a/tools/eslint/node_modules/esprima/package.json
+++ b/tools/eslint/node_modules/esprima/package.json
@@ -16,7 +16,6 @@
"_from": "esprima@>=2.6.0 <3.0.0",
"_id": "esprima@2.7.3",
"_inCache": true,
- "_installable": true,
"_location": "/esprima",
"_nodeVersion": "6.1.0",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/esrecurse/node_modules/estraverse/package.json b/tools/eslint/node_modules/esrecurse/node_modules/estraverse/package.json
index 5bfc71956e..d98eb1c44a 100644
--- a/tools/eslint/node_modules/esrecurse/node_modules/estraverse/package.json
+++ b/tools/eslint/node_modules/esrecurse/node_modules/estraverse/package.json
@@ -16,7 +16,6 @@
"_from": "estraverse@>=4.1.0 <4.2.0",
"_id": "estraverse@4.1.1",
"_inCache": true,
- "_installable": true,
"_location": "/esrecurse/estraverse",
"_nodeVersion": "4.1.1",
"_npmUser": {
diff --git a/tools/eslint/node_modules/esrecurse/package.json b/tools/eslint/node_modules/esrecurse/package.json
index d095882f5e..77d72b4e0c 100644
--- a/tools/eslint/node_modules/esrecurse/package.json
+++ b/tools/eslint/node_modules/esrecurse/package.json
@@ -16,7 +16,6 @@
"_from": "esrecurse@>=4.1.0 <5.0.0",
"_id": "esrecurse@4.1.0",
"_inCache": true,
- "_installable": true,
"_location": "/esrecurse",
"_nodeVersion": "0.12.9",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/estraverse/package.json b/tools/eslint/node_modules/estraverse/package.json
index 111099c6fa..90a19ffb28 100644
--- a/tools/eslint/node_modules/estraverse/package.json
+++ b/tools/eslint/node_modules/estraverse/package.json
@@ -16,7 +16,6 @@
"_from": "estraverse@>=4.2.0 <5.0.0",
"_id": "estraverse@4.2.0",
"_inCache": true,
- "_installable": true,
"_location": "/estraverse",
"_nodeVersion": "0.12.9",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/esutils/package.json b/tools/eslint/node_modules/esutils/package.json
index ee940c57f2..ace6e17299 100644
--- a/tools/eslint/node_modules/esutils/package.json
+++ b/tools/eslint/node_modules/esutils/package.json
@@ -16,7 +16,6 @@
"_from": "esutils@>=2.0.2 <3.0.0",
"_id": "esutils@2.0.2",
"_inCache": true,
- "_installable": true,
"_location": "/esutils",
"_nodeVersion": "0.12.0",
"_npmUser": {
diff --git a/tools/eslint/node_modules/event-emitter/package.json b/tools/eslint/node_modules/event-emitter/package.json
index 8a376cc3d6..6930beb12e 100644
--- a/tools/eslint/node_modules/event-emitter/package.json
+++ b/tools/eslint/node_modules/event-emitter/package.json
@@ -16,7 +16,6 @@
"_from": "event-emitter@>=0.3.4 <0.4.0",
"_id": "event-emitter@0.3.4",
"_inCache": true,
- "_installable": true,
"_location": "/event-emitter",
"_nodeVersion": "4.1.1",
"_npmUser": {
diff --git a/tools/eslint/node_modules/exit-hook/package.json b/tools/eslint/node_modules/exit-hook/package.json
index 7e9d38bf18..50c5b3e2dd 100644
--- a/tools/eslint/node_modules/exit-hook/package.json
+++ b/tools/eslint/node_modules/exit-hook/package.json
@@ -16,7 +16,6 @@
"_from": "exit-hook@>=1.0.0 <2.0.0",
"_id": "exit-hook@1.1.1",
"_inCache": true,
- "_installable": true,
"_location": "/exit-hook",
"_npmUser": {
"name": "sindresorhus",
diff --git a/tools/eslint/node_modules/fast-levenshtein/README.md b/tools/eslint/node_modules/fast-levenshtein/README.md
index 2a917a7318..a778995396 100644
--- a/tools/eslint/node_modules/fast-levenshtein/README.md
+++ b/tools/eslint/node_modules/fast-levenshtein/README.md
@@ -1,15 +1,17 @@
# fast-levenshtein - Levenshtein algorithm in Javascript
[![Build Status](https://secure.travis-ci.org/hiddentao/fast-levenshtein.png)](http://travis-ci.org/hiddentao/fast-levenshtein)
+[![NPM module](https://badge.fury.io/js/fast-levenshtein.png)](https://badge.fury.io/js/fast-levenshtein)
+[![NPM downloads](https://img.shields.io/npm/dm/fast-levenshtein.svg?maxAge=2592000)](https://www.npmjs.com/package/fast-levenshtein)
+[![Follow on Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/hiddentao)
-An efficient Javascript implementation of the [Levenshtein algorithm](http://en.wikipedia.org/wiki/Levenshtein_distance) with asynchronous callback support.
+An efficient Javascript implementation of the [Levenshtein algorithm](http://en.wikipedia.org/wiki/Levenshtein_distance) with locale-specific collator support.
## Features
* Works in node.js and in the browser.
* Better performance than other implementations by not needing to store the whole matrix ([more info](http://www.codeproject.com/Articles/13525/Fast-memory-efficient-Levenshtein-algorithm)).
-* Provides synchronous and asynchronous versions of the algorithm.
-* Asynchronous version is almost as fast as the synchronous version for small strings and can also provide progress updates.
+* Locale-sensitive string comparisions if needed.
* Comprehensive test suite and performance benchmark.
* Small: <1 KB minified and gzipped
@@ -35,7 +37,7 @@ If you are not using any module loader system then the API will then be accessib
## Examples
-**Synchronous**
+**Default usage**
```javascript
var levenshtein = require('fast-levenshtein');
@@ -44,32 +46,15 @@ var distance = levenshtein.get('back', 'book'); // 2
var distance = levenshtein.get('我愛你', '我叫你'); // 1
```
-**Asynchronous**
+**Locale-sensitive string comparisons**
-```javascript
-var levenshtein = require('fast-levenshtein');
-
-levenshtein.getAsync('back', 'book', function (err, distance) {
- // err is null unless an error was thrown
- // distance equals 2
-});
-```
-
-**Asynchronous with progress updates**
+It supports using [Intl.Collator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator) for locale-sensitive string comparisons:
```javascript
var levenshtein = require('fast-levenshtein');
-var hugeText1 = fs.readFileSync(...);
-var hugeText2 = fs.readFileSync(...);
-
-levenshtein.getAsync(hugeText1, hugeText2, function (err, distance) {
- // process the results as normal
-}, {
- progress: function(percentComplete) {
- console.log(percentComplete + ' % completed so far...');
- }
-);
+levenshtein.get('mikailovitch', 'Mikhaïlovitch', { useCollator: true});
+// 1
```
## Building and Testing
@@ -103,7 +88,6 @@ Fastest test is fast-levenshtein at 4.2x faster than levenshtein-component
You can run this benchmark yourself by doing:
```bash
-$ npm install -g grunt-cli
$ npm install
$ npm run build
$ npm run benchmark
diff --git a/tools/eslint/node_modules/fast-levenshtein/levenshtein.js b/tools/eslint/node_modules/fast-levenshtein/levenshtein.js
index 3051ec5894..404a31558d 100644
--- a/tools/eslint/node_modules/fast-levenshtein/levenshtein.js
+++ b/tools/eslint/node_modules/fast-levenshtein/levenshtein.js
@@ -1,39 +1,16 @@
(function() {
'use strict';
-
- /**
- * Extend an Object with another Object's properties.
- *
- * The source objects are specified as additional arguments.
- *
- * @param dst Object the object to extend.
- *
- * @return Object the final object.
- */
- var _extend = function(dst) {
- var sources = Array.prototype.slice.call(arguments, 1);
- for (var i=0; i<sources.length; ++i) {
- var src = sources[i];
- for (var p in src) {
- if (src.hasOwnProperty(p)) dst[p] = src[p];
- }
- }
- return dst;
- };
-
-
- /**
- * Defer execution of given function.
- * @param {Function} func
- */
- var _defer = function(func) {
- if (typeof setImmediate === 'function') {
- return setImmediate(func);
- } else {
- return setTimeout(func, 0);
- }
- };
-
+
+ var collator;
+ try {
+ collator = (typeof Intl !== "undefined" && typeof Intl.Collator !== "undefined") ? Intl.Collator("generic", { sensitivity: "base" }) : null;
+ } catch (err){
+ console.log("Collator could not be initialized and wouldn't be used");
+ }
+ // arrays to re-use
+ var prevRow = [],
+ str2Char = [];
+
/**
* Based on the algorithm at http://en.wikipedia.org/wiki/Levenshtein_distance.
*/
@@ -43,32 +20,42 @@
*
* @param str1 String the first string.
* @param str2 String the second string.
+ * @param [options] Additional options.
+ * @param [options.useCollator] Use `Intl.Collator` for locale-sensitive string comparison.
* @return Integer the levenshtein distance (0 and above).
*/
- get: function(str1, str2) {
+ get: function(str1, str2, options) {
+ var useCollator = (options && collator && options.useCollator);
+
+ var str1Len = str1.length,
+ str2Len = str2.length;
+
// base cases
- if (str1 === str2) return 0;
- if (str1.length === 0) return str2.length;
- if (str2.length === 0) return str1.length;
+ if (str1Len === 0) return str2Len;
+ if (str2Len === 0) return str1Len;
// two rows
- var prevRow = new Array(str2.length + 1),
- curCol, nextCol, i, j, tmp;
+ var curCol, nextCol, i, j, tmp;
// initialise previous row
- for (i=0; i<prevRow.length; ++i) {
+ for (i=0; i<str2Len; ++i) {
prevRow[i] = i;
+ str2Char[i] = str2.charCodeAt(i);
}
+ prevRow[str2Len] = str2Len;
// calculate current row distance from previous row
- for (i=0; i<str1.length; ++i) {
+ for (i=0; i<str1Len; ++i) {
nextCol = i + 1;
-
- for (j=0; j<str2.length; ++j) {
+
+ for (j=0; j<str2Len; ++j) {
curCol = nextCol;
// substution
- nextCol = prevRow[j] + ( (str1.charAt(i) === str2.charAt(j)) ? 0 : 1 );
+ var strCmp = useCollator ? (0 === collator.compare(str1.charAt(i), String.fromCharCode(str2Char[j]))) : str1.charCodeAt(i) === str2Char[j];
+
+ nextCol = prevRow[j] + ( strCmp ? 0 : 1 );
+
// insertion
tmp = curCol + 1;
if (nextCol > tmp) {
@@ -89,102 +76,6 @@
}
return nextCol;
- },
-
- /**
- * Asynchronously calculate levenshtein distance of the two strings.
- *
- * @param str1 String the first string.
- * @param str2 String the second string.
- * @param cb Function callback function with signature: function(Error err, int distance)
- * @param [options] Object additional options.
- * @param [options.progress] Function progress callback with signature: function(percentComplete)
- */
- getAsync: function(str1, str2, cb, options) {
- options = _extend({}, {
- progress: null
- }, options);
-
- // base cases
- if (str1 === str2) return cb(null, 0);
- if (str1.length === 0) return cb(null, str2.length);
- if (str2.length === 0) return cb(null, str1.length);
-
- // two rows
- var prevRow = new Array(str2.length + 1),
- curCol, nextCol,
- i, j, tmp,
- startTime, currentTime;
-
- // initialise previous row
- for (i=0; i<prevRow.length; ++i) {
- prevRow[i] = i;
- }
-
- nextCol = 1;
- i = 0;
- j = -1;
-
- var __calculate = function() {
- // reset timer
- startTime = new Date().valueOf();
- currentTime = startTime;
-
- // keep going until one second has elapsed
- while (currentTime - startTime < 1000) {
- // reached end of current row?
- if (str2.length <= (++j)) {
- // copy current into previous (in preparation for next iteration)
- prevRow[j] = nextCol;
-
- // if already done all chars
- if (str1.length <= (++i)) {
- return cb(null, nextCol);
- }
- // else if we have more left to do
- else {
- nextCol = i + 1;
- j = 0;
- }
- }
-
- // calculation
- curCol = nextCol;
-
- // substution
- nextCol = prevRow[j] + ( (str1.charAt(i) === str2.charAt(j)) ? 0 : 1 );
- // insertion
- tmp = curCol + 1;
- if (nextCol > tmp) {
- nextCol = tmp;
- }
- // deletion
- tmp = prevRow[j + 1] + 1;
- if (nextCol > tmp) {
- nextCol = tmp;
- }
-
- // copy current into previous (in preparation for next iteration)
- prevRow[j] = curCol;
-
- // get current time
- currentTime = new Date().valueOf();
- }
-
- // send a progress update?
- if (null !== options.progress) {
- try {
- options.progress.call(null, (i * 100.0/ str1.length));
- } catch (err) {
- return cb('Progress callback: ' + err.toString());
- }
- }
-
- // next iteration
- _defer(__calculate);
- };
-
- __calculate();
}
};
diff --git a/tools/eslint/node_modules/fast-levenshtein/package.json b/tools/eslint/node_modules/fast-levenshtein/package.json
index 17508b9272..b92de2e36f 100644
--- a/tools/eslint/node_modules/fast-levenshtein/package.json
+++ b/tools/eslint/node_modules/fast-levenshtein/package.json
@@ -2,26 +2,25 @@
"_args": [
[
{
- "raw": "fast-levenshtein@^1.1.0",
+ "raw": "fast-levenshtein@~2.0.4",
"scope": null,
"escapedName": "fast-levenshtein",
"name": "fast-levenshtein",
- "rawSpec": "^1.1.0",
- "spec": ">=1.1.0 <2.0.0",
+ "rawSpec": "~2.0.4",
+ "spec": ">=2.0.4 <2.1.0",
"type": "range"
},
"/Users/trott/io.js/tools/node_modules/optionator"
]
],
- "_from": "fast-levenshtein@>=1.1.0 <2.0.0",
- "_id": "fast-levenshtein@1.1.4",
+ "_from": "fast-levenshtein@>=2.0.4 <2.1.0",
+ "_id": "fast-levenshtein@2.0.5",
"_inCache": true,
- "_installable": true,
"_location": "/fast-levenshtein",
"_nodeVersion": "4.4.5",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/fast-levenshtein-1.1.4.tgz_1469168840025_0.9637497058138251"
+ "tmp": "tmp/fast-levenshtein-2.0.5.tgz_1475102215149_0.23410583310760558"
},
"_npmUser": {
"name": "hiddentao",
@@ -30,21 +29,21 @@
"_npmVersion": "3.9.3",
"_phantomChildren": {},
"_requested": {
- "raw": "fast-levenshtein@^1.1.0",
+ "raw": "fast-levenshtein@~2.0.4",
"scope": null,
"escapedName": "fast-levenshtein",
"name": "fast-levenshtein",
- "rawSpec": "^1.1.0",
- "spec": ">=1.1.0 <2.0.0",
+ "rawSpec": "~2.0.4",
+ "spec": ">=2.0.4 <2.1.0",
"type": "range"
},
"_requiredBy": [
"/optionator"
],
- "_resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz",
- "_shasum": "e6a754cc8f15e58987aa9cbd27af66fd6f4e5af9",
+ "_resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz",
+ "_shasum": "bd33145744519ab1c36c3ee9f31f08e9079b67f2",
"_shrinkwrap": null,
- "_spec": "fast-levenshtein@^1.1.0",
+ "_spec": "fast-levenshtein@~2.0.4",
"_where": "/Users/trott/io.js/tools/node_modules/optionator",
"author": {
"name": "Ramesh Nair",
@@ -55,11 +54,12 @@
"url": "https://github.com/hiddentao/fast-levenshtein/issues"
},
"dependencies": {},
- "description": "Efficient implementation of Levenshtein algorithm with asynchronous callback support",
+ "description": "Efficient implementation of Levenshtein algorithm with locale-specific collator support.",
"devDependencies": {
"chai": "~1.5.0",
"grunt": "~0.4.1",
"grunt-benchmark": "~0.2.0",
+ "grunt-cli": "^1.2.0",
"grunt-contrib-jshint": "~0.4.3",
"grunt-contrib-uglify": "~0.2.0",
"grunt-mocha-test": "~0.2.2",
@@ -70,13 +70,13 @@
},
"directories": {},
"dist": {
- "shasum": "e6a754cc8f15e58987aa9cbd27af66fd6f4e5af9",
- "tarball": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz"
+ "shasum": "bd33145744519ab1c36c3ee9f31f08e9079b67f2",
+ "tarball": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz"
},
"files": [
"levenshtein.js"
],
- "gitHead": "80874a9c0cd8d9f5aee9d73aa39d9ab0a9d51435",
+ "gitHead": "7c41122f8725a63587ec34bb19b12dd91f12465f",
"homepage": "https://github.com/hiddentao/fast-levenshtein#readme",
"keywords": [
"levenshtein",
@@ -101,7 +101,8 @@
"scripts": {
"benchmark": "grunt benchmark",
"build": "grunt build",
+ "prepublish": "npm run build",
"test": "mocha"
},
- "version": "1.1.4"
+ "version": "2.0.5"
}
diff --git a/tools/eslint/node_modules/figures/package.json b/tools/eslint/node_modules/figures/package.json
index c36d27c079..b821a6e47c 100644
--- a/tools/eslint/node_modules/figures/package.json
+++ b/tools/eslint/node_modules/figures/package.json
@@ -16,7 +16,6 @@
"_from": "figures@>=1.3.5 <2.0.0",
"_id": "figures@1.7.0",
"_inCache": true,
- "_installable": true,
"_location": "/figures",
"_nodeVersion": "4.4.2",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/file-entry-cache/package.json b/tools/eslint/node_modules/file-entry-cache/package.json
index aa6f30003e..0cad154e1f 100644
--- a/tools/eslint/node_modules/file-entry-cache/package.json
+++ b/tools/eslint/node_modules/file-entry-cache/package.json
@@ -16,7 +16,6 @@
"_from": "file-entry-cache@>=2.0.0 <3.0.0",
"_id": "file-entry-cache@2.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/file-entry-cache",
"_nodeVersion": "6.3.0",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/flat-cache/package.json b/tools/eslint/node_modules/flat-cache/package.json
index 3c46762ece..1fb31fe940 100644
--- a/tools/eslint/node_modules/flat-cache/package.json
+++ b/tools/eslint/node_modules/flat-cache/package.json
@@ -16,7 +16,6 @@
"_from": "flat-cache@>=1.2.1 <2.0.0",
"_id": "flat-cache@1.2.1",
"_inCache": true,
- "_installable": true,
"_location": "/flat-cache",
"_nodeVersion": "6.3.0",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/fs.realpath/package.json b/tools/eslint/node_modules/fs.realpath/package.json
index 8a4f8d51d0..c570fcd679 100644
--- a/tools/eslint/node_modules/fs.realpath/package.json
+++ b/tools/eslint/node_modules/fs.realpath/package.json
@@ -16,7 +16,6 @@
"_from": "fs.realpath@>=1.0.0 <2.0.0",
"_id": "fs.realpath@1.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/fs.realpath",
"_nodeVersion": "4.4.4",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/generate-function/package.json b/tools/eslint/node_modules/generate-function/package.json
index 4b0a3ab010..912dc63bf5 100644
--- a/tools/eslint/node_modules/generate-function/package.json
+++ b/tools/eslint/node_modules/generate-function/package.json
@@ -16,7 +16,6 @@
"_from": "generate-function@>=2.0.0 <3.0.0",
"_id": "generate-function@2.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/generate-function",
"_npmUser": {
"name": "mafintosh",
diff --git a/tools/eslint/node_modules/generate-object-property/package.json b/tools/eslint/node_modules/generate-object-property/package.json
index 8d60083c4c..5cea5c6a07 100644
--- a/tools/eslint/node_modules/generate-object-property/package.json
+++ b/tools/eslint/node_modules/generate-object-property/package.json
@@ -16,7 +16,6 @@
"_from": "generate-object-property@>=1.1.0 <2.0.0",
"_id": "generate-object-property@1.2.0",
"_inCache": true,
- "_installable": true,
"_location": "/generate-object-property",
"_nodeVersion": "2.0.1",
"_npmUser": {
diff --git a/tools/eslint/node_modules/glob/README.md b/tools/eslint/node_modules/glob/README.md
index 9dd9384fa1..baa1d1ba86 100644
--- a/tools/eslint/node_modules/glob/README.md
+++ b/tools/eslint/node_modules/glob/README.md
@@ -273,6 +273,9 @@ the filesystem.
In the case of a symlink that cannot be resolved, the full absolute
path to the matched entry is returned (though it will usually be a
broken symlink)
+* `absolute` Set to true to always receive absolute paths for matched
+ files. Unlike `realpath`, this also affects the values returned in
+ the `match` event.
## Comparisons to other fnmatch/glob implementations
diff --git a/tools/eslint/node_modules/glob/common.js b/tools/eslint/node_modules/glob/common.js
index 58dc41e663..66651bb3aa 100644
--- a/tools/eslint/node_modules/glob/common.js
+++ b/tools/eslint/node_modules/glob/common.js
@@ -80,6 +80,7 @@ function setopts (self, pattern, options) {
self.nocase = !!options.nocase
self.stat = !!options.stat
self.noprocess = !!options.noprocess
+ self.absolute = !!options.absolute
self.maxLength = options.maxLength || Infinity
self.cache = options.cache || Object.create(null)
@@ -102,7 +103,11 @@ function setopts (self, pattern, options) {
if (process.platform === "win32")
self.root = self.root.replace(/\\/g, "/")
- self.cwdAbs = makeAbs(self, self.cwd)
+ // TODO: is an absolute `cwd` supposed to be resolved against `root`?
+ // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')
+ self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)
+ if (process.platform === "win32")
+ self.cwdAbs = self.cwdAbs.replace(/\\/g, "/")
self.nomount = !!options.nomount
// disable comments and negation in Minimatch.
diff --git a/tools/eslint/node_modules/glob/glob.js b/tools/eslint/node_modules/glob/glob.js
index 9eca910bb0..bfdd7a11b8 100644
--- a/tools/eslint/node_modules/glob/glob.js
+++ b/tools/eslint/node_modules/glob/glob.js
@@ -457,9 +457,6 @@ Glob.prototype._emitMatch = function (index, e) {
if (this.aborted)
return
- if (this.matches[index][e])
- return
-
if (isIgnored(this, e))
return
@@ -468,7 +465,16 @@ Glob.prototype._emitMatch = function (index, e) {
return
}
- var abs = this._makeAbs(e)
+ var abs = isAbsolute(e) ? e : this._makeAbs(e)
+
+ if (this.mark)
+ e = this._mark(e)
+
+ if (this.absolute)
+ e = abs
+
+ if (this.matches[index][e])
+ return
if (this.nodir) {
var c = this.cache[abs]
@@ -476,9 +482,6 @@ Glob.prototype._emitMatch = function (index, e) {
return
}
- if (this.mark)
- e = this._mark(e)
-
this.matches[index][e] = true
var st = this.statCache[abs]
@@ -505,15 +508,15 @@ Glob.prototype._readdirInGlobStar = function (abs, cb) {
fs.lstat(abs, lstatcb)
function lstatcb_ (er, lstat) {
- if (er)
+ if (er && er.code === 'ENOENT')
return cb()
- var isSym = lstat.isSymbolicLink()
+ var isSym = lstat && lstat.isSymbolicLink()
self.symlinks[abs] = isSym
// If it's not a symlink or a dir, then it's definitely a regular file.
// don't bother doing a readdir in that case.
- if (!isSym && !lstat.isDirectory()) {
+ if (!isSym && lstat && !lstat.isDirectory()) {
self.cache[abs] = 'FILE'
cb()
} else
@@ -766,7 +769,7 @@ Glob.prototype._stat = function (f, cb) {
}
Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
- if (er) {
+ if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
this.statCache[abs] = false
return cb()
}
@@ -774,13 +777,15 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
var needDir = f.slice(-1) === '/'
this.statCache[abs] = stat
- if (abs.slice(-1) === '/' && !stat.isDirectory())
+ if (abs.slice(-1) === '/' && stat && !stat.isDirectory())
return cb(null, false, stat)
- var c = stat.isDirectory() ? 'DIR' : 'FILE'
+ var c = true
+ if (stat)
+ c = stat.isDirectory() ? 'DIR' : 'FILE'
this.cache[abs] = this.cache[abs] || c
- if (needDir && c !== 'DIR')
+ if (needDir && c === 'FILE')
return cb()
return cb(null, c, stat)
diff --git a/tools/eslint/node_modules/glob/package.json b/tools/eslint/node_modules/glob/package.json
index 761e829355..343a8ef715 100644
--- a/tools/eslint/node_modules/glob/package.json
+++ b/tools/eslint/node_modules/glob/package.json
@@ -14,14 +14,13 @@
]
],
"_from": "glob@>=7.0.3 <8.0.0",
- "_id": "glob@7.0.6",
+ "_id": "glob@7.1.1",
"_inCache": true,
- "_installable": true,
"_location": "/glob",
- "_nodeVersion": "4.5.0",
+ "_nodeVersion": "6.5.0",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/glob-7.0.6.tgz_1472074762911_0.47247025789693"
+ "tmp": "tmp/glob-7.1.1.tgz_1475876991562_0.924720095237717"
},
"_npmUser": {
"name": "isaacs",
@@ -43,8 +42,8 @@
"/globby",
"/rimraf"
],
- "_resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz",
- "_shasum": "211bafaf49e525b8cd93260d14ab136152b3f57a",
+ "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz",
+ "_shasum": "805211df04faaf1c63a3600306cdf5ade50b2ec8",
"_shrinkwrap": null,
"_spec": "glob@^7.0.3",
"_where": "/Users/trott/io.js/tools/node_modules/eslint",
@@ -68,13 +67,13 @@
"devDependencies": {
"mkdirp": "0",
"rimraf": "^2.2.8",
- "tap": "^5.7.0",
+ "tap": "^7.1.2",
"tick": "0.0.6"
},
"directories": {},
"dist": {
- "shasum": "211bafaf49e525b8cd93260d14ab136152b3f57a",
- "tarball": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz"
+ "shasum": "805211df04faaf1c63a3600306cdf5ade50b2ec8",
+ "tarball": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz"
},
"engines": {
"node": "*"
@@ -84,7 +83,7 @@
"sync.js",
"common.js"
],
- "gitHead": "98327d8def195b1ba200217952df8ea829426038",
+ "gitHead": "bc8d43b736a98a9e289fdfceee9266cff35e5742",
"homepage": "https://github.com/isaacs/node-glob#readme",
"license": "ISC",
"main": "glob.js",
@@ -110,5 +109,5 @@
"test": "tap test/*.js --cov",
"test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js"
},
- "version": "7.0.6"
+ "version": "7.1.1"
}
diff --git a/tools/eslint/node_modules/glob/sync.js b/tools/eslint/node_modules/glob/sync.js
index bba2dc6a0c..c952134baa 100644
--- a/tools/eslint/node_modules/glob/sync.js
+++ b/tools/eslint/node_modules/glob/sync.js
@@ -16,6 +16,7 @@ var alphasorti = common.alphasorti
var setopts = common.setopts
var ownProp = common.ownProp
var childrenIgnored = common.childrenIgnored
+var isIgnored = common.isIgnored
function globSync (pattern, options) {
if (typeof options === 'function' || arguments.length === 3)
@@ -187,7 +188,7 @@ GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index,
if (e.charAt(0) === '/' && !this.nomount) {
e = path.join(this.root, e)
}
- this.matches[index][e] = true
+ this._emitMatch(index, e)
}
// This was the last one, and no stats were needed
return
@@ -209,20 +210,29 @@ GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index,
GlobSync.prototype._emitMatch = function (index, e) {
+ if (isIgnored(this, e))
+ return
+
var abs = this._makeAbs(e)
+
if (this.mark)
e = this._mark(e)
+ if (this.absolute) {
+ e = abs
+ }
+
if (this.matches[index][e])
return
if (this.nodir) {
- var c = this.cache[this._makeAbs(e)]
+ var c = this.cache[abs]
if (c === 'DIR' || Array.isArray(c))
return
}
this.matches[index][e] = true
+
if (this.stat)
this._stat(e)
}
@@ -240,16 +250,18 @@ GlobSync.prototype._readdirInGlobStar = function (abs) {
try {
lstat = fs.lstatSync(abs)
} catch (er) {
- // lstat failed, doesn't exist
- return null
+ if (er.code === 'ENOENT') {
+ // lstat failed, doesn't exist
+ return null
+ }
}
- var isSym = lstat.isSymbolicLink()
+ var isSym = lstat && lstat.isSymbolicLink()
this.symlinks[abs] = isSym
// If it's not a symlink or a dir, then it's definitely a regular file.
// don't bother doing a readdir in that case.
- if (!isSym && !lstat.isDirectory())
+ if (!isSym && lstat && !lstat.isDirectory())
this.cache[abs] = 'FILE'
else
entries = this._readdir(abs, false)
@@ -399,7 +411,7 @@ GlobSync.prototype._processSimple = function (prefix, index) {
prefix = prefix.replace(/\\/g, '/')
// Mark this as a match
- this.matches[index][prefix] = true
+ this._emitMatch(index, prefix)
}
// Returns either 'DIR', 'FILE', or false
@@ -434,10 +446,13 @@ GlobSync.prototype._stat = function (f) {
try {
lstat = fs.lstatSync(abs)
} catch (er) {
- return false
+ if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
+ this.statCache[abs] = false
+ return false
+ }
}
- if (lstat.isSymbolicLink()) {
+ if (lstat && lstat.isSymbolicLink()) {
try {
stat = fs.statSync(abs)
} catch (er) {
@@ -450,10 +465,13 @@ GlobSync.prototype._stat = function (f) {
this.statCache[abs] = stat
- var c = stat.isDirectory() ? 'DIR' : 'FILE'
+ var c = true
+ if (stat)
+ c = stat.isDirectory() ? 'DIR' : 'FILE'
+
this.cache[abs] = this.cache[abs] || c
- if (needDir && c !== 'DIR')
+ if (needDir && c === 'FILE')
return false
return c
diff --git a/tools/eslint/node_modules/globals/globals.json b/tools/eslint/node_modules/globals/globals.json
index ad73ae698a..9a25ed0b88 100644
--- a/tools/eslint/node_modules/globals/globals.json
+++ b/tools/eslint/node_modules/globals/globals.json
@@ -510,6 +510,7 @@
"removeEventListener": false,
"Request": false,
"requestAnimationFrame": false,
+ "requestIdleCallback": false,
"resizeBy": false,
"resizeTo": false,
"Response": false,
@@ -882,6 +883,7 @@
"describe": false,
"it": false,
"mocha": false,
+ "run": false,
"setup": false,
"specify": false,
"suite": false,
@@ -915,7 +917,9 @@
"xit": false
},
"jest": {
+ "afterAll": false,
"afterEach": false,
+ "beforeAll": false,
"beforeEach": false,
"check": false,
"describe": false,
@@ -928,7 +932,8 @@
"require": false,
"test": false,
"xdescribe": false,
- "xit": false
+ "xit": false,
+ "xtest": false
},
"qunit": {
"asyncTest": false,
@@ -1059,9 +1064,11 @@
"pwd": false,
"rm": false,
"sed": false,
+ "set": false,
"target": false,
"tempdir": false,
"test": false,
+ "touch": false,
"which": false
},
"prototypejs": {
diff --git a/tools/eslint/node_modules/globals/package.json b/tools/eslint/node_modules/globals/package.json
index 8c2c63260b..5a34d069c5 100644
--- a/tools/eslint/node_modules/globals/package.json
+++ b/tools/eslint/node_modules/globals/package.json
@@ -14,20 +14,19 @@
]
],
"_from": "globals@>=9.2.0 <10.0.0",
- "_id": "globals@9.9.0",
+ "_id": "globals@9.12.0",
"_inCache": true,
- "_installable": true,
"_location": "/globals",
- "_nodeVersion": "4.4.5",
+ "_nodeVersion": "4.6.0",
"_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/globals-9.9.0.tgz_1467581255981_0.6368429779540747"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/globals-9.12.0.tgz_1476075908170_0.06293708248995245"
},
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
- "_npmVersion": "2.15.5",
+ "_npmVersion": "2.15.9",
"_phantomChildren": {},
"_requested": {
"raw": "globals@^9.2.0",
@@ -41,8 +40,8 @@
"_requiredBy": [
"/eslint"
],
- "_resolved": "https://registry.npmjs.org/globals/-/globals-9.9.0.tgz",
- "_shasum": "4c5ffc359fb21edc83fedb87b1c0b414dc24d552",
+ "_resolved": "https://registry.npmjs.org/globals/-/globals-9.12.0.tgz",
+ "_shasum": "992ce90828c3a55fa8f16fada177adb64664cf9d",
"_shrinkwrap": null,
"_spec": "globals@^9.2.0",
"_where": "/Users/trott/io.js/tools/node_modules/eslint",
@@ -61,8 +60,8 @@
},
"directories": {},
"dist": {
- "shasum": "4c5ffc359fb21edc83fedb87b1c0b414dc24d552",
- "tarball": "https://registry.npmjs.org/globals/-/globals-9.9.0.tgz"
+ "shasum": "992ce90828c3a55fa8f16fada177adb64664cf9d",
+ "tarball": "https://registry.npmjs.org/globals/-/globals-9.12.0.tgz"
},
"engines": {
"node": ">=0.10.0"
@@ -71,7 +70,7 @@
"index.js",
"globals.json"
],
- "gitHead": "367f1f26434aee2c26387003cadbd95131a3fc3b",
+ "gitHead": "282ae63d59b6fae64a5d0965e03cce9c6263de55",
"homepage": "https://github.com/sindresorhus/globals#readme",
"keywords": [
"globals",
@@ -112,5 +111,5 @@
"scripts": {
"test": "mocha"
},
- "version": "9.9.0"
+ "version": "9.12.0"
}
diff --git a/tools/eslint/node_modules/globby/package.json b/tools/eslint/node_modules/globby/package.json
index f79cc15fa2..ebb39df2a8 100644
--- a/tools/eslint/node_modules/globby/package.json
+++ b/tools/eslint/node_modules/globby/package.json
@@ -16,7 +16,6 @@
"_from": "globby@>=5.0.0 <6.0.0",
"_id": "globby@5.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/globby",
"_nodeVersion": "5.11.0",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/graceful-fs/graceful-fs.js b/tools/eslint/node_modules/graceful-fs/graceful-fs.js
index 9bf803e686..33b30d2e98 100644
--- a/tools/eslint/node_modules/graceful-fs/graceful-fs.js
+++ b/tools/eslint/node_modules/graceful-fs/graceful-fs.js
@@ -127,25 +127,34 @@ function patch (fs) {
var fs$readdir = fs.readdir
fs.readdir = readdir
- function readdir (path, cb) {
- return go$readdir(path, cb)
+ function readdir (path, options, cb) {
+ var args = [path]
+ if (typeof options !== 'function') {
+ args.push(options)
+ } else {
+ cb = options
+ }
+ args.push(go$readdir$cb)
- function go$readdir () {
- return fs$readdir(path, function (err, files) {
- if (files && files.sort)
- files.sort(); // Backwards compatibility with graceful-fs.
+ return go$readdir(args)
- if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
- enqueue([go$readdir, [path, cb]])
- else {
- if (typeof cb === 'function')
- cb.apply(this, arguments)
- retry()
- }
- })
+ function go$readdir$cb (err, files) {
+ if (files && files.sort)
+ files.sort()
+
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$readdir, [args]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
}
}
+ function go$readdir (args) {
+ return fs$readdir.apply(fs, args)
+ }
if (process.version.substr(0, 4) === 'v0.8') {
var legStreams = legacy(fs)
diff --git a/tools/eslint/node_modules/graceful-fs/package.json b/tools/eslint/node_modules/graceful-fs/package.json
index 6e4bc3283b..d611a8270d 100644
--- a/tools/eslint/node_modules/graceful-fs/package.json
+++ b/tools/eslint/node_modules/graceful-fs/package.json
@@ -14,14 +14,13 @@
]
],
"_from": "graceful-fs@>=4.1.2 <5.0.0",
- "_id": "graceful-fs@4.1.6",
+ "_id": "graceful-fs@4.1.9",
"_inCache": true,
- "_installable": true,
"_location": "/graceful-fs",
- "_nodeVersion": "4.4.4",
+ "_nodeVersion": "6.5.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/graceful-fs-4.1.6.tgz_1471616320359_0.39477095939219"
+ "tmp": "tmp/graceful-fs-4.1.9.tgz_1475103672016_0.7011275647673756"
},
"_npmUser": {
"name": "isaacs",
@@ -41,8 +40,8 @@
"_requiredBy": [
"/flat-cache"
],
- "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz",
- "_shasum": "514c38772b31bee2e08bedc21a0aeb3abf54c19e",
+ "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.9.tgz",
+ "_shasum": "baacba37d19d11f9d146d3578bc99958c3787e29",
"_shrinkwrap": null,
"_spec": "graceful-fs@^4.1.2",
"_where": "/Users/trott/io.js/tools/node_modules/flat-cache",
@@ -60,8 +59,8 @@
"test": "test"
},
"dist": {
- "shasum": "514c38772b31bee2e08bedc21a0aeb3abf54c19e",
- "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz"
+ "shasum": "baacba37d19d11f9d146d3578bc99958c3787e29",
+ "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.9.tgz"
},
"engines": {
"node": ">=0.4.0"
@@ -72,7 +71,7 @@
"legacy-streams.js",
"polyfills.js"
],
- "gitHead": "cfe3ba80e37af542f02e445c89aa59482aa32a63",
+ "gitHead": "0798db3711e33de92de5a93979278bb89d629143",
"homepage": "https://github.com/isaacs/node-graceful-fs#readme",
"keywords": [
"fs",
@@ -108,5 +107,5 @@
"scripts": {
"test": "node test.js | tap -"
},
- "version": "4.1.6"
+ "version": "4.1.9"
}
diff --git a/tools/eslint/node_modules/graceful-fs/polyfills.js b/tools/eslint/node_modules/graceful-fs/polyfills.js
index 2798050604..cf474df73f 100644
--- a/tools/eslint/node_modules/graceful-fs/polyfills.js
+++ b/tools/eslint/node_modules/graceful-fs/polyfills.js
@@ -56,6 +56,14 @@ function patch (fs) {
fs.fchmodSync = chmodFixSync(fs.fchmodSync)
fs.lchmodSync = chmodFixSync(fs.lchmodSync)
+ fs.stat = statFix(fs.stat)
+ fs.fstat = statFix(fs.fstat)
+ fs.lstat = statFix(fs.lstat)
+
+ fs.statSync = statFixSync(fs.statSync)
+ fs.fstatSync = statFixSync(fs.fstatSync)
+ fs.lstatSync = statFixSync(fs.lstatSync)
+
// if lchmod/lchown do not exist, then make them no-ops
if (!fs.lchmod) {
fs.lchmod = function (path, mode, cb) {
@@ -246,6 +254,33 @@ function chownFixSync (orig) {
}
}
+
+function statFix (orig) {
+ if (!orig) return orig
+ // Older versions of Node erroneously returned signed integers for
+ // uid + gid.
+ return function (target, cb) {
+ return orig.call(fs, target, function (er, stats) {
+ if (!stats) return cb.apply(this, arguments)
+ if (stats.uid < 0) stats.uid += 0x100000000
+ if (stats.gid < 0) stats.gid += 0x100000000
+ if (cb) cb.apply(this, arguments)
+ })
+ }
+}
+
+function statFixSync (orig) {
+ if (!orig) return orig
+ // Older versions of Node erroneously returned signed integers for
+ // uid + gid.
+ return function (target) {
+ var stats = orig.call(fs, target)
+ if (stats.uid < 0) stats.uid += 0x100000000
+ if (stats.gid < 0) stats.gid += 0x100000000
+ return stats;
+ }
+}
+
// ENOSYS means that the fs doesn't support the op. Just ignore
// that, because it doesn't matter.
//
diff --git a/tools/eslint/node_modules/has-ansi/package.json b/tools/eslint/node_modules/has-ansi/package.json
index 43cb7328ad..ea99179f80 100644
--- a/tools/eslint/node_modules/has-ansi/package.json
+++ b/tools/eslint/node_modules/has-ansi/package.json
@@ -16,7 +16,6 @@
"_from": "has-ansi@>=2.0.0 <3.0.0",
"_id": "has-ansi@2.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/has-ansi",
"_nodeVersion": "0.12.5",
"_npmUser": {
diff --git a/tools/eslint/node_modules/ignore/README.md b/tools/eslint/node_modules/ignore/README.md
index 96c70b60a5..9bc9268a26 100755
--- a/tools/eslint/node_modules/ignore/README.md
+++ b/tools/eslint/node_modules/ignore/README.md
@@ -23,13 +23,13 @@ Pay attention that [`minimatch`](https://www.npmjs.org/package/minimatch) does n
```js
const ignore = require('ignore')
-let ig = ignore().add(['.abc/*', '!.abc/d/'])
+const ig = ignore().add(['.abc/*', '!.abc/d/'])
```
### Filter the given paths
```js
-let paths = [
+const paths = [
'.abc/a.js', // filtered out
'.abc/d/e.js' // included
]
@@ -164,6 +164,16 @@ Creates a filter function which could filter an array of paths with `Array.proto
Returns `function(path)` the filter function.
+### .ignores(pathname)
+
+> new in 3.2.0
+
+Returns `Boolean` whether `pathname` should be ignored.
+
+```js
+ig.ignores('.abc/a.js') // true
+```
+
****
## Upgrade 2.x -> 3.x
diff --git a/tools/eslint/node_modules/ignore/ignore.js b/tools/eslint/node_modules/ignore/ignore.js
index c9e16fddb8..cddf60cb5c 100644
--- a/tools/eslint/node_modules/ignore/ignore.js
+++ b/tools/eslint/node_modules/ignore/ignore.js
@@ -104,6 +104,11 @@ var IgnoreBase = function () {
};
}
}, {
+ key: 'ignores',
+ value: function ignores(path) {
+ return !this._filter(path);
+ }
+ }, {
key: '_createRule',
value: function _createRule(pattern) {
var origin = pattern;
@@ -130,6 +135,9 @@ var IgnoreBase = function () {
regex: regex
};
}
+
+ // @returns `Boolean` true if the `path` is NOT ignored
+
}, {
key: '_filter',
value: function _filter(path, slices) {
diff --git a/tools/eslint/node_modules/ignore/package.json b/tools/eslint/node_modules/ignore/package.json
index 68745c23eb..a4a65b9656 100644
--- a/tools/eslint/node_modules/ignore/package.json
+++ b/tools/eslint/node_modules/ignore/package.json
@@ -14,14 +14,13 @@
]
],
"_from": "ignore@>=3.1.5 <4.0.0",
- "_id": "ignore@3.1.5",
+ "_id": "ignore@3.2.0",
"_inCache": true,
- "_installable": true,
"_location": "/ignore",
- "_nodeVersion": "6.3.0",
+ "_nodeVersion": "6.7.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/ignore-3.1.5.tgz_1471234764185_0.0016845394857227802"
+ "tmp": "tmp/ignore-3.2.0.tgz_1476173756695_0.2819231322500855"
},
"_npmUser": {
"name": "kael",
@@ -41,8 +40,8 @@
"_requiredBy": [
"/eslint"
],
- "_resolved": "https://registry.npmjs.org/ignore/-/ignore-3.1.5.tgz",
- "_shasum": "54ba1eb92ef9fff8d49e5a1fb23961cdba77eb7a",
+ "_resolved": "https://registry.npmjs.org/ignore/-/ignore-3.2.0.tgz",
+ "_shasum": "8d88f03c3002a0ac52114db25d2c673b0bf1e435",
"_shrinkwrap": null,
"_spec": "ignore@^3.1.5",
"_where": "/Users/trott/io.js/tools/node_modules/eslint",
@@ -60,14 +59,14 @@
},
"directories": {},
"dist": {
- "shasum": "54ba1eb92ef9fff8d49e5a1fb23961cdba77eb7a",
- "tarball": "https://registry.npmjs.org/ignore/-/ignore-3.1.5.tgz"
+ "shasum": "8d88f03c3002a0ac52114db25d2c673b0bf1e435",
+ "tarball": "https://registry.npmjs.org/ignore/-/ignore-3.2.0.tgz"
},
"files": [
"ignore.js",
"LICENSE-MIT"
],
- "gitHead": "316d0704f4ad631df14e1be5b993c64f4466b2c1",
+ "gitHead": "703d5b198812a6c9b2d6250c1a04aeb81d5e3949",
"homepage": "https://github.com/kaelzhang/node-ignore#readme",
"keywords": [
"ignore",
@@ -102,5 +101,5 @@
"scripts": {
"test": "mocha --reporter spec ./test/ignore.js"
},
- "version": "3.1.5"
+ "version": "3.2.0"
}
diff --git a/tools/eslint/node_modules/imurmurhash/package.json b/tools/eslint/node_modules/imurmurhash/package.json
index ff9909c180..729e78c5e0 100644
--- a/tools/eslint/node_modules/imurmurhash/package.json
+++ b/tools/eslint/node_modules/imurmurhash/package.json
@@ -16,7 +16,6 @@
"_from": "imurmurhash@>=0.1.4 <0.2.0",
"_id": "imurmurhash@0.1.4",
"_inCache": true,
- "_installable": true,
"_location": "/imurmurhash",
"_npmUser": {
"name": "jensyt",
diff --git a/tools/eslint/node_modules/inflight/inflight.js b/tools/eslint/node_modules/inflight/inflight.js
index 8bc96cbd37..48202b3ca4 100644
--- a/tools/eslint/node_modules/inflight/inflight.js
+++ b/tools/eslint/node_modules/inflight/inflight.js
@@ -19,18 +19,28 @@ function makeres (key) {
var cbs = reqs[key]
var len = cbs.length
var args = slice(arguments)
- for (var i = 0; i < len; i++) {
- cbs[i].apply(null, args)
- }
- if (cbs.length > len) {
- // added more in the interim.
- // de-zalgo, just in case, but don't call again.
- cbs.splice(0, len)
- process.nextTick(function () {
- RES.apply(null, args)
- })
- } else {
- delete reqs[key]
+
+ // XXX It's somewhat ambiguous whether a new callback added in this
+ // pass should be queued for later execution if something in the
+ // list of callbacks throws, or if it should just be discarded.
+ // However, it's such an edge case that it hardly matters, and either
+ // choice is likely as surprising as the other.
+ // As it happens, we do go ahead and schedule it for later execution.
+ try {
+ for (var i = 0; i < len; i++) {
+ cbs[i].apply(null, args)
+ }
+ } finally {
+ if (cbs.length > len) {
+ // added more in the interim.
+ // de-zalgo, just in case, but don't call again.
+ cbs.splice(0, len)
+ process.nextTick(function () {
+ RES.apply(null, args)
+ })
+ } else {
+ delete reqs[key]
+ }
}
})
}
diff --git a/tools/eslint/node_modules/inflight/package.json b/tools/eslint/node_modules/inflight/package.json
index cd270efffe..3fecb6edd9 100644
--- a/tools/eslint/node_modules/inflight/package.json
+++ b/tools/eslint/node_modules/inflight/package.json
@@ -14,20 +14,19 @@
]
],
"_from": "inflight@>=1.0.4 <2.0.0",
- "_id": "inflight@1.0.5",
+ "_id": "inflight@1.0.6",
"_inCache": true,
- "_installable": true,
"_location": "/inflight",
- "_nodeVersion": "5.10.1",
+ "_nodeVersion": "6.5.0",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/inflight-1.0.5.tgz_1463529611443_0.00041943578980863094"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/inflight-1.0.6.tgz_1476330807696_0.10388551792129874"
},
"_npmUser": {
- "name": "zkat",
- "email": "kat@sykosomatic.org"
+ "name": "isaacs",
+ "email": "i@izs.me"
},
- "_npmVersion": "3.9.1",
+ "_npmVersion": "3.10.7",
"_phantomChildren": {},
"_requested": {
"raw": "inflight@^1.0.4",
@@ -41,8 +40,8 @@
"_requiredBy": [
"/glob"
],
- "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz",
- "_shasum": "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a",
+ "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "_shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9",
"_shrinkwrap": null,
"_spec": "inflight@^1.0.4",
"_where": "/Users/trott/io.js/tools/node_modules/glob",
@@ -60,17 +59,17 @@
},
"description": "Add callbacks to requests in flight to avoid async duplication",
"devDependencies": {
- "tap": "^1.2.0"
+ "tap": "^7.1.2"
},
"directories": {},
"dist": {
- "shasum": "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a",
- "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz"
+ "shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9",
+ "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz"
},
"files": [
"inflight.js"
],
- "gitHead": "559e37b4f6327fca797fe8d7fe8ed6d9cae08821",
+ "gitHead": "a547881738c8f57b27795e584071d67cf6ac1a57",
"homepage": "https://github.com/isaacs/inflight",
"license": "ISC",
"main": "inflight.js",
@@ -100,7 +99,7 @@
"url": "git+https://github.com/npm/inflight.git"
},
"scripts": {
- "test": "tap test.js"
+ "test": "tap test.js --100"
},
- "version": "1.0.5"
+ "version": "1.0.6"
}
diff --git a/tools/eslint/node_modules/inherits/package.json b/tools/eslint/node_modules/inherits/package.json
index cef1e77ef1..37aff1aaf8 100644
--- a/tools/eslint/node_modules/inherits/package.json
+++ b/tools/eslint/node_modules/inherits/package.json
@@ -16,7 +16,6 @@
"_from": "inherits@>=2.0.1 <2.1.0",
"_id": "inherits@2.0.3",
"_inCache": true,
- "_installable": true,
"_location": "/inherits",
"_nodeVersion": "6.5.0",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/inquirer/package.json b/tools/eslint/node_modules/inquirer/package.json
index 8a8a134b11..47a55bea1d 100644
--- a/tools/eslint/node_modules/inquirer/package.json
+++ b/tools/eslint/node_modules/inquirer/package.json
@@ -16,7 +16,6 @@
"_from": "inquirer@>=0.12.0 <0.13.0",
"_id": "inquirer@0.12.0",
"_inCache": true,
- "_installable": true,
"_location": "/inquirer",
"_nodeVersion": "5.2.0",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/is-fullwidth-code-point/package.json b/tools/eslint/node_modules/is-fullwidth-code-point/package.json
index f179608ad0..be89d6b4e0 100644
--- a/tools/eslint/node_modules/is-fullwidth-code-point/package.json
+++ b/tools/eslint/node_modules/is-fullwidth-code-point/package.json
@@ -16,7 +16,6 @@
"_from": "is-fullwidth-code-point@>=1.0.0 <2.0.0",
"_id": "is-fullwidth-code-point@1.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/is-fullwidth-code-point",
"_nodeVersion": "0.12.5",
"_npmUser": {
diff --git a/tools/eslint/node_modules/is-my-json-valid/index.js b/tools/eslint/node_modules/is-my-json-valid/index.js
index f929bb7539..779cfe20bf 100644
--- a/tools/eslint/node_modules/is-my-json-valid/index.js
+++ b/tools/eslint/node_modules/is-my-json-valid/index.js
@@ -514,15 +514,23 @@ var compile = function(schema, cache, root, reporter, opts) {
}
if (node.minimum !== undefined) {
+ if (type !== 'number' && type !== 'integer') validate('if (%s) {', types.number(name))
+
validate('if (%s %s %d) {', name, node.exclusiveMinimum ? '<=' : '<', node.minimum)
error('is less than minimum')
validate('}')
+
+ if (type !== 'number' && type !== 'integer') validate('}')
}
if (node.maximum !== undefined) {
+ if (type !== 'number' && type !== 'integer') validate('if (%s) {', types.number(name))
+
validate('if (%s %s %d) {', name, node.exclusiveMaximum ? '>=' : '>', node.maximum)
error('is more than maximum')
validate('}')
+
+ if (type !== 'number' && type !== 'integer') validate('}')
}
if (properties) {
@@ -540,6 +548,8 @@ var compile = function(schema, cache, root, reporter, opts) {
var validate = genfun
('function validate(data) {')
+ // Since undefined is not a valid JSON value, we coerce to null and other checks will catch this
+ ('if (data === undefined) data = null')
('validate.errors = null')
('var errors = 0')
diff --git a/tools/eslint/node_modules/is-my-json-valid/package.json b/tools/eslint/node_modules/is-my-json-valid/package.json
index f71efcbd61..490003ef9e 100644
--- a/tools/eslint/node_modules/is-my-json-valid/package.json
+++ b/tools/eslint/node_modules/is-my-json-valid/package.json
@@ -14,20 +14,19 @@
]
],
"_from": "is-my-json-valid@>=2.10.0 <3.0.0",
- "_id": "is-my-json-valid@2.13.1",
+ "_id": "is-my-json-valid@2.15.0",
"_inCache": true,
- "_installable": true,
"_location": "/is-my-json-valid",
- "_nodeVersion": "4.2.3",
+ "_nodeVersion": "4.2.6",
"_npmOperationalInternal": {
- "host": "packages-5-east.internal.npmjs.com",
- "tmp": "tmp/is-my-json-valid-2.13.1.tgz_1456180270224_0.17748022079467773"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/is-my-json-valid-2.15.0.tgz_1475420473174_0.8758093405049294"
},
"_npmUser": {
"name": "mafintosh",
"email": "mathiasbuus@gmail.com"
},
- "_npmVersion": "2.14.7",
+ "_npmVersion": "2.14.12",
"_phantomChildren": {},
"_requested": {
"raw": "is-my-json-valid@^2.10.0",
@@ -41,8 +40,8 @@
"_requiredBy": [
"/eslint"
],
- "_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz",
- "_shasum": "d55778a82feb6b0963ff4be111d5d1684e890707",
+ "_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz",
+ "_shasum": "936edda3ca3c211fd98f3b2d3e08da43f7b2915b",
"_shrinkwrap": null,
"_spec": "is-my-json-valid@^2.10.0",
"_where": "/Users/trott/io.js/tools/node_modules/eslint",
@@ -55,7 +54,7 @@
"dependencies": {
"generate-function": "^2.0.0",
"generate-object-property": "^1.1.0",
- "jsonpointer": "2.0.0",
+ "jsonpointer": "^4.0.0",
"xtend": "^4.0.0"
},
"description": "A JSONSchema validator that uses code generation to be extremely fast",
@@ -64,10 +63,10 @@
},
"directories": {},
"dist": {
- "shasum": "d55778a82feb6b0963ff4be111d5d1684e890707",
- "tarball": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz"
+ "shasum": "936edda3ca3c211fd98f3b2d3e08da43f7b2915b",
+ "tarball": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz"
},
- "gitHead": "5bacc71441750bc6e79829abcfc21d4f2f0c4396",
+ "gitHead": "c4da71bf1e57083d2dac6e7d123d2e8bd6b9255e",
"homepage": "https://github.com/mafintosh/is-my-json-valid",
"keywords": [
"json",
@@ -79,6 +78,14 @@
"main": "index.js",
"maintainers": [
{
+ "name": "emilbay",
+ "email": "github@tixz.dk"
+ },
+ {
+ "name": "emilbayes",
+ "email": "github@tixz.dk"
+ },
+ {
"name": "freeall",
"email": "freeall@gmail.com"
},
@@ -105,5 +112,5 @@
"scripts": {
"test": "tape test/*.js"
},
- "version": "2.13.1"
+ "version": "2.15.0"
}
diff --git a/tools/eslint/node_modules/is-path-cwd/package.json b/tools/eslint/node_modules/is-path-cwd/package.json
index cc7a66652a..00cb057503 100644
--- a/tools/eslint/node_modules/is-path-cwd/package.json
+++ b/tools/eslint/node_modules/is-path-cwd/package.json
@@ -16,7 +16,6 @@
"_from": "is-path-cwd@>=1.0.0 <2.0.0",
"_id": "is-path-cwd@1.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/is-path-cwd",
"_npmUser": {
"name": "sindresorhus",
diff --git a/tools/eslint/node_modules/is-path-in-cwd/package.json b/tools/eslint/node_modules/is-path-in-cwd/package.json
index 6eb30a53ee..7bb97c1394 100644
--- a/tools/eslint/node_modules/is-path-in-cwd/package.json
+++ b/tools/eslint/node_modules/is-path-in-cwd/package.json
@@ -16,7 +16,6 @@
"_from": "is-path-in-cwd@>=1.0.0 <2.0.0",
"_id": "is-path-in-cwd@1.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/is-path-in-cwd",
"_npmUser": {
"name": "sindresorhus",
@@ -59,7 +58,7 @@
"directories": {},
"dist": {
"shasum": "6477582b8214d602346094567003be8a9eac04dc",
- "tarball": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz"
+ "tarball": "http://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz"
},
"engines": {
"node": ">=0.10.0"
diff --git a/tools/eslint/node_modules/is-path-inside/package.json b/tools/eslint/node_modules/is-path-inside/package.json
index 2972a7484c..dea177df29 100644
--- a/tools/eslint/node_modules/is-path-inside/package.json
+++ b/tools/eslint/node_modules/is-path-inside/package.json
@@ -16,7 +16,6 @@
"_from": "is-path-inside@>=1.0.0 <2.0.0",
"_id": "is-path-inside@1.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/is-path-inside",
"_npmUser": {
"name": "sindresorhus",
diff --git a/tools/eslint/node_modules/is-property/package.json b/tools/eslint/node_modules/is-property/package.json
index 9eff7147f8..b4dbd9bf51 100644
--- a/tools/eslint/node_modules/is-property/package.json
+++ b/tools/eslint/node_modules/is-property/package.json
@@ -16,7 +16,6 @@
"_from": "is-property@>=1.0.0 <2.0.0",
"_id": "is-property@1.0.2",
"_inCache": true,
- "_installable": true,
"_location": "/is-property",
"_nodeVersion": "0.10.26",
"_npmUser": {
diff --git a/tools/eslint/node_modules/is-resolvable/package.json b/tools/eslint/node_modules/is-resolvable/package.json
index ae3aeb7a0a..d722441b45 100644
--- a/tools/eslint/node_modules/is-resolvable/package.json
+++ b/tools/eslint/node_modules/is-resolvable/package.json
@@ -16,7 +16,6 @@
"_from": "is-resolvable@>=1.0.0 <2.0.0",
"_id": "is-resolvable@1.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/is-resolvable",
"_nodeVersion": "2.4.0",
"_npmUser": {
diff --git a/tools/eslint/node_modules/isarray/package.json b/tools/eslint/node_modules/isarray/package.json
index 470fd4d1b1..34d0c28885 100644
--- a/tools/eslint/node_modules/isarray/package.json
+++ b/tools/eslint/node_modules/isarray/package.json
@@ -16,7 +16,6 @@
"_from": "isarray@>=1.0.0 <1.1.0",
"_id": "isarray@1.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/isarray",
"_nodeVersion": "5.1.0",
"_npmUser": {
diff --git a/tools/eslint/node_modules/js-yaml/package.json b/tools/eslint/node_modules/js-yaml/package.json
index e42dae4523..911c06383b 100644
--- a/tools/eslint/node_modules/js-yaml/package.json
+++ b/tools/eslint/node_modules/js-yaml/package.json
@@ -16,7 +16,6 @@
"_from": "js-yaml@>=3.5.1 <4.0.0",
"_id": "js-yaml@3.6.1",
"_inCache": true,
- "_installable": true,
"_location": "/js-yaml",
"_nodeVersion": "4.4.3",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/json-stable-stringify/package.json b/tools/eslint/node_modules/json-stable-stringify/package.json
index a8b20a3639..40b34066c4 100644
--- a/tools/eslint/node_modules/json-stable-stringify/package.json
+++ b/tools/eslint/node_modules/json-stable-stringify/package.json
@@ -16,7 +16,6 @@
"_from": "json-stable-stringify@>=1.0.0 <2.0.0",
"_id": "json-stable-stringify@1.0.1",
"_inCache": true,
- "_installable": true,
"_location": "/json-stable-stringify",
"_nodeVersion": "4.2.1",
"_npmOperationalInternal": {
@@ -39,6 +38,7 @@
"type": "range"
},
"_requiredBy": [
+ "/ajv",
"/eslint"
],
"_resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
diff --git a/tools/eslint/node_modules/jsonify/package.json b/tools/eslint/node_modules/jsonify/package.json
index 3bf2f395ef..8e7821ff04 100644
--- a/tools/eslint/node_modules/jsonify/package.json
+++ b/tools/eslint/node_modules/jsonify/package.json
@@ -18,7 +18,6 @@
"_from": "jsonify@>=0.0.0 <0.1.0",
"_id": "jsonify@0.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/jsonify",
"_nodeVersion": "v0.5.0-pre",
"_npmVersion": "1.0.10",
diff --git a/tools/eslint/node_modules/bluebird/LICENSE b/tools/eslint/node_modules/jsonpointer/LICENSE.md
index 4182a1e1cc..ac32f5dfdd 100644
--- a/tools/eslint/node_modules/bluebird/LICENSE
+++ b/tools/eslint/node_modules/jsonpointer/LICENSE.md
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2013-2015 Petka Antonov
+Copyright (c) 2011-2015 Jan Lehnardt <jan@apache.org> & Marc Bachmann <https://github.com/marcbachmann>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -14,7 +14,7 @@ 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
+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
diff --git a/tools/eslint/node_modules/jsonpointer/README.md b/tools/eslint/node_modules/jsonpointer/README.md
index e096dfa5d6..bc7aa153dd 100644
--- a/tools/eslint/node_modules/jsonpointer/README.md
+++ b/tools/eslint/node_modules/jsonpointer/README.md
@@ -3,17 +3,24 @@
This is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08).
## Usage
+```javascript
+var jsonpointer = require('jsonpointer');
+var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]};
- var jsonpointer = require("jsonpointer");
- var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]};
- var one = jsonpointer.get(obj, "/foo");
- var two = jsonpointer.get(obj, "/bar/baz");
- var three = jsonpointer.get(obj, "/qux/0");
- var four = jsonpointer.get(obj, "/qux/1");
- var five = jsonpointer.get(obj, "/qux/2");
- var notfound = jsonpointer.get(obj, "/quo"); // returns null
+jsonpointer.get(obj, '/foo'); // returns 1
+jsonpointer.get(obj, '/bar/baz'); // returns 2
+jsonpointer.get(obj, '/qux/0'); // returns 3
+jsonpointer.get(obj, '/qux/1'); // returns 4
+jsonpointer.get(obj, '/qux/2'); // returns 5
+jsonpointer.get(obj, '/quo'); // returns null
- jsonpointer.set(obj, "/foo", 6); // obj.foo = 6;
+jsonpointer.set(obj, '/foo', 6); // sets obj.foo = 6;
+jsonpointer.set(obj, '/qux/-', 6) // sets obj.qux = [3, 4, 5, 6]
+
+var pointer = jsonpointer.compile('/foo')
+pointer.get(obj) // returns 1
+pointer.set(obj, 1) // sets obj.foo = 1
+```
## Testing
@@ -25,7 +32,7 @@ This is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-iet
## Author
-(c) 2011 Jan Lehnardt <jan@apache.org>
+(c) 2011-2015 Jan Lehnardt <jan@apache.org> & Marc Bachmann <https://github.com/marcbachmann>
## License
diff --git a/tools/eslint/node_modules/jsonpointer/benchmark.js b/tools/eslint/node_modules/jsonpointer/benchmark.js
new file mode 100644
index 0000000000..8a95636dee
--- /dev/null
+++ b/tools/eslint/node_modules/jsonpointer/benchmark.js
@@ -0,0 +1,56 @@
+var jsonpointer = require('./')
+
+var i
+var obj = {
+ a: 1,
+ b: {
+ c: 2
+ },
+ d: {
+ e: [{ a: 3 }, { b: 4 }, { c: 5 }]
+ }
+}
+
+// Get
+console.time('get first level property')
+for (i = 0; i < 1e6; i++) {
+ jsonpointer.get(obj, '/a')
+}
+console.timeEnd('get first level property')
+
+console.time('get second level property')
+for (i = 0; i < 1e6; i++) {
+ jsonpointer.get(obj, '/d/e')
+}
+console.timeEnd('get second level property')
+
+console.time('get third level property')
+for (i = 0; i < 1e6; i++) {
+ jsonpointer.get(obj, '/d/e/0')
+}
+console.timeEnd('get third level property')
+
+// Set
+console.time('set first level property')
+for (i = 0; i < 1e6; i++) {
+ jsonpointer.set(obj, '/a', 'bla')
+}
+console.timeEnd('set first level property')
+
+console.time('set second level property')
+for (i = 0; i < 1e6; i++) {
+ jsonpointer.set(obj, '/d/e', 'bla')
+}
+console.timeEnd('set second level property')
+
+console.time('set third level property')
+for (i = 0; i < 1e6; i++) {
+ jsonpointer.set(obj, '/d/e/0', 'bla')
+}
+console.timeEnd('set third level property')
+
+console.time('push property into array')
+for (i = 0; i < 1e6; i++) {
+ jsonpointer.set(obj, '/d/e/-', 'bla')
+}
+console.timeEnd('push property into array')
diff --git a/tools/eslint/node_modules/jsonpointer/jsonpointer.js b/tools/eslint/node_modules/jsonpointer/jsonpointer.js
index 006f85ef3a..7cfaec0fbd 100644
--- a/tools/eslint/node_modules/jsonpointer/jsonpointer.js
+++ b/tools/eslint/node_modules/jsonpointer/jsonpointer.js
@@ -1,76 +1,93 @@
-var untilde = function(str) {
- return str.replace(/~./g, function(m) {
- switch (m) {
- case "~0":
- return "~";
- case "~1":
- return "/";
- }
- throw new Error("Invalid tilde escape: " + m);
- });
+var hasExcape = /~/
+var escapeMatcher = /~[01]/g
+function escapeReplacer (m) {
+ switch (m) {
+ case '~1': return '/'
+ case '~0': return '~'
+ }
+ throw new Error('Invalid tilde escape: ' + m)
}
-var traverse = function(obj, pointer, value) {
- // assert(isArray(pointer))
- var part = untilde(pointer.shift());
- if(!obj.hasOwnProperty(part)) {
- return null;
- }
- if(pointer.length !== 0) { // keep traversin!
- return traverse(obj[part], pointer, value);
- }
- // we're done
- if(typeof value === "undefined") {
- // just reading
- return obj[part];
- }
- // set new value, return old value
- var old_value = obj[part];
- if(value === null) {
- delete obj[part];
- } else {
- obj[part] = value;
- }
- return old_value;
+function untilde (str) {
+ if (!hasExcape.test(str)) return str
+ return str.replace(escapeMatcher, escapeReplacer)
}
-var validate_input = function(obj, pointer) {
- if(typeof obj !== "object") {
- throw new Error("Invalid input object.");
- }
+function setter (obj, pointer, value) {
+ var part
+ var hasNextPart
- if(pointer === "") {
- return [];
- }
+ for (var p = 1, len = pointer.length; p < len;) {
+ part = untilde(pointer[p++])
+ hasNextPart = len > p
+
+ if (typeof obj[part] === 'undefined') {
+ // support setting of /-
+ if (Array.isArray(obj) && part === '-') {
+ part = obj.length
+ }
- if(!pointer) {
- throw new Error("Invalid JSON pointer.");
+ // support nested objects/array when setting values
+ if (hasNextPart) {
+ if ((pointer[p] !== '' && pointer[p] < Infinity) || pointer[p] === '-') obj[part] = []
+ else obj[part] = {}
+ }
+ }
+
+ if (!hasNextPart) break
+ obj = obj[part]
}
- pointer = pointer.split("/");
- var first = pointer.shift();
- if (first !== "") {
- throw new Error("Invalid JSON pointer.");
+ var oldValue = obj[part]
+ if (value === undefined) delete obj[part]
+ else obj[part] = value
+ return oldValue
+}
+
+function compilePointer (pointer) {
+ if (typeof pointer === 'string') {
+ pointer = pointer.split('/')
+ if (pointer[0] === '') return pointer
+ throw new Error('Invalid JSON pointer.')
+ } else if (Array.isArray(pointer)) {
+ return pointer
}
- return pointer;
+ throw new Error('Invalid JSON pointer.')
}
-var get = function(obj, pointer) {
- pointer = validate_input(obj, pointer);
- if (pointer.length === 0) {
- return obj;
+function get (obj, pointer) {
+ if (typeof obj !== 'object') throw new Error('Invalid input object.')
+ pointer = compilePointer(pointer)
+ var len = pointer.length
+ if (len === 1) return obj
+
+ for (var p = 1; p < len;) {
+ obj = obj[untilde(pointer[p++])]
+ if (len === p) return obj
+ if (typeof obj !== 'object') return undefined
}
- return traverse(obj, pointer);
}
-var set = function(obj, pointer, value) {
- pointer = validate_input(obj, pointer);
- if (pointer.length === 0) {
- throw new Error("Invalid JSON pointer for set.")
+function set (obj, pointer, value) {
+ if (typeof obj !== 'object') throw new Error('Invalid input object.')
+ pointer = compilePointer(pointer)
+ if (pointer.length === 0) throw new Error('Invalid JSON pointer for set.')
+ return setter(obj, pointer, value)
+}
+
+function compile (pointer) {
+ var compiled = compilePointer(pointer)
+ return {
+ get: function (object) {
+ return get(object, compiled)
+ },
+ set: function (object, value) {
+ return set(object, compiled, value)
+ }
}
- return traverse(obj, pointer, value);
}
exports.get = get
exports.set = set
+exports.compile = compile
diff --git a/tools/eslint/node_modules/jsonpointer/package.json b/tools/eslint/node_modules/jsonpointer/package.json
index e4daa31efa..f1d6d2a7fb 100644
--- a/tools/eslint/node_modules/jsonpointer/package.json
+++ b/tools/eslint/node_modules/jsonpointer/package.json
@@ -2,45 +2,48 @@
"_args": [
[
{
- "raw": "jsonpointer@2.0.0",
+ "raw": "jsonpointer@^4.0.0",
"scope": null,
"escapedName": "jsonpointer",
"name": "jsonpointer",
- "rawSpec": "2.0.0",
- "spec": "2.0.0",
- "type": "version"
+ "rawSpec": "^4.0.0",
+ "spec": ">=4.0.0 <5.0.0",
+ "type": "range"
},
"/Users/trott/io.js/tools/node_modules/is-my-json-valid"
]
],
- "_from": "jsonpointer@2.0.0",
- "_id": "jsonpointer@2.0.0",
+ "_from": "jsonpointer@>=4.0.0 <5.0.0",
+ "_id": "jsonpointer@4.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/jsonpointer",
- "_nodeVersion": "0.10.36",
+ "_nodeVersion": "6.1.0",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/jsonpointer-4.0.0.tgz_1463651460494_0.02921536797657609"
+ },
"_npmUser": {
"name": "marcbachmann",
"email": "marc.brookman@gmail.com"
},
- "_npmVersion": "2.10.1",
+ "_npmVersion": "3.8.6",
"_phantomChildren": {},
"_requested": {
- "raw": "jsonpointer@2.0.0",
+ "raw": "jsonpointer@^4.0.0",
"scope": null,
"escapedName": "jsonpointer",
"name": "jsonpointer",
- "rawSpec": "2.0.0",
- "spec": "2.0.0",
- "type": "version"
+ "rawSpec": "^4.0.0",
+ "spec": ">=4.0.0 <5.0.0",
+ "type": "range"
},
"_requiredBy": [
"/is-my-json-valid"
],
- "_resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz",
- "_shasum": "3af1dd20fe85463910d469a385e33017d2a030d9",
+ "_resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.0.tgz",
+ "_shasum": "6661e161d2fc445f19f98430231343722e1fcbd5",
"_shrinkwrap": null,
- "_spec": "jsonpointer@2.0.0",
+ "_spec": "jsonpointer@^4.0.0",
"_where": "/Users/trott/io.js/tools/node_modules/is-my-json-valid",
"author": {
"name": "Jan Lehnardt",
@@ -53,20 +56,26 @@
{
"name": "Joe Hildebrand",
"email": "joe-github@cursive.net"
+ },
+ {
+ "name": "Marc Bachmann",
+ "email": "marc.brookman@gmail.com"
}
],
"dependencies": {},
"description": "Simple JSON Addressing.",
- "devDependencies": {},
+ "devDependencies": {
+ "standard": "^5.3.1"
+ },
"directories": {},
"dist": {
- "shasum": "3af1dd20fe85463910d469a385e33017d2a030d9",
- "tarball": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz"
+ "shasum": "6661e161d2fc445f19f98430231343722e1fcbd5",
+ "tarball": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.0.tgz"
},
"engines": {
- "node": ">=0.6.0"
+ "node": ">=0.10.0"
},
- "gitHead": "26ea4a5c0fcb6d9a2e87f733403791dd05637af8",
+ "gitHead": "2d46030ba6df41b566934c7202e31fb65058de71",
"homepage": "https://github.com/janl/node-jsonpointer#readme",
"license": "MIT",
"main": "./jsonpointer",
@@ -88,7 +97,7 @@
"url": "git+ssh://git@github.com/janl/node-jsonpointer.git"
},
"scripts": {
- "test": "node test.js"
+ "test": "standard && node test.js"
},
"tags": [
"util",
@@ -96,5 +105,5 @@
"util",
"utility"
],
- "version": "2.0.0"
+ "version": "4.0.0"
}
diff --git a/tools/eslint/node_modules/levn/package.json b/tools/eslint/node_modules/levn/package.json
index 847602fe65..efed1c8717 100644
--- a/tools/eslint/node_modules/levn/package.json
+++ b/tools/eslint/node_modules/levn/package.json
@@ -16,7 +16,6 @@
"_from": "levn@>=0.3.0 <0.4.0",
"_id": "levn@0.3.0",
"_inCache": true,
- "_installable": true,
"_location": "/levn",
"_nodeVersion": "4.2.4",
"_npmUser": {
diff --git a/tools/eslint/node_modules/lodash/README.md b/tools/eslint/node_modules/lodash/README.md
index 2052e053fc..72b66b2b48 100644
--- a/tools/eslint/node_modules/lodash/README.md
+++ b/tools/eslint/node_modules/lodash/README.md
@@ -1,12 +1,12 @@
-# lodash v4.15.0
+# lodash v4.16.4
The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
## Installation
Using npm:
-```bash
-$ {sudo -H} npm i -g npm
+```shell
+$ npm i -g npm
$ npm i --save lodash
```
@@ -16,25 +16,24 @@ In Node.js:
var _ = require('lodash');
// Load the core build.
var _ = require('lodash/core');
-// Load the fp build for immutable auto-curried iteratee-first data-last methods.
+// Load the FP build for immutable auto-curried iteratee-first data-last methods.
var fp = require('lodash/fp');
-// Load a method category.
+// Load method categories.
var array = require('lodash/array');
var object = require('lodash/fp/object');
-// Load a single method for smaller builds with browserify/rollup/webpack.
-var chunk = require('lodash/chunk');
-var extend = require('lodash/fp/extend');
+// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
+var at = require('lodash/at');
+var curryN = require('lodash/fp/curryN');
```
-See the [package source](https://github.com/lodash/lodash/tree/4.15.0-npm) for more details.
+See the [package source](https://github.com/lodash/lodash/tree/4.16.4-npm) for more details.
**Note:**<br>
-Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` in the Node.js < 6 REPL.<br>
-Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes `lodash` by default.
+Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.
## Support
-Tested in Chrome 51-52, Firefox 47-48, IE 9-11, Edge 14, Safari 8-9, Node.js 0.10-6, & PhantomJS 2.1.1.<br>
+Tested in Chrome 52-53, Firefox 48-49, IE 11, Edge 14, Safari 9-10, Node.js 4-6, & 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/eslint/node_modules/lodash/_Stack.js b/tools/eslint/node_modules/lodash/_Stack.js
index b9ba1af3ed..80b2cf1b0c 100644
--- a/tools/eslint/node_modules/lodash/_Stack.js
+++ b/tools/eslint/node_modules/lodash/_Stack.js
@@ -13,7 +13,8 @@ var ListCache = require('./_ListCache'),
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
- this.__data__ = new ListCache(entries);
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
}
// Add methods to `Stack`.
diff --git a/tools/eslint/node_modules/lodash/_arrayLikeKeys.js b/tools/eslint/node_modules/lodash/_arrayLikeKeys.js
index 0cb3b18556..b2ec9ce786 100644
--- a/tools/eslint/node_modules/lodash/_arrayLikeKeys.js
+++ b/tools/eslint/node_modules/lodash/_arrayLikeKeys.js
@@ -1,7 +1,9 @@
var baseTimes = require('./_baseTimes'),
isArguments = require('./isArguments'),
isArray = require('./isArray'),
- isIndex = require('./_isIndex');
+ isBuffer = require('./isBuffer'),
+ isIndex = require('./_isIndex'),
+ isTypedArray = require('./isTypedArray');
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -18,18 +20,26 @@ var hasOwnProperty = objectProto.hasOwnProperty;
* @returns {Array} Returns the array of property names.
*/
function arrayLikeKeys(value, inherited) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- // Safari 9 makes `arguments.length` enumerable in strict mode.
- var result = (isArray(value) || isArguments(value))
- ? baseTimes(value.length, String)
- : [];
-
- var length = result.length,
- skipIndexes = !!length;
+ var isArr = isArray(value),
+ isArg = !isArr && isArguments(value),
+ isBuff = !isArr && !isArg && isBuffer(value),
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes ? baseTimes(value.length, String) : [],
+ length = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) &&
- !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
+ !(skipIndexes && (
+ // Safari 9 has enumerable `arguments.length` in strict mode.
+ key == 'length' ||
+ // Node.js 0.10 has enumerable non-index properties on buffers.
+ (isBuff && (key == 'offset' || key == 'parent')) ||
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+ // Skip index properties.
+ isIndex(key, length)
+ ))) {
result.push(key);
}
}
diff --git a/tools/eslint/node_modules/lodash/_arraySample.js b/tools/eslint/node_modules/lodash/_arraySample.js
new file mode 100644
index 0000000000..fcab0105e8
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_arraySample.js
@@ -0,0 +1,15 @@
+var baseRandom = require('./_baseRandom');
+
+/**
+ * A specialized version of `_.sample` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @returns {*} Returns the random element.
+ */
+function arraySample(array) {
+ var length = array.length;
+ return length ? array[baseRandom(0, length - 1)] : undefined;
+}
+
+module.exports = arraySample;
diff --git a/tools/eslint/node_modules/lodash/_arraySampleSize.js b/tools/eslint/node_modules/lodash/_arraySampleSize.js
new file mode 100644
index 0000000000..8c7e364f51
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_arraySampleSize.js
@@ -0,0 +1,17 @@
+var baseClamp = require('./_baseClamp'),
+ copyArray = require('./_copyArray'),
+ shuffleSelf = require('./_shuffleSelf');
+
+/**
+ * A specialized version of `_.sampleSize` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+function arraySampleSize(array, n) {
+ return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
+}
+
+module.exports = arraySampleSize;
diff --git a/tools/eslint/node_modules/lodash/_arrayShuffle.js b/tools/eslint/node_modules/lodash/_arrayShuffle.js
new file mode 100644
index 0000000000..46313a39b7
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_arrayShuffle.js
@@ -0,0 +1,15 @@
+var copyArray = require('./_copyArray'),
+ shuffleSelf = require('./_shuffleSelf');
+
+/**
+ * A specialized version of `_.shuffle` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+function arrayShuffle(array) {
+ return shuffleSelf(copyArray(array));
+}
+
+module.exports = arrayShuffle;
diff --git a/tools/eslint/node_modules/lodash/_assignMergeValue.js b/tools/eslint/node_modules/lodash/_assignMergeValue.js
index 61dd583290..cb1185e992 100644
--- a/tools/eslint/node_modules/lodash/_assignMergeValue.js
+++ b/tools/eslint/node_modules/lodash/_assignMergeValue.js
@@ -1,4 +1,5 @@
-var eq = require('./eq');
+var baseAssignValue = require('./_baseAssignValue'),
+ eq = require('./eq');
/**
* This function is like `assignValue` except that it doesn't assign
@@ -11,8 +12,8 @@ var eq = require('./eq');
*/
function assignMergeValue(object, key, value) {
if ((value !== undefined && !eq(object[key], value)) ||
- (typeof key == 'number' && value === undefined && !(key in object))) {
- object[key] = value;
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
}
}
diff --git a/tools/eslint/node_modules/lodash/_assignValue.js b/tools/eslint/node_modules/lodash/_assignValue.js
index aa1dc78e1c..40839575b5 100644
--- a/tools/eslint/node_modules/lodash/_assignValue.js
+++ b/tools/eslint/node_modules/lodash/_assignValue.js
@@ -1,4 +1,5 @@
-var eq = require('./eq');
+var baseAssignValue = require('./_baseAssignValue'),
+ eq = require('./eq');
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -20,7 +21,7 @@ function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
(value === undefined && !(key in object))) {
- object[key] = value;
+ baseAssignValue(object, key, value);
}
}
diff --git a/tools/eslint/node_modules/lodash/_baseAssignValue.js b/tools/eslint/node_modules/lodash/_baseAssignValue.js
new file mode 100644
index 0000000000..d6f66ef3a5
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_baseAssignValue.js
@@ -0,0 +1,25 @@
+var defineProperty = require('./_defineProperty');
+
+/**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function baseAssignValue(object, key, value) {
+ if (key == '__proto__' && defineProperty) {
+ defineProperty(object, key, {
+ 'configurable': true,
+ 'enumerable': true,
+ 'value': value,
+ 'writable': true
+ });
+ } else {
+ object[key] = value;
+ }
+}
+
+module.exports = baseAssignValue;
diff --git a/tools/eslint/node_modules/lodash/_baseClone.js b/tools/eslint/node_modules/lodash/_baseClone.js
index fce3c0c086..22ff841ec8 100644
--- a/tools/eslint/node_modules/lodash/_baseClone.js
+++ b/tools/eslint/node_modules/lodash/_baseClone.js
@@ -12,7 +12,6 @@ var Stack = require('./_Stack'),
initCloneObject = require('./_initCloneObject'),
isArray = require('./isArray'),
isBuffer = require('./isBuffer'),
- isHostObject = require('./_isHostObject'),
isObject = require('./isObject'),
keys = require('./keys');
@@ -100,9 +99,6 @@ function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
return cloneBuffer(value, isDeep);
}
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
- if (isHostObject(value)) {
- return object ? value : {};
- }
result = initCloneObject(isFunc ? {} : value);
if (!isDeep) {
return copySymbols(value, baseAssign(result, value));
@@ -122,9 +118,7 @@ function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
}
stack.set(value, result);
- if (!isArr) {
- var props = isFull ? getAllKeys(value) : keys(value);
- }
+ var props = isArr ? undefined : (isFull ? getAllKeys : keys)(value);
arrayEach(props || value, function(subValue, key) {
if (props) {
key = subValue;
diff --git a/tools/eslint/node_modules/lodash/_baseCreate.js b/tools/eslint/node_modules/lodash/_baseCreate.js
index 4372cad2b2..ffa6a52acd 100644
--- a/tools/eslint/node_modules/lodash/_baseCreate.js
+++ b/tools/eslint/node_modules/lodash/_baseCreate.js
@@ -8,11 +8,23 @@ var objectCreate = Object.create;
* properties to the created object.
*
* @private
- * @param {Object} prototype The object to inherit from.
+ * @param {Object} proto The object to inherit from.
* @returns {Object} Returns the new object.
*/
-function baseCreate(proto) {
- return isObject(proto) ? objectCreate(proto) : {};
-}
+var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+}());
module.exports = baseCreate;
diff --git a/tools/eslint/node_modules/lodash/_baseDelay.js b/tools/eslint/node_modules/lodash/_baseDelay.js
index f21087747b..1486d697e3 100644
--- a/tools/eslint/node_modules/lodash/_baseDelay.js
+++ b/tools/eslint/node_modules/lodash/_baseDelay.js
@@ -1,4 +1,4 @@
-/** Used as the `TypeError` message for "Functions" methods. */
+/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
diff --git a/tools/eslint/node_modules/lodash/_baseIndexOf.js b/tools/eslint/node_modules/lodash/_baseIndexOf.js
index c232d43305..167e706e79 100644
--- a/tools/eslint/node_modules/lodash/_baseIndexOf.js
+++ b/tools/eslint/node_modules/lodash/_baseIndexOf.js
@@ -1,5 +1,6 @@
var baseFindIndex = require('./_baseFindIndex'),
- baseIsNaN = require('./_baseIsNaN');
+ baseIsNaN = require('./_baseIsNaN'),
+ strictIndexOf = require('./_strictIndexOf');
/**
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
@@ -11,18 +12,9 @@ var baseFindIndex = require('./_baseFindIndex'),
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOf(array, value, fromIndex) {
- if (value !== value) {
- return baseFindIndex(array, baseIsNaN, fromIndex);
- }
- var index = fromIndex - 1,
- length = array.length;
-
- while (++index < length) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
+ return value === value
+ ? strictIndexOf(array, value, fromIndex)
+ : baseFindIndex(array, baseIsNaN, fromIndex);
}
module.exports = baseIndexOf;
diff --git a/tools/eslint/node_modules/lodash/_baseIsArguments.js b/tools/eslint/node_modules/lodash/_baseIsArguments.js
new file mode 100644
index 0000000000..a176e18a0c
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_baseIsArguments.js
@@ -0,0 +1,27 @@
+var isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]';
+
+/** 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 objectToString = objectProto.toString;
+
+/**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+function baseIsArguments(value) {
+ return isObjectLike(value) && objectToString.call(value) == argsTag;
+}
+
+module.exports = baseIsArguments;
diff --git a/tools/eslint/node_modules/lodash/_baseIsEqualDeep.js b/tools/eslint/node_modules/lodash/_baseIsEqualDeep.js
index c18d6d1fcd..42dc03d0f3 100644
--- a/tools/eslint/node_modules/lodash/_baseIsEqualDeep.js
+++ b/tools/eslint/node_modules/lodash/_baseIsEqualDeep.js
@@ -4,7 +4,7 @@ var Stack = require('./_Stack'),
equalObjects = require('./_equalObjects'),
getTag = require('./_getTag'),
isArray = require('./isArray'),
- isHostObject = require('./_isHostObject'),
+ isBuffer = require('./isBuffer'),
isTypedArray = require('./isTypedArray');
/** Used to compose bitmasks for comparison styles. */
@@ -50,10 +50,17 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
othTag = getTag(other);
othTag = othTag == argsTag ? objectTag : othTag;
}
- var objIsObj = objTag == objectTag && !isHostObject(object),
- othIsObj = othTag == objectTag && !isHostObject(other),
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
+ if (isSameTag && isBuffer(object)) {
+ if (!isBuffer(other)) {
+ return false;
+ }
+ objIsArr = true;
+ objIsObj = false;
+ }
if (isSameTag && !objIsObj) {
stack || (stack = new Stack);
return (objIsArr || isTypedArray(object))
diff --git a/tools/eslint/node_modules/lodash/_baseIsNative.js b/tools/eslint/node_modules/lodash/_baseIsNative.js
index c79c77ccbb..8702330495 100644
--- a/tools/eslint/node_modules/lodash/_baseIsNative.js
+++ b/tools/eslint/node_modules/lodash/_baseIsNative.js
@@ -1,5 +1,4 @@
var isFunction = require('./isFunction'),
- isHostObject = require('./_isHostObject'),
isMasked = require('./_isMasked'),
isObject = require('./isObject'),
toSource = require('./_toSource');
@@ -41,7 +40,7 @@ function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
- var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
diff --git a/tools/eslint/node_modules/lodash/_baseMerge.js b/tools/eslint/node_modules/lodash/_baseMerge.js
index dfb4b15270..f4cb8c6988 100644
--- a/tools/eslint/node_modules/lodash/_baseMerge.js
+++ b/tools/eslint/node_modules/lodash/_baseMerge.js
@@ -1,11 +1,9 @@
var Stack = require('./_Stack'),
- arrayEach = require('./_arrayEach'),
assignMergeValue = require('./_assignMergeValue'),
- baseKeysIn = require('./_baseKeysIn'),
+ baseFor = require('./_baseFor'),
baseMergeDeep = require('./_baseMergeDeep'),
- isArray = require('./isArray'),
isObject = require('./isObject'),
- isTypedArray = require('./isTypedArray');
+ keysIn = require('./keysIn');
/**
* The base implementation of `_.merge` without support for multiple sources.
@@ -22,14 +20,7 @@ function baseMerge(object, source, srcIndex, customizer, stack) {
if (object === source) {
return;
}
- if (!(isArray(source) || isTypedArray(source))) {
- var props = baseKeysIn(source);
- }
- arrayEach(props || source, function(srcValue, key) {
- if (props) {
- key = srcValue;
- srcValue = source[key];
- }
+ baseFor(source, function(srcValue, key) {
if (isObject(srcValue)) {
stack || (stack = new Stack);
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
@@ -44,7 +35,7 @@ function baseMerge(object, source, srcIndex, customizer, stack) {
}
assignMergeValue(object, key, newValue);
}
- });
+ }, keysIn);
}
module.exports = baseMerge;
diff --git a/tools/eslint/node_modules/lodash/_baseMergeDeep.js b/tools/eslint/node_modules/lodash/_baseMergeDeep.js
index 535c0d110a..42b405a3dc 100644
--- a/tools/eslint/node_modules/lodash/_baseMergeDeep.js
+++ b/tools/eslint/node_modules/lodash/_baseMergeDeep.js
@@ -1,9 +1,12 @@
var assignMergeValue = require('./_assignMergeValue'),
- baseClone = require('./_baseClone'),
+ cloneBuffer = require('./_cloneBuffer'),
+ cloneTypedArray = require('./_cloneTypedArray'),
copyArray = require('./_copyArray'),
+ initCloneObject = require('./_initCloneObject'),
isArguments = require('./isArguments'),
isArray = require('./isArray'),
isArrayLikeObject = require('./isArrayLikeObject'),
+ isBuffer = require('./isBuffer'),
isFunction = require('./isFunction'),
isObject = require('./isObject'),
isPlainObject = require('./isPlainObject'),
@@ -41,29 +44,37 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
var isCommon = newValue === undefined;
if (isCommon) {
+ var isArr = isArray(srcValue),
+ isBuff = !isArr && isBuffer(srcValue),
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
+
newValue = srcValue;
- if (isArray(srcValue) || isTypedArray(srcValue)) {
+ if (isArr || isBuff || isTyped) {
if (isArray(objValue)) {
newValue = objValue;
}
else if (isArrayLikeObject(objValue)) {
newValue = copyArray(objValue);
}
- else {
+ else if (isBuff) {
isCommon = false;
- newValue = baseClone(srcValue, true);
+ newValue = cloneBuffer(srcValue, true);
+ }
+ else if (isTyped) {
+ isCommon = false;
+ newValue = cloneTypedArray(srcValue, true);
+ }
+ else {
+ newValue = [];
}
}
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ newValue = objValue;
if (isArguments(objValue)) {
newValue = toPlainObject(objValue);
}
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
- isCommon = false;
- newValue = baseClone(srcValue, true);
- }
- else {
- newValue = objValue;
+ newValue = initCloneObject(srcValue);
}
}
else {
diff --git a/tools/eslint/node_modules/lodash/_basePickBy.js b/tools/eslint/node_modules/lodash/_basePickBy.js
index fcc66105a8..dc9b342e87 100644
--- a/tools/eslint/node_modules/lodash/_basePickBy.js
+++ b/tools/eslint/node_modules/lodash/_basePickBy.js
@@ -1,3 +1,5 @@
+var baseAssignValue = require('./_baseAssignValue');
+
/**
* The base implementation of `_.pickBy` without support for iteratee shorthands.
*
@@ -17,7 +19,7 @@ function basePickBy(object, props, predicate) {
value = object[key];
if (predicate(value, key)) {
- result[key] = value;
+ baseAssignValue(result, key, value);
}
}
return result;
diff --git a/tools/eslint/node_modules/lodash/_baseRest.js b/tools/eslint/node_modules/lodash/_baseRest.js
index d8aa217c66..d0dc4bdd1f 100644
--- a/tools/eslint/node_modules/lodash/_baseRest.js
+++ b/tools/eslint/node_modules/lodash/_baseRest.js
@@ -1,7 +1,6 @@
-var apply = require('./_apply');
-
-/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max;
+var identity = require('./identity'),
+ overRest = require('./_overRest'),
+ setToString = require('./_setToString');
/**
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
@@ -12,24 +11,7 @@ var nativeMax = Math.max;
* @returns {Function} Returns the new function.
*/
function baseRest(func, start) {
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- array = Array(length);
-
- while (++index < length) {
- array[index] = args[start + index];
- }
- index = -1;
- var otherArgs = Array(start + 1);
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = array;
- return apply(func, this, otherArgs);
- };
+ return setToString(overRest(func, start, identity), func + '');
}
module.exports = baseRest;
diff --git a/tools/eslint/node_modules/lodash/_baseSample.js b/tools/eslint/node_modules/lodash/_baseSample.js
new file mode 100644
index 0000000000..58582b9112
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_baseSample.js
@@ -0,0 +1,15 @@
+var arraySample = require('./_arraySample'),
+ values = require('./values');
+
+/**
+ * The base implementation of `_.sample`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ */
+function baseSample(collection) {
+ return arraySample(values(collection));
+}
+
+module.exports = baseSample;
diff --git a/tools/eslint/node_modules/lodash/_baseSampleSize.js b/tools/eslint/node_modules/lodash/_baseSampleSize.js
new file mode 100644
index 0000000000..5c90ec5181
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_baseSampleSize.js
@@ -0,0 +1,18 @@
+var baseClamp = require('./_baseClamp'),
+ shuffleSelf = require('./_shuffleSelf'),
+ values = require('./values');
+
+/**
+ * The base implementation of `_.sampleSize` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+function baseSampleSize(collection, n) {
+ var array = values(collection);
+ return shuffleSelf(array, baseClamp(n, 0, array.length));
+}
+
+module.exports = baseSampleSize;
diff --git a/tools/eslint/node_modules/lodash/_baseSetData.js b/tools/eslint/node_modules/lodash/_baseSetData.js
index e689df2cc0..c409947ddb 100644
--- a/tools/eslint/node_modules/lodash/_baseSetData.js
+++ b/tools/eslint/node_modules/lodash/_baseSetData.js
@@ -2,7 +2,7 @@ var identity = require('./identity'),
metaMap = require('./_metaMap');
/**
- * The base implementation of `setData` without support for hot loop detection.
+ * The base implementation of `setData` without support for hot loop shorting.
*
* @private
* @param {Function} func The function to associate metadata with.
diff --git a/tools/eslint/node_modules/lodash/_baseSetToString.js b/tools/eslint/node_modules/lodash/_baseSetToString.js
new file mode 100644
index 0000000000..89eaca38df
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_baseSetToString.js
@@ -0,0 +1,22 @@
+var constant = require('./constant'),
+ defineProperty = require('./_defineProperty'),
+ identity = require('./identity');
+
+/**
+ * The base implementation of `setToString` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var baseSetToString = !defineProperty ? identity : function(func, string) {
+ return defineProperty(func, 'toString', {
+ 'configurable': true,
+ 'enumerable': false,
+ 'value': constant(string),
+ 'writable': true
+ });
+};
+
+module.exports = baseSetToString;
diff --git a/tools/eslint/node_modules/lodash/_baseShuffle.js b/tools/eslint/node_modules/lodash/_baseShuffle.js
new file mode 100644
index 0000000000..023077ac4e
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_baseShuffle.js
@@ -0,0 +1,15 @@
+var shuffleSelf = require('./_shuffleSelf'),
+ values = require('./values');
+
+/**
+ * The base implementation of `_.shuffle`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+function baseShuffle(collection) {
+ return shuffleSelf(values(collection));
+}
+
+module.exports = baseShuffle;
diff --git a/tools/eslint/node_modules/lodash/_baseToString.js b/tools/eslint/node_modules/lodash/_baseToString.js
index 462e26fd18..ada6ad298c 100644
--- a/tools/eslint/node_modules/lodash/_baseToString.js
+++ b/tools/eslint/node_modules/lodash/_baseToString.js
@@ -1,4 +1,6 @@
var Symbol = require('./_Symbol'),
+ arrayMap = require('./_arrayMap'),
+ isArray = require('./isArray'),
isSymbol = require('./isSymbol');
/** Used as references for various `Number` constants. */
@@ -21,6 +23,10 @@ function baseToString(value) {
if (typeof value == 'string') {
return value;
}
+ if (isArray(value)) {
+ // Recursively convert values (susceptible to call stack limits).
+ return arrayMap(value, baseToString) + '';
+ }
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
diff --git a/tools/eslint/node_modules/lodash/_cacheHas.js b/tools/eslint/node_modules/lodash/_cacheHas.js
index c4c6b65046..2dec892689 100644
--- a/tools/eslint/node_modules/lodash/_cacheHas.js
+++ b/tools/eslint/node_modules/lodash/_cacheHas.js
@@ -1,5 +1,5 @@
/**
- * Checks if a cache value for `key` exists.
+ * Checks if a `cache` value for `key` exists.
*
* @private
* @param {Object} cache The cache to query.
diff --git a/tools/eslint/node_modules/lodash/_castRest.js b/tools/eslint/node_modules/lodash/_castRest.js
new file mode 100644
index 0000000000..213c66f19f
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_castRest.js
@@ -0,0 +1,14 @@
+var baseRest = require('./_baseRest');
+
+/**
+ * A `baseRest` alias which can be replaced with `identity` by module
+ * replacement plugins.
+ *
+ * @private
+ * @type {Function}
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+var castRest = baseRest;
+
+module.exports = castRest;
diff --git a/tools/eslint/node_modules/lodash/_cloneBuffer.js b/tools/eslint/node_modules/lodash/_cloneBuffer.js
index 247d4106f7..27c48109b4 100644
--- a/tools/eslint/node_modules/lodash/_cloneBuffer.js
+++ b/tools/eslint/node_modules/lodash/_cloneBuffer.js
@@ -1,3 +1,18 @@
+var root = require('./_root');
+
+/** Detect free variable `exports`. */
+var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
+
+/** Built-in value references. */
+var Buffer = moduleExports ? root.Buffer : undefined,
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
+
/**
* Creates a clone of `buffer`.
*
@@ -10,7 +25,9 @@ function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
- var result = new buffer.constructor(buffer.length);
+ var length = buffer.length,
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
+
buffer.copy(result);
return result;
}
diff --git a/tools/eslint/node_modules/lodash/_copyObject.js b/tools/eslint/node_modules/lodash/_copyObject.js
index 7d267b2e55..2f2a5c23b7 100644
--- a/tools/eslint/node_modules/lodash/_copyObject.js
+++ b/tools/eslint/node_modules/lodash/_copyObject.js
@@ -1,4 +1,5 @@
-var assignValue = require('./_assignValue');
+var assignValue = require('./_assignValue'),
+ baseAssignValue = require('./_baseAssignValue');
/**
* Copies properties of `source` to `object`.
@@ -11,6 +12,7 @@ var assignValue = require('./_assignValue');
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object, customizer) {
+ var isNew = !object;
object || (object = {});
var index = -1,
@@ -23,7 +25,14 @@ function copyObject(source, props, object, customizer) {
? customizer(object[key], source[key], key, object, source)
: undefined;
- assignValue(object, key, newValue === undefined ? source[key] : newValue);
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
}
return object;
}
diff --git a/tools/eslint/node_modules/lodash/_countHolders.js b/tools/eslint/node_modules/lodash/_countHolders.js
index 8cc95e6e0e..718fcdaa8d 100644
--- a/tools/eslint/node_modules/lodash/_countHolders.js
+++ b/tools/eslint/node_modules/lodash/_countHolders.js
@@ -12,7 +12,7 @@ function countHolders(array, placeholder) {
while (length--) {
if (array[length] === placeholder) {
- result++;
+ ++result;
}
}
return result;
diff --git a/tools/eslint/node_modules/lodash/_createFlow.js b/tools/eslint/node_modules/lodash/_createFlow.js
index 911aaf15ca..b70d1df690 100644
--- a/tools/eslint/node_modules/lodash/_createFlow.js
+++ b/tools/eslint/node_modules/lodash/_createFlow.js
@@ -1,6 +1,5 @@
var LodashWrapper = require('./_LodashWrapper'),
- baseFlatten = require('./_baseFlatten'),
- baseRest = require('./_baseRest'),
+ flatRest = require('./_flatRest'),
getData = require('./_getData'),
getFuncName = require('./_getFuncName'),
isArray = require('./isArray'),
@@ -9,7 +8,7 @@ var LodashWrapper = require('./_LodashWrapper'),
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
-/** Used as the `TypeError` message for "Functions" methods. */
+/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/** Used to compose bitmasks for function metadata. */
@@ -26,9 +25,7 @@ var CURRY_FLAG = 8,
* @returns {Function} Returns the new flow function.
*/
function createFlow(fromRight) {
- return baseRest(function(funcs) {
- funcs = baseFlatten(funcs, 1);
-
+ return flatRest(function(funcs) {
var length = funcs.length,
index = length,
prereq = LodashWrapper.prototype.thru;
diff --git a/tools/eslint/node_modules/lodash/_createOver.js b/tools/eslint/node_modules/lodash/_createOver.js
index 723182dc1a..3b9455161b 100644
--- a/tools/eslint/node_modules/lodash/_createOver.js
+++ b/tools/eslint/node_modules/lodash/_createOver.js
@@ -1,10 +1,9 @@
var apply = require('./_apply'),
arrayMap = require('./_arrayMap'),
- baseFlatten = require('./_baseFlatten'),
baseIteratee = require('./_baseIteratee'),
baseRest = require('./_baseRest'),
baseUnary = require('./_baseUnary'),
- isArray = require('./isArray');
+ flatRest = require('./_flatRest');
/**
* Creates a function like `_.over`.
@@ -14,11 +13,8 @@ var apply = require('./_apply'),
* @returns {Function} Returns the new over function.
*/
function createOver(arrayFunc) {
- return baseRest(function(iteratees) {
- iteratees = (iteratees.length == 1 && isArray(iteratees[0]))
- ? arrayMap(iteratees[0], baseUnary(baseIteratee))
- : arrayMap(baseFlatten(iteratees, 1), baseUnary(baseIteratee));
-
+ return flatRest(function(iteratees) {
+ iteratees = arrayMap(iteratees, baseUnary(baseIteratee));
return baseRest(function(args) {
var thisArg = this;
return arrayFunc(iteratees, function(iteratee) {
diff --git a/tools/eslint/node_modules/lodash/_createWrap.js b/tools/eslint/node_modules/lodash/_createWrap.js
index 6afe6b5f3e..09dac309f7 100644
--- a/tools/eslint/node_modules/lodash/_createWrap.js
+++ b/tools/eslint/node_modules/lodash/_createWrap.js
@@ -9,7 +9,7 @@ var baseSetData = require('./_baseSetData'),
setWrapToString = require('./_setWrapToString'),
toInteger = require('./toInteger');
-/** Used as the `TypeError` message for "Functions" methods. */
+/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/** Used to compose bitmasks for function metadata. */
diff --git a/tools/eslint/node_modules/lodash/_deburrLetter.js b/tools/eslint/node_modules/lodash/_deburrLetter.js
index 98283a467b..3e531edcf3 100644
--- a/tools/eslint/node_modules/lodash/_deburrLetter.js
+++ b/tools/eslint/node_modules/lodash/_deburrLetter.js
@@ -55,7 +55,7 @@ var deburredLetters = {
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
'\u0132': 'IJ', '\u0133': 'ij',
'\u0152': 'Oe', '\u0153': 'oe',
- '\u0149': "'n", '\u017f': 'ss'
+ '\u0149': "'n", '\u017f': 's'
};
/**
diff --git a/tools/eslint/node_modules/lodash/_defineProperty.js b/tools/eslint/node_modules/lodash/_defineProperty.js
index f6128d7760..b6116d92ab 100644
--- a/tools/eslint/node_modules/lodash/_defineProperty.js
+++ b/tools/eslint/node_modules/lodash/_defineProperty.js
@@ -1,11 +1,11 @@
var getNative = require('./_getNative');
-/* Used to set `toString` methods. */
var defineProperty = (function() {
- var func = getNative(Object, 'defineProperty'),
- name = getNative.name;
-
- return (name && name.length > 2) ? func : undefined;
+ try {
+ var func = getNative(Object, 'defineProperty');
+ func({}, '', {});
+ return func;
+ } catch (e) {}
}());
module.exports = defineProperty;
diff --git a/tools/eslint/node_modules/lodash/_equalArrays.js b/tools/eslint/node_modules/lodash/_equalArrays.js
index e095170ce3..178dcedf25 100644
--- a/tools/eslint/node_modules/lodash/_equalArrays.js
+++ b/tools/eslint/node_modules/lodash/_equalArrays.js
@@ -1,5 +1,6 @@
var SetCache = require('./_SetCache'),
- arraySome = require('./_arraySome');
+ arraySome = require('./_arraySome'),
+ cacheHas = require('./_cacheHas');
/** Used to compose bitmasks for comparison styles. */
var UNORDERED_COMPARE_FLAG = 1,
@@ -59,9 +60,9 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
// Recursively compare arrays (susceptible to call stack limits).
if (seen) {
if (!arraySome(other, function(othValue, othIndex) {
- if (!seen.has(othIndex) &&
+ if (!cacheHas(seen, othIndex) &&
(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
- return seen.add(othIndex);
+ return seen.push(othIndex);
}
})) {
result = false;
diff --git a/tools/eslint/node_modules/lodash/_escapeHtmlChar.js b/tools/eslint/node_modules/lodash/_escapeHtmlChar.js
index 6abceb51c9..7ca68ee625 100644
--- a/tools/eslint/node_modules/lodash/_escapeHtmlChar.js
+++ b/tools/eslint/node_modules/lodash/_escapeHtmlChar.js
@@ -6,8 +6,7 @@ var htmlEscapes = {
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
- "'": '&#39;',
- '`': '&#96;'
+ "'": '&#39;'
};
/**
diff --git a/tools/eslint/node_modules/lodash/_flatRest.js b/tools/eslint/node_modules/lodash/_flatRest.js
new file mode 100644
index 0000000000..94ab6cca77
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_flatRest.js
@@ -0,0 +1,16 @@
+var flatten = require('./flatten'),
+ overRest = require('./_overRest'),
+ setToString = require('./_setToString');
+
+/**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+}
+
+module.exports = flatRest;
diff --git a/tools/eslint/node_modules/lodash/_getTag.js b/tools/eslint/node_modules/lodash/_getTag.js
index de560d676e..6954db1b6d 100644
--- a/tools/eslint/node_modules/lodash/_getTag.js
+++ b/tools/eslint/node_modules/lodash/_getTag.js
@@ -41,8 +41,7 @@ var dataViewCtorString = toSource(DataView),
*/
var getTag = baseGetTag;
-// Fallback for data views, maps, sets, and weak maps in IE 11,
-// for data views in Edge < 14, and promises in Node.js.
+// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
(Map && getTag(new Map) != mapTag) ||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
diff --git a/tools/eslint/node_modules/lodash/_hasPath.js b/tools/eslint/node_modules/lodash/_hasPath.js
index 1e2c3eac4f..770be4b889 100644
--- a/tools/eslint/node_modules/lodash/_hasPath.js
+++ b/tools/eslint/node_modules/lodash/_hasPath.js
@@ -18,9 +18,9 @@ var castPath = require('./_castPath'),
function hasPath(object, path, hasFunc) {
path = isKey(path, object) ? [path] : castPath(path);
- var result,
- index = -1,
- length = path.length;
+ var index = -1,
+ length = path.length,
+ result = false;
while (++index < length) {
var key = toKey(path[index]);
@@ -29,10 +29,10 @@ function hasPath(object, path, hasFunc) {
}
object = object[key];
}
- if (result) {
+ if (result || ++index != length) {
return result;
}
- var length = object ? object.length : 0;
+ length = object ? object.length : 0;
return !!length && isLength(length) && isIndex(key, length) &&
(isArray(object) || isArguments(object));
}
diff --git a/tools/eslint/node_modules/lodash/_hashClear.js b/tools/eslint/node_modules/lodash/_hashClear.js
index 14c159176c..5d4b70cc46 100644
--- a/tools/eslint/node_modules/lodash/_hashClear.js
+++ b/tools/eslint/node_modules/lodash/_hashClear.js
@@ -9,6 +9,7 @@ var nativeCreate = require('./_nativeCreate');
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
}
module.exports = hashClear;
diff --git a/tools/eslint/node_modules/lodash/_hashDelete.js b/tools/eslint/node_modules/lodash/_hashDelete.js
index 45b39fb00d..ea9dabf131 100644
--- a/tools/eslint/node_modules/lodash/_hashDelete.js
+++ b/tools/eslint/node_modules/lodash/_hashDelete.js
@@ -9,7 +9,9 @@
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
- return this.has(key) && delete this.__data__[key];
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
}
module.exports = hashDelete;
diff --git a/tools/eslint/node_modules/lodash/_hashSet.js b/tools/eslint/node_modules/lodash/_hashSet.js
index 56fec1eb2f..e1055283e4 100644
--- a/tools/eslint/node_modules/lodash/_hashSet.js
+++ b/tools/eslint/node_modules/lodash/_hashSet.js
@@ -15,6 +15,7 @@ var HASH_UNDEFINED = '__lodash_hash_undefined__';
*/
function hashSet(key, value) {
var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
return this;
}
diff --git a/tools/eslint/node_modules/lodash/_insertWrapDetails.js b/tools/eslint/node_modules/lodash/_insertWrapDetails.js
index 191f226de6..e790808646 100644
--- a/tools/eslint/node_modules/lodash/_insertWrapDetails.js
+++ b/tools/eslint/node_modules/lodash/_insertWrapDetails.js
@@ -10,9 +10,11 @@ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;
* @returns {string} Returns the modified source.
*/
function insertWrapDetails(source, details) {
- var length = details.length,
- lastIndex = length - 1;
-
+ var length = details.length;
+ if (!length) {
+ return source;
+ }
+ var lastIndex = length - 1;
details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
details = details.join(length > 2 ? ', ' : ' ');
return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
diff --git a/tools/eslint/node_modules/lodash/_isHostObject.js b/tools/eslint/node_modules/lodash/_isHostObject.js
deleted file mode 100644
index e598c10e34..0000000000
--- a/tools/eslint/node_modules/lodash/_isHostObject.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * Checks if `value` is a host object in IE < 9.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
- */
-function isHostObject(value) {
- // Many host objects are `Object` objects that can coerce to strings
- // despite having improperly defined `toString` methods.
- var result = false;
- if (value != null && typeof value.toString != 'function') {
- try {
- result = !!(value + '');
- } catch (e) {}
- }
- return result;
-}
-
-module.exports = isHostObject;
diff --git a/tools/eslint/node_modules/lodash/_listCacheClear.js b/tools/eslint/node_modules/lodash/_listCacheClear.js
index e4e1325813..acbe39a597 100644
--- a/tools/eslint/node_modules/lodash/_listCacheClear.js
+++ b/tools/eslint/node_modules/lodash/_listCacheClear.js
@@ -7,6 +7,7 @@
*/
function listCacheClear() {
this.__data__ = [];
+ this.size = 0;
}
module.exports = listCacheClear;
diff --git a/tools/eslint/node_modules/lodash/_listCacheDelete.js b/tools/eslint/node_modules/lodash/_listCacheDelete.js
index 2f3232836a..b1384ade97 100644
--- a/tools/eslint/node_modules/lodash/_listCacheDelete.js
+++ b/tools/eslint/node_modules/lodash/_listCacheDelete.js
@@ -28,6 +28,7 @@ function listCacheDelete(key) {
} else {
splice.call(data, index, 1);
}
+ --this.size;
return true;
}
diff --git a/tools/eslint/node_modules/lodash/_listCacheSet.js b/tools/eslint/node_modules/lodash/_listCacheSet.js
index e2f13b6be8..5855c95e40 100644
--- a/tools/eslint/node_modules/lodash/_listCacheSet.js
+++ b/tools/eslint/node_modules/lodash/_listCacheSet.js
@@ -15,6 +15,7 @@ function listCacheSet(key, value) {
index = assocIndexOf(data, key);
if (index < 0) {
+ ++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
diff --git a/tools/eslint/node_modules/lodash/_mapCacheClear.js b/tools/eslint/node_modules/lodash/_mapCacheClear.js
index edb42b5f54..bc9ca204ae 100644
--- a/tools/eslint/node_modules/lodash/_mapCacheClear.js
+++ b/tools/eslint/node_modules/lodash/_mapCacheClear.js
@@ -10,6 +10,7 @@ var Hash = require('./_Hash'),
* @memberOf MapCache
*/
function mapCacheClear() {
+ this.size = 0;
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
diff --git a/tools/eslint/node_modules/lodash/_mapCacheDelete.js b/tools/eslint/node_modules/lodash/_mapCacheDelete.js
index 08f1c2efee..946ca3c939 100644
--- a/tools/eslint/node_modules/lodash/_mapCacheDelete.js
+++ b/tools/eslint/node_modules/lodash/_mapCacheDelete.js
@@ -10,7 +10,9 @@ var getMapData = require('./_getMapData');
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
- return getMapData(this, key)['delete'](key);
+ var result = getMapData(this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
}
module.exports = mapCacheDelete;
diff --git a/tools/eslint/node_modules/lodash/_mapCacheSet.js b/tools/eslint/node_modules/lodash/_mapCacheSet.js
index 0ef1eafd87..7346849273 100644
--- a/tools/eslint/node_modules/lodash/_mapCacheSet.js
+++ b/tools/eslint/node_modules/lodash/_mapCacheSet.js
@@ -11,7 +11,11 @@ var getMapData = require('./_getMapData');
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
- getMapData(this, key).set(key, value);
+ var data = getMapData(this, key),
+ size = data.size;
+
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
return this;
}
diff --git a/tools/eslint/node_modules/lodash/_memoizeCapped.js b/tools/eslint/node_modules/lodash/_memoizeCapped.js
new file mode 100644
index 0000000000..7f71c8fbae
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_memoizeCapped.js
@@ -0,0 +1,26 @@
+var memoize = require('./memoize');
+
+/** Used as the maximum memoize cache size. */
+var MAX_MEMOIZE_SIZE = 500;
+
+/**
+ * A specialized version of `_.memoize` which clears the memoized function's
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
+ *
+ * @private
+ * @param {Function} func The function to have its output memoized.
+ * @returns {Function} Returns the new memoized function.
+ */
+function memoizeCapped(func) {
+ var result = memoize(func, function(key) {
+ if (cache.size === MAX_MEMOIZE_SIZE) {
+ cache.clear();
+ }
+ return key;
+ });
+
+ var cache = result.cache;
+ return result;
+}
+
+module.exports = memoizeCapped;
diff --git a/tools/eslint/node_modules/lodash/_overRest.js b/tools/eslint/node_modules/lodash/_overRest.js
new file mode 100644
index 0000000000..c7cdef3399
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_overRest.js
@@ -0,0 +1,36 @@
+var apply = require('./_apply');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return apply(func, this, otherArgs);
+ };
+}
+
+module.exports = overRest;
diff --git a/tools/eslint/node_modules/lodash/_setData.js b/tools/eslint/node_modules/lodash/_setData.js
index d86c61086e..e5cf3eb96a 100644
--- a/tools/eslint/node_modules/lodash/_setData.js
+++ b/tools/eslint/node_modules/lodash/_setData.js
@@ -1,9 +1,5 @@
var baseSetData = require('./_baseSetData'),
- now = require('./now');
-
-/** Used to detect hot functions by number of calls within a span of milliseconds. */
-var HOT_COUNT = 150,
- HOT_SPAN = 16;
+ shortOut = require('./_shortOut');
/**
* Sets metadata for `func`.
@@ -19,24 +15,6 @@ var HOT_COUNT = 150,
* @param {*} data The metadata.
* @returns {Function} Returns `func`.
*/
-var setData = (function() {
- var count = 0,
- lastCalled = 0;
-
- return function(key, value) {
- var stamp = now(),
- remaining = HOT_SPAN - (stamp - lastCalled);
-
- lastCalled = stamp;
- if (remaining > 0) {
- if (++count >= HOT_COUNT) {
- return key;
- }
- } else {
- count = 0;
- }
- return baseSetData(key, value);
- };
-}());
+var setData = shortOut(baseSetData);
module.exports = setData;
diff --git a/tools/eslint/node_modules/lodash/_setToString.js b/tools/eslint/node_modules/lodash/_setToString.js
new file mode 100644
index 0000000000..6ca8419678
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_setToString.js
@@ -0,0 +1,14 @@
+var baseSetToString = require('./_baseSetToString'),
+ shortOut = require('./_shortOut');
+
+/**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var setToString = shortOut(baseSetToString);
+
+module.exports = setToString;
diff --git a/tools/eslint/node_modules/lodash/_setWrapToString.js b/tools/eslint/node_modules/lodash/_setWrapToString.js
index 3c53cd0fc0..decdc44998 100644
--- a/tools/eslint/node_modules/lodash/_setWrapToString.js
+++ b/tools/eslint/node_modules/lodash/_setWrapToString.js
@@ -1,8 +1,6 @@
-var constant = require('./constant'),
- defineProperty = require('./_defineProperty'),
- getWrapDetails = require('./_getWrapDetails'),
- identity = require('./identity'),
+var getWrapDetails = require('./_getWrapDetails'),
insertWrapDetails = require('./_insertWrapDetails'),
+ setToString = require('./_setToString'),
updateWrapDetails = require('./_updateWrapDetails');
/**
@@ -15,13 +13,9 @@ var constant = require('./constant'),
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @returns {Function} Returns `wrapper`.
*/
-var setWrapToString = !defineProperty ? identity : function(wrapper, reference, bitmask) {
+function setWrapToString(wrapper, reference, bitmask) {
var source = (reference + '');
- return defineProperty(wrapper, 'toString', {
- 'configurable': true,
- 'enumerable': false,
- 'value': constant(insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)))
- });
-};
+ return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
+}
module.exports = setWrapToString;
diff --git a/tools/eslint/node_modules/lodash/_shortOut.js b/tools/eslint/node_modules/lodash/_shortOut.js
new file mode 100644
index 0000000000..a4e6507fb1
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_shortOut.js
@@ -0,0 +1,37 @@
+/** Used to detect hot functions by number of calls within a span of milliseconds. */
+var HOT_COUNT = 500,
+ HOT_SPAN = 16;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeNow = Date.now;
+
+/**
+ * Creates a function that'll short out and invoke `identity` instead
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+ * milliseconds.
+ *
+ * @private
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new shortable function.
+ */
+function shortOut(func) {
+ var count = 0,
+ lastCalled = 0;
+
+ return function() {
+ var stamp = nativeNow(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return arguments[0];
+ }
+ } else {
+ count = 0;
+ }
+ return func.apply(undefined, arguments);
+ };
+}
+
+module.exports = shortOut;
diff --git a/tools/eslint/node_modules/lodash/_shuffleSelf.js b/tools/eslint/node_modules/lodash/_shuffleSelf.js
new file mode 100644
index 0000000000..8bcc4f5c32
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_shuffleSelf.js
@@ -0,0 +1,28 @@
+var baseRandom = require('./_baseRandom');
+
+/**
+ * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @param {number} [size=array.length] The size of `array`.
+ * @returns {Array} Returns `array`.
+ */
+function shuffleSelf(array, size) {
+ var index = -1,
+ length = array.length,
+ lastIndex = length - 1;
+
+ size = size === undefined ? length : size;
+ while (++index < size) {
+ var rand = baseRandom(index, lastIndex),
+ value = array[rand];
+
+ array[rand] = array[index];
+ array[index] = value;
+ }
+ array.length = size;
+ return array;
+}
+
+module.exports = shuffleSelf;
diff --git a/tools/eslint/node_modules/lodash/_stackClear.js b/tools/eslint/node_modules/lodash/_stackClear.js
index 498482c4c7..ce8e5a92ff 100644
--- a/tools/eslint/node_modules/lodash/_stackClear.js
+++ b/tools/eslint/node_modules/lodash/_stackClear.js
@@ -9,6 +9,7 @@ var ListCache = require('./_ListCache');
*/
function stackClear() {
this.__data__ = new ListCache;
+ this.size = 0;
}
module.exports = stackClear;
diff --git a/tools/eslint/node_modules/lodash/_stackDelete.js b/tools/eslint/node_modules/lodash/_stackDelete.js
index 8c60260c73..ff9887ab64 100644
--- a/tools/eslint/node_modules/lodash/_stackDelete.js
+++ b/tools/eslint/node_modules/lodash/_stackDelete.js
@@ -8,7 +8,11 @@
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function stackDelete(key) {
- return this.__data__['delete'](key);
+ var data = this.__data__,
+ result = data['delete'](key);
+
+ this.size = data.size;
+ return result;
}
module.exports = stackDelete;
diff --git a/tools/eslint/node_modules/lodash/_stackSet.js b/tools/eslint/node_modules/lodash/_stackSet.js
index 604918376c..b790ac5f41 100644
--- a/tools/eslint/node_modules/lodash/_stackSet.js
+++ b/tools/eslint/node_modules/lodash/_stackSet.js
@@ -16,16 +16,18 @@ var LARGE_ARRAY_SIZE = 200;
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
- var cache = this.__data__;
- if (cache instanceof ListCache) {
- var pairs = cache.__data__;
+ var data = this.__data__;
+ if (data instanceof ListCache) {
+ var pairs = data.__data__;
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
pairs.push([key, value]);
+ this.size = ++data.size;
return this;
}
- cache = this.__data__ = new MapCache(pairs);
+ data = this.__data__ = new MapCache(pairs);
}
- cache.set(key, value);
+ data.set(key, value);
+ this.size = data.size;
return this;
}
diff --git a/tools/eslint/node_modules/lodash/_strictIndexOf.js b/tools/eslint/node_modules/lodash/_strictIndexOf.js
new file mode 100644
index 0000000000..0486a4956b
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_strictIndexOf.js
@@ -0,0 +1,23 @@
+/**
+ * A specialized version of `_.indexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function strictIndexOf(array, value, fromIndex) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = strictIndexOf;
diff --git a/tools/eslint/node_modules/lodash/_strictLastIndexOf.js b/tools/eslint/node_modules/lodash/_strictLastIndexOf.js
new file mode 100644
index 0000000000..d7310dcc23
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/_strictLastIndexOf.js
@@ -0,0 +1,21 @@
+/**
+ * A specialized version of `_.lastIndexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function strictLastIndexOf(array, value, fromIndex) {
+ var index = fromIndex + 1;
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return index;
+}
+
+module.exports = strictLastIndexOf;
diff --git a/tools/eslint/node_modules/lodash/_stringToPath.js b/tools/eslint/node_modules/lodash/_stringToPath.js
index 3eaf5c3924..8bb78e53ff 100644
--- a/tools/eslint/node_modules/lodash/_stringToPath.js
+++ b/tools/eslint/node_modules/lodash/_stringToPath.js
@@ -1,4 +1,4 @@
-var memoize = require('./memoize'),
+var memoizeCapped = require('./_memoizeCapped'),
toString = require('./toString');
/** Used to match property names within property paths. */
@@ -15,7 +15,7 @@ var reEscapeChar = /\\(\\)?/g;
* @param {string} string The string to convert.
* @returns {Array} Returns the property path array.
*/
-var stringToPath = memoize(function(string) {
+var stringToPath = memoizeCapped(function(string) {
string = toString(string);
var result = [];
diff --git a/tools/eslint/node_modules/lodash/_unescapeHtmlChar.js b/tools/eslint/node_modules/lodash/_unescapeHtmlChar.js
index 11e5b7d55a..a71fecb3f6 100644
--- a/tools/eslint/node_modules/lodash/_unescapeHtmlChar.js
+++ b/tools/eslint/node_modules/lodash/_unescapeHtmlChar.js
@@ -6,8 +6,7 @@ var htmlUnescapes = {
'&lt;': '<',
'&gt;': '>',
'&quot;': '"',
- '&#39;': "'",
- '&#96;': '`'
+ '&#39;': "'"
};
/**
diff --git a/tools/eslint/node_modules/lodash/_unicodeSize.js b/tools/eslint/node_modules/lodash/_unicodeSize.js
index 3f50ce86ae..26cd257038 100644
--- a/tools/eslint/node_modules/lodash/_unicodeSize.js
+++ b/tools/eslint/node_modules/lodash/_unicodeSize.js
@@ -34,7 +34,7 @@ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
function unicodeSize(string) {
var result = reUnicode.lastIndex = 0;
while (reUnicode.test(string)) {
- result++;
+ ++result;
}
return result;
}
diff --git a/tools/eslint/node_modules/lodash/after.js b/tools/eslint/node_modules/lodash/after.js
index 910923a9a6..3900c979a1 100644
--- a/tools/eslint/node_modules/lodash/after.js
+++ b/tools/eslint/node_modules/lodash/after.js
@@ -1,6 +1,6 @@
var toInteger = require('./toInteger');
-/** Used as the `TypeError` message for "Functions" methods. */
+/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
diff --git a/tools/eslint/node_modules/lodash/assign.js b/tools/eslint/node_modules/lodash/assign.js
index 5488c8b691..909db26a34 100644
--- a/tools/eslint/node_modules/lodash/assign.js
+++ b/tools/eslint/node_modules/lodash/assign.js
@@ -11,12 +11,6 @@ var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
-/** Built-in value references. */
-var propertyIsEnumerable = objectProto.propertyIsEnumerable;
-
-/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
-var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
-
/**
* Assigns own enumerable string keyed properties of source objects to the
* destination object. Source objects are applied from left to right.
@@ -50,7 +44,7 @@ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
* // => { 'a': 1, 'c': 3 }
*/
var assign = createAssigner(function(object, source) {
- if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
+ if (isPrototype(source) || isArrayLike(source)) {
copyObject(source, keys(source), object);
return;
}
diff --git a/tools/eslint/node_modules/lodash/at.js b/tools/eslint/node_modules/lodash/at.js
index 5849a8caa3..05e948254a 100644
--- a/tools/eslint/node_modules/lodash/at.js
+++ b/tools/eslint/node_modules/lodash/at.js
@@ -1,6 +1,5 @@
var baseAt = require('./_baseAt'),
- baseFlatten = require('./_baseFlatten'),
- baseRest = require('./_baseRest');
+ flatRest = require('./_flatRest');
/**
* Creates an array of values corresponding to `paths` of `object`.
@@ -19,8 +18,6 @@ var baseAt = require('./_baseAt'),
* _.at(object, ['a[0].b.c', 'a[1]']);
* // => [3, 4]
*/
-var at = baseRest(function(object, paths) {
- return baseAt(object, baseFlatten(paths, 1));
-});
+var at = flatRest(baseAt);
module.exports = at;
diff --git a/tools/eslint/node_modules/lodash/before.js b/tools/eslint/node_modules/lodash/before.js
index 87aff94906..a3e0a16c7a 100644
--- a/tools/eslint/node_modules/lodash/before.js
+++ b/tools/eslint/node_modules/lodash/before.js
@@ -1,6 +1,6 @@
var toInteger = require('./toInteger');
-/** Used as the `TypeError` message for "Functions" methods. */
+/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
diff --git a/tools/eslint/node_modules/lodash/bindAll.js b/tools/eslint/node_modules/lodash/bindAll.js
index 7d0d09d5af..a35706deed 100644
--- a/tools/eslint/node_modules/lodash/bindAll.js
+++ b/tools/eslint/node_modules/lodash/bindAll.js
@@ -1,7 +1,7 @@
var arrayEach = require('./_arrayEach'),
- baseFlatten = require('./_baseFlatten'),
- baseRest = require('./_baseRest'),
+ baseAssignValue = require('./_baseAssignValue'),
bind = require('./bind'),
+ flatRest = require('./_flatRest'),
toKey = require('./_toKey');
/**
@@ -30,10 +30,10 @@ var arrayEach = require('./_arrayEach'),
* jQuery(element).on('click', view.click);
* // => Logs 'clicked docs' when clicked.
*/
-var bindAll = baseRest(function(object, methodNames) {
- arrayEach(baseFlatten(methodNames, 1), function(key) {
+var bindAll = flatRest(function(object, methodNames) {
+ arrayEach(methodNames, function(key) {
key = toKey(key);
- object[key] = bind(object[key], object);
+ baseAssignValue(object, key, bind(object[key], object));
});
return object;
});
diff --git a/tools/eslint/node_modules/lodash/concat.js b/tools/eslint/node_modules/lodash/concat.js
index 506306c653..1da48a4fc7 100644
--- a/tools/eslint/node_modules/lodash/concat.js
+++ b/tools/eslint/node_modules/lodash/concat.js
@@ -26,17 +26,18 @@ var arrayPush = require('./_arrayPush'),
* // => [1]
*/
function concat() {
- var length = arguments.length,
- args = Array(length ? length - 1 : 0),
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
array = arguments[0],
index = length;
while (index--) {
args[index - 1] = arguments[index];
}
- return length
- ? arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1))
- : [];
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
}
module.exports = concat;
diff --git a/tools/eslint/node_modules/lodash/cond.js b/tools/eslint/node_modules/lodash/cond.js
index 28955cefd0..91515c1676 100644
--- a/tools/eslint/node_modules/lodash/cond.js
+++ b/tools/eslint/node_modules/lodash/cond.js
@@ -3,7 +3,7 @@ var apply = require('./_apply'),
baseIteratee = require('./_baseIteratee'),
baseRest = require('./_baseRest');
-/** Used as the `TypeError` message for "Functions" methods. */
+/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
diff --git a/tools/eslint/node_modules/lodash/core.js b/tools/eslint/node_modules/lodash/core.js
index de27977d22..c891e78445 100644
--- a/tools/eslint/node_modules/lodash/core.js
+++ b/tools/eslint/node_modules/lodash/core.js
@@ -13,9 +13,9 @@
var undefined;
/** Used as the semantic version number. */
- var VERSION = '4.15.0';
+ var VERSION = '4.16.4';
- /** Used as the `TypeError` message for "Functions" methods. */
+ /** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/** Used to compose bitmasks for function metadata. */
@@ -40,11 +40,12 @@
genTag = '[object GeneratorFunction]',
numberTag = '[object Number]',
objectTag = '[object Object]',
+ proxyTag = '[object Proxy]',
regexpTag = '[object RegExp]',
stringTag = '[object String]';
/** Used to match HTML entities and HTML characters. */
- var reUnescapedHtml = /[&<>"'`]/g,
+ var reUnescapedHtml = /[&<>"']/g,
reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
/** Used to map characters to HTML entities. */
@@ -53,8 +54,7 @@
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
- "'": '&#39;',
- '`': '&#96;'
+ "'": '&#39;'
};
/** Detect free variable `global` from Node.js. */
@@ -184,17 +184,6 @@
var escapeHtmlChar = basePropertyOf(htmlEscapes);
/**
- * Checks if `value` is a host object in IE < 9.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
- */
- function isHostObject() {
- return false;
- }
-
- /**
* Creates a unary function that invokes `func` with its argument transformed.
*
* @private
@@ -365,6 +354,30 @@
}
/**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+ }());
+
+ /**
* The base constructor for creating `lodash` wrapper objects.
*
* @private
@@ -414,20 +427,21 @@
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
(value === undefined && !(key in object))) {
- object[key] = value;
+ baseAssignValue(object, key, value);
}
}
/**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
*
* @private
- * @param {Object} prototype The object to inherit from.
- * @returns {Object} Returns the new object.
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
*/
- function baseCreate(proto) {
- return isObject(proto) ? objectCreate(proto) : {};
+ function baseAssignValue(object, key, value) {
+ object[key] = value;
}
/**
@@ -610,6 +624,15 @@
}
/**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+ var baseIsArguments = noop;
+
+ /**
* The base implementation of `_.isDate` without Node.js optimizations.
*
* @private
@@ -674,8 +697,8 @@
othTag = objectToString.call(other);
othTag = othTag == argsTag ? objectTag : othTag;
}
- var objIsObj = objTag == objectTag && !isHostObject(object),
- othIsObj = othTag == objectTag && !isHostObject(other),
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
stack || (stack = []);
@@ -832,24 +855,7 @@
* @returns {Function} Returns the new function.
*/
function baseRest(func, start) {
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- array = Array(length);
-
- while (++index < length) {
- array[index] = args[start + index];
- }
- index = -1;
- var otherArgs = Array(start + 1);
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = array;
- return func.apply(this, otherArgs);
- };
+ return setToString(overRest(func, start, identity), func + '');
}
/**
@@ -979,6 +985,7 @@
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object, customizer) {
+ var isNew = !object;
object || (object = {});
var index = -1,
@@ -991,7 +998,14 @@
? customizer(object[key], source[key], key, object, source)
: undefined;
- assignValue(object, key, newValue === undefined ? source[key] : newValue);
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
}
return object;
}
@@ -1327,6 +1341,17 @@
}
/**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+ }
+
+ /**
* Checks if `value` is a flattenable `arguments` object or array.
*
* @private
@@ -1357,6 +1382,46 @@
}
/**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return func.apply(this, otherArgs);
+ };
+ }
+
+ /**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var setToString = identity;
+
+ /**
* Converts `value` to a string key if it's not a string or symbol.
*
* @private
@@ -1409,17 +1474,18 @@
* // => [1]
*/
function concat() {
- var length = arguments.length,
- args = Array(length ? length - 1 : 0),
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
array = arguments[0],
index = length;
while (index--) {
args[index - 1] = arguments[index];
}
- return length
- ? arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1))
- : [];
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
}
/**
@@ -1905,7 +1971,7 @@
* @see _.forEachRight
* @example
*
- * _([1, 2]).forEach(function(value) {
+ * _.forEach([1, 2], function(value) {
* console.log(value);
* });
* // => Logs `1` then `2`.
@@ -2099,16 +2165,11 @@
* { 'user': 'barney', 'age': 34 }
* ];
*
- * _.sortBy(users, function(o) { return o.user; });
+ * _.sortBy(users, [function(o) { return o.user; }]);
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*
* _.sortBy(users, ['user', 'age']);
* // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
- *
- * _.sortBy(users, 'user', function(o) {
- * return Math.floor(o.age / 10);
- * });
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*/
function sortBy(collection, iteratee) {
var index = 0;
@@ -2212,7 +2273,7 @@
* _.defer(function(text) {
* console.log(text);
* }, 'deferred');
- * // => Logs 'deferred' after one or more milliseconds.
+ * // => Logs 'deferred' after one millisecond.
*/
var defer = baseRest(function(func, args) {
return baseDelay(func, 1, args);
@@ -2382,11 +2443,10 @@
* _.isArguments([1, 2, 3]);
* // => false
*/
- function isArguments(value) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
- (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
- }
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+ };
/**
* Checks if `value` is classified as an `Array` object.
@@ -2443,35 +2503,6 @@
}
/**
- * This method is like `_.isArrayLike` except that it also checks if `value`
- * is an object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object,
- * else `false`.
- * @example
- *
- * _.isArrayLikeObject([1, 2, 3]);
- * // => true
- *
- * _.isArrayLikeObject(document.body.children);
- * // => true
- *
- * _.isArrayLikeObject('abc');
- * // => false
- *
- * _.isArrayLikeObject(_.noop);
- * // => false
- */
- function isArrayLikeObject(value) {
- return isObjectLike(value) && isArrayLike(value);
- }
-
- /**
* Checks if `value` is classified as a boolean primitive or object.
*
* @static
@@ -2635,9 +2666,9 @@
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8-9 which returns 'object' for typed array and other constructors.
+ // in Safari 9 which returns 'object' for typed array and other constructors.
var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
+ return tag == funcTag || tag == genTag || tag == proxyTag;
}
/**
@@ -2698,7 +2729,7 @@
*/
function isObject(value) {
var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
+ return value != null && (type == 'object' || type == 'function');
}
/**
@@ -2726,7 +2757,7 @@
* // => false
*/
function isObjectLike(value) {
- return !!value && typeof value == 'object';
+ return value != null && typeof value == 'object';
}
/**
@@ -2969,8 +3000,8 @@
* @memberOf _
* @since 4.0.0
* @category Lang
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
* @example
*
* _.toString(null);
@@ -3263,8 +3294,8 @@
* _.pick(object, ['a', 'c']);
* // => { 'a': 1, 'c': 3 }
*/
- var pick = baseRest(function(object, props) {
- return object == null ? {} : basePick(object, baseMap(baseFlatten(props, 1), toKey));
+ var pick = flatRest(function(object, props) {
+ return object == null ? {} : basePick(object, baseMap(props, toKey));
});
/**
@@ -3337,8 +3368,8 @@
/*------------------------------------------------------------------------*/
/**
- * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
- * their corresponding HTML entities.
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
*
* **Note:** No other characters are escaped. To escape additional
* characters use a third-party library like [_he_](https://mths.be/he).
@@ -3349,12 +3380,6 @@
* [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
* (under "semi-related fun fact") for more details.
*
- * Backticks are escaped because in IE < 9, they can break out of
- * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
- * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
- * [#133](https://html5sec.org/#133) of the
- * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
- *
* When working with HTML you should always
* [quote attribute values](http://wonko.com/post/html-escaping) to reduce
* XSS vectors.
diff --git a/tools/eslint/node_modules/lodash/core.min.js b/tools/eslint/node_modules/lodash/core.min.js
index f5c9efaeee..c1fb1cd187 100644
--- a/tools/eslint/node_modules/lodash/core.min.js
+++ b/tools/eslint/node_modules/lodash/core.min.js
@@ -3,26 +3,27 @@
* lodash (Custom Build) /license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* Build: `lodash core -o ./dist/lodash.core.js`
*/
-;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n){return function(t){return null==t?Z:t[n]}}function r(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function e(n,t){return d(t,function(t){return n[t]})}function u(n){return n instanceof o?n:new o(n)}function o(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function i(n,t,r,e){return n===Z||J(n,an[r])&&!ln.call(e,r)?t:n}function c(n){return V(n)?vn(n):{}}function f(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");
-return setTimeout(function(){n.apply(Z,r)},t)}function a(n,t){var r=true;return jn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function l(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 p(n,t){var r=[];return jn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function s(t,r,e,u,o){var i=-1,c=t.length;for(e||(e=D),o||(o=[]);++i<c;){var f=t[i];0<r&&e(f)?1<r?s(f,r-1,e,u,o):n(o,f):u||(o[o.length]=f)}return o}function h(n,t){return n&&dn(n,t,Rn);
-}function v(n,t){return p(t,function(t){return U(n[t])})}function b(n,t){return n>t}function y(n,t,r,e,u){return n===t||(null==n||null==t||!V(n)&&!H(t)?n!==n&&t!==t:g(n,t,y,r,e,u))}function g(n,t,r,e,u,o){var i=wn(n),c=wn(t),f="[object Array]",a="[object Array]";i||(f=sn.call(n),f="[object Arguments]"==f?"[object Object]":f),c||(a=sn.call(t),a="[object Arguments]"==a?"[object Object]":a);var l="[object Object]"==f&&true,c="[object Object]"==a&&true,a=f==a;o||(o=[]);var p=On(o,function(t){return t[0]==n;
-}),s=On(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=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 2&u||(i=l&&ln.call(n,"__wrapped__"),f=c&&ln.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=r(i,f,e,u,o),o.pop(),r)}function _(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?m:t)(n)}function j(n,t){return n<t}function d(n,t){var r=-1,e=P(n)?Array(n.length):[];return jn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function m(n){var t=gn(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],Z,3)))return false}return true}}function O(n,t){return n=Object(n),C(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function x(n){
-var t;return t=_n(t===Z?n.length-1:t,0),function(){for(var r=arguments,e=-1,u=_n(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];for(e=-1,u=Array(t+1);++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function A(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 E(n){return A(n,0,n.length)}function w(n,t){var r;return jn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function k(t,r){return C(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args));
-},t)}function N(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=e?e(r[i],n[i],i,r,n):Z,f=r,a=i,i=c===Z?n[i]:c,c=f[a];ln.call(f,a)&&J(c,i)&&(i!==Z||a in f)||(f[a]=i)}return r}function S(n){return x(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 T(n){return function(){var t=arguments,r=c(n.prototype),t=n.apply(r,t);return V(t)?t:r}}function F(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==un&&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=T(n);return e}function B(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(2&u&&c>i))return false;for(var c=-1,f=true,a=1&u?[]:Z;++c<i;){var l=n[c],p=t[c];if(void 0!==Z){f=false;break}if(a){if(!w(t,function(n,t){if(!$(a,t)&&(l===n||r(l,n,e,u,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!r(l,p,e,u,o)){f=false;break}}return f}function R(n,t,r,e,u,o){var i=2&u,c=Rn(n),f=c.length,a=Rn(t).length;
-if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:ln.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&&!r(s,h,e,u,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(n){return wn(n)||M(n)}function I(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}function q(n){
-return n&&n.length?n[0]:Z}function $(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?_n(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 jn(n,_(t))}function C(n,t,e){return r(n,_(t),e,3>arguments.length,jn)}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=kn(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){
-return H(n)&&P(n)&&ln.call(n,"callee")&&(!bn.call(n,"callee")||"[object Arguments]"==sn.call(n))}function P(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 n=V(n)?sn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function V(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function H(n){return!!n&&typeof n=="object"}function K(n){return typeof n=="number"||H(n)&&"[object Number]"==sn.call(n)}
-function L(n){return typeof n=="string"||!wn(n)&&H(n)&&"[object String]"==sn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return n?e(n,Rn(n)):[]}function X(n){return n}function Y(t,r,e){var u=Rn(r),o=v(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=v(r,Rn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(t);return jn(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=E(this.__actions__)).push({
-func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}var Z,nn=1/0,tn=/[&<>"'`]/g,rn=RegExp(tn.source),en=typeof self=="object"&&self&&self.Object===Object&&self,un=typeof global=="object"&&global&&global.Object===Object&&global||en||Function("return this")(),on=(en=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,cn=function(n){return function(t){return null==n?Z:n[t]}}({"&":"&amp;",
-"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"}),fn=Array.prototype,an=Object.prototype,ln=an.hasOwnProperty,pn=0,sn=an.toString,hn=un._,vn=Object.create,bn=an.propertyIsEnumerable,yn=un.isFinite,gn=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),_n=Math.max;o.prototype=c(u.prototype),o.prototype.constructor=o;var jn=function(n,t){return function(r,e){if(null==r)return r;if(!P(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}}(h),dn=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}}(),mn=String,On=function(n){return function(t,r,e){var u=Object(t);if(!P(t)){var o=_(r);t=Rn(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=n?n.length:0;if(!e)return-1;r=null==r?0:kn(r),0>r&&(r=_n(e+r,0));n:{for(t=_(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),xn=x(function(n,t,r){
-return F(n,t,r)}),An=x(function(n,t){return f(n,1,t)}),En=x(function(n,t,r){return f(n,Nn(t)||0,r)}),wn=Array.isArray,kn=Number,Nn=Number,Sn=S(function(n,t){N(t,gn(t),n)}),Tn=S(function(n,t){N(t,I(t),n)}),Fn=S(function(n,t,r,e){N(t,Dn(t),n,e)}),Bn=x(function(n){return n.push(Z,i),Fn.apply(Z,n)}),Rn=gn,Dn=I,In=x(function(n,t){return null==n?{}:O(n,d(s(t,1),mn))});u.assignIn=Tn,u.before=G,u.bind=xn,u.chain=function(n){return n=u(n),n.__chain__=true,n},u.compact=function(n){return p(n,Boolean)},u.concat=function(){
-for(var t=arguments.length,r=Array(t?t-1:0),e=arguments[0],u=t;u--;)r[u-1]=arguments[u];return t?n(wn(e)?E(e):[e],s(r,1)):[]},u.create=function(n,t){var r=c(n);return t?Sn(r,t):r},u.defaults=Bn,u.defer=An,u.delay=En,u.filter=function(n,t){return p(n,_(t))},u.flatten=function(n){return n&&n.length?s(n,1):[]},u.flattenDeep=function(n){return n&&n.length?s(n,nn):[]},u.iteratee=_,u.keys=Rn,u.map=function(n,t){return d(n,_(t))},u.matches=function(n){return m(Sn({},n))},u.mixin=Y,u.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");
-return function(){return!n.apply(this,arguments)}},u.once=function(n){return G(2,n)},u.pick=In,u.slice=function(n,t,r){var e=n?n.length:0;return r=r===Z?e:+r,e?A(n,null==t?0:+t,r):[]},u.sortBy=function(n,r){var e=0;return r=_(r),d(d(n,function(n,t,u){return{value:n,index:e++,criteria:r(n,t,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}),t("value"))},u.tap=function(n,t){return t(n),n},u.thru=function(n,t){return t(n)},u.toArray=function(n){return P(n)?n.length?E(n):[]:W(n)},u.values=W,u.extend=Tn,Y(u,u),u.clone=function(n){return V(n)?wn(n)?E(n):N(n,gn(n)):n},u.escape=function(n){return(n=Q(n))&&rn.test(n)?n.replace(tn,cn):n},u.every=function(n,t,r){return t=r?Z:t,a(n,_(t))},u.find=On,u.forEach=z,u.has=function(n,t){return null!=n&&ln.call(n,t)},u.head=q,u.identity=X,u.indexOf=$,u.isArguments=M,
-u.isArray=wn,u.isBoolean=function(n){return true===n||false===n||H(n)&&"[object Boolean]"==sn.call(n)},u.isDate=function(n){return H(n)&&"[object Date]"==sn.call(n)},u.isEmpty=function(n){return P(n)&&(wn(n)||L(n)||U(n.splice)||M(n))?!n.length:!gn(n).length},u.isEqual=function(n,t){return y(n,t)},u.isFinite=function(n){return typeof n=="number"&&yn(n)},u.isFunction=U,u.isNaN=function(n){return K(n)&&n!=+n},u.isNull=function(n){return null===n},u.isNumber=K,u.isObject=V,u.isRegExp=function(n){return V(n)&&"[object RegExp]"==sn.call(n);
-},u.isString=L,u.isUndefined=function(n){return n===Z},u.last=function(n){var t=n?n.length:0;return t?n[t-1]:Z},u.max=function(n){return n&&n.length?l(n,X,b):Z},u.min=function(n){return n&&n.length?l(n,X,j):Z},u.noConflict=function(){return un._===this&&(un._=hn),this},u.noop=function(){},u.reduce=C,u.result=function(n,t,r){return t=null==n?Z:n[t],t===Z&&(t=r),U(t)?t.call(n):t},u.size=function(n){return null==n?0:(n=P(n)?n:gn(n),n.length)},u.some=function(n,t,r){return t=r?Z:t,w(n,_(t))},u.uniqueId=function(n){
-var t=++pn;return Q(n)+t},u.each=z,u.first=q,Y(u,function(){var n={};return h(u,function(t,r){ln.call(u.prototype,r)||(n[r]=t)}),n}(),{chain:false}),u.VERSION="4.15.0",jn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:fn)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);u.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(wn(u)?u:[],n);
-}return this[r](function(r){return t.apply(wn(r)?r:[],n)})}}),u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=function(){return k(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(un._=u, define(function(){return u})):on?((on.exports=u)._=u,en._=u):un._=u}).call(this); \ No newline at end of file
+;(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 d(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,e){return n===nn||M(n,ln[r])&&!pn.call(e,r)?t:n}function f(n,t,r){
+if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(nn,r)},t)}function a(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function l(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 p(n,t){var r=[];return mn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function s(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?s(f,r-1,e,u,o):t(o,f):u||(o[o.length]=f);
+}return o}function h(n,t){return n&&On(n,t,qn)}function v(n,t){return p(t,function(t){return V(n[t])})}function y(n,t){return n>t}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!K(t)?n!==n&&t!==t:g(n,t,b,r,e,u))}function g(n,t,r,e,u,o){var i=Sn(n),c=Sn(t),f="[object Array]",a="[object Array]";i||(f=hn.call(n),f="[object Arguments]"==f?"[object Object]":f),c||(a=hn.call(t),a="[object Arguments]"==a?"[object Object]":a);var l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);
+var p=En(o,function(t){return t[0]==n}),s=En(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 2&u||(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=r(i,f,e,u,o),o.pop(),r)}function _(n){return typeof n=="function"?n:null==n?Y:(typeof n=="object"?m:r)(n)}function j(n,t){return n<t}function d(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 m(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],nn,3)))return false}return true}}function O(n,t){return n=Object(n),G(t,function(t,r){return r in n&&(t[r]=n[r]),
+t},{})}function x(n){return xn(q(n,void 0,Y),n+"")}function A(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 E(n){return A(n,0,n.length)}function w(n,t){var r;return mn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function k(n,r){return G(r,function(n,r){return r.func.apply(r.thisArg,t([n],r.args))},n)}function N(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 S(n){return x(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 T(n){return function(){var t=arguments,r=dn(n.prototype),t=n.apply(r,t);return H(t)?t:r}}function F(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=T(n);return e}function B(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(2&u&&c>i))return false;for(var c=-1,f=true,a=1&u?[]:nn;++c<i;){var l=n[c],p=t[c];if(void 0!==nn){f=false;break}if(a){if(!w(t,function(n,t){if(!z(a,t)&&(l===n||r(l,n,e,u,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!r(l,p,e,u,o)){f=false;break}}return f}function R(n,t,r,e,u,o){var i=2&u,c=qn(n),f=c.length,a=qn(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&&!r(s,h,e,u,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 Sn(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 n&&n.length?s(n,1):[]}function P(n){return n&&n.length?n[0]:nn}function z(n,t,r){var e=n?n.length:0;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,_(t))}function G(n,t,r){return e(n,_(t),r,3>arguments.length,mn);
+}function J(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Tn(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 n=H(n)?hn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==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"||!Sn(n)&&K(n)&&"[object String]"==hn.call(n)}function W(n){return typeof n=="string"?n:null==n?"":n+""}function X(n){return n?u(n,qn(n)):[]}function Y(n){return n}function Z(n,r,e){var u=qn(r),o=v(r,u);null!=e||H(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=v(r,qn(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__=E(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}}(h),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=String,En=function(n){return function(t,r,e){var u=Object(t);if(!U(t)){var o=_(r);t=qn(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=n?n.length:0;if(!e)return-1;r=null==r?0:Tn(r),0>r&&(r=jn(e+r,0));n:{for(t=_(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),wn=x(function(n,t,r){return F(n,t,r)}),kn=x(function(n,t){return f(n,1,t)}),Nn=x(function(n,t,r){return f(n,Fn(t)||0,r)}),Sn=Array.isArray,Tn=Number,Fn=Number,Bn=S(function(n,t){N(t,_n(t),n)}),Rn=S(function(n,t){N(t,I(t),n)}),Dn=S(function(n,t,r,e){N(t,$n(t),n,e)}),In=x(function(n){return n.push(nn,c),Dn.apply(nn,n)}),qn=_n,$n=I,Pn=function(n){return xn(q(n,nn,$),n+"");
+}(function(n,t){return null==n?{}:O(n,d(t,An))});o.assignIn=Rn,o.before=J,o.bind=wn,o.chain=function(n){return n=o(n),n.__chain__=true,n},o.compact=function(n){return p(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(Sn(e)?E(e):[e],s(r,1))},o.create=function(n,t){var r=dn(n);return t?Bn(r,t):r},o.defaults=In,o.defer=kn,o.delay=Nn,o.filter=function(n,t){return p(n,_(t))},o.flatten=$,o.flattenDeep=function(n){
+return n&&n.length?s(n,tn):[]},o.iteratee=_,o.keys=qn,o.map=function(n,t){return d(n,_(t))},o.matches=function(n){return m(Bn({},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=Pn,o.slice=function(n,t,r){var e=n?n.length:0;return r=r===nn?e:+r,e?A(n,null==t?0:+t,r):[]},o.sortBy=function(n,t){var e=0;return t=_(t),d(d(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?E(n):[]:X(n)},o.values=X,o.extend=Rn,Z(o,o),o.clone=function(n){return H(n)?Sn(n)?E(n):N(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,a(n,_(t))},o.find=En,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=Sn,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)&&(Sn(t)||Q(t)||V(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=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 H(n)&&"[object RegExp]"==hn.call(n)},o.isString=Q,o.isUndefined=function(n){return n===nn},o.last=function(n){var t=n?n.length:0;return t?n[t-1]:nn},o.max=function(n){return n&&n.length?l(n,Y,y):nn},o.min=function(n){return n&&n.length?l(n,Y,j):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,w(n,_(t))},o.uniqueId=function(n){var t=++sn;return W(n)+t},o.each=C,o.first=P,Z(o,function(){var n={};return h(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.16.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(Sn(u)?u:[],n)}return this[r](function(r){return t.apply(Sn(r)?r:[],n)})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return k(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/eslint/node_modules/lodash/countBy.js b/tools/eslint/node_modules/lodash/countBy.js
index 9861dddaad..15aafbdd5b 100644
--- a/tools/eslint/node_modules/lodash/countBy.js
+++ b/tools/eslint/node_modules/lodash/countBy.js
@@ -1,4 +1,5 @@
-var createAggregator = require('./_createAggregator');
+var baseAssignValue = require('./_baseAssignValue'),
+ createAggregator = require('./_createAggregator');
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -30,7 +31,11 @@ var hasOwnProperty = objectProto.hasOwnProperty;
* // => { '3': 2, '5': 1 }
*/
var countBy = createAggregator(function(result, value, key) {
- hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1);
+ if (hasOwnProperty.call(result, key)) {
+ ++result[key];
+ } else {
+ baseAssignValue(result, key, 1);
+ }
});
module.exports = countBy;
diff --git a/tools/eslint/node_modules/lodash/debounce.js b/tools/eslint/node_modules/lodash/debounce.js
index 07dd22ee72..04d7dfd317 100644
--- a/tools/eslint/node_modules/lodash/debounce.js
+++ b/tools/eslint/node_modules/lodash/debounce.js
@@ -2,7 +2,7 @@ var isObject = require('./isObject'),
now = require('./now'),
toNumber = require('./toNumber');
-/** Used as the `TypeError` message for "Functions" methods. */
+/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/* Built-in method references for those with the same name as other `lodash` methods. */
diff --git a/tools/eslint/node_modules/lodash/defer.js b/tools/eslint/node_modules/lodash/defer.js
index 351f630bca..f6d6c6fa67 100644
--- a/tools/eslint/node_modules/lodash/defer.js
+++ b/tools/eslint/node_modules/lodash/defer.js
@@ -17,7 +17,7 @@ var baseDelay = require('./_baseDelay'),
* _.defer(function(text) {
* console.log(text);
* }, 'deferred');
- * // => Logs 'deferred' after one or more milliseconds.
+ * // => Logs 'deferred' after one millisecond.
*/
var defer = baseRest(function(func, args) {
return baseDelay(func, 1, args);
diff --git a/tools/eslint/node_modules/lodash/difference.js b/tools/eslint/node_modules/lodash/difference.js
index c18e05785b..fa28bb301f 100644
--- a/tools/eslint/node_modules/lodash/difference.js
+++ b/tools/eslint/node_modules/lodash/difference.js
@@ -6,8 +6,8 @@ var baseDifference = require('./_baseDifference'),
/**
* Creates an array of `array` values not included in the other given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons. The order of result values is determined by the
- * order they occur in the first array.
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
*
* **Note:** Unlike `_.pullAll`, this method returns a new array.
*
diff --git a/tools/eslint/node_modules/lodash/differenceBy.js b/tools/eslint/node_modules/lodash/differenceBy.js
index 16fa097a7b..2cd63e7ec0 100644
--- a/tools/eslint/node_modules/lodash/differenceBy.js
+++ b/tools/eslint/node_modules/lodash/differenceBy.js
@@ -8,8 +8,9 @@ var baseDifference = require('./_baseDifference'),
/**
* This method is like `_.difference` except that it accepts `iteratee` which
* is invoked for each element of `array` and `values` to generate the criterion
- * by which they're compared. Result values are chosen from the first array.
- * The iteratee is invoked with one argument: (value).
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
*
* **Note:** Unlike `_.pullAllBy`, this method returns a new array.
*
diff --git a/tools/eslint/node_modules/lodash/differenceWith.js b/tools/eslint/node_modules/lodash/differenceWith.js
index 82ecc95fca..c0233f4b9c 100644
--- a/tools/eslint/node_modules/lodash/differenceWith.js
+++ b/tools/eslint/node_modules/lodash/differenceWith.js
@@ -6,9 +6,9 @@ var baseDifference = require('./_baseDifference'),
/**
* This method is like `_.difference` except that it accepts `comparator`
- * which is invoked to compare elements of `array` to `values`. Result values
- * are chosen from the first array. The comparator is invoked with two arguments:
- * (arrVal, othVal).
+ * which is invoked to compare elements of `array` to `values`. The order and
+ * references of result values are determined by the first array. The comparator
+ * is invoked with two arguments: (arrVal, othVal).
*
* **Note:** Unlike `_.pullAllWith`, this method returns a new array.
*
diff --git a/tools/eslint/node_modules/lodash/escape.js b/tools/eslint/node_modules/lodash/escape.js
index 176417c4c1..9247e0029b 100644
--- a/tools/eslint/node_modules/lodash/escape.js
+++ b/tools/eslint/node_modules/lodash/escape.js
@@ -2,12 +2,12 @@ var escapeHtmlChar = require('./_escapeHtmlChar'),
toString = require('./toString');
/** Used to match HTML entities and HTML characters. */
-var reUnescapedHtml = /[&<>"'`]/g,
+var reUnescapedHtml = /[&<>"']/g,
reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
/**
- * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
- * their corresponding HTML entities.
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
*
* **Note:** No other characters are escaped. To escape additional
* characters use a third-party library like [_he_](https://mths.be/he).
@@ -18,12 +18,6 @@ var reUnescapedHtml = /[&<>"'`]/g,
* [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
* (under "semi-related fun fact") for more details.
*
- * Backticks are escaped because in IE < 9, they can break out of
- * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
- * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
- * [#133](https://html5sec.org/#133) of the
- * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
- *
* When working with HTML you should always
* [quote attribute values](http://wonko.com/post/html-escaping) to reduce
* XSS vectors.
diff --git a/tools/eslint/node_modules/lodash/forEach.js b/tools/eslint/node_modules/lodash/forEach.js
index 143515ffe9..0ce879f934 100644
--- a/tools/eslint/node_modules/lodash/forEach.js
+++ b/tools/eslint/node_modules/lodash/forEach.js
@@ -23,7 +23,7 @@ var arrayEach = require('./_arrayEach'),
* @see _.forEachRight
* @example
*
- * _([1, 2]).forEach(function(value) {
+ * _.forEach([1, 2], function(value) {
* console.log(value);
* });
* // => Logs `1` then `2`.
diff --git a/tools/eslint/node_modules/lodash/fp/_convertBrowser.js b/tools/eslint/node_modules/lodash/fp/_convertBrowser.js
index 1874a5423c..bde030dc08 100644
--- a/tools/eslint/node_modules/lodash/fp/_convertBrowser.js
+++ b/tools/eslint/node_modules/lodash/fp/_convertBrowser.js
@@ -12,7 +12,7 @@ function browserConvert(lodash, options) {
return baseConvert(lodash, lodash, options);
}
-if (typeof _ == 'function') {
+if (typeof _ == 'function' && typeof _.runInContext == 'function') {
_ = browserConvert(_.runInContext());
}
module.exports = browserConvert;
diff --git a/tools/eslint/node_modules/lodash/fp/_mapping.js b/tools/eslint/node_modules/lodash/fp/_mapping.js
index dd4abcb551..7fa8e672e0 100644
--- a/tools/eslint/node_modules/lodash/fp/_mapping.js
+++ b/tools/eslint/node_modules/lodash/fp/_mapping.js
@@ -108,9 +108,10 @@ exports.aryMethod = {
'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
- 'padCharsStart', 'pullAllBy', 'pullAllWith', 'reduce', 'reduceRight', 'replace',
- 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy',
- 'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'
+ 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',
+ 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy',
+ 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy',
+ 'xorWith', 'zipWith'
],
'4': [
'fill', 'setWith', 'updateWith'
@@ -189,6 +190,8 @@ exports.methodRearg = {
'padCharsStart': [2, 1, 0],
'pullAllBy': [2, 1, 0],
'pullAllWith': [2, 1, 0],
+ 'rangeStep': [1, 2, 0],
+ 'rangeStepRight': [1, 2, 0],
'setWith': [3, 1, 2, 0],
'sortedIndexBy': [2, 1, 0],
'sortedLastIndexBy': [2, 1, 0],
@@ -310,6 +313,8 @@ exports.remap = {
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'propertyOf': 'get',
+ 'rangeStep': 'range',
+ 'rangeStepRight': 'rangeRight',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
diff --git a/tools/eslint/node_modules/lodash/fp/rangeStep.js b/tools/eslint/node_modules/lodash/fp/rangeStep.js
new file mode 100644
index 0000000000..d72dfc200c
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/fp/rangeStep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rangeStep', require('../range'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/tools/eslint/node_modules/lodash/fp/rangeStepRight.js b/tools/eslint/node_modules/lodash/fp/rangeStepRight.js
new file mode 100644
index 0000000000..8b2a67bc65
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/fp/rangeStepRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rangeStepRight', require('../rangeRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/tools/eslint/node_modules/lodash/groupBy.js b/tools/eslint/node_modules/lodash/groupBy.js
index 3a7dbaf437..5b73b41043 100644
--- a/tools/eslint/node_modules/lodash/groupBy.js
+++ b/tools/eslint/node_modules/lodash/groupBy.js
@@ -1,4 +1,5 @@
-var createAggregator = require('./_createAggregator');
+var baseAssignValue = require('./_baseAssignValue'),
+ createAggregator = require('./_createAggregator');
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -34,7 +35,7 @@ var groupBy = createAggregator(function(result, value, key) {
if (hasOwnProperty.call(result, key)) {
result[key].push(value);
} else {
- result[key] = [value];
+ baseAssignValue(result, key, [value]);
}
});
diff --git a/tools/eslint/node_modules/lodash/intersection.js b/tools/eslint/node_modules/lodash/intersection.js
index b56d4dd325..a94c13512a 100644
--- a/tools/eslint/node_modules/lodash/intersection.js
+++ b/tools/eslint/node_modules/lodash/intersection.js
@@ -6,8 +6,8 @@ var arrayMap = require('./_arrayMap'),
/**
* Creates an array of unique values that are included in all given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons. The order of result values is determined by the
- * order they occur in the first array.
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
*
* @static
* @memberOf _
diff --git a/tools/eslint/node_modules/lodash/intersectionBy.js b/tools/eslint/node_modules/lodash/intersectionBy.js
index 436c28646d..31461aae53 100644
--- a/tools/eslint/node_modules/lodash/intersectionBy.js
+++ b/tools/eslint/node_modules/lodash/intersectionBy.js
@@ -8,8 +8,9 @@ var arrayMap = require('./_arrayMap'),
/**
* This method is like `_.intersection` except that it accepts `iteratee`
* which is invoked for each element of each `arrays` to generate the criterion
- * by which they're compared. Result values are chosen from the first array.
- * The iteratee is invoked with one argument: (value).
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
*
* @static
* @memberOf _
diff --git a/tools/eslint/node_modules/lodash/intersectionWith.js b/tools/eslint/node_modules/lodash/intersectionWith.js
index 736eca26a4..0ba2f9a61e 100644
--- a/tools/eslint/node_modules/lodash/intersectionWith.js
+++ b/tools/eslint/node_modules/lodash/intersectionWith.js
@@ -6,9 +6,9 @@ var arrayMap = require('./_arrayMap'),
/**
* This method is like `_.intersection` except that it accepts `comparator`
- * which is invoked to compare elements of `arrays`. Result values are chosen
- * from the first array. The comparator is invoked with two arguments:
- * (arrVal, othVal).
+ * which is invoked to compare elements of `arrays`. The order and references
+ * of result values are determined by the first array. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
diff --git a/tools/eslint/node_modules/lodash/isArguments.js b/tools/eslint/node_modules/lodash/isArguments.js
index 624a2f3caa..8b9ed66cdd 100644
--- a/tools/eslint/node_modules/lodash/isArguments.js
+++ b/tools/eslint/node_modules/lodash/isArguments.js
@@ -1,7 +1,5 @@
-var isArrayLikeObject = require('./isArrayLikeObject');
-
-/** `Object#toString` result references. */
-var argsTag = '[object Arguments]';
+var baseIsArguments = require('./_baseIsArguments'),
+ isObjectLike = require('./isObjectLike');
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -9,13 +7,6 @@ var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
-
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
@@ -37,10 +28,9 @@ var propertyIsEnumerable = objectProto.propertyIsEnumerable;
* _.isArguments([1, 2, 3]);
* // => false
*/
-function isArguments(value) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
- (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
-}
+var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+};
module.exports = isArguments;
diff --git a/tools/eslint/node_modules/lodash/isElement.js b/tools/eslint/node_modules/lodash/isElement.js
index 62cdb062ed..0c151a4759 100644
--- a/tools/eslint/node_modules/lodash/isElement.js
+++ b/tools/eslint/node_modules/lodash/isElement.js
@@ -19,7 +19,7 @@ var isObjectLike = require('./isObjectLike'),
* // => false
*/
function isElement(value) {
- return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
+ return value != null && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
}
module.exports = isElement;
diff --git a/tools/eslint/node_modules/lodash/isEmpty.js b/tools/eslint/node_modules/lodash/isEmpty.js
index 726ac9871f..e190425701 100644
--- a/tools/eslint/node_modules/lodash/isEmpty.js
+++ b/tools/eslint/node_modules/lodash/isEmpty.js
@@ -1,10 +1,11 @@
-var getTag = require('./_getTag'),
+var baseKeys = require('./_baseKeys'),
+ getTag = require('./_getTag'),
isArguments = require('./isArguments'),
isArray = require('./isArray'),
isArrayLike = require('./isArrayLike'),
isBuffer = require('./isBuffer'),
isPrototype = require('./_isPrototype'),
- nativeKeys = require('./_nativeKeys');
+ isTypedArray = require('./isTypedArray');
/** `Object#toString` result references. */
var mapTag = '[object Map]',
@@ -16,12 +17,6 @@ var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
-/** Built-in value references. */
-var propertyIsEnumerable = objectProto.propertyIsEnumerable;
-
-/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
-var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
-
/**
* Checks if `value` is an empty object, collection, map, or set.
*
@@ -57,16 +52,16 @@ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
*/
function isEmpty(value) {
if (isArrayLike(value) &&
- (isArray(value) || typeof value == 'string' ||
- typeof value.splice == 'function' || isBuffer(value) || isArguments(value))) {
+ (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
+ isBuffer(value) || isTypedArray(value) || isArguments(value))) {
return !value.length;
}
var tag = getTag(value);
if (tag == mapTag || tag == setTag) {
return !value.size;
}
- if (nonEnumShadows || isPrototype(value)) {
- return !nativeKeys(value).length;
+ if (isPrototype(value)) {
+ return !baseKeys(value).length;
}
for (var key in value) {
if (hasOwnProperty.call(value, key)) {
diff --git a/tools/eslint/node_modules/lodash/isFunction.js b/tools/eslint/node_modules/lodash/isFunction.js
index f1d440b477..17ccf32391 100644
--- a/tools/eslint/node_modules/lodash/isFunction.js
+++ b/tools/eslint/node_modules/lodash/isFunction.js
@@ -2,7 +2,8 @@ var isObject = require('./isObject');
/** `Object#toString` result references. */
var funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]';
+ genTag = '[object GeneratorFunction]',
+ proxyTag = '[object Proxy]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -33,9 +34,9 @@ var objectToString = objectProto.toString;
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8-9 which returns 'object' for typed array and other constructors.
+ // in Safari 9 which returns 'object' for typed array and other constructors.
var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
+ return tag == funcTag || tag == genTag || tag == proxyTag;
}
module.exports = isFunction;
diff --git a/tools/eslint/node_modules/lodash/isNative.js b/tools/eslint/node_modules/lodash/isNative.js
index 4bd57d8d12..310b39d2bc 100644
--- a/tools/eslint/node_modules/lodash/isNative.js
+++ b/tools/eslint/node_modules/lodash/isNative.js
@@ -1,6 +1,9 @@
var baseIsNative = require('./_baseIsNative'),
isMaskable = require('./_isMaskable');
+/** Error message constants. */
+var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://github.com/es-shims.';
+
/**
* Checks if `value` is a pristine native function.
*
@@ -29,7 +32,7 @@ var baseIsNative = require('./_baseIsNative'),
*/
function isNative(value) {
if (isMaskable(value)) {
- throw new Error('This method is not supported with core-js. Try https://github.com/es-shims.');
+ throw new Error(CORE_ERROR_TEXT);
}
return baseIsNative(value);
}
diff --git a/tools/eslint/node_modules/lodash/isObject.js b/tools/eslint/node_modules/lodash/isObject.js
index 4f96dd0a22..1dc893918b 100644
--- a/tools/eslint/node_modules/lodash/isObject.js
+++ b/tools/eslint/node_modules/lodash/isObject.js
@@ -25,7 +25,7 @@
*/
function isObject(value) {
var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
+ return value != null && (type == 'object' || type == 'function');
}
module.exports = isObject;
diff --git a/tools/eslint/node_modules/lodash/isObjectLike.js b/tools/eslint/node_modules/lodash/isObjectLike.js
index e34114be54..301716b5a5 100644
--- a/tools/eslint/node_modules/lodash/isObjectLike.js
+++ b/tools/eslint/node_modules/lodash/isObjectLike.js
@@ -23,7 +23,7 @@
* // => false
*/
function isObjectLike(value) {
- return !!value && typeof value == 'object';
+ return value != null && typeof value == 'object';
}
module.exports = isObjectLike;
diff --git a/tools/eslint/node_modules/lodash/isPlainObject.js b/tools/eslint/node_modules/lodash/isPlainObject.js
index 3ac962c7f8..035fbb2a12 100644
--- a/tools/eslint/node_modules/lodash/isPlainObject.js
+++ b/tools/eslint/node_modules/lodash/isPlainObject.js
@@ -1,5 +1,4 @@
var getPrototype = require('./_getPrototype'),
- isHostObject = require('./_isHostObject'),
isObjectLike = require('./isObjectLike');
/** `Object#toString` result references. */
@@ -54,8 +53,7 @@ var objectToString = objectProto.toString;
* // => true
*/
function isPlainObject(value) {
- if (!isObjectLike(value) ||
- objectToString.call(value) != objectTag || isHostObject(value)) {
+ if (!isObjectLike(value) || objectToString.call(value) != objectTag) {
return false;
}
var proto = getPrototype(value);
diff --git a/tools/eslint/node_modules/lodash/keyBy.js b/tools/eslint/node_modules/lodash/keyBy.js
index 44393bf57d..d0047a5f28 100644
--- a/tools/eslint/node_modules/lodash/keyBy.js
+++ b/tools/eslint/node_modules/lodash/keyBy.js
@@ -1,4 +1,5 @@
-var createAggregator = require('./_createAggregator');
+var baseAssignValue = require('./_baseAssignValue'),
+ createAggregator = require('./_createAggregator');
/**
* Creates an object composed of keys generated from the results of running
@@ -30,7 +31,7 @@ var createAggregator = require('./_createAggregator');
* // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
*/
var keyBy = createAggregator(function(result, value, key) {
- result[key] = value;
+ baseAssignValue(result, key, value);
});
module.exports = keyBy;
diff --git a/tools/eslint/node_modules/lodash/lastIndexOf.js b/tools/eslint/node_modules/lodash/lastIndexOf.js
index c2e2c41124..9201cb9a28 100644
--- a/tools/eslint/node_modules/lodash/lastIndexOf.js
+++ b/tools/eslint/node_modules/lodash/lastIndexOf.js
@@ -1,5 +1,6 @@
var baseFindIndex = require('./_baseFindIndex'),
baseIsNaN = require('./_baseIsNaN'),
+ strictLastIndexOf = require('./_strictLastIndexOf'),
toInteger = require('./toInteger');
/* Built-in method references for those with the same name as other `lodash` methods. */
@@ -35,21 +36,11 @@ function lastIndexOf(array, value, fromIndex) {
var index = length;
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
- index = (
- index < 0
- ? nativeMax(length + index, 0)
- : nativeMin(index, length - 1)
- ) + 1;
+ index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
}
- if (value !== value) {
- return baseFindIndex(array, baseIsNaN, index - 1, true);
- }
- while (index--) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
+ return value === value
+ ? strictLastIndexOf(array, value, index)
+ : baseFindIndex(array, baseIsNaN, index, true);
}
module.exports = lastIndexOf;
diff --git a/tools/eslint/node_modules/lodash/lodash.js b/tools/eslint/node_modules/lodash/lodash.js
index 6b25256304..361e74d900 100644
--- a/tools/eslint/node_modules/lodash/lodash.js
+++ b/tools/eslint/node_modules/lodash/lodash.js
@@ -12,17 +12,21 @@
var undefined;
/** Used as the semantic version number. */
- var VERSION = '4.15.0';
+ var VERSION = '4.16.4';
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
- /** Used as the `TypeError` message for "Functions" methods. */
- var FUNC_ERROR_TEXT = 'Expected a function';
+ /** Error message constants. */
+ var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://github.com/es-shims.',
+ FUNC_ERROR_TEXT = 'Expected a function';
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
+ /** Used as the maximum memoize cache size. */
+ var MAX_MEMOIZE_SIZE = 500;
+
/** Used as the internal argument placeholder. */
var PLACEHOLDER = '__lodash_placeholder__';
@@ -47,7 +51,7 @@
DEFAULT_TRUNC_OMISSION = '...';
/** Used to detect hot functions by number of calls within a span of milliseconds. */
- var HOT_COUNT = 150,
+ var HOT_COUNT = 500,
HOT_SPAN = 16;
/** Used to indicate the type of lazy iteratees. */
@@ -91,6 +95,7 @@
numberTag = '[object Number]',
objectTag = '[object Object]',
promiseTag = '[object Promise]',
+ proxyTag = '[object Proxy]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
@@ -116,8 +121,8 @@
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
/** Used to match HTML entities and HTML characters. */
- var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g,
- reUnescapedHtml = /[&<>"'`]/g,
+ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
+ reUnescapedHtml = /[&<>"']/g,
reHasEscapedHtml = RegExp(reEscapedHtml.source),
reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
@@ -164,9 +169,6 @@
/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/;
- /** Used to detect hexadecimal string values. */
- var reHasHexPrefix = /^0x/i;
-
/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
@@ -361,7 +363,7 @@
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
'\u0132': 'IJ', '\u0133': 'ij',
'\u0152': 'Oe', '\u0153': 'oe',
- '\u0149': "'n", '\u017f': 'ss'
+ '\u0149': "'n", '\u017f': 's'
};
/** Used to map characters to HTML entities. */
@@ -370,8 +372,7 @@
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
- "'": '&#39;',
- '`': '&#96;'
+ "'": '&#39;'
};
/** Used to map HTML entities to characters. */
@@ -380,8 +381,7 @@
'&lt;': '<',
'&gt;': '>',
'&quot;': '"',
- '&#39;': "'",
- '&#96;': '`'
+ '&#39;': "'"
};
/** Used to escape characters for inclusion in compiled string literals. */
@@ -822,18 +822,9 @@
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOf(array, value, fromIndex) {
- if (value !== value) {
- return baseFindIndex(array, baseIsNaN, fromIndex);
- }
- var index = fromIndex - 1,
- length = array.length;
-
- while (++index < length) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
+ return value === value
+ ? strictIndexOf(array, value, fromIndex)
+ : baseFindIndex(array, baseIsNaN, fromIndex);
}
/**
@@ -1038,7 +1029,7 @@
}
/**
- * Checks if a cache value for `key` exists.
+ * Checks if a `cache` value for `key` exists.
*
* @private
* @param {Object} cache The cache to query.
@@ -1096,7 +1087,7 @@
while (length--) {
if (array[length] === placeholder) {
- result++;
+ ++result;
}
}
return result;
@@ -1167,25 +1158,6 @@
}
/**
- * Checks if `value` is a host object in IE < 9.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
- */
- function isHostObject(value) {
- // Many host objects are `Object` objects that can coerce to strings
- // despite having improperly defined `toString` methods.
- var result = false;
- if (value != null && typeof value.toString != 'function') {
- try {
- result = !!(value + '');
- } catch (e) {}
- }
- return result;
- }
-
- /**
* Converts `iterator` to an array.
*
* @private
@@ -1293,6 +1265,48 @@
}
/**
+ * A specialized version of `_.indexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function strictIndexOf(array, value, fromIndex) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * A specialized version of `_.lastIndexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function strictLastIndexOf(array, value, fromIndex) {
+ var index = fromIndex + 1;
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return index;
+ }
+
+ /**
* Gets the number of symbols in `string`.
*
* @private
@@ -1337,7 +1351,7 @@
function unicodeSize(string) {
var result = reUnicode.lastIndex = 0;
while (reUnicode.test(string)) {
- result++;
+ ++result;
}
return result;
}
@@ -1392,17 +1406,10 @@
* lodash.isFunction(lodash.bar);
* // => true
*
- * // Use `context` to stub `Date#getTime` use in `_.now`.
- * var stubbed = _.runInContext({
- * 'Date': function() {
- * return { 'getTime': stubGetTime };
- * }
- * });
- *
* // Create a suped-up `defer` in Node.js.
* var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
*/
- function runInContext(context) {
+ var runInContext = (function runInContext(context) {
context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root;
/** Built-in constructor references. */
@@ -1462,6 +1469,7 @@
var Buffer = moduleExports ? context.Buffer : undefined,
Symbol = context.Symbol,
Uint8Array = context.Uint8Array,
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
getPrototype = overArg(Object.getPrototypeOf, Object),
iteratorSymbol = Symbol ? Symbol.iterator : undefined,
objectCreate = Object.create,
@@ -1469,6 +1477,14 @@
splice = arrayProto.splice,
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
+ var defineProperty = (function() {
+ try {
+ var func = getNative(Object, 'defineProperty');
+ func({}, '', {});
+ return func;
+ } catch (e) {}
+ }());
+
/** Mocked built-ins. */
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
ctxNow = Date && Date.now !== root.Date.now && Date.now,
@@ -1484,6 +1500,7 @@
nativeKeys = overArg(Object.keys, Object),
nativeMax = Math.max,
nativeMin = Math.min,
+ nativeNow = Date.now,
nativeParseInt = context.parseInt,
nativeRandom = Math.random,
nativeReverse = arrayProto.reverse;
@@ -1496,20 +1513,9 @@
WeakMap = getNative(context, 'WeakMap'),
nativeCreate = getNative(Object, 'create');
- /* Used to set `toString` methods. */
- var defineProperty = (function() {
- var func = getNative(Object, 'defineProperty'),
- name = getNative.name;
-
- return (name && name.length > 2) ? func : undefined;
- }());
-
/** Used to store function metadata. */
var metaMap = WeakMap && new WeakMap;
- /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
- var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
-
/** Used to lookup unminified function names. */
var realNames = {};
@@ -1657,6 +1663,30 @@
}
/**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+ }());
+
+ /**
* The function whose prototype chain sequence wrappers inherit from.
*
* @private
@@ -1897,6 +1927,7 @@
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
}
/**
@@ -1910,7 +1941,9 @@
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
- return this.has(key) && delete this.__data__[key];
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
}
/**
@@ -1957,6 +1990,7 @@
*/
function hashSet(key, value) {
var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
return this;
}
@@ -1997,6 +2031,7 @@
*/
function listCacheClear() {
this.__data__ = [];
+ this.size = 0;
}
/**
@@ -2021,6 +2056,7 @@
} else {
splice.call(data, index, 1);
}
+ --this.size;
return true;
}
@@ -2068,6 +2104,7 @@
index = assocIndexOf(data, key);
if (index < 0) {
+ ++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
@@ -2110,6 +2147,7 @@
* @memberOf MapCache
*/
function mapCacheClear() {
+ this.size = 0;
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
@@ -2127,7 +2165,9 @@
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
- return getMapData(this, key)['delete'](key);
+ var result = getMapData(this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
}
/**
@@ -2167,7 +2207,11 @@
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
- getMapData(this, key).set(key, value);
+ var data = getMapData(this, key),
+ size = data.size;
+
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
return this;
}
@@ -2240,7 +2284,8 @@
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
- this.__data__ = new ListCache(entries);
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
}
/**
@@ -2252,6 +2297,7 @@
*/
function stackClear() {
this.__data__ = new ListCache;
+ this.size = 0;
}
/**
@@ -2264,7 +2310,11 @@
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function stackDelete(key) {
- return this.__data__['delete'](key);
+ var data = this.__data__,
+ result = data['delete'](key);
+
+ this.size = data.size;
+ return result;
}
/**
@@ -2304,16 +2354,18 @@
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
- var cache = this.__data__;
- if (cache instanceof ListCache) {
- var pairs = cache.__data__;
+ var data = this.__data__;
+ if (data instanceof ListCache) {
+ var pairs = data.__data__;
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
pairs.push([key, value]);
+ this.size = ++data.size;
return this;
}
- cache = this.__data__ = new MapCache(pairs);
+ data = this.__data__ = new MapCache(pairs);
}
- cache.set(key, value);
+ data.set(key, value);
+ this.size = data.size;
return this;
}
@@ -2335,18 +2387,26 @@
* @returns {Array} Returns the array of property names.
*/
function arrayLikeKeys(value, inherited) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- // Safari 9 makes `arguments.length` enumerable in strict mode.
- var result = (isArray(value) || isArguments(value))
- ? baseTimes(value.length, String)
- : [];
-
- var length = result.length,
- skipIndexes = !!length;
+ var isArr = isArray(value),
+ isArg = !isArr && isArguments(value),
+ isBuff = !isArr && !isArg && isBuffer(value),
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes ? baseTimes(value.length, String) : [],
+ length = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) &&
- !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
+ !(skipIndexes && (
+ // Safari 9 has enumerable `arguments.length` in strict mode.
+ key == 'length' ||
+ // Node.js 0.10 has enumerable non-index properties on buffers.
+ (isBuff && (key == 'offset' || key == 'parent')) ||
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+ // Skip index properties.
+ isIndex(key, length)
+ ))) {
result.push(key);
}
}
@@ -2354,6 +2414,41 @@
}
/**
+ * A specialized version of `_.sample` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @returns {*} Returns the random element.
+ */
+ function arraySample(array) {
+ var length = array.length;
+ return length ? array[baseRandom(0, length - 1)] : undefined;
+ }
+
+ /**
+ * A specialized version of `_.sampleSize` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+ function arraySampleSize(array, n) {
+ return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
+ }
+
+ /**
+ * A specialized version of `_.shuffle` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+ function arrayShuffle(array) {
+ return shuffleSelf(copyArray(array));
+ }
+
+ /**
* Used by `_.defaults` to customize its `_.assignIn` use.
*
* @private
@@ -2382,8 +2477,8 @@
*/
function assignMergeValue(object, key, value) {
if ((value !== undefined && !eq(object[key], value)) ||
- (typeof key == 'number' && value === undefined && !(key in object))) {
- object[key] = value;
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
}
}
@@ -2401,7 +2496,7 @@
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
(value === undefined && !(key in object))) {
- object[key] = value;
+ baseAssignValue(object, key, value);
}
}
@@ -2455,6 +2550,28 @@
}
/**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function baseAssignValue(object, key, value) {
+ if (key == '__proto__' && defineProperty) {
+ defineProperty(object, key, {
+ 'configurable': true,
+ 'enumerable': true,
+ 'value': value,
+ 'writable': true
+ });
+ } else {
+ object[key] = value;
+ }
+ }
+
+ /**
* The base implementation of `_.at` without support for individual paths.
*
* @private
@@ -2534,9 +2651,6 @@
return cloneBuffer(value, isDeep);
}
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
- if (isHostObject(value)) {
- return object ? value : {};
- }
result = initCloneObject(isFunc ? {} : value);
if (!isDeep) {
return copySymbols(value, baseAssign(result, value));
@@ -2556,9 +2670,7 @@
}
stack.set(value, result);
- if (!isArr) {
- var props = isFull ? getAllKeys(value) : keys(value);
- }
+ var props = isArr ? undefined : (isFull ? getAllKeys : keys)(value);
arrayEach(props || value, function(subValue, key) {
if (props) {
key = subValue;
@@ -2611,18 +2723,6 @@
}
/**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
- *
- * @private
- * @param {Object} prototype The object to inherit from.
- * @returns {Object} Returns the new object.
- */
- function baseCreate(proto) {
- return isObject(proto) ? objectCreate(proto) : {};
- }
-
- /**
* The base implementation of `_.delay` and `_.defer` which accepts `args`
* to provide to `func`.
*
@@ -3105,6 +3205,17 @@
}
/**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+ function baseIsArguments(value) {
+ return isObjectLike(value) && objectToString.call(value) == argsTag;
+ }
+
+ /**
* The base implementation of `_.isArrayBuffer` without Node.js optimizations.
*
* @private
@@ -3180,10 +3291,17 @@
othTag = getTag(other);
othTag = othTag == argsTag ? objectTag : othTag;
}
- var objIsObj = objTag == objectTag && !isHostObject(object),
- othIsObj = othTag == objectTag && !isHostObject(other),
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
+ if (isSameTag && isBuffer(object)) {
+ if (!isBuffer(other)) {
+ return false;
+ }
+ objIsArr = true;
+ objIsObj = false;
+ }
if (isSameTag && !objIsObj) {
stack || (stack = new Stack);
return (objIsArr || isTypedArray(object))
@@ -3286,7 +3404,7 @@
if (!isObject(value) || isMasked(value)) {
return false;
}
- var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
@@ -3473,14 +3591,7 @@
if (object === source) {
return;
}
- if (!(isArray(source) || isTypedArray(source))) {
- var props = baseKeysIn(source);
- }
- arrayEach(props || source, function(srcValue, key) {
- if (props) {
- key = srcValue;
- srcValue = source[key];
- }
+ baseFor(source, function(srcValue, key) {
if (isObject(srcValue)) {
stack || (stack = new Stack);
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
@@ -3495,7 +3606,7 @@
}
assignMergeValue(object, key, newValue);
}
- });
+ }, keysIn);
}
/**
@@ -3529,29 +3640,37 @@
var isCommon = newValue === undefined;
if (isCommon) {
+ var isArr = isArray(srcValue),
+ isBuff = !isArr && isBuffer(srcValue),
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
+
newValue = srcValue;
- if (isArray(srcValue) || isTypedArray(srcValue)) {
+ if (isArr || isBuff || isTyped) {
if (isArray(objValue)) {
newValue = objValue;
}
else if (isArrayLikeObject(objValue)) {
newValue = copyArray(objValue);
}
- else {
+ else if (isBuff) {
+ isCommon = false;
+ newValue = cloneBuffer(srcValue, true);
+ }
+ else if (isTyped) {
isCommon = false;
- newValue = baseClone(srcValue, true);
+ newValue = cloneTypedArray(srcValue, true);
+ }
+ else {
+ newValue = [];
}
}
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ newValue = objValue;
if (isArguments(objValue)) {
newValue = toPlainObject(objValue);
}
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
- isCommon = false;
- newValue = baseClone(srcValue, true);
- }
- else {
- newValue = objValue;
+ newValue = initCloneObject(srcValue);
}
}
else {
@@ -3644,7 +3763,7 @@
value = object[key];
if (predicate(value, key)) {
- result[key] = value;
+ baseAssignValue(result, key, value);
}
}
return result;
@@ -3810,24 +3929,31 @@
* @returns {Function} Returns the new function.
*/
function baseRest(func, start) {
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- array = Array(length);
+ return setToString(overRest(func, start, identity), func + '');
+ }
- while (++index < length) {
- array[index] = args[start + index];
- }
- index = -1;
- var otherArgs = Array(start + 1);
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = array;
- return apply(func, this, otherArgs);
- };
+ /**
+ * The base implementation of `_.sample`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ */
+ function baseSample(collection) {
+ return arraySample(values(collection));
+ }
+
+ /**
+ * The base implementation of `_.sampleSize` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+ function baseSampleSize(collection, n) {
+ var array = values(collection);
+ return shuffleSelf(array, baseClamp(n, 0, array.length));
}
/**
@@ -3871,7 +3997,7 @@
}
/**
- * The base implementation of `setData` without support for hot loop detection.
+ * The base implementation of `setData` without support for hot loop shorting.
*
* @private
* @param {Function} func The function to associate metadata with.
@@ -3884,6 +4010,34 @@
};
/**
+ * The base implementation of `setToString` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var baseSetToString = !defineProperty ? identity : function(func, string) {
+ return defineProperty(func, 'toString', {
+ 'configurable': true,
+ 'enumerable': false,
+ 'value': constant(string),
+ 'writable': true
+ });
+ };
+
+ /**
+ * The base implementation of `_.shuffle`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+ function baseShuffle(collection) {
+ return shuffleSelf(values(collection));
+ }
+
+ /**
* The base implementation of `_.slice` without an iteratee call guard.
*
* @private
@@ -4076,6 +4230,10 @@
if (typeof value == 'string') {
return value;
}
+ if (isArray(value)) {
+ // Recursively convert values (susceptible to call stack limits).
+ return arrayMap(value, baseToString) + '';
+ }
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
@@ -4298,6 +4456,17 @@
}
/**
+ * A `baseRest` alias which can be replaced with `identity` by module
+ * replacement plugins.
+ *
+ * @private
+ * @type {Function}
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ var castRest = baseRest;
+
+ /**
* Casts `array` to a slice if it's needed.
*
* @private
@@ -4334,7 +4503,9 @@
if (isDeep) {
return buffer.slice();
}
- var result = new buffer.constructor(buffer.length);
+ var length = buffer.length,
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
+
buffer.copy(result);
return result;
}
@@ -4611,6 +4782,7 @@
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object, customizer) {
+ var isNew = !object;
object || (object = {});
var index = -1,
@@ -4623,7 +4795,14 @@
? customizer(object[key], source[key], key, object, source)
: undefined;
- assignValue(object, key, newValue === undefined ? source[key] : newValue);
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
}
return object;
}
@@ -4902,9 +5081,7 @@
* @returns {Function} Returns the new flow function.
*/
function createFlow(fromRight) {
- return baseRest(function(funcs) {
- funcs = baseFlatten(funcs, 1);
-
+ return flatRest(function(funcs) {
var length = funcs.length,
index = length,
prereq = LodashWrapper.prototype.thru;
@@ -5087,11 +5264,8 @@
* @returns {Function} Returns the new over function.
*/
function createOver(arrayFunc) {
- return baseRest(function(iteratees) {
- iteratees = (iteratees.length == 1 && isArray(iteratees[0]))
- ? arrayMap(iteratees[0], baseUnary(getIteratee()))
- : arrayMap(baseFlatten(iteratees, 1), baseUnary(getIteratee()));
-
+ return flatRest(function(iteratees) {
+ iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
return baseRest(function(args) {
var thisArg = this;
return arrayFunc(iteratees, function(iteratee) {
@@ -5434,9 +5608,9 @@
// Recursively compare arrays (susceptible to call stack limits).
if (seen) {
if (!arraySome(other, function(othValue, othIndex) {
- if (!seen.has(othIndex) &&
+ if (!cacheHas(seen, othIndex) &&
(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
- return seen.add(othIndex);
+ return seen.push(othIndex);
}
})) {
result = false;
@@ -5617,6 +5791,17 @@
}
/**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+ }
+
+ /**
* Creates an array of own enumerable property names and symbols of `object`.
*
* @private
@@ -5784,8 +5969,7 @@
*/
var getTag = baseGetTag;
- // Fallback for data views, maps, sets, and weak maps in IE 11,
- // for data views in Edge < 14, and promises in Node.js.
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
(Map && getTag(new Map) != mapTag) ||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
@@ -5861,9 +6045,9 @@
function hasPath(object, path, hasFunc) {
path = isKey(path, object) ? [path] : castPath(path);
- var result,
- index = -1,
- length = path.length;
+ var index = -1,
+ length = path.length,
+ result = false;
while (++index < length) {
var key = toKey(path[index]);
@@ -5872,10 +6056,10 @@
}
object = object[key];
}
- if (result) {
+ if (result || ++index != length) {
return result;
}
- var length = object ? object.length : 0;
+ length = object ? object.length : 0;
return !!length && isLength(length) && isIndex(key, length) &&
(isArray(object) || isArguments(object));
}
@@ -5970,9 +6154,11 @@
* @returns {string} Returns the modified source.
*/
function insertWrapDetails(source, details) {
- var length = details.length,
- lastIndex = length - 1;
-
+ var length = details.length;
+ if (!length) {
+ return source;
+ }
+ var lastIndex = length - 1;
details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
details = details.join(length > 2 ? ', ' : ' ');
return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
@@ -6152,6 +6338,26 @@
}
/**
+ * A specialized version of `_.memoize` which clears the memoized function's
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
+ *
+ * @private
+ * @param {Function} func The function to have its output memoized.
+ * @returns {Function} Returns the new memoized function.
+ */
+ function memoizeCapped(func) {
+ var result = memoize(func, function(key) {
+ if (cache.size === MAX_MEMOIZE_SIZE) {
+ cache.clear();
+ }
+ return key;
+ });
+
+ var cache = result.cache;
+ return result;
+ }
+
+ /**
* Merges the function metadata of `source` into `data`.
*
* Merging metadata reduces the number of wrappers used to invoke a function.
@@ -6265,6 +6471,36 @@
}
/**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return apply(func, this, otherArgs);
+ };
+ }
+
+ /**
* Gets the parent value at `path` of `object`.
*
* @private
@@ -6312,25 +6548,7 @@
* @param {*} data The metadata.
* @returns {Function} Returns `func`.
*/
- var setData = (function() {
- var count = 0,
- lastCalled = 0;
-
- return function(key, value) {
- var stamp = now(),
- remaining = HOT_SPAN - (stamp - lastCalled);
-
- lastCalled = stamp;
- if (remaining > 0) {
- if (++count >= HOT_COUNT) {
- return key;
- }
- } else {
- count = 0;
- }
- return baseSetData(key, value);
- };
- }());
+ var setData = shortOut(baseSetData);
/**
* A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
@@ -6345,6 +6563,16 @@
};
/**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var setToString = shortOut(baseSetToString);
+
+ /**
* Sets the `toString` method of `wrapper` to mimic the source of `reference`
* with wrapper details in a comment at the top of the source body.
*
@@ -6354,14 +6582,64 @@
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @returns {Function} Returns `wrapper`.
*/
- var setWrapToString = !defineProperty ? identity : function(wrapper, reference, bitmask) {
+ function setWrapToString(wrapper, reference, bitmask) {
var source = (reference + '');
- return defineProperty(wrapper, 'toString', {
- 'configurable': true,
- 'enumerable': false,
- 'value': constant(insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)))
- });
- };
+ return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
+ }
+
+ /**
+ * Creates a function that'll short out and invoke `identity` instead
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+ * milliseconds.
+ *
+ * @private
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new shortable function.
+ */
+ function shortOut(func) {
+ var count = 0,
+ lastCalled = 0;
+
+ return function() {
+ var stamp = nativeNow(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return arguments[0];
+ }
+ } else {
+ count = 0;
+ }
+ return func.apply(undefined, arguments);
+ };
+ }
+
+ /**
+ * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @param {number} [size=array.length] The size of `array`.
+ * @returns {Array} Returns `array`.
+ */
+ function shuffleSelf(array, size) {
+ var index = -1,
+ length = array.length,
+ lastIndex = length - 1;
+
+ size = size === undefined ? length : size;
+ while (++index < size) {
+ var rand = baseRandom(index, lastIndex),
+ value = array[rand];
+
+ array[rand] = array[index];
+ array[index] = value;
+ }
+ array.length = size;
+ return array;
+ }
/**
* Converts `string` to a property path array.
@@ -6370,7 +6648,7 @@
* @param {string} string The string to convert.
* @returns {Array} Returns the property path array.
*/
- var stringToPath = memoize(function(string) {
+ var stringToPath = memoizeCapped(function(string) {
string = toString(string);
var result = [];
@@ -6549,24 +6827,25 @@
* // => [1]
*/
function concat() {
- var length = arguments.length,
- args = Array(length ? length - 1 : 0),
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
array = arguments[0],
index = length;
while (index--) {
args[index - 1] = arguments[index];
}
- return length
- ? arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1))
- : [];
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
}
/**
* Creates an array of `array` values not included in the other given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons. The order of result values is determined by the
- * order they occur in the first array.
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
*
* **Note:** Unlike `_.pullAll`, this method returns a new array.
*
@@ -6592,8 +6871,9 @@
/**
* This method is like `_.difference` except that it accepts `iteratee` which
* is invoked for each element of `array` and `values` to generate the criterion
- * by which they're compared. Result values are chosen from the first array.
- * The iteratee is invoked with one argument: (value).
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
*
* **Note:** Unlike `_.pullAllBy`, this method returns a new array.
*
@@ -6626,9 +6906,9 @@
/**
* This method is like `_.difference` except that it accepts `comparator`
- * which is invoked to compare elements of `array` to `values`. Result values
- * are chosen from the first array. The comparator is invoked with two arguments:
- * (arrVal, othVal).
+ * which is invoked to compare elements of `array` to `values`. The order and
+ * references of result values are determined by the first array. The comparator
+ * is invoked with two arguments: (arrVal, othVal).
*
* **Note:** Unlike `_.pullAllWith`, this method returns a new array.
*
@@ -7122,8 +7402,8 @@
/**
* Creates an array of unique values that are included in all given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons. The order of result values is determined by the
- * order they occur in the first array.
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
*
* @static
* @memberOf _
@@ -7146,8 +7426,9 @@
/**
* This method is like `_.intersection` except that it accepts `iteratee`
* which is invoked for each element of each `arrays` to generate the criterion
- * by which they're compared. Result values are chosen from the first array.
- * The iteratee is invoked with one argument: (value).
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
*
* @static
* @memberOf _
@@ -7181,9 +7462,9 @@
/**
* This method is like `_.intersection` except that it accepts `comparator`
- * which is invoked to compare elements of `arrays`. Result values are chosen
- * from the first array. The comparator is invoked with two arguments:
- * (arrVal, othVal).
+ * which is invoked to compare elements of `arrays`. The order and references
+ * of result values are determined by the first array. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
@@ -7281,21 +7562,11 @@
var index = length;
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
- index = (
- index < 0
- ? nativeMax(length + index, 0)
- : nativeMin(index, length - 1)
- ) + 1;
- }
- if (value !== value) {
- return baseFindIndex(array, baseIsNaN, index - 1, true);
+ index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
}
- while (index--) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
+ return value === value
+ ? strictLastIndexOf(array, value, index)
+ : baseFindIndex(array, baseIsNaN, index, true);
}
/**
@@ -7457,9 +7728,7 @@
* console.log(pulled);
* // => ['b', 'd']
*/
- var pullAt = baseRest(function(array, indexes) {
- indexes = baseFlatten(indexes, 1);
-
+ var pullAt = flatRest(function(array, indexes) {
var length = array ? array.length : 0,
result = baseAt(array, indexes);
@@ -8034,8 +8303,9 @@
/**
* Creates a duplicate-free version of an array, using
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons, in which only the first occurrence of each
- * element is kept.
+ * for equality comparisons, in which only the first occurrence of each element
+ * is kept. The order of result values is determined by the order they occur
+ * in the array.
*
* @static
* @memberOf _
@@ -8057,7 +8327,9 @@
/**
* This method is like `_.uniq` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the criterion by which
- * uniqueness is computed. The iteratee is invoked with one argument: (value).
+ * uniqueness is computed. The order of result values is determined by the
+ * order they occur in the array. The iteratee is invoked with one argument:
+ * (value).
*
* @static
* @memberOf _
@@ -8084,8 +8356,9 @@
/**
* This method is like `_.uniq` except that it accepts `comparator` which
- * is invoked to compare elements of `array`. The comparator is invoked with
- * two arguments: (arrVal, othVal).
+ * is invoked to compare elements of `array`. The order of result values is
+ * determined by the order they occur in the array.The comparator is invoked
+ * with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
@@ -8227,8 +8500,9 @@
/**
* This method is like `_.xor` except that it accepts `iteratee` which is
* invoked for each element of each `arrays` to generate the criterion by
- * which by which they're compared. The iteratee is invoked with one argument:
- * (value).
+ * which by which they're compared. The order of result values is determined
+ * by the order they occur in the arrays. The iteratee is invoked with one
+ * argument: (value).
*
* @static
* @memberOf _
@@ -8257,8 +8531,9 @@
/**
* This method is like `_.xor` except that it accepts `comparator` which is
- * invoked to compare elements of `arrays`. The comparator is invoked with
- * two arguments: (arrVal, othVal).
+ * invoked to compare elements of `arrays`. The order of result values is
+ * determined by the order they occur in the arrays. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
@@ -8475,8 +8750,7 @@
* _(object).at(['a[0].b.c', 'a[1]']).value();
* // => [3, 4]
*/
- var wrapperAt = baseRest(function(paths) {
- paths = baseFlatten(paths, 1);
+ var wrapperAt = flatRest(function(paths) {
var length = paths.length,
start = length ? paths[0] : 0,
value = this.__wrapped__,
@@ -8741,7 +9015,11 @@
* // => { '3': 2, '5': 1 }
*/
var countBy = createAggregator(function(result, value, key) {
- hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1);
+ if (hasOwnProperty.call(result, key)) {
+ ++result[key];
+ } else {
+ baseAssignValue(result, key, 1);
+ }
});
/**
@@ -8996,7 +9274,7 @@
* @see _.forEachRight
* @example
*
- * _([1, 2]).forEach(function(value) {
+ * _.forEach([1, 2], function(value) {
* console.log(value);
* });
* // => Logs `1` then `2`.
@@ -9064,7 +9342,7 @@
if (hasOwnProperty.call(result, key)) {
result[key].push(value);
} else {
- result[key] = [value];
+ baseAssignValue(result, key, [value]);
}
});
@@ -9177,7 +9455,7 @@
* // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
*/
var keyBy = createAggregator(function(result, value, key) {
- result[key] = value;
+ baseAssignValue(result, key, value);
});
/**
@@ -9437,10 +9715,8 @@
* // => 2
*/
function sample(collection) {
- var array = isArrayLike(collection) ? collection : values(collection),
- length = array.length;
-
- return length > 0 ? array[baseRandom(0, length - 1)] : undefined;
+ var func = isArray(collection) ? arraySample : baseSample;
+ return func(collection);
}
/**
@@ -9464,25 +9740,13 @@
* // => [2, 3, 1]
*/
function sampleSize(collection, n, guard) {
- var index = -1,
- result = toArray(collection),
- length = result.length,
- lastIndex = length - 1;
-
if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
n = 1;
} else {
- n = baseClamp(toInteger(n), 0, length);
- }
- while (++index < n) {
- var rand = baseRandom(index, lastIndex),
- value = result[rand];
-
- result[rand] = result[index];
- result[index] = value;
+ n = toInteger(n);
}
- result.length = n;
- return result;
+ var func = isArray(collection) ? arraySampleSize : baseSampleSize;
+ return func(collection, n);
}
/**
@@ -9501,7 +9765,8 @@
* // => [4, 1, 3, 2]
*/
function shuffle(collection) {
- return sampleSize(collection, MAX_ARRAY_LENGTH);
+ var func = isArray(collection) ? arrayShuffle : baseShuffle;
+ return func(collection);
}
/**
@@ -9606,16 +9871,11 @@
* { 'user': 'barney', 'age': 34 }
* ];
*
- * _.sortBy(users, function(o) { return o.user; });
+ * _.sortBy(users, [function(o) { return o.user; }]);
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*
* _.sortBy(users, ['user', 'age']);
* // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
- *
- * _.sortBy(users, 'user', function(o) {
- * return Math.floor(o.age / 10);
- * });
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*/
var sortBy = baseRest(function(collection, iteratees) {
if (collection == null) {
@@ -10130,7 +10390,7 @@
* _.defer(function(text) {
* console.log(text);
* }, 'deferred');
- * // => Logs 'deferred' after one or more milliseconds.
+ * // => Logs 'deferred' after one millisecond.
*/
var defer = baseRest(function(func, args) {
return baseDelay(func, 1, args);
@@ -10238,14 +10498,14 @@
return cache.get(key);
}
var result = func.apply(this, args);
- memoized.cache = cache.set(key, result);
+ memoized.cache = cache.set(key, result) || cache;
return result;
};
memoized.cache = new (memoize.Cache || MapCache);
return memoized;
}
- // Assign cache to `_.memoize`.
+ // Expose `MapCache`.
memoize.Cache = MapCache;
/**
@@ -10337,7 +10597,7 @@
* func(10, 5);
* // => [100, 10]
*/
- var overArgs = baseRest(function(func, transforms) {
+ var overArgs = castRest(function(func, transforms) {
transforms = (transforms.length == 1 && isArray(transforms[0]))
? arrayMap(transforms[0], baseUnary(getIteratee()))
: arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
@@ -10451,8 +10711,8 @@
* rearged('b', 'c', 'a')
* // => ['a', 'b', 'c']
*/
- var rearg = baseRest(function(func, indexes) {
- return createWrap(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1));
+ var rearg = flatRest(function(func, indexes) {
+ return createWrap(func, REARG_FLAG, undefined, undefined, undefined, indexes);
});
/**
@@ -10942,11 +11202,10 @@
* _.isArguments([1, 2, 3]);
* // => false
*/
- function isArguments(value) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
- (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
- }
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+ };
/**
* Checks if `value` is classified as an `Array` object.
@@ -11128,7 +11387,7 @@
* // => false
*/
function isElement(value) {
- return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
+ return value != null && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
}
/**
@@ -11166,16 +11425,16 @@
*/
function isEmpty(value) {
if (isArrayLike(value) &&
- (isArray(value) || typeof value == 'string' ||
- typeof value.splice == 'function' || isBuffer(value) || isArguments(value))) {
+ (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
+ isBuffer(value) || isTypedArray(value) || isArguments(value))) {
return !value.length;
}
var tag = getTag(value);
if (tag == mapTag || tag == setTag) {
return !value.size;
}
- if (nonEnumShadows || isPrototype(value)) {
- return !nativeKeys(value).length;
+ if (isPrototype(value)) {
+ return !baseKeys(value).length;
}
for (var key in value) {
if (hasOwnProperty.call(value, key)) {
@@ -11330,9 +11589,9 @@
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8-9 which returns 'object' for typed array and other constructors.
+ // in Safari 9 which returns 'object' for typed array and other constructors.
var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
+ return tag == funcTag || tag == genTag || tag == proxyTag;
}
/**
@@ -11423,7 +11682,7 @@
*/
function isObject(value) {
var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
+ return value != null && (type == 'object' || type == 'function');
}
/**
@@ -11451,7 +11710,7 @@
* // => false
*/
function isObjectLike(value) {
- return !!value && typeof value == 'object';
+ return value != null && typeof value == 'object';
}
/**
@@ -11605,7 +11864,7 @@
*/
function isNative(value) {
if (isMaskable(value)) {
- throw new Error('This method is not supported with core-js. Try https://github.com/es-shims.');
+ throw new Error(CORE_ERROR_TEXT);
}
return baseIsNative(value);
}
@@ -11715,8 +11974,7 @@
* // => true
*/
function isPlainObject(value) {
- if (!isObjectLike(value) ||
- objectToString.call(value) != objectTag || isHostObject(value)) {
+ if (!isObjectLike(value) || objectToString.call(value) != objectTag) {
return false;
}
var proto = getPrototype(value);
@@ -12221,8 +12479,8 @@
* @memberOf _
* @since 4.0.0
* @category Lang
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
* @example
*
* _.toString(null);
@@ -12273,7 +12531,7 @@
* // => { 'a': 1, 'c': 3 }
*/
var assign = createAssigner(function(object, source) {
- if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
+ if (isPrototype(source) || isArrayLike(source)) {
copyObject(source, keys(source), object);
return;
}
@@ -12401,9 +12659,7 @@
* _.at(object, ['a[0].b.c', 'a[1]']);
* // => [3, 4]
*/
- var at = baseRest(function(object, paths) {
- return baseAt(object, baseFlatten(paths, 1));
- });
+ var at = flatRest(baseAt);
/**
* Creates an object that inherits from the `prototype` object. If a
@@ -13006,7 +13262,7 @@
iteratee = getIteratee(iteratee, 3);
baseForOwn(object, function(value, key, object) {
- result[iteratee(value, key, object)] = value;
+ baseAssignValue(result, iteratee(value, key, object), value);
});
return result;
}
@@ -13044,7 +13300,7 @@
iteratee = getIteratee(iteratee, 3);
baseForOwn(object, function(value, key, object) {
- result[key] = iteratee(value, key, object);
+ baseAssignValue(result, key, iteratee(value, key, object));
});
return result;
}
@@ -13088,7 +13344,7 @@
* This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source
* properties. If `customizer` returns `undefined`, merging is handled by the
- * method instead. The `customizer` is invoked with seven arguments:
+ * method instead. The `customizer` is invoked with six arguments:
* (objValue, srcValue, key, object, source, stack).
*
* **Note:** This method mutates `object`.
@@ -13138,11 +13394,11 @@
* _.omit(object, ['a', 'c']);
* // => { 'b': '2' }
*/
- var omit = baseRest(function(object, props) {
+ var omit = flatRest(function(object, props) {
if (object == null) {
return {};
}
- props = arrayMap(baseFlatten(props, 1), toKey);
+ props = arrayMap(props, toKey);
return basePick(object, baseDifference(getAllKeysIn(object), props));
});
@@ -13187,8 +13443,8 @@
* _.pick(object, ['a', 'c']);
* // => { 'a': 1, 'c': 3 }
*/
- var pick = baseRest(function(object, props) {
- return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey));
+ var pick = flatRest(function(object, props) {
+ return object == null ? {} : basePick(object, arrayMap(props, toKey));
});
/**
@@ -13408,22 +13664,23 @@
* // => { '1': ['a', 'c'], '2': ['b'] }
*/
function transform(object, iteratee, accumulator) {
- var isArr = isArray(object) || isTypedArray(object);
- iteratee = getIteratee(iteratee, 4);
+ var isArr = isArray(object),
+ isArrLike = isArr || isBuffer(object) || isTypedArray(object);
+ iteratee = getIteratee(iteratee, 4);
if (accumulator == null) {
- if (isArr || isObject(object)) {
- var Ctor = object.constructor;
- if (isArr) {
- accumulator = isArray(object) ? new Ctor : [];
- } else {
- accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
- }
- } else {
+ var Ctor = object && object.constructor;
+ if (isArrLike) {
+ accumulator = isArr ? new Ctor : [];
+ }
+ else if (isObject(object)) {
+ accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+ }
+ else {
accumulator = {};
}
}
- (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
return iteratee(accumulator, value, index, object);
});
return accumulator;
@@ -13842,8 +14099,8 @@
}
/**
- * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
- * their corresponding HTML entities.
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
*
* **Note:** No other characters are escaped. To escape additional
* characters use a third-party library like [_he_](https://mths.be/he).
@@ -13854,12 +14111,6 @@
* [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
* (under "semi-related fun fact") for more details.
*
- * Backticks are escaped because in IE < 9, they can break out of
- * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
- * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
- * [#133](https://html5sec.org/#133) of the
- * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
- *
* When working with HTML you should always
* [quote attribute values](http://wonko.com/post/html-escaping) to reduce
* XSS vectors.
@@ -14102,15 +14353,12 @@
* // => [6, 8, 10]
*/
function parseInt(string, radix, guard) {
- // Chrome fails to trim leading <BOM> whitespace characters.
- // See https://bugs.chromium.org/p/v8/issues/detail?id=3109 for more details.
if (guard || radix == null) {
radix = 0;
} else if (radix) {
radix = +radix;
}
- string = toString(string).replace(reTrim, '');
- return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
+ return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
}
/**
@@ -14349,7 +14597,8 @@
* compiled({ 'user': 'barney' });
* // => 'hello barney!'
*
- * // Use the ES delimiter as an alternative to the default "interpolate" delimiter.
+ * // Use the ES template literal delimiter as an "interpolate" delimiter.
+ * // Disable support by replacing the "interpolate" delimiter.
* var compiled = _.template('hello ${ user }!');
* compiled({ 'user': 'pebbles' });
* // => 'hello pebbles!'
@@ -14750,7 +14999,7 @@
/**
* The inverse of `_.escape`; this method converts the HTML entities
- * `&amp;`, `&lt;`, `&gt;`, `&quot;`, `&#39;`, and `&#96;` in `string` to
+ * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
* their corresponding characters.
*
* **Note:** No other HTML entities are unescaped. To unescape additional
@@ -14904,10 +15153,10 @@
* jQuery(element).on('click', view.click);
* // => Logs 'clicked docs' when clicked.
*/
- var bindAll = baseRest(function(object, methodNames) {
- arrayEach(baseFlatten(methodNames, 1), function(key) {
+ var bindAll = flatRest(function(object, methodNames) {
+ arrayEach(methodNames, function(key) {
key = toKey(key);
- object[key] = bind(object[key], object);
+ baseAssignValue(object, key, bind(object[key], object));
});
return object;
});
@@ -16698,7 +16947,7 @@
lodash.prototype[iteratorSymbol] = wrapperToIterator;
}
return lodash;
- }
+ });
/*--------------------------------------------------------------------------*/
diff --git a/tools/eslint/node_modules/lodash/lodash.min.js b/tools/eslint/node_modules/lodash/lodash.min.js
index 867ecf2a32..4bf932bd97 100644
--- a/tools/eslint/node_modules/lodash/lodash.min.js
+++ b/tools/eslint/node_modules/lodash/lodash.min.js
@@ -2,131 +2,133 @@
* @license
* lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
*/
-;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t?t.length:0;++u<o;){var i=t[u];n(e,i,r(i),t)}return e}function u(t,n){for(var r=-1,e=t?t.length:0;++r<e&&false!==n(t[r],r,t););return t}function o(t,n){for(var r=t?t.length:0;r--&&false!==n(t[r],r,t););
-return t}function i(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(!n(t[r],r,t))return false;return true}function f(t,n){for(var r=-1,e=t?t.length:0,u=0,o=[];++r<e;){var i=t[r];n(i,r,t)&&(o[u++]=i)}return o}function c(t,n){return!(!t||!t.length)&&-1<d(t,n,0)}function a(t,n,r){for(var e=-1,u=t?t.length:0;++e<u;)if(r(n,t[e]))return true;return false}function l(t,n){for(var r=-1,e=t?t.length:0,u=Array(e);++r<e;)u[r]=n(t[r],r,t);return u}function s(t,n){for(var r=-1,e=n.length,u=t.length;++r<e;)t[u+r]=n[r];return t}function h(t,n,r,e){
-var u=-1,o=t?t.length:0;for(e&&o&&(r=t[++u]);++u<o;)r=n(r,t[u],u,t);return r}function p(t,n,r,e){var u=t?t.length:0;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);return r}function _(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(n(t[r],r,t))return true;return false}function v(t,n,r){var e;return r(t,function(t,r,u){if(n(t,r,u))return e=r,false}),e}function g(t,n,r,e){var u=t.length;for(r+=e?1:-1;e?r--:++r<u;)if(n(t[r],r,t))return r;return-1}function d(t,n,r){if(n!==n)return g(t,b,r);--r;for(var e=t.length;++r<e;)if(t[r]===n)return r;
-return-1}function y(t,n,r,e){--r;for(var u=t.length;++r<u;)if(e(t[r],n))return r;return-1}function b(t){return t!==t}function x(t,n){var r=t?t.length:0;return r?k(t,n)/r:q}function j(t){return function(n){return null==n?P:n[t]}}function w(t){return function(n){return null==t?P:t[n]}}function m(t,n,r,e,u){return u(t,function(t,u,o){r=e?(e=false,t):n(r,t,u,o)}),r}function A(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].c;return t}function k(t,n){for(var r,e=-1,u=t.length;++e<u;){var o=n(t[e]);o!==P&&(r=r===P?o:r+o);
-}return r}function E(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function O(t,n){return l(n,function(n){return[n,t[n]]})}function S(t){return function(n){return t(n)}}function I(t,n){return l(n,function(n){return t[n]})}function R(t,n){return t.has(n)}function W(t,n){for(var r=-1,e=t.length;++r<e&&-1<d(n,t[r],0););return r}function B(t,n){for(var r=t.length;r--&&-1<d(n,t[r],0););return r}function L(t){return"\\"+Ft[t]}function C(t){var n=false;if(null!=t&&typeof t.toString!="function")try{
-n=!!(t+"")}catch(t){}return n}function U(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function M(t,n){return function(r){return t(n(r))}}function z(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];i!==n&&"__lodash_placeholder__"!==i||(t[r]="__lodash_placeholder__",o[u++]=r)}return o}function D(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function T(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=[t,t]}),r}function $(t){
-if(Ut.test(t)){for(var n=Lt.lastIndex=0;Lt.test(t);)n++;t=n}else t=en(t);return t}function F(t){return Ut.test(t)?t.match(Lt)||[]:t.split("")}function N(w){function St(t){return Hu.call(t)}function It(t){if(ou(t)&&!Fi(t)&&!(t instanceof $t)){if(t instanceof Lt)return t;if(Gu.call(t,"__wrapped__"))return Oe(t)}return new Lt(t)}function Rt(){}function Lt(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=P}function $t(t){this.__wrapped__=t,this.__actions__=[],
-this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Ft(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Zt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function qt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Kt(t){var n=-1,r=t?t.length:0;for(this.__data__=new qt;++n<r;)this.add(t[n])}function Gt(t){this.__data__=new Zt(t);
-}function Yt(t,n){var r,e=Fi(t)||He(t)?E(t.length,Fu):[],u=e.length,o=!!u;for(r in t)!n&&!Gu.call(t,r)||o&&("length"==r||ge(r,u))||e.push(r);return e}function en(t,n,r,e){return t===P||Ye(t,Zu[r])&&!Gu.call(e,r)?n:t}function an(t,n,r){(r===P||Ye(t[n],r))&&(typeof n!="number"||r!==P||n in t)||(t[n]=r)}function ln(t,n,r){var e=t[n];Gu.call(t,n)&&Ye(e,r)&&(r!==P||n in t)||(t[n]=r)}function sn(t,n){for(var r=t.length;r--;)if(Ye(t[r][0],n))return r;return-1}function hn(t,n,r,e){return Po(t,function(t,u,o){
-n(e,t,r(t),o)}),e}function pn(t,n){return t&&Br(n,bu(n),t)}function _n(t,n){for(var r=-1,e=null==t,u=n.length,o=Cu(u);++r<u;)o[r]=e?P:du(t,n[r]);return o}function vn(t,n,r){return t===t&&(r!==P&&(t=t<=r?t:r),n!==P&&(t=t>=n?t:n)),t}function gn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==P)return c;if(!uu(t))return t;if(o=Fi(t)){if(c=he(t),!n)return Wr(t,c)}else{var a=St(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(Pi(t))return Er(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){
-if(C(t))return i?t:{};if(c=pe(l?{}:t),!n)return Lr(t,pn(c,t))}else{if(!Tt[a])return i?t:{};c=_e(t,a,gn,n)}}if(f||(f=new Gt),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?Rn(t,bu,Ho):bu(t);return u(s||t,function(u,o){s&&(o=u,u=t[o]),ln(c,o,gn(u,n,r,e,o,t,f))}),c}function dn(t){var n=bu(t);return function(r){return yn(r,t,n)}}function yn(t,n,r){var e=r.length;if(null==t)return!e;for(t=Tu(t);e--;){var u=r[e],o=n[u],i=t[u];if(i===P&&!(u in t)||!o(i))return false}return true}function bn(t){return uu(t)?oo(t):{};
-}function xn(t,n,r){if(typeof t!="function")throw new Nu("Expected a function");return ni(function(){t.apply(P,r)},n)}function jn(t,n,r,e){var u=-1,o=c,i=true,f=t.length,s=[],h=n.length;if(!f)return s;r&&(n=l(n,S(r))),e?(o=a,i=false):200<=n.length&&(o=R,i=false,n=new Kt(n));t:for(;++u<f;){var p=t[u],_=r?r(p):p,p=e||0!==p?p:0;if(i&&_===_){for(var v=h;v--;)if(n[v]===_)continue t;s.push(p)}else o(n,_,e)||s.push(p)}return s}function wn(t,n){var r=true;return Po(t,function(t,e,u){return r=!!n(t,e,u)}),r}function mn(t,n,r){
-for(var e=-1,u=t.length;++e<u;){var o=t[e],i=n(o);if(null!=i&&(f===P?i===i&&!au(i):r(i,f)))var f=i,c=o}return c}function An(t,n){var r=[];return Po(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function kn(t,n,r,e,u){var o=-1,i=t.length;for(r||(r=ve),u||(u=[]);++o<i;){var f=t[o];0<n&&r(f)?1<n?kn(f,n-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function En(t,n){return t&&qo(t,n,bu)}function On(t,n){return t&&Vo(t,n,bu)}function Sn(t,n){return f(n,function(n){return nu(t[n])})}function In(t,n){n=ye(n,t)?[n]:Ar(n);
-for(var r=0,e=n.length;null!=t&&r<e;)t=t[Ae(n[r++])];return r&&r==e?t:P}function Rn(t,n,r){return n=n(t),Fi(t)?n:s(n,r(t))}function Wn(t,n){return t>n}function Bn(t,n){return null!=t&&Gu.call(t,n)}function Ln(t,n){return null!=t&&n in Tu(t)}function Cn(t,n,r){for(var e=r?a:c,u=t[0].length,o=t.length,i=o,f=Cu(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=l(p,S(n))),s=jo(p.length,s),f[i]=!r&&(n||120<=u&&120<=p.length)?new Kt(i&&p):P}var p=t[0],_=-1,v=f[0];t:for(;++_<u&&h.length<s;){var g=p[_],d=n?n(g):g,g=r||0!==g?g:0;
-if(v?!R(v,d):!e(h,d,r)){for(i=o;--i;){var y=f[i];if(y?!R(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function Un(t,n,r){var e={};return En(t,function(t,u,o){n(e,r(t),u,o)}),e}function Mn(t,n,e){return ye(n,t)||(n=Ar(n),t=me(t,n),n=We(n)),n=null==t?t:t[Ae(n)],null==n?P:r(n,t,e)}function zn(t){return ou(t)&&"[object ArrayBuffer]"==Hu.call(t)}function Dn(t){return ou(t)&&"[object Date]"==Hu.call(t)}function Tn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!uu(t)&&!ou(n))n=t!==t&&n!==n;else t:{
-var o=Fi(t),i=Fi(n),f="[object Array]",c="[object Array]";o||(f=St(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=St(n),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!C(t),i="[object Object]"==c&&!C(n);if((c=f==c)&&!a)u||(u=new Gt),n=o||Gi(t)?ee(t,n,Tn,r,e,u):ue(t,n,f,Tn,r,e,u);else{if(!(2&e)&&(o=a&&Gu.call(t,"__wrapped__"),f=i&&Gu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new Gt),n=Tn(t,n,r,e,u);break t}if(c)n:if(u||(u=new Gt),o=2&e,
-f=bu(t),i=f.length,c=bu(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:Gu.call(n,l))){n=false;break n}}if((c=u.get(t))&&u.get(n))n=c==n;else{c=true,u.set(t,n),u.set(n,t);for(var s=o;++a<i;){var l=f[a],h=t[l],p=n[l];if(r)var _=o?r(p,h,l,n,t,u):r(h,p,l,t,n,u);if(_===P?h!==p&&!Tn(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=t.constructor,e=n.constructor,r!=e&&"constructor"in t&&"constructor"in n&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),
-u.delete(t),u.delete(n),n=c}}else n=false;else n=false}}return n}function $n(t){return ou(t)&&"[object Map]"==St(t)}function Fn(t,n,r,e){var u=r.length,o=u,i=!e;if(null==t)return!o;for(t=Tu(t);u--;){var f=r[u];if(i&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return false}for(;++u<o;){var f=r[u],c=f[0],a=t[c],l=f[1];if(i&&f[2]){if(a===P&&!(c in t))return false}else{if(f=new Gt,e)var s=e(a,l,c,t,n,f);if(s===P?!Tn(l,a,e,3,f):!s)return false}}return true}function Nn(t){return!(!uu(t)||Vu&&Vu in t)&&(nu(t)||C(t)?Xu:wt).test(ke(t))}function Pn(t){
-return uu(t)&&"[object RegExp]"==Hu.call(t)}function Zn(t){return ou(t)&&"[object Set]"==St(t)}function qn(t){return ou(t)&&eu(t.length)&&!!Dt[Hu.call(t)]}function Vn(t){return typeof t=="function"?t:null==t?Ou:typeof t=="object"?Fi(t)?Qn(t[0],t[1]):Hn(t):Wu(t)}function Kn(t){if(!xe(t))return bo(t);var n,r=[];for(n in Tu(t))Gu.call(t,n)&&"constructor"!=n&&r.push(n);return r}function Gn(t){if(!uu(t)){var n=[];if(null!=t)for(var r in Tu(t))n.push(r);return n}r=xe(t);var e=[];for(n in t)("constructor"!=n||!r&&Gu.call(t,n))&&e.push(n);
-return e}function Jn(t,n){return t<n}function Yn(t,n){var r=-1,e=Qe(t)?Cu(t.length):[];return Po(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function Hn(t){var n=ae(t);return 1==n.length&&n[0][2]?je(n[0][0],n[0][1]):function(r){return r===t||Fn(r,t,n)}}function Qn(t,n){return ye(t)&&n===n&&!uu(n)?je(Ae(t),n):function(r){var e=du(r,t);return e===P&&e===n?yu(r,t):Tn(n,e,P,3)}}function Xn(t,n,r,e,o){if(t!==n){if(!Fi(n)&&!Gi(n))var i=Gn(n);u(i||n,function(u,f){if(i&&(f=u,u=n[f]),uu(u)){o||(o=new Gt);var c=f,a=o,l=t[c],s=n[c],h=a.get(s);
-if(h)an(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):P,p=h===P;p&&(h=s,Fi(s)||Gi(s)?Fi(l)?h=l:Xe(l)?h=Wr(l):(p=false,h=gn(s,true)):fu(s)||He(s)?He(l)?h=vu(l):!uu(l)||r&&nu(l)?(p=false,h=gn(s,true)):h=l:p=false),p&&(a.set(s,h),Xn(h,s,r,e,a),a.delete(s)),an(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,o):P,c===P&&(c=u),an(t,f,c)})}}function tr(t,n){var r=t.length;if(r)return n+=0>n?r:0,ge(n,r)?t[n]:P}function nr(t,n,r){var e=-1;return n=l(n.length?n:[Ou],S(fe())),t=Yn(t,function(t){return{a:l(n,function(n){return n(t)}),b:++e,c:t
-}}),A(t,function(t,n){var e;t:{e=-1;for(var u=t.a,o=n.a,i=u.length,f=r.length;++e<i;){var c=Sr(u[e],o[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);break t}}e=t.b-n.b}return e})}function rr(t,n){return t=Tu(t),er(t,n,function(n,r){return r in t})}function er(t,n,r){for(var e=-1,u=n.length,o={};++e<u;){var i=n[e],f=t[i];r(f,i)&&(o[i]=f)}return o}function ur(t){return function(n){return In(n,t)}}function or(t,n,r,e){var u=e?y:d,o=-1,i=n.length,f=t;for(t===n&&(n=Wr(n)),r&&(f=l(t,S(r)));++o<i;)for(var c=0,a=n[o],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==t&&fo.call(f,c,1),
-fo.call(t,c,1);return t}function ir(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(r==e||u!==o){var o=u;if(ge(u))fo.call(t,u,1);else if(ye(u,t))delete t[Ae(u)];else{var u=Ar(u),i=me(t,u);null!=i&&delete i[Ae(We(u))]}}}}function fr(t,n){return t+po(mo()*(n-t+1))}function cr(t,n){var r="";if(!t||1>n||9007199254740991<n)return r;do n%2&&(r+=t),(n=po(n/2))&&(t+=t);while(n);return r}function ar(t,n){return n=xo(n===P?t.length-1:n,0),function(){for(var e=arguments,u=-1,o=xo(e.length-n,0),i=Cu(o);++u<o;)i[u]=e[n+u];
-for(u=-1,o=Cu(n+1);++u<n;)o[u]=e[u];return o[n]=i,r(t,this,o)}}function lr(t,n,r,e){if(!uu(t))return t;n=ye(n,t)?[n]:Ar(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++u<o;){var c=Ae(n[u]),a=r;if(u!=i){var l=f[c],a=e?e(l,c,f):P;a===P&&(a=uu(l)?l:ge(n[u+1])?[]:{})}ln(f,c,a),f=f[c]}return t}function sr(t,n,r){var e=-1,u=t.length;for(0>n&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Cu(u);++e<u;)r[e]=t[e+n];return r}function hr(t,n){var r;return Po(t,function(t,e,u){return r=n(t,e,u),
-!r}),!!r}function pr(t,n,r){var e=0,u=t?t.length:e;if(typeof n=="number"&&n===n&&2147483647>=u){for(;e<u;){var o=e+u>>>1,i=t[o];null!==i&&!au(i)&&(r?i<=n:i<n)?e=o+1:u=o}return u}return _r(t,n,Ou,r)}function _r(t,n,r,e){n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=au(n),a=n===P;u<o;){var l=po((u+o)/2),s=r(t[l]),h=s!==P,p=null===s,_=s===s,v=au(s);(i?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=n:s<n)?u=l+1:o=l}return jo(o,4294967294)}function vr(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){
-var i=t[r],f=n?n(i):i;if(!r||!Ye(f,c)){var c=f;o[u++]=0===i?0:i}}return o}function gr(t){return typeof t=="number"?t:au(t)?q:+t}function dr(t){if(typeof t=="string")return t;if(au(t))return No?No.call(t):"";var n=t+"";return"0"==n&&1/t==-Z?"-0":n}function yr(t,n,r){var e=-1,u=c,o=t.length,i=true,f=[],l=f;if(r)i=false,u=a;else if(200<=o){if(u=n?null:Jo(t))return D(u);i=false,u=R,l=new Kt}else l=n?[]:f;t:for(;++e<o;){var s=t[e],h=n?n(s):s,s=r||0!==s?s:0;if(i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue t;
-n&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function br(t,n,r,e){for(var u=t.length,o=e?u:-1;(e?o--:++o<u)&&n(t[o],o,t););return r?sr(t,e?0:o,e?o+1:u):sr(t,e?o+1:0,e?u:o)}function xr(t,n){var r=t;return r instanceof $t&&(r=r.value()),h(n,function(t,n){return n.func.apply(n.thisArg,s([t],n.args))},r)}function jr(t,n,r){for(var e=-1,u=t.length;++e<u;)var o=o?s(jn(o,t[e],n,r),jn(t[e],o,n,r)):t[e];return o&&o.length?yr(o,n,r):[]}function wr(t,n,r){for(var e=-1,u=t.length,o=n.length,i={};++e<u;)r(i,t[e],e<o?n[e]:P);
-return i}function mr(t){return Xe(t)?t:[]}function Ar(t){return Fi(t)?t:ei(t)}function kr(t,n,r){var e=t.length;return r=r===P?e:r,!n&&r>=e?t:sr(t,n,r)}function Er(t,n){if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function Or(t){var n=new t.constructor(t.byteLength);return new ro(n).set(new ro(t)),n}function Sr(t,n){if(t!==n){var r=t!==P,e=null===t,u=t===t,o=au(t),i=n!==P,f=null===n,c=n===n,a=au(n);if(!f&&!a&&!o&&t>n||o&&i&&c&&!f&&!a||e&&i&&c||!r&&c||!u)return 1;if(!e&&!o&&!a&&t<n||a&&r&&u&&!e&&!o||f&&r&&u||!i&&u||!c)return-1;
-}return 0}function Ir(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=xo(o-i,0),l=Cu(c+a);for(e=!e;++f<c;)l[f]=n[f];for(;++u<i;)(e||u<o)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function Rr(t,n,r,e){var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=xo(o-f,0),s=Cu(l+a);for(e=!e;++u<l;)s[u]=t[u];for(l=u;++c<a;)s[l+c]=n[c];for(;++i<f;)(e||u<o)&&(s[l+r[i]]=t[u++]);return s}function Wr(t,n){var r=-1,e=t.length;for(n||(n=Cu(e));++r<e;)n[r]=t[r];return n}function Br(t,n,r,e){r||(r={});
-for(var u=-1,o=n.length;++u<o;){var i=n[u],f=e?e(r[i],t[i],i,r,t):P;ln(r,i,f===P?t[i]:f)}return r}function Lr(t,n){return Br(t,Ho(t),n)}function Cr(t,n){return function(r,u){var o=Fi(r)?e:hn,i=n?n():{};return o(r,t,fe(u,2),i)}}function Ur(t){return ar(function(n,r){var e=-1,u=r.length,o=1<u?r[u-1]:P,i=2<u?r[2]:P,o=3<t.length&&typeof o=="function"?(u--,o):P;for(i&&de(r[0],r[1],i)&&(o=3>u?P:o,u=1),n=Tu(n);++e<u;)(i=r[e])&&t(n,i,e,o);return n})}function Mr(t,n){return function(r,e){if(null==r)return r;
-if(!Qe(r))return t(r,e);for(var u=r.length,o=n?u:-1,i=Tu(r);(n?o--:++o<u)&&false!==e(i[o],o,i););return r}}function zr(t){return function(n,r,e){var u=-1,o=Tu(n);e=e(n);for(var i=e.length;i--;){var f=e[t?i:++u];if(false===r(o[f],f,o))break}return n}}function Dr(t,n,r){function e(){return(this&&this!==Vt&&this instanceof e?o:t).apply(u?r:this,arguments)}var u=1&n,o=Fr(t);return e}function Tr(t){return function(n){n=gu(n);var r=Ut.test(n)?F(n):P,e=r?r[0]:n.charAt(0);return n=r?kr(r,1).join(""):n.slice(1),
-e[t]()+n}}function $r(t){return function(n){return h(ku(Au(n).replace(Wt,"")),t,"")}}function Fr(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=bn(t.prototype),n=t.apply(r,n);return uu(n)?n:r;
-}}function Nr(t,n,e){function u(){for(var i=arguments.length,f=Cu(i),c=i,a=ie(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:z(f,a),i-=c.length,i<e?Xr(t,n,qr,u.placeholder,P,f,c,P,P,e-i):r(this&&this!==Vt&&this instanceof u?o:t,this,f)}var o=Fr(t);return u}function Pr(t){return function(n,r,e){var u=Tu(n);if(!Qe(n)){var o=fe(r,3);n=bu(n),r=function(t){return o(u[t],t,u)}}return r=t(n,r,e),-1<r?u[o?n[r]:r]:P}}function Zr(t){return ar(function(n){n=kn(n,1);var r=n.length,e=r,u=Lt.prototype.thru;
-for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new Nu("Expected a function");if(u&&!i&&"wrapper"==oe(o))var i=new Lt([],(true))}for(e=i?e:r;++e<r;)var o=n[e],u=oe(o),f="wrapper"==u?Yo(o):P,i=f&&be(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[oe(f[0])].apply(i,f[3]):1==o.length&&be(o)?i[u]():i.thru(o);return function(){var t=arguments,e=t[0];if(i&&1==t.length&&Fi(e)&&200<=e.length)return i.plant(e).value();for(var u=0,t=r?n[u].apply(this,t):e;++u<r;)t=n[u].call(this,t);return t}})}function qr(t,n,r,e,u,o,i,f,c,a){
-function l(){for(var d=arguments.length,y=Cu(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=ie(l),b=y.length;for(x=0;b--;)y[b]===j&&x++}if(e&&(y=Ir(y,e,u,_)),o&&(y=Rr(y,o,i,_)),d-=x,_&&d<a)return j=z(y,j),Xr(t,n,qr,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[t]:t,d=y.length,f){x=y.length;for(var w=jo(f.length,x),m=Wr(y);w--;){var A=f[w];y[w]=ge(A,x)?m[A]:P}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==Vt&&this instanceof l&&(b=g||Fr(b)),b.apply(j,y)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?P:Fr(t);
-return l}function Vr(t,n){return function(r,e){return Un(r,t,n(e))}}function Kr(t,n){return function(r,e){var u;if(r===P&&e===P)return n;if(r!==P&&(u=r),e!==P){if(u===P)return e;typeof r=="string"||typeof e=="string"?(r=dr(r),e=dr(e)):(r=gr(r),e=gr(e)),u=t(r,e)}return u}}function Gr(t){return ar(function(n){return n=1==n.length&&Fi(n[0])?l(n[0],S(fe())):l(kn(n,1),S(fe())),ar(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function Jr(t,n){n=n===P?" ":dr(n);var r=n.length;return 2>r?r?cr(n,t):n:(r=cr(n,ho(t/$(n))),
-Ut.test(n)?kr(F(r),0,t).join(""):r.slice(0,t))}function Yr(t,n,e,u){function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Cu(l+c),h=this&&this!==Vt&&this instanceof o?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++n];return r(h,i?e:this,s)}var i=1&n,f=Fr(t);return o}function Hr(t){return function(n,r,e){e&&typeof e!="number"&&de(n,r,e)&&(r=e=P),n=su(n),r===P?(r=n,n=0):r=su(r),e=e===P?n<r?1:-1:su(e);var u=-1;r=xo(ho((r-n)/(e||1)),0);for(var o=Cu(r);r--;)o[t?r:++u]=n,n+=e;return o}}function Qr(t){
-return function(n,r){return typeof n=="string"&&typeof r=="string"||(n=_u(n),r=_u(r)),t(n,r)}}function Xr(t,n,r,e,u,o,i,f,c,a){var l=8&n,s=l?i:P;i=l?P:i;var h=l?o:P;return o=l?P:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),u=[t,n,u,h,s,o,i,f,c,a],r=r.apply(P,u),be(t)&&ti(r,u),r.placeholder=e,ri(r,t,n)}function te(t){var n=Du[t];return function(t,r){if(t=_u(t),r=jo(hu(r),292)){var e=(gu(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(gu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function ne(t){
-return function(n){var r=St(n);return"[object Map]"==r?U(n):"[object Set]"==r?T(n):O(n,t(n))}}function re(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new Nu("Expected a function");var a=e?e.length:0;if(a||(n&=-97,e=u=P),i=i===P?i:xo(hu(i),0),f=f===P?f:hu(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=P}var h=c?P:Yo(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1],n=r|t,e=128==t&&8==r||128==t&&256==r&&o[7].length<=h[8]||384==t&&h[7].length<=h[8]&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),
-(r=h[3])&&(e=o[3],o[3]=e?Ir(e,r,h[4]):r,o[4]=e?z(o[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=o[5],o[5]=e?Rr(e,r,h[6]):r,o[6]=e?z(o[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(o[7]=r),128&t&&(o[8]=null==o[8]?h[8]:jo(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:xo(o[9]-a,0),!f&&24&n&&(n&=-25),ri((h?Ko:ti)(n&&1!=n?8==n||16==n?Nr(t,n,f):32!=n&&33!=n||u.length?qr.apply(P,o):Yr(t,n,r,e):Dr(t,n,r),o),t,n)}function ee(t,n,r,e,u,o){
-var i=2&u,f=t.length,c=n.length;if(f!=c&&!(i&&c>f))return false;if((c=o.get(t))&&o.get(n))return c==n;var c=-1,a=true,l=1&u?new Kt:P;for(o.set(t,n),o.set(n,t);++c<f;){var s=t[c],h=n[c];if(e)var p=i?e(h,s,c,n,t,o):e(s,h,c,t,n,o);if(p!==P){if(p)continue;a=false;break}if(l){if(!_(n,function(t,n){if(!l.has(n)&&(s===t||r(s,t,e,u,o)))return l.add(n)})){a=false;break}}else if(s!==h&&!r(s,h,e,u,o)){a=false;break}}return o.delete(t),o.delete(n),a}function ue(t,n,r,e,u,o,i){switch(r){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)break;
-t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":if(t.byteLength!=n.byteLength||!e(new ro(t),new ro(n)))break;return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return Ye(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var f=U;case"[object Set]":if(f||(f=D),t.size!=n.size&&!(2&o))break;return(r=i.get(t))?r==n:(o|=1,i.set(t,n),n=ee(f(t),f(n),e,u,o,i),i.delete(t),n);case"[object Symbol]":
-if(Fo)return Fo.call(t)==Fo.call(n)}return false}function oe(t){for(var n=t.name+"",r=Co[n],e=Gu.call(Co,n)?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==t)return u.name}return n}function ie(t){return(Gu.call(It,"placeholder")?It:t).placeholder}function fe(){var t=It.iteratee||Su,t=t===Su?Vn:t;return arguments.length?t(arguments[0],arguments[1]):t}function ce(t,n){var r=t.__data__,e=typeof n;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==n:null===n)?r[typeof n=="string"?"string":"hash"]:r.map;
-}function ae(t){for(var n=bu(t),r=n.length;r--;){var e=n[r],u=t[e];n[r]=[e,u,u===u&&!uu(u)]}return n}function le(t,n){var r=null==t?P:t[n];return Nn(r)?r:P}function se(t,n,r){n=ye(n,t)?[n]:Ar(n);for(var e,u=-1,o=n.length;++u<o;){var i=Ae(n[u]);if(!(e=null!=t&&r(t,i)))break;t=t[i]}return e?e:(o=t?t.length:0,!!o&&eu(o)&&ge(i,o)&&(Fi(t)||He(t)))}function he(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&Gu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function pe(t){return typeof t.constructor!="function"||xe(t)?{}:bn(eo(t));
-}function _e(r,e,u,o){var i=r.constructor;switch(e){case"[object ArrayBuffer]":return Or(r);case"[object Boolean]":case"[object Date]":return new i((+r));case"[object DataView]":return e=o?Or(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 e=o?Or(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.length);case"[object Map]":return e=o?u(U(r),true):U(r),h(e,t,new r.constructor);case"[object Number]":case"[object String]":return new i(r);case"[object RegExp]":return e=new r.constructor(r.source,yt.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=o?u(D(r),true):D(r),h(e,n,new r.constructor);case"[object Symbol]":return Fo?Tu(Fo.call(r)):{}}}function ve(t){return Fi(t)||He(t)||!!(co&&t&&t[co])}function ge(t,n){return n=null==n?9007199254740991:n,
-!!n&&(typeof t=="number"||At.test(t))&&-1<t&&0==t%1&&t<n}function de(t,n,r){if(!uu(r))return false;var e=typeof n;return!!("number"==e?Qe(r)&&ge(n,r.length):"string"==e&&n in r)&&Ye(r[n],t)}function ye(t,n){if(Fi(t))return false;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!au(t))||(ut.test(t)||!et.test(t)||null!=n&&t in Tu(n))}function be(t){var n=oe(t),r=It[n];return typeof r=="function"&&n in $t.prototype&&(t===r||(n=Yo(r),!!n&&t===n[0]))}function xe(t){var n=t&&t.constructor;
-return t===(typeof n=="function"&&n.prototype||Zu)}function je(t,n){return function(r){return null!=r&&(r[t]===n&&(n!==P||t in Tu(r)))}}function we(t,n,r,e,u,o){return uu(t)&&uu(n)&&(o.set(n,t),Xn(t,n,P,we,o),o.delete(n)),t}function me(t,n){return 1==n.length?t:In(t,sr(n,0,-1))}function Ae(t){if(typeof t=="string"||au(t))return t;var n=t+"";return"0"==n&&1/t==-Z?"-0":n}function ke(t){if(null!=t){try{return Ku.call(t)}catch(t){}return t+""}return""}function Ee(t,n){return u(V,function(r){var e="_."+r[0];
-n&r[1]&&!c(t,e)&&t.push(e)}),t.sort()}function Oe(t){if(t instanceof $t)return t.clone();var n=new Lt(t.__wrapped__,t.__chain__);return n.__actions__=Wr(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function Se(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:hu(r),0>r&&(r=xo(e+r,0)),g(t,fe(n,3),r)):-1}function Ie(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e-1;return r!==P&&(u=hu(r),u=0>r?xo(e+u,0):jo(u,e-1)),g(t,fe(n,3),u,true)}function Re(t){return t&&t.length?t[0]:P}function We(t){
-var n=t?t.length:0;return n?t[n-1]:P}function Be(t,n){return t&&t.length&&n&&n.length?or(t,n):t}function Le(t){return t?Ao.call(t):t}function Ce(t){if(!t||!t.length)return[];var n=0;return t=f(t,function(t){if(Xe(t))return n=xo(t.length,n),true}),E(n,function(n){return l(t,j(n))})}function Ue(t,n){if(!t||!t.length)return[];var e=Ce(t);return null==n?e:l(e,function(t){return r(n,P,t)})}function Me(t){return t=It(t),t.__chain__=true,t}function ze(t,n){return n(t)}function De(){return this}function Te(t,n){
-return(Fi(t)?u:Po)(t,fe(n,3))}function $e(t,n){return(Fi(t)?o:Zo)(t,fe(n,3))}function Fe(t,n){return(Fi(t)?l:Yn)(t,fe(n,3))}function Ne(t,n,r){var e=-1,u=lu(t),o=u.length,i=o-1;for(n=(r?de(t,n,r):n===P)?1:vn(hu(n),0,o);++e<n;)t=fr(e,i),r=u[t],u[t]=u[e],u[e]=r;return u.length=n,u}function Pe(t,n,r){return n=r?P:n,n=t&&null==n?t.length:n,re(t,128,P,P,P,P,n)}function Ze(t,n){var r;if(typeof n!="function")throw new Nu("Expected a function");return t=hu(t),function(){return 0<--t&&(r=n.apply(this,arguments)),
-1>=t&&(n=P),r}}function qe(t,n,r){return n=r?P:n,t=re(t,8,P,P,P,P,P,n),t.placeholder=qe.placeholder,t}function Ve(t,n,r){return n=r?P:n,t=re(t,16,P,P,P,P,P,n),t.placeholder=Ve.placeholder,t}function Ke(t,n,r){function e(n){var r=c,e=a;return c=a=P,_=n,s=t.apply(e,r)}function u(t){var r=t-p;return t-=_,p===P||r>=n||0>r||g&&t>=l}function o(){var t=Ri();if(u(t))return i(t);var r,e=ni;r=t-_,t=n-(t-p),r=g?jo(t,l-r):t,h=e(o,r)}function i(t){return h=P,d&&c?e(t):(c=a=P,s)}function f(){var t=Ri(),r=u(t);if(c=arguments,
-a=this,p=t,r){if(h===P)return _=t=p,h=ni(o,n),v?e(t):s;if(g)return h=ni(o,n),e(p)}return h===P&&(h=ni(o,n)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof t!="function")throw new Nu("Expected a function");return n=_u(n)||0,uu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?xo(_u(r.maxWait)||0,n):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==P&&Go(h),_=0,c=p=a=h=P},f.flush=function(){return h===P?s:i(Ri())},f}function Ge(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e),
-r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new Nu("Expected a function");return r.cache=new(Ge.Cache||qt),r}function Je(t){if(typeof t!="function")throw new Nu("Expected a function");return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}function Ye(t,n){return t===n||t!==t&&n!==n}function He(t){return Xe(t)&&Gu.call(t,"callee")&&(!io.call(t,"callee")||"[object Arguments]"==Hu.call(t));
-}function Qe(t){return null!=t&&eu(t.length)&&!nu(t)}function Xe(t){return ou(t)&&Qe(t)}function tu(t){return!!ou(t)&&("[object Error]"==Hu.call(t)||typeof t.message=="string"&&typeof t.name=="string")}function nu(t){return t=uu(t)?Hu.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function ru(t){return typeof t=="number"&&t==hu(t)}function eu(t){return typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t}function uu(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function ou(t){
-return!!t&&typeof t=="object"}function iu(t){return typeof t=="number"||ou(t)&&"[object Number]"==Hu.call(t)}function fu(t){return!(!ou(t)||"[object Object]"!=Hu.call(t)||C(t))&&(t=eo(t),null===t||(t=Gu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&Ku.call(t)==Yu))}function cu(t){return typeof t=="string"||!Fi(t)&&ou(t)&&"[object String]"==Hu.call(t)}function au(t){return typeof t=="symbol"||ou(t)&&"[object Symbol]"==Hu.call(t)}function lu(t){if(!t)return[];if(Qe(t))return cu(t)?F(t):Wr(t);
-if(uo&&t[uo]){t=t[uo]();for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}return n=St(t),("[object Map]"==n?U:"[object Set]"==n?D:wu)(t)}function su(t){return t?(t=_u(t),t===Z||t===-Z?1.7976931348623157e308*(0>t?-1:1):t===t?t:0):0===t?t:0}function hu(t){t=su(t);var n=t%1;return t===t?n?t-n:t:0}function pu(t){return t?vn(hu(t),0,4294967295):0}function _u(t){if(typeof t=="number")return t;if(au(t))return q;if(uu(t)&&(t=typeof t.valueOf=="function"?t.valueOf():t,t=uu(t)?t+"":t),typeof t!="string")return 0===t?t:+t;
-t=t.replace(at,"");var n=jt.test(t);return n||mt.test(t)?Pt(t.slice(2),n?2:8):xt.test(t)?q:+t}function vu(t){return Br(t,xu(t))}function gu(t){return null==t?"":dr(t)}function du(t,n,r){return t=null==t?P:In(t,n),t===P?r:t}function yu(t,n){return null!=t&&se(t,n,Ln)}function bu(t){return Qe(t)?Yt(t):Kn(t)}function xu(t){return Qe(t)?Yt(t,true):Gn(t)}function ju(t,n){return null==t?{}:er(t,Rn(t,xu,Qo),fe(n))}function wu(t){return t?I(t,bu(t)):[]}function mu(t){return jf(gu(t).toLowerCase())}function Au(t){
-return(t=gu(t))&&t.replace(kt,un).replace(Bt,"")}function ku(t,n,r){return t=gu(t),n=r?P:n,n===P?Mt.test(t)?t.match(Ct)||[]:t.match(vt)||[]:t.match(n)||[]}function Eu(t){return function(){return t}}function Ou(t){return t}function Su(t){return Vn(typeof t=="function"?t:gn(t,true))}function Iu(t,n,r){var e=bu(n),o=Sn(n,e);null!=r||uu(n)&&(o.length||!e.length)||(r=n,n=t,t=this,o=Sn(n,bu(n)));var i=!(uu(r)&&"chain"in r&&!r.chain),f=nu(t);return u(o,function(r){var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){
-var n=this.__chain__;if(i||n){var r=t(this.__wrapped__);return(r.__actions__=Wr(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,s([this.value()],arguments))})}),t}function Ru(){}function Wu(t){return ye(t)?j(Ae(t)):ur(t)}function Bu(){return[]}function Lu(){return false}w=w?cn.defaults(Vt.Object(),w,cn.pick(Vt,zt)):Vt;var Cu=w.Array,Uu=w.Date,Mu=w.Error,zu=w.Function,Du=w.Math,Tu=w.Object,$u=w.RegExp,Fu=w.String,Nu=w.TypeError,Pu=Cu.prototype,Zu=Tu.prototype,qu=w["__core-js_shared__"],Vu=function(){
-var t=/[^.]+$/.exec(qu&&qu.keys&&qu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ku=zu.prototype.toString,Gu=Zu.hasOwnProperty,Ju=0,Yu=Ku.call(Tu),Hu=Zu.toString,Qu=Vt._,Xu=$u("^"+Ku.call(Gu).replace(ft,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),to=Jt?w.Buffer:P,no=w.Symbol,ro=w.Uint8Array,eo=M(Tu.getPrototypeOf,Tu),uo=no?no.iterator:P,oo=Tu.create,io=Zu.propertyIsEnumerable,fo=Pu.splice,co=no?no.isConcatSpreadable:P,ao=w.clearTimeout!==Vt.clearTimeout&&w.clearTimeout,lo=Uu&&Uu.now!==Vt.Date.now&&Uu.now,so=w.setTimeout!==Vt.setTimeout&&w.setTimeout,ho=Du.ceil,po=Du.floor,_o=Tu.getOwnPropertySymbols,vo=to?to.isBuffer:P,go=w.isFinite,yo=Pu.join,bo=M(Tu.keys,Tu),xo=Du.max,jo=Du.min,wo=w.parseInt,mo=Du.random,Ao=Pu.reverse,ko=le(w,"DataView"),Eo=le(w,"Map"),Oo=le(w,"Promise"),So=le(w,"Set"),Io=le(w,"WeakMap"),Ro=le(Tu,"create"),Wo=function(){
-var t=le(Tu,"defineProperty"),n=le.name;return n&&2<n.length?t:P}(),Bo=Io&&new Io,Lo=!io.call({valueOf:1},"valueOf"),Co={},Uo=ke(ko),Mo=ke(Eo),zo=ke(Oo),Do=ke(So),To=ke(Io),$o=no?no.prototype:P,Fo=$o?$o.valueOf:P,No=$o?$o.toString:P;It.templateSettings={escape:tt,evaluate:nt,interpolate:rt,variable:"",imports:{_:It}},It.prototype=Rt.prototype,It.prototype.constructor=It,Lt.prototype=bn(Rt.prototype),Lt.prototype.constructor=Lt,$t.prototype=bn(Rt.prototype),$t.prototype.constructor=$t,Ft.prototype.clear=function(){
-this.__data__=Ro?Ro(null):{}},Ft.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Ft.prototype.get=function(t){var n=this.__data__;return Ro?(t=n[t],"__lodash_hash_undefined__"===t?P:t):Gu.call(n,t)?n[t]:P},Ft.prototype.has=function(t){var n=this.__data__;return Ro?n[t]!==P:Gu.call(n,t)},Ft.prototype.set=function(t,n){return this.__data__[t]=Ro&&n===P?"__lodash_hash_undefined__":n,this},Zt.prototype.clear=function(){this.__data__=[]},Zt.prototype.delete=function(t){var n=this.__data__;
-return t=sn(n,t),!(0>t)&&(t==n.length-1?n.pop():fo.call(n,t,1),true)},Zt.prototype.get=function(t){var n=this.__data__;return t=sn(n,t),0>t?P:n[t][1]},Zt.prototype.has=function(t){return-1<sn(this.__data__,t)},Zt.prototype.set=function(t,n){var r=this.__data__,e=sn(r,t);return 0>e?r.push([t,n]):r[e][1]=n,this},qt.prototype.clear=function(){this.__data__={hash:new Ft,map:new(Eo||Zt),string:new Ft}},qt.prototype.delete=function(t){return ce(this,t).delete(t)},qt.prototype.get=function(t){return ce(this,t).get(t);
-},qt.prototype.has=function(t){return ce(this,t).has(t)},qt.prototype.set=function(t,n){return ce(this,t).set(t,n),this},Kt.prototype.add=Kt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Kt.prototype.has=function(t){return this.__data__.has(t)},Gt.prototype.clear=function(){this.__data__=new Zt},Gt.prototype.delete=function(t){return this.__data__.delete(t)},Gt.prototype.get=function(t){return this.__data__.get(t)},Gt.prototype.has=function(t){return this.__data__.has(t);
-},Gt.prototype.set=function(t,n){var r=this.__data__;if(r instanceof Zt){if(r=r.__data__,!Eo||199>r.length)return r.push([t,n]),this;r=this.__data__=new qt(r)}return r.set(t,n),this};var Po=Mr(En),Zo=Mr(On,true),qo=zr(),Vo=zr(true),Ko=Bo?function(t,n){return Bo.set(t,n),t}:Ou,Go=ao||function(t){return Vt.clearTimeout(t)},Jo=So&&1/D(new So([,-0]))[1]==Z?function(t){return new So(t)}:Ru,Yo=Bo?function(t){return Bo.get(t)}:Ru,Ho=_o?M(_o,Tu):Bu,Qo=_o?function(t){for(var n=[];t;)s(n,Ho(t)),t=eo(t);return n;
-}:Bu;(ko&&"[object DataView]"!=St(new ko(new ArrayBuffer(1)))||Eo&&"[object Map]"!=St(new Eo)||Oo&&"[object Promise]"!=St(Oo.resolve())||So&&"[object Set]"!=St(new So)||Io&&"[object WeakMap]"!=St(new Io))&&(St=function(t){var n=Hu.call(t);if(t=(t="[object Object]"==n?t.constructor:P)?ke(t):P)switch(t){case Uo:return"[object DataView]";case Mo:return"[object Map]";case zo:return"[object Promise]";case Do:return"[object Set]";case To:return"[object WeakMap]"}return n});var Xo=qu?nu:Lu,ti=function(){
-var t=0,n=0;return function(r,e){var u=Ri(),o=16-(u-n);if(n=u,0<o){if(150<=++t)return r}else t=0;return Ko(r,e)}}(),ni=so||function(t,n){return Vt.setTimeout(t,n)},ri=Wo?function(t,n,r){n+="";var e;e=(e=n.match(pt))?e[1].split(_t):[],r=Ee(e,r),e=r.length;var u=e-1;return r[u]=(1<e?"& ":"")+r[u],r=r.join(2<e?", ":" "),n=n.replace(ht,"{\n/* [wrapped with "+r+"] */\n"),Wo(t,"toString",{configurable:true,enumerable:false,value:Eu(n)})}:Ou,ei=Ge(function(t){t=gu(t);var n=[];return ot.test(t)&&n.push(""),t.replace(it,function(t,r,e,u){
-n.push(e?u.replace(gt,"$1"):r||t)}),n}),ui=ar(function(t,n){return Xe(t)?jn(t,kn(n,1,Xe,true)):[]}),oi=ar(function(t,n){var r=We(n);return Xe(r)&&(r=P),Xe(t)?jn(t,kn(n,1,Xe,true),fe(r,2)):[]}),ii=ar(function(t,n){var r=We(n);return Xe(r)&&(r=P),Xe(t)?jn(t,kn(n,1,Xe,true),P,r):[]}),fi=ar(function(t){var n=l(t,mr);return n.length&&n[0]===t[0]?Cn(n):[]}),ci=ar(function(t){var n=We(t),r=l(t,mr);return n===We(r)?n=P:r.pop(),r.length&&r[0]===t[0]?Cn(r,fe(n,2)):[]}),ai=ar(function(t){var n=We(t),r=l(t,mr);return n===We(r)?n=P:r.pop(),
-r.length&&r[0]===t[0]?Cn(r,P,n):[]}),li=ar(Be),si=ar(function(t,n){n=kn(n,1);var r=t?t.length:0,e=_n(t,n);return ir(t,l(n,function(t){return ge(t,r)?+t:t}).sort(Sr)),e}),hi=ar(function(t){return yr(kn(t,1,Xe,true))}),pi=ar(function(t){var n=We(t);return Xe(n)&&(n=P),yr(kn(t,1,Xe,true),fe(n,2))}),_i=ar(function(t){var n=We(t);return Xe(n)&&(n=P),yr(kn(t,1,Xe,true),P,n)}),vi=ar(function(t,n){return Xe(t)?jn(t,n):[]}),gi=ar(function(t){return jr(f(t,Xe))}),di=ar(function(t){var n=We(t);return Xe(n)&&(n=P),
-jr(f(t,Xe),fe(n,2))}),yi=ar(function(t){var n=We(t);return Xe(n)&&(n=P),jr(f(t,Xe),P,n)}),bi=ar(Ce),xi=ar(function(t){var n=t.length,n=1<n?t[n-1]:P,n=typeof n=="function"?(t.pop(),n):P;return Ue(t,n)}),ji=ar(function(t){function n(n){return _n(n,t)}t=kn(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof $t&&ge(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:ze,args:[n],thisArg:P}),new Lt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(P),
-t})):this.thru(n)}),wi=Cr(function(t,n,r){Gu.call(t,r)?++t[r]:t[r]=1}),mi=Pr(Se),Ai=Pr(Ie),ki=Cr(function(t,n,r){Gu.call(t,r)?t[r].push(n):t[r]=[n]}),Ei=ar(function(t,n,e){var u=-1,o=typeof n=="function",i=ye(n),f=Qe(t)?Cu(t.length):[];return Po(t,function(t){var c=o?n:i&&null!=t?t[n]:P;f[++u]=c?r(c,t,e):Mn(t,n,e)}),f}),Oi=Cr(function(t,n,r){t[r]=n}),Si=Cr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),Ii=ar(function(t,n){if(null==t)return[];var r=n.length;return 1<r&&de(t,n[0],n[1])?n=[]:2<r&&de(n[0],n[1],n[2])&&(n=[n[0]]),
-nr(t,kn(n,1),[])}),Ri=lo||function(){return Vt.Date.now()},Wi=ar(function(t,n,r){var e=1;if(r.length)var u=z(r,ie(Wi)),e=32|e;return re(t,e,n,r,u)}),Bi=ar(function(t,n,r){var e=3;if(r.length)var u=z(r,ie(Bi)),e=32|e;return re(n,e,t,r,u)}),Li=ar(function(t,n){return xn(t,1,n)}),Ci=ar(function(t,n,r){return xn(t,_u(n)||0,r)});Ge.Cache=qt;var Ui=ar(function(t,n){n=1==n.length&&Fi(n[0])?l(n[0],S(fe())):l(kn(n,1),S(fe()));var e=n.length;return ar(function(u){for(var o=-1,i=jo(u.length,e);++o<i;)u[o]=n[o].call(this,u[o]);
-return r(t,this,u)})}),Mi=ar(function(t,n){var r=z(n,ie(Mi));return re(t,32,P,n,r)}),zi=ar(function(t,n){var r=z(n,ie(zi));return re(t,64,P,n,r)}),Di=ar(function(t,n){return re(t,256,P,P,P,kn(n,1))}),Ti=Qr(Wn),$i=Qr(function(t,n){return t>=n}),Fi=Cu.isArray,Ni=Ht?S(Ht):zn,Pi=vo||Lu,Zi=Qt?S(Qt):Dn,qi=Xt?S(Xt):$n,Vi=tn?S(tn):Pn,Ki=nn?S(nn):Zn,Gi=rn?S(rn):qn,Ji=Qr(Jn),Yi=Qr(function(t,n){return t<=n}),Hi=Ur(function(t,n){if(Lo||xe(n)||Qe(n))Br(n,bu(n),t);else for(var r in n)Gu.call(n,r)&&ln(t,r,n[r]);
-}),Qi=Ur(function(t,n){Br(n,xu(n),t)}),Xi=Ur(function(t,n,r,e){Br(n,xu(n),t,e)}),tf=Ur(function(t,n,r,e){Br(n,bu(n),t,e)}),nf=ar(function(t,n){return _n(t,kn(n,1))}),rf=ar(function(t){return t.push(P,en),r(Xi,P,t)}),ef=ar(function(t){return t.push(P,we),r(af,P,t)}),uf=Vr(function(t,n,r){t[n]=r},Eu(Ou)),of=Vr(function(t,n,r){Gu.call(t,n)?t[n].push(r):t[n]=[r]},fe),ff=ar(Mn),cf=Ur(function(t,n,r){Xn(t,n,r)}),af=Ur(function(t,n,r,e){Xn(t,n,r,e)}),lf=ar(function(t,n){return null==t?{}:(n=l(kn(n,1),Ae),
-rr(t,jn(Rn(t,xu,Qo),n)))}),sf=ar(function(t,n){return null==t?{}:rr(t,l(kn(n,1),Ae))}),hf=ne(bu),pf=ne(xu),_f=$r(function(t,n,r){return n=n.toLowerCase(),t+(r?mu(n):n)}),vf=$r(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),gf=$r(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),df=Tr("toLowerCase"),yf=$r(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),bf=$r(function(t,n,r){return t+(r?" ":"")+jf(n)}),xf=$r(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),jf=Tr("toUpperCase"),wf=ar(function(t,n){
-try{return r(t,P,n)}catch(t){return tu(t)?t:new Mu(t)}}),mf=ar(function(t,n){return u(kn(n,1),function(n){n=Ae(n),t[n]=Wi(t[n],t)}),t}),Af=Zr(),kf=Zr(true),Ef=ar(function(t,n){return function(r){return Mn(r,t,n)}}),Of=ar(function(t,n){return function(r){return Mn(t,r,n)}}),Sf=Gr(l),If=Gr(i),Rf=Gr(_),Wf=Hr(),Bf=Hr(true),Lf=Kr(function(t,n){return t+n},0),Cf=te("ceil"),Uf=Kr(function(t,n){return t/n},1),Mf=te("floor"),zf=Kr(function(t,n){return t*n},1),Df=te("round"),Tf=Kr(function(t,n){return t-n},0);return It.after=function(t,n){
-if(typeof n!="function")throw new Nu("Expected a function");return t=hu(t),function(){if(1>--t)return n.apply(this,arguments)}},It.ary=Pe,It.assign=Hi,It.assignIn=Qi,It.assignInWith=Xi,It.assignWith=tf,It.at=nf,It.before=Ze,It.bind=Wi,It.bindAll=mf,It.bindKey=Bi,It.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Fi(t)?t:[t]},It.chain=Me,It.chunk=function(t,n,r){if(n=(r?de(t,n,r):n===P)?1:xo(hu(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Cu(ho(r/n));e<r;)o[u++]=sr(t,e,e+=n);
-return o},It.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++n<r;){var o=t[n];o&&(u[e++]=o)}return u},It.concat=function(){for(var t=arguments.length,n=Cu(t?t-1:0),r=arguments[0],e=t;e--;)n[e-1]=arguments[e];return t?s(Fi(r)?Wr(r):[r],kn(n,1)):[]},It.cond=function(t){var n=t?t.length:0,e=fe();return t=n?l(t,function(t){if("function"!=typeof t[1])throw new Nu("Expected a function");return[e(t[0]),t[1]]}):[],ar(function(e){for(var u=-1;++u<n;){var o=t[u];if(r(o[0],this,e))return r(o[1],this,e);
-}})},It.conforms=function(t){return dn(gn(t,true))},It.constant=Eu,It.countBy=wi,It.create=function(t,n){var r=bn(t);return n?pn(r,n):r},It.curry=qe,It.curryRight=Ve,It.debounce=Ke,It.defaults=rf,It.defaultsDeep=ef,It.defer=Li,It.delay=Ci,It.difference=ui,It.differenceBy=oi,It.differenceWith=ii,It.drop=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===P?1:hu(n),sr(t,0>n?0:n,e)):[]},It.dropRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===P?1:hu(n),n=e-n,sr(t,0,0>n?0:n)):[]},It.dropRightWhile=function(t,n){
-return t&&t.length?br(t,fe(n,3),true,true):[]},It.dropWhile=function(t,n){return t&&t.length?br(t,fe(n,3),true):[]},It.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&de(t,n,r)&&(r=0,e=u),u=t.length,r=hu(r),0>r&&(r=-r>u?0:u+r),e=e===P||e>u?u:hu(e),0>e&&(e+=u),e=r>e?0:pu(e);r<e;)t[r++]=n;return t},It.filter=function(t,n){return(Fi(t)?f:An)(t,fe(n,3))},It.flatMap=function(t,n){return kn(Fe(t,n),1)},It.flatMapDeep=function(t,n){return kn(Fe(t,n),Z)},It.flatMapDepth=function(t,n,r){
-return r=r===P?1:hu(r),kn(Fe(t,n),r)},It.flatten=function(t){return t&&t.length?kn(t,1):[]},It.flattenDeep=function(t){return t&&t.length?kn(t,Z):[]},It.flattenDepth=function(t,n){return t&&t.length?(n=n===P?1:hu(n),kn(t,n)):[]},It.flip=function(t){return re(t,512)},It.flow=Af,It.flowRight=kf,It.fromPairs=function(t){for(var n=-1,r=t?t.length:0,e={};++n<r;){var u=t[n];e[u[0]]=u[1]}return e},It.functions=function(t){return null==t?[]:Sn(t,bu(t))},It.functionsIn=function(t){return null==t?[]:Sn(t,xu(t));
-},It.groupBy=ki,It.initial=function(t){return t&&t.length?sr(t,0,-1):[]},It.intersection=fi,It.intersectionBy=ci,It.intersectionWith=ai,It.invert=uf,It.invertBy=of,It.invokeMap=Ei,It.iteratee=Su,It.keyBy=Oi,It.keys=bu,It.keysIn=xu,It.map=Fe,It.mapKeys=function(t,n){var r={};return n=fe(n,3),En(t,function(t,e,u){r[n(t,e,u)]=t}),r},It.mapValues=function(t,n){var r={};return n=fe(n,3),En(t,function(t,e,u){r[e]=n(t,e,u)}),r},It.matches=function(t){return Hn(gn(t,true))},It.matchesProperty=function(t,n){
-return Qn(t,gn(n,true))},It.memoize=Ge,It.merge=cf,It.mergeWith=af,It.method=Ef,It.methodOf=Of,It.mixin=Iu,It.negate=Je,It.nthArg=function(t){return t=hu(t),ar(function(n){return tr(n,t)})},It.omit=lf,It.omitBy=function(t,n){return ju(t,Je(fe(n)))},It.once=function(t){return Ze(2,t)},It.orderBy=function(t,n,r,e){return null==t?[]:(Fi(n)||(n=null==n?[]:[n]),r=e?P:r,Fi(r)||(r=null==r?[]:[r]),nr(t,n,r))},It.over=Sf,It.overArgs=Ui,It.overEvery=If,It.overSome=Rf,It.partial=Mi,It.partialRight=zi,It.partition=Si,
-It.pick=sf,It.pickBy=ju,It.property=Wu,It.propertyOf=function(t){return function(n){return null==t?P:In(t,n)}},It.pull=li,It.pullAll=Be,It.pullAllBy=function(t,n,r){return t&&t.length&&n&&n.length?or(t,n,fe(r,2)):t},It.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?or(t,n,P,r):t},It.pullAt=si,It.range=Wf,It.rangeRight=Bf,It.rearg=Di,It.reject=function(t,n){return(Fi(t)?f:An)(t,Je(fe(n,3)))},It.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],o=t.length;for(n=fe(n,3);++e<o;){
-var i=t[e];n(i,e,t)&&(r.push(i),u.push(e))}return ir(t,u),r},It.rest=function(t,n){if(typeof t!="function")throw new Nu("Expected a function");return n=n===P?n:hu(n),ar(t,n)},It.reverse=Le,It.sampleSize=Ne,It.set=function(t,n,r){return null==t?t:lr(t,n,r)},It.setWith=function(t,n,r,e){return e=typeof e=="function"?e:P,null==t?t:lr(t,n,r,e)},It.shuffle=function(t){return Ne(t,4294967295)},It.slice=function(t,n,r){var e=t?t.length:0;return e?(r&&typeof r!="number"&&de(t,n,r)?(n=0,r=e):(n=null==n?0:hu(n),
-r=r===P?e:hu(r)),sr(t,n,r)):[]},It.sortBy=Ii,It.sortedUniq=function(t){return t&&t.length?vr(t):[]},It.sortedUniqBy=function(t,n){return t&&t.length?vr(t,fe(n,2)):[]},It.split=function(t,n,r){return r&&typeof r!="number"&&de(t,n,r)&&(n=r=P),r=r===P?4294967295:r>>>0,r?(t=gu(t))&&(typeof n=="string"||null!=n&&!Vi(n))&&(n=dr(n),!n&&Ut.test(t))?kr(F(t),0,r):t.split(n,r):[]},It.spread=function(t,n){if(typeof t!="function")throw new Nu("Expected a function");return n=n===P?0:xo(hu(n),0),ar(function(e){
-var u=e[n];return e=kr(e,0,n),u&&s(e,u),r(t,this,e)})},It.tail=function(t){var n=t?t.length:0;return n?sr(t,1,n):[]},It.take=function(t,n,r){return t&&t.length?(n=r||n===P?1:hu(n),sr(t,0,0>n?0:n)):[]},It.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===P?1:hu(n),n=e-n,sr(t,0>n?0:n,e)):[]},It.takeRightWhile=function(t,n){return t&&t.length?br(t,fe(n,3),false,true):[]},It.takeWhile=function(t,n){return t&&t.length?br(t,fe(n,3)):[]},It.tap=function(t,n){return n(t),t},It.throttle=function(t,n,r){
-var e=true,u=true;if(typeof t!="function")throw new Nu("Expected a function");return uu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Ke(t,n,{leading:e,maxWait:n,trailing:u})},It.thru=ze,It.toArray=lu,It.toPairs=hf,It.toPairsIn=pf,It.toPath=function(t){return Fi(t)?l(t,Ae):au(t)?[t]:Wr(ei(t))},It.toPlainObject=vu,It.transform=function(t,n,r){var e=Fi(t)||Gi(t);if(n=fe(n,4),null==r)if(e||uu(t)){var o=t.constructor;r=e?Fi(t)?new o:[]:nu(o)?bn(eo(t)):{}}else r={};return(e?u:En)(t,function(t,e,u){
-return n(r,t,e,u)}),r},It.unary=function(t){return Pe(t,1)},It.union=hi,It.unionBy=pi,It.unionWith=_i,It.uniq=function(t){return t&&t.length?yr(t):[]},It.uniqBy=function(t,n){return t&&t.length?yr(t,fe(n,2)):[]},It.uniqWith=function(t,n){return t&&t.length?yr(t,P,n):[]},It.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=ye(e,r)?[e]:Ar(e);r=me(r,e),e=Ae(We(e)),r=!(null!=r&&Gu.call(r,e))||delete r[e]}return r},It.unzip=Ce,It.unzipWith=Ue,It.update=function(t,n,r){return null==t?t:lr(t,n,(typeof r=="function"?r:Ou)(In(t,n)),void 0);
-},It.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:P,null!=t&&(t=lr(t,n,(typeof r=="function"?r:Ou)(In(t,n)),e)),t},It.values=wu,It.valuesIn=function(t){return null==t?[]:I(t,xu(t))},It.without=vi,It.words=ku,It.wrap=function(t,n){return n=null==n?Ou:n,Mi(n,t)},It.xor=gi,It.xorBy=di,It.xorWith=yi,It.zip=bi,It.zipObject=function(t,n){return wr(t||[],n||[],ln)},It.zipObjectDeep=function(t,n){return wr(t||[],n||[],lr)},It.zipWith=xi,It.entries=hf,It.entriesIn=pf,It.extend=Qi,It.extendWith=Xi,
-Iu(It,It),It.add=Lf,It.attempt=wf,It.camelCase=_f,It.capitalize=mu,It.ceil=Cf,It.clamp=function(t,n,r){return r===P&&(r=n,n=P),r!==P&&(r=_u(r),r=r===r?r:0),n!==P&&(n=_u(n),n=n===n?n:0),vn(_u(t),n,r)},It.clone=function(t){return gn(t,false,true)},It.cloneDeep=function(t){return gn(t,true,true)},It.cloneDeepWith=function(t,n){return gn(t,true,true,n)},It.cloneWith=function(t,n){return gn(t,false,true,n)},It.conformsTo=function(t,n){return null==n||yn(t,n,bu(n))},It.deburr=Au,It.defaultTo=function(t,n){return null==t||t!==t?n:t;
-},It.divide=Uf,It.endsWith=function(t,n,r){t=gu(t),n=dr(n);var e=t.length,e=r=r===P?e:vn(hu(r),0,e);return r-=n.length,0<=r&&t.slice(r,e)==n},It.eq=Ye,It.escape=function(t){return(t=gu(t))&&X.test(t)?t.replace(H,on):t},It.escapeRegExp=function(t){return(t=gu(t))&&ct.test(t)?t.replace(ft,"\\$&"):t},It.every=function(t,n,r){var e=Fi(t)?i:wn;return r&&de(t,n,r)&&(n=P),e(t,fe(n,3))},It.find=mi,It.findIndex=Se,It.findKey=function(t,n){return v(t,fe(n,3),En)},It.findLast=Ai,It.findLastIndex=Ie,It.findLastKey=function(t,n){
-return v(t,fe(n,3),On)},It.floor=Mf,It.forEach=Te,It.forEachRight=$e,It.forIn=function(t,n){return null==t?t:qo(t,fe(n,3),xu)},It.forInRight=function(t,n){return null==t?t:Vo(t,fe(n,3),xu)},It.forOwn=function(t,n){return t&&En(t,fe(n,3))},It.forOwnRight=function(t,n){return t&&On(t,fe(n,3))},It.get=du,It.gt=Ti,It.gte=$i,It.has=function(t,n){return null!=t&&se(t,n,Bn)},It.hasIn=yu,It.head=Re,It.identity=Ou,It.includes=function(t,n,r,e){return t=Qe(t)?t:wu(t),r=r&&!e?hu(r):0,e=t.length,0>r&&(r=xo(e+r,0)),
-cu(t)?r<=e&&-1<t.indexOf(n,r):!!e&&-1<d(t,n,r)},It.indexOf=function(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:hu(r),0>r&&(r=xo(e+r,0)),d(t,n,r)):-1},It.inRange=function(t,n,r){return n=su(n),r===P?(r=n,n=0):r=su(r),t=_u(t),t>=jo(n,r)&&t<xo(n,r)},It.invoke=ff,It.isArguments=He,It.isArray=Fi,It.isArrayBuffer=Ni,It.isArrayLike=Qe,It.isArrayLikeObject=Xe,It.isBoolean=function(t){return true===t||false===t||ou(t)&&"[object Boolean]"==Hu.call(t)},It.isBuffer=Pi,It.isDate=Zi,It.isElement=function(t){return!!t&&1===t.nodeType&&ou(t)&&!fu(t);
-},It.isEmpty=function(t){if(Qe(t)&&(Fi(t)||typeof t=="string"||typeof t.splice=="function"||Pi(t)||He(t)))return!t.length;var n=St(t);if("[object Map]"==n||"[object Set]"==n)return!t.size;if(Lo||xe(t))return!bo(t).length;for(var r in t)if(Gu.call(t,r))return false;return true},It.isEqual=function(t,n){return Tn(t,n)},It.isEqualWith=function(t,n,r){var e=(r=typeof r=="function"?r:P)?r(t,n):P;return e===P?Tn(t,n,r):!!e},It.isError=tu,It.isFinite=function(t){return typeof t=="number"&&go(t)},It.isFunction=nu,
-It.isInteger=ru,It.isLength=eu,It.isMap=qi,It.isMatch=function(t,n){return t===n||Fn(t,n,ae(n))},It.isMatchWith=function(t,n,r){return r=typeof r=="function"?r:P,Fn(t,n,ae(n),r)},It.isNaN=function(t){return iu(t)&&t!=+t},It.isNative=function(t){if(Xo(t))throw new Mu("This method is not supported with core-js. Try https://github.com/es-shims.");return Nn(t)},It.isNil=function(t){return null==t},It.isNull=function(t){return null===t},It.isNumber=iu,It.isObject=uu,It.isObjectLike=ou,It.isPlainObject=fu,
-It.isRegExp=Vi,It.isSafeInteger=function(t){return ru(t)&&-9007199254740991<=t&&9007199254740991>=t},It.isSet=Ki,It.isString=cu,It.isSymbol=au,It.isTypedArray=Gi,It.isUndefined=function(t){return t===P},It.isWeakMap=function(t){return ou(t)&&"[object WeakMap]"==St(t)},It.isWeakSet=function(t){return ou(t)&&"[object WeakSet]"==Hu.call(t)},It.join=function(t,n){return t?yo.call(t,n):""},It.kebabCase=vf,It.last=We,It.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==P&&(u=hu(r),
-u=(0>u?xo(e+u,0):jo(u,e-1))+1),n!==n)return g(t,b,u-1,true);for(;u--;)if(t[u]===n)return u;return-1},It.lowerCase=gf,It.lowerFirst=df,It.lt=Ji,It.lte=Yi,It.max=function(t){return t&&t.length?mn(t,Ou,Wn):P},It.maxBy=function(t,n){return t&&t.length?mn(t,fe(n,2),Wn):P},It.mean=function(t){return x(t,Ou)},It.meanBy=function(t,n){return x(t,fe(n,2))},It.min=function(t){return t&&t.length?mn(t,Ou,Jn):P},It.minBy=function(t,n){return t&&t.length?mn(t,fe(n,2),Jn):P},It.stubArray=Bu,It.stubFalse=Lu,It.stubObject=function(){
-return{}},It.stubString=function(){return""},It.stubTrue=function(){return true},It.multiply=zf,It.nth=function(t,n){return t&&t.length?tr(t,hu(n)):P},It.noConflict=function(){return Vt._===this&&(Vt._=Qu),this},It.noop=Ru,It.now=Ri,It.pad=function(t,n,r){t=gu(t);var e=(n=hu(n))?$(t):0;return!n||e>=n?t:(n=(n-e)/2,Jr(po(n),r)+t+Jr(ho(n),r))},It.padEnd=function(t,n,r){t=gu(t);var e=(n=hu(n))?$(t):0;return n&&e<n?t+Jr(n-e,r):t},It.padStart=function(t,n,r){t=gu(t);var e=(n=hu(n))?$(t):0;return n&&e<n?Jr(n-e,r)+t:t;
-},It.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),t=gu(t).replace(at,""),wo(t,n||(bt.test(t)?16:10))},It.random=function(t,n,r){if(r&&typeof r!="boolean"&&de(t,n,r)&&(n=r=P),r===P&&(typeof n=="boolean"?(r=n,n=P):typeof t=="boolean"&&(r=t,t=P)),t===P&&n===P?(t=0,n=1):(t=su(t),n===P?(n=t,t=0):n=su(n)),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=mo(),jo(t+r*(n-t+Nt("1e-"+((r+"").length-1))),n)):fr(t,n)},It.reduce=function(t,n,r){var e=Fi(t)?h:m,u=3>arguments.length;return e(t,fe(n,4),r,u,Po);
-},It.reduceRight=function(t,n,r){var e=Fi(t)?p:m,u=3>arguments.length;return e(t,fe(n,4),r,u,Zo)},It.repeat=function(t,n,r){return n=(r?de(t,n,r):n===P)?1:hu(n),cr(gu(t),n)},It.replace=function(){var t=arguments,n=gu(t[0]);return 3>t.length?n:n.replace(t[1],t[2])},It.result=function(t,n,r){n=ye(n,t)?[n]:Ar(n);var e=-1,u=n.length;for(u||(t=P,u=1);++e<u;){var o=null==t?P:t[Ae(n[e])];o===P&&(e=u,o=r),t=nu(o)?o.call(t):o}return t},It.round=Df,It.runInContext=N,It.sample=function(t){t=Qe(t)?t:wu(t);var n=t.length;
-return 0<n?t[fr(0,n-1)]:P},It.size=function(t){if(null==t)return 0;if(Qe(t))return cu(t)?$(t):t.length;var n=St(t);return"[object Map]"==n||"[object Set]"==n?t.size:Kn(t).length},It.snakeCase=yf,It.some=function(t,n,r){var e=Fi(t)?_:hr;return r&&de(t,n,r)&&(n=P),e(t,fe(n,3))},It.sortedIndex=function(t,n){return pr(t,n)},It.sortedIndexBy=function(t,n,r){return _r(t,n,fe(r,2))},It.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=pr(t,n);if(e<r&&Ye(t[e],n))return e}return-1},It.sortedLastIndex=function(t,n){
-return pr(t,n,true)},It.sortedLastIndexBy=function(t,n,r){return _r(t,n,fe(r,2),true)},It.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=pr(t,n,true)-1;if(Ye(t[r],n))return r}return-1},It.startCase=bf,It.startsWith=function(t,n,r){return t=gu(t),r=vn(hu(r),0,t.length),n=dr(n),t.slice(r,r+n.length)==n},It.subtract=Tf,It.sum=function(t){return t&&t.length?k(t,Ou):0},It.sumBy=function(t,n){return t&&t.length?k(t,fe(n,2)):0},It.template=function(t,n,r){var e=It.templateSettings;r&&de(t,n,r)&&(n=P),t=gu(t),
-n=Xi({},n,e,en),r=Xi({},n.imports,e.imports,en);var u,o,i=bu(r),f=I(r,i),c=0;r=n.interpolate||Et;var a="__p+='";r=$u((n.escape||Et).source+"|"+r.source+"|"+(r===rt?dt:Et).source+"|"+(n.evaluate||Et).source+"|$","g");var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){return e||(e=i),a+=t.slice(c,l).replace(Ot,L),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),
-a=(o?a.replace(K,""):a).replace(G,"$1").replace(J,"$1;"),a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",n=wf(function(){return zu(i,l+"return "+a).apply(P,f)}),n.source=a,tu(n))throw n;return n},It.times=function(t,n){if(t=hu(t),1>t||9007199254740991<t)return[];var r=4294967295,e=jo(t,4294967295);for(n=fe(n),t-=4294967295,e=E(e,n);++r<t;)n(r);return e},It.toFinite=su,
-It.toInteger=hu,It.toLength=pu,It.toLower=function(t){return gu(t).toLowerCase()},It.toNumber=_u,It.toSafeInteger=function(t){return vn(hu(t),-9007199254740991,9007199254740991)},It.toString=gu,It.toUpper=function(t){return gu(t).toUpperCase()},It.trim=function(t,n,r){return(t=gu(t))&&(r||n===P)?t.replace(at,""):t&&(n=dr(n))?(t=F(t),r=F(n),n=W(t,r),r=B(t,r)+1,kr(t,n,r).join("")):t},It.trimEnd=function(t,n,r){return(t=gu(t))&&(r||n===P)?t.replace(st,""):t&&(n=dr(n))?(t=F(t),n=B(t,F(n))+1,kr(t,0,n).join("")):t;
-},It.trimStart=function(t,n,r){return(t=gu(t))&&(r||n===P)?t.replace(lt,""):t&&(n=dr(n))?(t=F(t),n=W(t,F(n)),kr(t,n).join("")):t},It.truncate=function(t,n){var r=30,e="...";if(uu(n))var u="separator"in n?n.separator:u,r="length"in n?hu(n.length):r,e="omission"in n?dr(n.omission):e;t=gu(t);var o=t.length;if(Ut.test(t))var i=F(t),o=i.length;if(r>=o)return t;if(o=r-$(e),1>o)return e;if(r=i?kr(i,0,o).join(""):t.slice(0,o),u===P)return r+e;if(i&&(o+=r.length-o),Vi(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=$u(u.source,gu(yt.exec(u))+"g")),
-u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===P?o:c)}}else t.indexOf(dr(u),o)!=o&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},It.unescape=function(t){return(t=gu(t))&&Q.test(t)?t.replace(Y,fn):t},It.uniqueId=function(t){var n=++Ju;return gu(t)+n},It.upperCase=xf,It.upperFirst=jf,It.each=Te,It.eachRight=$e,It.first=Re,Iu(It,function(){var t={};return En(It,function(n,r){Gu.call(It.prototype,r)||(t[r]=n)}),t}(),{chain:false}),It.VERSION="4.15.0",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){
-It[t].placeholder=It}),u(["drop","take"],function(t,n){$t.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new $t(this);r=r===P?1:xo(hu(r),0);var u=this.clone();return e?u.__takeCount__=jo(r,u.__takeCount__):u.__views__.push({size:jo(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},$t.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;$t.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({
-iteratee:fe(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");$t.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");$t.prototype[t]=function(){return this.__filtered__?new $t(this):this[r](1)}}),$t.prototype.compact=function(){return this.filter(Ou)},$t.prototype.find=function(t){return this.filter(t).head()},$t.prototype.findLast=function(t){return this.reverse().find(t);
-},$t.prototype.invokeMap=ar(function(t,n){return typeof t=="function"?new $t(this):this.map(function(r){return Mn(r,t,n)})}),$t.prototype.reject=function(t){return this.filter(Je(fe(t)))},$t.prototype.slice=function(t,n){t=hu(t);var r=this;return r.__filtered__&&(0<t||0>n)?new $t(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==P&&(n=hu(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},$t.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},$t.prototype.toArray=function(){return this.take(4294967295);
-},En($t.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=It[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(It.prototype[n]=function(){function n(t){return t=u.apply(It,s([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof $t,a=f[0],l=c||Fi(i);l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&l?(i=c?i:new $t(this),i=t.apply(i,f),i.__actions__.push({
-func:ze,args:[n],thisArg:P}),new Lt(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=Pu[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);It.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(Fi(u)?u:[],t)}return this[r](function(r){return n.apply(Fi(r)?r:[],t)})}}),En($t.prototype,function(t,n){var r=It[n];if(r){var e=r.name+"";
-(Co[e]||(Co[e]=[])).push({name:n,func:r})}}),Co[qr(P,2).name]=[{name:"wrapper",func:P}],$t.prototype.clone=function(){var t=new $t(this.__wrapped__);return t.__actions__=Wr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Wr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Wr(this.__views__),t},$t.prototype.reverse=function(){if(this.__filtered__){var t=new $t(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t;
-},$t.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=Fi(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++c<a;){var l=i[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":t-=s;break;case"take":t=jo(t,f+s);break;case"takeRight":f=xo(f,t-s)}}if(t={start:f,end:t},i=t.start,f=t.end,t=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=jo(t,this.__takeCount__),!e||200>o||o==t&&a==t)return xr(n,this.__actions__);e=[];t:for(;t--&&c<a;){
-for(u+=r,o=-1,l=n[u];++o<f;){var h=i[o],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue t;break t}}e[c++]=l}return e},It.prototype.at=ji,It.prototype.chain=function(){return Me(this)},It.prototype.commit=function(){return new Lt(this.value(),this.__chain__)},It.prototype.next=function(){this.__values__===P&&(this.__values__=lu(this.value()));var t=this.__index__>=this.__values__.length,n=t?P:this.__values__[this.__index__++];return{done:t,value:n}},It.prototype.plant=function(t){
-for(var n,r=this;r instanceof Rt;){var e=Oe(r);e.__index__=0,e.__values__=P,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},It.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof $t?(this.__actions__.length&&(t=new $t(this)),t=t.reverse(),t.__actions__.push({func:ze,args:[Le],thisArg:P}),new Lt(t,this.__chain__)):this.thru(Le)},It.prototype.toJSON=It.prototype.valueOf=It.prototype.value=function(){return xr(this.__wrapped__,this.__actions__)},It.prototype.first=It.prototype.head,
-uo&&(It.prototype[uo]=De),It}var P,Z=1/0,q=NaN,V=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],K=/\b__p\+='';/g,G=/\b(__p\+=)''\+/g,J=/(__e\(.*?\)|\b__t\))\+'';/g,Y=/&(?:amp|lt|gt|quot|#39|#96);/g,H=/[&<>"'`]/g,Q=RegExp(Y.source),X=RegExp(H.source),tt=/<%-([\s\S]+?)%>/g,nt=/<%([\s\S]+?)%>/g,rt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ut=/^\w*$/,ot=/^\./,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ft=/[\\^$.*+?()[\]{}|]/g,ct=RegExp(ft.source),at=/^\s+|\s+$/g,lt=/^\s+/,st=/\s+$/,ht=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pt=/\{\n\/\* \[wrapped with (.+)\] \*/,_t=/,? & /,vt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gt=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yt=/\w*$/,bt=/^0x/i,xt=/^[-+]0x[0-9a-f]+$/i,jt=/^0b[01]+$/i,wt=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,At=/^(?:0|[1-9]\d*)$/,kt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Et=/($^)/,Ot=/['\n\r\u2028\u2029\\]/g,St="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",It="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+St,Rt="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",Wt=RegExp("['\u2019]","g"),Bt=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),Lt=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Rt+St,"g"),Ct=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+",It].join("|"),"g"),Ut=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Mt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zt="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(" "),Dt={};
-Dt["[object Float32Array]"]=Dt["[object Float64Array]"]=Dt["[object Int8Array]"]=Dt["[object Int16Array]"]=Dt["[object Int32Array]"]=Dt["[object Uint8Array]"]=Dt["[object Uint8ClampedArray]"]=Dt["[object Uint16Array]"]=Dt["[object Uint32Array]"]=true,Dt["[object Arguments]"]=Dt["[object Array]"]=Dt["[object ArrayBuffer]"]=Dt["[object Boolean]"]=Dt["[object DataView]"]=Dt["[object Date]"]=Dt["[object Error]"]=Dt["[object Function]"]=Dt["[object Map]"]=Dt["[object Number]"]=Dt["[object Object]"]=Dt["[object RegExp]"]=Dt["[object Set]"]=Dt["[object String]"]=Dt["[object WeakMap]"]=false;
-var Tt={};Tt["[object Arguments]"]=Tt["[object Array]"]=Tt["[object ArrayBuffer]"]=Tt["[object DataView]"]=Tt["[object Boolean]"]=Tt["[object Date]"]=Tt["[object Float32Array]"]=Tt["[object Float64Array]"]=Tt["[object Int8Array]"]=Tt["[object Int16Array]"]=Tt["[object Int32Array]"]=Tt["[object Map]"]=Tt["[object Number]"]=Tt["[object Object]"]=Tt["[object RegExp]"]=Tt["[object Set]"]=Tt["[object String]"]=Tt["[object Symbol]"]=Tt["[object Uint8Array]"]=Tt["[object Uint8ClampedArray]"]=Tt["[object Uint16Array]"]=Tt["[object Uint32Array]"]=true,
-Tt["[object Error]"]=Tt["[object Function]"]=Tt["[object WeakMap]"]=false;var $t,Ft={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Nt=parseFloat,Pt=parseInt,Zt=typeof global=="object"&&global&&global.Object===Object&&global,qt=typeof self=="object"&&self&&self.Object===Object&&self,Vt=Zt||qt||Function("return this")(),Kt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gt=Kt&&typeof module=="object"&&module&&!module.nodeType&&module,Jt=Gt&&Gt.exports===Kt,Yt=Jt&&Zt.g;
-t:{try{$t=Yt&&Yt.f("util");break t}catch(t){}$t=void 0}var Ht=$t&&$t.isArrayBuffer,Qt=$t&&$t.isDate,Xt=$t&&$t.isMap,tn=$t&&$t.isRegExp,nn=$t&&$t.isSet,rn=$t&&$t.isTypedArray,en=j("length"),un=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",
+;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,i=t?t.length:0;++u<i;){var o=t[u];n(e,o,r(o),t)}return e}function u(t,n){for(var r=-1,e=t?t.length:0;++r<e&&false!==n(t[r],r,t););return t}function i(t,n){for(var r=t?t.length:0;r--&&false!==n(t[r],r,t););
+return t}function o(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(!n(t[r],r,t))return false;return true}function f(t,n){for(var r=-1,e=t?t.length:0,u=0,i=[];++r<e;){var o=t[r];n(o,r,t)&&(i[u++]=o)}return i}function c(t,n){return!(!t||!t.length)&&-1<d(t,n,0)}function a(t,n,r){for(var e=-1,u=t?t.length:0;++e<u;)if(r(n,t[e]))return true;return false}function l(t,n){for(var r=-1,e=t?t.length:0,u=Array(e);++r<e;)u[r]=n(t[r],r,t);return u}function s(t,n){for(var r=-1,e=n.length,u=t.length;++r<e;)t[u+r]=n[r];return t}function h(t,n,r,e){
+var u=-1,i=t?t.length:0;for(e&&i&&(r=t[++u]);++u<i;)r=n(r,t[u],u,t);return r}function p(t,n,r,e){var u=t?t.length:0;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);return r}function _(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(n(t[r],r,t))return true;return false}function v(t,n,r){var e;return r(t,function(t,r,u){if(n(t,r,u))return e=r,false}),e}function g(t,n,r,e){var u=t.length;for(r+=e?1:-1;e?r--:++r<u;)if(n(t[r],r,t))return r;return-1}function d(t,n,r){if(n===n)t:{--r;for(var e=t.length;++r<e;)if(t[r]===n){t=r;
+break t}t=-1}else t=g(t,b,r);return t}function y(t,n,r,e){--r;for(var u=t.length;++r<u;)if(e(t[r],n))return r;return-1}function b(t){return t!==t}function x(t,n){var r=t?t.length:0;return r?k(t,n)/r:P}function j(t){return function(n){return null==n?F:n[t]}}function w(t){return function(n){return null==t?F:t[n]}}function m(t,n,r,e,u){return u(t,function(t,u,i){r=e?(e=false,t):n(r,t,u,i)}),r}function A(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].c;return t}function k(t,n){for(var r,e=-1,u=t.length;++e<u;){
+var i=n(t[e]);i!==F&&(r=r===F?i:r+i)}return r}function E(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function O(t,n){return l(n,function(n){return[n,t[n]]})}function S(t){return function(n){return t(n)}}function I(t,n){return l(n,function(n){return t[n]})}function R(t,n){return t.has(n)}function z(t,n){for(var r=-1,e=t.length;++r<e&&-1<d(n,t[r],0););return r}function W(t,n){for(var r=t.length;r--&&-1<d(n,t[r],0););return r}function B(t){return"\\"+Dt[t]}function L(t){var n=-1,r=Array(t.size);
+return t.forEach(function(t,e){r[++n]=[e,t]}),r}function U(t,n){return function(r){return t(n(r))}}function C(t,n){for(var r=-1,e=t.length,u=0,i=[];++r<e;){var o=t[r];o!==n&&"__lodash_placeholder__"!==o||(t[r]="__lodash_placeholder__",i[u++]=r)}return i}function M(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function D(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=[t,t]}),r}function T(t){if(Wt.test(t)){for(var n=Rt.lastIndex=0;Rt.test(t);)++n;t=n}else t=tn(t);
+return t}function $(t){return Wt.test(t)?t.match(Rt)||[]:t.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,J=/[&<>"']/g,Y=RegExp(G.source),H=RegExp(J.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,nt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rt=/^\w*$/,et=/^\./,ut=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ot=RegExp(it.source),ft=/^\s+|\s+$/g,ct=/^\s+/,at=/\s+$/,lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,ht=/,? & /,pt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_t=/\\(\\)?/g,vt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gt=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,bt=/^\[object .+?Constructor\]$/,xt=/^0o[0-7]+$/i,jt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mt=/($^)/,At=/['\n\r\u2028\u2029\\]/g,kt="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",Et="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+kt,Ot="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",St=RegExp("['\u2019]","g"),It=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),Rt=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Ot+kt,"g"),zt=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+",Et].join("|"),"g"),Wt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Bt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Lt="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(" "),Ut={};
+Ut["[object Float32Array]"]=Ut["[object Float64Array]"]=Ut["[object Int8Array]"]=Ut["[object Int16Array]"]=Ut["[object Int32Array]"]=Ut["[object Uint8Array]"]=Ut["[object Uint8ClampedArray]"]=Ut["[object Uint16Array]"]=Ut["[object Uint32Array]"]=true,Ut["[object Arguments]"]=Ut["[object Array]"]=Ut["[object ArrayBuffer]"]=Ut["[object Boolean]"]=Ut["[object DataView]"]=Ut["[object Date]"]=Ut["[object Error]"]=Ut["[object Function]"]=Ut["[object Map]"]=Ut["[object Number]"]=Ut["[object Object]"]=Ut["[object RegExp]"]=Ut["[object Set]"]=Ut["[object String]"]=Ut["[object WeakMap]"]=false;
+var Ct={};Ct["[object Arguments]"]=Ct["[object Array]"]=Ct["[object ArrayBuffer]"]=Ct["[object DataView]"]=Ct["[object Boolean]"]=Ct["[object Date]"]=Ct["[object Float32Array]"]=Ct["[object Float64Array]"]=Ct["[object Int8Array]"]=Ct["[object Int16Array]"]=Ct["[object Int32Array]"]=Ct["[object Map]"]=Ct["[object Number]"]=Ct["[object Object]"]=Ct["[object RegExp]"]=Ct["[object Set]"]=Ct["[object String]"]=Ct["[object Symbol]"]=Ct["[object Uint8Array]"]=Ct["[object Uint8ClampedArray]"]=Ct["[object Uint16Array]"]=Ct["[object Uint32Array]"]=true,
+Ct["[object Error]"]=Ct["[object Function]"]=Ct["[object WeakMap]"]=false;var Mt,Dt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Tt=parseFloat,$t=parseInt,Ft=typeof global=="object"&&global&&global.Object===Object&&global,Nt=typeof self=="object"&&self&&self.Object===Object&&self,Pt=Ft||Nt||Function("return this")(),Zt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qt=Zt&&typeof module=="object"&&module&&!module.nodeType&&module,Vt=qt&&qt.exports===Zt,Kt=Vt&&Ft.h;
+t:{try{Mt=Kt&&Kt.g("util");break t}catch(t){}Mt=void 0}var Gt=Mt&&Mt.isArrayBuffer,Jt=Mt&&Mt.isDate,Yt=Mt&&Mt.isMap,Ht=Mt&&Mt.isRegExp,Qt=Mt&&Mt.isSet,Xt=Mt&&Mt.isTypedArray,tn=j("length"),nn=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":"ss"}),on=w({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"}),fn=w({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"}),cn=N();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Vt._=cn, define(function(){return cn})):Gt?((Gt.exports=cn)._=cn,Kt._=cn):Vt._=cn}).call(this); \ No newline at end of file
+"\u017f":"s"}),rn=w({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),en=w({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),un=function w(kt){function Et(t){return fi.call(t)}function Ot(t){if(vu(t)&&!nf(t)&&!(t instanceof Dt)){if(t instanceof Mt)return t;if(ui.call(t,"__wrapped__"))return De(t)}return new Mt(t)}function Rt(){}function Mt(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=F}function Dt(t){this.__wrapped__=t,this.__actions__=[],
+this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Ft(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Nt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Zt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function qt(t){var n=-1,r=t?t.length:0;for(this.__data__=new Zt;++n<r;)this.add(t[n])}function Kt(t){this.size=(this.__data__=new Nt(t)).size;
+}function tn(t,n){var r,e=nf(t),u=!e&&tf(t),i=!e&&!u&&ef(t),o=!e&&!u&&!i&&af(t),u=(e=e||u||i||o)?E(t.length,Hu):[],f=u.length;for(r in t)!n&&!ui.call(t,r)||e&&("length"==r||i&&("offset"==r||"parent"==r)||o&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||me(r,f))||u.push(r);return u}function on(t){var n=t.length;return n?t[cr(0,n-1)]:F}function fn(t,n){return Le(Cr(t),dn(n,0,t.length))}function cn(t){return Le(Cr(t))}function an(t,n,r,e){return t===F||fu(t,ti[r])&&!ui.call(e,r)?n:t}function ln(t,n,r){
+(r===F||fu(t[n],r))&&(r!==F||n in t)||vn(t,n,r)}function sn(t,n,r){var e=t[n];ui.call(t,n)&&fu(e,r)&&(r!==F||n in t)||vn(t,n,r)}function hn(t,n){for(var r=t.length;r--;)if(fu(t[r][0],n))return r;return-1}function pn(t,n,r,e){return to(t,function(t,u,i){n(e,t,r(t),i)}),e}function _n(t,n){return t&&Mr(n,Iu(n),t)}function vn(t,n,r){"__proto__"==n&&xi?xi(t,n,{configurable:true,enumerable:true,value:r,writable:true}):t[n]=r}function gn(t,n){for(var r=-1,e=null==t,u=n.length,i=Zu(u);++r<u;)i[r]=e?F:Ou(t,n[r]);
+return i}function dn(t,n,r){return t===t&&(r!==F&&(t=t<=r?t:r),n!==F&&(t=t>=n?t:n)),t}function yn(t,n,r,e,i,o,f){var c;if(e&&(c=o?e(t,i,o,f):e(t)),c!==F)return c;if(!_u(t))return t;if(i=nf(t)){if(c=be(t),!n)return Cr(t,c)}else{var a=Et(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(ef(t))return Rr(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!o){if(c=xe(l?{}:t),!n)return Dr(t,_n(c,t))}else{if(!Ct[a])return o?t:{};c=je(t,a,yn,n)}}if(f||(f=new Kt),o=f.get(t))return o;f.set(t,c);
+var s=i?F:(r?se:Iu)(t);return u(s||t,function(u,i){s&&(i=u,u=t[i]),sn(c,i,yn(u,n,r,e,i,t,f))}),c}function bn(t){var n=Iu(t);return function(r){return xn(r,t,n)}}function xn(t,n,r){var e=r.length;if(null==t)return!e;for(t=Ju(t);e--;){var u=r[e],i=n[u],o=t[u];if(o===F&&!(u in t)||!i(o))return false}return true}function jn(t,n,r){if(typeof t!="function")throw new Qu("Expected a function");return po(function(){t.apply(F,r)},n)}function wn(t,n,r,e){var u=-1,i=c,o=true,f=t.length,s=[],h=n.length;if(!f)return s;r&&(n=l(n,S(r))),
+e?(i=a,o=false):200<=n.length&&(i=R,o=false,n=new qt(n));t:for(;++u<f;){var p=t[u],_=r?r(p):p,p=e||0!==p?p:0;if(o&&_===_){for(var v=h;v--;)if(n[v]===_)continue t;s.push(p)}else i(n,_,e)||s.push(p)}return s}function mn(t,n){var r=true;return to(t,function(t,e,u){return r=!!n(t,e,u)}),r}function An(t,n,r){for(var e=-1,u=t.length;++e<u;){var i=t[e],o=n(i);if(null!=o&&(f===F?o===o&&!bu(o):r(o,f)))var f=o,c=i}return c}function kn(t,n){var r=[];return to(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function En(t,n,r,e,u){
+var i=-1,o=t.length;for(r||(r=we),u||(u=[]);++i<o;){var f=t[i];0<n&&r(f)?1<n?En(f,n-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function On(t,n){return t&&ro(t,n,Iu)}function Sn(t,n){return t&&eo(t,n,Iu)}function In(t,n){return f(n,function(n){return su(t[n])})}function Rn(t,n){n=ke(n,t)?[n]:Sr(n);for(var r=0,e=n.length;null!=t&&r<e;)t=t[Ue(n[r++])];return r&&r==e?t:F}function zn(t,n,r){return n=n(t),nf(t)?n:s(n,r(t))}function Wn(t,n){return t>n}function Bn(t,n){return null!=t&&ui.call(t,n)}function Ln(t,n){
+return null!=t&&n in Ju(t)}function Un(t,n,r){for(var e=r?a:c,u=t[0].length,i=t.length,o=i,f=Zu(i),s=1/0,h=[];o--;){var p=t[o];o&&n&&(p=l(p,S(n))),s=Wi(p.length,s),f[o]=!r&&(n||120<=u&&120<=p.length)?new qt(o&&p):F}var p=t[0],_=-1,v=f[0];t:for(;++_<u&&h.length<s;){var g=p[_],d=n?n(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(t[o],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function Cn(t,n,r){var e={};return On(t,function(t,u,i){n(e,r(t),u,i)}),e}function Mn(t,n,e){
+return ke(n,t)||(n=Sr(n),t=ze(t,n),n=Pe(n)),n=null==t?t:t[Ue(n)],null==n?F:r(n,t,e)}function Dn(t){return vu(t)&&"[object Arguments]"==fi.call(t)}function Tn(t){return vu(t)&&"[object ArrayBuffer]"==fi.call(t)}function $n(t){return vu(t)&&"[object Date]"==fi.call(t)}function Fn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!_u(t)&&!vu(n))n=t!==t&&n!==n;else t:{var i=nf(t),o=nf(n),f="[object Array]",c="[object Array]";i||(f=Et(t),f="[object Arguments]"==f?"[object Object]":f),o||(c=Et(n),c="[object Arguments]"==c?"[object Object]":c);
+var a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&ef(t)){if(!ef(n)){n=false;break t}i=true,a=false}if(c&&!a)u||(u=new Kt),n=i||af(t)?ce(t,n,Fn,r,e,u):ae(t,n,f,Fn,r,e,u);else{if(!(2&e)&&(i=a&&ui.call(t,"__wrapped__"),f=o&&ui.call(n,"__wrapped__"),i||f)){t=i?t.value():t,n=f?n.value():n,u||(u=new Kt),n=Fn(t,n,r,e,u);break t}if(c)n:if(u||(u=new Kt),i=2&e,f=Iu(t),o=f.length,c=Iu(n).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in n:ui.call(n,l))){n=false;break n}}if((c=u.get(t))&&u.get(n))n=c==n;else{
+c=true,u.set(t,n),u.set(n,t);for(var s=i;++a<o;){var l=f[a],h=t[l],p=n[l];if(r)var _=i?r(p,h,l,n,t,u):r(h,p,l,t,n,u);if(_===F?h!==p&&!Fn(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=t.constructor,e=n.constructor,r!=e&&"constructor"in t&&"constructor"in n&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),u.delete(t),u.delete(n),n=c}}else n=false;else n=false}}return n}function Nn(t){return vu(t)&&"[object Map]"==Et(t)}function Pn(t,n,r,e){var u=r.length,i=u,o=!e;
+if(null==t)return!i;for(t=Ju(t);u--;){var f=r[u];if(o&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return false}for(;++u<i;){var f=r[u],c=f[0],a=t[c],l=f[1];if(o&&f[2]){if(a===F&&!(c in t))return false}else{if(f=new Kt,e)var s=e(a,l,c,t,n,f);if(s===F?!Fn(l,a,e,3,f):!s)return false}}return true}function Zn(t){return!(!_u(t)||ri&&ri in t)&&(su(t)?ai:bt).test(Ce(t))}function qn(t){return _u(t)&&"[object RegExp]"==fi.call(t)}function Vn(t){return vu(t)&&"[object Set]"==Et(t)}function Kn(t){return vu(t)&&pu(t.length)&&!!Ut[fi.call(t)];
+}function Gn(t){return typeof t=="function"?t:null==t?Mu:typeof t=="object"?nf(t)?Xn(t[0],t[1]):Qn(t):Fu(t)}function Jn(t){if(!Oe(t))return Ri(t);var n,r=[];for(n in Ju(t))ui.call(t,n)&&"constructor"!=n&&r.push(n);return r}function Yn(t,n){return t<n}function Hn(t,n){var r=-1,e=cu(t)?Zu(t.length):[];return to(t,function(t,u,i){e[++r]=n(t,u,i)}),e}function Qn(t){var n=ge(t);return 1==n.length&&n[0][2]?Se(n[0][0],n[0][1]):function(r){return r===t||Pn(r,t,n)}}function Xn(t,n){return ke(t)&&n===n&&!_u(n)?Se(Ue(t),n):function(r){
+var e=Ou(r,t);return e===F&&e===n?Su(r,t):Fn(n,e,F,3)}}function tr(t,n,r,e,u){t!==n&&ro(n,function(i,o){if(_u(i)){u||(u=new Kt);var f=u,c=t[o],a=n[o],l=f.get(a);if(l)ln(t,o,l);else{var l=e?e(c,a,o+"",t,n,f):F,s=l===F;if(s){var h=nf(a),p=!h&&ef(a),_=!h&&!p&&af(a),l=a;h||p||_?nf(c)?l=c:au(c)?l=Cr(c):p?(s=false,l=Rr(a,true)):_?(s=false,l=Wr(a,true)):l=[]:du(a)||tf(a)?(l=c,tf(c)?l=ku(c):(!_u(c)||r&&su(c))&&(l=xe(a))):s=false}s&&(f.set(a,l),tr(l,a,r,e,f),f.delete(a)),ln(t,o,l)}}else f=e?e(t[o],i,o+"",t,n,u):F,f===F&&(f=i),
+ln(t,o,f)},Ru)}function nr(t,n){var r=t.length;if(r)return n+=0>n?r:0,me(n,r)?t[n]:F}function rr(t,n,r){var e=-1;return n=l(n.length?n:[Mu],S(_e())),t=Hn(t,function(t){return{a:l(n,function(n){return n(t)}),b:++e,c:t}}),A(t,function(t,n){var e;t:{e=-1;for(var u=t.a,i=n.a,o=u.length,f=r.length;++e<o;){var c=Br(u[e],i[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);break t}}e=t.b-n.b}return e})}function er(t,n){return t=Ju(t),ur(t,n,function(n,r){return r in t})}function ur(t,n,r){for(var e=-1,u=n.length,i={};++e<u;){
+var o=n[e],f=t[o];r(f,o)&&vn(i,o,f)}return i}function ir(t){return function(n){return Rn(n,t)}}function or(t,n,r,e){var u=e?y:d,i=-1,o=n.length,f=t;for(t===n&&(n=Cr(n)),r&&(f=l(t,S(r)));++i<o;)for(var c=0,a=n[i],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==t&&yi.call(f,c,1),yi.call(t,c,1);return t}function fr(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(r==e||u!==i){var i=u;if(me(u))yi.call(t,u,1);else if(ke(u,t))delete t[Ue(u)];else{var u=Sr(u),o=ze(t,u);null!=o&&delete o[Ue(Pe(u))]}}}}function cr(t,n){
+return t+ki(Ui()*(n-t+1))}function ar(t,n){var r="";if(!t||1>n||9007199254740991<n)return r;do n%2&&(r+=t),(n=ki(n/2))&&(t+=t);while(n);return r}function lr(t,n){return _o(Re(t,n,Mu),t+"")}function sr(t){return on(Wu(t))}function hr(t,n){var r=Wu(t);return Le(r,dn(n,0,r.length))}function pr(t,n,r,e){if(!_u(t))return t;n=ke(n,t)?[n]:Sr(n);for(var u=-1,i=n.length,o=i-1,f=t;null!=f&&++u<i;){var c=Ue(n[u]),a=r;if(u!=o){var l=f[c],a=e?e(l,c,f):F;a===F&&(a=_u(l)?l:me(n[u+1])?[]:{})}sn(f,c,a),f=f[c]}return t;
+}function _r(t){return Le(Wu(t))}function vr(t,n,r){var e=-1,u=t.length;for(0>n&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Zu(u);++e<u;)r[e]=t[e+n];return r}function gr(t,n){var r;return to(t,function(t,e,u){return r=n(t,e,u),!r}),!!r}function dr(t,n,r){var e=0,u=t?t.length:e;if(typeof n=="number"&&n===n&&2147483647>=u){for(;e<u;){var i=e+u>>>1,o=t[i];null!==o&&!bu(o)&&(r?o<=n:o<n)?e=i+1:u=i}return u}return yr(t,n,Mu,r)}function yr(t,n,r,e){n=r(n);for(var u=0,i=t?t.length:0,o=n!==n,f=null===n,c=bu(n),a=n===F;u<i;){
+var l=ki((u+i)/2),s=r(t[l]),h=s!==F,p=null===s,_=s===s,v=bu(s);(o?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=n:s<n)?u=l+1:i=l}return Wi(i,4294967294)}function br(t,n){for(var r=-1,e=t.length,u=0,i=[];++r<e;){var o=t[r],f=n?n(o):o;if(!r||!fu(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function xr(t){return typeof t=="number"?t:bu(t)?P:+t}function jr(t){if(typeof t=="string")return t;if(nf(t))return l(t,jr)+"";if(bu(t))return Qi?Qi.call(t):"";var n=t+"";return"0"==n&&1/t==-N?"-0":n;
+}function wr(t,n,r){var e=-1,u=c,i=t.length,o=true,f=[],l=f;if(r)o=false,u=a;else if(200<=i){if(u=n?null:fo(t))return M(u);o=false,u=R,l=new qt}else l=n?[]:f;t:for(;++e<i;){var s=t[e],h=n?n(s):s,s=r||0!==s?s:0;if(o&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue t;n&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function mr(t,n,r,e){for(var u=t.length,i=e?u:-1;(e?i--:++i<u)&&n(t[i],i,t););return r?vr(t,e?0:i,e?i+1:u):vr(t,e?i+1:0,e?u:i)}function Ar(t,n){var r=t;return r instanceof Dt&&(r=r.value()),
+h(n,function(t,n){return n.func.apply(n.thisArg,s([t],n.args))},r)}function kr(t,n,r){for(var e=-1,u=t.length;++e<u;)var i=i?s(wn(i,t[e],n,r),wn(t[e],i,n,r)):t[e];return i&&i.length?wr(i,n,r):[]}function Er(t,n,r){for(var e=-1,u=t.length,i=n.length,o={};++e<u;)r(o,t[e],e<i?n[e]:F);return o}function Or(t){return au(t)?t:[]}function Sr(t){return nf(t)?t:vo(t)}function Ir(t,n,r){var e=t.length;return r=r===F?e:r,!n&&r>=e?t:vr(t,n,r)}function Rr(t,n){if(n)return t.slice();var r=t.length,r=pi?pi(r):new t.constructor(r);
+return t.copy(r),r}function zr(t){var n=new t.constructor(t.byteLength);return new hi(n).set(new hi(t)),n}function Wr(t,n){return new t.constructor(n?zr(t.buffer):t.buffer,t.byteOffset,t.length)}function Br(t,n){if(t!==n){var r=t!==F,e=null===t,u=t===t,i=bu(t),o=n!==F,f=null===n,c=n===n,a=bu(n);if(!f&&!a&&!i&&t>n||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&t<n||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Lr(t,n,r,e){var u=-1,i=t.length,o=r.length,f=-1,c=n.length,a=zi(i-o,0),l=Zu(c+a);
+for(e=!e;++f<c;)l[f]=n[f];for(;++u<o;)(e||u<i)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function Ur(t,n,r,e){var u=-1,i=t.length,o=-1,f=r.length,c=-1,a=n.length,l=zi(i-f,0),s=Zu(l+a);for(e=!e;++u<l;)s[u]=t[u];for(l=u;++c<a;)s[l+c]=n[c];for(;++o<f;)(e||u<i)&&(s[l+r[o]]=t[u++]);return s}function Cr(t,n){var r=-1,e=t.length;for(n||(n=Zu(e));++r<e;)n[r]=t[r];return n}function Mr(t,n,r,e){var u=!r;r||(r={});for(var i=-1,o=n.length;++i<o;){var f=n[i],c=e?e(r[f],t[f],f,r,t):F;c===F&&(c=t[f]),u?vn(r,f,c):sn(r,f,c);
+}return r}function Dr(t,n){return Mr(t,ao(t),n)}function Tr(t,n){return function(r,u){var i=nf(r)?e:pn,o=n?n():{};return i(r,t,_e(u,2),o)}}function $r(t){return lr(function(n,r){var e=-1,u=r.length,i=1<u?r[u-1]:F,o=2<u?r[2]:F,i=3<t.length&&typeof i=="function"?(u--,i):F;for(o&&Ae(r[0],r[1],o)&&(i=3>u?F:i,u=1),n=Ju(n);++e<u;)(o=r[e])&&t(n,o,e,i);return n})}function Fr(t,n){return function(r,e){if(null==r)return r;if(!cu(r))return t(r,e);for(var u=r.length,i=n?u:-1,o=Ju(r);(n?i--:++i<u)&&false!==e(o[i],i,o););
+return r}}function Nr(t){return function(n,r,e){var u=-1,i=Ju(n);e=e(n);for(var o=e.length;o--;){var f=e[t?o:++u];if(false===r(i[f],f,i))break}return n}}function Pr(t,n,r){function e(){return(this&&this!==Pt&&this instanceof e?i:t).apply(u?r:this,arguments)}var u=1&n,i=Vr(t);return e}function Zr(t){return function(n){n=Eu(n);var r=Wt.test(n)?$(n):F,e=r?r[0]:n.charAt(0);return n=r?Ir(r,1).join(""):n.slice(1),e[t]()+n}}function qr(t){return function(n){return h(Uu(Lu(n).replace(St,"")),t,"")}}function Vr(t){
+return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=Xi(t.prototype),n=t.apply(r,n);return _u(n)?n:r}}function Kr(t,n,e){function u(){for(var o=arguments.length,f=Zu(o),c=o,a=pe(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?ue(t,n,Yr,u.placeholder,F,f,c,F,F,e-o):r(this&&this!==Pt&&this instanceof u?i:t,this,f)}var i=Vr(t);return u}function Gr(t){return function(n,r,e){var u=Ju(n);if(!cu(n)){var i=_e(r,3);n=Iu(n),r=function(t){return i(u[t],t,u)}}return r=t(n,r,e),-1<r?u[i?n[r]:r]:F}}function Jr(t){return le(function(n){var r=n.length,e=r,u=Mt.prototype.thru;for(t&&n.reverse();e--;){var i=n[e];if(typeof i!="function")throw new Qu("Expected a function");if(u&&!o&&"wrapper"==he(i))var o=new Mt([],true);
+}for(e=o?e:r;++e<r;)var i=n[e],u=he(i),f="wrapper"==u?co(i):F,o=f&&Ee(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[he(f[0])].apply(o,f[3]):1==i.length&&Ee(i)?o[u]():o.thru(i);return function(){var t=arguments,e=t[0];if(o&&1==t.length&&nf(e)&&200<=e.length)return o.plant(e).value();for(var u=0,t=r?n[u].apply(this,t):e;++u<r;)t=n[u].call(this,t);return t}})}function Yr(t,n,r,e,u,i,o,f,c,a){function l(){for(var d=arguments.length,y=Zu(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=pe(l),b=y.length;for(x=0;b--;)y[b]===j&&++x;
+}if(e&&(y=Lr(y,e,u,_)),i&&(y=Ur(y,i,o,_)),d-=x,_&&d<a)return j=C(y,j),ue(t,n,Yr,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[t]:t,d=y.length,f){x=y.length;for(var w=Wi(f.length,x),m=Cr(y);w--;){var A=f[w];y[w]=me(A,x)?m[A]:F}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==Pt&&this instanceof l&&(b=g||Vr(b)),b.apply(j,y)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?F:Vr(t);return l}function Hr(t,n){return function(r,e){return Cn(r,t,n(e))}}function Qr(t,n){return function(r,e){
+var u;if(r===F&&e===F)return n;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=t(r,e)}return u}}function Xr(t){return le(function(n){return n=l(n,S(_e())),lr(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function te(t,n){n=n===F?" ":jr(n);var r=n.length;return 2>r?r?ar(n,t):n:(r=ar(n,Ai(t/T(n))),Wt.test(n)?Ir($(r),0,t).join(""):r.slice(0,t))}function ne(t,n,e,u){function i(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Zu(l+c),h=this&&this!==Pt&&this instanceof i?f:t;++a<l;)s[a]=u[a];
+for(;c--;)s[a++]=arguments[++n];return r(h,o?e:this,s)}var o=1&n,f=Vr(t);return i}function re(t){return function(n,r,e){e&&typeof e!="number"&&Ae(n,r,e)&&(r=e=F),n=ju(n),r===F?(r=n,n=0):r=ju(r),e=e===F?n<r?1:-1:ju(e);var u=-1;r=zi(Ai((r-n)/(e||1)),0);for(var i=Zu(r);r--;)i[t?r:++u]=n,n+=e;return i}}function ee(t){return function(n,r){return typeof n=="string"&&typeof r=="string"||(n=Au(n),r=Au(r)),t(n,r)}}function ue(t,n,r,e,u,i,o,f,c,a){var l=8&n,s=l?o:F;o=l?F:o;var h=l?i:F;return i=l?F:i,n=(n|(l?32:64))&~(l?64:32),
+4&n||(n&=-4),u=[t,n,u,h,s,i,o,f,c,a],r=r.apply(F,u),Ee(t)&&ho(r,u),r.placeholder=e,We(r,t,n)}function ie(t){var n=Gu[t];return function(t,r){if(t=Au(t),r=Wi(wu(r),292)){var e=(Eu(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(Eu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function oe(t){return function(n){var r=Et(n);return"[object Map]"==r?L(n):"[object Set]"==r?D(n):O(n,t(n))}}function fe(t,n,r,e,u,i,o,f){var c=2&n;if(!c&&typeof t!="function")throw new Qu("Expected a function");var a=e?e.length:0;
+if(a||(n&=-97,e=u=F),o=o===F?o:zi(wu(o),0),f=f===F?f:wu(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=F}var h=c?F:co(t);return i=[t,n,r,e,u,l,s,i,o,f],h&&(r=i[1],t=h[1],n=r|t,e=128==t&&8==r||128==t&&256==r&&i[7].length<=h[8]||384==t&&h[7].length<=h[8]&&8==r,131>n||e)&&(1&t&&(i[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Lr(e,r,h[4]):r,i[4]=e?C(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Ur(e,r,h[6]):r,i[6]=e?C(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&t&&(i[8]=null==i[8]?h[8]:Wi(i[8],h[8])),
+null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=n),t=i[0],n=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=null==i[9]?c?0:t.length:zi(i[9]-a,0),!f&&24&n&&(n&=-25),We((h?uo:ho)(n&&1!=n?8==n||16==n?Kr(t,n,f):32!=n&&33!=n||u.length?Yr.apply(F,i):ne(t,n,r,e):Pr(t,n,r),i),t,n)}function ce(t,n,r,e,u,i){var o=2&u,f=t.length,c=n.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(t))&&i.get(n))return c==n;var c=-1,a=true,l=1&u?new qt:F;for(i.set(t,n),i.set(n,t);++c<f;){var s=t[c],h=n[c];if(e)var p=o?e(h,s,c,n,t,i):e(s,h,c,t,n,i);if(p!==F){
+if(p)continue;a=false;break}if(l){if(!_(n,function(t,n){if(!R(l,n)&&(s===t||r(s,t,e,u,i)))return l.push(n)})){a=false;break}}else if(s!==h&&!r(s,h,e,u,i)){a=false;break}}return i.delete(t),i.delete(n),a}function ae(t,n,r,e,u,i,o){switch(r){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)break;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":if(t.byteLength!=n.byteLength||!e(new hi(t),new hi(n)))break;return true;case"[object Boolean]":case"[object Date]":case"[object Number]":
+return fu(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var f=L;case"[object Set]":if(f||(f=M),t.size!=n.size&&!(2&i))break;return(r=o.get(t))?r==n:(i|=1,o.set(t,n),n=ce(f(t),f(n),e,u,i,o),o.delete(t),n);case"[object Symbol]":if(Hi)return Hi.call(t)==Hi.call(n)}return false}function le(t){return _o(Re(t,F,Fe),t+"")}function se(t){return zn(t,Iu,ao)}function he(t){for(var n=t.name+"",r=Zi[n],e=ui.call(Zi,n)?r.length:0;e--;){
+var u=r[e],i=u.func;if(null==i||i==t)return u.name}return n}function pe(t){return(ui.call(Ot,"placeholder")?Ot:t).placeholder}function _e(){var t=Ot.iteratee||Du,t=t===Du?Gn:t;return arguments.length?t(arguments[0],arguments[1]):t}function ve(t,n){var r=t.__data__,e=typeof n;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==n:null===n)?r[typeof n=="string"?"string":"hash"]:r.map}function ge(t){for(var n=Iu(t),r=n.length;r--;){var e=n[r],u=t[e];n[r]=[e,u,u===u&&!_u(u)]}return n;
+}function de(t,n){var r=null==t?F:t[n];return Zn(r)?r:F}function ye(t,n,r){n=ke(n,t)?[n]:Sr(n);for(var e=-1,u=n.length,i=false;++e<u;){var o=Ue(n[e]);if(!(i=null!=t&&r(t,o)))break;t=t[o]}return i||++e!=u?i:(u=t?t.length:0,!!u&&pu(u)&&me(o,u)&&(nf(t)||tf(t)))}function be(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&ui.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function xe(t){return typeof t.constructor!="function"||Oe(t)?{}:Xi(_i(t))}function je(r,e,u,i){var o=r.constructor;
+switch(e){case"[object ArrayBuffer]":return zr(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object DataView]":return e=i?zr(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 Wr(r,i);case"[object Map]":return e=i?u(L(r),true):L(r),
+h(e,t,new r.constructor);case"[object Number]":case"[object String]":return new o(r);case"[object RegExp]":return e=new r.constructor(r.source,gt.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=i?u(M(r),true):M(r),h(e,n,new r.constructor);case"[object Symbol]":return Hi?Ju(Hi.call(r)):{}}}function we(t){return nf(t)||tf(t)||!!(bi&&t&&t[bi])}function me(t,n){return n=null==n?9007199254740991:n,!!n&&(typeof t=="number"||jt.test(t))&&-1<t&&0==t%1&&t<n}function Ae(t,n,r){if(!_u(r))return false;
+var e=typeof n;return!!("number"==e?cu(r)&&me(n,r.length):"string"==e&&n in r)&&fu(r[n],t)}function ke(t,n){if(nf(t))return false;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!bu(t))||(rt.test(t)||!nt.test(t)||null!=n&&t in Ju(n))}function Ee(t){var n=he(t),r=Ot[n];return typeof r=="function"&&n in Dt.prototype&&(t===r||(n=co(r),!!n&&t===n[0]))}function Oe(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||ti)}function Se(t,n){return function(r){return null!=r&&(r[t]===n&&(n!==F||t in Ju(r)));
+}}function Ie(t,n,r,e,u,i){return _u(t)&&_u(n)&&(i.set(n,t),tr(t,n,F,Ie,i),i.delete(n)),t}function Re(t,n,e){return n=zi(n===F?t.length-1:n,0),function(){for(var u=arguments,i=-1,o=zi(u.length-n,0),f=Zu(o);++i<o;)f[i]=u[n+i];for(i=-1,o=Zu(n+1);++i<n;)o[i]=u[i];return o[n]=e(f),r(t,this,o)}}function ze(t,n){return 1==n.length?t:Rn(t,vr(n,0,-1))}function We(t,n,r){var e=n+"";n=_o;var u,i=Me;return u=(u=e.match(st))?u[1].split(ht):[],r=i(u,r),(i=r.length)&&(u=i-1,r[u]=(1<i?"& ":"")+r[u],r=r.join(2<i?", ":" "),
+e=e.replace(lt,"{\n/* [wrapped with "+r+"] */\n")),n(t,e)}function Be(t){var n=0,r=0;return function(){var e=Bi(),u=16-(e-r);if(r=e,0<u){if(500<=++n)return arguments[0]}else n=0;return t.apply(F,arguments)}}function Le(t,n){var r=-1,e=t.length,u=e-1;for(n=n===F?e:n;++r<n;){var e=cr(r,u),i=t[e];t[e]=t[r],t[r]=i}return t.length=n,t}function Ue(t){if(typeof t=="string"||bu(t))return t;var n=t+"";return"0"==n&&1/t==-N?"-0":n}function Ce(t){if(null!=t){try{return ei.call(t)}catch(t){}return t+""}return"";
+}function Me(t,n){return u(Z,function(r){var e="_."+r[0];n&r[1]&&!c(t,e)&&t.push(e)}),t.sort()}function De(t){if(t instanceof Dt)return t.clone();var n=new Mt(t.__wrapped__,t.__chain__);return n.__actions__=Cr(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function Te(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:wu(r),0>r&&(r=zi(e+r,0)),g(t,_e(n,3),r)):-1}function $e(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e-1;return r!==F&&(u=wu(r),u=0>r?zi(e+u,0):Wi(u,e-1)),g(t,_e(n,3),u,true);
+}function Fe(t){return t&&t.length?En(t,1):[]}function Ne(t){return t&&t.length?t[0]:F}function Pe(t){var n=t?t.length:0;return n?t[n-1]:F}function Ze(t,n){return t&&t.length&&n&&n.length?or(t,n):t}function qe(t){return t?Ci.call(t):t}function Ve(t){if(!t||!t.length)return[];var n=0;return t=f(t,function(t){if(au(t))return n=zi(t.length,n),true}),E(n,function(n){return l(t,j(n))})}function Ke(t,n){if(!t||!t.length)return[];var e=Ve(t);return null==n?e:l(e,function(t){return r(n,F,t)})}function Ge(t){
+return t=Ot(t),t.__chain__=true,t}function Je(t,n){return n(t)}function Ye(){return this}function He(t,n){return(nf(t)?u:to)(t,_e(n,3))}function Qe(t,n){return(nf(t)?i:no)(t,_e(n,3))}function Xe(t,n){return(nf(t)?l:Hn)(t,_e(n,3))}function tu(t,n,r){return n=r?F:n,n=t&&null==n?t.length:n,fe(t,128,F,F,F,F,n)}function nu(t,n){var r;if(typeof n!="function")throw new Qu("Expected a function");return t=wu(t),function(){return 0<--t&&(r=n.apply(this,arguments)),1>=t&&(n=F),r}}function ru(t,n,r){return n=r?F:n,
+t=fe(t,8,F,F,F,F,F,n),t.placeholder=ru.placeholder,t}function eu(t,n,r){return n=r?F:n,t=fe(t,16,F,F,F,F,F,n),t.placeholder=eu.placeholder,t}function uu(t,n,r){function e(n){var r=c,e=a;return c=a=F,_=n,s=t.apply(e,r)}function u(t){var r=t-p;return t-=_,p===F||r>=n||0>r||g&&t>=l}function i(){var t=Po();if(u(t))return o(t);var r,e=po;r=t-_,t=n-(t-p),r=g?Wi(t,l-r):t,h=e(i,r)}function o(t){return h=F,d&&c?e(t):(c=a=F,s)}function f(){var t=Po(),r=u(t);if(c=arguments,a=this,p=t,r){if(h===F)return _=t=p,
+h=po(i,n),v?e(t):s;if(g)return h=po(i,n),e(p)}return h===F&&(h=po(i,n)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof t!="function")throw new Qu("Expected a function");return n=Au(n)||0,_u(r)&&(v=!!r.leading,l=(g="maxWait"in r)?zi(Au(r.maxWait)||0,n):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==F&&oo(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Po())},f}function iu(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=t.apply(this,e),
+r.cache=i.set(u,e)||i,e)}if(typeof t!="function"||n&&typeof n!="function")throw new Qu("Expected a function");return r.cache=new(iu.Cache||Zt),r}function ou(t){if(typeof t!="function")throw new Qu("Expected a function");return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}function fu(t,n){return t===n||t!==t&&n!==n}function cu(t){return null!=t&&pu(t.length)&&!su(t);
+}function au(t){return vu(t)&&cu(t)}function lu(t){return!!vu(t)&&("[object Error]"==fi.call(t)||typeof t.message=="string"&&typeof t.name=="string")}function su(t){return t=_u(t)?fi.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t||"[object Proxy]"==t}function hu(t){return typeof t=="number"&&t==wu(t)}function pu(t){return typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t}function _u(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function vu(t){return null!=t&&typeof t=="object";
+}function gu(t){return typeof t=="number"||vu(t)&&"[object Number]"==fi.call(t)}function du(t){return!(!vu(t)||"[object Object]"!=fi.call(t))&&(t=_i(t),null===t||(t=ui.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&ei.call(t)==oi))}function yu(t){return typeof t=="string"||!nf(t)&&vu(t)&&"[object String]"==fi.call(t)}function bu(t){return typeof t=="symbol"||vu(t)&&"[object Symbol]"==fi.call(t)}function xu(t){if(!t)return[];if(cu(t))return yu(t)?$(t):Cr(t);if(vi&&t[vi]){t=t[vi]();
+for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}return n=Et(t),("[object Map]"==n?L:"[object Set]"==n?M:Wu)(t)}function ju(t){return t?(t=Au(t),t===N||t===-N?1.7976931348623157e308*(0>t?-1:1):t===t?t:0):0===t?t:0}function wu(t){t=ju(t);var n=t%1;return t===t?n?t-n:t:0}function mu(t){return t?dn(wu(t),0,4294967295):0}function Au(t){if(typeof t=="number")return t;if(bu(t))return P;if(_u(t)&&(t=typeof t.valueOf=="function"?t.valueOf():t,t=_u(t)?t+"":t),typeof t!="string")return 0===t?t:+t;
+t=t.replace(ft,"");var n=yt.test(t);return n||xt.test(t)?$t(t.slice(2),n?2:8):dt.test(t)?P:+t}function ku(t){return Mr(t,Ru(t))}function Eu(t){return null==t?"":jr(t)}function Ou(t,n,r){return t=null==t?F:Rn(t,n),t===F?r:t}function Su(t,n){return null!=t&&ye(t,n,Ln)}function Iu(t){return cu(t)?tn(t):Jn(t)}function Ru(t){if(cu(t))t=tn(t,true);else if(_u(t)){var n,r=Oe(t),e=[];for(n in t)("constructor"!=n||!r&&ui.call(t,n))&&e.push(n);t=e}else{if(n=[],null!=t)for(r in Ju(t))n.push(r);t=n}return t}function zu(t,n){
+return null==t?{}:ur(t,zn(t,Ru,lo),_e(n))}function Wu(t){return t?I(t,Iu(t)):[]}function Bu(t){return Uf(Eu(t).toLowerCase())}function Lu(t){return(t=Eu(t))&&t.replace(wt,nn).replace(It,"")}function Uu(t,n,r){return t=Eu(t),n=r?F:n,n===F?Bt.test(t)?t.match(zt)||[]:t.match(pt)||[]:t.match(n)||[]}function Cu(t){return function(){return t}}function Mu(t){return t}function Du(t){return Gn(typeof t=="function"?t:yn(t,true))}function Tu(t,n,r){var e=Iu(n),i=In(n,e);null!=r||_u(n)&&(i.length||!e.length)||(r=n,
+n=t,t=this,i=In(n,Iu(n)));var o=!(_u(r)&&"chain"in r&&!r.chain),f=su(t);return u(i,function(r){var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){var n=this.__chain__;if(o||n){var r=t(this.__wrapped__);return(r.__actions__=Cr(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,s([this.value()],arguments))})}),t}function $u(){}function Fu(t){return ke(t)?j(Ue(t)):ir(t)}function Nu(){return[]}function Pu(){return false}kt=kt?un.defaults(Pt.Object(),kt,un.pick(Pt,Lt)):Pt;
+var Zu=kt.Array,qu=kt.Date,Vu=kt.Error,Ku=kt.Function,Gu=kt.Math,Ju=kt.Object,Yu=kt.RegExp,Hu=kt.String,Qu=kt.TypeError,Xu=Zu.prototype,ti=Ju.prototype,ni=kt["__core-js_shared__"],ri=function(){var t=/[^.]+$/.exec(ni&&ni.keys&&ni.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ei=Ku.prototype.toString,ui=ti.hasOwnProperty,ii=0,oi=ei.call(Ju),fi=ti.toString,ci=Pt._,ai=Yu("^"+ei.call(ui).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),li=Vt?kt.Buffer:F,si=kt.Symbol,hi=kt.Uint8Array,pi=li?li.f:F,_i=U(Ju.getPrototypeOf,Ju),vi=si?si.iterator:F,gi=Ju.create,di=ti.propertyIsEnumerable,yi=Xu.splice,bi=si?si.isConcatSpreadable:F,xi=function(){
+try{var t=de(Ju,"defineProperty");return t({},"",{}),t}catch(t){}}(),ji=kt.clearTimeout!==Pt.clearTimeout&&kt.clearTimeout,wi=qu&&qu.now!==Pt.Date.now&&qu.now,mi=kt.setTimeout!==Pt.setTimeout&&kt.setTimeout,Ai=Gu.ceil,ki=Gu.floor,Ei=Ju.getOwnPropertySymbols,Oi=li?li.isBuffer:F,Si=kt.isFinite,Ii=Xu.join,Ri=U(Ju.keys,Ju),zi=Gu.max,Wi=Gu.min,Bi=qu.now,Li=kt.parseInt,Ui=Gu.random,Ci=Xu.reverse,Mi=de(kt,"DataView"),Di=de(kt,"Map"),Ti=de(kt,"Promise"),$i=de(kt,"Set"),Fi=de(kt,"WeakMap"),Ni=de(Ju,"create"),Pi=Fi&&new Fi,Zi={},qi=Ce(Mi),Vi=Ce(Di),Ki=Ce(Ti),Gi=Ce($i),Ji=Ce(Fi),Yi=si?si.prototype:F,Hi=Yi?Yi.valueOf:F,Qi=Yi?Yi.toString:F,Xi=function(){
+function t(){}return function(n){return _u(n)?gi?gi(n):(t.prototype=n,n=new t,t.prototype=F,n):{}}}();Ot.templateSettings={escape:Q,evaluate:X,interpolate:tt,variable:"",imports:{_:Ot}},Ot.prototype=Rt.prototype,Ot.prototype.constructor=Ot,Mt.prototype=Xi(Rt.prototype),Mt.prototype.constructor=Mt,Dt.prototype=Xi(Rt.prototype),Dt.prototype.constructor=Dt,Ft.prototype.clear=function(){this.__data__=Ni?Ni(null):{},this.size=0},Ft.prototype.delete=function(t){return t=this.has(t)&&delete this.__data__[t],
+this.size-=t?1:0,t},Ft.prototype.get=function(t){var n=this.__data__;return Ni?(t=n[t],"__lodash_hash_undefined__"===t?F:t):ui.call(n,t)?n[t]:F},Ft.prototype.has=function(t){var n=this.__data__;return Ni?n[t]!==F:ui.call(n,t)},Ft.prototype.set=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ni&&n===F?"__lodash_hash_undefined__":n,this},Nt.prototype.clear=function(){this.__data__=[],this.size=0},Nt.prototype.delete=function(t){var n=this.__data__;return t=hn(n,t),!(0>t)&&(t==n.length-1?n.pop():yi.call(n,t,1),
+--this.size,true)},Nt.prototype.get=function(t){var n=this.__data__;return t=hn(n,t),0>t?F:n[t][1]},Nt.prototype.has=function(t){return-1<hn(this.__data__,t)},Nt.prototype.set=function(t,n){var r=this.__data__,e=hn(r,t);return 0>e?(++this.size,r.push([t,n])):r[e][1]=n,this},Zt.prototype.clear=function(){this.size=0,this.__data__={hash:new Ft,map:new(Di||Nt),string:new Ft}},Zt.prototype.delete=function(t){return t=ve(this,t).delete(t),this.size-=t?1:0,t},Zt.prototype.get=function(t){return ve(this,t).get(t);
+},Zt.prototype.has=function(t){return ve(this,t).has(t)},Zt.prototype.set=function(t,n){var r=ve(this,t),e=r.size;return r.set(t,n),this.size+=r.size==e?0:1,this},qt.prototype.add=qt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},qt.prototype.has=function(t){return this.__data__.has(t)},Kt.prototype.clear=function(){this.__data__=new Nt,this.size=0},Kt.prototype.delete=function(t){var n=this.__data__;return t=n.delete(t),this.size=n.size,t},Kt.prototype.get=function(t){
+return this.__data__.get(t)},Kt.prototype.has=function(t){return this.__data__.has(t)},Kt.prototype.set=function(t,n){var r=this.__data__;if(r instanceof Nt){var e=r.__data__;if(!Di||199>e.length)return e.push([t,n]),this.size=++r.size,this;r=this.__data__=new Zt(e)}return r.set(t,n),this.size=r.size,this};var to=Fr(On),no=Fr(Sn,true),ro=Nr(),eo=Nr(true),uo=Pi?function(t,n){return Pi.set(t,n),t}:Mu,io=xi?function(t,n){return xi(t,"toString",{configurable:true,enumerable:false,value:Cu(n),writable:true})}:Mu,oo=ji||function(t){
+return Pt.clearTimeout(t)},fo=$i&&1/M(new $i([,-0]))[1]==N?function(t){return new $i(t)}:$u,co=Pi?function(t){return Pi.get(t)}:$u,ao=Ei?U(Ei,Ju):Nu,lo=Ei?function(t){for(var n=[];t;)s(n,ao(t)),t=_i(t);return n}:Nu;(Mi&&"[object DataView]"!=Et(new Mi(new ArrayBuffer(1)))||Di&&"[object Map]"!=Et(new Di)||Ti&&"[object Promise]"!=Et(Ti.resolve())||$i&&"[object Set]"!=Et(new $i)||Fi&&"[object WeakMap]"!=Et(new Fi))&&(Et=function(t){var n=fi.call(t);if(t=(t="[object Object]"==n?t.constructor:F)?Ce(t):F)switch(t){
+case qi:return"[object DataView]";case Vi:return"[object Map]";case Ki:return"[object Promise]";case Gi:return"[object Set]";case Ji:return"[object WeakMap]"}return n});var so=ni?su:Pu,ho=Be(uo),po=mi||function(t,n){return Pt.setTimeout(t,n)},_o=Be(io),vo=function(t){t=iu(t,function(t){return 500===n.size&&n.clear(),t});var n=t.cache;return t}(function(t){t=Eu(t);var n=[];return et.test(t)&&n.push(""),t.replace(ut,function(t,r,e,u){n.push(e?u.replace(_t,"$1"):r||t)}),n}),go=lr(function(t,n){return au(t)?wn(t,En(n,1,au,true)):[];
+}),yo=lr(function(t,n){var r=Pe(n);return au(r)&&(r=F),au(t)?wn(t,En(n,1,au,true),_e(r,2)):[]}),bo=lr(function(t,n){var r=Pe(n);return au(r)&&(r=F),au(t)?wn(t,En(n,1,au,true),F,r):[]}),xo=lr(function(t){var n=l(t,Or);return n.length&&n[0]===t[0]?Un(n):[]}),jo=lr(function(t){var n=Pe(t),r=l(t,Or);return n===Pe(r)?n=F:r.pop(),r.length&&r[0]===t[0]?Un(r,_e(n,2)):[]}),wo=lr(function(t){var n=Pe(t),r=l(t,Or);return n===Pe(r)?n=F:r.pop(),r.length&&r[0]===t[0]?Un(r,F,n):[]}),mo=lr(Ze),Ao=le(function(t,n){var r=t?t.length:0,e=gn(t,n);
+return fr(t,l(n,function(t){return me(t,r)?+t:t}).sort(Br)),e}),ko=lr(function(t){return wr(En(t,1,au,true))}),Eo=lr(function(t){var n=Pe(t);return au(n)&&(n=F),wr(En(t,1,au,true),_e(n,2))}),Oo=lr(function(t){var n=Pe(t);return au(n)&&(n=F),wr(En(t,1,au,true),F,n)}),So=lr(function(t,n){return au(t)?wn(t,n):[]}),Io=lr(function(t){return kr(f(t,au))}),Ro=lr(function(t){var n=Pe(t);return au(n)&&(n=F),kr(f(t,au),_e(n,2))}),zo=lr(function(t){var n=Pe(t);return au(n)&&(n=F),kr(f(t,au),F,n)}),Wo=lr(Ve),Bo=lr(function(t){
+var n=t.length,n=1<n?t[n-1]:F,n=typeof n=="function"?(t.pop(),n):F;return Ke(t,n)}),Lo=le(function(t){function n(n){return gn(n,t)}var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof Dt&&me(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:Je,args:[n],thisArg:F}),new Mt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(F),t})):this.thru(n)}),Uo=Tr(function(t,n,r){ui.call(t,r)?++t[r]:vn(t,r,1)}),Co=Gr(Te),Mo=Gr($e),Do=Tr(function(t,n,r){
+ui.call(t,r)?t[r].push(n):vn(t,r,[n])}),To=lr(function(t,n,e){var u=-1,i=typeof n=="function",o=ke(n),f=cu(t)?Zu(t.length):[];return to(t,function(t){var c=i?n:o&&null!=t?t[n]:F;f[++u]=c?r(c,t,e):Mn(t,n,e)}),f}),$o=Tr(function(t,n,r){vn(t,r,n)}),Fo=Tr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),No=lr(function(t,n){if(null==t)return[];var r=n.length;return 1<r&&Ae(t,n[0],n[1])?n=[]:2<r&&Ae(n[0],n[1],n[2])&&(n=[n[0]]),rr(t,En(n,1),[])}),Po=wi||function(){return Pt.Date.now()},Zo=lr(function(t,n,r){
+var e=1;if(r.length)var u=C(r,pe(Zo)),e=32|e;return fe(t,e,n,r,u)}),qo=lr(function(t,n,r){var e=3;if(r.length)var u=C(r,pe(qo)),e=32|e;return fe(n,e,t,r,u)}),Vo=lr(function(t,n){return jn(t,1,n)}),Ko=lr(function(t,n,r){return jn(t,Au(n)||0,r)});iu.Cache=Zt;var Go=lr(function(t,n){n=1==n.length&&nf(n[0])?l(n[0],S(_e())):l(En(n,1),S(_e()));var e=n.length;return lr(function(u){for(var i=-1,o=Wi(u.length,e);++i<o;)u[i]=n[i].call(this,u[i]);return r(t,this,u)})}),Jo=lr(function(t,n){return fe(t,32,F,n,C(n,pe(Jo)));
+}),Yo=lr(function(t,n){return fe(t,64,F,n,C(n,pe(Yo)))}),Ho=le(function(t,n){return fe(t,256,F,F,F,n)}),Qo=ee(Wn),Xo=ee(function(t,n){return t>=n}),tf=Dn(function(){return arguments}())?Dn:function(t){return vu(t)&&ui.call(t,"callee")&&!di.call(t,"callee")},nf=Zu.isArray,rf=Gt?S(Gt):Tn,ef=Oi||Pu,uf=Jt?S(Jt):$n,of=Yt?S(Yt):Nn,ff=Ht?S(Ht):qn,cf=Qt?S(Qt):Vn,af=Xt?S(Xt):Kn,lf=ee(Yn),sf=ee(function(t,n){return t<=n}),hf=$r(function(t,n){if(Oe(n)||cu(n))Mr(n,Iu(n),t);else for(var r in n)ui.call(n,r)&&sn(t,r,n[r]);
+}),pf=$r(function(t,n){Mr(n,Ru(n),t)}),_f=$r(function(t,n,r,e){Mr(n,Ru(n),t,e)}),vf=$r(function(t,n,r,e){Mr(n,Iu(n),t,e)}),gf=le(gn),df=lr(function(t){return t.push(F,an),r(_f,F,t)}),yf=lr(function(t){return t.push(F,Ie),r(mf,F,t)}),bf=Hr(function(t,n,r){t[n]=r},Cu(Mu)),xf=Hr(function(t,n,r){ui.call(t,n)?t[n].push(r):t[n]=[r]},_e),jf=lr(Mn),wf=$r(function(t,n,r){tr(t,n,r)}),mf=$r(function(t,n,r,e){tr(t,n,r,e)}),Af=le(function(t,n){return null==t?{}:(n=l(n,Ue),er(t,wn(zn(t,Ru,lo),n)))}),kf=le(function(t,n){
+return null==t?{}:er(t,l(n,Ue))}),Ef=oe(Iu),Of=oe(Ru),Sf=qr(function(t,n,r){return n=n.toLowerCase(),t+(r?Bu(n):n)}),If=qr(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),Rf=qr(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),zf=Zr("toLowerCase"),Wf=qr(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),Bf=qr(function(t,n,r){return t+(r?" ":"")+Uf(n)}),Lf=qr(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),Uf=Zr("toUpperCase"),Cf=lr(function(t,n){try{return r(t,F,n)}catch(t){return lu(t)?t:new Vu(t);
+}}),Mf=le(function(t,n){return u(n,function(n){n=Ue(n),vn(t,n,Zo(t[n],t))}),t}),Df=Jr(),Tf=Jr(true),$f=lr(function(t,n){return function(r){return Mn(r,t,n)}}),Ff=lr(function(t,n){return function(r){return Mn(t,r,n)}}),Nf=Xr(l),Pf=Xr(o),Zf=Xr(_),qf=re(),Vf=re(true),Kf=Qr(function(t,n){return t+n},0),Gf=ie("ceil"),Jf=Qr(function(t,n){return t/n},1),Yf=ie("floor"),Hf=Qr(function(t,n){return t*n},1),Qf=ie("round"),Xf=Qr(function(t,n){return t-n},0);return Ot.after=function(t,n){if(typeof n!="function")throw new Qu("Expected a function");
+return t=wu(t),function(){if(1>--t)return n.apply(this,arguments)}},Ot.ary=tu,Ot.assign=hf,Ot.assignIn=pf,Ot.assignInWith=_f,Ot.assignWith=vf,Ot.at=gf,Ot.before=nu,Ot.bind=Zo,Ot.bindAll=Mf,Ot.bindKey=qo,Ot.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return nf(t)?t:[t]},Ot.chain=Ge,Ot.chunk=function(t,n,r){if(n=(r?Ae(t,n,r):n===F)?1:zi(wu(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,i=Zu(Ai(r/n));e<r;)i[u++]=vr(t,e,e+=n);return i},Ot.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++n<r;){
+var i=t[n];i&&(u[e++]=i)}return u},Ot.concat=function(){var t=arguments.length;if(!t)return[];for(var n=Zu(t-1),r=arguments[0];t--;)n[t-1]=arguments[t];return s(nf(r)?Cr(r):[r],En(n,1))},Ot.cond=function(t){var n=t?t.length:0,e=_e();return t=n?l(t,function(t){if("function"!=typeof t[1])throw new Qu("Expected a function");return[e(t[0]),t[1]]}):[],lr(function(e){for(var u=-1;++u<n;){var i=t[u];if(r(i[0],this,e))return r(i[1],this,e)}})},Ot.conforms=function(t){return bn(yn(t,true))},Ot.constant=Cu,Ot.countBy=Uo,
+Ot.create=function(t,n){var r=Xi(t);return n?_n(r,n):r},Ot.curry=ru,Ot.curryRight=eu,Ot.debounce=uu,Ot.defaults=df,Ot.defaultsDeep=yf,Ot.defer=Vo,Ot.delay=Ko,Ot.difference=go,Ot.differenceBy=yo,Ot.differenceWith=bo,Ot.drop=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===F?1:wu(n),vr(t,0>n?0:n,e)):[]},Ot.dropRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===F?1:wu(n),n=e-n,vr(t,0,0>n?0:n)):[]},Ot.dropRightWhile=function(t,n){return t&&t.length?mr(t,_e(n,3),true,true):[]},Ot.dropWhile=function(t,n){
+return t&&t.length?mr(t,_e(n,3),true):[]},Ot.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&Ae(t,n,r)&&(r=0,e=u),u=t.length,r=wu(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:wu(e),0>e&&(e+=u),e=r>e?0:mu(e);r<e;)t[r++]=n;return t},Ot.filter=function(t,n){return(nf(t)?f:kn)(t,_e(n,3))},Ot.flatMap=function(t,n){return En(Xe(t,n),1)},Ot.flatMapDeep=function(t,n){return En(Xe(t,n),N)},Ot.flatMapDepth=function(t,n,r){return r=r===F?1:wu(r),En(Xe(t,n),r)},Ot.flatten=Fe,Ot.flattenDeep=function(t){
+return t&&t.length?En(t,N):[]},Ot.flattenDepth=function(t,n){return t&&t.length?(n=n===F?1:wu(n),En(t,n)):[]},Ot.flip=function(t){return fe(t,512)},Ot.flow=Df,Ot.flowRight=Tf,Ot.fromPairs=function(t){for(var n=-1,r=t?t.length:0,e={};++n<r;){var u=t[n];e[u[0]]=u[1]}return e},Ot.functions=function(t){return null==t?[]:In(t,Iu(t))},Ot.functionsIn=function(t){return null==t?[]:In(t,Ru(t))},Ot.groupBy=Do,Ot.initial=function(t){return t&&t.length?vr(t,0,-1):[]},Ot.intersection=xo,Ot.intersectionBy=jo,Ot.intersectionWith=wo,
+Ot.invert=bf,Ot.invertBy=xf,Ot.invokeMap=To,Ot.iteratee=Du,Ot.keyBy=$o,Ot.keys=Iu,Ot.keysIn=Ru,Ot.map=Xe,Ot.mapKeys=function(t,n){var r={};return n=_e(n,3),On(t,function(t,e,u){vn(r,n(t,e,u),t)}),r},Ot.mapValues=function(t,n){var r={};return n=_e(n,3),On(t,function(t,e,u){vn(r,e,n(t,e,u))}),r},Ot.matches=function(t){return Qn(yn(t,true))},Ot.matchesProperty=function(t,n){return Xn(t,yn(n,true))},Ot.memoize=iu,Ot.merge=wf,Ot.mergeWith=mf,Ot.method=$f,Ot.methodOf=Ff,Ot.mixin=Tu,Ot.negate=ou,Ot.nthArg=function(t){
+return t=wu(t),lr(function(n){return nr(n,t)})},Ot.omit=Af,Ot.omitBy=function(t,n){return zu(t,ou(_e(n)))},Ot.once=function(t){return nu(2,t)},Ot.orderBy=function(t,n,r,e){return null==t?[]:(nf(n)||(n=null==n?[]:[n]),r=e?F:r,nf(r)||(r=null==r?[]:[r]),rr(t,n,r))},Ot.over=Nf,Ot.overArgs=Go,Ot.overEvery=Pf,Ot.overSome=Zf,Ot.partial=Jo,Ot.partialRight=Yo,Ot.partition=Fo,Ot.pick=kf,Ot.pickBy=zu,Ot.property=Fu,Ot.propertyOf=function(t){return function(n){return null==t?F:Rn(t,n)}},Ot.pull=mo,Ot.pullAll=Ze,
+Ot.pullAllBy=function(t,n,r){return t&&t.length&&n&&n.length?or(t,n,_e(r,2)):t},Ot.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?or(t,n,F,r):t},Ot.pullAt=Ao,Ot.range=qf,Ot.rangeRight=Vf,Ot.rearg=Ho,Ot.reject=function(t,n){return(nf(t)?f:kn)(t,ou(_e(n,3)))},Ot.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],i=t.length;for(n=_e(n,3);++e<i;){var o=t[e];n(o,e,t)&&(r.push(o),u.push(e))}return fr(t,u),r},Ot.rest=function(t,n){if(typeof t!="function")throw new Qu("Expected a function");
+return n=n===F?n:wu(n),lr(t,n)},Ot.reverse=qe,Ot.sampleSize=function(t,n,r){return n=(r?Ae(t,n,r):n===F)?1:wu(n),(nf(t)?fn:hr)(t,n)},Ot.set=function(t,n,r){return null==t?t:pr(t,n,r)},Ot.setWith=function(t,n,r,e){return e=typeof e=="function"?e:F,null==t?t:pr(t,n,r,e)},Ot.shuffle=function(t){return(nf(t)?cn:_r)(t)},Ot.slice=function(t,n,r){var e=t?t.length:0;return e?(r&&typeof r!="number"&&Ae(t,n,r)?(n=0,r=e):(n=null==n?0:wu(n),r=r===F?e:wu(r)),vr(t,n,r)):[]},Ot.sortBy=No,Ot.sortedUniq=function(t){
+return t&&t.length?br(t):[]},Ot.sortedUniqBy=function(t,n){return t&&t.length?br(t,_e(n,2)):[]},Ot.split=function(t,n,r){return r&&typeof r!="number"&&Ae(t,n,r)&&(n=r=F),r=r===F?4294967295:r>>>0,r?(t=Eu(t))&&(typeof n=="string"||null!=n&&!ff(n))&&(n=jr(n),!n&&Wt.test(t))?Ir($(t),0,r):t.split(n,r):[]},Ot.spread=function(t,n){if(typeof t!="function")throw new Qu("Expected a function");return n=n===F?0:zi(wu(n),0),lr(function(e){var u=e[n];return e=Ir(e,0,n),u&&s(e,u),r(t,this,e)})},Ot.tail=function(t){
+var n=t?t.length:0;return n?vr(t,1,n):[]},Ot.take=function(t,n,r){return t&&t.length?(n=r||n===F?1:wu(n),vr(t,0,0>n?0:n)):[]},Ot.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===F?1:wu(n),n=e-n,vr(t,0>n?0:n,e)):[]},Ot.takeRightWhile=function(t,n){return t&&t.length?mr(t,_e(n,3),false,true):[]},Ot.takeWhile=function(t,n){return t&&t.length?mr(t,_e(n,3)):[]},Ot.tap=function(t,n){return n(t),t},Ot.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new Qu("Expected a function");
+return _u(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),uu(t,n,{leading:e,maxWait:n,trailing:u})},Ot.thru=Je,Ot.toArray=xu,Ot.toPairs=Ef,Ot.toPairsIn=Of,Ot.toPath=function(t){return nf(t)?l(t,Ue):bu(t)?[t]:Cr(vo(t))},Ot.toPlainObject=ku,Ot.transform=function(t,n,r){var e=nf(t),i=e||ef(t)||af(t);if(n=_e(n,4),null==r){var o=t&&t.constructor;r=i?e?new o:[]:_u(t)&&su(o)?Xi(_i(t)):{}}return(i?u:On)(t,function(t,e,u){return n(r,t,e,u)}),r},Ot.unary=function(t){return tu(t,1)},Ot.union=ko,
+Ot.unionBy=Eo,Ot.unionWith=Oo,Ot.uniq=function(t){return t&&t.length?wr(t):[]},Ot.uniqBy=function(t,n){return t&&t.length?wr(t,_e(n,2)):[]},Ot.uniqWith=function(t,n){return t&&t.length?wr(t,F,n):[]},Ot.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=ke(e,r)?[e]:Sr(e);r=ze(r,e),e=Ue(Pe(e)),r=!(null!=r&&ui.call(r,e))||delete r[e]}return r},Ot.unzip=Ve,Ot.unzipWith=Ke,Ot.update=function(t,n,r){return null==t?t:pr(t,n,(typeof r=="function"?r:Mu)(Rn(t,n)),void 0)},Ot.updateWith=function(t,n,r,e){
+return e=typeof e=="function"?e:F,null!=t&&(t=pr(t,n,(typeof r=="function"?r:Mu)(Rn(t,n)),e)),t},Ot.values=Wu,Ot.valuesIn=function(t){return null==t?[]:I(t,Ru(t))},Ot.without=So,Ot.words=Uu,Ot.wrap=function(t,n){return n=null==n?Mu:n,Jo(n,t)},Ot.xor=Io,Ot.xorBy=Ro,Ot.xorWith=zo,Ot.zip=Wo,Ot.zipObject=function(t,n){return Er(t||[],n||[],sn)},Ot.zipObjectDeep=function(t,n){return Er(t||[],n||[],pr)},Ot.zipWith=Bo,Ot.entries=Ef,Ot.entriesIn=Of,Ot.extend=pf,Ot.extendWith=_f,Tu(Ot,Ot),Ot.add=Kf,Ot.attempt=Cf,
+Ot.camelCase=Sf,Ot.capitalize=Bu,Ot.ceil=Gf,Ot.clamp=function(t,n,r){return r===F&&(r=n,n=F),r!==F&&(r=Au(r),r=r===r?r:0),n!==F&&(n=Au(n),n=n===n?n:0),dn(Au(t),n,r)},Ot.clone=function(t){return yn(t,false,true)},Ot.cloneDeep=function(t){return yn(t,true,true)},Ot.cloneDeepWith=function(t,n){return yn(t,true,true,n)},Ot.cloneWith=function(t,n){return yn(t,false,true,n)},Ot.conformsTo=function(t,n){return null==n||xn(t,n,Iu(n))},Ot.deburr=Lu,Ot.defaultTo=function(t,n){return null==t||t!==t?n:t},Ot.divide=Jf,Ot.endsWith=function(t,n,r){
+t=Eu(t),n=jr(n);var e=t.length,e=r=r===F?e:dn(wu(r),0,e);return r-=n.length,0<=r&&t.slice(r,e)==n},Ot.eq=fu,Ot.escape=function(t){return(t=Eu(t))&&H.test(t)?t.replace(J,rn):t},Ot.escapeRegExp=function(t){return(t=Eu(t))&&ot.test(t)?t.replace(it,"\\$&"):t},Ot.every=function(t,n,r){var e=nf(t)?o:mn;return r&&Ae(t,n,r)&&(n=F),e(t,_e(n,3))},Ot.find=Co,Ot.findIndex=Te,Ot.findKey=function(t,n){return v(t,_e(n,3),On)},Ot.findLast=Mo,Ot.findLastIndex=$e,Ot.findLastKey=function(t,n){return v(t,_e(n,3),Sn);
+},Ot.floor=Yf,Ot.forEach=He,Ot.forEachRight=Qe,Ot.forIn=function(t,n){return null==t?t:ro(t,_e(n,3),Ru)},Ot.forInRight=function(t,n){return null==t?t:eo(t,_e(n,3),Ru)},Ot.forOwn=function(t,n){return t&&On(t,_e(n,3))},Ot.forOwnRight=function(t,n){return t&&Sn(t,_e(n,3))},Ot.get=Ou,Ot.gt=Qo,Ot.gte=Xo,Ot.has=function(t,n){return null!=t&&ye(t,n,Bn)},Ot.hasIn=Su,Ot.head=Ne,Ot.identity=Mu,Ot.includes=function(t,n,r,e){return t=cu(t)?t:Wu(t),r=r&&!e?wu(r):0,e=t.length,0>r&&(r=zi(e+r,0)),yu(t)?r<=e&&-1<t.indexOf(n,r):!!e&&-1<d(t,n,r);
+},Ot.indexOf=function(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:wu(r),0>r&&(r=zi(e+r,0)),d(t,n,r)):-1},Ot.inRange=function(t,n,r){return n=ju(n),r===F?(r=n,n=0):r=ju(r),t=Au(t),t>=Wi(n,r)&&t<zi(n,r)},Ot.invoke=jf,Ot.isArguments=tf,Ot.isArray=nf,Ot.isArrayBuffer=rf,Ot.isArrayLike=cu,Ot.isArrayLikeObject=au,Ot.isBoolean=function(t){return true===t||false===t||vu(t)&&"[object Boolean]"==fi.call(t)},Ot.isBuffer=ef,Ot.isDate=uf,Ot.isElement=function(t){return null!=t&&1===t.nodeType&&vu(t)&&!du(t)},Ot.isEmpty=function(t){
+if(cu(t)&&(nf(t)||typeof t=="string"||typeof t.splice=="function"||ef(t)||af(t)||tf(t)))return!t.length;var n=Et(t);if("[object Map]"==n||"[object Set]"==n)return!t.size;if(Oe(t))return!Jn(t).length;for(var r in t)if(ui.call(t,r))return false;return true},Ot.isEqual=function(t,n){return Fn(t,n)},Ot.isEqualWith=function(t,n,r){var e=(r=typeof r=="function"?r:F)?r(t,n):F;return e===F?Fn(t,n,r):!!e},Ot.isError=lu,Ot.isFinite=function(t){return typeof t=="number"&&Si(t)},Ot.isFunction=su,Ot.isInteger=hu,Ot.isLength=pu,
+Ot.isMap=of,Ot.isMatch=function(t,n){return t===n||Pn(t,n,ge(n))},Ot.isMatchWith=function(t,n,r){return r=typeof r=="function"?r:F,Pn(t,n,ge(n),r)},Ot.isNaN=function(t){return gu(t)&&t!=+t},Ot.isNative=function(t){if(so(t))throw new Vu("Unsupported core-js use. Try https://github.com/es-shims.");return Zn(t)},Ot.isNil=function(t){return null==t},Ot.isNull=function(t){return null===t},Ot.isNumber=gu,Ot.isObject=_u,Ot.isObjectLike=vu,Ot.isPlainObject=du,Ot.isRegExp=ff,Ot.isSafeInteger=function(t){return hu(t)&&-9007199254740991<=t&&9007199254740991>=t;
+},Ot.isSet=cf,Ot.isString=yu,Ot.isSymbol=bu,Ot.isTypedArray=af,Ot.isUndefined=function(t){return t===F},Ot.isWeakMap=function(t){return vu(t)&&"[object WeakMap]"==Et(t)},Ot.isWeakSet=function(t){return vu(t)&&"[object WeakSet]"==fi.call(t)},Ot.join=function(t,n){return t?Ii.call(t,n):""},Ot.kebabCase=If,Ot.last=Pe,Ot.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==F&&(u=wu(r),u=0>u?zi(e+u,0):Wi(u,e-1)),n===n){for(r=u+1;r--&&t[r]!==n;);t=r}else t=g(t,b,u,true);return t},
+Ot.lowerCase=Rf,Ot.lowerFirst=zf,Ot.lt=lf,Ot.lte=sf,Ot.max=function(t){return t&&t.length?An(t,Mu,Wn):F},Ot.maxBy=function(t,n){return t&&t.length?An(t,_e(n,2),Wn):F},Ot.mean=function(t){return x(t,Mu)},Ot.meanBy=function(t,n){return x(t,_e(n,2))},Ot.min=function(t){return t&&t.length?An(t,Mu,Yn):F},Ot.minBy=function(t,n){return t&&t.length?An(t,_e(n,2),Yn):F},Ot.stubArray=Nu,Ot.stubFalse=Pu,Ot.stubObject=function(){return{}},Ot.stubString=function(){return""},Ot.stubTrue=function(){return true},Ot.multiply=Hf,
+Ot.nth=function(t,n){return t&&t.length?nr(t,wu(n)):F},Ot.noConflict=function(){return Pt._===this&&(Pt._=ci),this},Ot.noop=$u,Ot.now=Po,Ot.pad=function(t,n,r){t=Eu(t);var e=(n=wu(n))?T(t):0;return!n||e>=n?t:(n=(n-e)/2,te(ki(n),r)+t+te(Ai(n),r))},Ot.padEnd=function(t,n,r){t=Eu(t);var e=(n=wu(n))?T(t):0;return n&&e<n?t+te(n-e,r):t},Ot.padStart=function(t,n,r){t=Eu(t);var e=(n=wu(n))?T(t):0;return n&&e<n?te(n-e,r)+t:t},Ot.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),Li(Eu(t).replace(ct,""),n||0);
+},Ot.random=function(t,n,r){if(r&&typeof r!="boolean"&&Ae(t,n,r)&&(n=r=F),r===F&&(typeof n=="boolean"?(r=n,n=F):typeof t=="boolean"&&(r=t,t=F)),t===F&&n===F?(t=0,n=1):(t=ju(t),n===F?(n=t,t=0):n=ju(n)),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=Ui(),Wi(t+r*(n-t+Tt("1e-"+((r+"").length-1))),n)):cr(t,n)},Ot.reduce=function(t,n,r){var e=nf(t)?h:m,u=3>arguments.length;return e(t,_e(n,4),r,u,to)},Ot.reduceRight=function(t,n,r){var e=nf(t)?p:m,u=3>arguments.length;return e(t,_e(n,4),r,u,no)},Ot.repeat=function(t,n,r){
+return n=(r?Ae(t,n,r):n===F)?1:wu(n),ar(Eu(t),n)},Ot.replace=function(){var t=arguments,n=Eu(t[0]);return 3>t.length?n:n.replace(t[1],t[2])},Ot.result=function(t,n,r){n=ke(n,t)?[n]:Sr(n);var e=-1,u=n.length;for(u||(t=F,u=1);++e<u;){var i=null==t?F:t[Ue(n[e])];i===F&&(e=u,i=r),t=su(i)?i.call(t):i}return t},Ot.round=Qf,Ot.runInContext=w,Ot.sample=function(t){return(nf(t)?on:sr)(t)},Ot.size=function(t){if(null==t)return 0;if(cu(t))return yu(t)?T(t):t.length;var n=Et(t);return"[object Map]"==n||"[object Set]"==n?t.size:Jn(t).length;
+},Ot.snakeCase=Wf,Ot.some=function(t,n,r){var e=nf(t)?_:gr;return r&&Ae(t,n,r)&&(n=F),e(t,_e(n,3))},Ot.sortedIndex=function(t,n){return dr(t,n)},Ot.sortedIndexBy=function(t,n,r){return yr(t,n,_e(r,2))},Ot.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=dr(t,n);if(e<r&&fu(t[e],n))return e}return-1},Ot.sortedLastIndex=function(t,n){return dr(t,n,true)},Ot.sortedLastIndexBy=function(t,n,r){return yr(t,n,_e(r,2),true)},Ot.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=dr(t,n,true)-1;if(fu(t[r],n))return r;
+}return-1},Ot.startCase=Bf,Ot.startsWith=function(t,n,r){return t=Eu(t),r=dn(wu(r),0,t.length),n=jr(n),t.slice(r,r+n.length)==n},Ot.subtract=Xf,Ot.sum=function(t){return t&&t.length?k(t,Mu):0},Ot.sumBy=function(t,n){return t&&t.length?k(t,_e(n,2)):0},Ot.template=function(t,n,r){var e=Ot.templateSettings;r&&Ae(t,n,r)&&(n=F),t=Eu(t),n=_f({},n,e,an),r=_f({},n.imports,e.imports,an);var u,i,o=Iu(r),f=I(r,o),c=0;r=n.interpolate||mt;var a="__p+='";r=Yu((n.escape||mt).source+"|"+r.source+"|"+(r===tt?vt:mt).source+"|"+(n.evaluate||mt).source+"|$","g");
+var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,o,f,l){return e||(e=o),a+=t.slice(c,l).replace(At,B),r&&(u=true,a+="'+__e("+r+")+'"),f&&(i=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),a=(i?a.replace(q,""):a).replace(V,"$1").replace(K,"$1;"),a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",
+n=Cf(function(){return Ku(o,l+"return "+a).apply(F,f)}),n.source=a,lu(n))throw n;return n},Ot.times=function(t,n){if(t=wu(t),1>t||9007199254740991<t)return[];var r=4294967295,e=Wi(t,4294967295);for(n=_e(n),t-=4294967295,e=E(e,n);++r<t;)n(r);return e},Ot.toFinite=ju,Ot.toInteger=wu,Ot.toLength=mu,Ot.toLower=function(t){return Eu(t).toLowerCase()},Ot.toNumber=Au,Ot.toSafeInteger=function(t){return dn(wu(t),-9007199254740991,9007199254740991)},Ot.toString=Eu,Ot.toUpper=function(t){return Eu(t).toUpperCase();
+},Ot.trim=function(t,n,r){return(t=Eu(t))&&(r||n===F)?t.replace(ft,""):t&&(n=jr(n))?(t=$(t),r=$(n),n=z(t,r),r=W(t,r)+1,Ir(t,n,r).join("")):t},Ot.trimEnd=function(t,n,r){return(t=Eu(t))&&(r||n===F)?t.replace(at,""):t&&(n=jr(n))?(t=$(t),n=W(t,$(n))+1,Ir(t,0,n).join("")):t},Ot.trimStart=function(t,n,r){return(t=Eu(t))&&(r||n===F)?t.replace(ct,""):t&&(n=jr(n))?(t=$(t),n=z(t,$(n)),Ir(t,n).join("")):t},Ot.truncate=function(t,n){var r=30,e="...";if(_u(n))var u="separator"in n?n.separator:u,r="length"in n?wu(n.length):r,e="omission"in n?jr(n.omission):e;
+t=Eu(t);var i=t.length;if(Wt.test(t))var o=$(t),i=o.length;if(r>=i)return t;if(i=r-T(e),1>i)return e;if(r=o?Ir(o,0,i).join(""):t.slice(0,i),u===F)return r+e;if(o&&(i+=r.length-i),ff(u)){if(t.slice(i).search(u)){var f=r;for(u.global||(u=Yu(u.source,Eu(gt.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else t.indexOf(jr(u),i)!=i&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},Ot.unescape=function(t){return(t=Eu(t))&&Y.test(t)?t.replace(G,en):t},Ot.uniqueId=function(t){
+var n=++ii;return Eu(t)+n},Ot.upperCase=Lf,Ot.upperFirst=Uf,Ot.each=He,Ot.eachRight=Qe,Ot.first=Ne,Tu(Ot,function(){var t={};return On(Ot,function(n,r){ui.call(Ot.prototype,r)||(t[r]=n)}),t}(),{chain:false}),Ot.VERSION="4.16.4",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){Ot[t].placeholder=Ot}),u(["drop","take"],function(t,n){Dt.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new Dt(this);r=r===F?1:zi(wu(r),0);var u=this.clone();return e?u.__takeCount__=Wi(r,u.__takeCount__):u.__views__.push({
+size:Wi(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},Dt.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;Dt.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:_e(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");Dt.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");
+Dt.prototype[t]=function(){return this.__filtered__?new Dt(this):this[r](1)}}),Dt.prototype.compact=function(){return this.filter(Mu)},Dt.prototype.find=function(t){return this.filter(t).head()},Dt.prototype.findLast=function(t){return this.reverse().find(t)},Dt.prototype.invokeMap=lr(function(t,n){return typeof t=="function"?new Dt(this):this.map(function(r){return Mn(r,t,n)})}),Dt.prototype.reject=function(t){return this.filter(ou(_e(t)))},Dt.prototype.slice=function(t,n){t=wu(t);var r=this;return r.__filtered__&&(0<t||0>n)?new Dt(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),
+n!==F&&(n=wu(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},Dt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Dt.prototype.toArray=function(){return this.take(4294967295)},On(Dt.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=Ot[e?"take"+("last"==n?"Right":""):n],i=e||/^find/.test(n);u&&(Ot.prototype[n]=function(){function n(t){return t=u.apply(Ot,s([t],f)),e&&h?t[0]:t}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Dt,a=f[0],l=c||nf(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 Dt(this),o=t.apply(o,f),o.__actions__.push({func:Je,args:[n],thisArg:F}),new Mt(o,h)):a&&c?t.apply(this,f):(o=this.thru(n),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=Xu[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);Ot.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){
+var u=this.value();return n.apply(nf(u)?u:[],t)}return this[r](function(r){return n.apply(nf(r)?r:[],t)})}}),On(Dt.prototype,function(t,n){var r=Ot[n];if(r){var e=r.name+"";(Zi[e]||(Zi[e]=[])).push({name:n,func:r})}}),Zi[Yr(F,2).name]=[{name:"wrapper",func:F}],Dt.prototype.clone=function(){var t=new Dt(this.__wrapped__);return t.__actions__=Cr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Cr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Cr(this.__views__),
+t},Dt.prototype.reverse=function(){if(this.__filtered__){var t=new Dt(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t},Dt.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=nf(n),u=0>r,i=e?n.length:0;t=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":t-=s;break;case"take":t=Wi(t,f+s);break;case"takeRight":f=zi(f,t-s)}}if(t={start:f,end:t},o=t.start,f=t.end,t=f-o,
+u=u?f:o-1,o=this.__iteratees__,f=o.length,c=0,a=Wi(t,this.__takeCount__),!e||200>i||i==t&&a==t)return Ar(n,this.__actions__);e=[];t:for(;t--&&c<a;){for(u+=r,i=-1,l=n[u];++i<f;){var h=o[i],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue t;break t}}e[c++]=l}return e},Ot.prototype.at=Lo,Ot.prototype.chain=function(){return Ge(this)},Ot.prototype.commit=function(){return new Mt(this.value(),this.__chain__)},Ot.prototype.next=function(){this.__values__===F&&(this.__values__=xu(this.value()));
+var t=this.__index__>=this.__values__.length;return{done:t,value:t?F:this.__values__[this.__index__++]}},Ot.prototype.plant=function(t){for(var n,r=this;r instanceof Rt;){var e=De(r);e.__index__=0,e.__values__=F,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},Ot.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof Dt?(this.__actions__.length&&(t=new Dt(this)),t=t.reverse(),t.__actions__.push({func:Je,args:[qe],thisArg:F}),new Mt(t,this.__chain__)):this.thru(qe);
+},Ot.prototype.toJSON=Ot.prototype.valueOf=Ot.prototype.value=function(){return Ar(this.__wrapped__,this.__actions__)},Ot.prototype.first=Ot.prototype.head,vi&&(Ot.prototype[vi]=Ye),Ot}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Pt._=un, define(function(){return un})):qt?((qt.exports=un)._=un,Zt._=un):Pt._=un}).call(this); \ No newline at end of file
diff --git a/tools/eslint/node_modules/lodash/mapKeys.js b/tools/eslint/node_modules/lodash/mapKeys.js
index ef73c5251a..3b68797db0 100644
--- a/tools/eslint/node_modules/lodash/mapKeys.js
+++ b/tools/eslint/node_modules/lodash/mapKeys.js
@@ -1,4 +1,5 @@
-var baseForOwn = require('./_baseForOwn'),
+var baseAssignValue = require('./_baseAssignValue'),
+ baseForOwn = require('./_baseForOwn'),
baseIteratee = require('./_baseIteratee');
/**
@@ -27,7 +28,7 @@ function mapKeys(object, iteratee) {
iteratee = baseIteratee(iteratee, 3);
baseForOwn(object, function(value, key, object) {
- result[iteratee(value, key, object)] = value;
+ baseAssignValue(result, iteratee(value, key, object), value);
});
return result;
}
diff --git a/tools/eslint/node_modules/lodash/mapValues.js b/tools/eslint/node_modules/lodash/mapValues.js
index b2af211a73..4ec082514e 100644
--- a/tools/eslint/node_modules/lodash/mapValues.js
+++ b/tools/eslint/node_modules/lodash/mapValues.js
@@ -1,4 +1,5 @@
-var baseForOwn = require('./_baseForOwn'),
+var baseAssignValue = require('./_baseAssignValue'),
+ baseForOwn = require('./_baseForOwn'),
baseIteratee = require('./_baseIteratee');
/**
@@ -34,7 +35,7 @@ function mapValues(object, iteratee) {
iteratee = baseIteratee(iteratee, 3);
baseForOwn(object, function(value, key, object) {
- result[key] = iteratee(value, key, object);
+ baseAssignValue(result, key, iteratee(value, key, object));
});
return result;
}
diff --git a/tools/eslint/node_modules/lodash/memoize.js b/tools/eslint/node_modules/lodash/memoize.js
index 97aa182852..8351cb3926 100644
--- a/tools/eslint/node_modules/lodash/memoize.js
+++ b/tools/eslint/node_modules/lodash/memoize.js
@@ -1,6 +1,6 @@
var MapCache = require('./_MapCache');
-/** Used as the `TypeError` message for "Functions" methods. */
+/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
@@ -60,14 +60,14 @@ function memoize(func, resolver) {
return cache.get(key);
}
var result = func.apply(this, args);
- memoized.cache = cache.set(key, result);
+ memoized.cache = cache.set(key, result) || cache;
return result;
};
memoized.cache = new (memoize.Cache || MapCache);
return memoized;
}
-// Assign cache to `_.memoize`.
+// Expose `MapCache`.
memoize.Cache = MapCache;
module.exports = memoize;
diff --git a/tools/eslint/node_modules/lodash/mergeWith.js b/tools/eslint/node_modules/lodash/mergeWith.js
index a621dca2fd..1b43a2c4a3 100644
--- a/tools/eslint/node_modules/lodash/mergeWith.js
+++ b/tools/eslint/node_modules/lodash/mergeWith.js
@@ -5,7 +5,7 @@ var baseMerge = require('./_baseMerge'),
* This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source
* properties. If `customizer` returns `undefined`, merging is handled by the
- * method instead. The `customizer` is invoked with seven arguments:
+ * method instead. The `customizer` is invoked with six arguments:
* (objValue, srcValue, key, object, source, stack).
*
* **Note:** This method mutates `object`.
diff --git a/tools/eslint/node_modules/lodash/negate.js b/tools/eslint/node_modules/lodash/negate.js
index 330e65ac6a..5a65cd1fb2 100644
--- a/tools/eslint/node_modules/lodash/negate.js
+++ b/tools/eslint/node_modules/lodash/negate.js
@@ -1,4 +1,4 @@
-/** Used as the `TypeError` message for "Functions" methods. */
+/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
diff --git a/tools/eslint/node_modules/lodash/omit.js b/tools/eslint/node_modules/lodash/omit.js
index 4ef0cafe46..38f9190920 100644
--- a/tools/eslint/node_modules/lodash/omit.js
+++ b/tools/eslint/node_modules/lodash/omit.js
@@ -1,8 +1,7 @@
var arrayMap = require('./_arrayMap'),
baseDifference = require('./_baseDifference'),
- baseFlatten = require('./_baseFlatten'),
basePick = require('./_basePick'),
- baseRest = require('./_baseRest'),
+ flatRest = require('./_flatRest'),
getAllKeysIn = require('./_getAllKeysIn'),
toKey = require('./_toKey');
@@ -25,11 +24,11 @@ var arrayMap = require('./_arrayMap'),
* _.omit(object, ['a', 'c']);
* // => { 'b': '2' }
*/
-var omit = baseRest(function(object, props) {
+var omit = flatRest(function(object, props) {
if (object == null) {
return {};
}
- props = arrayMap(baseFlatten(props, 1), toKey);
+ props = arrayMap(props, toKey);
return basePick(object, baseDifference(getAllKeysIn(object), props));
});
diff --git a/tools/eslint/node_modules/lodash/overArgs.js b/tools/eslint/node_modules/lodash/overArgs.js
index 56d253bc6d..f0067dbd32 100644
--- a/tools/eslint/node_modules/lodash/overArgs.js
+++ b/tools/eslint/node_modules/lodash/overArgs.js
@@ -4,6 +4,7 @@ var apply = require('./_apply'),
baseIteratee = require('./_baseIteratee'),
baseRest = require('./_baseRest'),
baseUnary = require('./_baseUnary'),
+ castRest = require('./_castRest'),
isArray = require('./isArray');
/* Built-in method references for those with the same name as other `lodash` methods. */
@@ -40,7 +41,7 @@ var nativeMin = Math.min;
* func(10, 5);
* // => [100, 10]
*/
-var overArgs = baseRest(function(func, transforms) {
+var overArgs = castRest(function(func, transforms) {
transforms = (transforms.length == 1 && isArray(transforms[0]))
? arrayMap(transforms[0], baseUnary(baseIteratee))
: arrayMap(baseFlatten(transforms, 1), baseUnary(baseIteratee));
diff --git a/tools/eslint/node_modules/lodash/package.json b/tools/eslint/node_modules/lodash/package.json
index 589764db20..16cbf860e7 100644
--- a/tools/eslint/node_modules/lodash/package.json
+++ b/tools/eslint/node_modules/lodash/package.json
@@ -14,14 +14,13 @@
]
],
"_from": "lodash@>=4.0.0 <5.0.0",
- "_id": "lodash@4.15.0",
+ "_id": "lodash@4.16.4",
"_inCache": true,
- "_installable": true,
"_location": "/lodash",
"_nodeVersion": "4.4.7",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/lodash-4.15.0.tgz_1471012765624_0.7570270872674882"
+ "tmp": "tmp/lodash-4.16.4.tgz_1475766806071_0.6463651182129979"
},
"_npmUser": {
"name": "jdalton",
@@ -43,8 +42,8 @@
"/inquirer",
"/table"
],
- "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.15.0.tgz",
- "_shasum": "3162391d8f0140aa22cf8f6b3c34d6b7f63d3aa9",
+ "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.16.4.tgz",
+ "_shasum": "01ce306b9bad1319f2a5528674f88297aeb70127",
"_shrinkwrap": null,
"_spec": "lodash@^4.0.0",
"_where": "/Users/trott/io.js/tools/node_modules/eslint",
@@ -78,8 +77,8 @@
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "3162391d8f0140aa22cf8f6b3c34d6b7f63d3aa9",
- "tarball": "https://registry.npmjs.org/lodash/-/lodash-4.15.0.tgz"
+ "shasum": "01ce306b9bad1319f2a5528674f88297aeb70127",
+ "tarball": "https://registry.npmjs.org/lodash/-/lodash-4.16.4.tgz"
},
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -114,5 +113,5 @@
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
},
- "version": "4.15.0"
+ "version": "4.16.4"
}
diff --git a/tools/eslint/node_modules/lodash/parseInt.js b/tools/eslint/node_modules/lodash/parseInt.js
index fe140f61b1..82badf0341 100644
--- a/tools/eslint/node_modules/lodash/parseInt.js
+++ b/tools/eslint/node_modules/lodash/parseInt.js
@@ -2,10 +2,7 @@ var root = require('./_root'),
toString = require('./toString');
/** Used to match leading and trailing whitespace. */
-var reTrim = /^\s+|\s+$/g;
-
-/** Used to detect hexadecimal string values. */
-var reHasHexPrefix = /^0x/i;
+var reTrimStart = /^\s+/;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeParseInt = root.parseInt;
@@ -35,15 +32,12 @@ var nativeParseInt = root.parseInt;
* // => [6, 8, 10]
*/
function parseInt(string, radix, guard) {
- // Chrome fails to trim leading <BOM> whitespace characters.
- // See https://bugs.chromium.org/p/v8/issues/detail?id=3109 for more details.
if (guard || radix == null) {
radix = 0;
} else if (radix) {
radix = +radix;
}
- string = toString(string).replace(reTrim, '');
- return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
+ return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
}
module.exports = parseInt;
diff --git a/tools/eslint/node_modules/lodash/pick.js b/tools/eslint/node_modules/lodash/pick.js
index 464dd9f923..a631b15195 100644
--- a/tools/eslint/node_modules/lodash/pick.js
+++ b/tools/eslint/node_modules/lodash/pick.js
@@ -1,7 +1,6 @@
var arrayMap = require('./_arrayMap'),
- baseFlatten = require('./_baseFlatten'),
basePick = require('./_basePick'),
- baseRest = require('./_baseRest'),
+ flatRest = require('./_flatRest'),
toKey = require('./_toKey');
/**
@@ -21,8 +20,8 @@ var arrayMap = require('./_arrayMap'),
* _.pick(object, ['a', 'c']);
* // => { 'a': 1, 'c': 3 }
*/
-var pick = baseRest(function(object, props) {
- return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey));
+var pick = flatRest(function(object, props) {
+ return object == null ? {} : basePick(object, arrayMap(props, toKey));
});
module.exports = pick;
diff --git a/tools/eslint/node_modules/lodash/pullAt.js b/tools/eslint/node_modules/lodash/pullAt.js
index 59b5fa35a1..7e4e46d7bf 100644
--- a/tools/eslint/node_modules/lodash/pullAt.js
+++ b/tools/eslint/node_modules/lodash/pullAt.js
@@ -1,9 +1,8 @@
var arrayMap = require('./_arrayMap'),
baseAt = require('./_baseAt'),
- baseFlatten = require('./_baseFlatten'),
basePullAt = require('./_basePullAt'),
- baseRest = require('./_baseRest'),
compareAscending = require('./_compareAscending'),
+ flatRest = require('./_flatRest'),
isIndex = require('./_isIndex');
/**
@@ -30,9 +29,7 @@ var arrayMap = require('./_arrayMap'),
* console.log(pulled);
* // => ['b', 'd']
*/
-var pullAt = baseRest(function(array, indexes) {
- indexes = baseFlatten(indexes, 1);
-
+var pullAt = flatRest(function(array, indexes) {
var length = array ? array.length : 0,
result = baseAt(array, indexes);
diff --git a/tools/eslint/node_modules/lodash/rearg.js b/tools/eslint/node_modules/lodash/rearg.js
index fabe5a3830..4df6989b32 100644
--- a/tools/eslint/node_modules/lodash/rearg.js
+++ b/tools/eslint/node_modules/lodash/rearg.js
@@ -1,6 +1,5 @@
-var baseFlatten = require('./_baseFlatten'),
- baseRest = require('./_baseRest'),
- createWrap = require('./_createWrap');
+var createWrap = require('./_createWrap'),
+ flatRest = require('./_flatRest');
/** Used to compose bitmasks for function metadata. */
var REARG_FLAG = 256;
@@ -27,8 +26,8 @@ var REARG_FLAG = 256;
* rearged('b', 'c', 'a')
* // => ['a', 'b', 'c']
*/
-var rearg = baseRest(function(func, indexes) {
- return createWrap(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1));
+var rearg = flatRest(function(func, indexes) {
+ return createWrap(func, REARG_FLAG, undefined, undefined, undefined, indexes);
});
module.exports = rearg;
diff --git a/tools/eslint/node_modules/lodash/rest.js b/tools/eslint/node_modules/lodash/rest.js
index ab2d145b5f..eaaad00b7b 100644
--- a/tools/eslint/node_modules/lodash/rest.js
+++ b/tools/eslint/node_modules/lodash/rest.js
@@ -1,7 +1,7 @@
var baseRest = require('./_baseRest'),
toInteger = require('./toInteger');
-/** Used as the `TypeError` message for "Functions" methods. */
+/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
diff --git a/tools/eslint/node_modules/lodash/sample.js b/tools/eslint/node_modules/lodash/sample.js
index aff8e77d06..39c356042a 100644
--- a/tools/eslint/node_modules/lodash/sample.js
+++ b/tools/eslint/node_modules/lodash/sample.js
@@ -1,6 +1,6 @@
-var baseRandom = require('./_baseRandom'),
- isArrayLike = require('./isArrayLike'),
- values = require('./values');
+var arraySample = require('./_arraySample'),
+ baseSample = require('./_baseSample'),
+ isArray = require('./isArray');
/**
* Gets a random element from `collection`.
@@ -17,10 +17,8 @@ var baseRandom = require('./_baseRandom'),
* // => 2
*/
function sample(collection) {
- var array = isArrayLike(collection) ? collection : values(collection),
- length = array.length;
-
- return length > 0 ? array[baseRandom(0, length - 1)] : undefined;
+ var func = isArray(collection) ? arraySample : baseSample;
+ return func(collection);
}
module.exports = sample;
diff --git a/tools/eslint/node_modules/lodash/sampleSize.js b/tools/eslint/node_modules/lodash/sampleSize.js
index 29df2e6f22..a303686751 100644
--- a/tools/eslint/node_modules/lodash/sampleSize.js
+++ b/tools/eslint/node_modules/lodash/sampleSize.js
@@ -1,7 +1,7 @@
-var baseClamp = require('./_baseClamp'),
- baseRandom = require('./_baseRandom'),
+var arraySampleSize = require('./_arraySampleSize'),
+ baseSampleSize = require('./_baseSampleSize'),
+ isArray = require('./isArray'),
isIterateeCall = require('./_isIterateeCall'),
- toArray = require('./toArray'),
toInteger = require('./toInteger');
/**
@@ -25,25 +25,13 @@ var baseClamp = require('./_baseClamp'),
* // => [2, 3, 1]
*/
function sampleSize(collection, n, guard) {
- var index = -1,
- result = toArray(collection),
- length = result.length,
- lastIndex = length - 1;
-
if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
n = 1;
} else {
- n = baseClamp(toInteger(n), 0, length);
- }
- while (++index < n) {
- var rand = baseRandom(index, lastIndex),
- value = result[rand];
-
- result[rand] = result[index];
- result[index] = value;
+ n = toInteger(n);
}
- result.length = n;
- return result;
+ var func = isArray(collection) ? arraySampleSize : baseSampleSize;
+ return func(collection, n);
}
module.exports = sampleSize;
diff --git a/tools/eslint/node_modules/lodash/shuffle.js b/tools/eslint/node_modules/lodash/shuffle.js
index 88d00cefe3..2b72da7cd6 100644
--- a/tools/eslint/node_modules/lodash/shuffle.js
+++ b/tools/eslint/node_modules/lodash/shuffle.js
@@ -1,7 +1,6 @@
-var sampleSize = require('./sampleSize');
-
-/** Used as references for the maximum length and index of an array. */
-var MAX_ARRAY_LENGTH = 4294967295;
+var arrayShuffle = require('./_arrayShuffle'),
+ baseShuffle = require('./_baseShuffle'),
+ isArray = require('./isArray');
/**
* Creates an array of shuffled values, using a version of the
@@ -19,7 +18,8 @@ var MAX_ARRAY_LENGTH = 4294967295;
* // => [4, 1, 3, 2]
*/
function shuffle(collection) {
- return sampleSize(collection, MAX_ARRAY_LENGTH);
+ var func = isArray(collection) ? arrayShuffle : baseShuffle;
+ return func(collection);
}
module.exports = shuffle;
diff --git a/tools/eslint/node_modules/lodash/sortBy.js b/tools/eslint/node_modules/lodash/sortBy.js
index 5fbee44c73..4ba8f7a0ed 100644
--- a/tools/eslint/node_modules/lodash/sortBy.js
+++ b/tools/eslint/node_modules/lodash/sortBy.js
@@ -26,16 +26,11 @@ var baseFlatten = require('./_baseFlatten'),
* { 'user': 'barney', 'age': 34 }
* ];
*
- * _.sortBy(users, function(o) { return o.user; });
+ * _.sortBy(users, [function(o) { return o.user; }]);
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*
* _.sortBy(users, ['user', 'age']);
* // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
- *
- * _.sortBy(users, 'user', function(o) {
- * return Math.floor(o.age / 10);
- * });
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*/
var sortBy = baseRest(function(collection, iteratees) {
if (collection == null) {
diff --git a/tools/eslint/node_modules/lodash/spread.js b/tools/eslint/node_modules/lodash/spread.js
index 9b70db6cc3..ee44c8d8d1 100644
--- a/tools/eslint/node_modules/lodash/spread.js
+++ b/tools/eslint/node_modules/lodash/spread.js
@@ -4,7 +4,7 @@ var apply = require('./_apply'),
castSlice = require('./_castSlice'),
toInteger = require('./toInteger');
-/** Used as the `TypeError` message for "Functions" methods. */
+/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/* Built-in method references for those with the same name as other `lodash` methods. */
diff --git a/tools/eslint/node_modules/lodash/template.js b/tools/eslint/node_modules/lodash/template.js
index c1a523c575..2df417fa71 100644
--- a/tools/eslint/node_modules/lodash/template.js
+++ b/tools/eslint/node_modules/lodash/template.js
@@ -86,7 +86,8 @@ var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
* compiled({ 'user': 'barney' });
* // => 'hello barney!'
*
- * // Use the ES delimiter as an alternative to the default "interpolate" delimiter.
+ * // Use the ES template literal delimiter as an "interpolate" delimiter.
+ * // Disable support by replacing the "interpolate" delimiter.
* var compiled = _.template('hello ${ user }!');
* compiled({ 'user': 'pebbles' });
* // => 'hello pebbles!'
diff --git a/tools/eslint/node_modules/lodash/throttle.js b/tools/eslint/node_modules/lodash/throttle.js
index b2603c65d4..e2bb806bc8 100644
--- a/tools/eslint/node_modules/lodash/throttle.js
+++ b/tools/eslint/node_modules/lodash/throttle.js
@@ -1,7 +1,7 @@
var debounce = require('./debounce'),
isObject = require('./isObject');
-/** Used as the `TypeError` message for "Functions" methods. */
+/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
diff --git a/tools/eslint/node_modules/lodash/toString.js b/tools/eslint/node_modules/lodash/toString.js
index f20d65a597..daaf681c91 100644
--- a/tools/eslint/node_modules/lodash/toString.js
+++ b/tools/eslint/node_modules/lodash/toString.js
@@ -8,8 +8,8 @@ var baseToString = require('./_baseToString');
* @memberOf _
* @since 4.0.0
* @category Lang
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
* @example
*
* _.toString(null);
diff --git a/tools/eslint/node_modules/lodash/transform.js b/tools/eslint/node_modules/lodash/transform.js
index f438ed8fed..d755a15489 100644
--- a/tools/eslint/node_modules/lodash/transform.js
+++ b/tools/eslint/node_modules/lodash/transform.js
@@ -4,6 +4,7 @@ var arrayEach = require('./_arrayEach'),
baseIteratee = require('./_baseIteratee'),
getPrototype = require('./_getPrototype'),
isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
isFunction = require('./isFunction'),
isObject = require('./isObject'),
isTypedArray = require('./isTypedArray');
@@ -39,22 +40,23 @@ var arrayEach = require('./_arrayEach'),
* // => { '1': ['a', 'c'], '2': ['b'] }
*/
function transform(object, iteratee, accumulator) {
- var isArr = isArray(object) || isTypedArray(object);
- iteratee = baseIteratee(iteratee, 4);
+ var isArr = isArray(object),
+ isArrLike = isArr || isBuffer(object) || isTypedArray(object);
+ iteratee = baseIteratee(iteratee, 4);
if (accumulator == null) {
- if (isArr || isObject(object)) {
- var Ctor = object.constructor;
- if (isArr) {
- accumulator = isArray(object) ? new Ctor : [];
- } else {
- accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
- }
- } else {
+ var Ctor = object && object.constructor;
+ if (isArrLike) {
+ accumulator = isArr ? new Ctor : [];
+ }
+ else if (isObject(object)) {
+ accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+ }
+ else {
accumulator = {};
}
}
- (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
return iteratee(accumulator, value, index, object);
});
return accumulator;
diff --git a/tools/eslint/node_modules/lodash/unescape.js b/tools/eslint/node_modules/lodash/unescape.js
index 929bb1675d..3b6efd583a 100644
--- a/tools/eslint/node_modules/lodash/unescape.js
+++ b/tools/eslint/node_modules/lodash/unescape.js
@@ -2,12 +2,12 @@ var toString = require('./toString'),
unescapeHtmlChar = require('./_unescapeHtmlChar');
/** Used to match HTML entities and HTML characters. */
-var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g,
+var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
reHasEscapedHtml = RegExp(reEscapedHtml.source);
/**
* The inverse of `_.escape`; this method converts the HTML entities
- * `&amp;`, `&lt;`, `&gt;`, `&quot;`, `&#39;`, and `&#96;` in `string` to
+ * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
* their corresponding characters.
*
* **Note:** No other HTML entities are unescaped. To unescape additional
diff --git a/tools/eslint/node_modules/lodash/uniq.js b/tools/eslint/node_modules/lodash/uniq.js
index 52e5d512ad..1df7826303 100644
--- a/tools/eslint/node_modules/lodash/uniq.js
+++ b/tools/eslint/node_modules/lodash/uniq.js
@@ -3,8 +3,9 @@ var baseUniq = require('./_baseUniq');
/**
* Creates a duplicate-free version of an array, using
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons, in which only the first occurrence of each
- * element is kept.
+ * for equality comparisons, in which only the first occurrence of each element
+ * is kept. The order of result values is determined by the order they occur
+ * in the array.
*
* @static
* @memberOf _
diff --git a/tools/eslint/node_modules/lodash/uniqBy.js b/tools/eslint/node_modules/lodash/uniqBy.js
index d67d4f161c..621ab3e5c2 100644
--- a/tools/eslint/node_modules/lodash/uniqBy.js
+++ b/tools/eslint/node_modules/lodash/uniqBy.js
@@ -4,7 +4,9 @@ var baseIteratee = require('./_baseIteratee'),
/**
* This method is like `_.uniq` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the criterion by which
- * uniqueness is computed. The iteratee is invoked with one argument: (value).
+ * uniqueness is computed. The order of result values is determined by the
+ * order they occur in the array. The iteratee is invoked with one argument:
+ * (value).
*
* @static
* @memberOf _
diff --git a/tools/eslint/node_modules/lodash/uniqWith.js b/tools/eslint/node_modules/lodash/uniqWith.js
index e09b1729e6..86af583adb 100644
--- a/tools/eslint/node_modules/lodash/uniqWith.js
+++ b/tools/eslint/node_modules/lodash/uniqWith.js
@@ -2,8 +2,9 @@ var baseUniq = require('./_baseUniq');
/**
* This method is like `_.uniq` except that it accepts `comparator` which
- * is invoked to compare elements of `array`. The comparator is invoked with
- * two arguments: (arrVal, othVal).
+ * is invoked to compare elements of `array`. The order of result values is
+ * determined by the order they occur in the array.The comparator is invoked
+ * with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
diff --git a/tools/eslint/node_modules/lodash/wrapperAt.js b/tools/eslint/node_modules/lodash/wrapperAt.js
index 8298511258..ab3d22af95 100644
--- a/tools/eslint/node_modules/lodash/wrapperAt.js
+++ b/tools/eslint/node_modules/lodash/wrapperAt.js
@@ -1,8 +1,7 @@
var LazyWrapper = require('./_LazyWrapper'),
LodashWrapper = require('./_LodashWrapper'),
baseAt = require('./_baseAt'),
- baseFlatten = require('./_baseFlatten'),
- baseRest = require('./_baseRest'),
+ flatRest = require('./_flatRest'),
isIndex = require('./_isIndex'),
thru = require('./thru');
@@ -22,8 +21,7 @@ var LazyWrapper = require('./_LazyWrapper'),
* _(object).at(['a[0].b.c', 'a[1]']).value();
* // => [3, 4]
*/
-var wrapperAt = baseRest(function(paths) {
- paths = baseFlatten(paths, 1);
+var wrapperAt = flatRest(function(paths) {
var length = paths.length,
start = length ? paths[0] : 0,
value = this.__wrapped__,
diff --git a/tools/eslint/node_modules/lodash/xorBy.js b/tools/eslint/node_modules/lodash/xorBy.js
index 00b03108bb..2cb5242226 100644
--- a/tools/eslint/node_modules/lodash/xorBy.js
+++ b/tools/eslint/node_modules/lodash/xorBy.js
@@ -8,8 +8,9 @@ var arrayFilter = require('./_arrayFilter'),
/**
* This method is like `_.xor` except that it accepts `iteratee` which is
* invoked for each element of each `arrays` to generate the criterion by
- * which by which they're compared. The iteratee is invoked with one argument:
- * (value).
+ * which by which they're compared. The order of result values is determined
+ * by the order they occur in the arrays. The iteratee is invoked with one
+ * argument: (value).
*
* @static
* @memberOf _
diff --git a/tools/eslint/node_modules/lodash/xorWith.js b/tools/eslint/node_modules/lodash/xorWith.js
index 4bd9071d9f..68460dbd72 100644
--- a/tools/eslint/node_modules/lodash/xorWith.js
+++ b/tools/eslint/node_modules/lodash/xorWith.js
@@ -6,8 +6,9 @@ var arrayFilter = require('./_arrayFilter'),
/**
* This method is like `_.xor` except that it accepts `comparator` which is
- * invoked to compare elements of `arrays`. The comparator is invoked with
- * two arguments: (arrVal, othVal).
+ * invoked to compare elements of `arrays`. The order of result values is
+ * determined by the order they occur in the arrays. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
diff --git a/tools/eslint/node_modules/minimatch/package.json b/tools/eslint/node_modules/minimatch/package.json
index 1b832f6ff8..3d826edc33 100644
--- a/tools/eslint/node_modules/minimatch/package.json
+++ b/tools/eslint/node_modules/minimatch/package.json
@@ -16,7 +16,6 @@
"_from": "minimatch@>=3.0.2 <4.0.0",
"_id": "minimatch@3.0.3",
"_inCache": true,
- "_installable": true,
"_location": "/minimatch",
"_nodeVersion": "4.4.4",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/minimist/package.json b/tools/eslint/node_modules/minimist/package.json
index be31b7b201..964da64417 100644
--- a/tools/eslint/node_modules/minimist/package.json
+++ b/tools/eslint/node_modules/minimist/package.json
@@ -16,7 +16,6 @@
"_from": "minimist@0.0.8",
"_id": "minimist@0.0.8",
"_inCache": true,
- "_installable": true,
"_location": "/minimist",
"_npmUser": {
"name": "substack",
diff --git a/tools/eslint/node_modules/mkdirp/package.json b/tools/eslint/node_modules/mkdirp/package.json
index fff25c84c5..c08d0846e0 100644
--- a/tools/eslint/node_modules/mkdirp/package.json
+++ b/tools/eslint/node_modules/mkdirp/package.json
@@ -16,7 +16,6 @@
"_from": "mkdirp@>=0.5.0 <0.6.0",
"_id": "mkdirp@0.5.1",
"_inCache": true,
- "_installable": true,
"_location": "/mkdirp",
"_nodeVersion": "2.0.0",
"_npmUser": {
diff --git a/tools/eslint/node_modules/ms/package.json b/tools/eslint/node_modules/ms/package.json
index 13489e477f..2a716afce8 100644
--- a/tools/eslint/node_modules/ms/package.json
+++ b/tools/eslint/node_modules/ms/package.json
@@ -16,7 +16,6 @@
"_from": "ms@0.7.1",
"_id": "ms@0.7.1",
"_inCache": true,
- "_installable": true,
"_location": "/ms",
"_nodeVersion": "0.12.2",
"_npmUser": {
diff --git a/tools/eslint/node_modules/mute-stream/package.json b/tools/eslint/node_modules/mute-stream/package.json
index 6d1659b894..830356386c 100644
--- a/tools/eslint/node_modules/mute-stream/package.json
+++ b/tools/eslint/node_modules/mute-stream/package.json
@@ -16,7 +16,6 @@
"_from": "mute-stream@0.0.5",
"_id": "mute-stream@0.0.5",
"_inCache": true,
- "_installable": true,
"_location": "/mute-stream",
"_nodeVersion": "2.0.1",
"_npmUser": {
diff --git a/tools/eslint/node_modules/natural-compare/package.json b/tools/eslint/node_modules/natural-compare/package.json
index 0057d2d5b5..8b81500a83 100644
--- a/tools/eslint/node_modules/natural-compare/package.json
+++ b/tools/eslint/node_modules/natural-compare/package.json
@@ -16,7 +16,6 @@
"_from": "natural-compare@>=1.4.0 <2.0.0",
"_id": "natural-compare@1.4.0",
"_inCache": true,
- "_installable": true,
"_location": "/natural-compare",
"_nodeVersion": "6.2.2",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/number-is-nan/package.json b/tools/eslint/node_modules/number-is-nan/package.json
index c515ce7b71..e79af63b0d 100644
--- a/tools/eslint/node_modules/number-is-nan/package.json
+++ b/tools/eslint/node_modules/number-is-nan/package.json
@@ -14,16 +14,19 @@
]
],
"_from": "number-is-nan@>=1.0.0 <2.0.0",
- "_id": "number-is-nan@1.0.0",
+ "_id": "number-is-nan@1.0.1",
"_inCache": true,
- "_installable": true,
"_location": "/number-is-nan",
- "_nodeVersion": "0.12.3",
+ "_nodeVersion": "4.5.0",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/number-is-nan-1.0.1.tgz_1475212313367_0.9480371843092144"
+ },
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
- "_npmVersion": "2.10.0",
+ "_npmVersion": "2.15.9",
"_phantomChildren": {},
"_requested": {
"raw": "number-is-nan@^1.0.0",
@@ -38,8 +41,8 @@
"/code-point-at",
"/is-fullwidth-code-point"
],
- "_resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz",
- "_shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b",
+ "_resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+ "_shasum": "097b602b53422a522c1afb8790318336941a011d",
"_shrinkwrap": null,
"_spec": "number-is-nan@^1.0.0",
"_where": "/Users/trott/io.js/tools/node_modules/code-point-at",
@@ -52,14 +55,14 @@
"url": "https://github.com/sindresorhus/number-is-nan/issues"
},
"dependencies": {},
- "description": "ES6 Number.isNaN() ponyfill",
+ "description": "ES2015 Number.isNaN() ponyfill",
"devDependencies": {
- "ava": "0.0.4"
+ "ava": "*"
},
"directories": {},
"dist": {
- "shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b",
- "tarball": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz"
+ "shasum": "097b602b53422a522c1afb8790318336941a011d",
+ "tarball": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz"
},
"engines": {
"node": ">=0.10.0"
@@ -67,13 +70,11 @@
"files": [
"index.js"
],
- "gitHead": "0f394b1bc33185c40304363b209e3f0588dbeeb3",
+ "gitHead": "ed9cdac3f428cc929b61bb230da42c87477af4b9",
"homepage": "https://github.com/sindresorhus/number-is-nan#readme",
"keywords": [
- "es6",
"es2015",
"ecmascript",
- "harmony",
"ponyfill",
"polyfill",
"shim",
@@ -97,7 +98,7 @@
"url": "git+https://github.com/sindresorhus/number-is-nan.git"
},
"scripts": {
- "test": "node test.js"
+ "test": "ava"
},
- "version": "1.0.0"
+ "version": "1.0.1"
}
diff --git a/tools/eslint/node_modules/number-is-nan/readme.md b/tools/eslint/node_modules/number-is-nan/readme.md
index 93d851a14f..2463508712 100644
--- a/tools/eslint/node_modules/number-is-nan/readme.md
+++ b/tools/eslint/node_modules/number-is-nan/readme.md
@@ -1,8 +1,6 @@
# number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan)
-> ES6 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) ponyfill
-
-> Ponyfill: A polyfill that doesn't overwrite the native method
+> ES2015 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) [ponyfill](https://ponyfill.com)
## Install
diff --git a/tools/eslint/node_modules/object-assign/package.json b/tools/eslint/node_modules/object-assign/package.json
index 7cf9a6b3fa..cabd7ea464 100644
--- a/tools/eslint/node_modules/object-assign/package.json
+++ b/tools/eslint/node_modules/object-assign/package.json
@@ -16,7 +16,6 @@
"_from": "object-assign@>=4.0.1 <5.0.0",
"_id": "object-assign@4.1.0",
"_inCache": true,
- "_installable": true,
"_location": "/object-assign",
"_nodeVersion": "4.1.0",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/once/package.json b/tools/eslint/node_modules/once/package.json
index f62f62078f..8100af0e7b 100644
--- a/tools/eslint/node_modules/once/package.json
+++ b/tools/eslint/node_modules/once/package.json
@@ -16,7 +16,6 @@
"_from": "once@>=1.3.0 <2.0.0",
"_id": "once@1.4.0",
"_inCache": true,
- "_installable": true,
"_location": "/once",
"_nodeVersion": "6.5.0",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/onetime/package.json b/tools/eslint/node_modules/onetime/package.json
index ce4cf2019b..3b5179b8e7 100644
--- a/tools/eslint/node_modules/onetime/package.json
+++ b/tools/eslint/node_modules/onetime/package.json
@@ -16,7 +16,6 @@
"_from": "onetime@>=1.0.0 <2.0.0",
"_id": "onetime@1.1.0",
"_inCache": true,
- "_installable": true,
"_location": "/onetime",
"_nodeVersion": "4.2.1",
"_npmUser": {
diff --git a/tools/eslint/node_modules/optionator/README.md b/tools/eslint/node_modules/optionator/README.md
index 8138fd02e3..91c59d379b 100644
--- a/tools/eslint/node_modules/optionator/README.md
+++ b/tools/eslint/node_modules/optionator/README.md
@@ -23,7 +23,7 @@ Other helpful features include reformatting the help text based on the size of t
## About
Optionator uses [type-check](https://github.com/gkz/type-check) and [levn](https://github.com/gkz/levn) behind the scenes to cast and verify input according the specified types.
-MIT license. Version 0.8.1
+MIT license. Version 0.8.2
npm install optionator
diff --git a/tools/eslint/node_modules/optionator/lib/coerce.js b/tools/eslint/node_modules/optionator/lib/coerce.js
deleted file mode 100644
index 6fb60aa82d..0000000000
--- a/tools/eslint/node_modules/optionator/lib/coerce.js
+++ /dev/null
@@ -1,367 +0,0 @@
-// Generated by LiveScript 1.2.0
-(function(){
- var ref$, id, reject, parsedTypeCheck, types, tokenRegex, toString$ = {}.toString;
- ref$ = require('prelude-ls'), id = ref$.id, reject = ref$.reject;
- parsedTypeCheck = require('type-check').parsedTypeCheck;
- types = {
- '*': function(it){
- switch (toString$.call(it).slice(8, -1)) {
- case 'Array':
- return coerceType(it, {
- type: 'Array'
- });
- case 'Object':
- return coerceType(it, {
- type: 'Object'
- });
- default:
- return {
- type: 'Just',
- value: coerceTypes(it, [
- {
- type: 'Undefined'
- }, {
- type: 'Null'
- }, {
- type: 'Boolean'
- }, {
- type: 'Number'
- }, {
- type: 'Date'
- }, {
- type: 'RegExp'
- }, {
- type: 'Array'
- }, {
- type: 'Object'
- }, {
- type: 'String'
- }
- ], {
- explicit: true
- })
- };
- }
- },
- Undefined: function(it){
- if (it === 'undefined') {
- return {
- type: 'Just',
- value: void 8
- };
- } else {
- return {
- type: 'Nothing'
- };
- }
- },
- Null: function(it){
- if (it === 'null') {
- return {
- type: 'Just',
- value: null
- };
- } else {
- return {
- type: 'Nothing'
- };
- }
- },
- Boolean: function(it){
- if (it === 'true') {
- return {
- type: 'Just',
- value: true
- };
- } else if (it === 'false') {
- return {
- type: 'Just',
- value: false
- };
- } else {
- return {
- type: 'Nothing'
- };
- }
- },
- Number: function(it){
- return {
- type: 'Just',
- value: +it
- };
- },
- Int: function(it){
- return {
- type: 'Just',
- value: parseInt(it)
- };
- },
- Float: function(it){
- return {
- type: 'Just',
- value: parseFloat(it)
- };
- },
- Date: function(value, options){
- var that;
- if (that = /^\#(.*)\#$/.exec(value)) {
- return {
- type: 'Just',
- value: new Date(+that[1] || that[1])
- };
- } else if (options.explicit) {
- return {
- type: 'Nothing'
- };
- } else {
- return {
- type: 'Just',
- value: new Date(+value || value)
- };
- }
- },
- RegExp: function(value, options){
- var that;
- if (that = /^\/(.*)\/([gimy]*)$/.exec(value)) {
- return {
- type: 'Just',
- value: new RegExp(that[1], that[2])
- };
- } else if (options.explicit) {
- return {
- type: 'Nothing'
- };
- } else {
- return {
- type: 'Just',
- value: new RegExp(value)
- };
- }
- },
- Array: function(it){
- return coerceArray(it, {
- of: [{
- type: '*'
- }]
- });
- },
- Object: function(it){
- return coerceFields(it, {
- of: {}
- });
- },
- String: function(it){
- var that;
- if (that = it.match(/^'(.*)'$/)) {
- return {
- type: 'Just',
- value: that[1]
- };
- } else if (that = it.match(/^"(.*)"$/)) {
- return {
- type: 'Just',
- value: that[1]
- };
- } else {
- return {
- type: 'Just',
- value: it
- };
- }
- }
- };
- function coerceArray(node, type){
- var typeOf, element;
- if (toString$.call(node).slice(8, -1) !== 'Array') {
- return {
- type: 'Nothing'
- };
- }
- typeOf = type.of;
- return {
- type: 'Just',
- value: (function(){
- var i$, ref$, len$, results$ = [];
- for (i$ = 0, len$ = (ref$ = node).length; i$ < len$; ++i$) {
- element = ref$[i$];
- results$.push(coerceTypes(element, typeOf));
- }
- return results$;
- }())
- };
- }
- function coerceTuple(node, type){
- var i, types;
- if (toString$.call(node).slice(8, -1) !== 'Array') {
- return {
- type: 'Nothing'
- };
- }
- return {
- type: 'Just',
- value: (function(){
- var i$, ref$, len$, results$ = [];
- for (i$ = 0, len$ = (ref$ = type.of).length; i$ < len$; ++i$) {
- i = i$;
- types = ref$[i$];
- results$.push(coerceTypes(node[i], types));
- }
- return results$;
- }())
- };
- }
- function coerceFields(node, type){
- var typeOf, key, value;
- if (toString$.call(node).slice(8, -1) !== 'Object') {
- return {
- type: 'Nothing'
- };
- }
- typeOf = type.of;
- return {
- type: 'Just',
- value: (function(){
- var ref$, results$ = {};
- for (key in ref$ = node) {
- value = ref$[key];
- results$[key] = coerceTypes(value, typeOf[key] || [{
- type: '*'
- }]);
- }
- return results$;
- }())
- };
- }
- function coerceType(node, typeObj, options){
- var type, structure, coerceFunc;
- type = typeObj.type, structure = typeObj.structure;
- if (type) {
- coerceFunc = types[type];
- return coerceFunc(node, options);
- } else {
- switch (structure) {
- case 'array':
- return coerceArray(node, typeObj);
- case 'tuple':
- return coerceTuple(node, typeObj);
- case 'fields':
- return coerceFields(node, typeObj);
- }
- }
- }
- function coerceTypes(node, types, options){
- var i$, len$, type, ref$, valueType, value;
- options == null && (options = {});
- for (i$ = 0, len$ = types.length; i$ < len$; ++i$) {
- type = types[i$];
- ref$ = coerceType(node, type, options), valueType = ref$.type, value = ref$.value;
- if (valueType === 'Nothing') {
- continue;
- }
- if (parsedTypeCheck([type], value)) {
- return value;
- }
- }
- throw new Error("Value '" + node + "' does not type check against " + JSON.stringify(types) + ".");
- }
- function consumeOp(tokens, op){
- if (tokens[0] === op) {
- return tokens.shift();
- } else {
- throw new Error("Expected '" + op + "', but got " + tokens[0] + " instead.");
- }
- }
- function maybeConsumeOp(tokens, op){
- if (tokens[0] === op) {
- return tokens.shift();
- }
- }
- function consumeList(tokens, delimiters, hasDelimiters){
- var result;
- if (hasDelimiters) {
- consumeOp(tokens, delimiters[0]);
- }
- result = [];
- while (tokens.length && tokens[0] !== delimiters[1]) {
- result.push(consumeElement(tokens));
- maybeConsumeOp(tokens, ',');
- }
- if (hasDelimiters) {
- consumeOp(tokens, delimiters[1]);
- }
- return result;
- }
- function consumeArray(tokens, hasDelimiters){
- return consumeList(tokens, ['[', ']'], hasDelimiters);
- }
- function consumeTuple(tokens, hasDelimiters){
- return consumeList(tokens, ['(', ')'], hasDelimiters);
- }
- function consumeFields(tokens, hasDelimiters){
- var result, key;
- if (hasDelimiters) {
- consumeOp(tokens, '{');
- }
- result = {};
- while (tokens.length && (!hasDelimiters || tokens[0] !== '}')) {
- key = tokens.shift();
- consumeOp(tokens, ':');
- result[key] = consumeElement(tokens);
- maybeConsumeOp(tokens, ',');
- }
- if (hasDelimiters) {
- consumeOp(tokens, '}');
- }
- return result;
- }
- function consumeElement(tokens){
- switch (tokens[0]) {
- case '[':
- return consumeArray(tokens, true);
- case '(':
- return consumeTuple(tokens, true);
- case '{':
- return consumeFields(tokens, true);
- default:
- return tokens.shift();
- }
- }
- function consumeTopLevel(tokens, types){
- var structure, origTokens, result;
- structure = types[0].structure;
- if (types.length === 1 && structure) {
- origTokens = tokens.slice();
- result = structure === 'array'
- ? consumeArray(tokens, tokens[0] === '[')
- : structure === 'tuple'
- ? consumeTuple(tokens, tokens[0] === '(')
- : consumeFields(tokens, tokens[0] === '{');
- if (tokens.length) {
- return consumeElement(structure === 'array'
- ? ['['].concat(origTokens, [']'])
- : ['('].concat(origTokens, [')']));
- } else {
- return result;
- }
- } else {
- return consumeElement(tokens);
- }
- }
- tokenRegex = /("(?:[^"]|\\")*")|('(?:[^']|\\')*')|(#.*#)|(\/(?:\\\/|[^\/])*\/[gimy]*)|([\[\]\(\)}{:,])|([-\.\$\w]+)|\s*/;
- function coerce(types, string){
- var tokens, node;
- tokens = reject(function(it){
- return !it || /^\s+$/.test(it);
- }, string.split(tokenRegex));
- node = consumeTopLevel(tokens, types);
- if (!node) {
- throw new Error("Error parsing " + string);
- }
- return coerceTypes(node, types);
- }
- module.exports = coerce;
- /*
- function log
- console.log it; it
- */
-}).call(this);
diff --git a/tools/eslint/node_modules/optionator/lib/help.js b/tools/eslint/node_modules/optionator/lib/help.js
index c61fff78e0..a459c02c26 100644
--- a/tools/eslint/node_modules/optionator/lib/help.js
+++ b/tools/eslint/node_modules/optionator/lib/help.js
@@ -1,4 +1,4 @@
-// Generated by LiveScript 1.4.0
+// Generated by LiveScript 1.5.0
(function(){
var ref$, id, find, sort, min, max, map, unlines, nameToRaw, dasherize, naturalJoin, wordwrap, getPreText, setHelpStyleDefaults, generateHelpForOption, generateHelp;
ref$ = require('prelude-ls'), id = ref$.id, find = ref$.find, sort = ref$.sort, min = ref$.min, max = ref$.max, map = ref$.map, unlines = ref$.unlines;
diff --git a/tools/eslint/node_modules/optionator/lib/index.js b/tools/eslint/node_modules/optionator/lib/index.js
index 29e05cb5dd..d947286c76 100644
--- a/tools/eslint/node_modules/optionator/lib/index.js
+++ b/tools/eslint/node_modules/optionator/lib/index.js
@@ -1,7 +1,7 @@
-// Generated by LiveScript 1.4.0
+// Generated by LiveScript 1.5.0
(function(){
var VERSION, ref$, id, map, compact, any, groupBy, partition, chars, isItNaN, keys, Obj, camelize, deepIs, closestString, nameToRaw, dasherize, naturalJoin, generateHelp, generateHelpForOption, parsedTypeCheck, parseType, parseLevn, camelizeKeys, parseString, main, toString$ = {}.toString, slice$ = [].slice;
- VERSION = '0.8.1';
+ VERSION = '0.8.2';
ref$ = require('prelude-ls'), id = ref$.id, map = ref$.map, compact = ref$.compact, any = ref$.any, groupBy = ref$.groupBy, partition = ref$.partition, chars = ref$.chars, isItNaN = ref$.isItNaN, keys = ref$.keys, Obj = ref$.Obj, camelize = ref$.camelize;
deepIs = require('deep-is');
ref$ = require('./util'), closestString = ref$.closestString, nameToRaw = ref$.nameToRaw, dasherize = ref$.dasherize, naturalJoin = ref$.naturalJoin;
@@ -17,7 +17,7 @@
return resultObj$;
};
parseString = function(string){
- var assignOpt, regex, replaceRegex, result;
+ var assignOpt, regex, replaceRegex, result, this$ = this;
assignOpt = '--?[a-zA-Z][-a-z-A-Z0-9]*=';
regex = RegExp('(?:' + assignOpt + ')?(?:\'(?:\\\\\'|[^\'])+\'|"(?:\\\\"|[^"])+")|[^\'"\\s]+', 'g');
replaceRegex = RegExp('^(' + assignOpt + ')?[\'"]([\\s\\S]*)[\'"]$');
@@ -44,7 +44,7 @@
libOptions.defaults.mergeRepeatedObjects = libOptions.mergeRepeatedObjects;
}
traverse = function(options){
- var i$, len$, option, name, k, ref$, v, type, that, e, parsedPossibilities, parsedType, j$, len1$, possibility, rawDependsType, dependsOpts, dependsType, cra, alias, shortNames, longNames;
+ var i$, len$, option, name, k, ref$, v, type, that, e, parsedPossibilities, parsedType, j$, len1$, possibility, rawDependsType, dependsOpts, dependsType, cra, alias, shortNames, longNames, this$ = this;
if (toString$.call(options).slice(8, -1) !== 'Array') {
throw new Error('No options defined.');
}
@@ -171,7 +171,7 @@
return opt;
};
parse = function(input, arg$){
- var slice, obj, positional, restPositional, overrideRequired, prop, setValue, setDefaults, checkRequired, mutuallyExclusiveError, checkMutuallyExclusive, checkDependency, checkDependencies, args, key, value, option, ref$, i$, len$, arg, that, result, short, argName, usingAssign, val, flags, len, j$, len1$, i, flag, opt, name, valPrime, negated, noedName;
+ var slice, obj, positional, restPositional, overrideRequired, prop, setValue, setDefaults, checkRequired, mutuallyExclusiveError, checkMutuallyExclusive, checkDependency, checkDependencies, checkProp, args, key, value, option, ref$, i$, len$, arg, that, result, short, argName, usingAssign, val, flags, len, j$, len1$, i, flag, opt, name, valPrime, negated, noedName;
slice = (arg$ != null
? arg$
: {}).slice;
@@ -311,6 +311,11 @@
checkDependency(opts[name]);
}
};
+ checkProp = function(){
+ if (prop) {
+ throw new Error("Value for '" + prop + "' of type '" + getOption(prop).type + "' required.");
+ }
+ };
switch (toString$.call(input).slice(8, -1)) {
case 'String':
args = parseString(input.slice(slice != null ? slice : 0));
@@ -348,9 +353,7 @@
} else {
if (that = arg.match(/^(--?)([a-zA-Z][-a-zA-Z0-9]*)(=)?(.*)?$/)) {
result = that;
- if (prop) {
- throw new Error("Value for '" + prop + "' of type '" + getOption(prop).type + "' required.");
- }
+ checkProp();
short = result[1].length === 1;
argName = result[2];
usingAssign = result[3] != null;
@@ -434,6 +437,7 @@
}
}
}
+ checkProp();
checkMutuallyExclusive();
checkDependencies();
setDefaults();
diff --git a/tools/eslint/node_modules/optionator/lib/parse-type.js b/tools/eslint/node_modules/optionator/lib/parse-type.js
deleted file mode 100644
index e648723cf1..0000000000
--- a/tools/eslint/node_modules/optionator/lib/parse-type.js
+++ /dev/null
@@ -1,143 +0,0 @@
-// Generated by LiveScript 1.2.0
-(function(){
- var reject, tokenRegex;
- reject = require('prelude-ls').reject;
- function consumeWord(tokens){
- var token;
- token = tokens[0];
- if (!(token != null && /^[a-zA-Z]+$/.test(token))) {
- throw new Error("Exected textual string.");
- }
- return tokens.shift();
- }
- function consumeOp(tokens, op){
- var token;
- token = tokens[0];
- if (token !== op) {
- throw new Error("Expected " + op);
- }
- return tokens.shift();
- }
- function maybeConsumeOp(tokens, op){
- var token;
- token = tokens[0];
- if (token === op) {
- return tokens.shift();
- } else {
- return null;
- }
- }
- function consumeArray(tokens){
- var contentType;
- consumeOp(tokens, '[');
- contentType = consumeTypes(tokens);
- if (!contentType) {
- throw new Error("Must specify content type for Array.");
- }
- consumeOp(tokens, ']');
- return {
- type: 'Array',
- contentType: contentType
- };
- }
- function consumeTuple(tokens){
- var contentTypes, that;
- contentTypes = [];
- consumeOp(tokens, '(');
- while (that = consumeTypes(tokens)) {
- contentTypes.push(that);
- if (!maybeConsumeOp(tokens, ',')) {
- break;
- }
- }
- consumeOp(tokens, ')');
- return {
- type: 'Tuple',
- contentTypes: contentTypes
- };
- }
- function consumeProperty(tokens){
- var key, type;
- key = consumeWord(tokens);
- consumeOp(tokens, ':');
- type = consumeTypes(tokens);
- return {
- key: key,
- type: type
- };
- }
- function consumeObject(tokens){
- var properties, that;
- properties = [];
- consumeOp(tokens, '{');
- while (that = consumeProperty(tokens)) {
- properties.push(that);
- if (!maybeConsumeOp(tokens, ',')) {
- break;
- }
- }
- consumeOp(tokens, '}');
- return {
- type: 'Object',
- properties: properties
- };
- }
- function consumeType(tokens){
- switch (tokens[0]) {
- case '[':
- return consumeArray(tokens);
- case '{':
- return consumeObject(tokens);
- case '(':
- return consumeTuple(tokens);
- default:
- return {
- type: consumeWord(tokens)
- };
- }
- }
- function consumeMaybe(tokens){
- var maybe, type;
- if (tokens[0] === 'Maybe') {
- tokens.shift();
- maybe = true;
- }
- type = consumeType(tokens);
- if (maybe) {
- return {
- type: 'Maybe',
- contentType: type
- };
- } else {
- return type;
- }
- }
- function consumeTypes(tokens){
- var types;
- types = [];
- for (;;) {
- types.push(consumeMaybe(tokens));
- if (!maybeConsumeOp('|')) {
- break;
- }
- }
- if (!types.length) {
- throw new Error("Expected type(s).");
- }
- return types;
- }
- tokenRegex = /[:,\[\]\(\)}{]|[a-zA-Z]+/g;
- module.exports = function(input){
- var tokens, e;
- tokens = reject(function(it){
- return /^\s*$/.test(it);
- })(
- input.match(tokenRegex));
- try {
- return consumeTypes(tokens);
- } catch (e$) {
- e = e$;
- throw new Error(e.message + " - '" + tokens.join('#') + "' - '" + input + "'");
- }
- };
-}).call(this);
diff --git a/tools/eslint/node_modules/optionator/lib/util.js b/tools/eslint/node_modules/optionator/lib/util.js
index 9c67435751..d5c972def1 100644
--- a/tools/eslint/node_modules/optionator/lib/util.js
+++ b/tools/eslint/node_modules/optionator/lib/util.js
@@ -1,10 +1,10 @@
-// Generated by LiveScript 1.4.0
+// Generated by LiveScript 1.5.0
(function(){
var prelude, map, sortBy, fl, closestString, nameToRaw, dasherize, naturalJoin;
prelude = require('prelude-ls'), map = prelude.map, sortBy = prelude.sortBy;
fl = require('fast-levenshtein');
closestString = function(possibilities, input){
- var distances, ref$, string, distance;
+ var distances, ref$, string, distance, this$ = this;
if (!possibilities.length) {
return;
}
diff --git a/tools/eslint/node_modules/optionator/package.json b/tools/eslint/node_modules/optionator/package.json
index a92beb3e61..da848b2852 100644
--- a/tools/eslint/node_modules/optionator/package.json
+++ b/tools/eslint/node_modules/optionator/package.json
@@ -2,45 +2,48 @@
"_args": [
[
{
- "raw": "optionator@^0.8.1",
+ "raw": "optionator@^0.8.2",
"scope": null,
"escapedName": "optionator",
"name": "optionator",
- "rawSpec": "^0.8.1",
- "spec": ">=0.8.1 <0.9.0",
+ "rawSpec": "^0.8.2",
+ "spec": ">=0.8.2 <0.9.0",
"type": "range"
},
"/Users/trott/io.js/tools/node_modules/eslint"
]
],
- "_from": "optionator@>=0.8.1 <0.9.0",
- "_id": "optionator@0.8.1",
+ "_from": "optionator@>=0.8.2 <0.9.0",
+ "_id": "optionator@0.8.2",
"_inCache": true,
- "_installable": true,
"_location": "/optionator",
- "_nodeVersion": "5.3.0",
+ "_nodeVersion": "6.6.0",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/optionator-0.8.2.tgz_1474487142656_0.7901301246602088"
+ },
"_npmUser": {
"name": "gkz",
"email": "z@georgezahariev.com"
},
- "_npmVersion": "3.5.3",
+ "_npmVersion": "3.9.0",
"_phantomChildren": {},
"_requested": {
- "raw": "optionator@^0.8.1",
+ "raw": "optionator@^0.8.2",
"scope": null,
"escapedName": "optionator",
"name": "optionator",
- "rawSpec": "^0.8.1",
- "spec": ">=0.8.1 <0.9.0",
+ "rawSpec": "^0.8.2",
+ "spec": ">=0.8.2 <0.9.0",
"type": "range"
},
"_requiredBy": [
"/eslint"
],
- "_resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.1.tgz",
- "_shasum": "e31b4932cdd5fb862a8b0d10bc63d3ee1ec7d78b",
+ "_resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
+ "_shasum": "364c5e409d3f4d6301d6c0b4c05bba50180aeb64",
"_shrinkwrap": null,
- "_spec": "optionator@^0.8.1",
+ "_spec": "optionator@^0.8.2",
"_where": "/Users/trott/io.js/tools/node_modules/eslint",
"author": {
"name": "George Zahariev",
@@ -51,7 +54,7 @@
},
"dependencies": {
"deep-is": "~0.1.3",
- "fast-levenshtein": "^1.1.0",
+ "fast-levenshtein": "~2.0.4",
"levn": "~0.3.0",
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2",
@@ -60,13 +63,13 @@
"description": "option parsing and help generation",
"devDependencies": {
"istanbul": "~0.4.1",
- "livescript": "~1.4.0",
- "mocha": "~2.3.4"
+ "livescript": "~1.5.0",
+ "mocha": "~3.0.2"
},
"directories": {},
"dist": {
- "shasum": "e31b4932cdd5fb862a8b0d10bc63d3ee1ec7d78b",
- "tarball": "https://registry.npmjs.org/optionator/-/optionator-0.8.1.tgz"
+ "shasum": "364c5e409d3f4d6301d6c0b4c05bba50180aeb64",
+ "tarball": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz"
},
"engines": {
"node": ">= 0.8.0"
@@ -76,7 +79,7 @@
"README.md",
"LICENSE"
],
- "gitHead": "88e905d2546df814bc20ff88af93eec8c47c216c",
+ "gitHead": "191de235d5afa47ebb655fc0efbc2b616263d81b",
"homepage": "https://github.com/gkz/optionator",
"keywords": [
"options",
@@ -102,5 +105,5 @@
"scripts": {
"test": "make test"
},
- "version": "0.8.1"
+ "version": "0.8.2"
}
diff --git a/tools/eslint/node_modules/os-homedir/package.json b/tools/eslint/node_modules/os-homedir/package.json
index 6844c00d49..1f35eee18a 100644
--- a/tools/eslint/node_modules/os-homedir/package.json
+++ b/tools/eslint/node_modules/os-homedir/package.json
@@ -14,16 +14,19 @@
]
],
"_from": "os-homedir@>=1.0.0 <2.0.0",
- "_id": "os-homedir@1.0.1",
+ "_id": "os-homedir@1.0.2",
"_inCache": true,
- "_installable": true,
"_location": "/os-homedir",
- "_nodeVersion": "0.12.5",
+ "_nodeVersion": "6.6.0",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/os-homedir-1.0.2.tgz_1475211519628_0.7873868853785098"
+ },
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
- "_npmVersion": "2.11.2",
+ "_npmVersion": "3.10.3",
"_phantomChildren": {},
"_requested": {
"raw": "os-homedir@^1.0.0",
@@ -37,8 +40,8 @@
"_requiredBy": [
"/user-home"
],
- "_resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz",
- "_shasum": "0d62bdf44b916fd3bbdcf2cab191948fb094f007",
+ "_resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+ "_shasum": "ffbc4988336e0e833de0c168c7ef152121aa7fb3",
"_shrinkwrap": null,
"_spec": "os-homedir@^1.0.0",
"_where": "/Users/trott/io.js/tools/node_modules/user-home",
@@ -51,15 +54,16 @@
"url": "https://github.com/sindresorhus/os-homedir/issues"
},
"dependencies": {},
- "description": "io.js 2.3.0 os.homedir() ponyfill",
+ "description": "Node.js 4 `os.homedir()` ponyfill",
"devDependencies": {
- "ava": "0.0.4",
- "path-exists": "^1.0.0"
+ "ava": "*",
+ "path-exists": "^2.0.0",
+ "xo": "^0.16.0"
},
"directories": {},
"dist": {
- "shasum": "0d62bdf44b916fd3bbdcf2cab191948fb094f007",
- "tarball": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz"
+ "shasum": "ffbc4988336e0e833de0c168c7ef152121aa7fb3",
+ "tarball": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz"
},
"engines": {
"node": ">=0.10.0"
@@ -67,10 +71,10 @@
"files": [
"index.js"
],
- "gitHead": "13ff83fbd13ebe286a6092286b2c634ab4534c5f",
- "homepage": "https://github.com/sindresorhus/os-homedir",
+ "gitHead": "b1b0ae70a5965fef7005ff6509a5dd1a78c95e36",
+ "homepage": "https://github.com/sindresorhus/os-homedir#readme",
"keywords": [
- "built-in",
+ "builtin",
"core",
"ponyfill",
"polyfill",
@@ -99,7 +103,7 @@
"url": "git+https://github.com/sindresorhus/os-homedir.git"
},
"scripts": {
- "test": "node test.js"
+ "test": "xo && ava"
},
- "version": "1.0.1"
+ "version": "1.0.2"
}
diff --git a/tools/eslint/node_modules/os-homedir/readme.md b/tools/eslint/node_modules/os-homedir/readme.md
index 4851f104ea..856ae615b0 100644
--- a/tools/eslint/node_modules/os-homedir/readme.md
+++ b/tools/eslint/node_modules/os-homedir/readme.md
@@ -1,8 +1,6 @@
# os-homedir [![Build Status](https://travis-ci.org/sindresorhus/os-homedir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-homedir)
-> io.js 2.3.0 [`os.homedir()`](https://iojs.org/api/os.html#os_os_homedir) ponyfill
-
-> Ponyfill: A polyfill that doesn't overwrite the native method
+> Node.js 4 [`os.homedir()`](https://nodejs.org/api/os.html#os_os_homedir) [ponyfill](https://ponyfill.com)
## Install
@@ -15,10 +13,10 @@ $ npm install --save os-homedir
## Usage
```js
-var osHomedir = require('os-homedir');
+const osHomedir = require('os-homedir');
console.log(osHomedir());
-//=> /Users/sindresorhus
+//=> '/Users/sindresorhus'
```
@@ -30,4 +28,4 @@ console.log(osHomedir());
## License
-MIT © [Sindre Sorhus](http://sindresorhus.com)
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/eslint/node_modules/path-is-absolute/index.js b/tools/eslint/node_modules/path-is-absolute/index.js
index 19f103f908..22aa6c3560 100644
--- a/tools/eslint/node_modules/path-is-absolute/index.js
+++ b/tools/eslint/node_modules/path-is-absolute/index.js
@@ -2,18 +2,18 @@
function posix(path) {
return path.charAt(0) === '/';
-};
+}
function win32(path) {
- // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
+ // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
var result = splitDeviceRe.exec(path);
var device = result[1] || '';
- var isUnc = !!device && device.charAt(1) !== ':';
+ var isUnc = Boolean(device && device.charAt(1) !== ':');
// UNC paths are always absolute
- return !!result[2] || isUnc;
-};
+ return Boolean(result[2] || isUnc);
+}
module.exports = process.platform === 'win32' ? win32 : posix;
module.exports.posix = posix;
diff --git a/tools/eslint/node_modules/path-is-absolute/package.json b/tools/eslint/node_modules/path-is-absolute/package.json
index 8648670d39..00ea0e90e9 100644
--- a/tools/eslint/node_modules/path-is-absolute/package.json
+++ b/tools/eslint/node_modules/path-is-absolute/package.json
@@ -14,16 +14,19 @@
]
],
"_from": "path-is-absolute@>=1.0.0 <2.0.0",
- "_id": "path-is-absolute@1.0.0",
+ "_id": "path-is-absolute@1.0.1",
"_inCache": true,
- "_installable": true,
"_location": "/path-is-absolute",
- "_nodeVersion": "0.12.0",
+ "_nodeVersion": "6.6.0",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/path-is-absolute-1.0.1.tgz_1475210523565_0.9876507974695414"
+ },
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
- "_npmVersion": "2.5.1",
+ "_npmVersion": "3.10.3",
"_phantomChildren": {},
"_requested": {
"raw": "path-is-absolute@^1.0.0",
@@ -37,8 +40,8 @@
"_requiredBy": [
"/glob"
],
- "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz",
- "_shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912",
+ "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "_shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f",
"_shrinkwrap": null,
"_spec": "path-is-absolute@^1.0.0",
"_where": "/Users/trott/io.js/tools/node_modules/glob",
@@ -52,11 +55,13 @@
},
"dependencies": {},
"description": "Node.js 0.12 path.isAbsolute() ponyfill",
- "devDependencies": {},
+ "devDependencies": {
+ "xo": "^0.16.0"
+ },
"directories": {},
"dist": {
- "shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912",
- "tarball": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz"
+ "shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f",
+ "tarball": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz"
},
"engines": {
"node": ">=0.10.0"
@@ -64,8 +69,8 @@
"files": [
"index.js"
],
- "gitHead": "7a76a0c9f2263192beedbe0a820e4d0baee5b7a1",
- "homepage": "https://github.com/sindresorhus/path-is-absolute",
+ "gitHead": "edc91d348b21dac2ab65ea2fbec2868e2eff5eb6",
+ "homepage": "https://github.com/sindresorhus/path-is-absolute#readme",
"keywords": [
"path",
"paths",
@@ -100,7 +105,7 @@
"url": "git+https://github.com/sindresorhus/path-is-absolute.git"
},
"scripts": {
- "test": "node test.js"
+ "test": "xo && node test.js"
},
- "version": "1.0.0"
+ "version": "1.0.1"
}
diff --git a/tools/eslint/node_modules/path-is-absolute/readme.md b/tools/eslint/node_modules/path-is-absolute/readme.md
index cdf94f4309..8dbdf5fcb7 100644
--- a/tools/eslint/node_modules/path-is-absolute/readme.md
+++ b/tools/eslint/node_modules/path-is-absolute/readme.md
@@ -1,8 +1,6 @@
# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute)
-> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) ponyfill
-
-> Ponyfill: A polyfill that doesn't overwrite the native method
+> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com)
## Install
@@ -15,19 +13,29 @@ $ npm install --save path-is-absolute
## Usage
```js
-var pathIsAbsolute = require('path-is-absolute');
+const pathIsAbsolute = require('path-is-absolute');
-// Linux
+// Running on Linux
pathIsAbsolute('/home/foo');
//=> true
+pathIsAbsolute('C:/Users/foo');
+//=> false
-// Windows
-pathIsAbsolute('C:/Users/');
+// Running on Windows
+pathIsAbsolute('C:/Users/foo');
//=> true
+pathIsAbsolute('/home/foo');
+//=> false
-// Any OS
+// Running on any OS
pathIsAbsolute.posix('/home/foo');
//=> true
+pathIsAbsolute.posix('C:/Users/foo');
+//=> false
+pathIsAbsolute.win32('C:/Users/foo');
+//=> true
+pathIsAbsolute.win32('/home/foo');
+//=> false
```
@@ -39,13 +47,13 @@ See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isa
### pathIsAbsolute.posix(path)
-The Posix specific version.
+POSIX specific version.
### pathIsAbsolute.win32(path)
-The Windows specific version.
+Windows specific version.
## License
-MIT © [Sindre Sorhus](http://sindresorhus.com)
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/tools/eslint/node_modules/path-is-inside/LICENSE.txt b/tools/eslint/node_modules/path-is-inside/LICENSE.txt
index ae20051ff7..0bdbb61c9d 100644
--- a/tools/eslint/node_modules/path-is-inside/LICENSE.txt
+++ b/tools/eslint/node_modules/path-is-inside/LICENSE.txt
@@ -1,4 +1,8 @@
-Copyright © 2013–2014 Domenic Denicola <domenic@domenicdenicola.com>
+Dual licensed under WTFPL and MIT:
+
+---
+
+Copyright © 2013–2016 Domenic Denicola <d@domenic.me>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
@@ -17,3 +21,27 @@ as published by Sam Hocevar. See below for more details.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
+
+---
+
+The MIT License (MIT)
+
+Copyright © 2013–2016 Domenic Denicola <d@domenic.me>
+
+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/eslint/node_modules/path-is-inside/README.md b/tools/eslint/node_modules/path-is-inside/README.md
deleted file mode 100644
index d42e6aa736..0000000000
--- a/tools/eslint/node_modules/path-is-inside/README.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# Is This Path Inside This Other Path?
-
-It turns out this question isn't trivial to answer using Node's built-in path APIs. A naive `indexOf`-based solution will fail sometimes on Windows, which is case-insensitive (see e.g. [isaacs/npm#4214][]). You might then think to be clever with `path.resolve`, but you have to be careful to account for situations whether the paths have different drive letters, or else you'll cause bugs like [isaacs/npm#4313][]. And let's not even get started on trailing slashes.
-
-The **path-is-inside** package will give you a robust, cross-platform way of detecting whether a given path is inside another path.
-
-## Usage
-
-Pretty simple. First the path being tested; then the potential parent. Like so:
-
-```js
-var pathIsInside = require("path-is-inside");
-
-pathIsInside("/x/y/z", "/x/y") // true
-pathIsInside("/x/y", "/x/y/z") // false
-```
-
-## OS-Specific Behavior
-
-Like Node's built-in path module, path-is-inside treats all file paths on Windows as case-insensitive, whereas it treats all file paths on *-nix operating systems as case-sensitive. Keep this in mind especially when working on a Mac, where, despite Node's defaults, the OS usually treats paths case-insensitively.
-
-In practice, this means:
-
-```js
-// On Windows
-
-pathIsInside("C:\\X\\Y\\Z", "C:\\x\\y") // true
-
-// On *-nix, including Mac OS X
-
-pathIsInside("/X/Y/Z", "/x/y") // false
-```
-
-[isaacs/npm#4214]: https://github.com/isaacs/npm/pull/4214
-[isaacs/npm#4313]: https://github.com/isaacs/npm/issues/4313
diff --git a/tools/eslint/node_modules/path-is-inside/package.json b/tools/eslint/node_modules/path-is-inside/package.json
index 749166b80d..7f93a6c685 100644
--- a/tools/eslint/node_modules/path-is-inside/package.json
+++ b/tools/eslint/node_modules/path-is-inside/package.json
@@ -14,15 +14,19 @@
]
],
"_from": "path-is-inside@>=1.0.1 <2.0.0",
- "_id": "path-is-inside@1.0.1",
+ "_id": "path-is-inside@1.0.2",
"_inCache": true,
- "_installable": true,
"_location": "/path-is-inside",
+ "_nodeVersion": "6.2.2",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/path-is-inside-1.0.2.tgz_1473550509195_0.936812553787604"
+ },
"_npmUser": {
"name": "domenic",
- "email": "domenic@domenicdenicola.com"
+ "email": "d@domenic.me"
},
- "_npmVersion": "1.3.25",
+ "_npmVersion": "3.9.5",
"_phantomChildren": {},
"_requested": {
"raw": "path-is-inside@^1.0.1",
@@ -37,18 +41,18 @@
"/eslint",
"/is-path-inside"
],
- "_resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz",
- "_shasum": "98d8f1d030bf04bd7aeee4a1ba5485d40318fd89",
+ "_resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
+ "_shasum": "365417dede44430d1c11af61027facf074bdfc53",
"_shrinkwrap": null,
"_spec": "path-is-inside@^1.0.1",
"_where": "/Users/trott/io.js/tools/node_modules/eslint",
"author": {
"name": "Domenic Denicola",
- "email": "domenic@domenicdenicola.com",
- "url": "http://domenic.me"
+ "email": "d@domenic.me",
+ "url": "https://domenic.me"
},
"bugs": {
- "url": "http://github.com/domenic/path-is-inside/issues"
+ "url": "https://github.com/domenic/path-is-inside/issues"
},
"dependencies": {},
"description": "Tests whether one path is inside another path",
@@ -58,10 +62,14 @@
},
"directories": {},
"dist": {
- "shasum": "98d8f1d030bf04bd7aeee4a1ba5485d40318fd89",
- "tarball": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz"
+ "shasum": "365417dede44430d1c11af61027facf074bdfc53",
+ "tarball": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz"
},
- "homepage": "https://github.com/domenic/path-is-inside",
+ "files": [
+ "lib"
+ ],
+ "gitHead": "05a9bf7c5e008505539e14e96c4d2fc8b2c6d058",
+ "homepage": "https://github.com/domenic/path-is-inside#readme",
"keywords": [
"path",
"directory",
@@ -69,7 +77,7 @@
"inside",
"relative"
],
- "license": "WTFPL",
+ "license": "(WTFPL OR MIT)",
"main": "lib/path-is-inside.js",
"maintainers": [
{
@@ -82,11 +90,11 @@
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
- "url": "git://github.com/domenic/path-is-inside.git"
+ "url": "git+https://github.com/domenic/path-is-inside.git"
},
"scripts": {
"lint": "jshint lib",
"test": "mocha"
},
- "version": "1.0.1"
+ "version": "1.0.2"
}
diff --git a/tools/eslint/node_modules/pify/package.json b/tools/eslint/node_modules/pify/package.json
index 47012485fd..5efdb07161 100644
--- a/tools/eslint/node_modules/pify/package.json
+++ b/tools/eslint/node_modules/pify/package.json
@@ -16,7 +16,6 @@
"_from": "pify@>=2.0.0 <3.0.0",
"_id": "pify@2.3.0",
"_inCache": true,
- "_installable": true,
"_location": "/pify",
"_nodeVersion": "4.2.1",
"_npmUser": {
diff --git a/tools/eslint/node_modules/pinkie-promise/package.json b/tools/eslint/node_modules/pinkie-promise/package.json
index e3bcfe5457..f9c64dcbf0 100644
--- a/tools/eslint/node_modules/pinkie-promise/package.json
+++ b/tools/eslint/node_modules/pinkie-promise/package.json
@@ -16,7 +16,6 @@
"_from": "pinkie-promise@>=2.0.0 <3.0.0",
"_id": "pinkie-promise@2.0.1",
"_inCache": true,
- "_installable": true,
"_location": "/pinkie-promise",
"_nodeVersion": "4.4.1",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/pinkie/package.json b/tools/eslint/node_modules/pinkie/package.json
index 27b0b1b310..727839b3c7 100644
--- a/tools/eslint/node_modules/pinkie/package.json
+++ b/tools/eslint/node_modules/pinkie/package.json
@@ -16,7 +16,6 @@
"_from": "pinkie@>=2.0.0 <3.0.0",
"_id": "pinkie@2.0.4",
"_inCache": true,
- "_installable": true,
"_location": "/pinkie",
"_nodeVersion": "4.2.4",
"_npmUser": {
diff --git a/tools/eslint/node_modules/pluralize/package.json b/tools/eslint/node_modules/pluralize/package.json
index 24b5be2617..933e93c69c 100644
--- a/tools/eslint/node_modules/pluralize/package.json
+++ b/tools/eslint/node_modules/pluralize/package.json
@@ -16,7 +16,6 @@
"_from": "pluralize@>=1.2.1 <2.0.0",
"_id": "pluralize@1.2.1",
"_inCache": true,
- "_installable": true,
"_location": "/pluralize",
"_nodeVersion": "4.0.0",
"_npmUser": {
diff --git a/tools/eslint/node_modules/prelude-ls/package.json b/tools/eslint/node_modules/prelude-ls/package.json
index 83147b1352..cd075ed81e 100644
--- a/tools/eslint/node_modules/prelude-ls/package.json
+++ b/tools/eslint/node_modules/prelude-ls/package.json
@@ -16,7 +16,6 @@
"_from": "prelude-ls@>=1.1.2 <1.2.0",
"_id": "prelude-ls@1.1.2",
"_inCache": true,
- "_installable": true,
"_location": "/prelude-ls",
"_nodeVersion": "0.11.15",
"_npmUser": {
@@ -64,7 +63,7 @@
"directories": {},
"dist": {
"shasum": "21932a549f5e52ffd9a827f570e04be62a97da54",
- "tarball": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz"
+ "tarball": "http://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz"
},
"engines": {
"node": ">= 0.8.0"
diff --git a/tools/eslint/node_modules/process-nextick-args/package.json b/tools/eslint/node_modules/process-nextick-args/package.json
index 5d6dcee589..e19e61cf69 100644
--- a/tools/eslint/node_modules/process-nextick-args/package.json
+++ b/tools/eslint/node_modules/process-nextick-args/package.json
@@ -16,7 +16,6 @@
"_from": "process-nextick-args@>=1.0.6 <1.1.0",
"_id": "process-nextick-args@1.0.7",
"_inCache": true,
- "_installable": true,
"_location": "/process-nextick-args",
"_nodeVersion": "5.11.0",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/progress/package.json b/tools/eslint/node_modules/progress/package.json
index c7b1fb217a..3e6ded198f 100644
--- a/tools/eslint/node_modules/progress/package.json
+++ b/tools/eslint/node_modules/progress/package.json
@@ -16,7 +16,6 @@
"_from": "progress@>=1.1.8 <2.0.0",
"_id": "progress@1.1.8",
"_inCache": true,
- "_installable": true,
"_location": "/progress",
"_npmUser": {
"name": "prezjordan",
diff --git a/tools/eslint/node_modules/readable-stream/package.json b/tools/eslint/node_modules/readable-stream/package.json
index 5cad1a9445..af0995696c 100644
--- a/tools/eslint/node_modules/readable-stream/package.json
+++ b/tools/eslint/node_modules/readable-stream/package.json
@@ -16,7 +16,6 @@
"_from": "readable-stream@>=2.0.0 <2.1.0",
"_id": "readable-stream@2.0.6",
"_inCache": true,
- "_installable": true,
"_location": "/readable-stream",
"_nodeVersion": "5.7.0",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/readline2/package.json b/tools/eslint/node_modules/readline2/package.json
index 90bad8ede8..c7eeb38601 100644
--- a/tools/eslint/node_modules/readline2/package.json
+++ b/tools/eslint/node_modules/readline2/package.json
@@ -16,7 +16,6 @@
"_from": "readline2@>=1.0.1 <2.0.0",
"_id": "readline2@1.0.1",
"_inCache": true,
- "_installable": true,
"_location": "/readline2",
"_nodeVersion": "0.12.5",
"_npmUser": {
diff --git a/tools/eslint/node_modules/require-uncached/package.json b/tools/eslint/node_modules/require-uncached/package.json
index 626230a6ef..053455e738 100644
--- a/tools/eslint/node_modules/require-uncached/package.json
+++ b/tools/eslint/node_modules/require-uncached/package.json
@@ -16,7 +16,6 @@
"_from": "require-uncached@>=1.0.2 <2.0.0",
"_id": "require-uncached@1.0.2",
"_inCache": true,
- "_installable": true,
"_location": "/require-uncached",
"_npmUser": {
"name": "sindresorhus",
diff --git a/tools/eslint/node_modules/resolve-from/package.json b/tools/eslint/node_modules/resolve-from/package.json
index 40f796f322..430e2f3783 100644
--- a/tools/eslint/node_modules/resolve-from/package.json
+++ b/tools/eslint/node_modules/resolve-from/package.json
@@ -16,7 +16,6 @@
"_from": "resolve-from@>=1.0.0 <2.0.0",
"_id": "resolve-from@1.0.1",
"_inCache": true,
- "_installable": true,
"_location": "/resolve-from",
"_nodeVersion": "4.1.1",
"_npmUser": {
diff --git a/tools/eslint/node_modules/restore-cursor/package.json b/tools/eslint/node_modules/restore-cursor/package.json
index d8e43f663c..e23a98e784 100644
--- a/tools/eslint/node_modules/restore-cursor/package.json
+++ b/tools/eslint/node_modules/restore-cursor/package.json
@@ -16,7 +16,6 @@
"_from": "restore-cursor@>=1.0.1 <2.0.0",
"_id": "restore-cursor@1.0.1",
"_inCache": true,
- "_installable": true,
"_location": "/restore-cursor",
"_nodeVersion": "4.1.0",
"_npmUser": {
diff --git a/tools/eslint/node_modules/rimraf/package.json b/tools/eslint/node_modules/rimraf/package.json
index 4dda8cc137..1d7b1ee29a 100644
--- a/tools/eslint/node_modules/rimraf/package.json
+++ b/tools/eslint/node_modules/rimraf/package.json
@@ -16,7 +16,6 @@
"_from": "rimraf@>=2.2.8 <3.0.0",
"_id": "rimraf@2.5.4",
"_inCache": true,
- "_installable": true,
"_location": "/rimraf",
"_nodeVersion": "4.4.4",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/run-async/package.json b/tools/eslint/node_modules/run-async/package.json
index 18601a76aa..50f48420e1 100644
--- a/tools/eslint/node_modules/run-async/package.json
+++ b/tools/eslint/node_modules/run-async/package.json
@@ -16,7 +16,6 @@
"_from": "run-async@>=0.1.0 <0.2.0",
"_id": "run-async@0.1.0",
"_inCache": true,
- "_installable": true,
"_location": "/run-async",
"_npmUser": {
"name": "sboudrias",
diff --git a/tools/eslint/node_modules/rx-lite/package.json b/tools/eslint/node_modules/rx-lite/package.json
index 9f3391f00d..93075d0810 100644
--- a/tools/eslint/node_modules/rx-lite/package.json
+++ b/tools/eslint/node_modules/rx-lite/package.json
@@ -16,7 +16,6 @@
"_from": "rx-lite@>=3.1.2 <4.0.0",
"_id": "rx-lite@3.1.2",
"_inCache": true,
- "_installable": true,
"_location": "/rx-lite",
"_nodeVersion": "0.12.7",
"_npmUser": {
diff --git a/tools/eslint/node_modules/shelljs/package.json b/tools/eslint/node_modules/shelljs/package.json
index 5bf5252a8b..5dc19b8f52 100644
--- a/tools/eslint/node_modules/shelljs/package.json
+++ b/tools/eslint/node_modules/shelljs/package.json
@@ -16,7 +16,6 @@
"_from": "shelljs@>=0.6.0 <0.7.0",
"_id": "shelljs@0.6.1",
"_inCache": true,
- "_installable": true,
"_location": "/shelljs",
"_nodeVersion": "6.0.0",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/slice-ansi/package.json b/tools/eslint/node_modules/slice-ansi/package.json
index 289179ad5c..bd6def3e78 100644
--- a/tools/eslint/node_modules/slice-ansi/package.json
+++ b/tools/eslint/node_modules/slice-ansi/package.json
@@ -16,7 +16,6 @@
"_from": "slice-ansi@0.0.4",
"_id": "slice-ansi@0.0.4",
"_inCache": true,
- "_installable": true,
"_location": "/slice-ansi",
"_nodeVersion": "3.2.0",
"_npmUser": {
diff --git a/tools/eslint/node_modules/sprintf-js/package.json b/tools/eslint/node_modules/sprintf-js/package.json
index 1c5329e0a7..a190527cc0 100644
--- a/tools/eslint/node_modules/sprintf-js/package.json
+++ b/tools/eslint/node_modules/sprintf-js/package.json
@@ -16,7 +16,6 @@
"_from": "sprintf-js@>=1.0.2 <1.1.0",
"_id": "sprintf-js@1.0.3",
"_inCache": true,
- "_installable": true,
"_location": "/sprintf-js",
"_nodeVersion": "0.12.4",
"_npmUser": {
diff --git a/tools/eslint/node_modules/string-width/package.json b/tools/eslint/node_modules/string-width/package.json
index cb8d773631..6fc310fca4 100644
--- a/tools/eslint/node_modules/string-width/package.json
+++ b/tools/eslint/node_modules/string-width/package.json
@@ -16,7 +16,6 @@
"_from": "string-width@>=1.0.1 <2.0.0",
"_id": "string-width@1.0.2",
"_inCache": true,
- "_installable": true,
"_location": "/string-width",
"_nodeVersion": "4.4.5",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/string_decoder/package.json b/tools/eslint/node_modules/string_decoder/package.json
index f18fb7ccc9..bae2f93c9a 100644
--- a/tools/eslint/node_modules/string_decoder/package.json
+++ b/tools/eslint/node_modules/string_decoder/package.json
@@ -16,7 +16,6 @@
"_from": "string_decoder@>=0.10.0 <0.11.0",
"_id": "string_decoder@0.10.31",
"_inCache": true,
- "_installable": true,
"_location": "/string_decoder",
"_npmUser": {
"name": "rvagg",
diff --git a/tools/eslint/node_modules/strip-ansi/package.json b/tools/eslint/node_modules/strip-ansi/package.json
index 7b078b892b..dced2726e0 100644
--- a/tools/eslint/node_modules/strip-ansi/package.json
+++ b/tools/eslint/node_modules/strip-ansi/package.json
@@ -16,7 +16,6 @@
"_from": "strip-ansi@>=3.0.0 <4.0.0",
"_id": "strip-ansi@3.0.1",
"_inCache": true,
- "_installable": true,
"_location": "/strip-ansi",
"_nodeVersion": "0.12.7",
"_npmOperationalInternal": {
@@ -41,8 +40,7 @@
"_requiredBy": [
"/chalk",
"/inquirer",
- "/string-width",
- "/table"
+ "/string-width"
],
"_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf",
diff --git a/tools/eslint/node_modules/strip-bom/package.json b/tools/eslint/node_modules/strip-bom/package.json
index 7f4f681d31..2613be685f 100644
--- a/tools/eslint/node_modules/strip-bom/package.json
+++ b/tools/eslint/node_modules/strip-bom/package.json
@@ -16,7 +16,6 @@
"_from": "strip-bom@>=3.0.0 <4.0.0",
"_id": "strip-bom@3.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/strip-bom",
"_nodeVersion": "4.4.2",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/strip-json-comments/package.json b/tools/eslint/node_modules/strip-json-comments/package.json
index 8cb657aa78..de43cb650f 100644
--- a/tools/eslint/node_modules/strip-json-comments/package.json
+++ b/tools/eslint/node_modules/strip-json-comments/package.json
@@ -16,7 +16,6 @@
"_from": "strip-json-comments@>=1.0.1 <1.1.0",
"_id": "strip-json-comments@1.0.4",
"_inCache": true,
- "_installable": true,
"_location": "/strip-json-comments",
"_nodeVersion": "0.12.5",
"_npmUser": {
diff --git a/tools/eslint/node_modules/supports-color/package.json b/tools/eslint/node_modules/supports-color/package.json
index 8714cb5594..640f4f7d12 100644
--- a/tools/eslint/node_modules/supports-color/package.json
+++ b/tools/eslint/node_modules/supports-color/package.json
@@ -16,7 +16,6 @@
"_from": "supports-color@>=2.0.0 <3.0.0",
"_id": "supports-color@2.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/supports-color",
"_nodeVersion": "0.12.5",
"_npmUser": {
diff --git a/tools/eslint/node_modules/table/dist/alignString.js b/tools/eslint/node_modules/table/dist/alignString.js
index 24891e74ca..73e613765b 100644
--- a/tools/eslint/node_modules/table/dist/alignString.js
+++ b/tools/eslint/node_modules/table/dist/alignString.js
@@ -1,24 +1,12 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _isNumber2 = require('lodash/isNumber');
+var _lodash = require('lodash');
-var _isNumber3 = _interopRequireDefault(_isNumber2);
-
-var _isString2 = require('lodash/isString');
-
-var _isString3 = _interopRequireDefault(_isString2);
-
-var _floor2 = require('lodash/floor');
-
-var _floor3 = _interopRequireDefault(_floor2);
-
-var _repeat2 = require('lodash/repeat');
-
-var _repeat3 = _interopRequireDefault(_repeat2);
+var _lodash2 = _interopRequireDefault(_lodash);
var _stringWidth = require('string-width');
@@ -26,20 +14,15 @@ var _stringWidth2 = _interopRequireDefault(_stringWidth);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var alignCenter = undefined,
- alignLeft = undefined,
- alignRight = undefined,
- alignments = undefined;
-
-alignments = ['left', 'right', 'center'];
+const alignments = ['left', 'right', 'center'];
/**
* @param {string} subject
* @param {number} width
* @returns {string}
*/
-alignLeft = function alignLeft(subject, width) {
- return subject + (0, _repeat3.default)(' ', width);
+const alignLeft = (subject, width) => {
+ return subject + _lodash2.default.repeat(' ', width);
};
/**
@@ -47,8 +30,8 @@ alignLeft = function alignLeft(subject, width) {
* @param {number} width
* @returns {string}
*/
-alignRight = function alignRight(subject, width) {
- return (0, _repeat3.default)(' ', width) + subject;
+const alignRight = (subject, width) => {
+ return _lodash2.default.repeat(' ', width) + subject;
};
/**
@@ -56,18 +39,18 @@ alignRight = function alignRight(subject, width) {
* @param {number} width
* @returns {string}
*/
-alignCenter = function alignCenter(subject, width) {
- var halfWidth = undefined;
+const alignCenter = (subject, width) => {
+ let halfWidth;
- halfWidth = width / 2;
+ halfWidth = width / 2;
- if (halfWidth % 2 === 0) {
- return (0, _repeat3.default)(' ', halfWidth) + subject + (0, _repeat3.default)(' ', halfWidth);
- } else {
- halfWidth = (0, _floor3.default)(halfWidth);
+ if (halfWidth % 2 === 0) {
+ return _lodash2.default.repeat(' ', halfWidth) + subject + _lodash2.default.repeat(' ', halfWidth);
+ } else {
+ halfWidth = _lodash2.default.floor(halfWidth);
- return (0, _repeat3.default)(' ', halfWidth) + subject + (0, _repeat3.default)(' ', halfWidth + 1);
- }
+ return _lodash2.default.repeat(' ', halfWidth) + subject + _lodash2.default.repeat(' ', halfWidth + 1);
+ }
};
/**
@@ -80,50 +63,46 @@ alignCenter = function alignCenter(subject, width) {
* @returns {string}
*/
-exports.default = function (subject, containerWidth, alignment) {
- var availableWidth = undefined,
- subjectWidth = undefined;
-
- if (!(0, _isString3.default)(subject)) {
- throw new Error('Subject parameter value must be a string.');
- }
+exports.default = (subject, containerWidth, alignment) => {
+ if (!_lodash2.default.isString(subject)) {
+ throw new Error('Subject parameter value must be a string.');
+ }
- if (!(0, _isNumber3.default)(containerWidth)) {
- throw new Error('Container width parameter value must be a number.');
- }
+ if (!_lodash2.default.isNumber(containerWidth)) {
+ throw new Error('Container width parameter value must be a number.');
+ }
- subjectWidth = (0, _stringWidth2.default)(subject);
+ const subjectWidth = (0, _stringWidth2.default)(subject);
- if (subjectWidth > containerWidth) {
- // console.log('subjectWidth', subjectWidth, 'containerWidth', containerWidth, 'subject', subject);
+ if (subjectWidth > containerWidth) {
+ // console.log('subjectWidth', subjectWidth, 'containerWidth', containerWidth, 'subject', subject);
- throw new Error('Subject parameter value width cannot be greater than the container width.');
- }
+ throw new Error('Subject parameter value width cannot be greater than the container width.');
+ }
- if (!(0, _isString3.default)(alignment)) {
- throw new Error('Alignment parameter value must be a string.');
- }
+ if (!_lodash2.default.isString(alignment)) {
+ throw new Error('Alignment parameter value must be a string.');
+ }
- if (alignments.indexOf(alignment) === -1) {
- throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).');
- }
+ if (alignments.indexOf(alignment) === -1) {
+ throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).');
+ }
- if (subjectWidth === 0) {
- return (0, _repeat3.default)(' ', containerWidth);
- }
+ if (subjectWidth === 0) {
+ return _lodash2.default.repeat(' ', containerWidth);
+ }
- availableWidth = containerWidth - subjectWidth;
+ const availableWidth = containerWidth - subjectWidth;
- if (alignment === 'left') {
- return alignLeft(subject, availableWidth);
- }
+ if (alignment === 'left') {
+ return alignLeft(subject, availableWidth);
+ }
- if (alignment === 'right') {
- return alignRight(subject, availableWidth);
- }
+ if (alignment === 'right') {
+ return alignRight(subject, availableWidth);
+ }
- return alignCenter(subject, availableWidth);
+ return alignCenter(subject, availableWidth);
};
-module.exports = exports['default'];
-//# sourceMappingURL=alignString.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/alignString.js.map b/tools/eslint/node_modules/table/dist/alignString.js.map
index 77fabeadaf..9d6e8b84e3 100644
--- a/tools/eslint/node_modules/table/dist/alignString.js.map
+++ b/tools/eslint/node_modules/table/dist/alignString.js.map
@@ -1 +1 @@
-{"version":3,"sources":["alignString.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAI,WAAW,YAAA;IACX,SAAS,YAAA;IACT,UAAU,YAAA;IACV,UAAU,YAAA,CAAC;;AAEf,UAAU,GAAG,CACT,MAAM,EACN,OAAO,EACP,QAAQ,CACX;;;;;;;AAAC,AAOF,SAAS,GAAG,mBAAC,OAAO,EAAE,KAAK,EAAK;AAC5B,WAAO,OAAO,GAAG,sBAAS,GAAG,EAAE,KAAK,CAAC,CAAC;CACzC;;;;;;;AAAC,AAOF,UAAU,GAAG,oBAAC,OAAO,EAAE,KAAK,EAAK;AAC7B,WAAO,sBAAS,GAAG,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC;CACzC;;;;;;;AAAC,AAOF,WAAW,GAAG,qBAAC,OAAO,EAAE,KAAK,EAAK;AAC9B,QAAI,SAAS,YAAA,CAAC;;AAEd,aAAS,GAAG,KAAK,GAAG,CAAC,CAAC;;AAEtB,QAAI,SAAS,GAAG,CAAC,KAAK,CAAC,EAAE;AACrB,eAAO,sBAAS,GAAG,EAAE,SAAS,CAAC,GAAG,OAAO,GAAG,sBAAS,GAAG,EAAE,SAAS,CAAC,CAAC;KACxE,MAAM;AACH,iBAAS,GAAG,qBAAQ,SAAS,CAAC,CAAC;;AAE/B,eAAO,sBAAS,GAAG,EAAE,SAAS,CAAC,GAAG,OAAO,GAAG,sBAAS,GAAG,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC;KAC5E;CACJ;;;;;;;;;;;AAAC;kBAWa,UAAC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAK;AACnD,QAAI,cAAc,YAAA;QACd,YAAY,YAAA,CAAC;;AAEjB,QAAI,CAAC,wBAAW,OAAO,CAAC,EAAE;AACtB,cAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;KAChE;;AAED,QAAI,CAAC,wBAAW,cAAc,CAAC,EAAE;AAC7B,cAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;KACxE;;AAED,gBAAY,GAAG,2BAAY,OAAO,CAAC,CAAC;;AAEpC,QAAI,YAAY,GAAG,cAAc,EAAE;;;AAG/B,cAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;KAChG;;AAED,QAAI,CAAC,wBAAW,SAAS,CAAC,EAAE;AACxB,cAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;KAClE;;AAED,QAAI,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE;AACtC,cAAM,IAAI,KAAK,CAAC,4FAA4F,CAAC,CAAC;KACjH;;AAED,QAAI,YAAY,KAAK,CAAC,EAAE;AACpB,eAAO,sBAAS,GAAG,EAAE,cAAc,CAAC,CAAC;KACxC;;AAED,kBAAc,GAAG,cAAc,GAAG,YAAY,CAAC;;AAE/C,QAAI,SAAS,KAAK,MAAM,EAAE;AACtB,eAAO,SAAS,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;KAC7C;;AAED,QAAI,SAAS,KAAK,OAAO,EAAE;AACvB,eAAO,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;KAC9C;;AAED,WAAO,WAAW,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;CAC/C","file":"alignString.js","sourcesContent":["import _ from 'lodash';\nimport stringWidth from 'string-width';\n\nlet alignCenter,\n alignLeft,\n alignRight,\n alignments;\n\nalignments = [\n 'left',\n 'right',\n 'center'\n];\n\n/**\n * @param {string} subject\n * @param {number} width\n * @returns {string}\n */\nalignLeft = (subject, width) => {\n return subject + _.repeat(' ', width);\n};\n\n/**\n * @param {string} subject\n * @param {number} width\n * @returns {string}\n */\nalignRight = (subject, width) => {\n return _.repeat(' ', width) + subject;\n};\n\n/**\n * @param {string} subject\n * @param {number} width\n * @returns {string}\n */\nalignCenter = (subject, width) => {\n let halfWidth;\n\n halfWidth = width / 2;\n\n if (halfWidth % 2 === 0) {\n return _.repeat(' ', halfWidth) + subject + _.repeat(' ', halfWidth);\n } else {\n halfWidth = _.floor(halfWidth);\n\n return _.repeat(' ', halfWidth) + subject + _.repeat(' ', halfWidth + 1);\n }\n};\n\n/**\n * Pads a string to the left and/or right to position the subject\n * text in a desired alignment within a container.\n *\n * @param {string} subject\n * @param {number} containerWidth\n * @param {string} alignment One of the valid options (left, right, center).\n * @returns {string}\n */\nexport default (subject, containerWidth, alignment) => {\n let availableWidth,\n subjectWidth;\n\n if (!_.isString(subject)) {\n throw new Error('Subject parameter value must be a string.');\n }\n\n if (!_.isNumber(containerWidth)) {\n throw new Error('Container width parameter value must be a number.');\n }\n\n subjectWidth = stringWidth(subject);\n\n if (subjectWidth > containerWidth) {\n // console.log('subjectWidth', subjectWidth, 'containerWidth', containerWidth, 'subject', subject);\n\n throw new Error('Subject parameter value width cannot be greater than the container width.');\n }\n\n if (!_.isString(alignment)) {\n throw new Error('Alignment parameter value must be a string.');\n }\n\n if (alignments.indexOf(alignment) === -1) {\n throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).');\n }\n\n if (subjectWidth === 0) {\n return _.repeat(' ', containerWidth);\n }\n\n availableWidth = containerWidth - subjectWidth;\n\n if (alignment === 'left') {\n return alignLeft(subject, availableWidth);\n }\n\n if (alignment === 'right') {\n return alignRight(subject, availableWidth);\n }\n\n return alignCenter(subject, availableWidth);\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["alignString.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA;;;;;;AAEA,IAAI,oBAAJ;IACI,kBADJ;IAEI,mBAFJ;IAGI,mBAHJ;;AAKA,aAAa,CACT,MADS,EAET,OAFS,EAGT,QAHS,CAAb;;;;;;;AAWA,YAAY,mBAAC,OAAD,EAAU,KAAV,EAAoB;AAC5B,WAAO,UAAU,sBAAS,GAAT,EAAc,KAAd,CAAjB;AACH,CAFD;;;;;;;AASA,aAAa,oBAAC,OAAD,EAAU,KAAV,EAAoB;AAC7B,WAAO,sBAAS,GAAT,EAAc,KAAd,IAAuB,OAA9B;AACH,CAFD;;;;;;;AASA,cAAc,qBAAC,OAAD,EAAU,KAAV,EAAoB;AAC9B,QAAI,kBAAJ;;AAEA,gBAAY,QAAQ,CAApB;;AAEA,QAAI,YAAY,CAAZ,KAAkB,CAAtB,EAAyB;AACrB,eAAO,sBAAS,GAAT,EAAc,SAAd,IAA2B,OAA3B,GAAqC,sBAAS,GAAT,EAAc,SAAd,CAA5C;AACH,KAFD,MAEO;AACH,oBAAY,qBAAQ,SAAR,CAAZ;;AAEA,eAAO,sBAAS,GAAT,EAAc,SAAd,IAA2B,OAA3B,GAAqC,sBAAS,GAAT,EAAc,YAAY,CAA1B,CAA5C;AACH;AACJ,CAZD;;;;;;;;;;;;kBAuBe,UAAC,OAAD,EAAU,cAAV,EAA0B,SAA1B,EAAwC;AACnD,QAAI,uBAAJ;QACI,qBADJ;;AAGA,QAAI,CAAC,wBAAW,OAAX,CAAL,EAA0B;AACtB,cAAM,IAAI,KAAJ,CAAU,2CAAV,CAAN;AACH;;AAED,QAAI,CAAC,wBAAW,cAAX,CAAL,EAAiC;AAC7B,cAAM,IAAI,KAAJ,CAAU,mDAAV,CAAN;AACH;;AAED,mBAAe,2BAAY,OAAZ,CAAf;;AAEA,QAAI,eAAe,cAAnB,EAAmC;;;AAG/B,cAAM,IAAI,KAAJ,CAAU,2EAAV,CAAN;AACH;;AAED,QAAI,CAAC,wBAAW,SAAX,CAAL,EAA4B;AACxB,cAAM,IAAI,KAAJ,CAAU,6CAAV,CAAN;AACH;;AAED,QAAI,WAAW,OAAX,CAAmB,SAAnB,MAAkC,CAAC,CAAvC,EAA0C;AACtC,cAAM,IAAI,KAAJ,CAAU,4FAAV,CAAN;AACH;;AAED,QAAI,iBAAiB,CAArB,EAAwB;AACpB,eAAO,sBAAS,GAAT,EAAc,cAAd,CAAP;AACH;;AAED,qBAAiB,iBAAiB,YAAlC;;AAEA,QAAI,cAAc,MAAlB,EAA0B;AACtB,eAAO,UAAU,OAAV,EAAmB,cAAnB,CAAP;AACH;;AAED,QAAI,cAAc,OAAlB,EAA2B;AACvB,eAAO,WAAW,OAAX,EAAoB,cAApB,CAAP;AACH;;AAED,WAAO,YAAY,OAAZ,EAAqB,cAArB,CAAP;AACH,C","file":"alignString.js","sourcesContent":["import _ from 'lodash';\nimport stringWidth from 'string-width';\n\nlet alignCenter,\n alignLeft,\n alignRight,\n alignments;\n\nalignments = [\n 'left',\n 'right',\n 'center'\n];\n\n/**\n * @param {string} subject\n * @param {number} width\n * @returns {string}\n */\nalignLeft = (subject, width) => {\n return subject + _.repeat(' ', width);\n};\n\n/**\n * @param {string} subject\n * @param {number} width\n * @returns {string}\n */\nalignRight = (subject, width) => {\n return _.repeat(' ', width) + subject;\n};\n\n/**\n * @param {string} subject\n * @param {number} width\n * @returns {string}\n */\nalignCenter = (subject, width) => {\n let halfWidth;\n\n halfWidth = width / 2;\n\n if (halfWidth % 2 === 0) {\n return _.repeat(' ', halfWidth) + subject + _.repeat(' ', halfWidth);\n } else {\n halfWidth = _.floor(halfWidth);\n\n return _.repeat(' ', halfWidth) + subject + _.repeat(' ', halfWidth + 1);\n }\n};\n\n/**\n * Pads a string to the left and/or right to position the subject\n * text in a desired alignment within a container.\n *\n * @param {string} subject\n * @param {number} containerWidth\n * @param {string} alignment One of the valid options (left, right, center).\n * @returns {string}\n */\nexport default (subject, containerWidth, alignment) => {\n let availableWidth,\n subjectWidth;\n\n if (!_.isString(subject)) {\n throw new Error('Subject parameter value must be a string.');\n }\n\n if (!_.isNumber(containerWidth)) {\n throw new Error('Container width parameter value must be a number.');\n }\n\n subjectWidth = stringWidth(subject);\n\n if (subjectWidth > containerWidth) {\n // console.log('subjectWidth', subjectWidth, 'containerWidth', containerWidth, 'subject', subject);\n\n throw new Error('Subject parameter value width cannot be greater than the container width.');\n }\n\n if (!_.isString(alignment)) {\n throw new Error('Alignment parameter value must be a string.');\n }\n\n if (alignments.indexOf(alignment) === -1) {\n throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).');\n }\n\n if (subjectWidth === 0) {\n return _.repeat(' ', containerWidth);\n }\n\n availableWidth = containerWidth - subjectWidth;\n\n if (alignment === 'left') {\n return alignLeft(subject, availableWidth);\n }\n\n if (alignment === 'right') {\n return alignRight(subject, availableWidth);\n }\n\n return alignCenter(subject, availableWidth);\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/alignTableData.js b/tools/eslint/node_modules/table/dist/alignTableData.js
index 2fa881d01d..5d390b9466 100644
--- a/tools/eslint/node_modules/table/dist/alignTableData.js
+++ b/tools/eslint/node_modules/table/dist/alignTableData.js
@@ -1,44 +1,40 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _map2 = require('lodash/map');
+var _lodash = require('lodash');
-var _map3 = _interopRequireDefault(_map2);
-
-var _alignString = require('./alignString');
-
-var _alignString2 = _interopRequireDefault(_alignString);
+var _lodash2 = _interopRequireDefault(_lodash);
var _stringWidth = require('string-width');
var _stringWidth2 = _interopRequireDefault(_stringWidth);
+var _alignString = require('./alignString');
+
+var _alignString2 = _interopRequireDefault(_alignString);
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @param {table~row[]} rows
* @param {Object} config
- * @return {table~row[]}
+ * @returns {table~row[]}
*/
-
-exports.default = function (rows, config) {
- return (0, _map3.default)(rows, function (cells) {
- return (0, _map3.default)(cells, function (value, index1) {
- var column = undefined;
-
- column = config.columns[index1];
-
- if ((0, _stringWidth2.default)(value) === column.width) {
- return value;
- } else {
- return (0, _alignString2.default)(value, column.width, column.alignment);
- }
- });
+exports.default = (rows, config) => {
+ return _lodash2.default.map(rows, cells => {
+ return _lodash2.default.map(cells, (value, index1) => {
+ const column = config.columns[index1];
+
+ if ((0, _stringWidth2.default)(value) === column.width) {
+ return value;
+ } else {
+ return (0, _alignString2.default)(value, column.width, column.alignment);
+ }
});
+ });
};
-module.exports = exports['default'];
-//# sourceMappingURL=alignTableData.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/alignTableData.js.map b/tools/eslint/node_modules/table/dist/alignTableData.js.map
index 704e4c42fb..45aea74993 100644
--- a/tools/eslint/node_modules/table/dist/alignTableData.js.map
+++ b/tools/eslint/node_modules/table/dist/alignTableData.js.map
@@ -1 +1 @@
-{"version":3,"sources":["alignTableData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;kBASe,UAAC,IAAI,EAAE,MAAM,EAAK;AAC7B,WAAO,mBAAM,IAAI,EAAE,UAAC,KAAK,EAAK;AAC1B,eAAO,mBAAM,KAAK,EAAE,UAAC,KAAK,EAAE,MAAM,EAAK;AACnC,gBAAI,MAAM,YAAA,CAAC;;AAEX,kBAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;;AAEhC,gBAAI,2BAAY,KAAK,CAAC,KAAK,MAAM,CAAC,KAAK,EAAE;AACrC,uBAAO,KAAK,CAAC;aAChB,MAAM;AACH,uBAAO,2BAAY,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;aAC7D;SACJ,CAAC,CAAC;KACN,CAAC,CAAC;CACN","file":"alignTableData.js","sourcesContent":["import _ from 'lodash';\nimport alignString from './alignString';\nimport stringWidth from 'string-width';\n\n/**\n * @param {table~row[]} rows\n * @param {Object} config\n * @return {table~row[]}\n */\nexport default (rows, config) => {\n return _.map(rows, (cells) => {\n return _.map(cells, (value, index1) => {\n let column;\n\n column = config.columns[index1];\n\n if (stringWidth(value) === column.width) {\n return value;\n } else {\n return alignString(value, column.width, column.alignment);\n }\n });\n });\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["alignTableData.js"],"names":[],"mappings":";;;;;;;;;;AACA;;;;AACA;;;;;;;;;;;;kBAOe,UAAC,IAAD,EAAO,MAAP,EAAkB;AAC7B,WAAO,mBAAM,IAAN,EAAY,UAAC,KAAD,EAAW;AAC1B,eAAO,mBAAM,KAAN,EAAa,UAAC,KAAD,EAAQ,MAAR,EAAmB;AACnC,gBAAI,eAAJ;;AAEA,qBAAS,OAAO,OAAP,CAAe,MAAf,CAAT;;AAEA,gBAAI,2BAAY,KAAZ,MAAuB,OAAO,KAAlC,EAAyC;AACrC,uBAAO,KAAP;AACH,aAFD,MAEO;AACH,uBAAO,2BAAY,KAAZ,EAAmB,OAAO,KAA1B,EAAiC,OAAO,SAAxC,CAAP;AACH;AACJ,SAVM,CAAP;AAWH,KAZM,CAAP;AAaH,C","file":"alignTableData.js","sourcesContent":["import _ from 'lodash';\nimport alignString from './alignString';\nimport stringWidth from 'string-width';\n\n/**\n * @param {table~row[]} rows\n * @param {Object} config\n * @return {table~row[]}\n */\nexport default (rows, config) => {\n return _.map(rows, (cells) => {\n return _.map(cells, (value, index1) => {\n let column;\n\n column = config.columns[index1];\n\n if (stringWidth(value) === column.width) {\n return value;\n } else {\n return alignString(value, column.width, column.alignment);\n }\n });\n });\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/calculateCellHeight.js b/tools/eslint/node_modules/table/dist/calculateCellHeight.js
index eb4ce2d08e..f90110adb1 100644
--- a/tools/eslint/node_modules/table/dist/calculateCellHeight.js
+++ b/tools/eslint/node_modules/table/dist/calculateCellHeight.js
@@ -1,20 +1,12 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _ceil2 = require('lodash/ceil');
+var _lodash = require('lodash');
-var _ceil3 = _interopRequireDefault(_ceil2);
-
-var _isInteger2 = require('lodash/isInteger');
-
-var _isInteger3 = _interopRequireDefault(_isInteger2);
-
-var _isString2 = require('lodash/isString');
-
-var _isString3 = _interopRequireDefault(_isString2);
+var _lodash2 = _interopRequireDefault(_lodash);
var _stringWidth = require('string-width');
@@ -32,28 +24,26 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @param {boolean} useWrapWord
* @returns {number}
*/
-
exports.default = function (value, columnWidth) {
- var useWrapWord = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
+ let useWrapWord = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
- if (!(0, _isString3.default)(value)) {
- throw new Error('Value must be a string.');
- }
+ if (!_lodash2.default.isString(value)) {
+ throw new Error('Value must be a string.');
+ }
- if (!(0, _isInteger3.default)(columnWidth)) {
- throw new Error('Column width must be an integer.');
- }
+ if (!_lodash2.default.isInteger(columnWidth)) {
+ throw new Error('Column width must be an integer.');
+ }
- if (columnWidth < 1) {
- throw new Error('Column width must be greater than 0.');
- }
+ if (columnWidth < 1) {
+ throw new Error('Column width must be greater than 0.');
+ }
- if (useWrapWord) {
- return (0, _wrapWord2.default)(value, columnWidth).length;
- }
+ if (useWrapWord) {
+ return (0, _wrapWord2.default)(value, columnWidth).length;
+ }
- return (0, _ceil3.default)((0, _stringWidth2.default)(value) / columnWidth);
+ return _lodash2.default.ceil((0, _stringWidth2.default)(value) / columnWidth);
};
-module.exports = exports['default'];
-//# sourceMappingURL=calculateCellHeight.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/calculateCellHeight.js.map b/tools/eslint/node_modules/table/dist/calculateCellHeight.js.map
index 4983826b4f..184fdbf02c 100644
--- a/tools/eslint/node_modules/table/dist/calculateCellHeight.js.map
+++ b/tools/eslint/node_modules/table/dist/calculateCellHeight.js.map
@@ -1 +1 @@
-{"version":3,"sources":["calculateCellHeight.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAUe,UAAC,KAAK,EAAE,WAAW,EAA0B;QAAxB,WAAW,yDAAG,KAAK;;AACnD,QAAI,CAAC,wBAAW,KAAK,CAAC,EAAE;AACpB,cAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC9C;;AAED,QAAI,CAAC,yBAAY,WAAW,CAAC,EAAE;AAC3B,cAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;KACvD;;AAED,QAAI,WAAW,GAAG,CAAC,EAAE;AACjB,cAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;KAC3D;;AAED,QAAI,WAAW,EAAE;AACb,eAAO,wBAAS,KAAK,EAAE,WAAW,CAAC,CAAC,MAAM,CAAC;KAC9C;;AAED,WAAO,oBAAO,2BAAY,KAAK,CAAC,GAAG,WAAW,CAAC,CAAC;CACnD","file":"calculateCellHeight.js","sourcesContent":["import _ from 'lodash';\nimport stringWidth from 'string-width';\nimport wrapWord from './wrapWord';\n\n/**\n * @param {string} value\n * @param {number} columnWidth\n * @param {boolean} useWrapWord\n * @returns {number}\n */\nexport default (value, columnWidth, useWrapWord = false) => {\n if (!_.isString(value)) {\n throw new Error('Value must be a string.');\n }\n\n if (!_.isInteger(columnWidth)) {\n throw new Error('Column width must be an integer.');\n }\n\n if (columnWidth < 1) {\n throw new Error('Column width must be greater than 0.');\n }\n\n if (useWrapWord) {\n return wrapWord(value, columnWidth).length;\n }\n\n return _.ceil(stringWidth(value) / columnWidth);\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["calculateCellHeight.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA;;;;AACA;;;;;;;;;;;;;kBAQe,UAAC,KAAD,EAAQ,WAAR,EAA6C;AAAA,QAAxB,WAAwB,yDAAV,KAAU;;AACxD,QAAI,CAAC,wBAAW,KAAX,CAAL,EAAwB;AACpB,cAAM,IAAI,KAAJ,CAAU,yBAAV,CAAN;AACH;;AAED,QAAI,CAAC,yBAAY,WAAZ,CAAL,EAA+B;AAC3B,cAAM,IAAI,KAAJ,CAAU,kCAAV,CAAN;AACH;;AAED,QAAI,cAAc,CAAlB,EAAqB;AACjB,cAAM,IAAI,KAAJ,CAAU,sCAAV,CAAN;AACH;;AAED,QAAI,WAAJ,EAAiB;AACb,eAAO,wBAAS,KAAT,EAAgB,WAAhB,EAA6B,MAApC;AACH;;AAED,WAAO,oBAAO,2BAAY,KAAZ,IAAqB,WAA5B,CAAP;AACH,C","file":"calculateCellHeight.js","sourcesContent":["import _ from 'lodash';\nimport stringWidth from 'string-width';\nimport wrapWord from './wrapWord';\n\n/**\n * @param {string} value\n * @param {number} columnWidth\n * @param {boolean} useWrapWord\n * @returns {number}\n */\nexport default (value, columnWidth, useWrapWord = false) => {\n if (!_.isString(value)) {\n throw new Error('Value must be a string.');\n }\n\n if (!_.isInteger(columnWidth)) {\n throw new Error('Column width must be an integer.');\n }\n\n if (columnWidth < 1) {\n throw new Error('Column width must be greater than 0.');\n }\n\n if (useWrapWord) {\n return wrapWord(value, columnWidth).length;\n }\n\n return _.ceil(stringWidth(value) / columnWidth);\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/calculateCellWidthIndex.js b/tools/eslint/node_modules/table/dist/calculateCellWidthIndex.js
index ceb756ba1e..bc6c0a3077 100644
--- a/tools/eslint/node_modules/table/dist/calculateCellWidthIndex.js
+++ b/tools/eslint/node_modules/table/dist/calculateCellWidthIndex.js
@@ -1,12 +1,12 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _map2 = require('lodash/map');
+var _lodash = require('lodash');
-var _map3 = _interopRequireDefault(_map2);
+var _lodash2 = _interopRequireDefault(_lodash);
var _stringWidth = require('string-width');
@@ -18,14 +18,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* Calculates width of each cell contents.
*
* @param {string[]} cells
- * @return {number[]}
+ * @returns {number[]}
*/
-
-exports.default = function (cells) {
- return (0, _map3.default)(cells, function (value) {
- return (0, _stringWidth2.default)(value);
- });
+exports.default = cells => {
+ return _lodash2.default.map(cells, value => {
+ return (0, _stringWidth2.default)(value);
+ });
};
-module.exports = exports['default'];
-//# sourceMappingURL=calculateCellWidthIndex.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/calculateCellWidthIndex.js.map b/tools/eslint/node_modules/table/dist/calculateCellWidthIndex.js.map
index a3c2eeb870..112a04e8ee 100644
--- a/tools/eslint/node_modules/table/dist/calculateCellWidthIndex.js.map
+++ b/tools/eslint/node_modules/table/dist/calculateCellWidthIndex.js.map
@@ -1 +1 @@
-{"version":3,"sources":["calculateCellWidthIndex.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;kBASe,UAAC,KAAK,EAAK;AACtB,WAAO,mBAAM,KAAK,EAAE,UAAC,KAAK,EAAK;AAC3B,eAAO,2BAAY,KAAK,CAAC,CAAC;KAC7B,CAAC,CAAC;CACN","file":"calculateCellWidthIndex.js","sourcesContent":["import _ from 'lodash';\nimport stringWidth from 'string-width';\n\n/**\n * Calculates width of each cell contents.\n *\n * @param {string[]} cells\n * @return {number[]}\n */\nexport default (cells) => {\n return _.map(cells, (value) => {\n return stringWidth(value);\n });\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["calculateCellWidthIndex.js"],"names":[],"mappings":";;;;;;;;;;AACA;;;;;;;;;;;;;kBAQe,UAAC,KAAD,EAAW;AACtB,WAAO,mBAAM,KAAN,EAAa,UAAC,KAAD,EAAW;AAC3B,eAAO,2BAAY,KAAZ,CAAP;AACH,KAFM,CAAP;AAGH,C","file":"calculateCellWidthIndex.js","sourcesContent":["import _ from 'lodash';\nimport stringWidth from 'string-width';\n\n/**\n * Calculates width of each cell contents.\n *\n * @param {string[]} cells\n * @return {number[]}\n */\nexport default (cells) => {\n return _.map(cells, (value) => {\n return stringWidth(value);\n });\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/calculateMaximumColumnWidthIndex.js b/tools/eslint/node_modules/table/dist/calculateMaximumColumnWidthIndex.js
index 7e5d066d8d..062ca45f36 100644
--- a/tools/eslint/node_modules/table/dist/calculateMaximumColumnWidthIndex.js
+++ b/tools/eslint/node_modules/table/dist/calculateMaximumColumnWidthIndex.js
@@ -1,16 +1,12 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _forEach2 = require('lodash/forEach');
+var _lodash = require('lodash');
-var _forEach3 = _interopRequireDefault(_forEach2);
-
-var _fill2 = require('lodash/fill');
-
-var _fill3 = _interopRequireDefault(_fill2);
+var _lodash2 = _interopRequireDefault(_lodash);
var _calculateCellWidthIndex = require('./calculateCellWidthIndex');
@@ -22,32 +18,26 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* Produces an array of values that describe the largest value length (width) in every column.
*
* @param {Array[]} rows
- * @return {number[]}
+ * @returns {number[]}
*/
+exports.default = rows => {
+ if (!rows[0]) {
+ throw new Error('Dataset must have at least one row.');
+ }
-exports.default = function (rows) {
- var columns = undefined;
-
- if (!rows[0]) {
- throw new Error('Dataset must have at least one row.');
- }
-
- columns = (0, _fill3.default)(Array(rows[0].length), 0);
-
- (0, _forEach3.default)(rows, function (row) {
- var columnWidthIndex = undefined;
+ const columns = _lodash2.default.fill(Array(rows[0].length), 0);
- columnWidthIndex = (0, _calculateCellWidthIndex2.default)(row);
+ _lodash2.default.forEach(rows, row => {
+ const columnWidthIndex = (0, _calculateCellWidthIndex2.default)(row);
- (0, _forEach3.default)(columnWidthIndex, function (valueWidth, index0) {
- if (columns[index0] < valueWidth) {
- columns[index0] = valueWidth;
- }
- });
+ _lodash2.default.forEach(columnWidthIndex, (valueWidth, index0) => {
+ if (columns[index0] < valueWidth) {
+ columns[index0] = valueWidth;
+ }
});
+ });
- return columns;
+ return columns;
};
-module.exports = exports['default'];
-//# sourceMappingURL=calculateMaximumColumnWidthIndex.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/calculateMaximumColumnWidthIndex.js.map b/tools/eslint/node_modules/table/dist/calculateMaximumColumnWidthIndex.js.map
index ecb2c20ab3..ea1e5e9ce4 100644
--- a/tools/eslint/node_modules/table/dist/calculateMaximumColumnWidthIndex.js.map
+++ b/tools/eslint/node_modules/table/dist/calculateMaximumColumnWidthIndex.js.map
@@ -1 +1 @@
-{"version":3,"sources":["calculateMaximumColumnWidthIndex.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;kBASe,UAAC,IAAI,EAAK;AACrB,QAAI,OAAO,YAAA,CAAC;;AAEZ,QAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;AACV,cAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KAC1D;;AAED,WAAO,GAAG,oBAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;;AAE3C,2BAAU,IAAI,EAAE,UAAC,GAAG,EAAK;AACrB,YAAI,gBAAgB,YAAA,CAAC;;AAErB,wBAAgB,GAAG,uCAAwB,GAAG,CAAC,CAAC;;AAEhD,+BAAU,gBAAgB,EAAE,UAAC,UAAU,EAAE,MAAM,EAAK;AAChD,gBAAI,OAAO,CAAC,MAAM,CAAC,GAAG,UAAU,EAAE;AAC9B,uBAAO,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC;aAChC;SACJ,CAAC,CAAC;KACN,CAAC,CAAC;;AAEH,WAAO,OAAO,CAAC;CAClB","file":"calculateMaximumColumnWidthIndex.js","sourcesContent":["import _ from 'lodash';\nimport calculateCellWidthIndex from './calculateCellWidthIndex';\n\n/**\n * Produces an array of values that describe the largest value length (width) in every column.\n *\n * @param {Array[]} rows\n * @return {number[]}\n */\nexport default (rows) => {\n let columns;\n\n if (!rows[0]) {\n throw new Error('Dataset must have at least one row.');\n }\n\n columns = _.fill(Array(rows[0].length), 0);\n\n _.forEach(rows, (row) => {\n let columnWidthIndex;\n\n columnWidthIndex = calculateCellWidthIndex(row);\n\n _.forEach(columnWidthIndex, (valueWidth, index0) => {\n if (columns[index0] < valueWidth) {\n columns[index0] = valueWidth;\n }\n });\n });\n\n return columns;\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["calculateMaximumColumnWidthIndex.js"],"names":[],"mappings":";;;;;;;;;;;;;;AACA;;;;;;;;;;;;;kBAQe,UAAC,IAAD,EAAU;AACrB,QAAI,gBAAJ;;AAEA,QAAI,CAAC,KAAK,CAAL,CAAL,EAAc;AACV,cAAM,IAAI,KAAJ,CAAU,qCAAV,CAAN;AACH;;AAED,cAAU,oBAAO,MAAM,KAAK,CAAL,EAAQ,MAAd,CAAP,EAA8B,CAA9B,CAAV;;AAEA,2BAAU,IAAV,EAAgB,UAAC,GAAD,EAAS;AACrB,YAAI,yBAAJ;;AAEA,2BAAmB,uCAAwB,GAAxB,CAAnB;;AAEA,+BAAU,gBAAV,EAA4B,UAAC,UAAD,EAAa,MAAb,EAAwB;AAChD,gBAAI,QAAQ,MAAR,IAAkB,UAAtB,EAAkC;AAC9B,wBAAQ,MAAR,IAAkB,UAAlB;AACH;AACJ,SAJD;AAKH,KAVD;;AAYA,WAAO,OAAP;AACH,C","file":"calculateMaximumColumnWidthIndex.js","sourcesContent":["import _ from 'lodash';\nimport calculateCellWidthIndex from './calculateCellWidthIndex';\n\n/**\n * Produces an array of values that describe the largest value length (width) in every column.\n *\n * @param {Array[]} rows\n * @return {number[]}\n */\nexport default (rows) => {\n let columns;\n\n if (!rows[0]) {\n throw new Error('Dataset must have at least one row.');\n }\n\n columns = _.fill(Array(rows[0].length), 0);\n\n _.forEach(rows, (row) => {\n let columnWidthIndex;\n\n columnWidthIndex = calculateCellWidthIndex(row);\n\n _.forEach(columnWidthIndex, (valueWidth, index0) => {\n if (columns[index0] < valueWidth) {\n columns[index0] = valueWidth;\n }\n });\n });\n\n return columns;\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/calculateRowHeightIndex.js b/tools/eslint/node_modules/table/dist/calculateRowHeightIndex.js
index e1db4ad419..b9eaf60e0c 100644
--- a/tools/eslint/node_modules/table/dist/calculateRowHeightIndex.js
+++ b/tools/eslint/node_modules/table/dist/calculateRowHeightIndex.js
@@ -1,28 +1,12 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _max2 = require('lodash/max');
+var _lodash = require('lodash');
-var _max3 = _interopRequireDefault(_max2);
-
-var _isBoolean2 = require('lodash/isBoolean');
-
-var _isBoolean3 = _interopRequireDefault(_isBoolean2);
-
-var _isNumber2 = require('lodash/isNumber');
-
-var _isNumber3 = _interopRequireDefault(_isNumber2);
-
-var _fill2 = require('lodash/fill');
-
-var _fill3 = _interopRequireDefault(_fill2);
-
-var _forEach2 = require('lodash/forEach');
-
-var _forEach3 = _interopRequireDefault(_forEach2);
+var _lodash2 = _interopRequireDefault(_lodash);
var _calculateCellHeight = require('./calculateCellHeight');
@@ -35,39 +19,32 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
*
* @param {Array[]} rows
* @param {Object} config
- * @return {number[]}
+ * @returns {number[]}
*/
+exports.default = (rows, config) => {
+ const tableWidth = rows[0].length;
-exports.default = function (rows, config) {
- var rowSpanIndex = undefined,
- tableWidth = undefined;
-
- tableWidth = rows[0].length;
-
- rowSpanIndex = [];
+ const rowSpanIndex = [];
- (0, _forEach3.default)(rows, function (cells) {
- var cellHeightIndex = undefined;
+ _lodash2.default.forEach(rows, cells => {
+ const cellHeightIndex = _lodash2.default.fill(Array(tableWidth), 1);
- cellHeightIndex = (0, _fill3.default)(Array(tableWidth), 1);
+ _lodash2.default.forEach(cells, (value, index1) => {
+ if (!_lodash2.default.isNumber(config.columns[index1].width)) {
+ throw new Error('column[index].width must be a number.');
+ }
- (0, _forEach3.default)(cells, function (value, index1) {
- if (!(0, _isNumber3.default)(config.columns[index1].width)) {
- throw new Error('column[index].width must be a number.');
- }
+ if (!_lodash2.default.isBoolean(config.columns[index1].wrapWord)) {
+ throw new Error('column[index].wrapWord must be a boolean.');
+ }
- if (!(0, _isBoolean3.default)(config.columns[index1].wrapWord)) {
- throw new Error('column[index].wrapWord must be a boolean.');
- }
-
- cellHeightIndex[index1] = (0, _calculateCellHeight2.default)(value, config.columns[index1].width, config.columns[index1].wrapWord);
- });
-
- rowSpanIndex.push((0, _max3.default)(cellHeightIndex));
+ cellHeightIndex[index1] = (0, _calculateCellHeight2.default)(value, config.columns[index1].width, config.columns[index1].wrapWord);
});
- return rowSpanIndex;
+ rowSpanIndex.push(_lodash2.default.max(cellHeightIndex));
+ });
+
+ return rowSpanIndex;
};
-module.exports = exports['default'];
-//# sourceMappingURL=calculateRowHeightIndex.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/calculateRowHeightIndex.js.map b/tools/eslint/node_modules/table/dist/calculateRowHeightIndex.js.map
index 4788b174ea..9816a50a9a 100644
--- a/tools/eslint/node_modules/table/dist/calculateRowHeightIndex.js.map
+++ b/tools/eslint/node_modules/table/dist/calculateRowHeightIndex.js.map
@@ -1 +1 @@
-{"version":3,"sources":["calculateRowHeightIndex.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAUe,UAAC,IAAI,EAAE,MAAM,EAAK;AAC7B,QAAI,YAAY,YAAA;QACZ,UAAU,YAAA,CAAC;;AAEf,cAAU,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;;AAE5B,gBAAY,GAAG,EAAE,CAAC;;AAElB,2BAAU,IAAI,EAAE,UAAC,KAAK,EAAK;AACvB,YAAI,eAAe,YAAA,CAAC;;AAEpB,uBAAe,GAAG,oBAAO,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;;AAE/C,+BAAU,KAAK,EAAE,UAAC,KAAK,EAAE,MAAM,EAAK;AAChC,gBAAI,CAAC,wBAAW,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,EAAE;AAC3C,sBAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;aAC5D;;AAED,gBAAI,CAAC,yBAAY,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EAAE;AAC/C,sBAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;aAChE;;AAED,2BAAe,CAAC,MAAM,CAAC,GAAG,mCAAoB,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;SACvH,CAAC,CAAC;;AAEH,oBAAY,CAAC,IAAI,CAAC,mBAAM,eAAe,CAAC,CAAC,CAAC;KAC7C,CAAC,CAAC;;AAEH,WAAO,YAAY,CAAC;CACvB","file":"calculateRowHeightIndex.js","sourcesContent":["import _ from 'lodash';\nimport calculateCellHeight from './calculateCellHeight';\n\n/**\n * Calculates the vertical row span index.\n *\n * @param {Array[]} rows\n * @param {Object} config\n * @return {number[]}\n */\nexport default (rows, config) => {\n let rowSpanIndex,\n tableWidth;\n\n tableWidth = rows[0].length;\n\n rowSpanIndex = [];\n\n _.forEach(rows, (cells) => {\n let cellHeightIndex;\n\n cellHeightIndex = _.fill(Array(tableWidth), 1);\n\n _.forEach(cells, (value, index1) => {\n if (!_.isNumber(config.columns[index1].width)) {\n throw new Error('column[index].width must be a number.');\n }\n\n if (!_.isBoolean(config.columns[index1].wrapWord)) {\n throw new Error('column[index].wrapWord must be a boolean.');\n }\n\n cellHeightIndex[index1] = calculateCellHeight(value, config.columns[index1].width, config.columns[index1].wrapWord);\n });\n\n rowSpanIndex.push(_.max(cellHeightIndex));\n });\n\n return rowSpanIndex;\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["calculateRowHeightIndex.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;;;;;;;;;;;;;kBASe,UAAC,IAAD,EAAO,MAAP,EAAkB;AAC7B,QAAI,qBAAJ;QACI,mBADJ;;AAGA,iBAAa,KAAK,CAAL,EAAQ,MAArB;;AAEA,mBAAe,EAAf;;AAEA,2BAAU,IAAV,EAAgB,UAAC,KAAD,EAAW;AACvB,YAAI,wBAAJ;;AAEA,0BAAkB,oBAAO,MAAM,UAAN,CAAP,EAA0B,CAA1B,CAAlB;;AAEA,+BAAU,KAAV,EAAiB,UAAC,KAAD,EAAQ,MAAR,EAAmB;AAChC,gBAAI,CAAC,wBAAW,OAAO,OAAP,CAAe,MAAf,EAAuB,KAAlC,CAAL,EAA+C;AAC3C,sBAAM,IAAI,KAAJ,CAAU,uCAAV,CAAN;AACH;;AAED,gBAAI,CAAC,yBAAY,OAAO,OAAP,CAAe,MAAf,EAAuB,QAAnC,CAAL,EAAmD;AAC/C,sBAAM,IAAI,KAAJ,CAAU,2CAAV,CAAN;AACH;;AAED,4BAAgB,MAAhB,IAA0B,mCAAoB,KAApB,EAA2B,OAAO,OAAP,CAAe,MAAf,EAAuB,KAAlD,EAAyD,OAAO,OAAP,CAAe,MAAf,EAAuB,QAAhF,CAA1B;AACH,SAVD;;AAYA,qBAAa,IAAb,CAAkB,mBAAM,eAAN,CAAlB;AACH,KAlBD;;AAoBA,WAAO,YAAP;AACH,C","file":"calculateRowHeightIndex.js","sourcesContent":["import _ from 'lodash';\nimport calculateCellHeight from './calculateCellHeight';\n\n/**\n * Calculates the vertical row span index.\n *\n * @param {Array[]} rows\n * @param {Object} config\n * @return {number[]}\n */\nexport default (rows, config) => {\n let rowSpanIndex,\n tableWidth;\n\n tableWidth = rows[0].length;\n\n rowSpanIndex = [];\n\n _.forEach(rows, (cells) => {\n let cellHeightIndex;\n\n cellHeightIndex = _.fill(Array(tableWidth), 1);\n\n _.forEach(cells, (value, index1) => {\n if (!_.isNumber(config.columns[index1].width)) {\n throw new Error('column[index].width must be a number.');\n }\n\n if (!_.isBoolean(config.columns[index1].wrapWord)) {\n throw new Error('column[index].wrapWord must be a boolean.');\n }\n\n cellHeightIndex[index1] = calculateCellHeight(value, config.columns[index1].width, config.columns[index1].wrapWord);\n });\n\n rowSpanIndex.push(_.max(cellHeightIndex));\n });\n\n return rowSpanIndex;\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/createStream.js b/tools/eslint/node_modules/table/dist/createStream.js
index 236944ec7c..1175ec6653 100644
--- a/tools/eslint/node_modules/table/dist/createStream.js
+++ b/tools/eslint/node_modules/table/dist/createStream.js
@@ -1,20 +1,12 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _mapValues2 = require('lodash/mapValues');
+var _lodash = require('lodash');
-var _mapValues3 = _interopRequireDefault(_mapValues2);
-
-var _trimEnd2 = require('lodash/trimEnd');
-
-var _trimEnd3 = _interopRequireDefault(_trimEnd2);
-
-var _map2 = require('lodash/map');
-
-var _map3 = _interopRequireDefault(_map2);
+var _lodash2 = _interopRequireDefault(_lodash);
var _makeStreamConfig = require('./makeStreamConfig');
@@ -52,35 +44,25 @@ var _calculateRowHeightIndex2 = _interopRequireDefault(_calculateRowHeightIndex)
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var append = undefined,
- create = undefined,
- prepareData = undefined;
-
/**
- * @param {string[]} row
- * @param {number[]} columnWidthIndex
+ * @param {Array} data
* @param {Object} config
- * @returns {undefined}
+ * @returns {Array}
*/
-create = function create(row, columnWidthIndex, config) {
- var body = undefined,
- output = undefined,
- rows = undefined;
+const prepareData = (data, config) => {
+ let rows;
- rows = prepareData([row], config);
+ rows = (0, _stringifyTableData2.default)(data);
- body = (0, _map3.default)(rows, function (literalRow) {
- return (0, _drawRow2.default)(literalRow, config.border);
- }).join('');
+ rows = (0, _truncateTableData2.default)(data, config);
- output = '';
- output += (0, _drawBorder.drawBorderTop)(columnWidthIndex, config.border);
- output += body;
- output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border);
+ const rowHeightIndex = (0, _calculateRowHeightIndex2.default)(rows, config);
- output = (0, _trimEnd3.default)(output);
+ rows = (0, _mapDataUsingRowHeightIndex2.default)(rows, rowHeightIndex, config);
+ rows = (0, _alignTableData2.default)(rows, config);
+ rows = (0, _padTableData2.default)(rows, config);
- process.stdout.write(output);
+ return rows;
};
/**
@@ -89,91 +71,89 @@ create = function create(row, columnWidthIndex, config) {
* @param {Object} config
* @returns {undefined}
*/
-append = function append(row, columnWidthIndex, config) {
- var body = undefined,
- output = undefined,
- rows = undefined;
+const create = (row, columnWidthIndex, config) => {
+ const rows = prepareData([row], config);
- rows = prepareData([row], config);
+ const body = _lodash2.default.map(rows, literalRow => {
+ return (0, _drawRow2.default)(literalRow, config.border);
+ }).join('');
- // console.log('rows', rows);
+ let output;
- body = (0, _map3.default)(rows, function (literalRow) {
- return (0, _drawRow2.default)(literalRow, config.border);
- }).join('');
+ output = '';
- output = '\r\x1b[K';
- output += (0, _drawBorder.drawBorderJoin)(columnWidthIndex, config.border);
- output += body;
- output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border);
+ output += (0, _drawBorder.drawBorderTop)(columnWidthIndex, config.border);
+ output += body;
+ output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border);
- output = (0, _trimEnd3.default)(output);
+ output = _lodash2.default.trimEnd(output);
- process.stdout.write(output);
+ process.stdout.write(output);
};
/**
- * @param {Array} data
+ * @param {string[]} row
+ * @param {number[]} columnWidthIndex
* @param {Object} config
- * @returns {Array}
+ * @returns {undefined}
*/
-prepareData = function prepareData(data, config) {
- var rowHeightIndex = undefined,
- rows = undefined;
+const append = (row, columnWidthIndex, config) => {
+ const rows = prepareData([row], config);
- rows = (0, _stringifyTableData2.default)(data);
+ const body = _lodash2.default.map(rows, literalRow => {
+ return (0, _drawRow2.default)(literalRow, config.border);
+ }).join('');
- rows = (0, _truncateTableData2.default)(data, config);
+ let output;
- rowHeightIndex = (0, _calculateRowHeightIndex2.default)(rows, config);
+ output = '\r\x1b[K';
- rows = (0, _mapDataUsingRowHeightIndex2.default)(rows, rowHeightIndex, config);
- rows = (0, _alignTableData2.default)(rows, config);
- rows = (0, _padTableData2.default)(rows, config);
+ output += (0, _drawBorder.drawBorderJoin)(columnWidthIndex, config.border);
+ output += body;
+ output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border);
- return rows;
+ output = _lodash2.default.trimEnd(output);
+
+ process.stdout.write(output);
};
/**
* @param {Object} userConfig
- * @return {Object}
+ * @returns {Object}
*/
exports.default = function () {
- var userConfig = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
-
- var columnWidthIndex = undefined,
- config = undefined,
- empty = undefined;
-
- config = (0, _makeStreamConfig2.default)(userConfig);
-
- columnWidthIndex = (0, _mapValues3.default)(config.columns, function (column) {
- return column.width + column.paddingLeft + column.paddingRight;
- });
-
- empty = true;
-
- return {
- /**
- * @param {string[]} row
- * @returns {undefined}
- */
- write: function write(row) {
- if (row.length !== config.columnCount) {
- throw new Error('Row cell count does not match the config.columnCount.');
- }
-
- if (empty) {
- empty = false;
-
- return create(row, columnWidthIndex, config);
- } else {
- return append(row, columnWidthIndex, config);
- }
- }
- };
+ let userConfig = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+
+ const config = (0, _makeStreamConfig2.default)(userConfig);
+
+ const columnWidthIndex = _lodash2.default.mapValues(config.columns, column => {
+ return column.width + column.paddingLeft + column.paddingRight;
+ });
+
+ let empty;
+
+ empty = true;
+
+ return {
+ /**
+ * @param {string[]} row
+ * @returns {undefined}
+ */
+ write: row => {
+ if (row.length !== config.columnCount) {
+ throw new Error('Row cell count does not match the config.columnCount.');
+ }
+
+ if (empty) {
+ empty = false;
+
+ return create(row, columnWidthIndex, config);
+ } else {
+ return append(row, columnWidthIndex, config);
+ }
+ }
+ };
};
-module.exports = exports['default'];
-//# sourceMappingURL=createStream.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/createStream.js.map b/tools/eslint/node_modules/table/dist/createStream.js.map
index bae4cce38f..b3a2563cda 100644
--- a/tools/eslint/node_modules/table/dist/createStream.js.map
+++ b/tools/eslint/node_modules/table/dist/createStream.js.map
@@ -1 +1 @@
-{"version":3,"sources":["createStream.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,IAAI,MAAM,YAAA;IACN,MAAM,YAAA;IACN,WAAW,YAAA;;;;;;;;AAAC,AAQhB,MAAM,GAAG,gBAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAK;AACxC,QAAI,IAAI,YAAA;QACJ,MAAM,YAAA;QACN,IAAI,YAAA,CAAC;;AAET,QAAI,GAAG,WAAW,CAAC,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;;AAElC,QAAI,GAAG,mBAAM,IAAI,EAAE,UAAC,UAAU,EAAK;AAC/B,eAAO,uBAAQ,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;KAC7C,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;;AAEZ,UAAM,GAAG,EAAE,CAAC;AACZ,UAAM,IAAI,gBAjCV,aAAa,EAiCW,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;AACzD,UAAM,IAAI,IAAI,CAAC;AACf,UAAM,IAAI,gBArCV,gBAAgB,EAqCW,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;;AAE5D,UAAM,GAAG,uBAAU,MAAM,CAAC,CAAC;;AAE3B,WAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CAChC;;;;;;;;AAAC,AAQF,MAAM,GAAG,gBAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAK;AACxC,QAAI,IAAI,YAAA;QACJ,MAAM,YAAA;QACN,IAAI,YAAA,CAAC;;AAET,QAAI,GAAG,WAAW,CAAC,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;;;;AAAC,AAIlC,QAAI,GAAG,mBAAM,IAAI,EAAE,UAAC,UAAU,EAAK;AAC/B,eAAO,uBAAQ,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;KAC7C,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;;AAEZ,UAAM,GAAG,UAAU,CAAC;AACpB,UAAM,IAAI,gBA/DV,cAAc,EA+DW,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;AAC1D,UAAM,IAAI,IAAI,CAAC;AACf,UAAM,IAAI,gBAlEV,gBAAgB,EAkEW,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;;AAE5D,UAAM,GAAG,uBAAU,MAAM,CAAC,CAAC;;AAE3B,WAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CAChC;;;;;;;AAAC,AAOF,WAAW,GAAG,qBAAC,IAAI,EAAE,MAAM,EAAK;AAC5B,QAAI,cAAc,YAAA;QACd,IAAI,YAAA,CAAC;;AAET,QAAI,GAAG,kCAAmB,IAAI,CAAC,CAAC;;AAEhC,QAAI,GAAG,iCAAkB,IAAI,EAAE,MAAM,CAAC,CAAC;;AAEvC,kBAAc,GAAG,uCAAwB,IAAI,EAAE,MAAM,CAAC,CAAC;;AAEvD,QAAI,GAAG,0CAA2B,IAAI,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;AAChE,QAAI,GAAG,8BAAe,IAAI,EAAE,MAAM,CAAC,CAAC;AACpC,QAAI,GAAG,4BAAa,IAAI,EAAE,MAAM,CAAC,CAAC;;AAElC,WAAO,IAAI,CAAC;CACf;;;;;;AAAC;kBAMa,YAAqB;QAApB,UAAU,yDAAG,EAAE;;AAC3B,QAAI,gBAAgB,YAAA;QAChB,MAAM,YAAA;QACN,KAAK,YAAA,CAAC;;AAEV,UAAM,GAAG,gCAAiB,UAAU,CAAC,CAAC;;AAEtC,oBAAgB,GAAG,yBAAY,MAAM,CAAC,OAAO,EAAE,UAAC,MAAM,EAAK;AACvD,eAAO,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,YAAY,CAAC;KAClE,CAAC,CAAC;;AAEH,SAAK,GAAG,IAAI,CAAC;;AAEb,WAAO;;;;;AAKH,aAAK,EAAE,eAAC,GAAG,EAAK;AACZ,gBAAI,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,WAAW,EAAE;AACnC,sBAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;aAC5E;;AAED,gBAAI,KAAK,EAAE;AACP,qBAAK,GAAG,KAAK,CAAC;;AAEd,uBAAO,MAAM,CAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;aAChD,MAAM;AACH,uBAAO,MAAM,CAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;aAChD;SACJ;KACJ,CAAC;CACL","file":"createStream.js","sourcesContent":["import makeStreamConfig from './makeStreamConfig';\nimport drawRow from './drawRow';\nimport {\n drawBorderBottom,\n drawBorderJoin,\n drawBorderTop\n} from './drawBorder';\nimport _ from 'lodash';\n\nimport stringifyTableData from './stringifyTableData';\nimport truncateTableData from './truncateTableData';\nimport mapDataUsingRowHeightIndex from './mapDataUsingRowHeightIndex';\nimport alignTableData from './alignTableData';\nimport padTableData from './padTableData';\nimport calculateRowHeightIndex from './calculateRowHeightIndex';\n\nlet append,\n create,\n prepareData;\n\n/**\n * @param {string[]} row\n * @param {number[]} columnWidthIndex\n * @param {Object} config\n * @returns {undefined}\n */\ncreate = (row, columnWidthIndex, config) => {\n let body,\n output,\n rows;\n\n rows = prepareData([row], config);\n\n body = _.map(rows, (literalRow) => {\n return drawRow(literalRow, config.border);\n }).join('');\n\n output = '';\n output += drawBorderTop(columnWidthIndex, config.border);\n output += body;\n output += drawBorderBottom(columnWidthIndex, config.border);\n\n output = _.trimEnd(output);\n\n process.stdout.write(output);\n};\n\n/**\n * @param {string[]} row\n * @param {number[]} columnWidthIndex\n * @param {Object} config\n * @returns {undefined}\n */\nappend = (row, columnWidthIndex, config) => {\n let body,\n output,\n rows;\n\n rows = prepareData([row], config);\n\n // console.log('rows', rows);\n\n body = _.map(rows, (literalRow) => {\n return drawRow(literalRow, config.border);\n }).join('');\n\n output = '\\r\\x1b[K';\n output += drawBorderJoin(columnWidthIndex, config.border);\n output += body;\n output += drawBorderBottom(columnWidthIndex, config.border);\n\n output = _.trimEnd(output);\n\n process.stdout.write(output);\n};\n\n/**\n * @param {Array} data\n * @param {Object} config\n * @returns {Array}\n */\nprepareData = (data, config) => {\n let rowHeightIndex,\n rows;\n\n rows = stringifyTableData(data);\n\n rows = truncateTableData(data, config);\n\n rowHeightIndex = calculateRowHeightIndex(rows, config);\n\n rows = mapDataUsingRowHeightIndex(rows, rowHeightIndex, config);\n rows = alignTableData(rows, config);\n rows = padTableData(rows, config);\n\n return rows;\n};\n\n/**\n * @param {Object} userConfig\n * @return {Object}\n */\nexport default (userConfig = {}) => {\n let columnWidthIndex,\n config,\n empty;\n\n config = makeStreamConfig(userConfig);\n\n columnWidthIndex = _.mapValues(config.columns, (column) => {\n return column.width + column.paddingLeft + column.paddingRight;\n });\n\n empty = true;\n\n return {\n /**\n * @param {string[]} row\n * @returns {undefined}\n */\n write: (row) => {\n if (row.length !== config.columnCount) {\n throw new Error('Row cell count does not match the config.columnCount.');\n }\n\n if (empty) {\n empty = false;\n\n return create(row, columnWidthIndex, config);\n } else {\n return append(row, columnWidthIndex, config);\n }\n }\n };\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["createStream.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;;;AACA;;AAOA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;;;AAEA,IAAI,eAAJ;IACI,eADJ;IAEI,oBAFJ;;;;;;;;AAUA,SAAS,gBAAC,GAAD,EAAM,gBAAN,EAAwB,MAAxB,EAAmC;AACxC,QAAI,aAAJ;QACI,eADJ;QAEI,aAFJ;;AAIA,WAAO,YAAY,CAAC,GAAD,CAAZ,EAAmB,MAAnB,CAAP;;AAEA,WAAO,mBAAM,IAAN,EAAY,UAAC,UAAD,EAAgB;AAC/B,eAAO,uBAAQ,UAAR,EAAoB,OAAO,MAA3B,CAAP;AACH,KAFM,EAEJ,IAFI,CAEC,EAFD,CAAP;;AAIA,aAAS,EAAT;AACA,cAAU,+BAAc,gBAAd,EAAgC,OAAO,MAAvC,CAAV;AACA,cAAU,IAAV;AACA,cAAU,kCAAiB,gBAAjB,EAAmC,OAAO,MAA1C,CAAV;;AAEA,aAAS,uBAAU,MAAV,CAAT;;AAEA,YAAQ,MAAR,CAAe,KAAf,CAAqB,MAArB;AACH,CAnBD;;;;;;;;AA2BA,SAAS,gBAAC,GAAD,EAAM,gBAAN,EAAwB,MAAxB,EAAmC;AACxC,QAAI,aAAJ;QACI,eADJ;QAEI,aAFJ;;AAIA,WAAO,YAAY,CAAC,GAAD,CAAZ,EAAmB,MAAnB,CAAP;;;;AAIA,WAAO,mBAAM,IAAN,EAAY,UAAC,UAAD,EAAgB;AAC/B,eAAO,uBAAQ,UAAR,EAAoB,OAAO,MAA3B,CAAP;AACH,KAFM,EAEJ,IAFI,CAEC,EAFD,CAAP;;AAIA,aAAS,UAAT;AACA,cAAU,gCAAe,gBAAf,EAAiC,OAAO,MAAxC,CAAV;AACA,cAAU,IAAV;AACA,cAAU,kCAAiB,gBAAjB,EAAmC,OAAO,MAA1C,CAAV;;AAEA,aAAS,uBAAU,MAAV,CAAT;;AAEA,YAAQ,MAAR,CAAe,KAAf,CAAqB,MAArB;AACH,CArBD;;;;;;;AA4BA,cAAc,qBAAC,IAAD,EAAO,MAAP,EAAkB;AAC5B,QAAI,uBAAJ;QACI,aADJ;;AAGA,WAAO,kCAAmB,IAAnB,CAAP;;AAEA,WAAO,iCAAkB,IAAlB,EAAwB,MAAxB,CAAP;;AAEA,qBAAiB,uCAAwB,IAAxB,EAA8B,MAA9B,CAAjB;;AAEA,WAAO,0CAA2B,IAA3B,EAAiC,cAAjC,EAAiD,MAAjD,CAAP;AACA,WAAO,8BAAe,IAAf,EAAqB,MAArB,CAAP;AACA,WAAO,4BAAa,IAAb,EAAmB,MAAnB,CAAP;;AAEA,WAAO,IAAP;AACH,CAfD;;;;;;;kBAqBe,YAAqB;AAAA,QAApB,UAAoB,yDAAP,EAAO;;AAChC,QAAI,yBAAJ;QACI,eADJ;QAEI,cAFJ;;AAIA,aAAS,gCAAiB,UAAjB,CAAT;;AAEA,uBAAmB,yBAAY,OAAO,OAAnB,EAA4B,UAAC,MAAD,EAAY;AACvD,eAAO,OAAO,KAAP,GAAe,OAAO,WAAtB,GAAoC,OAAO,YAAlD;AACH,KAFkB,CAAnB;;AAIA,YAAQ,IAAR;;AAEA,WAAO;;;;;AAKH,eAAO,eAAC,GAAD,EAAS;AACZ,gBAAI,IAAI,MAAJ,KAAe,OAAO,WAA1B,EAAuC;AACnC,sBAAM,IAAI,KAAJ,CAAU,uDAAV,CAAN;AACH;;AAED,gBAAI,KAAJ,EAAW;AACP,wBAAQ,KAAR;;AAEA,uBAAO,OAAO,GAAP,EAAY,gBAAZ,EAA8B,MAA9B,CAAP;AACH,aAJD,MAIO;AACH,uBAAO,OAAO,GAAP,EAAY,gBAAZ,EAA8B,MAA9B,CAAP;AACH;AACJ;AAjBE,KAAP;AAmBH,C","file":"createStream.js","sourcesContent":["import makeStreamConfig from './makeStreamConfig';\nimport drawRow from './drawRow';\nimport {\n drawBorderBottom,\n drawBorderJoin,\n drawBorderTop\n} from './drawBorder';\nimport _ from 'lodash';\n\nimport stringifyTableData from './stringifyTableData';\nimport truncateTableData from './truncateTableData';\nimport mapDataUsingRowHeightIndex from './mapDataUsingRowHeightIndex';\nimport alignTableData from './alignTableData';\nimport padTableData from './padTableData';\nimport calculateRowHeightIndex from './calculateRowHeightIndex';\n\nlet append,\n create,\n prepareData;\n\n/**\n * @param {string[]} row\n * @param {number[]} columnWidthIndex\n * @param {Object} config\n * @returns {undefined}\n */\ncreate = (row, columnWidthIndex, config) => {\n let body,\n output,\n rows;\n\n rows = prepareData([row], config);\n\n body = _.map(rows, (literalRow) => {\n return drawRow(literalRow, config.border);\n }).join('');\n\n output = '';\n output += drawBorderTop(columnWidthIndex, config.border);\n output += body;\n output += drawBorderBottom(columnWidthIndex, config.border);\n\n output = _.trimEnd(output);\n\n process.stdout.write(output);\n};\n\n/**\n * @param {string[]} row\n * @param {number[]} columnWidthIndex\n * @param {Object} config\n * @returns {undefined}\n */\nappend = (row, columnWidthIndex, config) => {\n let body,\n output,\n rows;\n\n rows = prepareData([row], config);\n\n // console.log('rows', rows);\n\n body = _.map(rows, (literalRow) => {\n return drawRow(literalRow, config.border);\n }).join('');\n\n output = '\\r\\x1b[K';\n output += drawBorderJoin(columnWidthIndex, config.border);\n output += body;\n output += drawBorderBottom(columnWidthIndex, config.border);\n\n output = _.trimEnd(output);\n\n process.stdout.write(output);\n};\n\n/**\n * @param {Array} data\n * @param {Object} config\n * @returns {Array}\n */\nprepareData = (data, config) => {\n let rowHeightIndex,\n rows;\n\n rows = stringifyTableData(data);\n\n rows = truncateTableData(data, config);\n\n rowHeightIndex = calculateRowHeightIndex(rows, config);\n\n rows = mapDataUsingRowHeightIndex(rows, rowHeightIndex, config);\n rows = alignTableData(rows, config);\n rows = padTableData(rows, config);\n\n return rows;\n};\n\n/**\n * @param {Object} userConfig\n * @return {Object}\n */\nexport default (userConfig = {}) => {\n let columnWidthIndex,\n config,\n empty;\n\n config = makeStreamConfig(userConfig);\n\n columnWidthIndex = _.mapValues(config.columns, (column) => {\n return column.width + column.paddingLeft + column.paddingRight;\n });\n\n empty = true;\n\n return {\n /**\n * @param {string[]} row\n * @returns {undefined}\n */\n write: (row) => {\n if (row.length !== config.columnCount) {\n throw new Error('Row cell count does not match the config.columnCount.');\n }\n\n if (empty) {\n empty = false;\n\n return create(row, columnWidthIndex, config);\n } else {\n return append(row, columnWidthIndex, config);\n }\n }\n };\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/drawBorder.js b/tools/eslint/node_modules/table/dist/drawBorder.js
index dfb0488d01..aeb2b719fe 100644
--- a/tools/eslint/node_modules/table/dist/drawBorder.js
+++ b/tools/eslint/node_modules/table/dist/drawBorder.js
@@ -1,25 +1,16 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-exports.drawBorderBottom = exports.drawBorderJoin = exports.drawBorderTop = exports.drawBorder = undefined;
+exports.drawBorderTop = exports.drawBorderJoin = exports.drawBorderBottom = exports.drawBorder = undefined;
-var _repeat2 = require('lodash/repeat');
+var _lodash = require('lodash');
-var _repeat3 = _interopRequireDefault(_repeat2);
-
-var _map2 = require('lodash/map');
-
-var _map3 = _interopRequireDefault(_map2);
+var _lodash2 = _interopRequireDefault(_lodash);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var drawBorder = undefined,
- drawBorderBottom = undefined,
- drawBorderJoin = undefined,
- drawBorderTop = undefined;
-
/**
* @typedef drawBorder~parts
* @property {string} left
@@ -33,16 +24,12 @@ var drawBorder = undefined,
* @param {drawBorder~parts} parts
* @returns {string}
*/
-exports.drawBorder = drawBorder = function drawBorder(columnSizeIndex, parts) {
- var columns = undefined;
-
- columns = (0, _map3.default)(columnSizeIndex, function (size) {
- return (0, _repeat3.default)(parts.body, size);
- });
+const drawBorder = (columnSizeIndex, parts) => {
+ const columns = _lodash2.default.map(columnSizeIndex, size => {
+ return _lodash2.default.repeat(parts.body, size);
+ }).join(parts.join);
- columns = columns.join(parts.join);
-
- return parts.left + columns + parts.right + '\n';
+ return parts.left + columns + parts.right + '\n';
};
/**
@@ -56,15 +43,15 @@ exports.drawBorder = drawBorder = function drawBorder(columnSizeIndex, parts) {
/**
* @param {number[]} columnSizeIndex
* @param {drawBorderTop~parts} parts
- * @return {string}
+ * @returns {string}
*/
-exports.drawBorderTop = drawBorderTop = function drawBorderTop(columnSizeIndex, parts) {
- return drawBorder(columnSizeIndex, {
- left: parts.topLeft,
- right: parts.topRight,
- body: parts.topBody,
- join: parts.topJoin
- });
+const drawBorderTop = (columnSizeIndex, parts) => {
+ return drawBorder(columnSizeIndex, {
+ body: parts.topBody,
+ join: parts.topJoin,
+ left: parts.topLeft,
+ right: parts.topRight
+ });
};
/**
@@ -80,13 +67,13 @@ exports.drawBorderTop = drawBorderTop = function drawBorderTop(columnSizeIndex,
* @param {drawBorderJoin~parts} parts
* @returns {string}
*/
-exports.drawBorderJoin = drawBorderJoin = function drawBorderJoin(columnSizeIndex, parts) {
- return drawBorder(columnSizeIndex, {
- left: parts.joinLeft,
- right: parts.joinRight,
- body: parts.joinBody,
- join: parts.joinJoin
- });
+const drawBorderJoin = (columnSizeIndex, parts) => {
+ return drawBorder(columnSizeIndex, {
+ body: parts.joinBody,
+ join: parts.joinJoin,
+ left: parts.joinLeft,
+ right: parts.joinRight
+ });
};
/**
@@ -102,17 +89,16 @@ exports.drawBorderJoin = drawBorderJoin = function drawBorderJoin(columnSizeInde
* @param {drawBorderBottom~parts} parts
* @returns {string}
*/
-exports.drawBorderBottom = drawBorderBottom = function drawBorderBottom(columnSizeIndex, parts) {
- return drawBorder(columnSizeIndex, {
- left: parts.bottomLeft,
- right: parts.bottomRight,
- body: parts.bottomBody,
- join: parts.bottomJoin
- });
+const drawBorderBottom = (columnSizeIndex, parts) => {
+ return drawBorder(columnSizeIndex, {
+ body: parts.bottomBody,
+ join: parts.bottomJoin,
+ left: parts.bottomLeft,
+ right: parts.bottomRight
+ });
};
exports.drawBorder = drawBorder;
-exports.drawBorderTop = drawBorderTop;
-exports.drawBorderJoin = drawBorderJoin;
exports.drawBorderBottom = drawBorderBottom;
-//# sourceMappingURL=drawBorder.js.map
+exports.drawBorderJoin = drawBorderJoin;
+exports.drawBorderTop = drawBorderTop; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/drawBorder.js.map b/tools/eslint/node_modules/table/dist/drawBorder.js.map
index 1dd7b2024a..adbf9d7403 100644
--- a/tools/eslint/node_modules/table/dist/drawBorder.js.map
+++ b/tools/eslint/node_modules/table/dist/drawBorder.js.map
@@ -1 +1 @@
-{"version":3,"sources":["drawBorder.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,IAAI,UAAU,YAAA;IACV,gBAAgB,YAAA;IAChB,cAAc,YAAA;IACd,aAAa,YAAA;;;;;;;;;;;;;;;AAAC,AAelB,QA+EI,UAAU,GA/Ed,UAAU,GAAG,oBAAC,eAAe,EAAE,KAAK,EAAK;AACrC,QAAI,OAAO,YAAA,CAAC;;AAEZ,WAAO,GAAG,mBAAM,eAAe,EAAE,UAAC,IAAI,EAAK;AACvC,eAAO,sBAAS,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACrC,CAAC,CAAC;;AAEH,WAAO,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;;AAEnC,WAAO,KAAK,CAAC,IAAI,GAAG,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;CACpD;;;;;;;;;;;;;;;AAAC,AAeF,QAuDI,aAAa,GAvDjB,aAAa,GAAG,uBAAC,eAAe,EAAE,KAAK,EAAK;AACxC,WAAO,UAAU,CAAC,eAAe,EAAE;AAC/B,YAAI,EAAE,KAAK,CAAC,OAAO;AACnB,aAAK,EAAE,KAAK,CAAC,QAAQ;AACrB,YAAI,EAAE,KAAK,CAAC,OAAO;AACnB,YAAI,EAAE,KAAK,CAAC,OAAO;KACtB,CAAC,CAAC;CACN;;;;;;;;;;;;;;;AAAC,AAeF,QAkCI,cAAc,GAlClB,cAAc,GAAG,wBAAC,eAAe,EAAE,KAAK,EAAK;AACzC,WAAO,UAAU,CAAC,eAAe,EAAE;AAC/B,YAAI,EAAE,KAAK,CAAC,QAAQ;AACpB,aAAK,EAAE,KAAK,CAAC,SAAS;AACtB,YAAI,EAAE,KAAK,CAAC,QAAQ;AACpB,YAAI,EAAE,KAAK,CAAC,QAAQ;KACvB,CAAC,CAAC;CACN;;;;;;;;;;;;;;;AAAC,AAeF,QAaI,gBAAgB,GAbpB,gBAAgB,GAAG,0BAAC,eAAe,EAAE,KAAK,EAAK;AAC3C,WAAO,UAAU,CAAC,eAAe,EAAE;AAC/B,YAAI,EAAE,KAAK,CAAC,UAAU;AACtB,aAAK,EAAE,KAAK,CAAC,WAAW;AACxB,YAAI,EAAE,KAAK,CAAC,UAAU;AACtB,YAAI,EAAE,KAAK,CAAC,UAAU;KACzB,CAAC,CAAC;CACN,CAAC;;QAGE,UAAU,GAAV,UAAU;QACV,aAAa,GAAb,aAAa;QACb,cAAc,GAAd,cAAc;QACd,gBAAgB,GAAhB,gBAAgB","file":"drawBorder.js","sourcesContent":["import _ from 'lodash';\n\nlet drawBorder,\n drawBorderBottom,\n drawBorderJoin,\n drawBorderTop;\n\n/**\n * @typedef drawBorder~parts\n * @property {string} left\n * @property {string} right\n * @property {string} body\n * @property {string} join\n */\n\n/**\n * @param {number[]} columnSizeIndex\n * @param {drawBorder~parts} parts\n * @returns {string}\n */\ndrawBorder = (columnSizeIndex, parts) => {\n let columns;\n\n columns = _.map(columnSizeIndex, (size) => {\n return _.repeat(parts.body, size);\n });\n\n columns = columns.join(parts.join);\n\n return parts.left + columns + parts.right + '\\n';\n};\n\n/**\n * @typedef drawBorderTop~parts\n * @property {string} topLeft\n * @property {string} topRight\n * @property {string} topBody\n * @property {string} topJoin\n */\n\n/**\n * @param {number[]} columnSizeIndex\n * @param {drawBorderTop~parts} parts\n * @return {string}\n */\ndrawBorderTop = (columnSizeIndex, parts) => {\n return drawBorder(columnSizeIndex, {\n left: parts.topLeft,\n right: parts.topRight,\n body: parts.topBody,\n join: parts.topJoin\n });\n};\n\n/**\n * @typedef drawBorderJoin~parts\n * @property {string} joinLeft\n * @property {string} joinRight\n * @property {string} joinBody\n * @property {string} joinJoin\n */\n\n/**\n * @param {number[]} columnSizeIndex\n * @param {drawBorderJoin~parts} parts\n * @returns {string}\n */\ndrawBorderJoin = (columnSizeIndex, parts) => {\n return drawBorder(columnSizeIndex, {\n left: parts.joinLeft,\n right: parts.joinRight,\n body: parts.joinBody,\n join: parts.joinJoin\n });\n};\n\n/**\n * @typedef drawBorderBottom~parts\n * @property {string} topLeft\n * @property {string} topRight\n * @property {string} topBody\n * @property {string} topJoin\n */\n\n/**\n * @param {number[]} columnSizeIndex\n * @param {drawBorderBottom~parts} parts\n * @returns {string}\n */\ndrawBorderBottom = (columnSizeIndex, parts) => {\n return drawBorder(columnSizeIndex, {\n left: parts.bottomLeft,\n right: parts.bottomRight,\n body: parts.bottomBody,\n join: parts.bottomJoin\n });\n};\n\nexport {\n drawBorder,\n drawBorderTop,\n drawBorderJoin,\n drawBorderBottom\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["drawBorder.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,IAAI,mBAAJ;IACI,yBADJ;IAEI,uBAFJ;IAGI,sBAHJ;;;;;;;;;;;;;;;AAkBA,QA+EI,UA/EJ,gBAAa,oBAAC,eAAD,EAAkB,KAAlB,EAA4B;AACrC,QAAI,gBAAJ;;AAEA,cAAU,mBAAM,eAAN,EAAuB,UAAC,IAAD,EAAU;AACvC,eAAO,sBAAS,MAAM,IAAf,EAAqB,IAArB,CAAP;AACH,KAFS,CAAV;;AAIA,cAAU,QAAQ,IAAR,CAAa,MAAM,IAAnB,CAAV;;AAEA,WAAO,MAAM,IAAN,GAAa,OAAb,GAAuB,MAAM,KAA7B,GAAqC,IAA5C;AACH,CAVD;;;;;;;;;;;;;;;AAyBA,QAuDI,aAvDJ,mBAAgB,uBAAC,eAAD,EAAkB,KAAlB,EAA4B;AACxC,WAAO,WAAW,eAAX,EAA4B;AAC/B,cAAM,MAAM,OADmB;AAE/B,eAAO,MAAM,QAFkB;AAG/B,cAAM,MAAM,OAHmB;AAI/B,cAAM,MAAM;AAJmB,KAA5B,CAAP;AAMH,CAPD;;;;;;;;;;;;;;;AAsBA,QAkCI,cAlCJ,oBAAiB,wBAAC,eAAD,EAAkB,KAAlB,EAA4B;AACzC,WAAO,WAAW,eAAX,EAA4B;AAC/B,cAAM,MAAM,QADmB;AAE/B,eAAO,MAAM,SAFkB;AAG/B,cAAM,MAAM,QAHmB;AAI/B,cAAM,MAAM;AAJmB,KAA5B,CAAP;AAMH,CAPD;;;;;;;;;;;;;;;AAsBA,QAaI,gBAbJ,sBAAmB,0BAAC,eAAD,EAAkB,KAAlB,EAA4B;AAC3C,WAAO,WAAW,eAAX,EAA4B;AAC/B,cAAM,MAAM,UADmB;AAE/B,eAAO,MAAM,WAFkB;AAG/B,cAAM,MAAM,UAHmB;AAI/B,cAAM,MAAM;AAJmB,KAA5B,CAAP;AAMH,CAPD;;QAUI,U,GAAA,U;QACA,a,GAAA,a;QACA,c,GAAA,c;QACA,gB,GAAA,gB","file":"drawBorder.js","sourcesContent":["import _ from 'lodash';\n\nlet drawBorder,\n drawBorderBottom,\n drawBorderJoin,\n drawBorderTop;\n\n/**\n * @typedef drawBorder~parts\n * @property {string} left\n * @property {string} right\n * @property {string} body\n * @property {string} join\n */\n\n/**\n * @param {number[]} columnSizeIndex\n * @param {drawBorder~parts} parts\n * @returns {string}\n */\ndrawBorder = (columnSizeIndex, parts) => {\n let columns;\n\n columns = _.map(columnSizeIndex, (size) => {\n return _.repeat(parts.body, size);\n });\n\n columns = columns.join(parts.join);\n\n return parts.left + columns + parts.right + '\\n';\n};\n\n/**\n * @typedef drawBorderTop~parts\n * @property {string} topLeft\n * @property {string} topRight\n * @property {string} topBody\n * @property {string} topJoin\n */\n\n/**\n * @param {number[]} columnSizeIndex\n * @param {drawBorderTop~parts} parts\n * @return {string}\n */\ndrawBorderTop = (columnSizeIndex, parts) => {\n return drawBorder(columnSizeIndex, {\n left: parts.topLeft,\n right: parts.topRight,\n body: parts.topBody,\n join: parts.topJoin\n });\n};\n\n/**\n * @typedef drawBorderJoin~parts\n * @property {string} joinLeft\n * @property {string} joinRight\n * @property {string} joinBody\n * @property {string} joinJoin\n */\n\n/**\n * @param {number[]} columnSizeIndex\n * @param {drawBorderJoin~parts} parts\n * @returns {string}\n */\ndrawBorderJoin = (columnSizeIndex, parts) => {\n return drawBorder(columnSizeIndex, {\n left: parts.joinLeft,\n right: parts.joinRight,\n body: parts.joinBody,\n join: parts.joinJoin\n });\n};\n\n/**\n * @typedef drawBorderBottom~parts\n * @property {string} topLeft\n * @property {string} topRight\n * @property {string} topBody\n * @property {string} topJoin\n */\n\n/**\n * @param {number[]} columnSizeIndex\n * @param {drawBorderBottom~parts} parts\n * @returns {string}\n */\ndrawBorderBottom = (columnSizeIndex, parts) => {\n return drawBorder(columnSizeIndex, {\n left: parts.bottomLeft,\n right: parts.bottomRight,\n body: parts.bottomBody,\n join: parts.bottomJoin\n });\n};\n\nexport {\n drawBorder,\n drawBorderTop,\n drawBorderJoin,\n drawBorderBottom\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/drawRow.js b/tools/eslint/node_modules/table/dist/drawRow.js
index b4036f507b..8e75bc2c3e 100644
--- a/tools/eslint/node_modules/table/dist/drawRow.js
+++ b/tools/eslint/node_modules/table/dist/drawRow.js
@@ -3,6 +3,7 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
+
/**
* @typedef {Object} drawRow~border
* @property {string} bodyLeft
@@ -13,12 +14,10 @@ Object.defineProperty(exports, "__esModule", {
/**
* @param {number[]} columns
* @param {drawRow~border} border
- * @return {string}
+ * @returns {string}
*/
-
-exports.default = function (columns, border) {
+exports.default = (columns, border) => {
return border.bodyLeft + columns.join(border.bodyJoin) + border.bodyRight + '\n';
};
-module.exports = exports['default'];
-//# sourceMappingURL=drawRow.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/drawRow.js.map b/tools/eslint/node_modules/table/dist/drawRow.js.map
index d3a5464c23..5cef8565f4 100644
--- a/tools/eslint/node_modules/table/dist/drawRow.js.map
+++ b/tools/eslint/node_modules/table/dist/drawRow.js.map
@@ -1 +1 @@
-{"version":3,"sources":["drawRow.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;kBAYe,UAAC,OAAO,EAAE,MAAM,EAAK;AAChC,SAAO,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;CACpF","file":"drawRow.js","sourcesContent":["/**\n * @typedef {Object} drawRow~border\n * @property {string} bodyLeft\n * @property {string} bodyRight\n * @property {string} bodyJoin\n */\n\n/**\n * @param {number[]} columns\n * @param {drawRow~border} border\n * @return {string}\n */\nexport default (columns, border) => {\n return border.bodyLeft + columns.join(border.bodyJoin) + border.bodyRight + '\\n';\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["drawRow.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;kBAYe,UAAC,OAAD,EAAU,MAAV,EAAqB;AAChC,SAAO,OAAO,QAAP,GAAkB,QAAQ,IAAR,CAAa,OAAO,QAApB,CAAlB,GAAkD,OAAO,SAAzD,GAAqE,IAA5E;AACH,C","file":"drawRow.js","sourcesContent":["/**\n * @typedef {Object} drawRow~border\n * @property {string} bodyLeft\n * @property {string} bodyRight\n * @property {string} bodyJoin\n */\n\n/**\n * @param {number[]} columns\n * @param {drawRow~border} border\n * @return {string}\n */\nexport default (columns, border) => {\n return border.bodyLeft + columns.join(border.bodyJoin) + border.bodyRight + '\\n';\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/drawTable.js b/tools/eslint/node_modules/table/dist/drawTable.js
index 242095042d..12b6a75ab8 100644
--- a/tools/eslint/node_modules/table/dist/drawTable.js
+++ b/tools/eslint/node_modules/table/dist/drawTable.js
@@ -1,12 +1,12 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _forEach2 = require('lodash/forEach');
+var _lodash = require('lodash');
-var _forEach3 = _interopRequireDefault(_forEach2);
+var _lodash2 = _interopRequireDefault(_lodash);
var _drawBorder = require('./drawBorder');
@@ -24,45 +24,40 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @param {Function} drawHorizontalLine
* @returns {string}
*/
+exports.default = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine) => {
+ let output, realRowIndex, rowHeight;
-exports.default = function (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine) {
- var output = undefined,
- realRowIndex = undefined,
- rowCount = undefined,
- rowHeight = undefined;
+ const rowCount = rows.length;
- rowCount = rows.length;
+ realRowIndex = 0;
- realRowIndex = 0;
+ output = '';
- output = '';
+ if (drawHorizontalLine(realRowIndex, rowCount)) {
+ output += (0, _drawBorder.drawBorderTop)(columnSizeIndex, border);
+ }
- if (drawHorizontalLine(realRowIndex, rowCount)) {
- output += (0, _drawBorder.drawBorderTop)(columnSizeIndex, border);
- }
-
- (0, _forEach3.default)(rows, function (row, index0) {
- output += (0, _drawRow2.default)(row, border);
-
- if (!rowHeight) {
- rowHeight = rowSpanIndex[realRowIndex];
+ _lodash2.default.forEach(rows, (row, index0) => {
+ output += (0, _drawRow2.default)(row, border);
- realRowIndex++;
- }
+ if (!rowHeight) {
+ rowHeight = rowSpanIndex[realRowIndex];
- rowHeight--;
+ realRowIndex++;
+ }
- if (rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) {
- output += (0, _drawBorder.drawBorderJoin)(columnSizeIndex, border);
- }
- });
+ rowHeight--;
- if (drawHorizontalLine(realRowIndex, rowCount)) {
- output += (0, _drawBorder.drawBorderBottom)(columnSizeIndex, border);
+ if (rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) {
+ output += (0, _drawBorder.drawBorderJoin)(columnSizeIndex, border);
}
+ });
+
+ if (drawHorizontalLine(realRowIndex, rowCount)) {
+ output += (0, _drawBorder.drawBorderBottom)(columnSizeIndex, border);
+ }
- return output;
+ return output;
};
-module.exports = exports['default'];
-//# sourceMappingURL=drawTable.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/drawTable.js.map b/tools/eslint/node_modules/table/dist/drawTable.js.map
index 705e822dc0..8534c44da3 100644
--- a/tools/eslint/node_modules/table/dist/drawTable.js.map
+++ b/tools/eslint/node_modules/table/dist/drawTable.js.map
@@ -1 +1 @@
-{"version":3,"sources":["drawTable.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgBe,UAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAK;AAChF,QAAI,MAAM,YAAA;QACN,YAAY,YAAA;QACZ,QAAQ,YAAA;QACR,SAAS,YAAA,CAAC;;AAEd,YAAQ,GAAG,IAAI,CAAC,MAAM,CAAC;;AAEvB,gBAAY,GAAG,CAAC,CAAC;;AAEjB,UAAM,GAAG,EAAE,CAAC;;AAEZ,QAAI,kBAAkB,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE;AAC5C,cAAM,IAAI,gBA3Bd,aAAa,EA2Be,eAAe,EAAE,MAAM,CAAC,CAAC;KACpD;;AAED,2BAAU,IAAI,EAAE,UAAC,GAAG,EAAE,MAAM,EAAK;AAC7B,cAAM,IAAI,uBAAQ,GAAG,EAAE,MAAM,CAAC,CAAC;;AAE/B,YAAI,CAAC,SAAS,EAAE;AACZ,qBAAS,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;;AAEvC,wBAAY,EAAE,CAAC;SAClB;;AAED,iBAAS,EAAE,CAAC;;AAEZ,YAAI,SAAS,KAAK,CAAC,IAAI,MAAM,KAAK,QAAQ,GAAG,CAAC,IAAI,kBAAkB,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE;AAC1F,kBAAM,IAAI,gBAzClB,cAAc,EAyCmB,eAAe,EAAE,MAAM,CAAC,CAAC;SACrD;KACJ,CAAC,CAAC;;AAEH,QAAI,kBAAkB,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE;AAC5C,cAAM,IAAI,gBA7Cd,gBAAgB,EA6Ce,eAAe,EAAE,MAAM,CAAC,CAAC;KACvD;;AAED,WAAO,MAAM,CAAC;CACjB","file":"drawTable.js","sourcesContent":["import _ from 'lodash';\nimport {\n drawBorderTop,\n drawBorderJoin,\n drawBorderBottom\n} from './drawBorder';\nimport drawRow from './drawRow';\n\n/**\n * @param {Array} rows\n * @param {Object} border\n * @param {Array} columnSizeIndex\n * @param {Array} rowSpanIndex\n * @param {Function} drawHorizontalLine\n * @returns {string}\n */\nexport default (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine) => {\n let output,\n realRowIndex,\n rowCount,\n rowHeight;\n\n rowCount = rows.length;\n\n realRowIndex = 0;\n\n output = '';\n\n if (drawHorizontalLine(realRowIndex, rowCount)) {\n output += drawBorderTop(columnSizeIndex, border);\n }\n\n _.forEach(rows, (row, index0) => {\n output += drawRow(row, border);\n\n if (!rowHeight) {\n rowHeight = rowSpanIndex[realRowIndex];\n\n realRowIndex++;\n }\n\n rowHeight--;\n\n if (rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) {\n output += drawBorderJoin(columnSizeIndex, border);\n }\n });\n\n if (drawHorizontalLine(realRowIndex, rowCount)) {\n output += drawBorderBottom(columnSizeIndex, border);\n }\n\n return output;\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["drawTable.js"],"names":[],"mappings":";;;;;;;;;;AACA;;AAKA;;;;;;;;;;;;;;;kBAUe,UAAC,IAAD,EAAO,MAAP,EAAe,eAAf,EAAgC,YAAhC,EAA8C,kBAA9C,EAAqE;AAChF,QAAI,eAAJ;QACI,qBADJ;QAEI,iBAFJ;QAGI,kBAHJ;;AAKA,eAAW,KAAK,MAAhB;;AAEA,mBAAe,CAAf;;AAEA,aAAS,EAAT;;AAEA,QAAI,mBAAmB,YAAnB,EAAiC,QAAjC,CAAJ,EAAgD;AAC5C,kBAAU,+BAAc,eAAd,EAA+B,MAA/B,CAAV;AACH;;AAED,2BAAU,IAAV,EAAgB,UAAC,GAAD,EAAM,MAAN,EAAiB;AAC7B,kBAAU,uBAAQ,GAAR,EAAa,MAAb,CAAV;;AAEA,YAAI,CAAC,SAAL,EAAgB;AACZ,wBAAY,aAAa,YAAb,CAAZ;;AAEA;AACH;;AAED;;AAEA,YAAI,cAAc,CAAd,IAAmB,WAAW,WAAW,CAAzC,IAA8C,mBAAmB,YAAnB,EAAiC,QAAjC,CAAlD,EAA8F;AAC1F,sBAAU,gCAAe,eAAf,EAAgC,MAAhC,CAAV;AACH;AACJ,KAdD;;AAgBA,QAAI,mBAAmB,YAAnB,EAAiC,QAAjC,CAAJ,EAAgD;AAC5C,kBAAU,kCAAiB,eAAjB,EAAkC,MAAlC,CAAV;AACH;;AAED,WAAO,MAAP;AACH,C","file":"drawTable.js","sourcesContent":["import _ from 'lodash';\nimport {\n drawBorderTop,\n drawBorderJoin,\n drawBorderBottom\n} from './drawBorder';\nimport drawRow from './drawRow';\n\n/**\n * @param {Array} rows\n * @param {Object} border\n * @param {Array} columnSizeIndex\n * @param {Array} rowSpanIndex\n * @param {Function} drawHorizontalLine\n * @returns {string}\n */\nexport default (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine) => {\n let output,\n realRowIndex,\n rowCount,\n rowHeight;\n\n rowCount = rows.length;\n\n realRowIndex = 0;\n\n output = '';\n\n if (drawHorizontalLine(realRowIndex, rowCount)) {\n output += drawBorderTop(columnSizeIndex, border);\n }\n\n _.forEach(rows, (row, index0) => {\n output += drawRow(row, border);\n\n if (!rowHeight) {\n rowHeight = rowSpanIndex[realRowIndex];\n\n realRowIndex++;\n }\n\n rowHeight--;\n\n if (rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) {\n output += drawBorderJoin(columnSizeIndex, border);\n }\n });\n\n if (drawHorizontalLine(realRowIndex, rowCount)) {\n output += drawBorderBottom(columnSizeIndex, border);\n }\n\n return output;\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/getBorderCharacters.js b/tools/eslint/node_modules/table/dist/getBorderCharacters.js
index 0fc3f7eeb6..21f4eb13a3 100644
--- a/tools/eslint/node_modules/table/dist/getBorderCharacters.js
+++ b/tools/eslint/node_modules/table/dist/getBorderCharacters.js
@@ -1,9 +1,10 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-/* eslint-disable sorting/sort-object-props */
+
+/* eslint-disable sort-keys */
/**
* @typedef border
@@ -28,102 +29,100 @@ Object.defineProperty(exports, "__esModule", {
* @param {string} name
* @returns {border}
*/
-
-exports.default = function (name) {
- if (name === 'honeywell') {
- return {
- topBody: '═',
- topJoin: '╤',
- topLeft: '╔',
- topRight: '╗',
-
- bottomBody: '═',
- bottomJoin: '╧',
- bottomLeft: '╚',
- bottomRight: '╝',
-
- bodyLeft: '║',
- bodyRight: '║',
- bodyJoin: '│',
-
- joinBody: '─',
- joinLeft: '╟',
- joinRight: '╢',
- joinJoin: '┼'
- };
- }
-
- if (name === 'norc') {
- return {
- topBody: '─',
- topJoin: '┬',
- topLeft: '┌',
- topRight: '┐',
-
- bottomBody: '─',
- bottomJoin: '┴',
- bottomLeft: '└',
- bottomRight: '┘',
-
- bodyLeft: '│',
- bodyRight: '│',
- bodyJoin: '│',
-
- joinBody: '─',
- joinLeft: '├',
- joinRight: '┤',
- joinJoin: '┼'
- };
- }
-
- if (name === 'ramac') {
- return {
- topBody: '-',
- topJoin: '+',
- topLeft: '+',
- topRight: '+',
-
- bottomBody: '-',
- bottomJoin: '+',
- bottomLeft: '+',
- bottomRight: '+',
-
- bodyLeft: '|',
- bodyRight: '|',
- bodyJoin: '|',
-
- joinBody: '-',
- joinLeft: '|',
- joinRight: '|',
- joinJoin: '|'
- };
- }
-
- if (name === 'void') {
- return {
- topBody: '',
- topJoin: '',
- topLeft: '',
- topRight: '',
-
- bottomBody: '',
- bottomJoin: '',
- bottomLeft: '',
- bottomRight: '',
-
- bodyLeft: '',
- bodyRight: '',
- bodyJoin: '',
-
- joinBody: '',
- joinLeft: '',
- joinRight: '',
- joinJoin: ''
- };
- }
-
- throw new Error('Unknown border template "${name}".');
+exports.default = name => {
+ if (name === 'honeywell') {
+ return {
+ topBody: '═',
+ topJoin: '╤',
+ topLeft: '╔',
+ topRight: '╗',
+
+ bottomBody: '═',
+ bottomJoin: '╧',
+ bottomLeft: '╚',
+ bottomRight: '╝',
+
+ bodyLeft: '║',
+ bodyRight: '║',
+ bodyJoin: '│',
+
+ joinBody: '─',
+ joinLeft: '╟',
+ joinRight: '╢',
+ joinJoin: '┼'
+ };
+ }
+
+ if (name === 'norc') {
+ return {
+ topBody: '─',
+ topJoin: '┬',
+ topLeft: '┌',
+ topRight: '┐',
+
+ bottomBody: '─',
+ bottomJoin: '┴',
+ bottomLeft: '└',
+ bottomRight: '┘',
+
+ bodyLeft: '│',
+ bodyRight: '│',
+ bodyJoin: '│',
+
+ joinBody: '─',
+ joinLeft: '├',
+ joinRight: '┤',
+ joinJoin: '┼'
+ };
+ }
+
+ if (name === 'ramac') {
+ return {
+ topBody: '-',
+ topJoin: '+',
+ topLeft: '+',
+ topRight: '+',
+
+ bottomBody: '-',
+ bottomJoin: '+',
+ bottomLeft: '+',
+ bottomRight: '+',
+
+ bodyLeft: '|',
+ bodyRight: '|',
+ bodyJoin: '|',
+
+ joinBody: '-',
+ joinLeft: '|',
+ joinRight: '|',
+ joinJoin: '|'
+ };
+ }
+
+ if (name === 'void') {
+ return {
+ topBody: '',
+ topJoin: '',
+ topLeft: '',
+ topRight: '',
+
+ bottomBody: '',
+ bottomJoin: '',
+ bottomLeft: '',
+ bottomRight: '',
+
+ bodyLeft: '',
+ bodyRight: '',
+ bodyJoin: '',
+
+ joinBody: '',
+ joinLeft: '',
+ joinRight: '',
+ joinJoin: ''
+ };
+ }
+
+ throw new Error('Unknown border template "' + name + '".');
};
-module.exports = exports['default'];
-//# sourceMappingURL=getBorderCharacters.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/getBorderCharacters.js.map b/tools/eslint/node_modules/table/dist/getBorderCharacters.js.map
index 3f0ae7cbef..36ba03bf8c 100644
--- a/tools/eslint/node_modules/table/dist/getBorderCharacters.js.map
+++ b/tools/eslint/node_modules/table/dist/getBorderCharacters.js.map
@@ -1 +1 @@
-{"version":3,"sources":["getBorderCharacters.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAyBe,UAAC,IAAI,EAAK;AACrB,QAAI,IAAI,KAAK,WAAW,EAAE;AACtB,eAAO;AACH,mBAAO,EAAE,GAAG;AACZ,mBAAO,EAAE,GAAG;AACZ,mBAAO,EAAE,GAAG;AACZ,oBAAQ,EAAE,GAAG;;AAEb,sBAAU,EAAE,GAAG;AACf,sBAAU,EAAE,GAAG;AACf,sBAAU,EAAE,GAAG;AACf,uBAAW,EAAE,GAAG;;AAEhB,oBAAQ,EAAE,GAAG;AACb,qBAAS,EAAE,GAAG;AACd,oBAAQ,EAAE,GAAG;;AAEb,oBAAQ,EAAE,GAAG;AACb,oBAAQ,EAAE,GAAG;AACb,qBAAS,EAAE,GAAG;AACd,oBAAQ,EAAE,GAAG;SAChB,CAAC;KACL;;AAED,QAAI,IAAI,KAAK,MAAM,EAAE;AACjB,eAAO;AACH,mBAAO,EAAE,GAAG;AACZ,mBAAO,EAAE,GAAG;AACZ,mBAAO,EAAE,GAAG;AACZ,oBAAQ,EAAE,GAAG;;AAEb,sBAAU,EAAE,GAAG;AACf,sBAAU,EAAE,GAAG;AACf,sBAAU,EAAE,GAAG;AACf,uBAAW,EAAE,GAAG;;AAEhB,oBAAQ,EAAE,GAAG;AACb,qBAAS,EAAE,GAAG;AACd,oBAAQ,EAAE,GAAG;;AAEb,oBAAQ,EAAE,GAAG;AACb,oBAAQ,EAAE,GAAG;AACb,qBAAS,EAAE,GAAG;AACd,oBAAQ,EAAE,GAAG;SAChB,CAAC;KACL;;AAED,QAAI,IAAI,KAAK,OAAO,EAAE;AAClB,eAAO;AACH,mBAAO,EAAE,GAAG;AACZ,mBAAO,EAAE,GAAG;AACZ,mBAAO,EAAE,GAAG;AACZ,oBAAQ,EAAE,GAAG;;AAEb,sBAAU,EAAE,GAAG;AACf,sBAAU,EAAE,GAAG;AACf,sBAAU,EAAE,GAAG;AACf,uBAAW,EAAE,GAAG;;AAEhB,oBAAQ,EAAE,GAAG;AACb,qBAAS,EAAE,GAAG;AACd,oBAAQ,EAAE,GAAG;;AAEb,oBAAQ,EAAE,GAAG;AACb,oBAAQ,EAAE,GAAG;AACb,qBAAS,EAAE,GAAG;AACd,oBAAQ,EAAE,GAAG;SAChB,CAAC;KACL;;AAED,QAAI,IAAI,KAAK,MAAM,EAAE;AACjB,eAAO;AACH,mBAAO,EAAE,EAAE;AACX,mBAAO,EAAE,EAAE;AACX,mBAAO,EAAE,EAAE;AACX,oBAAQ,EAAE,EAAE;;AAEZ,sBAAU,EAAE,EAAE;AACd,sBAAU,EAAE,EAAE;AACd,sBAAU,EAAE,EAAE;AACd,uBAAW,EAAE,EAAE;;AAEf,oBAAQ,EAAE,EAAE;AACZ,qBAAS,EAAE,EAAE;AACb,oBAAQ,EAAE,EAAE;;AAEZ,oBAAQ,EAAE,EAAE;AACZ,oBAAQ,EAAE,EAAE;AACZ,qBAAS,EAAE,EAAE;AACb,oBAAQ,EAAE,EAAE;SACf,CAAC;KACL;;AAED,UAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;CACzD","file":"getBorderCharacters.js","sourcesContent":["/* eslint-disable sorting/sort-object-props */\n\n/**\n * @typedef border\n * @property {string} topBody\n * @property {string} topJoin\n * @property {string} topLeft\n * @property {string} topRight\n * @property {string} bottomBody\n * @property {string} bottomJoin\n * @property {string} bottomLeft\n * @property {string} bottomRight\n * @property {string} bodyLeft\n * @property {string} bodyRight\n * @property {string} bodyJoin\n * @property {string} joinBody\n * @property {string} joinLeft\n * @property {string} joinRight\n * @property {string} joinJoin\n */\n\n/**\n * @param {string} name\n * @returns {border}\n */\nexport default (name) => {\n if (name === 'honeywell') {\n return {\n topBody: '═',\n topJoin: '╤',\n topLeft: '╔',\n topRight: '╗',\n\n bottomBody: '═',\n bottomJoin: '╧',\n bottomLeft: '╚',\n bottomRight: '╝',\n\n bodyLeft: '║',\n bodyRight: '║',\n bodyJoin: '│',\n\n joinBody: '─',\n joinLeft: '╟',\n joinRight: '╢',\n joinJoin: '┼'\n };\n }\n\n if (name === 'norc') {\n return {\n topBody: '─',\n topJoin: '┬',\n topLeft: '┌',\n topRight: '┐',\n\n bottomBody: '─',\n bottomJoin: '┴',\n bottomLeft: '└',\n bottomRight: '┘',\n\n bodyLeft: '│',\n bodyRight: '│',\n bodyJoin: '│',\n\n joinBody: '─',\n joinLeft: '├',\n joinRight: '┤',\n joinJoin: '┼'\n };\n }\n\n if (name === 'ramac') {\n return {\n topBody: '-',\n topJoin: '+',\n topLeft: '+',\n topRight: '+',\n\n bottomBody: '-',\n bottomJoin: '+',\n bottomLeft: '+',\n bottomRight: '+',\n\n bodyLeft: '|',\n bodyRight: '|',\n bodyJoin: '|',\n\n joinBody: '-',\n joinLeft: '|',\n joinRight: '|',\n joinJoin: '|'\n };\n }\n\n if (name === 'void') {\n return {\n topBody: '',\n topJoin: '',\n topLeft: '',\n topRight: '',\n\n bottomBody: '',\n bottomJoin: '',\n bottomLeft: '',\n bottomRight: '',\n\n bodyLeft: '',\n bodyRight: '',\n bodyJoin: '',\n\n joinBody: '',\n joinLeft: '',\n joinRight: '',\n joinJoin: ''\n };\n }\n\n throw new Error('Unknown border template \"${name}\".');\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["getBorderCharacters.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAyBe,UAAC,IAAD,EAAU;AACrB,QAAI,SAAS,WAAb,EAA0B;AACtB,eAAO;AACH,qBAAS,GADN;AAEH,qBAAS,GAFN;AAGH,qBAAS,GAHN;AAIH,sBAAU,GAJP;;AAMH,wBAAY,GANT;AAOH,wBAAY,GAPT;AAQH,wBAAY,GART;AASH,yBAAa,GATV;;AAWH,sBAAU,GAXP;AAYH,uBAAW,GAZR;AAaH,sBAAU,GAbP;;AAeH,sBAAU,GAfP;AAgBH,sBAAU,GAhBP;AAiBH,uBAAW,GAjBR;AAkBH,sBAAU;AAlBP,SAAP;AAoBH;;AAED,QAAI,SAAS,MAAb,EAAqB;AACjB,eAAO;AACH,qBAAS,GADN;AAEH,qBAAS,GAFN;AAGH,qBAAS,GAHN;AAIH,sBAAU,GAJP;;AAMH,wBAAY,GANT;AAOH,wBAAY,GAPT;AAQH,wBAAY,GART;AASH,yBAAa,GATV;;AAWH,sBAAU,GAXP;AAYH,uBAAW,GAZR;AAaH,sBAAU,GAbP;;AAeH,sBAAU,GAfP;AAgBH,sBAAU,GAhBP;AAiBH,uBAAW,GAjBR;AAkBH,sBAAU;AAlBP,SAAP;AAoBH;;AAED,QAAI,SAAS,OAAb,EAAsB;AAClB,eAAO;AACH,qBAAS,GADN;AAEH,qBAAS,GAFN;AAGH,qBAAS,GAHN;AAIH,sBAAU,GAJP;;AAMH,wBAAY,GANT;AAOH,wBAAY,GAPT;AAQH,wBAAY,GART;AASH,yBAAa,GATV;;AAWH,sBAAU,GAXP;AAYH,uBAAW,GAZR;AAaH,sBAAU,GAbP;;AAeH,sBAAU,GAfP;AAgBH,sBAAU,GAhBP;AAiBH,uBAAW,GAjBR;AAkBH,sBAAU;AAlBP,SAAP;AAoBH;;AAED,QAAI,SAAS,MAAb,EAAqB;AACjB,eAAO;AACH,qBAAS,EADN;AAEH,qBAAS,EAFN;AAGH,qBAAS,EAHN;AAIH,sBAAU,EAJP;;AAMH,wBAAY,EANT;AAOH,wBAAY,EAPT;AAQH,wBAAY,EART;AASH,yBAAa,EATV;;AAWH,sBAAU,EAXP;AAYH,uBAAW,EAZR;AAaH,sBAAU,EAbP;;AAeH,sBAAU,EAfP;AAgBH,sBAAU,EAhBP;AAiBH,uBAAW,EAjBR;AAkBH,sBAAU;AAlBP,SAAP;AAoBH;;AAED,UAAM,IAAI,KAAJ,CAAU,oCAAV,CAAN;AACH,C","file":"getBorderCharacters.js","sourcesContent":["/* eslint-disable sorting/sort-object-props */\n\n/**\n * @typedef border\n * @property {string} topBody\n * @property {string} topJoin\n * @property {string} topLeft\n * @property {string} topRight\n * @property {string} bottomBody\n * @property {string} bottomJoin\n * @property {string} bottomLeft\n * @property {string} bottomRight\n * @property {string} bodyLeft\n * @property {string} bodyRight\n * @property {string} bodyJoin\n * @property {string} joinBody\n * @property {string} joinLeft\n * @property {string} joinRight\n * @property {string} joinJoin\n */\n\n/**\n * @param {string} name\n * @returns {border}\n */\nexport default (name) => {\n if (name === 'honeywell') {\n return {\n topBody: '═',\n topJoin: '╤',\n topLeft: '╔',\n topRight: '╗',\n\n bottomBody: '═',\n bottomJoin: '╧',\n bottomLeft: '╚',\n bottomRight: '╝',\n\n bodyLeft: '║',\n bodyRight: '║',\n bodyJoin: '│',\n\n joinBody: '─',\n joinLeft: '╟',\n joinRight: '╢',\n joinJoin: '┼'\n };\n }\n\n if (name === 'norc') {\n return {\n topBody: '─',\n topJoin: '┬',\n topLeft: '┌',\n topRight: '┐',\n\n bottomBody: '─',\n bottomJoin: '┴',\n bottomLeft: '└',\n bottomRight: '┘',\n\n bodyLeft: '│',\n bodyRight: '│',\n bodyJoin: '│',\n\n joinBody: '─',\n joinLeft: '├',\n joinRight: '┤',\n joinJoin: '┼'\n };\n }\n\n if (name === 'ramac') {\n return {\n topBody: '-',\n topJoin: '+',\n topLeft: '+',\n topRight: '+',\n\n bottomBody: '-',\n bottomJoin: '+',\n bottomLeft: '+',\n bottomRight: '+',\n\n bodyLeft: '|',\n bodyRight: '|',\n bodyJoin: '|',\n\n joinBody: '-',\n joinLeft: '|',\n joinRight: '|',\n joinJoin: '|'\n };\n }\n\n if (name === 'void') {\n return {\n topBody: '',\n topJoin: '',\n topLeft: '',\n topRight: '',\n\n bottomBody: '',\n bottomJoin: '',\n bottomLeft: '',\n bottomRight: '',\n\n bodyLeft: '',\n bodyRight: '',\n bodyJoin: '',\n\n joinBody: '',\n joinLeft: '',\n joinRight: '',\n joinJoin: ''\n };\n }\n\n throw new Error('Unknown border template \"${name}\".');\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/index.js b/tools/eslint/node_modules/table/dist/index.js
index b3462ea1a6..f937e069ac 100644
--- a/tools/eslint/node_modules/table/dist/index.js
+++ b/tools/eslint/node_modules/table/dist/index.js
@@ -21,5 +21,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
exports.createStream = _createStream2.default;
exports.getBorderCharacters = _getBorderCharacters2.default;
-exports.default = _table2.default;
-//# sourceMappingURL=index.js.map
+exports.default = _table2.default; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/index.js.map b/tools/eslint/node_modules/table/dist/index.js.map
index 9e3155e257..dcf5ef8d34 100644
--- a/tools/eslint/node_modules/table/dist/index.js.map
+++ b/tools/eslint/node_modules/table/dist/index.js.map
@@ -1 +1 @@
-{"version":3,"sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;QAKI,YAAY;QACZ,mBAAmB","file":"index.js","sourcesContent":["import table from './table';\nimport createStream from './createStream';\nimport getBorderCharacters from './getBorderCharacters';\n\nexport {\n createStream,\n getBorderCharacters\n};\n\nexport default table;\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["index.js"],"names":[],"mappings":";;;;;;;AAAA;;;;AACA;;;;AACA;;;;;;QAGI,Y;QACA,mB","file":"index.js","sourcesContent":["import table from './table';\nimport createStream from './createStream';\nimport getBorderCharacters from './getBorderCharacters';\n\nexport {\n createStream,\n getBorderCharacters\n};\n\nexport default table;\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/makeConfig.js b/tools/eslint/node_modules/table/dist/makeConfig.js
index 1c9b9ba544..830ece67ef 100644
--- a/tools/eslint/node_modules/table/dist/makeConfig.js
+++ b/tools/eslint/node_modules/table/dist/makeConfig.js
@@ -1,24 +1,12 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _cloneDeep2 = require('lodash/cloneDeep');
+var _lodash = require('lodash');
-var _cloneDeep3 = _interopRequireDefault(_cloneDeep2);
-
-var _isUndefined2 = require('lodash/isUndefined');
-
-var _isUndefined3 = _interopRequireDefault(_isUndefined2);
-
-var _times2 = require('lodash/times');
-
-var _times3 = _interopRequireDefault(_times2);
-
-var _assign2 = require('lodash/assign');
-
-var _assign3 = _interopRequireDefault(_assign2);
+var _lodash2 = _interopRequireDefault(_lodash);
var _getBorderCharacters = require('./getBorderCharacters');
@@ -34,19 +22,16 @@ var _calculateMaximumColumnWidthIndex2 = _interopRequireDefault(_calculateMaximu
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var makeBorder = undefined,
- makeColumns = undefined;
-
/**
* Merges user provided border characters with the default border ("honeywell") characters.
*
* @param {Object} border
* @returns {Object}
*/
-makeBorder = function makeBorder() {
- var border = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+const makeBorder = function makeBorder() {
+ let border = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
- return (0, _assign3.default)({}, (0, _getBorderCharacters2.default)('honeywell'), border);
+ return _lodash2.default.assign({}, (0, _getBorderCharacters2.default)('honeywell'), border);
};
/**
@@ -58,30 +43,28 @@ makeBorder = function makeBorder() {
* @param {Object} columnDefault
* @returns {Object}
*/
-makeColumns = function makeColumns(rows) {
- var columns = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
- var columnDefault = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
-
- var maximumColumnWidthIndex = undefined;
-
- maximumColumnWidthIndex = (0, _calculateMaximumColumnWidthIndex2.default)(rows);
-
- (0, _times3.default)(rows[0].length, function (index) {
- if ((0, _isUndefined3.default)(columns[index])) {
- columns[index] = {};
- }
-
- columns[index] = (0, _assign3.default)({
- alignment: 'left',
- width: maximumColumnWidthIndex[index],
- wrapWord: false,
- truncate: Infinity,
- paddingLeft: 1,
- paddingRight: 1
- }, columnDefault, columns[index]);
- });
-
- return columns;
+const makeColumns = function makeColumns(rows) {
+ let columns = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+ let columnDefault = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
+
+ const maximumColumnWidthIndex = (0, _calculateMaximumColumnWidthIndex2.default)(rows);
+
+ _lodash2.default.times(rows[0].length, index => {
+ if (_lodash2.default.isUndefined(columns[index])) {
+ columns[index] = {};
+ }
+
+ columns[index] = _lodash2.default.assign({
+ alignment: 'left',
+ paddingLeft: 1,
+ paddingRight: 1,
+ truncate: Infinity,
+ width: maximumColumnWidthIndex[index],
+ wrapWord: false
+ }, columnDefault, columns[index]);
+ });
+
+ return columns;
};
/**
@@ -94,28 +77,25 @@ makeColumns = function makeColumns(rows) {
*/
exports.default = function (rows) {
- var userConfig = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
-
- var config = undefined;
+ let userConfig = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
- (0, _validateConfig2.default)(userConfig);
+ (0, _validateConfig2.default)('config.json', userConfig);
- config = (0, _cloneDeep3.default)(userConfig);
+ const config = _lodash2.default.cloneDeep(userConfig);
- config.border = makeBorder(config.border);
- config.columns = makeColumns(rows, config.columns, config.columnDefault);
+ config.border = makeBorder(config.border);
+ config.columns = makeColumns(rows, config.columns, config.columnDefault);
- if (!config.drawHorizontalLine) {
- /**
- * @returns {boolean}
- */
- config.drawHorizontalLine = function () {
- return true;
- };
- }
+ if (!config.drawHorizontalLine) {
+ /**
+ * @returns {boolean}
+ */
+ config.drawHorizontalLine = () => {
+ return true;
+ };
+ }
- return config;
+ return config;
};
-module.exports = exports['default'];
-//# sourceMappingURL=makeConfig.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/makeConfig.js.map b/tools/eslint/node_modules/table/dist/makeConfig.js.map
index f64b008540..25c7051d27 100644
--- a/tools/eslint/node_modules/table/dist/makeConfig.js.map
+++ b/tools/eslint/node_modules/table/dist/makeConfig.js.map
@@ -1 +1 @@
-{"version":3,"sources":["makeConfig.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAI,UAAU,YAAA;IACV,WAAW,YAAA;;;;;;;;AAAC,AAQhB,UAAU,GAAG,sBAAiB;QAAhB,MAAM,yDAAG,EAAE;;AACrB,WAAO,sBAAS,EAAE,EAAE,mCAAoB,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;CACjE;;;;;;;;;;;AAAC,AAWF,WAAW,GAAG,qBAAC,IAAI,EAAuC;QAArC,OAAO,yDAAG,EAAE;QAAE,aAAa,yDAAG,EAAE;;AACjD,QAAI,uBAAuB,YAAA,CAAC;;AAE5B,2BAAuB,GAAG,gDAAiC,IAAI,CAAC,CAAC;;AAEjE,yBAAQ,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,UAAC,KAAK,EAAK;AAC/B,YAAI,2BAAc,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;AAC/B,mBAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;SACvB;;AAED,eAAO,CAAC,KAAK,CAAC,GAAG,sBAAS;AACtB,qBAAS,EAAE,MAAM;AACjB,iBAAK,EAAE,uBAAuB,CAAC,KAAK,CAAC;AACrC,oBAAQ,EAAE,KAAK;AACf,oBAAQ,EAAE,QAAQ;AAClB,uBAAW,EAAE,CAAC;AACd,wBAAY,EAAE,CAAC;SAClB,EAAE,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;KACrC,CAAC,CAAC;;AAEH,WAAO,OAAO,CAAC;CAClB;;;;;;;;;;AAAC;kBAUa,UAAC,IAAI,EAAsB;QAApB,UAAU,yDAAG,EAAE;;AACjC,QAAI,MAAM,YAAA,CAAC;;AAEX,kCAAe,UAAU,CAAC,CAAC;;AAE3B,UAAM,GAAG,yBAAY,UAAU,CAAC,CAAC;;AAEjC,UAAM,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC1C,UAAM,CAAC,OAAO,GAAG,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;;AAEzE,QAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE;;;;AAI5B,cAAM,CAAC,kBAAkB,GAAG,YAAM;AAC9B,mBAAO,IAAI,CAAC;SACf,CAAC;KACL;;AAED,WAAO,MAAM,CAAC;CACjB","file":"makeConfig.js","sourcesContent":["import _ from 'lodash';\nimport getBorderCharacters from './getBorderCharacters';\nimport validateConfig from './validateConfig';\nimport calculateMaximumColumnWidthIndex from './calculateMaximumColumnWidthIndex';\n\nlet makeBorder,\n makeColumns;\n\n/**\n * Merges user provided border characters with the default border (\"honeywell\") characters.\n *\n * @param {Object} border\n * @returns {Object}\n */\nmakeBorder = (border = {}) => {\n return _.assign({}, getBorderCharacters('honeywell'), border);\n};\n\n/**\n * Creates a configuration for every column using default\n * values for the missing configuration properties.\n *\n * @param {Array[]} rows\n * @param {Object} columns\n * @param {Object} columnDefault\n * @returns {Object}\n */\nmakeColumns = (rows, columns = {}, columnDefault = {}) => {\n let maximumColumnWidthIndex;\n\n maximumColumnWidthIndex = calculateMaximumColumnWidthIndex(rows);\n\n _.times(rows[0].length, (index) => {\n if (_.isUndefined(columns[index])) {\n columns[index] = {};\n }\n\n columns[index] = _.assign({\n alignment: 'left',\n width: maximumColumnWidthIndex[index],\n wrapWord: false,\n truncate: Infinity,\n paddingLeft: 1,\n paddingRight: 1\n }, columnDefault, columns[index]);\n });\n\n return columns;\n};\n\n/**\n * Makes a new configuration object out of the userConfig object\n * using default values for the missing configuration properties.\n *\n * @param {Array[]} rows\n * @param {Object} userConfig\n * @returns {Object}\n */\nexport default (rows, userConfig = {}) => {\n let config;\n\n validateConfig(userConfig);\n\n config = _.cloneDeep(userConfig);\n\n config.border = makeBorder(config.border);\n config.columns = makeColumns(rows, config.columns, config.columnDefault);\n\n if (!config.drawHorizontalLine) {\n /**\n * @returns {boolean}\n */\n config.drawHorizontalLine = () => {\n return true;\n };\n }\n\n return config;\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["makeConfig.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA;;;;AACA;;;;AACA;;;;;;AAEA,IAAI,mBAAJ;IACI,oBADJ;;;;;;;;AASA,aAAa,sBAAiB;AAAA,QAAhB,MAAgB,yDAAP,EAAO;;AAC1B,WAAO,sBAAS,EAAT,EAAa,mCAAoB,WAApB,CAAb,EAA+C,MAA/C,CAAP;AACH,CAFD;;;;;;;;;;;AAaA,cAAc,qBAAC,IAAD,EAA4C;AAAA,QAArC,OAAqC,yDAA3B,EAA2B;AAAA,QAAvB,aAAuB,yDAAP,EAAO;;AACtD,QAAI,gCAAJ;;AAEA,8BAA0B,gDAAiC,IAAjC,CAA1B;;AAEA,yBAAQ,KAAK,CAAL,EAAQ,MAAhB,EAAwB,UAAC,KAAD,EAAW;AAC/B,YAAI,2BAAc,QAAQ,KAAR,CAAd,CAAJ,EAAmC;AAC/B,oBAAQ,KAAR,IAAiB,EAAjB;AACH;;AAED,gBAAQ,KAAR,IAAiB,sBAAS;AACtB,uBAAW,MADW;AAEtB,mBAAO,wBAAwB,KAAxB,CAFe;AAGtB,sBAAU,KAHY;AAItB,sBAAU,QAJY;AAKtB,yBAAa,CALS;AAMtB,0BAAc;AANQ,SAAT,EAOd,aAPc,EAOC,QAAQ,KAAR,CAPD,CAAjB;AAQH,KAbD;;AAeA,WAAO,OAAP;AACH,CArBD;;;;;;;;;;;kBA+Be,UAAC,IAAD,EAA2B;AAAA,QAApB,UAAoB,yDAAP,EAAO;;AACtC,QAAI,eAAJ;;AAEA,kCAAe,UAAf;;AAEA,aAAS,yBAAY,UAAZ,CAAT;;AAEA,WAAO,MAAP,GAAgB,WAAW,OAAO,MAAlB,CAAhB;AACA,WAAO,OAAP,GAAiB,YAAY,IAAZ,EAAkB,OAAO,OAAzB,EAAkC,OAAO,aAAzC,CAAjB;;AAEA,QAAI,CAAC,OAAO,kBAAZ,EAAgC;;;;AAI5B,eAAO,kBAAP,GAA4B,YAAM;AAC9B,mBAAO,IAAP;AACH,SAFD;AAGH;;AAED,WAAO,MAAP;AACH,C","file":"makeConfig.js","sourcesContent":["import _ from 'lodash';\nimport getBorderCharacters from './getBorderCharacters';\nimport validateConfig from './validateConfig';\nimport calculateMaximumColumnWidthIndex from './calculateMaximumColumnWidthIndex';\n\nlet makeBorder,\n makeColumns;\n\n/**\n * Merges user provided border characters with the default border (\"honeywell\") characters.\n *\n * @param {Object} border\n * @returns {Object}\n */\nmakeBorder = (border = {}) => {\n return _.assign({}, getBorderCharacters('honeywell'), border);\n};\n\n/**\n * Creates a configuration for every column using default\n * values for the missing configuration properties.\n *\n * @param {Array[]} rows\n * @param {Object} columns\n * @param {Object} columnDefault\n * @returns {Object}\n */\nmakeColumns = (rows, columns = {}, columnDefault = {}) => {\n let maximumColumnWidthIndex;\n\n maximumColumnWidthIndex = calculateMaximumColumnWidthIndex(rows);\n\n _.times(rows[0].length, (index) => {\n if (_.isUndefined(columns[index])) {\n columns[index] = {};\n }\n\n columns[index] = _.assign({\n alignment: 'left',\n width: maximumColumnWidthIndex[index],\n wrapWord: false,\n truncate: Infinity,\n paddingLeft: 1,\n paddingRight: 1\n }, columnDefault, columns[index]);\n });\n\n return columns;\n};\n\n/**\n * Makes a new configuration object out of the userConfig object\n * using default values for the missing configuration properties.\n *\n * @param {Array[]} rows\n * @param {Object} userConfig\n * @returns {Object}\n */\nexport default (rows, userConfig = {}) => {\n let config;\n\n validateConfig(userConfig);\n\n config = _.cloneDeep(userConfig);\n\n config.border = makeBorder(config.border);\n config.columns = makeColumns(rows, config.columns, config.columnDefault);\n\n if (!config.drawHorizontalLine) {\n /**\n * @returns {boolean}\n */\n config.drawHorizontalLine = () => {\n return true;\n };\n }\n\n return config;\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/makeStreamConfig.js b/tools/eslint/node_modules/table/dist/makeStreamConfig.js
index 49692a3285..06e212adbf 100644
--- a/tools/eslint/node_modules/table/dist/makeStreamConfig.js
+++ b/tools/eslint/node_modules/table/dist/makeStreamConfig.js
@@ -1,48 +1,33 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _cloneDeep2 = require('lodash/cloneDeep');
+var _lodash = require('lodash');
-var _cloneDeep3 = _interopRequireDefault(_cloneDeep2);
-
-var _isUndefined2 = require('lodash/isUndefined');
-
-var _isUndefined3 = _interopRequireDefault(_isUndefined2);
-
-var _times2 = require('lodash/times');
-
-var _times3 = _interopRequireDefault(_times2);
-
-var _assign2 = require('lodash/assign');
-
-var _assign3 = _interopRequireDefault(_assign2);
+var _lodash2 = _interopRequireDefault(_lodash);
var _getBorderCharacters = require('./getBorderCharacters');
var _getBorderCharacters2 = _interopRequireDefault(_getBorderCharacters);
-var _validateStreamConfig = require('./validateStreamConfig');
+var _validateConfig = require('./validateConfig');
-var _validateStreamConfig2 = _interopRequireDefault(_validateStreamConfig);
+var _validateConfig2 = _interopRequireDefault(_validateConfig);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var makeBorder = undefined,
- makeColumns = undefined;
-
/**
* Merges user provided border characters with the default border ("honeywell") characters.
*
* @param {Object} border
* @returns {Object}
*/
-makeBorder = function makeBorder() {
- var border = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+const makeBorder = function makeBorder() {
+ let border = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
- return (0, _assign3.default)({}, (0, _getBorderCharacters2.default)('honeywell'), border);
+ return _lodash2.default.assign({}, (0, _getBorderCharacters2.default)('honeywell'), border);
};
/**
@@ -54,26 +39,25 @@ makeBorder = function makeBorder() {
* @param {Object} columnDefault
* @returns {Object}
*/
-makeColumns = function makeColumns(columnCount) {
- var columns = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
- var columnDefault = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
-
- (0, _times3.default)(columnCount, function (index) {
- if ((0, _isUndefined3.default)(columns[index])) {
- columns[index] = {};
- }
-
- columns[index] = (0, _assign3.default)({
- alignment: 'left',
- // width: columnDefault.width,
- wrapWord: false,
- truncate: Infinity,
- paddingLeft: 1,
- paddingRight: 1
- }, columnDefault, columns[index]);
- });
-
- return columns;
+const makeColumns = function makeColumns(columnCount) {
+ let columns = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+ let columnDefault = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
+
+ _lodash2.default.times(columnCount, index => {
+ if (_lodash2.default.isUndefined(columns[index])) {
+ columns[index] = {};
+ }
+
+ columns[index] = _lodash2.default.assign({
+ alignment: 'left',
+ paddingLeft: 1,
+ paddingRight: 1,
+ truncate: Infinity,
+ wrapWord: false
+ }, columnDefault, columns[index]);
+ });
+
+ return columns;
};
/**
@@ -102,27 +86,24 @@ makeColumns = function makeColumns(columnCount) {
*/
exports.default = function () {
- var userConfig = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+ let userConfig = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
- var config = undefined;
+ (0, _validateConfig2.default)('streamConfig.json', userConfig);
- (0, _validateStreamConfig2.default)(userConfig);
+ const config = _lodash2.default.cloneDeep(userConfig);
- config = (0, _cloneDeep3.default)(userConfig);
+ if (!config.columnDefault || !config.columnDefault.width) {
+ throw new Error('Must provide config.columnDefault.width when creating a stream.');
+ }
- if (!config.columnDefault || !config.columnDefault.width) {
- throw new Error('Must provide config.columnDefault.width when creating a stream.');
- }
-
- if (!config.columnCount) {
- throw new Error('Must provide config.columnCount.');
- }
+ if (!config.columnCount) {
+ throw new Error('Must provide config.columnCount.');
+ }
- config.border = makeBorder(config.border);
- config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault);
+ config.border = makeBorder(config.border);
+ config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault);
- return config;
+ return config;
};
-module.exports = exports['default'];
-//# sourceMappingURL=makeStreamConfig.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/makeStreamConfig.js.map b/tools/eslint/node_modules/table/dist/makeStreamConfig.js.map
index 4ab4ef8c84..c3c0437ec1 100644
--- a/tools/eslint/node_modules/table/dist/makeStreamConfig.js.map
+++ b/tools/eslint/node_modules/table/dist/makeStreamConfig.js.map
@@ -1 +1 @@
-{"version":3,"sources":["makeStreamConfig.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAI,UAAU,YAAA;IACV,WAAW,YAAA;;;;;;;;AAAC,AAQhB,UAAU,GAAG,sBAAiB;QAAhB,MAAM,yDAAG,EAAE;;AACrB,WAAO,sBAAS,EAAE,EAAE,mCAAoB,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;CACjE;;;;;;;;;;;AAAC,AAWF,WAAW,GAAG,qBAAC,WAAW,EAAuC;QAArC,OAAO,yDAAG,EAAE;QAAE,aAAa,yDAAG,EAAE;;AACxD,yBAAQ,WAAW,EAAE,UAAC,KAAK,EAAK;AAC5B,YAAI,2BAAc,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;AAC/B,mBAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;SACvB;;AAED,eAAO,CAAC,KAAK,CAAC,GAAG,sBAAS;AACtB,qBAAS,EAAE,MAAM;;AAEjB,oBAAQ,EAAE,KAAK;AACf,oBAAQ,EAAE,QAAQ;AAClB,uBAAW,EAAE,CAAC;AACd,wBAAY,EAAE,CAAC;SAClB,EAAE,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;KACrC,CAAC,CAAC;;AAEH,WAAO,OAAO,CAAC;CAClB;;;;;;;;;;;;;;;;;;;;;;;;;;AAAC;kBA0Ba,YAAqB;QAApB,UAAU,yDAAG,EAAE;;AAC3B,QAAI,MAAM,YAAA,CAAC;;AAEX,wCAAqB,UAAU,CAAC,CAAC;;AAEjC,UAAM,GAAG,yBAAY,UAAU,CAAC,CAAC;;AAEjC,QAAI,CAAC,MAAM,CAAC,aAAa,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE;AACtD,cAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;KACtF;;AAED,QAAI,CAAC,MAAM,CAAC,WAAW,EAAE;AACrB,cAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;KACvD;;AAED,UAAM,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC1C,UAAM,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;;AAEvF,WAAO,MAAM,CAAC;CACjB","file":"makeStreamConfig.js","sourcesContent":["import _ from 'lodash';\nimport getBorderCharacters from './getBorderCharacters';\nimport validateStreamConfig from './validateStreamConfig';\n\nlet makeBorder,\n makeColumns;\n\n/**\n * Merges user provided border characters with the default border (\"honeywell\") characters.\n *\n * @param {Object} border\n * @returns {Object}\n */\nmakeBorder = (border = {}) => {\n return _.assign({}, getBorderCharacters('honeywell'), border);\n};\n\n/**\n * Creates a configuration for every column using default\n * values for the missing configuration properties.\n *\n * @param {number} columnCount\n * @param {Object} columns\n * @param {Object} columnDefault\n * @returns {Object}\n */\nmakeColumns = (columnCount, columns = {}, columnDefault = {}) => {\n _.times(columnCount, (index) => {\n if (_.isUndefined(columns[index])) {\n columns[index] = {};\n }\n\n columns[index] = _.assign({\n alignment: 'left',\n // width: columnDefault.width,\n wrapWord: false,\n truncate: Infinity,\n paddingLeft: 1,\n paddingRight: 1\n }, columnDefault, columns[index]);\n });\n\n return columns;\n};\n\n/**\n * @typedef {Object} columnConfig\n * @property {string} alignment\n * @property {number} width\n * @property {number} truncate\n * @property {number} paddingLeft\n * @property {number} paddingRight\n */\n\n/**\n * @typedef {Object} streamConfig\n * @property {columnConfig} columnDefault\n * @property {Object} border\n * @property {columnConfig[]}\n * @property {number} columnCount Number of columns in the table (required).\n */\n\n/**\n * Makes a new configuration object out of the userConfig object\n * using default values for the missing configuration properties.\n *\n * @param {streamConfig} userConfig\n * @returns {Object}\n */\nexport default (userConfig = {}) => {\n let config;\n\n validateStreamConfig(userConfig);\n\n config = _.cloneDeep(userConfig);\n\n if (!config.columnDefault || !config.columnDefault.width) {\n throw new Error('Must provide config.columnDefault.width when creating a stream.');\n }\n\n if (!config.columnCount) {\n throw new Error('Must provide config.columnCount.');\n }\n\n config.border = makeBorder(config.border);\n config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault);\n\n return config;\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["makeStreamConfig.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA;;;;AACA;;;;;;AAEA,IAAI,mBAAJ;IACI,oBADJ;;;;;;;;AASA,aAAa,sBAAiB;AAAA,QAAhB,MAAgB,yDAAP,EAAO;;AAC1B,WAAO,sBAAS,EAAT,EAAa,mCAAoB,WAApB,CAAb,EAA+C,MAA/C,CAAP;AACH,CAFD;;;;;;;;;;;AAaA,cAAc,qBAAC,WAAD,EAAmD;AAAA,QAArC,OAAqC,yDAA3B,EAA2B;AAAA,QAAvB,aAAuB,yDAAP,EAAO;;AAC7D,yBAAQ,WAAR,EAAqB,UAAC,KAAD,EAAW;AAC5B,YAAI,2BAAc,QAAQ,KAAR,CAAd,CAAJ,EAAmC;AAC/B,oBAAQ,KAAR,IAAiB,EAAjB;AACH;;AAED,gBAAQ,KAAR,IAAiB,sBAAS;AACtB,uBAAW,MADW;;AAGtB,sBAAU,KAHY;AAItB,sBAAU,QAJY;AAKtB,yBAAa,CALS;AAMtB,0BAAc;AANQ,SAAT,EAOd,aAPc,EAOC,QAAQ,KAAR,CAPD,CAAjB;AAQH,KAbD;;AAeA,WAAO,OAAP;AACH,CAjBD;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA2Ce,YAAqB;AAAA,QAApB,UAAoB,yDAAP,EAAO;;AAChC,QAAI,eAAJ;;AAEA,wCAAqB,UAArB;;AAEA,aAAS,yBAAY,UAAZ,CAAT;;AAEA,QAAI,CAAC,OAAO,aAAR,IAAyB,CAAC,OAAO,aAAP,CAAqB,KAAnD,EAA0D;AACtD,cAAM,IAAI,KAAJ,CAAU,iEAAV,CAAN;AACH;;AAED,QAAI,CAAC,OAAO,WAAZ,EAAyB;AACrB,cAAM,IAAI,KAAJ,CAAU,kCAAV,CAAN;AACH;;AAED,WAAO,MAAP,GAAgB,WAAW,OAAO,MAAlB,CAAhB;AACA,WAAO,OAAP,GAAiB,YAAY,OAAO,WAAnB,EAAgC,OAAO,OAAvC,EAAgD,OAAO,aAAvD,CAAjB;;AAEA,WAAO,MAAP;AACH,C","file":"makeStreamConfig.js","sourcesContent":["import _ from 'lodash';\nimport getBorderCharacters from './getBorderCharacters';\nimport validateStreamConfig from './validateStreamConfig';\n\nlet makeBorder,\n makeColumns;\n\n/**\n * Merges user provided border characters with the default border (\"honeywell\") characters.\n *\n * @param {Object} border\n * @returns {Object}\n */\nmakeBorder = (border = {}) => {\n return _.assign({}, getBorderCharacters('honeywell'), border);\n};\n\n/**\n * Creates a configuration for every column using default\n * values for the missing configuration properties.\n *\n * @param {number} columnCount\n * @param {Object} columns\n * @param {Object} columnDefault\n * @returns {Object}\n */\nmakeColumns = (columnCount, columns = {}, columnDefault = {}) => {\n _.times(columnCount, (index) => {\n if (_.isUndefined(columns[index])) {\n columns[index] = {};\n }\n\n columns[index] = _.assign({\n alignment: 'left',\n // width: columnDefault.width,\n wrapWord: false,\n truncate: Infinity,\n paddingLeft: 1,\n paddingRight: 1\n }, columnDefault, columns[index]);\n });\n\n return columns;\n};\n\n/**\n * @typedef {Object} columnConfig\n * @property {string} alignment\n * @property {number} width\n * @property {number} truncate\n * @property {number} paddingLeft\n * @property {number} paddingRight\n */\n\n/**\n * @typedef {Object} streamConfig\n * @property {columnConfig} columnDefault\n * @property {Object} border\n * @property {columnConfig[]}\n * @property {number} columnCount Number of columns in the table (required).\n */\n\n/**\n * Makes a new configuration object out of the userConfig object\n * using default values for the missing configuration properties.\n *\n * @param {streamConfig} userConfig\n * @returns {Object}\n */\nexport default (userConfig = {}) => {\n let config;\n\n validateStreamConfig(userConfig);\n\n config = _.cloneDeep(userConfig);\n\n if (!config.columnDefault || !config.columnDefault.width) {\n throw new Error('Must provide config.columnDefault.width when creating a stream.');\n }\n\n if (!config.columnCount) {\n throw new Error('Must provide config.columnCount.');\n }\n\n config.border = makeBorder(config.border);\n config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault);\n\n return config;\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js b/tools/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js
index f260ca664b..fb1c09199f 100644
--- a/tools/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js
+++ b/tools/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js
@@ -1,24 +1,12 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _flatten2 = require('lodash/flatten');
+var _lodash = require('lodash');
-var _flatten3 = _interopRequireDefault(_flatten2);
-
-var _forEach2 = require('lodash/forEach');
-
-var _forEach3 = _interopRequireDefault(_forEach2);
-
-var _fill2 = require('lodash/fill');
-
-var _fill3 = _interopRequireDefault(_fill2);
-
-var _map2 = require('lodash/map');
-
-var _map3 = _interopRequireDefault(_map2);
+var _lodash2 = _interopRequireDefault(_lodash);
var _wrapString = require('./wrapString');
@@ -34,53 +22,38 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @param {Array} unmappedRows
* @param {number[]} rowHeightIndex
* @param {Object} config
- * @return {Array}
+ * @returns {Array}
*/
+exports.default = (unmappedRows, rowHeightIndex, config) => {
+ const tableWidth = unmappedRows[0].length;
-exports.default = function (unmappedRows, rowHeightIndex, config) {
- var mappedRows = undefined,
- tableWidth = undefined;
-
- tableWidth = unmappedRows[0].length;
-
- // console.log('unmappedRows', unmappedRows, 'rowHeightIndex', rowHeightIndex, 'config', config, 'tableWidth', tableWidth);
-
- mappedRows = (0, _map3.default)(unmappedRows, function (cells, index0) {
- var rowHeight = undefined;
-
- rowHeight = (0, _map3.default)(Array(rowHeightIndex[index0]), function () {
- return (0, _fill3.default)(Array(tableWidth), '');
- });
-
- // console.log('rowHeight', rowHeight);
-
- // rowHeight
- // [{row index within rowSaw; index2}]
- // [{cell index within a virtual row; index1}]
-
- (0, _forEach3.default)(cells, function (value, index1) {
- var chunkedValue = undefined;
-
- if (config.columns[index1].wrapWord) {
- chunkedValue = (0, _wrapWord2.default)(value, config.columns[index1].width);
- } else {
- chunkedValue = (0, _wrapString2.default)(value, config.columns[index1].width);
- }
+ const mappedRows = _lodash2.default.map(unmappedRows, (cells, index0) => {
+ const rowHeight = _lodash2.default.times(rowHeightIndex[index0], () => {
+ return _lodash2.default.fill(Array(tableWidth), '');
+ });
- // console.log('chunkedValue', chunkedValue.length, 'rowHeight', rowHeight.length);
+ // rowHeight
+ // [{row index within rowSaw; index2}]
+ // [{cell index within a virtual row; index1}]
- (0, _forEach3.default)(chunkedValue, function (part, index2) {
- // console.log(rowHeight[index2]);
+ _lodash2.default.forEach(cells, (value, index1) => {
+ let chunkedValue;
- rowHeight[index2][index1] = part;
- });
- });
+ if (config.columns[index1].wrapWord) {
+ chunkedValue = (0, _wrapWord2.default)(value, config.columns[index1].width);
+ } else {
+ chunkedValue = (0, _wrapString2.default)(value, config.columns[index1].width);
+ }
- return rowHeight;
+ _lodash2.default.forEach(chunkedValue, (part, index2) => {
+ rowHeight[index2][index1] = part;
+ });
});
- return (0, _flatten3.default)(mappedRows);
+ return rowHeight;
+ });
+
+ return _lodash2.default.flatten(mappedRows);
};
-module.exports = exports['default'];
-//# sourceMappingURL=mapDataUsingRowHeightIndex.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js.map b/tools/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js.map
index 68b34b6664..4b11dec7de 100644
--- a/tools/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js.map
+++ b/tools/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js.map
@@ -1 +1 @@
-{"version":3,"sources":["mapDataUsingRowHeightIndex.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAUe,UAAC,YAAY,EAAE,cAAc,EAAE,MAAM,EAAK;AACrD,QAAI,UAAU,YAAA;QACV,UAAU,YAAA,CAAC;;AAEf,cAAU,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM;;;;AAAC,AAIpC,cAAU,GAAG,mBAAM,YAAY,EAAE,UAAC,KAAK,EAAE,MAAM,EAAK;AAChD,YAAI,SAAS,YAAA,CAAC;;AAEd,iBAAS,GAAG,mBAAM,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,YAAM;AACnD,mBAAO,oBAAO,KAAK,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC;SACxC,CAAC;;;;;;;;AAAC,AAQH,+BAAU,KAAK,EAAE,UAAC,KAAK,EAAE,MAAM,EAAK;AAChC,gBAAI,YAAY,YAAA,CAAC;;AAEjB,gBAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;AACjC,4BAAY,GAAG,wBAAS,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;aAChE,MAAM;AACH,4BAAY,GAAG,0BAAW,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;aAClE;;;;AAAA,AAID,mCAAU,YAAY,EAAE,UAAC,IAAI,EAAE,MAAM,EAAK;;;AAGtC,yBAAS,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;aACpC,CAAC,CAAC;SACN,CAAC,CAAC;;AAEH,eAAO,SAAS,CAAC;KACpB,CAAC,CAAC;;AAEH,WAAO,uBAAU,UAAU,CAAC,CAAC;CAChC","file":"mapDataUsingRowHeightIndex.js","sourcesContent":["import _ from 'lodash';\nimport wrapString from './wrapString';\nimport wrapWord from './wrapWord';\n\n/**\n * @param {Array} unmappedRows\n * @param {number[]} rowHeightIndex\n * @param {Object} config\n * @return {Array}\n */\nexport default (unmappedRows, rowHeightIndex, config) => {\n let mappedRows,\n tableWidth;\n\n tableWidth = unmappedRows[0].length;\n\n // console.log('unmappedRows', unmappedRows, 'rowHeightIndex', rowHeightIndex, 'config', config, 'tableWidth', tableWidth);\n\n mappedRows = _.map(unmappedRows, (cells, index0) => {\n let rowHeight;\n\n rowHeight = _.map(Array(rowHeightIndex[index0]), () => {\n return _.fill(Array(tableWidth), '');\n });\n\n // console.log('rowHeight', rowHeight);\n\n // rowHeight\n // [{row index within rowSaw; index2}]\n // [{cell index within a virtual row; index1}]\n\n _.forEach(cells, (value, index1) => {\n let chunkedValue;\n\n if (config.columns[index1].wrapWord) {\n chunkedValue = wrapWord(value, config.columns[index1].width);\n } else {\n chunkedValue = wrapString(value, config.columns[index1].width);\n }\n\n // console.log('chunkedValue', chunkedValue.length, 'rowHeight', rowHeight.length);\n\n _.forEach(chunkedValue, (part, index2) => {\n // console.log(rowHeight[index2]);\n\n rowHeight[index2][index1] = part;\n });\n });\n\n return rowHeight;\n });\n\n return _.flatten(mappedRows);\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["mapDataUsingRowHeightIndex.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA;;;;AACA;;;;;;;;;;;;;kBAQe,UAAC,YAAD,EAAe,cAAf,EAA+B,MAA/B,EAA0C;AACrD,QAAI,mBAAJ;QACI,mBADJ;;AAGA,iBAAa,aAAa,CAAb,EAAgB,MAA7B;;;;AAIA,iBAAa,mBAAM,YAAN,EAAoB,UAAC,KAAD,EAAQ,MAAR,EAAmB;AAChD,YAAI,kBAAJ;;AAEA,oBAAY,mBAAM,MAAM,eAAe,MAAf,CAAN,CAAN,EAAqC,YAAM;AACnD,mBAAO,oBAAO,MAAM,UAAN,CAAP,EAA0B,EAA1B,CAAP;AACH,SAFW,CAAZ;;;;;;;;AAUA,+BAAU,KAAV,EAAiB,UAAC,KAAD,EAAQ,MAAR,EAAmB;AAChC,gBAAI,qBAAJ;;AAEA,gBAAI,OAAO,OAAP,CAAe,MAAf,EAAuB,QAA3B,EAAqC;AACjC,+BAAe,wBAAS,KAAT,EAAgB,OAAO,OAAP,CAAe,MAAf,EAAuB,KAAvC,CAAf;AACH,aAFD,MAEO;AACH,+BAAe,0BAAW,KAAX,EAAkB,OAAO,OAAP,CAAe,MAAf,EAAuB,KAAzC,CAAf;AACH;;;;AAID,mCAAU,YAAV,EAAwB,UAAC,IAAD,EAAO,MAAP,EAAkB;;;AAGtC,0BAAU,MAAV,EAAkB,MAAlB,IAA4B,IAA5B;AACH,aAJD;AAKH,SAhBD;;AAkBA,eAAO,SAAP;AACH,KAhCY,CAAb;;AAkCA,WAAO,uBAAU,UAAV,CAAP;AACH,C","file":"mapDataUsingRowHeightIndex.js","sourcesContent":["import _ from 'lodash';\nimport wrapString from './wrapString';\nimport wrapWord from './wrapWord';\n\n/**\n * @param {Array} unmappedRows\n * @param {number[]} rowHeightIndex\n * @param {Object} config\n * @return {Array}\n */\nexport default (unmappedRows, rowHeightIndex, config) => {\n let mappedRows,\n tableWidth;\n\n tableWidth = unmappedRows[0].length;\n\n // console.log('unmappedRows', unmappedRows, 'rowHeightIndex', rowHeightIndex, 'config', config, 'tableWidth', tableWidth);\n\n mappedRows = _.map(unmappedRows, (cells, index0) => {\n let rowHeight;\n\n rowHeight = _.map(Array(rowHeightIndex[index0]), () => {\n return _.fill(Array(tableWidth), '');\n });\n\n // console.log('rowHeight', rowHeight);\n\n // rowHeight\n // [{row index within rowSaw; index2}]\n // [{cell index within a virtual row; index1}]\n\n _.forEach(cells, (value, index1) => {\n let chunkedValue;\n\n if (config.columns[index1].wrapWord) {\n chunkedValue = wrapWord(value, config.columns[index1].width);\n } else {\n chunkedValue = wrapString(value, config.columns[index1].width);\n }\n\n // console.log('chunkedValue', chunkedValue.length, 'rowHeight', rowHeight.length);\n\n _.forEach(chunkedValue, (part, index2) => {\n // console.log(rowHeight[index2]);\n\n rowHeight[index2][index1] = part;\n });\n });\n\n return rowHeight;\n });\n\n return _.flatten(mappedRows);\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/padTableData.js b/tools/eslint/node_modules/table/dist/padTableData.js
index f96dc04b2d..5132421eba 100644
--- a/tools/eslint/node_modules/table/dist/padTableData.js
+++ b/tools/eslint/node_modules/table/dist/padTableData.js
@@ -1,36 +1,28 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _repeat2 = require('lodash/repeat');
+var _lodash = require('lodash');
-var _repeat3 = _interopRequireDefault(_repeat2);
-
-var _map2 = require('lodash/map');
-
-var _map3 = _interopRequireDefault(_map2);
+var _lodash2 = _interopRequireDefault(_lodash);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @param {table~row[]} rows
* @param {Object} config
- * @return {table~row[]}
+ * @returns {table~row[]}
*/
+exports.default = (rows, config) => {
+ return _lodash2.default.map(rows, cells => {
+ return _lodash2.default.map(cells, (value, index1) => {
+ const column = config.columns[index1];
-exports.default = function (rows, config) {
- return (0, _map3.default)(rows, function (cells) {
- return (0, _map3.default)(cells, function (value, index1) {
- var column = undefined;
-
- column = config.columns[index1];
-
- return (0, _repeat3.default)(' ', column.paddingLeft) + value + (0, _repeat3.default)(' ', column.paddingRight);
- });
+ return _lodash2.default.repeat(' ', column.paddingLeft) + value + _lodash2.default.repeat(' ', column.paddingRight);
});
+ });
};
-module.exports = exports['default'];
-//# sourceMappingURL=padTableData.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/padTableData.js.map b/tools/eslint/node_modules/table/dist/padTableData.js.map
index 6d456f14e7..e900566a56 100644
--- a/tools/eslint/node_modules/table/dist/padTableData.js.map
+++ b/tools/eslint/node_modules/table/dist/padTableData.js.map
@@ -1 +1 @@
-{"version":3,"sources":["padTableData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;kBAOe,UAAC,IAAI,EAAE,MAAM,EAAK;AAC7B,WAAO,mBAAM,IAAI,EAAE,UAAC,KAAK,EAAK;AAC1B,eAAO,mBAAM,KAAK,EAAE,UAAC,KAAK,EAAE,MAAM,EAAK;AACnC,gBAAI,MAAM,YAAA,CAAC;;AAEX,kBAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;;AAEhC,mBAAO,sBAAS,GAAG,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,GAAG,sBAAS,GAAG,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;SACzF,CAAC,CAAC;KACN,CAAC,CAAC;CACN","file":"padTableData.js","sourcesContent":["import _ from 'lodash';\n\n/**\n * @param {table~row[]} rows\n * @param {Object} config\n * @return {table~row[]}\n */\nexport default (rows, config) => {\n return _.map(rows, (cells) => {\n return _.map(cells, (value, index1) => {\n let column;\n\n column = config.columns[index1];\n\n return _.repeat(' ', column.paddingLeft) + value + _.repeat(' ', column.paddingRight);\n });\n });\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["padTableData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;kBAOe,UAAC,IAAD,EAAO,MAAP,EAAkB;AAC7B,WAAO,mBAAM,IAAN,EAAY,UAAC,KAAD,EAAW;AAC1B,eAAO,mBAAM,KAAN,EAAa,UAAC,KAAD,EAAQ,MAAR,EAAmB;AACnC,gBAAI,eAAJ;;AAEA,qBAAS,OAAO,OAAP,CAAe,MAAf,CAAT;;AAEA,mBAAO,sBAAS,GAAT,EAAc,OAAO,WAArB,IAAoC,KAApC,GAA4C,sBAAS,GAAT,EAAc,OAAO,YAArB,CAAnD;AACH,SANM,CAAP;AAOH,KARM,CAAP;AASH,C","file":"padTableData.js","sourcesContent":["import _ from 'lodash';\n\n/**\n * @param {table~row[]} rows\n * @param {Object} config\n * @return {table~row[]}\n */\nexport default (rows, config) => {\n return _.map(rows, (cells) => {\n return _.map(cells, (value, index1) => {\n let column;\n\n column = config.columns[index1];\n\n return _.repeat(' ', column.paddingLeft) + value + _.repeat(' ', column.paddingRight);\n });\n });\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/schemas/config.json b/tools/eslint/node_modules/table/dist/schemas/config.json
index 7ee700c5c1..c71fed55ad 100644
--- a/tools/eslint/node_modules/table/dist/schemas/config.json
+++ b/tools/eslint/node_modules/table/dist/schemas/config.json
@@ -1,4 +1,6 @@
{
+ "id": "config.json",
+ "$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"border": {
@@ -11,7 +13,7 @@
"$ref": "#/definitions/column"
},
"drawHorizontalLine": {
- "type": "function"
+ "typeof": "function"
}
},
"additionalProperties": false,
diff --git a/tools/eslint/node_modules/table/dist/schemas/streamConfig.json b/tools/eslint/node_modules/table/dist/schemas/streamConfig.json
index 5c4e1330dc..878f3fc90c 100644
--- a/tools/eslint/node_modules/table/dist/schemas/streamConfig.json
+++ b/tools/eslint/node_modules/table/dist/schemas/streamConfig.json
@@ -1,4 +1,6 @@
{
+ "id": "streamConfig.json",
+ "$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"border": {
diff --git a/tools/eslint/node_modules/table/dist/stringifyTableData.js b/tools/eslint/node_modules/table/dist/stringifyTableData.js
index c1a2cf8afb..2600f95128 100644
--- a/tools/eslint/node_modules/table/dist/stringifyTableData.js
+++ b/tools/eslint/node_modules/table/dist/stringifyTableData.js
@@ -1,12 +1,12 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _map2 = require('lodash/map');
+var _lodash = require('lodash');
-var _map3 = _interopRequireDefault(_map2);
+var _lodash2 = _interopRequireDefault(_lodash);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -14,14 +14,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* Casts all cell values to a string.
*
* @param {table~row[]} rows
- * @return {table~row[]}
+ * @returns {table~row[]}
*/
-
-exports.default = function (rows) {
- return (0, _map3.default)(rows, function (cells) {
- return (0, _map3.default)(cells, String);
- });
+exports.default = rows => {
+ return _lodash2.default.map(rows, cells => {
+ return _lodash2.default.map(cells, String);
+ });
};
-module.exports = exports['default'];
-//# sourceMappingURL=stringifyTableData.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/stringifyTableData.js.map b/tools/eslint/node_modules/table/dist/stringifyTableData.js.map
index 89606f41c2..c38e20fa83 100644
--- a/tools/eslint/node_modules/table/dist/stringifyTableData.js.map
+++ b/tools/eslint/node_modules/table/dist/stringifyTableData.js.map
@@ -1 +1 @@
-{"version":3,"sources":["stringifyTableData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;kBAQe,UAAC,IAAI,EAAK;AACrB,WAAO,mBAAM,IAAI,EAAE,UAAC,KAAK,EAAK;AAC1B,eAAO,mBAAM,KAAK,EAAE,MAAM,CAAC,CAAC;KAC/B,CAAC,CAAC;CACN","file":"stringifyTableData.js","sourcesContent":["import _ from 'lodash';\n\n/**\n * Casts all cell values to a string.\n *\n * @param {table~row[]} rows\n * @return {table~row[]}\n */\nexport default (rows) => {\n return _.map(rows, (cells) => {\n return _.map(cells, String);\n });\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["stringifyTableData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;kBAQe,UAAC,IAAD,EAAU;AACrB,WAAO,mBAAM,IAAN,EAAY,UAAC,KAAD,EAAW;AAC1B,eAAO,mBAAM,KAAN,EAAa,MAAb,CAAP;AACH,KAFM,CAAP;AAGH,C","file":"stringifyTableData.js","sourcesContent":["import _ from 'lodash';\n\n/**\n * Casts all cell values to a string.\n *\n * @param {table~row[]} rows\n * @return {table~row[]}\n */\nexport default (rows) => {\n return _.map(rows, (cells) => {\n return _.map(cells, String);\n });\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/table.js b/tools/eslint/node_modules/table/dist/table.js
index 58239cef7e..9066efaee8 100644
--- a/tools/eslint/node_modules/table/dist/table.js
+++ b/tools/eslint/node_modules/table/dist/table.js
@@ -90,7 +90,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @typedef {Function} drawHorizontalLine
* @param {number} index
* @param {number} size
- * @return {boolean}
+ * @returns {boolean}
*/
/**
@@ -106,35 +106,30 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
*
* @param {table~row[]} data
* @param {table~config} userConfig
- * @return {string}
+ * @returns {string}
*/
-
exports.default = function (data) {
- var userConfig = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+ let userConfig = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
- var cellWidthIndex = undefined,
- config = undefined,
- rowHeightIndex = undefined,
- rows = undefined;
+ let rows;
(0, _validateTableData2.default)(data);
rows = (0, _stringifyTableData2.default)(data);
- config = (0, _makeConfig2.default)(rows, userConfig);
+ const config = (0, _makeConfig2.default)(rows, userConfig);
rows = (0, _truncateTableData2.default)(data, config);
- rowHeightIndex = (0, _calculateRowHeightIndex2.default)(rows, config);
+ const rowHeightIndex = (0, _calculateRowHeightIndex2.default)(rows, config);
rows = (0, _mapDataUsingRowHeightIndex2.default)(rows, rowHeightIndex, config);
rows = (0, _alignTableData2.default)(rows, config);
rows = (0, _padTableData2.default)(rows, config);
- cellWidthIndex = (0, _calculateCellWidthIndex2.default)(rows[0]);
+ const cellWidthIndex = (0, _calculateCellWidthIndex2.default)(rows[0]);
return (0, _drawTable2.default)(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine);
};
-module.exports = exports['default'];
-//# sourceMappingURL=table.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/table.js.map b/tools/eslint/node_modules/table/dist/table.js.map
index 069d4c1a53..843d2e105c 100644
--- a/tools/eslint/node_modules/table/dist/table.js.map
+++ b/tools/eslint/node_modules/table/dist/table.js.map
@@ -1 +1 @@
-{"version":3,"sources":["table.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAyEe,UAAC,IAAI,EAAsB;MAApB,UAAU,yDAAG,EAAE;;AACjC,MAAI,cAAc,YAAA;MACd,MAAM,YAAA;MACN,cAAc,YAAA;MACd,IAAI,YAAA,CAAC;;AAET,mCAAkB,IAAI,CAAC,CAAC;;AAExB,MAAI,GAAG,kCAAmB,IAAI,CAAC,CAAC;;AAEhC,QAAM,GAAG,0BAAW,IAAI,EAAE,UAAU,CAAC,CAAC;;AAEtC,MAAI,GAAG,iCAAkB,IAAI,EAAE,MAAM,CAAC,CAAC;;AAEvC,gBAAc,GAAG,uCAAwB,IAAI,EAAE,MAAM,CAAC,CAAC;;AAEvD,MAAI,GAAG,0CAA2B,IAAI,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;AAChE,MAAI,GAAG,8BAAe,IAAI,EAAE,MAAM,CAAC,CAAC;AACpC,MAAI,GAAG,4BAAa,IAAI,EAAE,MAAM,CAAC,CAAC;;AAElC,gBAAc,GAAG,uCAAwB,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;;AAElD,SAAO,yBAAU,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,CAAC,kBAAkB,CAAC,CAAC;CACpG","file":"table.js","sourcesContent":["import drawTable from './drawTable';\nimport calculateCellWidthIndex from './calculateCellWidthIndex';\nimport makeConfig from './makeConfig';\nimport calculateRowHeightIndex from './calculateRowHeightIndex';\nimport mapDataUsingRowHeightIndex from './mapDataUsingRowHeightIndex';\nimport alignTableData from './alignTableData';\nimport padTableData from './padTableData';\nimport validateTableData from './validateTableData';\nimport stringifyTableData from './stringifyTableData';\nimport truncateTableData from './truncateTableData';\n\n/**\n * @typedef {string} table~cell\n */\n\n/**\n * @typedef {table~cell[]} table~row\n */\n\n/**\n * @typedef {Object} table~columns\n * @property {string} alignment Cell content alignment (enum: left, center, right) (default: left).\n * @property {number} width Column width (default: auto).\n * @property {number} truncate Number of characters are which the content will be truncated (default: Infinity).\n * @property {number} paddingLeft Cell content padding width left (default: 1).\n * @property {number} paddingRight Cell content padding width right (default: 1).\n */\n\n/**\n * @typedef {Object} table~border\n * @property {string} topBody\n * @property {string} topJoin\n * @property {string} topLeft\n * @property {string} topRight\n * @property {string} bottomBody\n * @property {string} bottomJoin\n * @property {string} bottomLeft\n * @property {string} bottomRight\n * @property {string} bodyLeft\n * @property {string} bodyRight\n * @property {string} bodyJoin\n * @property {string} joinBody\n * @property {string} joinLeft\n * @property {string} joinRight\n * @property {string} joinJoin\n */\n\n/**\n * Used to tell whether to draw a horizontal line.\n * This callback is called for each non-content line of the table.\n * The default behavior is to always return true.\n *\n * @typedef {Function} drawHorizontalLine\n * @param {number} index\n * @param {number} size\n * @return {boolean}\n */\n\n/**\n * @typedef {Object} table~config\n * @property {table~border} border\n * @property {table~columns[]} columns Column specific configuration.\n * @property {table~columns} columnDefault Default values for all columns. Column specific settings overwrite the default values.\n * @property {table~drawHorizontalLine} drawHorizontalLine\n */\n\n/**\n * Generates a text table.\n *\n * @param {table~row[]} data\n * @param {table~config} userConfig\n * @return {string}\n */\nexport default (data, userConfig = {}) => {\n let cellWidthIndex,\n config,\n rowHeightIndex,\n rows;\n\n validateTableData(data);\n\n rows = stringifyTableData(data);\n\n config = makeConfig(rows, userConfig);\n\n rows = truncateTableData(data, config);\n\n rowHeightIndex = calculateRowHeightIndex(rows, config);\n\n rows = mapDataUsingRowHeightIndex(rows, rowHeightIndex, config);\n rows = alignTableData(rows, config);\n rows = padTableData(rows, config);\n\n cellWidthIndex = calculateCellWidthIndex(rows[0]);\n\n return drawTable(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine);\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["table.js"],"names":[],"mappings":";;;;;;AAAA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgEe,UAAC,IAAD,EAA2B;AAAA,MAApB,UAAoB,yDAAP,EAAO;;AACtC,MAAI,uBAAJ;MACI,eADJ;MAEI,uBAFJ;MAGI,aAHJ;;AAKA,mCAAkB,IAAlB;;AAEA,SAAO,kCAAmB,IAAnB,CAAP;;AAEA,WAAS,0BAAW,IAAX,EAAiB,UAAjB,CAAT;;AAEA,SAAO,iCAAkB,IAAlB,EAAwB,MAAxB,CAAP;;AAEA,mBAAiB,uCAAwB,IAAxB,EAA8B,MAA9B,CAAjB;;AAEA,SAAO,0CAA2B,IAA3B,EAAiC,cAAjC,EAAiD,MAAjD,CAAP;AACA,SAAO,8BAAe,IAAf,EAAqB,MAArB,CAAP;AACA,SAAO,4BAAa,IAAb,EAAmB,MAAnB,CAAP;;AAEA,mBAAiB,uCAAwB,KAAK,CAAL,CAAxB,CAAjB;;AAEA,SAAO,yBAAU,IAAV,EAAgB,OAAO,MAAvB,EAA+B,cAA/B,EAA+C,cAA/C,EAA+D,OAAO,kBAAtE,CAAP;AACH,C","file":"table.js","sourcesContent":["import drawTable from './drawTable';\nimport calculateCellWidthIndex from './calculateCellWidthIndex';\nimport makeConfig from './makeConfig';\nimport calculateRowHeightIndex from './calculateRowHeightIndex';\nimport mapDataUsingRowHeightIndex from './mapDataUsingRowHeightIndex';\nimport alignTableData from './alignTableData';\nimport padTableData from './padTableData';\nimport validateTableData from './validateTableData';\nimport stringifyTableData from './stringifyTableData';\nimport truncateTableData from './truncateTableData';\n\n/**\n * @typedef {string} table~cell\n */\n\n/**\n * @typedef {table~cell[]} table~row\n */\n\n/**\n * @typedef {Object} table~columns\n * @property {string} alignment Cell content alignment (enum: left, center, right) (default: left).\n * @property {number} width Column width (default: auto).\n * @property {number} truncate Number of characters are which the content will be truncated (default: Infinity).\n * @property {number} paddingLeft Cell content padding width left (default: 1).\n * @property {number} paddingRight Cell content padding width right (default: 1).\n */\n\n/**\n * @typedef {Object} table~border\n * @property {string} topBody\n * @property {string} topJoin\n * @property {string} topLeft\n * @property {string} topRight\n * @property {string} bottomBody\n * @property {string} bottomJoin\n * @property {string} bottomLeft\n * @property {string} bottomRight\n * @property {string} bodyLeft\n * @property {string} bodyRight\n * @property {string} bodyJoin\n * @property {string} joinBody\n * @property {string} joinLeft\n * @property {string} joinRight\n * @property {string} joinJoin\n */\n\n/**\n * Used to tell whether to draw a horizontal line.\n * This callback is called for each non-content line of the table.\n * The default behavior is to always return true.\n *\n * @typedef {Function} drawHorizontalLine\n * @param {number} index\n * @param {number} size\n * @return {boolean}\n */\n\n/**\n * @typedef {Object} table~config\n * @property {table~border} border\n * @property {table~columns[]} columns Column specific configuration.\n * @property {table~columns} columnDefault Default values for all columns. Column specific settings overwrite the default values.\n * @property {table~drawHorizontalLine} drawHorizontalLine\n */\n\n/**\n * Generates a text table.\n *\n * @param {table~row[]} data\n * @param {table~config} userConfig\n * @return {string}\n */\nexport default (data, userConfig = {}) => {\n let cellWidthIndex,\n config,\n rowHeightIndex,\n rows;\n\n validateTableData(data);\n\n rows = stringifyTableData(data);\n\n config = makeConfig(rows, userConfig);\n\n rows = truncateTableData(data, config);\n\n rowHeightIndex = calculateRowHeightIndex(rows, config);\n\n rows = mapDataUsingRowHeightIndex(rows, rowHeightIndex, config);\n rows = alignTableData(rows, config);\n rows = padTableData(rows, config);\n\n cellWidthIndex = calculateCellWidthIndex(rows[0]);\n\n return drawTable(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine);\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/truncateTableData.js b/tools/eslint/node_modules/table/dist/truncateTableData.js
index 4b1afc9864..4bc197dd0a 100644
--- a/tools/eslint/node_modules/table/dist/truncateTableData.js
+++ b/tools/eslint/node_modules/table/dist/truncateTableData.js
@@ -1,16 +1,12 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _truncate2 = require('lodash/truncate');
+var _lodash = require('lodash');
-var _truncate3 = _interopRequireDefault(_truncate2);
-
-var _map2 = require('lodash/map');
-
-var _map3 = _interopRequireDefault(_map2);
+var _lodash2 = _interopRequireDefault(_lodash);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -18,18 +14,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @todo Make it work with ASCII content.
* @param {table~row[]} rows
* @param {Object} config
- * @return {table~row[]}
+ * @returns {table~row[]}
*/
-
-exports.default = function (rows, config) {
- return (0, _map3.default)(rows, function (cells) {
- return (0, _map3.default)(cells, function (content, index) {
- return (0, _truncate3.default)(content, {
- length: config.columns[index].truncate
- });
- });
+exports.default = (rows, config) => {
+ return _lodash2.default.map(rows, cells => {
+ return _lodash2.default.map(cells, (content, index) => {
+ return _lodash2.default.truncate(content, {
+ length: config.columns[index].truncate
+ });
});
+ });
};
-module.exports = exports['default'];
-//# sourceMappingURL=truncateTableData.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/truncateTableData.js.map b/tools/eslint/node_modules/table/dist/truncateTableData.js.map
index 1abbb32466..dca05c3b51 100644
--- a/tools/eslint/node_modules/table/dist/truncateTableData.js.map
+++ b/tools/eslint/node_modules/table/dist/truncateTableData.js.map
@@ -1 +1 @@
-{"version":3,"sources":["truncateTableData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;kBAQe,UAAC,IAAI,EAAE,MAAM,EAAK;AAC7B,WAAO,mBAAM,IAAI,EAAE,UAAC,KAAK,EAAK;AAC1B,eAAO,mBAAM,KAAK,EAAE,UAAC,OAAO,EAAE,KAAK,EAAK;AACpC,mBAAO,wBAAW,OAAO,EAAE;AACvB,sBAAM,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ;aACzC,CAAC,CAAC;SACN,CAAC,CAAC;KACN,CAAC,CAAC;CACN","file":"truncateTableData.js","sourcesContent":["import _ from 'lodash';\n\n/**\n * @todo Make it work with ASCII content.\n * @param {table~row[]} rows\n * @param {Object} config\n * @return {table~row[]}\n */\nexport default (rows, config) => {\n return _.map(rows, (cells) => {\n return _.map(cells, (content, index) => {\n return _.truncate(content, {\n length: config.columns[index].truncate\n });\n });\n });\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["truncateTableData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;kBAQe,UAAC,IAAD,EAAO,MAAP,EAAkB;AAC7B,WAAO,mBAAM,IAAN,EAAY,UAAC,KAAD,EAAW;AAC1B,eAAO,mBAAM,KAAN,EAAa,UAAC,OAAD,EAAU,KAAV,EAAoB;AACpC,mBAAO,wBAAW,OAAX,EAAoB;AACvB,wBAAQ,OAAO,OAAP,CAAe,KAAf,EAAsB;AADP,aAApB,CAAP;AAGH,SAJM,CAAP;AAKH,KANM,CAAP;AAOH,C","file":"truncateTableData.js","sourcesContent":["import _ from 'lodash';\n\n/**\n * @todo Make it work with ASCII content.\n * @param {table~row[]} rows\n * @param {Object} config\n * @return {table~row[]}\n */\nexport default (rows, config) => {\n return _.map(rows, (cells) => {\n return _.map(cells, (content, index) => {\n return _.truncate(content, {\n length: config.columns[index].truncate\n });\n });\n });\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/validateConfig.js b/tools/eslint/node_modules/table/dist/validateConfig.js
index f399f37334..965ddc5db4 100644
--- a/tools/eslint/node_modules/table/dist/validateConfig.js
+++ b/tools/eslint/node_modules/table/dist/validateConfig.js
@@ -1,53 +1,62 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
+var _ajv = require('ajv');
+
+var _ajv2 = _interopRequireDefault(_ajv);
+
+var _ajvKeywords = require('ajv-keywords');
+
+var _ajvKeywords2 = _interopRequireDefault(_ajvKeywords);
+
var _config = require('./schemas/config.json');
var _config2 = _interopRequireDefault(_config);
-var _tv = require('tv4');
+var _streamConfig = require('./schemas/streamConfig.json');
-var _tv2 = _interopRequireDefault(_tv);
+var _streamConfig2 = _interopRequireDefault(_streamConfig);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-/**
- * @typedef {string} cell
- */
+const ajv = new _ajv2.default({
+ allErrors: true
+});
-/**
- * @typedef {cell[]} validateData~column
- */
+(0, _ajvKeywords2.default)(ajv, 'typeof');
+
+ajv.addSchema(_config2.default);
+ajv.addSchema(_streamConfig2.default);
/**
+ * @param {string} schemaId
* @param {formatData~config} config
* @returns {undefined}
*/
-exports.default = function () {
- var config = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
-
- var result = undefined;
-
- result = _tv2.default.validateResult(config, _config2.default);
-
- if (!result.valid) {
- /* eslint-disable no-console */
- console.log('config', config);
- console.log('error', {
- message: result.error.message,
- params: result.error.params,
- dataPath: result.error.dataPath,
- schemaPath: result.error.schemaPath
- });
- /* eslint-enable no-console */
-
- throw new Error('Invalid config.');
- }
+exports.default = function (schemaId) {
+ let config = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+
+ if (!ajv.validate(schemaId, config)) {
+ const errors = ajv.errors.map(error => {
+ return {
+ dataPath: error.dataPath,
+ message: error.message,
+ params: error.params,
+ schemaPath: error.schemaPath
+ };
+ });
+
+ /* eslint-disable no-console */
+ console.log('config', config);
+ console.log('errors', errors);
+ /* eslint-enable no-console */
+
+ throw new Error('Invalid config.');
+ }
};
-module.exports = exports['default'];
-//# sourceMappingURL=validateConfig.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/validateConfig.js.map b/tools/eslint/node_modules/table/dist/validateConfig.js.map
index bc9508c73d..ad5e82b80b 100644
--- a/tools/eslint/node_modules/table/dist/validateConfig.js.map
+++ b/tools/eslint/node_modules/table/dist/validateConfig.js.map
@@ -1 +1 @@
-{"version":3,"sources":["validateConfig.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAee,YAAiB;QAAhB,MAAM,yDAAG,EAAE;;AACvB,QAAI,MAAM,YAAA,CAAC;;AAEX,UAAM,GAAG,aAAI,cAAc,CAAC,MAAM,mBAAS,CAAC;;AAE5C,QAAI,CAAC,MAAM,CAAC,KAAK,EAAE;;AAEf,eAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC9B,eAAO,CAAC,GAAG,CAAC,OAAO,EAAE;AACjB,mBAAO,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO;AAC7B,kBAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;AAC3B,oBAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ;AAC/B,sBAAU,EAAE,MAAM,CAAC,KAAK,CAAC,UAAU;SACtC,CAAC;;;AAAC,AAGH,cAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;KACtC;CACJ","file":"validateConfig.js","sourcesContent":["import schema from './schemas/config.json';\nimport tv4 from 'tv4';\n\n/**\n * @typedef {string} cell\n */\n\n/**\n * @typedef {cell[]} validateData~column\n */\n\n/**\n * @param {formatData~config} config\n * @returns {undefined}\n */\nexport default (config = {}) => {\n let result;\n\n result = tv4.validateResult(config, schema);\n\n if (!result.valid) {\n /* eslint-disable no-console */\n console.log('config', config);\n console.log('error', {\n message: result.error.message,\n params: result.error.params,\n dataPath: result.error.dataPath,\n schemaPath: result.error.schemaPath\n });\n /* eslint-enable no-console */\n\n throw new Error('Invalid config.');\n }\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["validateConfig.js"],"names":[],"mappings":";;;;;;AAAA;;;;AACA;;;;;;;;;;;;;;;;;;;kBAce,YAAiB;AAAA,QAAhB,MAAgB,yDAAP,EAAO;;AAC5B,QAAI,eAAJ;;AAEA,aAAS,aAAI,cAAJ,CAAmB,MAAnB,mBAAT;;AAEA,QAAI,CAAC,OAAO,KAAZ,EAAmB;;AAEf,gBAAQ,GAAR,CAAY,QAAZ,EAAsB,MAAtB;AACA,gBAAQ,GAAR,CAAY,OAAZ,EAAqB;AACjB,qBAAS,OAAO,KAAP,CAAa,OADL;AAEjB,oBAAQ,OAAO,KAAP,CAAa,MAFJ;AAGjB,sBAAU,OAAO,KAAP,CAAa,QAHN;AAIjB,wBAAY,OAAO,KAAP,CAAa;AAJR,SAArB;;;AAQA,cAAM,IAAI,KAAJ,CAAU,iBAAV,CAAN;AACH;AACJ,C","file":"validateConfig.js","sourcesContent":["import schema from './schemas/config.json';\nimport tv4 from 'tv4';\n\n/**\n * @typedef {string} cell\n */\n\n/**\n * @typedef {cell[]} validateData~column\n */\n\n/**\n * @param {formatData~config} config\n * @returns {undefined}\n */\nexport default (config = {}) => {\n let result;\n\n result = tv4.validateResult(config, schema);\n\n if (!result.valid) {\n /* eslint-disable no-console */\n console.log('config', config);\n console.log('error', {\n message: result.error.message,\n params: result.error.params,\n dataPath: result.error.dataPath,\n schemaPath: result.error.schemaPath\n });\n /* eslint-enable no-console */\n\n throw new Error('Invalid config.');\n }\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/validateStreamConfig.js b/tools/eslint/node_modules/table/dist/validateStreamConfig.js
index 8123d2ac0f..e5cc85e304 100644
--- a/tools/eslint/node_modules/table/dist/validateStreamConfig.js
+++ b/tools/eslint/node_modules/table/dist/validateStreamConfig.js
@@ -30,7 +30,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
exports.default = function () {
var config = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
- var result = undefined;
+ var result = void 0;
result = _tv2.default.validateResult(config, _streamConfig2.default);
diff --git a/tools/eslint/node_modules/table/dist/validateStreamConfig.js.map b/tools/eslint/node_modules/table/dist/validateStreamConfig.js.map
index 203922c6e3..c43bee9d5f 100644
--- a/tools/eslint/node_modules/table/dist/validateStreamConfig.js.map
+++ b/tools/eslint/node_modules/table/dist/validateStreamConfig.js.map
@@ -1 +1 @@
-{"version":3,"sources":["validateStreamConfig.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAee,YAAiB;QAAhB,MAAM,yDAAG,EAAE;;AACvB,QAAI,MAAM,YAAA,CAAC;;AAEX,UAAM,GAAG,aAAI,cAAc,CAAC,MAAM,yBAAS,CAAC;;AAE5C,QAAI,CAAC,MAAM,CAAC,KAAK,EAAE;;AAEf,eAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC9B,eAAO,CAAC,GAAG,CAAC,OAAO,EAAE;AACjB,mBAAO,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO;AAC7B,kBAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;AAC3B,oBAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ;AAC/B,sBAAU,EAAE,MAAM,CAAC,KAAK,CAAC,UAAU;SACtC,CAAC;;;AAAC,AAGH,cAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;KACtC;CACJ","file":"validateStreamConfig.js","sourcesContent":["import schema from './schemas/streamConfig.json';\nimport tv4 from 'tv4';\n\n/**\n * @typedef {string} cell\n */\n\n/**\n * @typedef {cell[]} validateData~column\n */\n\n/**\n * @param {formatData~config} config\n * @returns {undefined}\n */\nexport default (config = {}) => {\n let result;\n\n result = tv4.validateResult(config, schema);\n\n if (!result.valid) {\n /* eslint-disable no-console */\n console.log('config', config);\n console.log('error', {\n message: result.error.message,\n params: result.error.params,\n dataPath: result.error.dataPath,\n schemaPath: result.error.schemaPath\n });\n /* eslint-enable no-console */\n\n throw new Error('Invalid config.');\n }\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["validateStreamConfig.js"],"names":[],"mappings":";;;;;;AAAA;;;;AACA;;;;;;;;;;;;;;;;;;;kBAce,YAAiB;AAAA,QAAhB,MAAgB,yDAAP,EAAO;;AAC5B,QAAI,eAAJ;;AAEA,aAAS,aAAI,cAAJ,CAAmB,MAAnB,yBAAT;;AAEA,QAAI,CAAC,OAAO,KAAZ,EAAmB;;AAEf,gBAAQ,GAAR,CAAY,QAAZ,EAAsB,MAAtB;AACA,gBAAQ,GAAR,CAAY,OAAZ,EAAqB;AACjB,qBAAS,OAAO,KAAP,CAAa,OADL;AAEjB,oBAAQ,OAAO,KAAP,CAAa,MAFJ;AAGjB,sBAAU,OAAO,KAAP,CAAa,QAHN;AAIjB,wBAAY,OAAO,KAAP,CAAa;AAJR,SAArB;;;AAQA,cAAM,IAAI,KAAJ,CAAU,iBAAV,CAAN;AACH;AACJ,C","file":"validateStreamConfig.js","sourcesContent":["import schema from './schemas/streamConfig.json';\nimport tv4 from 'tv4';\n\n/**\n * @typedef {string} cell\n */\n\n/**\n * @typedef {cell[]} validateData~column\n */\n\n/**\n * @param {formatData~config} config\n * @returns {undefined}\n */\nexport default (config = {}) => {\n let result;\n\n result = tv4.validateResult(config, schema);\n\n if (!result.valid) {\n /* eslint-disable no-console */\n console.log('config', config);\n console.log('error', {\n message: result.error.message,\n params: result.error.params,\n dataPath: result.error.dataPath,\n schemaPath: result.error.schemaPath\n });\n /* eslint-enable no-console */\n\n throw new Error('Invalid config.');\n }\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/validateTableData.js b/tools/eslint/node_modules/table/dist/validateTableData.js
index 98353ac02c..4f71f39a56 100644
--- a/tools/eslint/node_modules/table/dist/validateTableData.js
+++ b/tools/eslint/node_modules/table/dist/validateTableData.js
@@ -1,16 +1,12 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _forEach2 = require('lodash/forEach');
+var _lodash = require('lodash');
-var _forEach3 = _interopRequireDefault(_forEach2);
-
-var _isArray2 = require('lodash/isArray');
-
-var _isArray3 = _interopRequireDefault(_isArray2);
+var _lodash2 = _interopRequireDefault(_lodash);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -26,42 +22,38 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @param {column[]} rows
* @returns {undefined}
*/
+exports.default = rows => {
+ if (!_lodash2.default.isArray(rows)) {
+ throw new Error('Table data must be an array.');
+ }
-exports.default = function (rows) {
- var columnNumber = undefined;
+ if (rows.length === 0) {
+ throw new Error('Table must define at least one row.');
+ }
- if (!(0, _isArray3.default)(rows)) {
- throw new Error('Table data must be an array.');
- }
+ if (rows[0].length === 0) {
+ throw new Error('Table must define at least one column.');
+ }
- if (rows.length === 0) {
- throw new Error('Table must define at least one row.');
- }
+ const columnNumber = rows[0].length;
- if (rows[0].length === 0) {
- throw new Error('Table must define at least one column.');
+ _lodash2.default.forEach(rows, cells => {
+ if (!_lodash2.default.isArray(cells)) {
+ throw new Error('Table row data must be an array.');
}
- columnNumber = rows[0].length;
-
- (0, _forEach3.default)(rows, function (cells) {
- if (!(0, _isArray3.default)(cells)) {
- throw new Error('Table row data must be an array.');
- }
-
- if (cells.length !== columnNumber) {
- throw new Error('Table must have a consistent number of cells.');
- }
+ if (cells.length !== columnNumber) {
+ throw new Error('Table must have a consistent number of cells.');
+ }
- // @todo Make an exception for newline characters.
- // @see https://github.com/gajus/table/issues/9
- (0, _forEach3.default)(cells, function (cell) {
- if (/[\x01-\x1A]/.test(cell)) {
- throw new Error('Table data must not contain control characters.');
- }
- });
+ // @todo Make an exception for newline characters.
+ // @see https://github.com/gajus/table/issues/9
+ _lodash2.default.forEach(cells, cell => {
+ if (/[\x01-\x1A]/.test(cell)) {
+ throw new Error('Table data must not contain control characters.');
+ }
});
+ });
};
-module.exports = exports['default'];
-//# sourceMappingURL=validateTableData.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/validateTableData.js.map b/tools/eslint/node_modules/table/dist/validateTableData.js.map
index fb4b905a57..92092051fa 100644
--- a/tools/eslint/node_modules/table/dist/validateTableData.js.map
+++ b/tools/eslint/node_modules/table/dist/validateTableData.js.map
@@ -1 +1 @@
-{"version":3,"sources":["validateTableData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAce,UAAC,IAAI,EAAK;AACrB,QAAI,YAAY,YAAA,CAAC;;AAEjB,QAAI,CAAC,uBAAU,IAAI,CAAC,EAAE;AAClB,cAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;KACnD;;AAED,QAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;AACnB,cAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KAC1D;;AAED,QAAI,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;AACtB,cAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;KAC7D;;AAED,gBAAY,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;;AAE9B,2BAAU,IAAI,EAAE,UAAC,KAAK,EAAK;AACvB,YAAI,CAAC,uBAAU,KAAK,CAAC,EAAE;AACnB,kBAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;SACvD;;AAED,YAAI,KAAK,CAAC,MAAM,KAAK,YAAY,EAAE;AAC/B,kBAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;SACpE;;;;AAAA,AAID,+BAAU,KAAK,EAAE,UAAC,IAAI,EAAK;AACvB,gBAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AAC1B,sBAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;aACtE;SACJ,CAAC,CAAC;KACN,CAAC,CAAC;CACN","file":"validateTableData.js","sourcesContent":["import _ from 'lodash';\n\n/**\n * @typedef {string} cell\n */\n\n/**\n * @typedef {cell[]} validateData~column\n */\n\n/**\n * @param {column[]} rows\n * @returns {undefined}\n */\nexport default (rows) => {\n let columnNumber;\n\n if (!_.isArray(rows)) {\n throw new Error('Table data must be an array.');\n }\n\n if (rows.length === 0) {\n throw new Error('Table must define at least one row.');\n }\n\n if (rows[0].length === 0) {\n throw new Error('Table must define at least one column.');\n }\n\n columnNumber = rows[0].length;\n\n _.forEach(rows, (cells) => {\n if (!_.isArray(cells)) {\n throw new Error('Table row data must be an array.');\n }\n\n if (cells.length !== columnNumber) {\n throw new Error('Table must have a consistent number of cells.');\n }\n\n // @todo Make an exception for newline characters.\n // @see https://github.com/gajus/table/issues/9\n _.forEach(cells, (cell) => {\n if (/[\\x01-\\x1A]/.test(cell)) {\n throw new Error('Table data must not contain control characters.');\n }\n });\n });\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["validateTableData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAce,UAAC,IAAD,EAAU;AACrB,QAAI,qBAAJ;;AAEA,QAAI,CAAC,uBAAU,IAAV,CAAL,EAAsB;AAClB,cAAM,IAAI,KAAJ,CAAU,8BAAV,CAAN;AACH;;AAED,QAAI,KAAK,MAAL,KAAgB,CAApB,EAAuB;AACnB,cAAM,IAAI,KAAJ,CAAU,qCAAV,CAAN;AACH;;AAED,QAAI,KAAK,CAAL,EAAQ,MAAR,KAAmB,CAAvB,EAA0B;AACtB,cAAM,IAAI,KAAJ,CAAU,wCAAV,CAAN;AACH;;AAED,mBAAe,KAAK,CAAL,EAAQ,MAAvB;;AAEA,2BAAU,IAAV,EAAgB,UAAC,KAAD,EAAW;AACvB,YAAI,CAAC,uBAAU,KAAV,CAAL,EAAuB;AACnB,kBAAM,IAAI,KAAJ,CAAU,kCAAV,CAAN;AACH;;AAED,YAAI,MAAM,MAAN,KAAiB,YAArB,EAAmC;AAC/B,kBAAM,IAAI,KAAJ,CAAU,+CAAV,CAAN;AACH;;;;AAID,+BAAU,KAAV,EAAiB,UAAC,IAAD,EAAU;AACvB,gBAAI,cAAc,IAAd,CAAmB,IAAnB,CAAJ,EAA8B;AAC1B,sBAAM,IAAI,KAAJ,CAAU,iDAAV,CAAN;AACH;AACJ,SAJD;AAKH,KAhBD;AAiBH,C","file":"validateTableData.js","sourcesContent":["import _ from 'lodash';\n\n/**\n * @typedef {string} cell\n */\n\n/**\n * @typedef {cell[]} validateData~column\n */\n\n/**\n * @param {column[]} rows\n * @returns {undefined}\n */\nexport default (rows) => {\n let columnNumber;\n\n if (!_.isArray(rows)) {\n throw new Error('Table data must be an array.');\n }\n\n if (rows.length === 0) {\n throw new Error('Table must define at least one row.');\n }\n\n if (rows[0].length === 0) {\n throw new Error('Table must define at least one column.');\n }\n\n columnNumber = rows[0].length;\n\n _.forEach(rows, (cells) => {\n if (!_.isArray(cells)) {\n throw new Error('Table row data must be an array.');\n }\n\n if (cells.length !== columnNumber) {\n throw new Error('Table must have a consistent number of cells.');\n }\n\n // @todo Make an exception for newline characters.\n // @see https://github.com/gajus/table/issues/9\n _.forEach(cells, (cell) => {\n if (/[\\x01-\\x1A]/.test(cell)) {\n throw new Error('Table data must not contain control characters.');\n }\n });\n });\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/wrapString.js b/tools/eslint/node_modules/table/dist/wrapString.js
index f61b81a81d..d511845582 100644
--- a/tools/eslint/node_modules/table/dist/wrapString.js
+++ b/tools/eslint/node_modules/table/dist/wrapString.js
@@ -1,12 +1,12 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _trim2 = require('lodash/trim');
+var _lodash = require('lodash');
-var _trim3 = _interopRequireDefault(_trim2);
+var _lodash2 = _interopRequireDefault(_lodash);
var _sliceAnsi = require('slice-ansi');
@@ -29,23 +29,20 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @param {number} size
* @returns {Array}
*/
+exports.default = (subject, size) => {
+ let subjectSlice;
-exports.default = function (subject, size) {
- var chunks = undefined,
- subjectSlice = undefined;
+ subjectSlice = subject;
- subjectSlice = subject;
+ const chunks = [];
- chunks = [];
+ do {
+ chunks.push((0, _sliceAnsi2.default)(subjectSlice, 0, size));
- do {
- chunks.push((0, _sliceAnsi2.default)(subjectSlice, 0, size));
+ subjectSlice = _lodash2.default.trim((0, _sliceAnsi2.default)(subjectSlice, size));
+ } while ((0, _stringWidth2.default)(subjectSlice));
- subjectSlice = (0, _trim3.default)((0, _sliceAnsi2.default)(subjectSlice, size));
- } while ((0, _stringWidth2.default)(subjectSlice));
-
- return chunks;
+ return chunks;
};
-module.exports = exports['default'];
-//# sourceMappingURL=wrapString.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/wrapString.js.map b/tools/eslint/node_modules/table/dist/wrapString.js.map
index 11c52bcebc..0ba89f7ddd 100644
--- a/tools/eslint/node_modules/table/dist/wrapString.js.map
+++ b/tools/eslint/node_modules/table/dist/wrapString.js.map
@@ -1 +1 @@
-{"version":3,"sources":["wrapString.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAee,UAAC,OAAO,EAAE,IAAI,EAAK;AAC9B,QAAI,MAAM,YAAA;QACN,YAAY,YAAA,CAAC;;AAEjB,gBAAY,GAAG,OAAO,CAAC;;AAEvB,UAAM,GAAG,EAAE,CAAC;;AAEZ,OAAG;AACC,cAAM,CAAC,IAAI,CAAC,yBAAM,YAAY,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;;AAE1C,oBAAY,GAAG,oBAAO,yBAAM,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;KACpD,QAAQ,2BAAY,YAAY,CAAC,EAAE;;AAEpC,WAAO,MAAM,CAAC;CACjB","file":"wrapString.js","sourcesContent":["import _ from 'lodash';\nimport slice from 'slice-ansi';\nimport stringWidth from 'string-width';\n\n/**\n * Creates an array of strings split into groups the length of size.\n * This function works with strings that contain ASCII characters.\n *\n * wrapText is different from would-be \"chunk\" implementation\n * in that whitespace characters that occur on a chunk size limit are trimmed.\n *\n * @param {string} subject\n * @param {number} size\n * @returns {Array}\n */\nexport default (subject, size) => {\n let chunks,\n subjectSlice;\n\n subjectSlice = subject;\n\n chunks = [];\n\n do {\n chunks.push(slice(subjectSlice, 0, size));\n\n subjectSlice = _.trim(slice(subjectSlice, size));\n } while (stringWidth(subjectSlice));\n\n return chunks;\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["wrapString.js"],"names":[],"mappings":";;;;;;;;;;AACA;;;;AACA;;;;;;;;;;;;;;;;;;kBAae,UAAC,OAAD,EAAU,IAAV,EAAmB;AAC9B,QAAI,eAAJ;QACI,qBADJ;;AAGA,mBAAe,OAAf;;AAEA,aAAS,EAAT;;AAEA,OAAG;AACC,eAAO,IAAP,CAAY,yBAAM,YAAN,EAAoB,CAApB,EAAuB,IAAvB,CAAZ;;AAEA,uBAAe,oBAAO,yBAAM,YAAN,EAAoB,IAApB,CAAP,CAAf;AACH,KAJD,QAIS,2BAAY,YAAZ,CAJT;;AAMA,WAAO,MAAP;AACH,C","file":"wrapString.js","sourcesContent":["import _ from 'lodash';\nimport slice from 'slice-ansi';\nimport stringWidth from 'string-width';\n\n/**\n * Creates an array of strings split into groups the length of size.\n * This function works with strings that contain ASCII characters.\n *\n * wrapText is different from would-be \"chunk\" implementation\n * in that whitespace characters that occur on a chunk size limit are trimmed.\n *\n * @param {string} subject\n * @param {number} size\n * @returns {Array}\n */\nexport default (subject, size) => {\n let chunks,\n subjectSlice;\n\n subjectSlice = subject;\n\n chunks = [];\n\n do {\n chunks.push(slice(subjectSlice, 0, size));\n\n subjectSlice = _.trim(slice(subjectSlice, size));\n } while (stringWidth(subjectSlice));\n\n return chunks;\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/wrapWord.js b/tools/eslint/node_modules/table/dist/wrapWord.js
index e1d0714b90..f994f96e7b 100644
--- a/tools/eslint/node_modules/table/dist/wrapWord.js
+++ b/tools/eslint/node_modules/table/dist/wrapWord.js
@@ -1,12 +1,12 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
-var _trim2 = require('lodash/trim');
+var _lodash = require('lodash');
-var _trim3 = _interopRequireDefault(_trim2);
+var _lodash2 = _interopRequireDefault(_lodash);
var _sliceAnsi = require('slice-ansi');
@@ -23,41 +23,36 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @param {number} size
* @returns {Array}
*/
+exports.default = (input, size) => {
+ let subject;
-exports.default = function (input, size) {
- var chunk = undefined,
- chunks = undefined,
- re = undefined,
- subject = undefined;
+ subject = input;
- subject = input;
+ const chunks = [];
- chunks = [];
+ // https://regex101.com/r/gY5kZ1/1
+ const re = new RegExp('(^.{1,' + size + '}(\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\|/|_|\\.|,|;|-))');
- // https://regex101.com/r/gY5kZ1/1
- re = new RegExp('(^.{1,' + size + '}(\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\|/|_|\\.|,|;|\-))');
+ do {
+ let chunk;
- do {
- chunk = subject.match(re);
+ chunk = subject.match(re);
- // console.log('chunk', chunk, re);
+ if (chunk) {
+ chunk = chunk[0];
- if (chunk) {
- chunk = chunk[0];
+ subject = (0, _sliceAnsi2.default)(subject, (0, _stringWidth2.default)(chunk));
- subject = (0, _sliceAnsi2.default)(subject, (0, _stringWidth2.default)(chunk));
+ chunk = _lodash2.default.trim(chunk);
+ } else {
+ chunk = (0, _sliceAnsi2.default)(subject, 0, size);
+ subject = (0, _sliceAnsi2.default)(subject, size);
+ }
- chunk = (0, _trim3.default)(chunk);
- } else {
- chunk = (0, _sliceAnsi2.default)(subject, 0, size);
- subject = (0, _sliceAnsi2.default)(subject, size);
- }
+ chunks.push(chunk);
+ } while ((0, _stringWidth2.default)(subject));
- chunks.push(chunk);
- } while ((0, _stringWidth2.default)(subject));
-
- return chunks;
+ return chunks;
};
-module.exports = exports['default'];
-//# sourceMappingURL=wrapWord.js.map
+module.exports = exports['default']; \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/dist/wrapWord.js.map b/tools/eslint/node_modules/table/dist/wrapWord.js.map
index 16231f4a4d..92e36ba776 100644
--- a/tools/eslint/node_modules/table/dist/wrapWord.js.map
+++ b/tools/eslint/node_modules/table/dist/wrapWord.js.map
@@ -1 +1 @@
-{"version":3,"sources":["wrapWord.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;kBASe,UAAC,KAAK,EAAE,IAAI,EAAK;AAC5B,QAAI,KAAK,YAAA;QACL,MAAM,YAAA;QACN,EAAE,YAAA;QACF,OAAO,YAAA,CAAC;;AAEZ,WAAO,GAAG,KAAK,CAAC;;AAEhB,UAAM,GAAG,EAAE;;;AAAC,AAGZ,MAAE,GAAG,IAAI,MAAM,CAAC,QAAQ,GAAG,IAAI,GAAG,mBAAmB,IAAI,IAAI,GAAG,CAAC,CAAA,AAAC,GAAG,yBAAyB,CAAC,CAAC;;AAEhG,OAAG;AACC,aAAK,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;;;;AAAC,AAI1B,YAAI,KAAK,EAAE;AACP,iBAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;;AAEjB,mBAAO,GAAG,yBAAM,OAAO,EAAE,2BAAY,KAAK,CAAC,CAAC,CAAC;;AAE7C,iBAAK,GAAG,oBAAO,KAAK,CAAC,CAAC;SACzB,MAAM;AACH,iBAAK,GAAG,yBAAM,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;AAChC,mBAAO,GAAG,yBAAM,OAAO,EAAE,IAAI,CAAC,CAAC;SAClC;;AAED,cAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACtB,QAAQ,2BAAY,OAAO,CAAC,EAAE;;AAE/B,WAAO,MAAM,CAAC;CACjB","file":"wrapWord.js","sourcesContent":["import _ from 'lodash';\nimport slice from 'slice-ansi';\nimport stringWidth from 'string-width';\n\n/**\n * @param {string} input\n * @param {number} size\n * @returns {Array}\n */\nexport default (input, size) => {\n let chunk,\n chunks,\n re,\n subject;\n\n subject = input;\n\n chunks = [];\n\n // https://regex101.com/r/gY5kZ1/1\n re = new RegExp('(^.{1,' + size + '}(\\\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\\\\\|/|_|\\\\.|,|;|\\-))');\n\n do {\n chunk = subject.match(re);\n\n // console.log('chunk', chunk, re);\n\n if (chunk) {\n chunk = chunk[0];\n\n subject = slice(subject, stringWidth(chunk));\n\n chunk = _.trim(chunk);\n } else {\n chunk = slice(subject, 0, size);\n subject = slice(subject, size);\n }\n\n chunks.push(chunk);\n } while (stringWidth(subject));\n\n return chunks;\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file
+{"version":3,"sources":["wrapWord.js"],"names":[],"mappings":";;;;;;;;;;AACA;;;;AACA;;;;;;;;;;;;kBAOe,UAAC,KAAD,EAAQ,IAAR,EAAiB;AAC5B,QAAI,cAAJ;QACI,eADJ;QAEI,WAFJ;QAGI,gBAHJ;;AAKA,cAAU,KAAV;;AAEA,aAAS,EAAT;;;AAGA,SAAK,IAAI,MAAJ,CAAW,WAAW,IAAX,GAAkB,mBAAlB,IAAyC,OAAO,CAAhD,IAAqD,yBAAhE,CAAL;;AAEA,OAAG;AACC,gBAAQ,QAAQ,KAAR,CAAc,EAAd,CAAR;;;;AAIA,YAAI,KAAJ,EAAW;AACP,oBAAQ,MAAM,CAAN,CAAR;;AAEA,sBAAU,yBAAM,OAAN,EAAe,2BAAY,KAAZ,CAAf,CAAV;;AAEA,oBAAQ,oBAAO,KAAP,CAAR;AACH,SAND,MAMO;AACH,oBAAQ,yBAAM,OAAN,EAAe,CAAf,EAAkB,IAAlB,CAAR;AACA,sBAAU,yBAAM,OAAN,EAAe,IAAf,CAAV;AACH;;AAED,eAAO,IAAP,CAAY,KAAZ;AACH,KAjBD,QAiBS,2BAAY,OAAZ,CAjBT;;AAmBA,WAAO,MAAP;AACH,C","file":"wrapWord.js","sourcesContent":["import _ from 'lodash';\nimport slice from 'slice-ansi';\nimport stringWidth from 'string-width';\n\n/**\n * @param {string} input\n * @param {number} size\n * @returns {Array}\n */\nexport default (input, size) => {\n let chunk,\n chunks,\n re,\n subject;\n\n subject = input;\n\n chunks = [];\n\n // https://regex101.com/r/gY5kZ1/1\n re = new RegExp('(^.{1,' + size + '}(\\\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\\\\\|/|_|\\\\.|,|;|\\-))');\n\n do {\n chunk = subject.match(re);\n\n // console.log('chunk', chunk, re);\n\n if (chunk) {\n chunk = chunk[0];\n\n subject = slice(subject, stringWidth(chunk));\n\n chunk = _.trim(chunk);\n } else {\n chunk = slice(subject, 0, size);\n subject = slice(subject, size);\n }\n\n chunks.push(chunk);\n } while (stringWidth(subject));\n\n return chunks;\n};\n"]} \ No newline at end of file
diff --git a/tools/eslint/node_modules/table/package.json b/tools/eslint/node_modules/table/package.json
index cdb89c23fe..fb2f250fa0 100644
--- a/tools/eslint/node_modules/table/package.json
+++ b/tools/eslint/node_modules/table/package.json
@@ -14,16 +14,19 @@
]
],
"_from": "table@>=3.7.8 <4.0.0",
- "_id": "table@3.7.8",
+ "_id": "table@3.8.0",
"_inCache": true,
- "_installable": true,
"_location": "/table",
- "_nodeVersion": "5.3.0",
+ "_nodeVersion": "6.4.0",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/table-3.8.0.tgz_1474139512457_0.8613335366826504"
+ },
"_npmUser": {
"name": "gajus",
"email": "gajus@gajus.com"
},
- "_npmVersion": "3.5.2",
+ "_npmVersion": "3.10.3",
"_phantomChildren": {},
"_requested": {
"raw": "table@^3.7.8",
@@ -37,8 +40,8 @@
"_requiredBy": [
"/eslint"
],
- "_resolved": "https://registry.npmjs.org/table/-/table-3.7.8.tgz",
- "_shasum": "b424433ef596851922b2fd77224a69a1951618eb",
+ "_resolved": "https://registry.npmjs.org/table/-/table-3.8.0.tgz",
+ "_shasum": "252166c7f3286684a9d561b0f3a8929caf3a997b",
"_shrinkwrap": null,
"_spec": "table@^3.7.8",
"_where": "/Users/trott/io.js/tools/node_modules/eslint",
@@ -51,29 +54,33 @@
"url": "https://github.com/gajus/table/issues"
},
"dependencies": {
- "bluebird": "^3.1.1",
+ "ajv": "^4.7.0",
+ "ajv-keywords": "^1.0.0",
"chalk": "^1.1.1",
"lodash": "^4.0.0",
"slice-ansi": "0.0.4",
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.0",
- "tv4": "^1.2.7",
- "xregexp": "^3.0.0"
+ "string-width": "^1.0.1"
},
"description": "Formats data into a string table.",
"devDependencies": {
+ "babel": "^6.5.2",
+ "babel-cli": "^6.14.0",
+ "babel-plugin-add-module-exports": "^0.2.1",
+ "babel-preset-es2015-node4": "^2.1.0",
+ "babel-register": "^6.14.0",
"chai": "^3.4.1",
+ "eslint": "^3.5.0",
+ "eslint-config-canonical": "^1.8.6",
"gitdown": "^2.4.0",
- "jsonlint": "^1.6.2",
- "pragmatist": "^3.0.2",
+ "mocha": "^3.0.2",
"sinon": "^1.17.2"
},
"directories": {},
"dist": {
- "shasum": "b424433ef596851922b2fd77224a69a1951618eb",
- "tarball": "https://registry.npmjs.org/table/-/table-3.7.8.tgz"
+ "shasum": "252166c7f3286684a9d561b0f3a8929caf3a997b",
+ "tarball": "https://registry.npmjs.org/table/-/table-3.8.0.tgz"
},
- "gitHead": "7464b27999c5c6da43c754fb5f94931423d41839",
+ "gitHead": "076dd77627213007a989b2c845fa2f3a38896eeb",
"homepage": "https://github.com/gajus/table#readme",
"keywords": [
"ascii",
@@ -98,13 +105,10 @@
"url": "git+https://github.com/gajus/table.git"
},
"scripts": {
- "build": "npm run pragmatist build -- --es5",
- "format-config": "npm run format-json ./package.json",
- "format-json": "jsonlint --sort-keys --in-place --indent ' '",
- "lint": "npm run pragmatist lint",
- "pragmatist": "pragmatist",
- "readme": "node ./node_modules/.bin/gitdown ./.README/README.md --output-file ./README.md",
- "test": "npm run pragmatist test"
+ "build": "babel --copy-files ./src --out-dir ./dist",
+ "lint": "eslint ./src ./tests",
+ "readme": "gitdown ./.README/README.md --output-file ./README.md",
+ "test": "mocha --compilers js:babel-register"
},
- "version": "3.7.8"
+ "version": "3.8.0"
}
diff --git a/tools/eslint/node_modules/text-table/package.json b/tools/eslint/node_modules/text-table/package.json
index 8495151d0d..8df7763bc6 100644
--- a/tools/eslint/node_modules/text-table/package.json
+++ b/tools/eslint/node_modules/text-table/package.json
@@ -16,7 +16,6 @@
"_from": "text-table@>=0.2.0 <0.3.0",
"_id": "text-table@0.2.0",
"_inCache": true,
- "_installable": true,
"_location": "/text-table",
"_npmUser": {
"name": "substack",
diff --git a/tools/eslint/node_modules/through/package.json b/tools/eslint/node_modules/through/package.json
index bc1b1af6d4..84425436d0 100644
--- a/tools/eslint/node_modules/through/package.json
+++ b/tools/eslint/node_modules/through/package.json
@@ -16,7 +16,6 @@
"_from": "through@>=2.3.6 <3.0.0",
"_id": "through@2.3.8",
"_inCache": true,
- "_installable": true,
"_location": "/through",
"_nodeVersion": "2.3.1",
"_npmUser": {
diff --git a/tools/eslint/node_modules/tryit/package.json b/tools/eslint/node_modules/tryit/package.json
index a213cde54a..7a7a28b076 100644
--- a/tools/eslint/node_modules/tryit/package.json
+++ b/tools/eslint/node_modules/tryit/package.json
@@ -16,7 +16,6 @@
"_from": "tryit@>=1.0.1 <2.0.0",
"_id": "tryit@1.0.2",
"_inCache": true,
- "_installable": true,
"_location": "/tryit",
"_nodeVersion": "4.1.0",
"_npmUser": {
diff --git a/tools/eslint/node_modules/tv4/LICENSE.txt b/tools/eslint/node_modules/tv4/LICENSE.txt
deleted file mode 100644
index f421228be3..0000000000
--- a/tools/eslint/node_modules/tv4/LICENSE.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
-Author: Geraint Luff and others
-Year: 2013
-
-This code is released into the "public domain" by its author(s). Anybody may use, alter and distribute the code without restriction. The author makes no guarantees, and takes no liability of any kind for use of this code.
-
-If you find a bug or make an improvement, it would be courteous to let the author know, but it is not compulsory.
-*/ \ No newline at end of file
diff --git a/tools/eslint/node_modules/tv4/README.md b/tools/eslint/node_modules/tv4/README.md
deleted file mode 100644
index 3ffa761546..0000000000
--- a/tools/eslint/node_modules/tv4/README.md
+++ /dev/null
@@ -1,468 +0,0 @@
-# Tiny Validator (for v4 JSON Schema)
-
-[![Build Status](https://secure.travis-ci.org/geraintluff/tv4.svg?branch=master)](http://travis-ci.org/geraintluff/tv4) [![Dependency Status](https://gemnasium.com/geraintluff/tv4.svg)](https://gemnasium.com/geraintluff/tv4) [![NPM version](https://badge.fury.io/js/tv4.svg)](http://badge.fury.io/js/tv4)
-
-Use [json-schema](http://json-schema.org/) [draft v4](http://json-schema.org/latest/json-schema-core.html) to validate simple values and complex objects using a rich [validation vocabulary](http://json-schema.org/latest/json-schema-validation.html) ([examples](http://json-schema.org/examples.html)).
-
-There is support for `$ref` with JSON Pointer fragment paths (```other-schema.json#/properties/myKey```).
-
-## Usage 1: Simple validation
-
-```javascript
-var valid = tv4.validate(data, schema);
-```
-
-If validation returns ```false```, then an explanation of why validation failed can be found in ```tv4.error```.
-
-The error object will look something like:
-```json
-{
- "code": 0,
- "message": "Invalid type: string",
- "dataPath": "/intKey",
- "schemaPath": "/properties/intKey/type"
-}
-```
-
-The `"code"` property will refer to one of the values in `tv4.errorCodes` - in this case, `tv4.errorCodes.INVALID_TYPE`.
-
-To enable external schema to be referenced, you use:
-```javascript
-tv4.addSchema(url, schema);
-```
-
-If schemas are referenced (```$ref```) but not known, then validation will return ```true``` and the missing schema(s) will be listed in ```tv4.missing```. For more info see the API documentation below.
-
-## Usage 2: Multi-threaded validation
-
-Storing the error and missing schemas does not work well in multi-threaded environments, so there is an alternative syntax:
-
-```javascript
-var result = tv4.validateResult(data, schema);
-```
-
-The result will look something like:
-```json
-{
- "valid": false,
- "error": {...},
- "missing": [...]
-}
-```
-
-## Usage 3: Multiple errors
-
-Normally, `tv4` stops when it encounters the first validation error. However, you can collect an array of validation errors using:
-
-```javascript
-var result = tv4.validateMultiple(data, schema);
-```
-
-The result will look something like:
-```json
-{
- "valid": false,
- "errors": [
- {...},
- ...
- ],
- "missing": [...]
-}
-```
-
-## Asynchronous validation
-
-Support for asynchronous validation (where missing schemas are fetched) can be added by including an extra JavaScript file. Currently, the only version requires jQuery (`tv4.async-jquery.js`), but the code is very short and should be fairly easy to modify for other libraries (such as MooTools).
-
-Usage:
-
-```javascript
-tv4.validate(data, schema, function (isValid, validationError) { ... });
-```
-
-`validationFailure` is simply taken from `tv4.error`.
-
-## Cyclical JavaScript objects
-
-While they don't occur in proper JSON, JavaScript does support self-referencing objects. Any of the above calls support an optional third argument: `checkRecursive`. If true, tv4 will handle self-referencing objects properly - this slows down validation slightly, but that's better than a hanging script.
-
-Consider this data, notice how both `a` and `b` refer to each other:
-
-```javascript
-var a = {};
-var b = { a: a };
-a.b = b;
-var aSchema = { properties: { b: { $ref: 'bSchema' }}};
-var bSchema = { properties: { a: { $ref: 'aSchema' }}};
-tv4.addSchema('aSchema', aSchema);
-tv4.addSchema('bSchema', bSchema);
-```
-
-If the `checkRecursive` argument were missing, this would throw a "too much recursion" error.
-
-To enable support for this, pass `true` as additional argument to any of the regular validation methods:
-
-```javascript
-tv4.validate(a, aSchema, true);
-tv4.validateResult(data, aSchema, true);
-tv4.validateMultiple(data, aSchema, true);
-```
-
-## The `banUnknownProperties` flag
-
-Sometimes, it is desirable to flag all unknown properties as an error. This is especially useful during development, to catch typos and the like, even when extra custom-defined properties are allowed.
-
-As such, tv4 implements ["ban unknown properties" mode](https://github.com/json-schema/json-schema/wiki/ban-unknown-properties-mode-\(v5-proposal\)), enabled by a fourth-argument flag:
-
-```javascript
-tv4.validate(data, schema, checkRecursive, true);
-tv4.validateResult(data, schema, checkRecursive, true);
-tv4.validateMultiple(data, schema, checkRecursive, true);
-```
-
-## API
-
-There are additional api commands available for more complex use-cases:
-
-##### addSchema(uri, schema)
-Pre-register a schema for reference by other schema and synchronous validation.
-
-````js
-tv4.addSchema('http://example.com/schema', { ... });
-````
-
-* `uri` the uri to identify this schema.
-* `schema` the schema object.
-
-Schemas that have their `id` property set can be added directly.
-
-````js
-tv4.addSchema({ ... });
-````
-
-##### getSchema(uri)
-
-Return a schema from the cache.
-
-* `uri` the uri of the schema (may contain a `#` fragment)
-
-````js
-var schema = tv4.getSchema('http://example.com/schema');
-````
-
-##### getSchemaMap()
-
-Return a shallow copy of the schema cache, mapping schema document URIs to schema objects.
-
-````
-var map = tv4.getSchemaMap();
-
-var schema = map[uri];
-````
-
-##### getSchemaUris(filter)
-
-Return an Array with known schema document URIs.
-
-* `filter` optional RegExp to filter URIs
-
-````
-var arr = tv4.getSchemaUris();
-
-// optional filter using a RegExp
-var arr = tv4.getSchemaUris(/^https?://example.com/);
-````
-
-##### getMissingUris(filter)
-
-Return an Array with schema document URIs that are used as `$ref` in known schemas but which currently have no associated schema data.
-
-Use this in combination with `tv4.addSchema(uri, schema)` to preload the cache for complete synchronous validation with.
-
-* `filter` optional RegExp to filter URIs
-
-````
-var arr = tv4.getMissingUris();
-
-// optional filter using a RegExp
-var arr = tv4.getMissingUris(/^https?://example.com/);
-````
-
-##### dropSchemas()
-
-Drop all known schema document URIs from the cache.
-
-````
-tv4.dropSchemas();
-````
-
-##### freshApi()
-
-Return a new tv4 instance with no shared state.
-
-````
-var otherTV4 = tv4.freshApi();
-````
-
-##### reset()
-
-Manually reset validation status from the simple `tv4.validate(data, schema)`. Although tv4 will self reset on each validation there are some implementation scenarios where this is useful.
-
-````
-tv4.reset();
-````
-
-##### setErrorReporter(reporter)
-
-Sets a custom error reporter. This is a function that accepts three arguments, and returns an error message (string):
-
-```
-tv4.setErrorReporter(function (error, data, schema) {
- return "Error code: " + error.code;
-});
-```
-
-The `error` object already has everything aside from the `.message` property filled in (so you can use `error.params`, `error.dataPath`, `error.schemaPath` etc.).
-
-If nothing is returned (or the empty string), then it falls back to the default error reporter. To remove a custom error reporter, call `tv4.setErrorReporter(null)`.
-
-##### language(code)
-
-Sets the language used by the default error reporter.
-
-* `code` is a language code, like `'en'` or `'en-gb'`
-
-````
-tv4.language('en-gb');
-````
-
-If you specify a multi-level language code (e.g. `fr-CH`), then it will fall back to the generic version (`fr`) if needed.
-
-##### addLanguage(code, map)
-
-Add a new template-based language map for the default error reporter (used by `tv4.language(code)`)
-
-* `code` is new language code
-* `map` is an object mapping error IDs or constant names (e.g. `103` or `"NUMBER_MAXIMUM"`) to language strings.
-
-````
-tv4.addLanguage('fr', { ... });
-
-// select for use
-tv4.language('fr')
-````
-
-If you register a multi-level language code (e.g. `fr-FR`), then it will also be registered for plain `fr` if that does not already exist.
-
-##### addFormat(format, validationFunction)
-
-Add a custom format validator. (There are no built-in format validators. Several common ones can be found [here](https://github.com/ikr/tv4-formats) though)
-
-* `format` is a string, corresponding to the `"format"` value in schemas.
-* `validationFunction` is a function that either returns:
- * `null` (meaning no error)
- * an error string (explaining the reason for failure)
-
-````
-tv4.addFormat('decimal-digits', function (data, schema) {
- if (typeof data === 'string' && !/^[0-9]+$/.test(data)) {
- return null;
- }
- return "must be string of decimal digits";
-});
-````
-
-Alternatively, multiple formats can be added at the same time using an object:
-````
-tv4.addFormat({
- 'my-format': function () {...},
- 'other-format': function () {...}
-});
-````
-
-##### defineKeyword(keyword, validationFunction)
-
-Add a custom keyword validator.
-
-* `keyword` is a string, corresponding to a schema keyword
-* `validationFunction` is a function that either returns:
- * `null` (meaning no error)
- * an error string (explaining the reason for failure)
- * an error object (containing some of: `code`/`message`/`dataPath`/`schemaPath`)
-
-````
-tv4.defineKeyword('my-custom-keyword', function (data, value, schema) {
- if (simpleFailure()) {
- return "Failure";
- } else if (detailedFailure()) {
- return {code: tv4.errorCodes.MY_CUSTOM_CODE, message: {param1: 'a', param2: 'b'}};
- } else {
- return null;
- }
-});
-````
-
-`schema` is the schema upon which the keyword is defined. In the above example, `value === schema['my-custom-keyword']`.
-
-If an object is returned from the custom validator, and its `message` is a string, then that is used as the message result. If `message` is an object, then that is used to populate the (localisable) error template.
-
-##### defineError(codeName, codeNumber, defaultMessage)
-
-Defines a custom error code.
-
-* `codeName` is a string, all-caps underscore separated, e.g. `"MY_CUSTOM_ERROR"`
-* `codeNumber` is an integer > 10000, which will be stored in `tv4.errorCodes` (e.g. `tv4.errorCodes.MY_CUSTOM_ERROR`)
-* `defaultMessage` is an error message template to use (assuming translations have not been provided for this code)
-
-An example of `defaultMessage` might be: `"Incorrect moon (expected {expected}, got {actual}"`). This is filled out if a custom keyword returns a object `message` (see above). Translations will be used, if associated with the correct code name/number.
-
-## Demos
-
-### Basic usage
-<div class="content inline-demo" markdown="1" data-demo="demo1">
-<pre class="code" id="demo1">
-var schema = {
- "items": {
- "type": "boolean"
- }
-};
-var data1 = [true, false];
-var data2 = [true, 123];
-
-alert("data 1: " + tv4.validate(data1, schema)); // true
-alert("data 2: " + tv4.validate(data2, schema)); // false
-alert("data 2 error: " + JSON.stringify(tv4.error, null, 4));
-</pre>
-</div>
-
-### Use of <code>$ref</code>
-<div class="content inline-demo" markdown="1" data-demo="demo2">
-<pre class="code" id="demo2">
-var schema = {
- "type": "array",
- "items": {"$ref": "#"}
-};
-var data1 = [[], [[]]];
-var data2 = [[], [true, []]];
-
-alert("data 1: " + tv4.validate(data1, schema)); // true
-alert("data 2: " + tv4.validate(data2, schema)); // false
-</pre>
-</div>
-
-### Missing schema
-<div class="content inline-demo" markdown="1" data-demo="demo3">
-<pre class="code" id="demo3">
-var schema = {
- "type": "array",
- "items": {"$ref": "http://example.com/schema" }
-};
-var data = [1, 2, 3];
-
-alert("Valid: " + tv4.validate(data, schema)); // true
-alert("Missing schemas: " + JSON.stringify(tv4.missing));
-</pre>
-</div>
-
-### Referencing remote schema
-<div class="content inline-demo" markdown="1" data-demo="demo4">
-<pre class="code" id="demo4">
-tv4.addSchema("http://example.com/schema", {
- "definitions": {
- "arrayItem": {"type": "boolean"}
- }
-});
-var schema = {
- "type": "array",
- "items": {"$ref": "http://example.com/schema#/definitions/arrayItem" }
-};
-var data1 = [true, false, true];
-var data2 = [1, 2, 3];
-
-alert("data 1: " + tv4.validate(data1, schema)); // true
-alert("data 2: " + tv4.validate(data2, schema)); // false
-</pre>
-</div>
-
-## Supported platforms
-
-* Node.js
-* All modern browsers
-* IE >= 7
-
-## Installation
-
-You can manually download [`tv4.js`](https://raw.github.com/geraintluff/tv4/master/tv4.js) or the minified [`tv4.min.js`](https://raw.github.com/geraintluff/tv4/master/tv4.min.js) and include it in your html to create the global `tv4` variable.
-
-Alternately use it as a CommonJS module:
-
-````js
-var tv4 = require('tv4');
-````
-
-or as an AMD module (e.g. with requirejs):
-
-```js
-require('tv4', function(tv4){
- //use tv4 here
-});
-```
-
-There is a command-line tool that wraps this library: [tv4-cmd](https://www.npmjs.com/package/tv4-cmd).
-
-#### npm
-
-````
-$ npm install tv4
-````
-
-#### bower
-
-````
-$ bower install tv4
-````
-
-#### component.io
-
-````
-$ component install geraintluff/tv4
-````
-
-## Build and test
-
-You can rebuild and run the node and browser tests using node.js and [grunt](http://http://gruntjs.com/):
-
-Make sure you have the global grunt cli command:
-````
-$ npm install grunt-cli -g
-````
-
-Clone the git repos, open a shell in the root folder and install the development dependencies:
-
-````
-$ npm install
-````
-
-Rebuild and run the tests:
-````
-$ grunt
-````
-
-It will run a build and display one Spec-style report for the node.js and two Dot-style reports for both the plain and minified browser tests (via phantomJS). You can also use your own browser to manually run the suites by opening [`test/index.html`](http://geraintluff.github.io/tv4/test/index.html) and [`test/index-min.html`](http://geraintluff.github.io/tv4/test/index-min.html).
-
-## Contributing
-
-Pull-requests for fixes and expansions are welcome. Edit the partial files in `/source` and add your tests in a suitable suite or folder under `/test/tests` and run `grunt` to rebuild and run the test suite. Try to maintain an idiomatic coding style and add tests for any new features. It is recommend to discuss big changes in an Issue.
-
-Do you speak another language? `tv4` needs internationalisation - please contribute language files to `/lang`!
-
-## Packages using tv4
-
-* [chai-json-schema](http://chaijs.com/plugins/chai-json-schema) is a [Chai Assertion Library](http://chaijs.com) plugin to assert values against json-schema.
-* [grunt-tv4](http://www.github.com/Bartvds/grunt-tv4) is a plugin for [Grunt](http://http://gruntjs.com/) that uses tv4 to bulk validate json files.
-
-## License
-
-The code is available as "public domain", meaning that it is completely free to use, without any restrictions at all. Read the full license [here](http://geraintluff.github.com/tv4/LICENSE.txt).
-
-It's also available under an [MIT license](http://jsonary.com/LICENSE.txt).
diff --git a/tools/eslint/node_modules/tv4/lang/de.js b/tools/eslint/node_modules/tv4/lang/de.js
deleted file mode 100644
index edbc11ee31..0000000000
--- a/tools/eslint/node_modules/tv4/lang/de.js
+++ /dev/null
@@ -1,47 +0,0 @@
-(function (global) {
- var lang = {
- INVALID_TYPE: "Ungültiger Typ: {type} (erwartet wurde: {expected})",
- ENUM_MISMATCH: "Keine Übereinstimmung mit der Aufzählung (enum) für: {value}",
- ANY_OF_MISSING: "Daten stimmen nicht überein mit einem der Schemas von \"anyOf\"",
- ONE_OF_MISSING: "Daten stimmen nicht überein mit einem der Schemas von \"oneOf\"",
- ONE_OF_MULTIPLE: "Daten sind valid in Bezug auf mehreren Schemas von \"oneOf\": index {index1} und {index2}",
- NOT_PASSED: "Daten stimmen mit dem \"not\" Schema überein",
- // Numeric errors
- NUMBER_MULTIPLE_OF: "Wert {value} ist kein Vielfaches von {multipleOf}",
- NUMBER_MINIMUM: "Wert {value} ist kleiner als das Minimum {minimum}",
- NUMBER_MINIMUM_EXCLUSIVE: "Wert {value} ist gleich dem Exklusiven Minimum {minimum}",
- NUMBER_MAXIMUM: "Wert {value} ist größer als das Maximum {maximum}",
- NUMBER_MAXIMUM_EXCLUSIVE: "Wert {value} ist gleich dem Exklusiven Maximum {maximum}",
- // String errors
- STRING_LENGTH_SHORT: "Zeichenkette zu kurz ({length} chars), minimum {minimum}",
- STRING_LENGTH_LONG: "Zeichenkette zu lang ({length} chars), maximum {maximum}",
- STRING_PATTERN: "Zeichenkette entspricht nicht dem Muster: {pattern}",
- // Object errors
- OBJECT_PROPERTIES_MINIMUM: "Zu wenige Attribute definiert ({propertyCount}), minimum {minimum}",
- OBJECT_PROPERTIES_MAXIMUM: "Zu viele Attribute definiert ({propertyCount}), maximum {maximum}",
- OBJECT_REQUIRED: "Notwendiges Attribut fehlt: {key}",
- OBJECT_ADDITIONAL_PROPERTIES: "Zusätzliche Attribute nicht erlaubt",
- OBJECT_DEPENDENCY_KEY: "Abhängigkeit fehlt - Schlüssel nicht vorhanden: {missing} (wegen Schlüssel: {key})",
- // Array errors
- ARRAY_LENGTH_SHORT: "Array zu kurz ({length}), minimum {minimum}",
- ARRAY_LENGTH_LONG: "Array zu lang ({length}), maximum {maximum}",
- ARRAY_UNIQUE: "Array Einträge nicht eindeutig (Index {match1} und {match2})",
- ARRAY_ADDITIONAL_ITEMS: "Zusätzliche Einträge nicht erlaubt"
- };
-
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['../tv4'], function(tv4) {
- tv4.addLanguage('de', lang);
- return tv4;
- });
- } else if (typeof module !== 'undefined' && module.exports){
- // CommonJS. Define export.
- var tv4 = require('../tv4');
- tv4.addLanguage('de', lang);
- module.exports = tv4;
- } else {
- // Browser globals
- global.tv4.addLanguage('de', lang);
- }
-})(this);
diff --git a/tools/eslint/node_modules/tv4/lang/fr.js b/tools/eslint/node_modules/tv4/lang/fr.js
deleted file mode 100644
index c020b7295b..0000000000
--- a/tools/eslint/node_modules/tv4/lang/fr.js
+++ /dev/null
@@ -1,55 +0,0 @@
-(function (global) {
- var lang = {
- INVALID_TYPE: "Type invalide: {type} ({expected} attendu)",
- ENUM_MISMATCH: "Aucune valeur correspondante (enum) pour: {value}",
- ANY_OF_MISSING: "La donnée ne correspond à aucun schema de \"anyOf\"",
- ONE_OF_MISSING: "La donnée ne correspond à aucun schema de \"oneOf\"",
- ONE_OF_MULTIPLE: "La donnée est valide pour plus d'un schema de \"oneOf\": indices {index1} et {index2}",
- NOT_PASSED: "La donnée correspond au schema de \"not\"",
- // Numeric errors
- NUMBER_MULTIPLE_OF: "La valeur {value} n'est pas un multiple de {multipleOf}",
- NUMBER_MINIMUM: "La valeur {value} est inférieure au minimum {minimum}",
- NUMBER_MINIMUM_EXCLUSIVE: "La valeur {value} est égale au minimum exclusif {minimum}",
- NUMBER_MAXIMUM: "La valeur {value} est supérieure au maximum {maximum}",
- NUMBER_MAXIMUM_EXCLUSIVE: "La valeur {value} est égale au maximum exclusif {maximum}",
- NUMBER_NOT_A_NUMBER: "La valeur {value} n'est pas un nombre valide",
- // String errors
- STRING_LENGTH_SHORT: "Le texte est trop court ({length} carac.), minimum {minimum}",
- STRING_LENGTH_LONG: "Le texte est trop long ({length} carac.), maximum {maximum}",
- STRING_PATTERN: "Le texte ne correspond pas au motif: {pattern}",
- // Object errors
- OBJECT_PROPERTIES_MINIMUM: "Pas assez de propriétés définies ({propertyCount}), minimum {minimum}",
- OBJECT_PROPERTIES_MAXIMUM: "Trop de propriétés définies ({propertyCount}), maximum {maximum}",
- OBJECT_REQUIRED: "Propriété requise manquante: {key}",
- OBJECT_ADDITIONAL_PROPERTIES: "Propriétés additionnelles non autorisées",
- OBJECT_DEPENDENCY_KEY: "Echec de dépendance - la clé doit exister: {missing} (du à la clé: {key})",
- // Array errors
- ARRAY_LENGTH_SHORT: "Le tableau est trop court ({length}), minimum {minimum}",
- ARRAY_LENGTH_LONG: "Le tableau est trop long ({length}), maximum {maximum}",
- ARRAY_UNIQUE: "Des éléments du tableau ne sont pas uniques (indices {match1} et {match2})",
- ARRAY_ADDITIONAL_ITEMS: "Éléments additionnels non autorisés",
- // Format errors
- FORMAT_CUSTOM: "Échec de validation du format ({message})",
- KEYWORD_CUSTOM: "Échec de mot-clé: {key} ({message})",
- // Schema structure
- CIRCULAR_REFERENCE: "Références ($refs) circulaires: {urls}",
- // Non-standard validation options
- UNKNOWN_PROPERTY: "Propriété inconnue (n'existe pas dans le schema)"
- };
-
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['../tv4'], function(tv4) {
- tv4.addLanguage('fr', lang);
- return tv4;
- });
- } else if (typeof module !== 'undefined' && module.exports){
- // CommonJS. Define export.
- var tv4 = require('../tv4');
- tv4.addLanguage('fr', lang);
- module.exports = tv4;
- } else {
- // Browser globals
- global.tv4.addLanguage('fr', lang);
- }
-})(this);
diff --git a/tools/eslint/node_modules/tv4/lang/nb.js b/tools/eslint/node_modules/tv4/lang/nb.js
deleted file mode 100644
index d6b1a84f82..0000000000
--- a/tools/eslint/node_modules/tv4/lang/nb.js
+++ /dev/null
@@ -1,56 +0,0 @@
-(function (global) {
- var lang = {
- INVALID_TYPE: "Ugyldig type: {type} (forventet {expected})",
- ENUM_MISMATCH: "Ingen samsvarende enum verdi for: {value}",
- ANY_OF_MISSING: "Data samsvarer ikke med noe skjema fra \"anyOf\"",
- ONE_OF_MISSING: "Data samsvarer ikke med noe skjema fra \"oneOf\"",
- ONE_OF_MULTIPLE: "Data samsvarer med mer enn ett skjema fra \"oneOf\": indeks {index1} og {index2}",
- NOT_PASSED: "Data samsvarer med skjema fra \"not\"",
- // Numeric errors
- NUMBER_MULTIPLE_OF: "Verdien {value} er ikke et multiplum av {multipleOf}",
- NUMBER_MINIMUM: "Verdien {value} er mindre enn minsteverdi {minimum}",
- NUMBER_MINIMUM_EXCLUSIVE: "Verdien {value} er lik eksklusiv minsteverdi {minimum}",
- NUMBER_MAXIMUM: "Verdien {value} er større enn maksimalverdi {maximum}",
- NUMBER_MAXIMUM_EXCLUSIVE: "Verdien {value} er lik eksklusiv maksimalverdi {maximum}",
- NUMBER_NOT_A_NUMBER: "Verdien {value} er ikke et gyldig tall",
- // String errors
- STRING_LENGTH_SHORT: "Strengen er for kort ({length} tegn), minst {minimum}",
- STRING_LENGTH_LONG: "Strengen er for lang ({length} tegn), maksimalt {maximum}",
- STRING_PATTERN: "Strengen samsvarer ikke med regulært uttrykk: {pattern}",
- // Object errors
- OBJECT_PROPERTIES_MINIMUM: "For få variabler definert ({propertyCount}), minst {minimum} er forventet",
- OBJECT_PROPERTIES_MAXIMUM: "For mange variabler definert ({propertyCount}), makismalt {maximum} er tillatt",
- OBJECT_REQUIRED: "Mangler obligatorisk variabel: {key}",
- OBJECT_ADDITIONAL_PROPERTIES: "Tilleggsvariabler er ikke tillatt",
- OBJECT_DEPENDENCY_KEY: "Variabelen {missing} må være definert (på grunn av følgende variabel: {key})",
- // Array errors
- ARRAY_LENGTH_SHORT: "Listen er for kort ({length} elementer), minst {minimum}",
- ARRAY_LENGTH_LONG: "Listen er for lang ({length} elementer), maksimalt {maximum}",
- ARRAY_UNIQUE: "Elementene er ikke unike (indeks {match1} og {match2} er like)",
- ARRAY_ADDITIONAL_ITEMS: "Tillegselementer er ikke tillatt",
- // Format errors
- FORMAT_CUSTOM: "Formatteringen stemmer ikke ({message})",
- KEYWORD_CUSTOM: "Nøkkelen stemmer ikke: {key} ({message})",
- // Schema structure
- CIRCULAR_REFERENCE: "Sirkulære referanser ($refs): {urls}",
- // Non-standard validation options
- UNKNOWN_PROPERTY: "Ukjent variabel (eksisterer ikke i skjemaet)"
- };
-
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['../tv4'], function(tv4) {
- tv4.addLanguage('nb', lang);
- return tv4;
- });
- } else if (typeof module !== 'undefined' && module.exports) {
- // CommonJS. Define export.
- var tv4 = require('../tv4');
- tv4.addLanguage('nb', lang);
- module.exports = tv4;
- } else {
- // Browser globals
- global.tv4.addLanguage('nb', lang);
- }
-})(this);
-
diff --git a/tools/eslint/node_modules/tv4/lang/pl-PL.js b/tools/eslint/node_modules/tv4/lang/pl-PL.js
deleted file mode 100755
index c4b8ba86ee..0000000000
--- a/tools/eslint/node_modules/tv4/lang/pl-PL.js
+++ /dev/null
@@ -1,55 +0,0 @@
-(function (global) {
- var lang = {
- INVALID_TYPE: "Niepoprawny typ: {type} (spodziewany {expected})",
- ENUM_MISMATCH: "Żadna predefiniowana wartośc nie pasuje do: {value}",
- ANY_OF_MISSING: "Dane nie pasują do żadnego wzoru z sekcji \"anyOf\"",
- ONE_OF_MISSING: "Dane nie pasują do żadnego wzoru z sekcji \"oneOf\"",
- ONE_OF_MULTIPLE: "Dane są prawidłowe dla więcej niż jednego schematu z \"oneOf\": indeksy {index1} i {index2}",
- NOT_PASSED: "Dane pasują do wzoru z sekcji \"not\"",
- // Numeric errors
- NUMBER_MULTIPLE_OF: "Wartość {value} nie jest wielokrotnością {multipleOf}",
- NUMBER_MINIMUM: "Wartość {value} jest mniejsza niż {minimum}",
- NUMBER_MINIMUM_EXCLUSIVE: "Wartość {value} jest równa wyłączonemu minimum {minimum}",
- NUMBER_MAXIMUM: "Wartość {value} jest większa niż {maximum}",
- NUMBER_MAXIMUM_EXCLUSIVE: "Wartość {value} jest równa wyłączonemu maksimum {maximum}",
- NUMBER_NOT_A_NUMBER: "Wartość {value} nie jest poprawną liczbą",
- // String errors
- STRING_LENGTH_SHORT: "Napis jest za krótki ({length} znaków), minimum {minimum}",
- STRING_LENGTH_LONG: "Napis jest za długi ({length} )znaków, maksimum {maximum}",
- STRING_PATTERN: "Napis nie pasuje do wzoru: {pattern}",
- // Object errors
- OBJECT_PROPERTIES_MINIMUM: "Za mało zdefiniowanych pól ({propertyCount}), minimum {minimum}",
- OBJECT_PROPERTIES_MAXIMUM: "Za dużo zdefiniowanych pól ({propertyCount}), maksimum {maximum}",
- OBJECT_REQUIRED: "Brakuje wymaganego pola: {key}",
- OBJECT_ADDITIONAL_PROPERTIES: "Dodatkowe pola są niedozwolone",
- OBJECT_DEPENDENCY_KEY: "Błąd zależności - klucz musi istnieć: {missing} (wzgledem klucza: {key})",
- // Array errors
- ARRAY_LENGTH_SHORT: "Tablica ma za mało elementów ({length}), minimum {minimum}",
- ARRAY_LENGTH_LONG: "Tablica ma za dużo elementów ({length}), maximum {maximum}",
- ARRAY_UNIQUE: "Elementy tablicy nie są unikalne (indeks {match1} i {match2})",
- ARRAY_ADDITIONAL_ITEMS: "Dodatkowe elementy są niedozwolone",
- // Format errors
- FORMAT_CUSTOM: "Błąd zgodności z formatem ({message})",
- KEYWORD_CUSTOM: "Błąd słowa kluczowego: {key} ({message})",
- // Schema structure
- CIRCULAR_REFERENCE: "Cykliczna referencja $refs: {urls}",
- // Non-standard validation options
- UNKNOWN_PROPERTY: "Nie znane pole (brak we wzorze(schema))"
- };
-
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['../tv4'], function(tv4) {
- tv4.addLanguage('pl-PL', lang);
- return tv4;
- });
- } else if (typeof module !== 'undefined' && module.exports) {
- // CommonJS. Define export.
- var tv4 = require('../tv4');
- tv4.addLanguage('pl-PL', lang);
- module.exports = tv4;
- } else {
- // Browser globals
- global.tv4.addLanguage('pl-PL', lang);
- }
-})(this);
diff --git a/tools/eslint/node_modules/tv4/lang/pt-PT.js b/tools/eslint/node_modules/tv4/lang/pt-PT.js
deleted file mode 100644
index 6fa5a98e14..0000000000
--- a/tools/eslint/node_modules/tv4/lang/pt-PT.js
+++ /dev/null
@@ -1,55 +0,0 @@
-(function (global) {
- var lang = {
- INVALID_TYPE: "Tipo inválido: {type} (esperava {expected})",
- ENUM_MISMATCH: "Nenhuma correspondência 'enum' para: {value}",
- ANY_OF_MISSING: "Os dados não correspondem a nenhum esquema de \"anyOf\"",
- ONE_OF_MISSING: "Os dados não correspondem a nenhum esquema de \"oneOf\"",
- ONE_OF_MULTIPLE: "Os dados são válidos quando comparados com mais de um esquema de \"oneOf\": índices {index1} e {index2}",
- NOT_PASSED: "Os dados correspondem a um esquema de \"not\"",
- // Numeric errors
- NUMBER_MULTIPLE_OF: "O valor {value} não é um múltiplo de {multipleOf}",
- NUMBER_MINIMUM: "O valor {value} é menor que o mínimo {minimum}",
- NUMBER_MINIMUM_EXCLUSIVE: "O valor {value} é igual ao mínimo exclusivo {minimum}",
- NUMBER_MAXIMUM: "O valor {value} é maior que o máximo {maximum}",
- NUMBER_MAXIMUM_EXCLUSIVE: "O valor {value} é igual ao máximo exclusivo {maximum}",
- NUMBER_NOT_A_NUMBER: "O valor {value} não é um número válido",
- // String errors
- STRING_LENGTH_SHORT: "A 'string' é muito curta ({length} caracteres), mínimo {minimum}",
- STRING_LENGTH_LONG: "A 'string' é muito longa ({length} caracteres), máximo {maximum}",
- STRING_PATTERN: "A 'string' não corresponde ao modelo: {pattern}",
- // Object errors
- OBJECT_PROPERTIES_MINIMUM: "Poucas propriedades definidas ({propertyCount}), mínimo {minimum}",
- OBJECT_PROPERTIES_MAXIMUM: "Muitas propriedades definidas ({propertyCount}), máximo {maximum}",
- OBJECT_REQUIRED: "Propriedade necessária em falta: {key}",
- OBJECT_ADDITIONAL_PROPERTIES: "Não são permitidas propriedades adicionais",
- OBJECT_DEPENDENCY_KEY: "Uma dependência falhou - tem de existir uma chave: {missing} (devido à chave: {key})",
- // Array errors
- ARRAY_LENGTH_SHORT: "A 'array' é muito curta ({length}), mínimo {minimum}",
- ARRAY_LENGTH_LONG: "A 'array' é muito longa ({length}), máximo {maximum}",
- ARRAY_UNIQUE: "Os itens da 'array' não são únicos (índices {match1} e {match2})",
- ARRAY_ADDITIONAL_ITEMS: "Não são permitidos itens adicionais",
- // Format errors
- FORMAT_CUSTOM: "A validação do formato falhou ({message})",
- KEYWORD_CUSTOM: "A 'keyword' falhou: {key} ({message})",
- // Schema structure
- CIRCULAR_REFERENCE: "$refs circular: {urls}",
- // Non-standard validation options
- UNKNOWN_PROPERTY: "Propriedade desconhecida (não está em 'schema')"
- };
-
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['../tv4'], function(tv4) {
- tv4.addLanguage('pt-PT', lang);
- return tv4;
- });
- } else if (typeof module !== 'undefined' && module.exports) {
- // CommonJS. Define export.
- var tv4 = require('../tv4');
- tv4.addLanguage('pt-PT', lang);
- module.exports = tv4;
- } else {
- // Browser globals
- global.tv4.addLanguage('pt-PT', lang);
- }
-})(this);
diff --git a/tools/eslint/node_modules/tv4/lang/sv-SE.js b/tools/eslint/node_modules/tv4/lang/sv-SE.js
deleted file mode 100644
index 3621a3480d..0000000000
--- a/tools/eslint/node_modules/tv4/lang/sv-SE.js
+++ /dev/null
@@ -1,55 +0,0 @@
-(function (global) {
- var lang = {
- INVALID_TYPE: "Otillåten typ: {type} (skall vara {expected})",
- ENUM_MISMATCH: "Otillåtet värde: {value}",
- ANY_OF_MISSING: "Värdet matchar inget av schemana \"anyOf\"",
- ONE_OF_MISSING: "Värdet matchar inget av schemana \"oneOf\"",
- ONE_OF_MULTIPLE: "Värdet matchar flera scheman \"oneOf\": index {index1} och {index2}",
- NOT_PASSED: "Värdet matchar schemat från \"not\"",
- // Numeric errors
- NUMBER_MULTIPLE_OF: "Värdet {value} är inte en multipel av {multipleOf}",
- NUMBER_MINIMUM: "Värdet {value} får inte vara mindre än {minimum}",
- NUMBER_MINIMUM_EXCLUSIVE: "Värdet {value} måste vara större än {minimum}",
- NUMBER_MAXIMUM: "Värdet {value} får inte vara större än {maximum}",
- NUMBER_MAXIMUM_EXCLUSIVE: "Värdet {value} måste vara mindre än {maximum}",
- NUMBER_NOT_A_NUMBER: "Värdet {value} är inte ett giltigt tal",
- // String errors
- STRING_LENGTH_SHORT: "Texten är för kort ({length} tecken), ska vara minst {minimum} tecken",
- STRING_LENGTH_LONG: "Texten är för lång ({length} tecken), ska vara högst {maximum}",
- STRING_PATTERN: "Texten har fel format: {pattern}",
- // Object errors
- OBJECT_PROPERTIES_MINIMUM: "För få parametrar ({propertyCount}), ska minst vara {minimum}",
- OBJECT_PROPERTIES_MAXIMUM: "För många parametrar ({propertyCount}), får högst vara {maximum}",
- OBJECT_REQUIRED: "Egenskap saknas: {key}",
- OBJECT_ADDITIONAL_PROPERTIES: "Extra parametrar är inte tillåtna",
- OBJECT_DEPENDENCY_KEY: "Saknar beroende - saknad nyckel: {missing} (beroende nyckel: {key})",
- // Array errors
- ARRAY_LENGTH_SHORT: "Listan är för kort ({length}), ska minst vara {minimum}",
- ARRAY_LENGTH_LONG: "Listan är för lång ({length}), ska högst vara {maximum}",
- ARRAY_UNIQUE: "Listvärden är inte unika (index {match1} och {match2})",
- ARRAY_ADDITIONAL_ITEMS: "Extra värden är inte tillåtna",
- // Format errors
- FORMAT_CUSTOM: "Misslyckad validering ({message})",
- KEYWORD_CUSTOM: "Misslyckat nyckelord: {key} ({message})",
- // Schema structure
- CIRCULAR_REFERENCE: "Cirkulär $refs: {urls}",
- // Non-standard validation options
- UNKNOWN_PROPERTY: "Okänd egenskap (finns ej i schema)"
- };
-
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['../tv4'], function(tv4) {
- tv4.addLanguage('sv-SE', lang);
- return tv4;
- });
- } else if (typeof module !== 'undefined' && module.exports) {
- // CommonJS. Define export.
- var tv4 = require('../tv4');
- tv4.addLanguage('sv-SE', lang);
- module.exports = tv4;
- } else {
- // Browser globals
- global.tv4.addLanguage('sv-SE', lang);
- }
-})(this);
diff --git a/tools/eslint/node_modules/tv4/lang/zh-CN.js b/tools/eslint/node_modules/tv4/lang/zh-CN.js
deleted file mode 100644
index b3c4c1b7af..0000000000
--- a/tools/eslint/node_modules/tv4/lang/zh-CN.js
+++ /dev/null
@@ -1,55 +0,0 @@
-(function (global) {
- var lang = {
- INVALID_TYPE: "当前类型 {type} 不符合期望的类型 {expected}",
- ENUM_MISMATCH: "{value} 不是有效的枚举类型取值",
- ANY_OF_MISSING: "数据不符合以下任何一个模式 (\"anyOf\")",
- ONE_OF_MISSING: "数据不符合以下任何一个模式 (\"oneOf\")",
- ONE_OF_MULTIPLE: "数据同时符合多个模式 (\"oneOf\"): 下标 {index1} 和 {index2}",
- NOT_PASSED: "数据不应匹配以下模式 (\"not\")",
- // Numeric errors
- NUMBER_MULTIPLE_OF: "数值 {value} 不是 {multipleOf} 的倍数",
- NUMBER_MINIMUM: "数值 {value} 小于最小值 {minimum}",
- NUMBER_MINIMUM_EXCLUSIVE: "数值 {value} 等于排除的最小值 {minimum}",
- NUMBER_MAXIMUM: "数值 {value} is greater 大于最大值 {maximum}",
- NUMBER_MAXIMUM_EXCLUSIVE: "数值 {value} 等于排除的最大值 {maximum}",
- NUMBER_NOT_A_NUMBER: "数值 {value} 不是有效的数字",
- // String errors
- STRING_LENGTH_SHORT: "字符串太短 ({length} 个字符), 最少 {minimum} 个",
- STRING_LENGTH_LONG: "字符串太长 ({length} 个字符), 最多 {maximum} 个",
- STRING_PATTERN: "字符串不匹配模式: {pattern}",
- // Object errors
- OBJECT_PROPERTIES_MINIMUM: "字段数过少 ({propertyCount}), 最少 {minimum} 个",
- OBJECT_PROPERTIES_MAXIMUM: "字段数过多 ({propertyCount}), 最多 {maximum} 个",
- OBJECT_REQUIRED: "缺少必要字段: {key}",
- OBJECT_ADDITIONAL_PROPERTIES: "不允许多余的字段",
- OBJECT_DEPENDENCY_KEY: "依赖失败 - 缺少键 {missing} (来自键: {key})",
- // Array errors
- ARRAY_LENGTH_SHORT: "数组长度太短 ({length}), 最小长度 {minimum}",
- ARRAY_LENGTH_LONG: "数组长度太长 ({length}), 最大长度 {maximum}",
- ARRAY_UNIQUE: "数组元素不唯一 (下标 {match1} 和 {match2})",
- ARRAY_ADDITIONAL_ITEMS: "不允许多余的元素",
- // Format errors
- FORMAT_CUSTOM: "格式校验失败 ({message})",
- KEYWORD_CUSTOM: "关键字 {key} 校验失败: ({message})",
- // Schema structure
- CIRCULAR_REFERENCE: "循环引用 ($refs): {urls}",
- // Non-standard validation options
- UNKNOWN_PROPERTY: "未知字段 (不在 schema 中)"
- };
-
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['../tv4'], function(tv4) {
- tv4.addLanguage('zh-CN', lang);
- return tv4;
- });
- } else if (typeof module !== 'undefined' && module.exports){
- // CommonJS. Define export.
- var tv4 = require('../tv4');
- tv4.addLanguage('zh-CN', lang);
- module.exports = tv4;
- } else {
- // Browser globals
- global.tv4.addLanguage('zh-CN', lang);
- }
-})(this);
diff --git a/tools/eslint/node_modules/tv4/package.json b/tools/eslint/node_modules/tv4/package.json
deleted file mode 100644
index 3ccb51c5f1..0000000000
--- a/tools/eslint/node_modules/tv4/package.json
+++ /dev/null
@@ -1,123 +0,0 @@
-{
- "_args": [
- [
- {
- "raw": "tv4@^1.2.7",
- "scope": null,
- "escapedName": "tv4",
- "name": "tv4",
- "rawSpec": "^1.2.7",
- "spec": ">=1.2.7 <2.0.0",
- "type": "range"
- },
- "/Users/trott/io.js/tools/node_modules/table"
- ]
- ],
- "_from": "tv4@>=1.2.7 <2.0.0",
- "_id": "tv4@1.2.7",
- "_inCache": true,
- "_installable": true,
- "_location": "/tv4",
- "_nodeVersion": "0.12.4",
- "_npmUser": {
- "name": "geraintluff",
- "email": "luffgd@gmail.com"
- },
- "_npmVersion": "2.10.1",
- "_phantomChildren": {},
- "_requested": {
- "raw": "tv4@^1.2.7",
- "scope": null,
- "escapedName": "tv4",
- "name": "tv4",
- "rawSpec": "^1.2.7",
- "spec": ">=1.2.7 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/table"
- ],
- "_resolved": "https://registry.npmjs.org/tv4/-/tv4-1.2.7.tgz",
- "_shasum": "bd29389afc73ade49ae5f48142b5d544bf68d120",
- "_shrinkwrap": null,
- "_spec": "tv4@^1.2.7",
- "_where": "/Users/trott/io.js/tools/node_modules/table",
- "author": {
- "name": "Geraint Luff"
- },
- "bugs": {
- "url": "https://github.com/geraintluff/tv4/issues"
- },
- "dependencies": {},
- "description": "A public domain JSON Schema validator for JavaScript",
- "devDependencies": {
- "grunt": "~0.4.1",
- "grunt-cli": "~0.1.9",
- "grunt-component-io": "~0.1.0",
- "grunt-concat-sourcemap": "~0.2",
- "grunt-contrib-clean": "~0.4.1",
- "grunt-contrib-copy": "~0.4.1",
- "grunt-contrib-jshint": "~0.6.2",
- "grunt-contrib-uglify": "~0.2.2",
- "grunt-markdown": "~0.3.0",
- "grunt-mocha": "~0.4",
- "grunt-mocha-test": "~0.5.0",
- "grunt-push-release": "~0.1.1",
- "grunt-regex-replace": "~0.2.5",
- "jshint-path-reporter": "~0.1",
- "mocha": "~1.11.0",
- "mocha-unfunk-reporter": "~0.2",
- "proclaim": "1.4",
- "requirejs": "~2.1.11",
- "source-map-support": "~0.1"
- },
- "directories": {},
- "dist": {
- "shasum": "bd29389afc73ade49ae5f48142b5d544bf68d120",
- "tarball": "https://registry.npmjs.org/tv4/-/tv4-1.2.7.tgz"
- },
- "engines": {
- "node": ">= 0.8.0"
- },
- "gitHead": "c1db91fd7a915178f4b8f66622f0e78fcb4e3ecb",
- "homepage": "https://github.com/geraintluff/tv4#readme",
- "keywords": [
- "json-schema",
- "schema",
- "validator",
- "tv4"
- ],
- "license:": [
- {
- "type": "Public Domain",
- "url": "http://geraintluff.github.io/tv4/LICENSE.txt"
- },
- {
- "type": "MIT",
- "url": "http://jsonary.com/LICENSE.txt"
- }
- ],
- "main": "tv4.js",
- "maintainers": [
- {
- "name": "geraintluff",
- "email": "luffgd@gmail.com"
- },
- {
- "name": "bartvds",
- "email": "bartvanderschoor@gmail.com"
- }
- ],
- "name": "tv4",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/geraintluff/tv4.git"
- },
- "scripts": {
- "prepublish": "grunt prepublish",
- "test": "grunt test"
- },
- "version": "1.2.7"
-}
diff --git a/tools/eslint/node_modules/tv4/tv4.async-jquery.js b/tools/eslint/node_modules/tv4/tv4.async-jquery.js
deleted file mode 100644
index 761f232ad7..0000000000
--- a/tools/eslint/node_modules/tv4/tv4.async-jquery.js
+++ /dev/null
@@ -1,34 +0,0 @@
-// Provides support for asynchronous validation (fetching schemas) using jQuery
-// Callback is optional third argument to tv4.validate() - if not present, synchronous operation
-// callback(result, error);
-if (typeof (tv4.asyncValidate) === 'undefined') {
- tv4.syncValidate = tv4.validate;
- tv4.validate = function (data, schema, callback, checkRecursive, banUnknownProperties) {
- if (typeof (callback) === 'undefined') {
- return this.syncValidate(data, schema, checkRecursive, banUnknownProperties);
- } else {
- return this.asyncValidate(data, schema, callback, checkRecursive, banUnknownProperties);
- }
- };
- tv4.asyncValidate = function (data, schema, callback, checkRecursive, banUnknownProperties) {
- var $ = jQuery;
- var result = tv4.validate(data, schema, checkRecursive, banUnknownProperties);
- if (!tv4.missing.length) {
- callback(result, tv4.error);
- } else {
- // Make a request for each missing schema
- var missingSchemas = $.map(tv4.missing, function (schemaUri) {
- return $.getJSON(schemaUri).success(function (fetchedSchema) {
- tv4.addSchema(schemaUri, fetchedSchema);
- }).error(function () {
- // If there's an error, just use an empty schema
- tv4.addSchema(schemaUri, {});
- });
- });
- // When all requests done, try again
- $.when.apply($, missingSchemas).done(function () {
- var result = tv4.asyncValidate(data, schema, callback, checkRecursive, banUnknownProperties);
- });
- }
- };
-}
diff --git a/tools/eslint/node_modules/tv4/tv4.js b/tools/eslint/node_modules/tv4/tv4.js
deleted file mode 100644
index 614f443689..0000000000
--- a/tools/eslint/node_modules/tv4/tv4.js
+++ /dev/null
@@ -1,1677 +0,0 @@
-/*
-Author: Geraint Luff and others
-Year: 2013
-
-This code is released into the "public domain" by its author(s). Anybody may use, alter and distribute the code without restriction. The author makes no guarantees, and takes no liability of any kind for use of this code.
-
-If you find a bug or make an improvement, it would be courteous to let the author know, but it is not compulsory.
-*/
-(function (global, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define([], factory);
- } else if (typeof module !== 'undefined' && module.exports){
- // CommonJS. Define export.
- module.exports = factory();
- } else {
- // Browser globals
- global.tv4 = factory();
- }
-}(this, function () {
-
-// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FObject%2Fkeys
-if (!Object.keys) {
- Object.keys = (function () {
- var hasOwnProperty = Object.prototype.hasOwnProperty,
- hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'),
- dontEnums = [
- 'toString',
- 'toLocaleString',
- 'valueOf',
- 'hasOwnProperty',
- 'isPrototypeOf',
- 'propertyIsEnumerable',
- 'constructor'
- ],
- dontEnumsLength = dontEnums.length;
-
- return function (obj) {
- if (typeof obj !== 'object' && typeof obj !== 'function' || obj === null) {
- throw new TypeError('Object.keys called on non-object');
- }
-
- var result = [];
-
- for (var prop in obj) {
- if (hasOwnProperty.call(obj, prop)) {
- result.push(prop);
- }
- }
-
- if (hasDontEnumBug) {
- for (var i=0; i < dontEnumsLength; i++) {
- if (hasOwnProperty.call(obj, dontEnums[i])) {
- result.push(dontEnums[i]);
- }
- }
- }
- return result;
- };
- })();
-}
-// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create
-if (!Object.create) {
- Object.create = (function(){
- function F(){}
-
- return function(o){
- if (arguments.length !== 1) {
- throw new Error('Object.create implementation only accepts one parameter.');
- }
- F.prototype = o;
- return new F();
- };
- })();
-}
-// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FisArray
-if(!Array.isArray) {
- Array.isArray = function (vArg) {
- return Object.prototype.toString.call(vArg) === "[object Array]";
- };
-}
-// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FindexOf
-if (!Array.prototype.indexOf) {
- Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
- if (this === null) {
- throw new TypeError();
- }
- var t = Object(this);
- var len = t.length >>> 0;
-
- if (len === 0) {
- return -1;
- }
- var n = 0;
- if (arguments.length > 1) {
- n = Number(arguments[1]);
- if (n !== n) { // shortcut for verifying if it's NaN
- n = 0;
- } else if (n !== 0 && n !== Infinity && n !== -Infinity) {
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- }
- }
- if (n >= len) {
- return -1;
- }
- var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
- for (; k < len; k++) {
- if (k in t && t[k] === searchElement) {
- return k;
- }
- }
- return -1;
- };
-}
-
-// Grungey Object.isFrozen hack
-if (!Object.isFrozen) {
- Object.isFrozen = function (obj) {
- var key = "tv4_test_frozen_key";
- while (obj.hasOwnProperty(key)) {
- key += Math.random();
- }
- try {
- obj[key] = true;
- delete obj[key];
- return false;
- } catch (e) {
- return true;
- }
- };
-}
-// Based on: https://github.com/geraintluff/uri-templates, but with all the de-substitution stuff removed
-
-var uriTemplateGlobalModifiers = {
- "+": true,
- "#": true,
- ".": true,
- "/": true,
- ";": true,
- "?": true,
- "&": true
-};
-var uriTemplateSuffices = {
- "*": true
-};
-
-function notReallyPercentEncode(string) {
- return encodeURI(string).replace(/%25[0-9][0-9]/g, function (doubleEncoded) {
- return "%" + doubleEncoded.substring(3);
- });
-}
-
-function uriTemplateSubstitution(spec) {
- var modifier = "";
- if (uriTemplateGlobalModifiers[spec.charAt(0)]) {
- modifier = spec.charAt(0);
- spec = spec.substring(1);
- }
- var separator = "";
- var prefix = "";
- var shouldEscape = true;
- var showVariables = false;
- var trimEmptyString = false;
- if (modifier === '+') {
- shouldEscape = false;
- } else if (modifier === ".") {
- prefix = ".";
- separator = ".";
- } else if (modifier === "/") {
- prefix = "/";
- separator = "/";
- } else if (modifier === '#') {
- prefix = "#";
- shouldEscape = false;
- } else if (modifier === ';') {
- prefix = ";";
- separator = ";";
- showVariables = true;
- trimEmptyString = true;
- } else if (modifier === '?') {
- prefix = "?";
- separator = "&";
- showVariables = true;
- } else if (modifier === '&') {
- prefix = "&";
- separator = "&";
- showVariables = true;
- }
-
- var varNames = [];
- var varList = spec.split(",");
- var varSpecs = [];
- var varSpecMap = {};
- for (var i = 0; i < varList.length; i++) {
- var varName = varList[i];
- var truncate = null;
- if (varName.indexOf(":") !== -1) {
- var parts = varName.split(":");
- varName = parts[0];
- truncate = parseInt(parts[1], 10);
- }
- var suffices = {};
- while (uriTemplateSuffices[varName.charAt(varName.length - 1)]) {
- suffices[varName.charAt(varName.length - 1)] = true;
- varName = varName.substring(0, varName.length - 1);
- }
- var varSpec = {
- truncate: truncate,
- name: varName,
- suffices: suffices
- };
- varSpecs.push(varSpec);
- varSpecMap[varName] = varSpec;
- varNames.push(varName);
- }
- var subFunction = function (valueFunction) {
- var result = "";
- var startIndex = 0;
- for (var i = 0; i < varSpecs.length; i++) {
- var varSpec = varSpecs[i];
- var value = valueFunction(varSpec.name);
- if (value === null || value === undefined || (Array.isArray(value) && value.length === 0) || (typeof value === 'object' && Object.keys(value).length === 0)) {
- startIndex++;
- continue;
- }
- if (i === startIndex) {
- result += prefix;
- } else {
- result += (separator || ",");
- }
- if (Array.isArray(value)) {
- if (showVariables) {
- result += varSpec.name + "=";
- }
- for (var j = 0; j < value.length; j++) {
- if (j > 0) {
- result += varSpec.suffices['*'] ? (separator || ",") : ",";
- if (varSpec.suffices['*'] && showVariables) {
- result += varSpec.name + "=";
- }
- }
- result += shouldEscape ? encodeURIComponent(value[j]).replace(/!/g, "%21") : notReallyPercentEncode(value[j]);
- }
- } else if (typeof value === "object") {
- if (showVariables && !varSpec.suffices['*']) {
- result += varSpec.name + "=";
- }
- var first = true;
- for (var key in value) {
- if (!first) {
- result += varSpec.suffices['*'] ? (separator || ",") : ",";
- }
- first = false;
- result += shouldEscape ? encodeURIComponent(key).replace(/!/g, "%21") : notReallyPercentEncode(key);
- result += varSpec.suffices['*'] ? '=' : ",";
- result += shouldEscape ? encodeURIComponent(value[key]).replace(/!/g, "%21") : notReallyPercentEncode(value[key]);
- }
- } else {
- if (showVariables) {
- result += varSpec.name;
- if (!trimEmptyString || value !== "") {
- result += "=";
- }
- }
- if (varSpec.truncate != null) {
- value = value.substring(0, varSpec.truncate);
- }
- result += shouldEscape ? encodeURIComponent(value).replace(/!/g, "%21"): notReallyPercentEncode(value);
- }
- }
- return result;
- };
- subFunction.varNames = varNames;
- return {
- prefix: prefix,
- substitution: subFunction
- };
-}
-
-function UriTemplate(template) {
- if (!(this instanceof UriTemplate)) {
- return new UriTemplate(template);
- }
- var parts = template.split("{");
- var textParts = [parts.shift()];
- var prefixes = [];
- var substitutions = [];
- var varNames = [];
- while (parts.length > 0) {
- var part = parts.shift();
- var spec = part.split("}")[0];
- var remainder = part.substring(spec.length + 1);
- var funcs = uriTemplateSubstitution(spec);
- substitutions.push(funcs.substitution);
- prefixes.push(funcs.prefix);
- textParts.push(remainder);
- varNames = varNames.concat(funcs.substitution.varNames);
- }
- this.fill = function (valueFunction) {
- var result = textParts[0];
- for (var i = 0; i < substitutions.length; i++) {
- var substitution = substitutions[i];
- result += substitution(valueFunction);
- result += textParts[i + 1];
- }
- return result;
- };
- this.varNames = varNames;
- this.template = template;
-}
-UriTemplate.prototype = {
- toString: function () {
- return this.template;
- },
- fillFromObject: function (obj) {
- return this.fill(function (varName) {
- return obj[varName];
- });
- }
-};
-var ValidatorContext = function ValidatorContext(parent, collectMultiple, errorReporter, checkRecursive, trackUnknownProperties) {
- this.missing = [];
- this.missingMap = {};
- this.formatValidators = parent ? Object.create(parent.formatValidators) : {};
- this.schemas = parent ? Object.create(parent.schemas) : {};
- this.collectMultiple = collectMultiple;
- this.errors = [];
- this.handleError = collectMultiple ? this.collectError : this.returnError;
- if (checkRecursive) {
- this.checkRecursive = true;
- this.scanned = [];
- this.scannedFrozen = [];
- this.scannedFrozenSchemas = [];
- this.scannedFrozenValidationErrors = [];
- this.validatedSchemasKey = 'tv4_validation_id';
- this.validationErrorsKey = 'tv4_validation_errors_id';
- }
- if (trackUnknownProperties) {
- this.trackUnknownProperties = true;
- this.knownPropertyPaths = {};
- this.unknownPropertyPaths = {};
- }
- this.errorReporter = errorReporter || defaultErrorReporter('en');
- if (typeof this.errorReporter === 'string') {
- throw new Error('debug');
- }
- this.definedKeywords = {};
- if (parent) {
- for (var key in parent.definedKeywords) {
- this.definedKeywords[key] = parent.definedKeywords[key].slice(0);
- }
- }
-};
-ValidatorContext.prototype.defineKeyword = function (keyword, keywordFunction) {
- this.definedKeywords[keyword] = this.definedKeywords[keyword] || [];
- this.definedKeywords[keyword].push(keywordFunction);
-};
-ValidatorContext.prototype.createError = function (code, messageParams, dataPath, schemaPath, subErrors, data, schema) {
- var error = new ValidationError(code, messageParams, dataPath, schemaPath, subErrors);
- error.message = this.errorReporter(error, data, schema);
- return error;
-};
-ValidatorContext.prototype.returnError = function (error) {
- return error;
-};
-ValidatorContext.prototype.collectError = function (error) {
- if (error) {
- this.errors.push(error);
- }
- return null;
-};
-ValidatorContext.prototype.prefixErrors = function (startIndex, dataPath, schemaPath) {
- for (var i = startIndex; i < this.errors.length; i++) {
- this.errors[i] = this.errors[i].prefixWith(dataPath, schemaPath);
- }
- return this;
-};
-ValidatorContext.prototype.banUnknownProperties = function (data, schema) {
- for (var unknownPath in this.unknownPropertyPaths) {
- var error = this.createError(ErrorCodes.UNKNOWN_PROPERTY, {path: unknownPath}, unknownPath, "", null, data, schema);
- var result = this.handleError(error);
- if (result) {
- return result;
- }
- }
- return null;
-};
-
-ValidatorContext.prototype.addFormat = function (format, validator) {
- if (typeof format === 'object') {
- for (var key in format) {
- this.addFormat(key, format[key]);
- }
- return this;
- }
- this.formatValidators[format] = validator;
-};
-ValidatorContext.prototype.resolveRefs = function (schema, urlHistory) {
- if (schema['$ref'] !== undefined) {
- urlHistory = urlHistory || {};
- if (urlHistory[schema['$ref']]) {
- return this.createError(ErrorCodes.CIRCULAR_REFERENCE, {urls: Object.keys(urlHistory).join(', ')}, '', '', null, undefined, schema);
- }
- urlHistory[schema['$ref']] = true;
- schema = this.getSchema(schema['$ref'], urlHistory);
- }
- return schema;
-};
-ValidatorContext.prototype.getSchema = function (url, urlHistory) {
- var schema;
- if (this.schemas[url] !== undefined) {
- schema = this.schemas[url];
- return this.resolveRefs(schema, urlHistory);
- }
- var baseUrl = url;
- var fragment = "";
- if (url.indexOf('#') !== -1) {
- fragment = url.substring(url.indexOf("#") + 1);
- baseUrl = url.substring(0, url.indexOf("#"));
- }
- if (typeof this.schemas[baseUrl] === 'object') {
- schema = this.schemas[baseUrl];
- var pointerPath = decodeURIComponent(fragment);
- if (pointerPath === "") {
- return this.resolveRefs(schema, urlHistory);
- } else if (pointerPath.charAt(0) !== "/") {
- return undefined;
- }
- var parts = pointerPath.split("/").slice(1);
- for (var i = 0; i < parts.length; i++) {
- var component = parts[i].replace(/~1/g, "/").replace(/~0/g, "~");
- if (schema[component] === undefined) {
- schema = undefined;
- break;
- }
- schema = schema[component];
- }
- if (schema !== undefined) {
- return this.resolveRefs(schema, urlHistory);
- }
- }
- if (this.missing[baseUrl] === undefined) {
- this.missing.push(baseUrl);
- this.missing[baseUrl] = baseUrl;
- this.missingMap[baseUrl] = baseUrl;
- }
-};
-ValidatorContext.prototype.searchSchemas = function (schema, url) {
- if (Array.isArray(schema)) {
- for (var i = 0; i < schema.length; i++) {
- this.searchSchemas(schema[i], url);
- }
- } else if (schema && typeof schema === "object") {
- if (typeof schema.id === "string") {
- if (isTrustedUrl(url, schema.id)) {
- if (this.schemas[schema.id] === undefined) {
- this.schemas[schema.id] = schema;
- }
- }
- }
- for (var key in schema) {
- if (key !== "enum") {
- if (typeof schema[key] === "object") {
- this.searchSchemas(schema[key], url);
- } else if (key === "$ref") {
- var uri = getDocumentUri(schema[key]);
- if (uri && this.schemas[uri] === undefined && this.missingMap[uri] === undefined) {
- this.missingMap[uri] = uri;
- }
- }
- }
- }
- }
-};
-ValidatorContext.prototype.addSchema = function (url, schema) {
- //overload
- if (typeof url !== 'string' || typeof schema === 'undefined') {
- if (typeof url === 'object' && typeof url.id === 'string') {
- schema = url;
- url = schema.id;
- }
- else {
- return;
- }
- }
- if (url === getDocumentUri(url) + "#") {
- // Remove empty fragment
- url = getDocumentUri(url);
- }
- this.schemas[url] = schema;
- delete this.missingMap[url];
- normSchema(schema, url);
- this.searchSchemas(schema, url);
-};
-
-ValidatorContext.prototype.getSchemaMap = function () {
- var map = {};
- for (var key in this.schemas) {
- map[key] = this.schemas[key];
- }
- return map;
-};
-
-ValidatorContext.prototype.getSchemaUris = function (filterRegExp) {
- var list = [];
- for (var key in this.schemas) {
- if (!filterRegExp || filterRegExp.test(key)) {
- list.push(key);
- }
- }
- return list;
-};
-
-ValidatorContext.prototype.getMissingUris = function (filterRegExp) {
- var list = [];
- for (var key in this.missingMap) {
- if (!filterRegExp || filterRegExp.test(key)) {
- list.push(key);
- }
- }
- return list;
-};
-
-ValidatorContext.prototype.dropSchemas = function () {
- this.schemas = {};
- this.reset();
-};
-ValidatorContext.prototype.reset = function () {
- this.missing = [];
- this.missingMap = {};
- this.errors = [];
-};
-
-ValidatorContext.prototype.validateAll = function (data, schema, dataPathParts, schemaPathParts, dataPointerPath) {
- var topLevel;
- schema = this.resolveRefs(schema);
- if (!schema) {
- return null;
- } else if (schema instanceof ValidationError) {
- this.errors.push(schema);
- return schema;
- }
-
- var startErrorCount = this.errors.length;
- var frozenIndex, scannedFrozenSchemaIndex = null, scannedSchemasIndex = null;
- if (this.checkRecursive && data && typeof data === 'object') {
- topLevel = !this.scanned.length;
- if (data[this.validatedSchemasKey]) {
- var schemaIndex = data[this.validatedSchemasKey].indexOf(schema);
- if (schemaIndex !== -1) {
- this.errors = this.errors.concat(data[this.validationErrorsKey][schemaIndex]);
- return null;
- }
- }
- if (Object.isFrozen(data)) {
- frozenIndex = this.scannedFrozen.indexOf(data);
- if (frozenIndex !== -1) {
- var frozenSchemaIndex = this.scannedFrozenSchemas[frozenIndex].indexOf(schema);
- if (frozenSchemaIndex !== -1) {
- this.errors = this.errors.concat(this.scannedFrozenValidationErrors[frozenIndex][frozenSchemaIndex]);
- return null;
- }
- }
- }
- this.scanned.push(data);
- if (Object.isFrozen(data)) {
- if (frozenIndex === -1) {
- frozenIndex = this.scannedFrozen.length;
- this.scannedFrozen.push(data);
- this.scannedFrozenSchemas.push([]);
- }
- scannedFrozenSchemaIndex = this.scannedFrozenSchemas[frozenIndex].length;
- this.scannedFrozenSchemas[frozenIndex][scannedFrozenSchemaIndex] = schema;
- this.scannedFrozenValidationErrors[frozenIndex][scannedFrozenSchemaIndex] = [];
- } else {
- if (!data[this.validatedSchemasKey]) {
- try {
- Object.defineProperty(data, this.validatedSchemasKey, {
- value: [],
- configurable: true
- });
- Object.defineProperty(data, this.validationErrorsKey, {
- value: [],
- configurable: true
- });
- } catch (e) {
- //IE 7/8 workaround
- data[this.validatedSchemasKey] = [];
- data[this.validationErrorsKey] = [];
- }
- }
- scannedSchemasIndex = data[this.validatedSchemasKey].length;
- data[this.validatedSchemasKey][scannedSchemasIndex] = schema;
- data[this.validationErrorsKey][scannedSchemasIndex] = [];
- }
- }
-
- var errorCount = this.errors.length;
- var error = this.validateBasic(data, schema, dataPointerPath)
- || this.validateNumeric(data, schema, dataPointerPath)
- || this.validateString(data, schema, dataPointerPath)
- || this.validateArray(data, schema, dataPointerPath)
- || this.validateObject(data, schema, dataPointerPath)
- || this.validateCombinations(data, schema, dataPointerPath)
- || this.validateHypermedia(data, schema, dataPointerPath)
- || this.validateFormat(data, schema, dataPointerPath)
- || this.validateDefinedKeywords(data, schema, dataPointerPath)
- || null;
-
- if (topLevel) {
- while (this.scanned.length) {
- var item = this.scanned.pop();
- delete item[this.validatedSchemasKey];
- }
- this.scannedFrozen = [];
- this.scannedFrozenSchemas = [];
- }
-
- if (error || errorCount !== this.errors.length) {
- while ((dataPathParts && dataPathParts.length) || (schemaPathParts && schemaPathParts.length)) {
- var dataPart = (dataPathParts && dataPathParts.length) ? "" + dataPathParts.pop() : null;
- var schemaPart = (schemaPathParts && schemaPathParts.length) ? "" + schemaPathParts.pop() : null;
- if (error) {
- error = error.prefixWith(dataPart, schemaPart);
- }
- this.prefixErrors(errorCount, dataPart, schemaPart);
- }
- }
-
- if (scannedFrozenSchemaIndex !== null) {
- this.scannedFrozenValidationErrors[frozenIndex][scannedFrozenSchemaIndex] = this.errors.slice(startErrorCount);
- } else if (scannedSchemasIndex !== null) {
- data[this.validationErrorsKey][scannedSchemasIndex] = this.errors.slice(startErrorCount);
- }
-
- return this.handleError(error);
-};
-ValidatorContext.prototype.validateFormat = function (data, schema) {
- if (typeof schema.format !== 'string' || !this.formatValidators[schema.format]) {
- return null;
- }
- var errorMessage = this.formatValidators[schema.format].call(null, data, schema);
- if (typeof errorMessage === 'string' || typeof errorMessage === 'number') {
- return this.createError(ErrorCodes.FORMAT_CUSTOM, {message: errorMessage}, '', '/format', null, data, schema);
- } else if (errorMessage && typeof errorMessage === 'object') {
- return this.createError(ErrorCodes.FORMAT_CUSTOM, {message: errorMessage.message || "?"}, errorMessage.dataPath || '', errorMessage.schemaPath || "/format", null, data, schema);
- }
- return null;
-};
-ValidatorContext.prototype.validateDefinedKeywords = function (data, schema, dataPointerPath) {
- for (var key in this.definedKeywords) {
- if (typeof schema[key] === 'undefined') {
- continue;
- }
- var validationFunctions = this.definedKeywords[key];
- for (var i = 0; i < validationFunctions.length; i++) {
- var func = validationFunctions[i];
- var result = func(data, schema[key], schema, dataPointerPath);
- if (typeof result === 'string' || typeof result === 'number') {
- return this.createError(ErrorCodes.KEYWORD_CUSTOM, {key: key, message: result}, '', '', null, data, schema).prefixWith(null, key);
- } else if (result && typeof result === 'object') {
- var code = result.code;
- if (typeof code === 'string') {
- if (!ErrorCodes[code]) {
- throw new Error('Undefined error code (use defineError): ' + code);
- }
- code = ErrorCodes[code];
- } else if (typeof code !== 'number') {
- code = ErrorCodes.KEYWORD_CUSTOM;
- }
- var messageParams = (typeof result.message === 'object') ? result.message : {key: key, message: result.message || "?"};
- var schemaPath = result.schemaPath || ("/" + key.replace(/~/g, '~0').replace(/\//g, '~1'));
- return this.createError(code, messageParams, result.dataPath || null, schemaPath, null, data, schema);
- }
- }
- }
- return null;
-};
-
-function recursiveCompare(A, B) {
- if (A === B) {
- return true;
- }
- if (A && B && typeof A === "object" && typeof B === "object") {
- if (Array.isArray(A) !== Array.isArray(B)) {
- return false;
- } else if (Array.isArray(A)) {
- if (A.length !== B.length) {
- return false;
- }
- for (var i = 0; i < A.length; i++) {
- if (!recursiveCompare(A[i], B[i])) {
- return false;
- }
- }
- } else {
- var key;
- for (key in A) {
- if (B[key] === undefined && A[key] !== undefined) {
- return false;
- }
- }
- for (key in B) {
- if (A[key] === undefined && B[key] !== undefined) {
- return false;
- }
- }
- for (key in A) {
- if (!recursiveCompare(A[key], B[key])) {
- return false;
- }
- }
- }
- return true;
- }
- return false;
-}
-
-ValidatorContext.prototype.validateBasic = function validateBasic(data, schema, dataPointerPath) {
- var error;
- if (error = this.validateType(data, schema, dataPointerPath)) {
- return error.prefixWith(null, "type");
- }
- if (error = this.validateEnum(data, schema, dataPointerPath)) {
- return error.prefixWith(null, "type");
- }
- return null;
-};
-
-ValidatorContext.prototype.validateType = function validateType(data, schema) {
- if (schema.type === undefined) {
- return null;
- }
- var dataType = typeof data;
- if (data === null) {
- dataType = "null";
- } else if (Array.isArray(data)) {
- dataType = "array";
- }
- var allowedTypes = schema.type;
- if (!Array.isArray(allowedTypes)) {
- allowedTypes = [allowedTypes];
- }
-
- for (var i = 0; i < allowedTypes.length; i++) {
- var type = allowedTypes[i];
- if (type === dataType || (type === "integer" && dataType === "number" && (data % 1 === 0))) {
- return null;
- }
- }
- return this.createError(ErrorCodes.INVALID_TYPE, {type: dataType, expected: allowedTypes.join("/")}, '', '', null, data, schema);
-};
-
-ValidatorContext.prototype.validateEnum = function validateEnum(data, schema) {
- if (schema["enum"] === undefined) {
- return null;
- }
- for (var i = 0; i < schema["enum"].length; i++) {
- var enumVal = schema["enum"][i];
- if (recursiveCompare(data, enumVal)) {
- return null;
- }
- }
- return this.createError(ErrorCodes.ENUM_MISMATCH, {value: (typeof JSON !== 'undefined') ? JSON.stringify(data) : data}, '', '', null, data, schema);
-};
-
-ValidatorContext.prototype.validateNumeric = function validateNumeric(data, schema, dataPointerPath) {
- return this.validateMultipleOf(data, schema, dataPointerPath)
- || this.validateMinMax(data, schema, dataPointerPath)
- || this.validateNaN(data, schema, dataPointerPath)
- || null;
-};
-
-var CLOSE_ENOUGH_LOW = Math.pow(2, -51);
-var CLOSE_ENOUGH_HIGH = 1 - CLOSE_ENOUGH_LOW;
-ValidatorContext.prototype.validateMultipleOf = function validateMultipleOf(data, schema) {
- var multipleOf = schema.multipleOf || schema.divisibleBy;
- if (multipleOf === undefined) {
- return null;
- }
- if (typeof data === "number") {
- var remainder = (data/multipleOf)%1;
- if (remainder >= CLOSE_ENOUGH_LOW && remainder < CLOSE_ENOUGH_HIGH) {
- return this.createError(ErrorCodes.NUMBER_MULTIPLE_OF, {value: data, multipleOf: multipleOf}, '', '', null, data, schema);
- }
- }
- return null;
-};
-
-ValidatorContext.prototype.validateMinMax = function validateMinMax(data, schema) {
- if (typeof data !== "number") {
- return null;
- }
- if (schema.minimum !== undefined) {
- if (data < schema.minimum) {
- return this.createError(ErrorCodes.NUMBER_MINIMUM, {value: data, minimum: schema.minimum}, '', '/minimum', null, data, schema);
- }
- if (schema.exclusiveMinimum && data === schema.minimum) {
- return this.createError(ErrorCodes.NUMBER_MINIMUM_EXCLUSIVE, {value: data, minimum: schema.minimum}, '', '/exclusiveMinimum', null, data, schema);
- }
- }
- if (schema.maximum !== undefined) {
- if (data > schema.maximum) {
- return this.createError(ErrorCodes.NUMBER_MAXIMUM, {value: data, maximum: schema.maximum}, '', '/maximum', null, data, schema);
- }
- if (schema.exclusiveMaximum && data === schema.maximum) {
- return this.createError(ErrorCodes.NUMBER_MAXIMUM_EXCLUSIVE, {value: data, maximum: schema.maximum}, '', '/exclusiveMaximum', null, data, schema);
- }
- }
- return null;
-};
-
-ValidatorContext.prototype.validateNaN = function validateNaN(data, schema) {
- if (typeof data !== "number") {
- return null;
- }
- if (isNaN(data) === true || data === Infinity || data === -Infinity) {
- return this.createError(ErrorCodes.NUMBER_NOT_A_NUMBER, {value: data}, '', '/type', null, data, schema);
- }
- return null;
-};
-
-ValidatorContext.prototype.validateString = function validateString(data, schema, dataPointerPath) {
- return this.validateStringLength(data, schema, dataPointerPath)
- || this.validateStringPattern(data, schema, dataPointerPath)
- || null;
-};
-
-ValidatorContext.prototype.validateStringLength = function validateStringLength(data, schema) {
- if (typeof data !== "string") {
- return null;
- }
- if (schema.minLength !== undefined) {
- if (data.length < schema.minLength) {
- return this.createError(ErrorCodes.STRING_LENGTH_SHORT, {length: data.length, minimum: schema.minLength}, '', '/minLength', null, data, schema);
- }
- }
- if (schema.maxLength !== undefined) {
- if (data.length > schema.maxLength) {
- return this.createError(ErrorCodes.STRING_LENGTH_LONG, {length: data.length, maximum: schema.maxLength}, '', '/maxLength', null, data, schema);
- }
- }
- return null;
-};
-
-ValidatorContext.prototype.validateStringPattern = function validateStringPattern(data, schema) {
- if (typeof data !== "string" || (typeof schema.pattern !== "string" && !(schema.pattern instanceof RegExp))) {
- return null;
- }
- var regexp;
- if (schema.pattern instanceof RegExp) {
- regexp = schema.pattern;
- }
- else {
- var body, flags = '';
- // Check for regular expression literals
- // @see http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5
- var literal = schema.pattern.match(/^\/(.+)\/([img]*)$/);
- if (literal) {
- body = literal[1];
- flags = literal[2];
- }
- else {
- body = schema.pattern;
- }
- regexp = new RegExp(body, flags);
- }
- if (!regexp.test(data)) {
- return this.createError(ErrorCodes.STRING_PATTERN, {pattern: schema.pattern}, '', '/pattern', null, data, schema);
- }
- return null;
-};
-
-ValidatorContext.prototype.validateArray = function validateArray(data, schema, dataPointerPath) {
- if (!Array.isArray(data)) {
- return null;
- }
- return this.validateArrayLength(data, schema, dataPointerPath)
- || this.validateArrayUniqueItems(data, schema, dataPointerPath)
- || this.validateArrayItems(data, schema, dataPointerPath)
- || null;
-};
-
-ValidatorContext.prototype.validateArrayLength = function validateArrayLength(data, schema) {
- var error;
- if (schema.minItems !== undefined) {
- if (data.length < schema.minItems) {
- error = this.createError(ErrorCodes.ARRAY_LENGTH_SHORT, {length: data.length, minimum: schema.minItems}, '', '/minItems', null, data, schema);
- if (this.handleError(error)) {
- return error;
- }
- }
- }
- if (schema.maxItems !== undefined) {
- if (data.length > schema.maxItems) {
- error = this.createError(ErrorCodes.ARRAY_LENGTH_LONG, {length: data.length, maximum: schema.maxItems}, '', '/maxItems', null, data, schema);
- if (this.handleError(error)) {
- return error;
- }
- }
- }
- return null;
-};
-
-ValidatorContext.prototype.validateArrayUniqueItems = function validateArrayUniqueItems(data, schema) {
- if (schema.uniqueItems) {
- for (var i = 0; i < data.length; i++) {
- for (var j = i + 1; j < data.length; j++) {
- if (recursiveCompare(data[i], data[j])) {
- var error = this.createError(ErrorCodes.ARRAY_UNIQUE, {match1: i, match2: j}, '', '/uniqueItems', null, data, schema);
- if (this.handleError(error)) {
- return error;
- }
- }
- }
- }
- }
- return null;
-};
-
-ValidatorContext.prototype.validateArrayItems = function validateArrayItems(data, schema, dataPointerPath) {
- if (schema.items === undefined) {
- return null;
- }
- var error, i;
- if (Array.isArray(schema.items)) {
- for (i = 0; i < data.length; i++) {
- if (i < schema.items.length) {
- if (error = this.validateAll(data[i], schema.items[i], [i], ["items", i], dataPointerPath + "/" + i)) {
- return error;
- }
- } else if (schema.additionalItems !== undefined) {
- if (typeof schema.additionalItems === "boolean") {
- if (!schema.additionalItems) {
- error = (this.createError(ErrorCodes.ARRAY_ADDITIONAL_ITEMS, {}, '/' + i, '/additionalItems', null, data, schema));
- if (this.handleError(error)) {
- return error;
- }
- }
- } else if (error = this.validateAll(data[i], schema.additionalItems, [i], ["additionalItems"], dataPointerPath + "/" + i)) {
- return error;
- }
- }
- }
- } else {
- for (i = 0; i < data.length; i++) {
- if (error = this.validateAll(data[i], schema.items, [i], ["items"], dataPointerPath + "/" + i)) {
- return error;
- }
- }
- }
- return null;
-};
-
-ValidatorContext.prototype.validateObject = function validateObject(data, schema, dataPointerPath) {
- if (typeof data !== "object" || data === null || Array.isArray(data)) {
- return null;
- }
- return this.validateObjectMinMaxProperties(data, schema, dataPointerPath)
- || this.validateObjectRequiredProperties(data, schema, dataPointerPath)
- || this.validateObjectProperties(data, schema, dataPointerPath)
- || this.validateObjectDependencies(data, schema, dataPointerPath)
- || null;
-};
-
-ValidatorContext.prototype.validateObjectMinMaxProperties = function validateObjectMinMaxProperties(data, schema) {
- var keys = Object.keys(data);
- var error;
- if (schema.minProperties !== undefined) {
- if (keys.length < schema.minProperties) {
- error = this.createError(ErrorCodes.OBJECT_PROPERTIES_MINIMUM, {propertyCount: keys.length, minimum: schema.minProperties}, '', '/minProperties', null, data, schema);
- if (this.handleError(error)) {
- return error;
- }
- }
- }
- if (schema.maxProperties !== undefined) {
- if (keys.length > schema.maxProperties) {
- error = this.createError(ErrorCodes.OBJECT_PROPERTIES_MAXIMUM, {propertyCount: keys.length, maximum: schema.maxProperties}, '', '/maxProperties', null, data, schema);
- if (this.handleError(error)) {
- return error;
- }
- }
- }
- return null;
-};
-
-ValidatorContext.prototype.validateObjectRequiredProperties = function validateObjectRequiredProperties(data, schema) {
- if (schema.required !== undefined) {
- for (var i = 0; i < schema.required.length; i++) {
- var key = schema.required[i];
- if (data[key] === undefined) {
- var error = this.createError(ErrorCodes.OBJECT_REQUIRED, {key: key}, '', '/required/' + i, null, data, schema);
- if (this.handleError(error)) {
- return error;
- }
- }
- }
- }
- return null;
-};
-
-ValidatorContext.prototype.validateObjectProperties = function validateObjectProperties(data, schema, dataPointerPath) {
- var error;
- for (var key in data) {
- var keyPointerPath = dataPointerPath + "/" + key.replace(/~/g, '~0').replace(/\//g, '~1');
- var foundMatch = false;
- if (schema.properties !== undefined && schema.properties[key] !== undefined) {
- foundMatch = true;
- if (error = this.validateAll(data[key], schema.properties[key], [key], ["properties", key], keyPointerPath)) {
- return error;
- }
- }
- if (schema.patternProperties !== undefined) {
- for (var patternKey in schema.patternProperties) {
- var regexp = new RegExp(patternKey);
- if (regexp.test(key)) {
- foundMatch = true;
- if (error = this.validateAll(data[key], schema.patternProperties[patternKey], [key], ["patternProperties", patternKey], keyPointerPath)) {
- return error;
- }
- }
- }
- }
- if (!foundMatch) {
- if (schema.additionalProperties !== undefined) {
- if (this.trackUnknownProperties) {
- this.knownPropertyPaths[keyPointerPath] = true;
- delete this.unknownPropertyPaths[keyPointerPath];
- }
- if (typeof schema.additionalProperties === "boolean") {
- if (!schema.additionalProperties) {
- error = this.createError(ErrorCodes.OBJECT_ADDITIONAL_PROPERTIES, {key: key}, '', '/additionalProperties', null, data, schema).prefixWith(key, null);
- if (this.handleError(error)) {
- return error;
- }
- }
- } else {
- if (error = this.validateAll(data[key], schema.additionalProperties, [key], ["additionalProperties"], keyPointerPath)) {
- return error;
- }
- }
- } else if (this.trackUnknownProperties && !this.knownPropertyPaths[keyPointerPath]) {
- this.unknownPropertyPaths[keyPointerPath] = true;
- }
- } else if (this.trackUnknownProperties) {
- this.knownPropertyPaths[keyPointerPath] = true;
- delete this.unknownPropertyPaths[keyPointerPath];
- }
- }
- return null;
-};
-
-ValidatorContext.prototype.validateObjectDependencies = function validateObjectDependencies(data, schema, dataPointerPath) {
- var error;
- if (schema.dependencies !== undefined) {
- for (var depKey in schema.dependencies) {
- if (data[depKey] !== undefined) {
- var dep = schema.dependencies[depKey];
- if (typeof dep === "string") {
- if (data[dep] === undefined) {
- error = this.createError(ErrorCodes.OBJECT_DEPENDENCY_KEY, {key: depKey, missing: dep}, '', '', null, data, schema).prefixWith(null, depKey).prefixWith(null, "dependencies");
- if (this.handleError(error)) {
- return error;
- }
- }
- } else if (Array.isArray(dep)) {
- for (var i = 0; i < dep.length; i++) {
- var requiredKey = dep[i];
- if (data[requiredKey] === undefined) {
- error = this.createError(ErrorCodes.OBJECT_DEPENDENCY_KEY, {key: depKey, missing: requiredKey}, '', '/' + i, null, data, schema).prefixWith(null, depKey).prefixWith(null, "dependencies");
- if (this.handleError(error)) {
- return error;
- }
- }
- }
- } else {
- if (error = this.validateAll(data, dep, [], ["dependencies", depKey], dataPointerPath)) {
- return error;
- }
- }
- }
- }
- }
- return null;
-};
-
-ValidatorContext.prototype.validateCombinations = function validateCombinations(data, schema, dataPointerPath) {
- return this.validateAllOf(data, schema, dataPointerPath)
- || this.validateAnyOf(data, schema, dataPointerPath)
- || this.validateOneOf(data, schema, dataPointerPath)
- || this.validateNot(data, schema, dataPointerPath)
- || null;
-};
-
-ValidatorContext.prototype.validateAllOf = function validateAllOf(data, schema, dataPointerPath) {
- if (schema.allOf === undefined) {
- return null;
- }
- var error;
- for (var i = 0; i < schema.allOf.length; i++) {
- var subSchema = schema.allOf[i];
- if (error = this.validateAll(data, subSchema, [], ["allOf", i], dataPointerPath)) {
- return error;
- }
- }
- return null;
-};
-
-ValidatorContext.prototype.validateAnyOf = function validateAnyOf(data, schema, dataPointerPath) {
- if (schema.anyOf === undefined) {
- return null;
- }
- var errors = [];
- var startErrorCount = this.errors.length;
- var oldUnknownPropertyPaths, oldKnownPropertyPaths;
- if (this.trackUnknownProperties) {
- oldUnknownPropertyPaths = this.unknownPropertyPaths;
- oldKnownPropertyPaths = this.knownPropertyPaths;
- }
- var errorAtEnd = true;
- for (var i = 0; i < schema.anyOf.length; i++) {
- if (this.trackUnknownProperties) {
- this.unknownPropertyPaths = {};
- this.knownPropertyPaths = {};
- }
- var subSchema = schema.anyOf[i];
-
- var errorCount = this.errors.length;
- var error = this.validateAll(data, subSchema, [], ["anyOf", i], dataPointerPath);
-
- if (error === null && errorCount === this.errors.length) {
- this.errors = this.errors.slice(0, startErrorCount);
-
- if (this.trackUnknownProperties) {
- for (var knownKey in this.knownPropertyPaths) {
- oldKnownPropertyPaths[knownKey] = true;
- delete oldUnknownPropertyPaths[knownKey];
- }
- for (var unknownKey in this.unknownPropertyPaths) {
- if (!oldKnownPropertyPaths[unknownKey]) {
- oldUnknownPropertyPaths[unknownKey] = true;
- }
- }
- // We need to continue looping so we catch all the property definitions, but we don't want to return an error
- errorAtEnd = false;
- continue;
- }
-
- return null;
- }
- if (error) {
- errors.push(error.prefixWith(null, "" + i).prefixWith(null, "anyOf"));
- }
- }
- if (this.trackUnknownProperties) {
- this.unknownPropertyPaths = oldUnknownPropertyPaths;
- this.knownPropertyPaths = oldKnownPropertyPaths;
- }
- if (errorAtEnd) {
- errors = errors.concat(this.errors.slice(startErrorCount));
- this.errors = this.errors.slice(0, startErrorCount);
- return this.createError(ErrorCodes.ANY_OF_MISSING, {}, "", "/anyOf", errors, data, schema);
- }
-};
-
-ValidatorContext.prototype.validateOneOf = function validateOneOf(data, schema, dataPointerPath) {
- if (schema.oneOf === undefined) {
- return null;
- }
- var validIndex = null;
- var errors = [];
- var startErrorCount = this.errors.length;
- var oldUnknownPropertyPaths, oldKnownPropertyPaths;
- if (this.trackUnknownProperties) {
- oldUnknownPropertyPaths = this.unknownPropertyPaths;
- oldKnownPropertyPaths = this.knownPropertyPaths;
- }
- for (var i = 0; i < schema.oneOf.length; i++) {
- if (this.trackUnknownProperties) {
- this.unknownPropertyPaths = {};
- this.knownPropertyPaths = {};
- }
- var subSchema = schema.oneOf[i];
-
- var errorCount = this.errors.length;
- var error = this.validateAll(data, subSchema, [], ["oneOf", i], dataPointerPath);
-
- if (error === null && errorCount === this.errors.length) {
- if (validIndex === null) {
- validIndex = i;
- } else {
- this.errors = this.errors.slice(0, startErrorCount);
- return this.createError(ErrorCodes.ONE_OF_MULTIPLE, {index1: validIndex, index2: i}, "", "/oneOf", null, data, schema);
- }
- if (this.trackUnknownProperties) {
- for (var knownKey in this.knownPropertyPaths) {
- oldKnownPropertyPaths[knownKey] = true;
- delete oldUnknownPropertyPaths[knownKey];
- }
- for (var unknownKey in this.unknownPropertyPaths) {
- if (!oldKnownPropertyPaths[unknownKey]) {
- oldUnknownPropertyPaths[unknownKey] = true;
- }
- }
- }
- } else if (error) {
- errors.push(error);
- }
- }
- if (this.trackUnknownProperties) {
- this.unknownPropertyPaths = oldUnknownPropertyPaths;
- this.knownPropertyPaths = oldKnownPropertyPaths;
- }
- if (validIndex === null) {
- errors = errors.concat(this.errors.slice(startErrorCount));
- this.errors = this.errors.slice(0, startErrorCount);
- return this.createError(ErrorCodes.ONE_OF_MISSING, {}, "", "/oneOf", errors, data, schema);
- } else {
- this.errors = this.errors.slice(0, startErrorCount);
- }
- return null;
-};
-
-ValidatorContext.prototype.validateNot = function validateNot(data, schema, dataPointerPath) {
- if (schema.not === undefined) {
- return null;
- }
- var oldErrorCount = this.errors.length;
- var oldUnknownPropertyPaths, oldKnownPropertyPaths;
- if (this.trackUnknownProperties) {
- oldUnknownPropertyPaths = this.unknownPropertyPaths;
- oldKnownPropertyPaths = this.knownPropertyPaths;
- this.unknownPropertyPaths = {};
- this.knownPropertyPaths = {};
- }
- var error = this.validateAll(data, schema.not, null, null, dataPointerPath);
- var notErrors = this.errors.slice(oldErrorCount);
- this.errors = this.errors.slice(0, oldErrorCount);
- if (this.trackUnknownProperties) {
- this.unknownPropertyPaths = oldUnknownPropertyPaths;
- this.knownPropertyPaths = oldKnownPropertyPaths;
- }
- if (error === null && notErrors.length === 0) {
- return this.createError(ErrorCodes.NOT_PASSED, {}, "", "/not", null, data, schema);
- }
- return null;
-};
-
-ValidatorContext.prototype.validateHypermedia = function validateCombinations(data, schema, dataPointerPath) {
- if (!schema.links) {
- return null;
- }
- var error;
- for (var i = 0; i < schema.links.length; i++) {
- var ldo = schema.links[i];
- if (ldo.rel === "describedby") {
- var template = new UriTemplate(ldo.href);
- var allPresent = true;
- for (var j = 0; j < template.varNames.length; j++) {
- if (!(template.varNames[j] in data)) {
- allPresent = false;
- break;
- }
- }
- if (allPresent) {
- var schemaUrl = template.fillFromObject(data);
- var subSchema = {"$ref": schemaUrl};
- if (error = this.validateAll(data, subSchema, [], ["links", i], dataPointerPath)) {
- return error;
- }
- }
- }
- }
-};
-
-// parseURI() and resolveUrl() are from https://gist.github.com/1088850
-// - released as public domain by author ("Yaffle") - see comments on gist
-
-function parseURI(url) {
- var m = String(url).replace(/^\s+|\s+$/g, '').match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
- // authority = '//' + user + ':' + pass '@' + hostname + ':' port
- return (m ? {
- href : m[0] || '',
- protocol : m[1] || '',
- authority: m[2] || '',
- host : m[3] || '',
- hostname : m[4] || '',
- port : m[5] || '',
- pathname : m[6] || '',
- search : m[7] || '',
- hash : m[8] || ''
- } : null);
-}
-
-function resolveUrl(base, href) {// RFC 3986
-
- function removeDotSegments(input) {
- var output = [];
- input.replace(/^(\.\.?(\/|$))+/, '')
- .replace(/\/(\.(\/|$))+/g, '/')
- .replace(/\/\.\.$/, '/../')
- .replace(/\/?[^\/]*/g, function (p) {
- if (p === '/..') {
- output.pop();
- } else {
- output.push(p);
- }
- });
- return output.join('').replace(/^\//, input.charAt(0) === '/' ? '/' : '');
- }
-
- href = parseURI(href || '');
- base = parseURI(base || '');
-
- return !href || !base ? null : (href.protocol || base.protocol) +
- (href.protocol || href.authority ? href.authority : base.authority) +
- removeDotSegments(href.protocol || href.authority || href.pathname.charAt(0) === '/' ? href.pathname : (href.pathname ? ((base.authority && !base.pathname ? '/' : '') + base.pathname.slice(0, base.pathname.lastIndexOf('/') + 1) + href.pathname) : base.pathname)) +
- (href.protocol || href.authority || href.pathname ? href.search : (href.search || base.search)) +
- href.hash;
-}
-
-function getDocumentUri(uri) {
- return uri.split('#')[0];
-}
-function normSchema(schema, baseUri) {
- if (schema && typeof schema === "object") {
- if (baseUri === undefined) {
- baseUri = schema.id;
- } else if (typeof schema.id === "string") {
- baseUri = resolveUrl(baseUri, schema.id);
- schema.id = baseUri;
- }
- if (Array.isArray(schema)) {
- for (var i = 0; i < schema.length; i++) {
- normSchema(schema[i], baseUri);
- }
- } else {
- if (typeof schema['$ref'] === "string") {
- schema['$ref'] = resolveUrl(baseUri, schema['$ref']);
- }
- for (var key in schema) {
- if (key !== "enum") {
- normSchema(schema[key], baseUri);
- }
- }
- }
- }
-}
-
-function defaultErrorReporter(language) {
- language = language || 'en';
-
- var errorMessages = languages[language];
-
- return function (error) {
- var messageTemplate = errorMessages[error.code] || ErrorMessagesDefault[error.code];
- if (typeof messageTemplate !== 'string') {
- return "Unknown error code " + error.code + ": " + JSON.stringify(error.messageParams);
- }
- var messageParams = error.params;
- // Adapted from Crockford's supplant()
- return messageTemplate.replace(/\{([^{}]*)\}/g, function (whole, varName) {
- var subValue = messageParams[varName];
- return typeof subValue === 'string' || typeof subValue === 'number' ? subValue : whole;
- });
- };
-}
-
-var ErrorCodes = {
- INVALID_TYPE: 0,
- ENUM_MISMATCH: 1,
- ANY_OF_MISSING: 10,
- ONE_OF_MISSING: 11,
- ONE_OF_MULTIPLE: 12,
- NOT_PASSED: 13,
- // Numeric errors
- NUMBER_MULTIPLE_OF: 100,
- NUMBER_MINIMUM: 101,
- NUMBER_MINIMUM_EXCLUSIVE: 102,
- NUMBER_MAXIMUM: 103,
- NUMBER_MAXIMUM_EXCLUSIVE: 104,
- NUMBER_NOT_A_NUMBER: 105,
- // String errors
- STRING_LENGTH_SHORT: 200,
- STRING_LENGTH_LONG: 201,
- STRING_PATTERN: 202,
- // Object errors
- OBJECT_PROPERTIES_MINIMUM: 300,
- OBJECT_PROPERTIES_MAXIMUM: 301,
- OBJECT_REQUIRED: 302,
- OBJECT_ADDITIONAL_PROPERTIES: 303,
- OBJECT_DEPENDENCY_KEY: 304,
- // Array errors
- ARRAY_LENGTH_SHORT: 400,
- ARRAY_LENGTH_LONG: 401,
- ARRAY_UNIQUE: 402,
- ARRAY_ADDITIONAL_ITEMS: 403,
- // Custom/user-defined errors
- FORMAT_CUSTOM: 500,
- KEYWORD_CUSTOM: 501,
- // Schema structure
- CIRCULAR_REFERENCE: 600,
- // Non-standard validation options
- UNKNOWN_PROPERTY: 1000
-};
-var ErrorCodeLookup = {};
-for (var key in ErrorCodes) {
- ErrorCodeLookup[ErrorCodes[key]] = key;
-}
-var ErrorMessagesDefault = {
- INVALID_TYPE: "Invalid type: {type} (expected {expected})",
- ENUM_MISMATCH: "No enum match for: {value}",
- ANY_OF_MISSING: "Data does not match any schemas from \"anyOf\"",
- ONE_OF_MISSING: "Data does not match any schemas from \"oneOf\"",
- ONE_OF_MULTIPLE: "Data is valid against more than one schema from \"oneOf\": indices {index1} and {index2}",
- NOT_PASSED: "Data matches schema from \"not\"",
- // Numeric errors
- NUMBER_MULTIPLE_OF: "Value {value} is not a multiple of {multipleOf}",
- NUMBER_MINIMUM: "Value {value} is less than minimum {minimum}",
- NUMBER_MINIMUM_EXCLUSIVE: "Value {value} is equal to exclusive minimum {minimum}",
- NUMBER_MAXIMUM: "Value {value} is greater than maximum {maximum}",
- NUMBER_MAXIMUM_EXCLUSIVE: "Value {value} is equal to exclusive maximum {maximum}",
- NUMBER_NOT_A_NUMBER: "Value {value} is not a valid number",
- // String errors
- STRING_LENGTH_SHORT: "String is too short ({length} chars), minimum {minimum}",
- STRING_LENGTH_LONG: "String is too long ({length} chars), maximum {maximum}",
- STRING_PATTERN: "String does not match pattern: {pattern}",
- // Object errors
- OBJECT_PROPERTIES_MINIMUM: "Too few properties defined ({propertyCount}), minimum {minimum}",
- OBJECT_PROPERTIES_MAXIMUM: "Too many properties defined ({propertyCount}), maximum {maximum}",
- OBJECT_REQUIRED: "Missing required property: {key}",
- OBJECT_ADDITIONAL_PROPERTIES: "Additional properties not allowed",
- OBJECT_DEPENDENCY_KEY: "Dependency failed - key must exist: {missing} (due to key: {key})",
- // Array errors
- ARRAY_LENGTH_SHORT: "Array is too short ({length}), minimum {minimum}",
- ARRAY_LENGTH_LONG: "Array is too long ({length}), maximum {maximum}",
- ARRAY_UNIQUE: "Array items are not unique (indices {match1} and {match2})",
- ARRAY_ADDITIONAL_ITEMS: "Additional items not allowed",
- // Format errors
- FORMAT_CUSTOM: "Format validation failed ({message})",
- KEYWORD_CUSTOM: "Keyword failed: {key} ({message})",
- // Schema structure
- CIRCULAR_REFERENCE: "Circular $refs: {urls}",
- // Non-standard validation options
- UNKNOWN_PROPERTY: "Unknown property (not in schema)"
-};
-
-function ValidationError(code, params, dataPath, schemaPath, subErrors) {
- Error.call(this);
- if (code === undefined) {
- throw new Error ("No error code supplied: " + schemaPath);
- }
- this.message = '';
- this.params = params;
- this.code = code;
- this.dataPath = dataPath || "";
- this.schemaPath = schemaPath || "";
- this.subErrors = subErrors || null;
-
- var err = new Error(this.message);
- this.stack = err.stack || err.stacktrace;
- if (!this.stack) {
- try {
- throw err;
- }
- catch(err) {
- this.stack = err.stack || err.stacktrace;
- }
- }
-}
-ValidationError.prototype = Object.create(Error.prototype);
-ValidationError.prototype.constructor = ValidationError;
-ValidationError.prototype.name = 'ValidationError';
-
-ValidationError.prototype.prefixWith = function (dataPrefix, schemaPrefix) {
- if (dataPrefix !== null) {
- dataPrefix = dataPrefix.replace(/~/g, "~0").replace(/\//g, "~1");
- this.dataPath = "/" + dataPrefix + this.dataPath;
- }
- if (schemaPrefix !== null) {
- schemaPrefix = schemaPrefix.replace(/~/g, "~0").replace(/\//g, "~1");
- this.schemaPath = "/" + schemaPrefix + this.schemaPath;
- }
- if (this.subErrors !== null) {
- for (var i = 0; i < this.subErrors.length; i++) {
- this.subErrors[i].prefixWith(dataPrefix, schemaPrefix);
- }
- }
- return this;
-};
-
-function isTrustedUrl(baseUrl, testUrl) {
- if(testUrl.substring(0, baseUrl.length) === baseUrl){
- var remainder = testUrl.substring(baseUrl.length);
- if ((testUrl.length > 0 && testUrl.charAt(baseUrl.length - 1) === "/")
- || remainder.charAt(0) === "#"
- || remainder.charAt(0) === "?") {
- return true;
- }
- }
- return false;
-}
-
-var languages = {};
-function createApi(language) {
- var globalContext = new ValidatorContext();
- var currentLanguage;
- var customErrorReporter;
- var api = {
- setErrorReporter: function (reporter) {
- if (typeof reporter === 'string') {
- return this.language(reporter);
- }
- customErrorReporter = reporter;
- return true;
- },
- addFormat: function () {
- globalContext.addFormat.apply(globalContext, arguments);
- },
- language: function (code) {
- if (!code) {
- return currentLanguage;
- }
- if (!languages[code]) {
- code = code.split('-')[0]; // fall back to base language
- }
- if (languages[code]) {
- currentLanguage = code;
- return code; // so you can tell if fall-back has happened
- }
- return false;
- },
- addLanguage: function (code, messageMap) {
- var key;
- for (key in ErrorCodes) {
- if (messageMap[key] && !messageMap[ErrorCodes[key]]) {
- messageMap[ErrorCodes[key]] = messageMap[key];
- }
- }
- var rootCode = code.split('-')[0];
- if (!languages[rootCode]) { // use for base language if not yet defined
- languages[code] = messageMap;
- languages[rootCode] = messageMap;
- } else {
- languages[code] = Object.create(languages[rootCode]);
- for (key in messageMap) {
- if (typeof languages[rootCode][key] === 'undefined') {
- languages[rootCode][key] = messageMap[key];
- }
- languages[code][key] = messageMap[key];
- }
- }
- return this;
- },
- freshApi: function (language) {
- var result = createApi();
- if (language) {
- result.language(language);
- }
- return result;
- },
- validate: function (data, schema, checkRecursive, banUnknownProperties) {
- var def = defaultErrorReporter(currentLanguage);
- var errorReporter = customErrorReporter ? function (error, data, schema) {
- return customErrorReporter(error, data, schema) || def(error, data, schema);
- } : def;
- var context = new ValidatorContext(globalContext, false, errorReporter, checkRecursive, banUnknownProperties);
- if (typeof schema === "string") {
- schema = {"$ref": schema};
- }
- context.addSchema("", schema);
- var error = context.validateAll(data, schema, null, null, "");
- if (!error && banUnknownProperties) {
- error = context.banUnknownProperties(data, schema);
- }
- this.error = error;
- this.missing = context.missing;
- this.valid = (error === null);
- return this.valid;
- },
- validateResult: function () {
- var result = {};
- this.validate.apply(result, arguments);
- return result;
- },
- validateMultiple: function (data, schema, checkRecursive, banUnknownProperties) {
- var def = defaultErrorReporter(currentLanguage);
- var errorReporter = customErrorReporter ? function (error, data, schema) {
- return customErrorReporter(error, data, schema) || def(error, data, schema);
- } : def;
- var context = new ValidatorContext(globalContext, true, errorReporter, checkRecursive, banUnknownProperties);
- if (typeof schema === "string") {
- schema = {"$ref": schema};
- }
- context.addSchema("", schema);
- context.validateAll(data, schema, null, null, "");
- if (banUnknownProperties) {
- context.banUnknownProperties(data, schema);
- }
- var result = {};
- result.errors = context.errors;
- result.missing = context.missing;
- result.valid = (result.errors.length === 0);
- return result;
- },
- addSchema: function () {
- return globalContext.addSchema.apply(globalContext, arguments);
- },
- getSchema: function () {
- return globalContext.getSchema.apply(globalContext, arguments);
- },
- getSchemaMap: function () {
- return globalContext.getSchemaMap.apply(globalContext, arguments);
- },
- getSchemaUris: function () {
- return globalContext.getSchemaUris.apply(globalContext, arguments);
- },
- getMissingUris: function () {
- return globalContext.getMissingUris.apply(globalContext, arguments);
- },
- dropSchemas: function () {
- globalContext.dropSchemas.apply(globalContext, arguments);
- },
- defineKeyword: function () {
- globalContext.defineKeyword.apply(globalContext, arguments);
- },
- defineError: function (codeName, codeNumber, defaultMessage) {
- if (typeof codeName !== 'string' || !/^[A-Z]+(_[A-Z]+)*$/.test(codeName)) {
- throw new Error('Code name must be a string in UPPER_CASE_WITH_UNDERSCORES');
- }
- if (typeof codeNumber !== 'number' || codeNumber%1 !== 0 || codeNumber < 10000) {
- throw new Error('Code number must be an integer > 10000');
- }
- if (typeof ErrorCodes[codeName] !== 'undefined') {
- throw new Error('Error already defined: ' + codeName + ' as ' + ErrorCodes[codeName]);
- }
- if (typeof ErrorCodeLookup[codeNumber] !== 'undefined') {
- throw new Error('Error code already used: ' + ErrorCodeLookup[codeNumber] + ' as ' + codeNumber);
- }
- ErrorCodes[codeName] = codeNumber;
- ErrorCodeLookup[codeNumber] = codeName;
- ErrorMessagesDefault[codeName] = ErrorMessagesDefault[codeNumber] = defaultMessage;
- for (var langCode in languages) {
- var language = languages[langCode];
- if (language[codeName]) {
- language[codeNumber] = language[codeNumber] || language[codeName];
- }
- }
- },
- reset: function () {
- globalContext.reset();
- this.error = null;
- this.missing = [];
- this.valid = true;
- },
- missing: [],
- error: null,
- valid: true,
- normSchema: normSchema,
- resolveUrl: resolveUrl,
- getDocumentUri: getDocumentUri,
- errorCodes: ErrorCodes
- };
- api.language(language || 'en');
- return api;
-}
-
-var tv4 = createApi();
-tv4.addLanguage('en-gb', ErrorMessagesDefault);
-
-//legacy property
-tv4.tv4 = tv4;
-
-return tv4; // used by _header.js to globalise.
-
-})); \ No newline at end of file
diff --git a/tools/eslint/node_modules/type-check/package.json b/tools/eslint/node_modules/type-check/package.json
index 47d7f1ad0b..a949418853 100644
--- a/tools/eslint/node_modules/type-check/package.json
+++ b/tools/eslint/node_modules/type-check/package.json
@@ -16,7 +16,6 @@
"_from": "type-check@>=0.3.2 <0.4.0",
"_id": "type-check@0.3.2",
"_inCache": true,
- "_installable": true,
"_location": "/type-check",
"_nodeVersion": "4.2.4",
"_npmUser": {
diff --git a/tools/eslint/node_modules/typedarray/package.json b/tools/eslint/node_modules/typedarray/package.json
index c9d23cdee7..ab02da539b 100644
--- a/tools/eslint/node_modules/typedarray/package.json
+++ b/tools/eslint/node_modules/typedarray/package.json
@@ -16,7 +16,6 @@
"_from": "typedarray@>=0.0.5 <0.1.0",
"_id": "typedarray@0.0.6",
"_inCache": true,
- "_installable": true,
"_location": "/typedarray",
"_npmUser": {
"name": "substack",
diff --git a/tools/eslint/node_modules/user-home/package.json b/tools/eslint/node_modules/user-home/package.json
index b0f7d82980..893d7ed70e 100644
--- a/tools/eslint/node_modules/user-home/package.json
+++ b/tools/eslint/node_modules/user-home/package.json
@@ -16,7 +16,6 @@
"_from": "user-home@>=2.0.0 <3.0.0",
"_id": "user-home@2.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/user-home",
"_nodeVersion": "0.12.4",
"_npmUser": {
diff --git a/tools/eslint/node_modules/util-deprecate/package.json b/tools/eslint/node_modules/util-deprecate/package.json
index 5ba8335cfa..bc25f812e1 100644
--- a/tools/eslint/node_modules/util-deprecate/package.json
+++ b/tools/eslint/node_modules/util-deprecate/package.json
@@ -16,7 +16,6 @@
"_from": "util-deprecate@>=1.0.1 <1.1.0",
"_id": "util-deprecate@1.0.2",
"_inCache": true,
- "_installable": true,
"_location": "/util-deprecate",
"_nodeVersion": "4.1.2",
"_npmUser": {
diff --git a/tools/eslint/node_modules/wordwrap/package.json b/tools/eslint/node_modules/wordwrap/package.json
index 3121a6ed03..cbc40f8276 100644
--- a/tools/eslint/node_modules/wordwrap/package.json
+++ b/tools/eslint/node_modules/wordwrap/package.json
@@ -16,7 +16,6 @@
"_from": "wordwrap@>=1.0.0 <1.1.0",
"_id": "wordwrap@1.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/wordwrap",
"_nodeVersion": "2.0.0",
"_npmUser": {
diff --git a/tools/eslint/node_modules/wrappy/package.json b/tools/eslint/node_modules/wrappy/package.json
index ed3bd2abf4..519d5685aa 100644
--- a/tools/eslint/node_modules/wrappy/package.json
+++ b/tools/eslint/node_modules/wrappy/package.json
@@ -16,7 +16,6 @@
"_from": "wrappy@>=1.0.0 <2.0.0",
"_id": "wrappy@1.0.2",
"_inCache": true,
- "_installable": true,
"_location": "/wrappy",
"_nodeVersion": "5.10.1",
"_npmOperationalInternal": {
diff --git a/tools/eslint/node_modules/write/package.json b/tools/eslint/node_modules/write/package.json
index bc88434110..4e2c2499f2 100644
--- a/tools/eslint/node_modules/write/package.json
+++ b/tools/eslint/node_modules/write/package.json
@@ -16,7 +16,6 @@
"_from": "write@>=0.2.1 <0.3.0",
"_id": "write@0.2.1",
"_inCache": true,
- "_installable": true,
"_location": "/write",
"_nodeVersion": "0.12.4",
"_npmUser": {
diff --git a/tools/eslint/node_modules/xregexp/README.md b/tools/eslint/node_modules/xregexp/README.md
deleted file mode 100644
index a9c51c2635..0000000000
--- a/tools/eslint/node_modules/xregexp/README.md
+++ /dev/null
@@ -1,221 +0,0 @@
-[XRegExp](http://xregexp.com/) 3.1.1
-====================================
-
-XRegExp provides augmented (and extensible) JavaScript regular expressions. You get new modern syntax and flags beyond what browsers support natively. XRegExp is also a regex utility belt with tools to make your client-side grepping and parsing easier, while freeing you from worrying about pesky aspects of JavaScript regexes like cross-browser inconsistencies or manually manipulating `lastIndex`.
-
-XRegExp supports all native ES6 regular expression syntax. It supports Internet Explorer 5.5+, Firefox 1.5+, Chrome, Safari 3+, and Opera 11+. You can also use it with Node.js or as a RequireJS module.
-
-## Performance
-
-XRegExp regexes compile to native `RegExp` objects, and therefore perform just as fast as native regular expressions. There is a tiny extra cost when compiling a pattern for the first time.
-
-## Usage examples
-
-```js
-// Using named capture and flag x (free-spacing and line comments)
-var date = XRegExp('(?<year> [0-9]{4} ) -? # year \n\
- (?<month> [0-9]{2} ) -? # month \n\
- (?<day> [0-9]{2} ) # day ', 'x');
-
-// XRegExp.exec gives you named backreferences on the match result
-var match = XRegExp.exec('2015-02-22', date);
-match.year; // -> '2015'
-
-// It also includes optional pos and sticky arguments
-var pos = 3;
-var result = [];
-while (match = XRegExp.exec('<1><2><3><4>5<6>', /<(\d+)>/, pos, 'sticky')) {
- result.push(match[1]);
- pos = match.index + match[0].length;
-}
-// result -> ['2', '3', '4']
-
-// XRegExp.replace allows named backreferences in replacements
-XRegExp.replace('2015-02-22', date, '${month}/${day}/${year}');
-// -> '02/22/2015'
-XRegExp.replace('2015-02-22', date, function(match) {
- return match.month + '/' + match.day + '/' + match.year;
-});
-// -> '02/22/2015'
-
-// In fact, XRegExps compile to RegExps and work perfectly with native methods
-date.test('2015-02-22');
-// -> true
-
-// The only caveat is that named captures must be referenced using numbered
-// backreferences if used with native methods
-'2015-02-22'.replace(date, '$2/$3/$1');
-// -> '02/22/2015'
-
-// Extract every other digit from a string using XRegExp.forEach
-var evens = [];
-XRegExp.forEach('1a2345', /\d/, function(match, i) {
- if (i % 2) evens.push(+match[0]);
-});
-// evens -> [2, 4]
-
-// Get numbers within <b> tags using XRegExp.matchChain
-XRegExp.matchChain('1 <b>2</b> 3 <b>4 a 56</b>', [
- XRegExp('(?is)<b>.*?</b>'),
- /\d+/
-]);
-// -> ['2', '4', '56']
-
-// You can also pass forward and return specific backreferences
-var html = '<a href="http://xregexp.com/">XRegExp</a>' +
- '<a href="http://www.google.com/">Google</a>';
-XRegExp.matchChain(html, [
- {regex: /<a href="([^"]+)">/i, backref: 1},
- {regex: XRegExp('(?i)^https?://(?<domain>[^/?#]+)'), backref: 'domain'}
-]);
-// -> ['xregexp.com', 'www.google.com']
-
-// Merge strings and regexes into a single pattern with updated backreferences
-XRegExp.union(['a+b*c', /(dog)\1/, /(cat)\1/], 'i');
-// -> /a\+b\*c|(dog)\1|(cat)\2/i
-```
-
-These examples give the flavor of what's possible, but XRegExp has more syntax, flags, methods, options, and browser fixes that aren't shown here. You can even augment XRegExp's regular expression syntax with addons (see below) or write your own. See [xregexp.com](http://xregexp.com/) for details.
-
-## Addons
-
-You can either load addons individually, or bundle all addons with XRegExp by loading `xregexp-all.js`.
-
-### Unicode
-
-If not using `xregexp-all.js`, first include the Unicode Base script and then one or more of the addons for Unicode blocks, categories, properties, or scripts.
-
-Then you can do this:
-
-```js
-// Test the Unicode category L (Letter)
-var unicodeWord = XRegExp('^\\pL+$');
-unicodeWord.test('Русский'); // -> true
-unicodeWord.test('日本語'); // -> true
-unicodeWord.test('العربية'); // -> true
-
-// Test some Unicode scripts
-XRegExp('^\\p{Hiragana}+$').test('ひらがな'); // -> true
-XRegExp('^[\\p{Latin}\\p{Common}]+$').test('Über Café.'); // -> true
-```
-
-By default, `\p{…}` and `\P{…}` support the Basic Multilingual Plane (i.e. code points up to `U+FFFF`). You can opt-in to full 21-bit Unicode support (with code points up to `U+10FFFF`) on a per-regex basis by using flag `A`. In XRegExp, this is called *astral mode*. You can automatically add flag `A` for all new regexes by running `XRegExp.install('astral')`. When in astral mode, `\p{…}` and `\P{…}` always match a full code point rather than a code unit, using surrogate pairs for code points above `U+FFFF`.
-
-```js
-// Using flag A to match astral code points
-XRegExp('^\\pS$').test('💩'); // -> false
-XRegExp('^\\pS$', 'A').test('💩'); // -> true
-XRegExp('(?A)^\\pS$').test('💩'); // -> true
-// Using surrogate pair U+D83D U+DCA9 to represent U+1F4A9 (pile of poo)
-XRegExp('(?A)^\\pS$').test('\uD83D\uDCA9'); // -> true
-
-// Implicit flag A
-XRegExp.install('astral');
-XRegExp('^\\pS$').test('💩'); // -> true
-```
-
-Opting in to astral mode disables the use of `\p{…}` and `\P{…}` within character classes. In astral mode, use e.g. `(\pL|[0-9_])+` instead of `[\pL0-9_]+`.
-
-XRegExp uses Unicode 8.0.0.
-
-### XRegExp.build
-
-Build regular expressions using named subpatterns, for readability and pattern reuse:
-
-```js
-var time = XRegExp.build('(?x)^ {{hours}} ({{minutes}}) $', {
- hours: XRegExp.build('{{h12}} : | {{h24}}', {
- h12: /1[0-2]|0?[1-9]/,
- h24: /2[0-3]|[01][0-9]/
- }),
- minutes: /^[0-5][0-9]$/
-});
-
-time.test('10:59'); // -> true
-XRegExp.exec('10:59', time).minutes; // -> '59'
-```
-
-Named subpatterns can be provided as strings or regex objects. A leading `^` and trailing unescaped `$` are stripped from subpatterns if both are present, which allows embedding independently-useful anchored patterns. `{{…}}` tokens can be quantified as a single unit. Any backreferences in the outer pattern or provided subpatterns are automatically renumbered to work correctly within the larger combined pattern. The syntax `({{name}})` works as shorthand for named capture via `(?<name>{{name}})`. Named subpatterns cannot be embedded within character classes.
-
-See also: *[Creating Grammatical Regexes Using XRegExp.build](http://blog.stevenlevithan.com/archives/grammatical-patterns-xregexp-build)*.
-
-### XRegExp.matchRecursive
-
-Match recursive constructs using XRegExp pattern strings as left and right delimiters:
-
-```js
-var str = '(t((e))s)t()(ing)';
-XRegExp.matchRecursive(str, '\\(', '\\)', 'g');
-// -> ['t((e))s', '', 'ing']
-
-// Extended information mode with valueNames
-str = 'Here is <div> <div>an</div></div> example';
-XRegExp.matchRecursive(str, '<div\\s*>', '</div>', 'gi', {
- valueNames: ['between', 'left', 'match', 'right']
-});
-/* -> [
-{name: 'between', value: 'Here is ', start: 0, end: 8},
-{name: 'left', value: '<div>', start: 8, end: 13},
-{name: 'match', value: ' <div>an</div>', start: 13, end: 27},
-{name: 'right', value: '</div>', start: 27, end: 33},
-{name: 'between', value: ' example', start: 33, end: 41}
-] */
-
-// Omitting unneeded parts with null valueNames, and using escapeChar
-str = '...{1}.\\{{function(x,y){return {y:x}}}';
-XRegExp.matchRecursive(str, '{', '}', 'g', {
- valueNames: ['literal', null, 'value', null],
- escapeChar: '\\'
-});
-/* -> [
-{name: 'literal', value: '...', start: 0, end: 3},
-{name: 'value', value: '1', start: 4, end: 5},
-{name: 'literal', value: '.\\{', start: 6, end: 9},
-{name: 'value', value: 'function(x,y){return {y:x}}', start: 10, end: 37}
-] */
-
-// Sticky mode via flag y
-str = '<1><<<2>>><3>4<5>';
-XRegExp.matchRecursive(str, '<', '>', 'gy');
-// -> ['1', '<<2>>', '3']
-```
-
-`XRegExp.matchRecursive` throws an error if it scans past an unbalanced delimiter in the target string.
-
-## Installation and usage
-
-In browsers (bundle XRegExp with all of its addons):
-
-```html
-<script src="xregexp-all.js"></script>
-```
-
-Using [npm](https://www.npmjs.com/):
-
-```bash
-npm install xregexp
-```
-
-In [Node.js](http://nodejs.org/):
-
-```js
-var XRegExp = require('xregexp');
-```
-
-In an AMD loader like [RequireJS](http://requirejs.org/):
-
-```js
-require({paths: {xregexp: 'xregexp-all'}}, ['xregexp'], function(XRegExp) {
- console.log(XRegExp.version);
-});
-```
-
-## About
-
-XRegExp copyright 2007-2016 by [Steven Levithan](http://stevenlevithan.com/).
-
-Unicode range generators by [Mathias Bynens](http://mathiasbynens.be/), and adapted from his [unicode-data](https://github.com/mathiasbynens/unicode-data) project. Uses [Jasmine](http://jasmine.github.io/) for unit tests, and [Benchmark.js](http://benchmarkjs.com) for performance tests. `XRegExp.build` inspired by [RegExp.create](http://lea.verou.me/2011/03/create-complex-regexps-more-easily/) by [Lea Verou](http://lea.verou.me/). `XRegExp.union` inspired by [Ruby](http://www.ruby-lang.org/). XRegExp's syntax extensions and flags come from [Perl](http://www.perl.org/), [.NET](http://www.microsoft.com/net), etc.
-
-All code, including addons, tools, and tests, is released under the terms of the [MIT License](http://mit-license.org/).
-
-Fork me to show support, fix, and extend.
diff --git a/tools/eslint/node_modules/xregexp/package.json b/tools/eslint/node_modules/xregexp/package.json
deleted file mode 100644
index a26ef2067b..0000000000
--- a/tools/eslint/node_modules/xregexp/package.json
+++ /dev/null
@@ -1,96 +0,0 @@
-{
- "_args": [
- [
- {
- "raw": "xregexp@^3.0.0",
- "scope": null,
- "escapedName": "xregexp",
- "name": "xregexp",
- "rawSpec": "^3.0.0",
- "spec": ">=3.0.0 <4.0.0",
- "type": "range"
- },
- "/Users/trott/io.js/tools/node_modules/table"
- ]
- ],
- "_from": "xregexp@>=3.0.0 <4.0.0",
- "_id": "xregexp@3.1.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/xregexp",
- "_nodeVersion": "3.3.1",
- "_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/xregexp-3.1.1.tgz_1463265906533_0.49629145418293774"
- },
- "_npmUser": {
- "name": "slevithan",
- "email": "steves_list@hotmail.com"
- },
- "_npmVersion": "2.14.3",
- "_phantomChildren": {},
- "_requested": {
- "raw": "xregexp@^3.0.0",
- "scope": null,
- "escapedName": "xregexp",
- "name": "xregexp",
- "rawSpec": "^3.0.0",
- "spec": ">=3.0.0 <4.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/table"
- ],
- "_resolved": "https://registry.npmjs.org/xregexp/-/xregexp-3.1.1.tgz",
- "_shasum": "8ee18d75ef5c7cb3f9967f8d29414a6ca5b1a184",
- "_shrinkwrap": null,
- "_spec": "xregexp@^3.0.0",
- "_where": "/Users/trott/io.js/tools/node_modules/table",
- "author": {
- "name": "Steven Levithan",
- "email": "steves_list@hotmail.com"
- },
- "bugs": {
- "url": "https://github.com/slevithan/xregexp/issues"
- },
- "dependencies": {},
- "description": "Extended regular expressions",
- "devDependencies": {
- "browserify": "^12.0.1"
- },
- "directories": {},
- "dist": {
- "shasum": "8ee18d75ef5c7cb3f9967f8d29414a6ca5b1a184",
- "tarball": "https://registry.npmjs.org/xregexp/-/xregexp-3.1.1.tgz"
- },
- "files": [
- "src"
- ],
- "gitHead": "37413619ea9f03638bfa92e038e4b4c15645d446",
- "homepage": "http://xregexp.com/",
- "keywords": [
- "regex",
- "regexp",
- "regular expression",
- "unicode"
- ],
- "license": "MIT",
- "main": "./src/index.js",
- "maintainers": [
- {
- "name": "slevithan",
- "email": "steves_list@hotmail.com"
- }
- ],
- "name": "xregexp",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/slevithan/xregexp.git"
- },
- "scripts": {
- "build": "browserify src/index.js --standalone XRegExp > xregexp-all.js"
- },
- "version": "3.1.1"
-}
diff --git a/tools/eslint/node_modules/xregexp/src/addons/build.js b/tools/eslint/node_modules/xregexp/src/addons/build.js
deleted file mode 100644
index 843d4a9c96..0000000000
--- a/tools/eslint/node_modules/xregexp/src/addons/build.js
+++ /dev/null
@@ -1,186 +0,0 @@
-/*!
- * XRegExp.build 3.1.1
- * <xregexp.com>
- * Steven Levithan (c) 2012-2016 MIT License
- * Inspired by Lea Verou's RegExp.create <lea.verou.me>
- */
-
-module.exports = function(XRegExp) {
- 'use strict';
-
- var REGEX_DATA = 'xregexp';
- var subParts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g;
- var parts = XRegExp.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/, subParts], 'g');
-
- /**
- * Strips a leading `^` and trailing unescaped `$`, if both are present.
- *
- * @param {String} pattern Pattern to process.
- * @returns {String} Pattern with edge anchors removed.
- */
- function deanchor(pattern) {
- // Allow any number of empty noncapturing groups before/after anchors, because regexes
- // built/generated by XRegExp sometimes include them
- var leadingAnchor = /^(?:\(\?:\))*\^/,
- trailingAnchor = /\$(?:\(\?:\))*$/;
-
- if (
- leadingAnchor.test(pattern) &&
- trailingAnchor.test(pattern) &&
- // Ensure that the trailing `$` isn't escaped
- trailingAnchor.test(pattern.replace(/\\[\s\S]/g, ''))
- ) {
- return pattern.replace(leadingAnchor, '').replace(trailingAnchor, '');
- }
-
- return pattern;
- }
-
- /**
- * Converts the provided value to an XRegExp. Native RegExp flags are not preserved.
- *
- * @param {String|RegExp} value Value to convert.
- * @returns {RegExp} XRegExp object with XRegExp syntax applied.
- */
- function asXRegExp(value) {
- return XRegExp.isRegExp(value) ?
- (value[REGEX_DATA] && value[REGEX_DATA].captureNames ?
- // Don't recompile, to preserve capture names
- value :
- // Recompile as XRegExp
- XRegExp(value.source)
- ) :
- // Compile string as XRegExp
- XRegExp(value);
- }
-
- /**
- * Builds regexes using named subpatterns, for readability and pattern reuse. Backreferences in
- * the outer pattern and provided subpatterns are automatically renumbered to work correctly.
- * Native flags used by provided subpatterns are ignored in favor of the `flags` argument.
- *
- * @param {String} pattern XRegExp pattern using `{{name}}` for embedded subpatterns. Allows
- * `({{name}})` as shorthand for `(?<name>{{name}})`. Patterns cannot be embedded within
- * character classes.
- * @param {Object} subs Lookup object for named subpatterns. Values can be strings or regexes. A
- * leading `^` and trailing unescaped `$` are stripped from subpatterns, if both are present.
- * @param {String} [flags] Any combination of XRegExp flags.
- * @returns {RegExp} Regex with interpolated subpatterns.
- * @example
- *
- * var time = XRegExp.build('(?x)^ {{hours}} ({{minutes}}) $', {
- * hours: XRegExp.build('{{h12}} : | {{h24}}', {
- * h12: /1[0-2]|0?[1-9]/,
- * h24: /2[0-3]|[01][0-9]/
- * }, 'x'),
- * minutes: /^[0-5][0-9]$/
- * });
- * time.test('10:59'); // -> true
- * XRegExp.exec('10:59', time).minutes; // -> '59'
- */
- XRegExp.build = function(pattern, subs, flags) {
- var inlineFlags = /^\(\?([\w$]+)\)/.exec(pattern),
- data = {},
- numCaps = 0, // 'Caps' is short for captures
- numPriorCaps,
- numOuterCaps = 0,
- outerCapsMap = [0],
- outerCapNames,
- sub,
- p;
-
- // Add flags within a leading mode modifier to the overall pattern's flags
- if (inlineFlags) {
- flags = flags || '';
- inlineFlags[1].replace(/./g, function(flag) {
- // Don't add duplicates
- flags += (flags.indexOf(flag) > -1 ? '' : flag);
- });
- }
-
- for (p in subs) {
- if (subs.hasOwnProperty(p)) {
- // Passing to XRegExp enables extended syntax and ensures independent validity,
- // lest an unescaped `(`, `)`, `[`, or trailing `\` breaks the `(?:)` wrapper. For
- // subpatterns provided as native regexes, it dies on octals and adds the property
- // used to hold extended regex instance data, for simplicity
- sub = asXRegExp(subs[p]);
- data[p] = {
- // Deanchoring allows embedding independently useful anchored regexes. If you
- // really need to keep your anchors, double them (i.e., `^^...$$`)
- pattern: deanchor(sub.source),
- names: sub[REGEX_DATA].captureNames || []
- };
- }
- }
-
- // Passing to XRegExp dies on octals and ensures the outer pattern is independently valid;
- // helps keep this simple. Named captures will be put back
- pattern = asXRegExp(pattern);
- outerCapNames = pattern[REGEX_DATA].captureNames || [];
- pattern = pattern.source.replace(parts, function($0, $1, $2, $3, $4) {
- var subName = $1 || $2,
- capName,
- intro,
- localCapIndex;
- // Named subpattern
- if (subName) {
- if (!data.hasOwnProperty(subName)) {
- throw new ReferenceError('Undefined property ' + $0);
- }
- // Named subpattern was wrapped in a capturing group
- if ($1) {
- capName = outerCapNames[numOuterCaps];
- outerCapsMap[++numOuterCaps] = ++numCaps;
- // If it's a named group, preserve the name. Otherwise, use the subpattern name
- // as the capture name
- intro = '(?<' + (capName || subName) + '>';
- } else {
- intro = '(?:';
- }
- numPriorCaps = numCaps;
- return intro + data[subName].pattern.replace(subParts, function(match, paren, backref) {
- // Capturing group
- if (paren) {
- capName = data[subName].names[numCaps - numPriorCaps];
- ++numCaps;
- // If the current capture has a name, preserve the name
- if (capName) {
- return '(?<' + capName + '>';
- }
- // Backreference
- } else if (backref) {
- localCapIndex = +backref - 1;
- // Rewrite the backreference
- return data[subName].names[localCapIndex] ?
- // Need to preserve the backreference name in case using flag `n`
- '\\k<' + data[subName].names[localCapIndex] + '>' :
- '\\' + (+backref + numPriorCaps);
- }
- return match;
- }) + ')';
- }
- // Capturing group
- if ($3) {
- capName = outerCapNames[numOuterCaps];
- outerCapsMap[++numOuterCaps] = ++numCaps;
- // If the current capture has a name, preserve the name
- if (capName) {
- return '(?<' + capName + '>';
- }
- // Backreference
- } else if ($4) {
- localCapIndex = +$4 - 1;
- // Rewrite the backreference
- return outerCapNames[localCapIndex] ?
- // Need to preserve the backreference name in case using flag `n`
- '\\k<' + outerCapNames[localCapIndex] + '>' :
- '\\' + outerCapsMap[+$4];
- }
- return $0;
- });
-
- return XRegExp(pattern, flags);
- };
-
-};
diff --git a/tools/eslint/node_modules/xregexp/src/addons/matchrecursive.js b/tools/eslint/node_modules/xregexp/src/addons/matchrecursive.js
deleted file mode 100644
index 6a51b56b73..0000000000
--- a/tools/eslint/node_modules/xregexp/src/addons/matchrecursive.js
+++ /dev/null
@@ -1,188 +0,0 @@
-/*!
- * XRegExp.matchRecursive 3.1.1
- * <xregexp.com>
- * Steven Levithan (c) 2009-2016 MIT License
- */
-
-module.exports = function(XRegExp) {
- 'use strict';
-
- /**
- * Returns a match detail object composed of the provided values.
- */
- function row(name, value, start, end) {
- return {
- name: name,
- value: value,
- start: start,
- end: end
- };
- }
-
- /**
- * Returns an array of match strings between outermost left and right delimiters, or an array of
- * objects with detailed match parts and position data. An error is thrown if delimiters are
- * unbalanced within the data.
- *
- * @param {String} str String to search.
- * @param {String} left Left delimiter as an XRegExp pattern.
- * @param {String} right Right delimiter as an XRegExp pattern.
- * @param {String} [flags] Any native or XRegExp flags, used for the left and right delimiters.
- * @param {Object} [options] Lets you specify `valueNames` and `escapeChar` options.
- * @returns {Array} Array of matches, or an empty array.
- * @example
- *
- * // Basic usage
- * var str = '(t((e))s)t()(ing)';
- * XRegExp.matchRecursive(str, '\\(', '\\)', 'g');
- * // -> ['t((e))s', '', 'ing']
- *
- * // Extended information mode with valueNames
- * str = 'Here is <div> <div>an</div></div> example';
- * XRegExp.matchRecursive(str, '<div\\s*>', '</div>', 'gi', {
- * valueNames: ['between', 'left', 'match', 'right']
- * });
- * // -> [
- * // {name: 'between', value: 'Here is ', start: 0, end: 8},
- * // {name: 'left', value: '<div>', start: 8, end: 13},
- * // {name: 'match', value: ' <div>an</div>', start: 13, end: 27},
- * // {name: 'right', value: '</div>', start: 27, end: 33},
- * // {name: 'between', value: ' example', start: 33, end: 41}
- * // ]
- *
- * // Omitting unneeded parts with null valueNames, and using escapeChar
- * str = '...{1}.\\{{function(x,y){return {y:x}}}';
- * XRegExp.matchRecursive(str, '{', '}', 'g', {
- * valueNames: ['literal', null, 'value', null],
- * escapeChar: '\\'
- * });
- * // -> [
- * // {name: 'literal', value: '...', start: 0, end: 3},
- * // {name: 'value', value: '1', start: 4, end: 5},
- * // {name: 'literal', value: '.\\{', start: 6, end: 9},
- * // {name: 'value', value: 'function(x,y){return {y:x}}', start: 10, end: 37}
- * // ]
- *
- * // Sticky mode via flag y
- * str = '<1><<<2>>><3>4<5>';
- * XRegExp.matchRecursive(str, '<', '>', 'gy');
- * // -> ['1', '<<2>>', '3']
- */
- XRegExp.matchRecursive = function(str, left, right, flags, options) {
- flags = flags || '';
- options = options || {};
- var global = flags.indexOf('g') > -1,
- sticky = flags.indexOf('y') > -1,
- // Flag `y` is controlled internally
- basicFlags = flags.replace(/y/g, ''),
- escapeChar = options.escapeChar,
- vN = options.valueNames,
- output = [],
- openTokens = 0,
- delimStart = 0,
- delimEnd = 0,
- lastOuterEnd = 0,
- outerStart,
- innerStart,
- leftMatch,
- rightMatch,
- esc;
- left = XRegExp(left, basicFlags);
- right = XRegExp(right, basicFlags);
-
- if (escapeChar) {
- if (escapeChar.length > 1) {
- throw new Error('Cannot use more than one escape character');
- }
- escapeChar = XRegExp.escape(escapeChar);
- // Using `XRegExp.union` safely rewrites backreferences in `left` and `right`
- esc = new RegExp(
- '(?:' + escapeChar + '[\\S\\s]|(?:(?!' +
- XRegExp.union([left, right]).source +
- ')[^' + escapeChar + '])+)+',
- // Flags `gy` not needed here
- flags.replace(/[^imu]+/g, '')
- );
- }
-
- while (true) {
- // If using an escape character, advance to the delimiter's next starting position,
- // skipping any escaped characters in between
- if (escapeChar) {
- delimEnd += (XRegExp.exec(str, esc, delimEnd, 'sticky') || [''])[0].length;
- }
- leftMatch = XRegExp.exec(str, left, delimEnd);
- rightMatch = XRegExp.exec(str, right, delimEnd);
- // Keep the leftmost match only
- if (leftMatch && rightMatch) {
- if (leftMatch.index <= rightMatch.index) {
- rightMatch = null;
- } else {
- leftMatch = null;
- }
- }
- // Paths (LM: leftMatch, RM: rightMatch, OT: openTokens):
- // LM | RM | OT | Result
- // 1 | 0 | 1 | loop
- // 1 | 0 | 0 | loop
- // 0 | 1 | 1 | loop
- // 0 | 1 | 0 | throw
- // 0 | 0 | 1 | throw
- // 0 | 0 | 0 | break
- // The paths above don't include the sticky mode special case. The loop ends after the
- // first completed match if not `global`.
- if (leftMatch || rightMatch) {
- delimStart = (leftMatch || rightMatch).index;
- delimEnd = delimStart + (leftMatch || rightMatch)[0].length;
- } else if (!openTokens) {
- break;
- }
- if (sticky && !openTokens && delimStart > lastOuterEnd) {
- break;
- }
- if (leftMatch) {
- if (!openTokens) {
- outerStart = delimStart;
- innerStart = delimEnd;
- }
- ++openTokens;
- } else if (rightMatch && openTokens) {
- if (!--openTokens) {
- if (vN) {
- if (vN[0] && outerStart > lastOuterEnd) {
- output.push(row(vN[0], str.slice(lastOuterEnd, outerStart), lastOuterEnd, outerStart));
- }
- if (vN[1]) {
- output.push(row(vN[1], str.slice(outerStart, innerStart), outerStart, innerStart));
- }
- if (vN[2]) {
- output.push(row(vN[2], str.slice(innerStart, delimStart), innerStart, delimStart));
- }
- if (vN[3]) {
- output.push(row(vN[3], str.slice(delimStart, delimEnd), delimStart, delimEnd));
- }
- } else {
- output.push(str.slice(innerStart, delimStart));
- }
- lastOuterEnd = delimEnd;
- if (!global) {
- break;
- }
- }
- } else {
- throw new Error('Unbalanced delimiter found in string');
- }
- // If the delimiter matched an empty string, avoid an infinite loop
- if (delimStart === delimEnd) {
- ++delimEnd;
- }
- }
-
- if (global && !sticky && vN && vN[0] && str.length > lastOuterEnd) {
- output.push(row(vN[0], str.slice(lastOuterEnd), lastOuterEnd, str.length));
- }
-
- return output;
- };
-
-};
diff --git a/tools/eslint/node_modules/xregexp/src/addons/unicode-base.js b/tools/eslint/node_modules/xregexp/src/addons/unicode-base.js
deleted file mode 100644
index 011a384405..0000000000
--- a/tools/eslint/node_modules/xregexp/src/addons/unicode-base.js
+++ /dev/null
@@ -1,227 +0,0 @@
-/*!
- * XRegExp Unicode Base 3.1.1
- * <xregexp.com>
- * Steven Levithan (c) 2008-2016 MIT License
- */
-
-module.exports = function(XRegExp) {
- 'use strict';
-
- /**
- * Adds base support for Unicode matching:
- * - Adds syntax `\p{..}` for matching Unicode tokens. Tokens can be inverted using `\P{..}` or
- * `\p{^..}`. Token names ignore case, spaces, hyphens, and underscores. You can omit the
- * braces for token names that are a single letter (e.g. `\pL` or `PL`).
- * - Adds flag A (astral), which enables 21-bit Unicode support.
- * - Adds the `XRegExp.addUnicodeData` method used by other addons to provide character data.
- *
- * Unicode Base relies on externally provided Unicode character data. Official addons are
- * available to provide data for Unicode categories, scripts, blocks, and properties.
- *
- * @requires XRegExp
- */
-
- // ==--------------------------==
- // Private stuff
- // ==--------------------------==
-
- // Storage for Unicode data
- var unicode = {};
-
- // Reuse utils
- var dec = XRegExp._dec;
- var hex = XRegExp._hex;
- var pad4 = XRegExp._pad4;
-
- // Generates a token lookup name: lowercase, with hyphens, spaces, and underscores removed
- function normalize(name) {
- return name.replace(/[- _]+/g, '').toLowerCase();
- }
-
- // Gets the decimal code of a literal code unit, \xHH, \uHHHH, or a backslash-escaped literal
- function charCode(chr) {
- var esc = /^\\[xu](.+)/.exec(chr);
- return esc ?
- dec(esc[1]) :
- chr.charCodeAt(chr.charAt(0) === '\\' ? 1 : 0);
- }
-
- // Inverts a list of ordered BMP characters and ranges
- function invertBmp(range) {
- var output = '';
- var lastEnd = -1;
- XRegExp.forEach(
- range,
- /(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,
- function(m) {
- var start = charCode(m[1]);
- if (start > (lastEnd + 1)) {
- output += '\\u' + pad4(hex(lastEnd + 1));
- if (start > (lastEnd + 2)) {
- output += '-\\u' + pad4(hex(start - 1));
- }
- }
- lastEnd = charCode(m[2] || m[1]);
- }
- );
- if (lastEnd < 0xFFFF) {
- output += '\\u' + pad4(hex(lastEnd + 1));
- if (lastEnd < 0xFFFE) {
- output += '-\\uFFFF';
- }
- }
- return output;
- }
-
- // Generates an inverted BMP range on first use
- function cacheInvertedBmp(slug) {
- var prop = 'b!';
- return unicode[slug][prop] || (
- unicode[slug][prop] = invertBmp(unicode[slug].bmp)
- );
- }
-
- // Combines and optionally negates BMP and astral data
- function buildAstral(slug, isNegated) {
- var item = unicode[slug],
- combined = '';
- if (item.bmp && !item.isBmpLast) {
- combined = '[' + item.bmp + ']' + (item.astral ? '|' : '');
- }
- if (item.astral) {
- combined += item.astral;
- }
- if (item.isBmpLast && item.bmp) {
- combined += (item.astral ? '|' : '') + '[' + item.bmp + ']';
- }
- // Astral Unicode tokens always match a code point, never a code unit
- return isNegated ?
- '(?:(?!' + combined + ')(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))' :
- '(?:' + combined + ')';
- }
-
- // Builds a complete astral pattern on first use
- function cacheAstral(slug, isNegated) {
- var prop = isNegated ? 'a!' : 'a=';
- return unicode[slug][prop] || (
- unicode[slug][prop] = buildAstral(slug, isNegated)
- );
- }
-
- // ==--------------------------==
- // Core functionality
- // ==--------------------------==
-
- /*
- * Add Unicode token syntax: \p{..}, \P{..}, \p{^..}. Also add astral mode (flag A).
- */
- XRegExp.addToken(
- // Use `*` instead of `+` to avoid capturing `^` as the token name in `\p{^}`
- /\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,
- function(match, scope, flags) {
- var ERR_DOUBLE_NEG = 'Invalid double negation ',
- ERR_UNKNOWN_NAME = 'Unknown Unicode token ',
- ERR_UNKNOWN_REF = 'Unicode token missing data ',
- ERR_ASTRAL_ONLY = 'Astral mode required for Unicode token ',
- ERR_ASTRAL_IN_CLASS = 'Astral mode does not support Unicode tokens within character classes',
- // Negated via \P{..} or \p{^..}
- isNegated = match[1] === 'P' || !!match[2],
- // Switch from BMP (0-FFFF) to astral (0-10FFFF) mode via flag A
- isAstralMode = flags.indexOf('A') > -1,
- // Token lookup name. Check `[4]` first to avoid passing `undefined` via `\p{}`
- slug = normalize(match[4] || match[3]),
- // Token data object
- item = unicode[slug];
-
- if (match[1] === 'P' && match[2]) {
- throw new SyntaxError(ERR_DOUBLE_NEG + match[0]);
- }
- if (!unicode.hasOwnProperty(slug)) {
- throw new SyntaxError(ERR_UNKNOWN_NAME + match[0]);
- }
-
- // Switch to the negated form of the referenced Unicode token
- if (item.inverseOf) {
- slug = normalize(item.inverseOf);
- if (!unicode.hasOwnProperty(slug)) {
- throw new ReferenceError(ERR_UNKNOWN_REF + match[0] + ' -> ' + item.inverseOf);
- }
- item = unicode[slug];
- isNegated = !isNegated;
- }
-
- if (!(item.bmp || isAstralMode)) {
- throw new SyntaxError(ERR_ASTRAL_ONLY + match[0]);
- }
- if (isAstralMode) {
- if (scope === 'class') {
- throw new SyntaxError(ERR_ASTRAL_IN_CLASS);
- }
-
- return cacheAstral(slug, isNegated);
- }
-
- return scope === 'class' ?
- (isNegated ? cacheInvertedBmp(slug) : item.bmp) :
- (isNegated ? '[^' : '[') + item.bmp + ']';
- },
- {
- scope: 'all',
- optionalFlags: 'A',
- leadChar: '\\'
- }
- );
-
- /**
- * Adds to the list of Unicode tokens that XRegExp regexes can match via `\p` or `\P`.
- *
- * @param {Array} data Objects with named character ranges. Each object may have properties
- * `name`, `alias`, `isBmpLast`, `inverseOf`, `bmp`, and `astral`. All but `name` are
- * optional, although one of `bmp` or `astral` is required (unless `inverseOf` is set). If
- * `astral` is absent, the `bmp` data is used for BMP and astral modes. If `bmp` is absent,
- * the name errors in BMP mode but works in astral mode. If both `bmp` and `astral` are
- * provided, the `bmp` data only is used in BMP mode, and the combination of `bmp` and
- * `astral` data is used in astral mode. `isBmpLast` is needed when a token matches orphan
- * high surrogates *and* uses surrogate pairs to match astral code points. The `bmp` and
- * `astral` data should be a combination of literal characters and `\xHH` or `\uHHHH` escape
- * sequences, with hyphens to create ranges. Any regex metacharacters in the data should be
- * escaped, apart from range-creating hyphens. The `astral` data can additionally use
- * character classes and alternation, and should use surrogate pairs to represent astral code
- * points. `inverseOf` can be used to avoid duplicating character data if a Unicode token is
- * defined as the exact inverse of another token.
- * @example
- *
- * // Basic use
- * XRegExp.addUnicodeData([{
- * name: 'XDigit',
- * alias: 'Hexadecimal',
- * bmp: '0-9A-Fa-f'
- * }]);
- * XRegExp('\\p{XDigit}:\\p{Hexadecimal}+').test('0:3D'); // -> true
- */
- XRegExp.addUnicodeData = function(data) {
- var ERR_NO_NAME = 'Unicode token requires name',
- ERR_NO_DATA = 'Unicode token has no character data ',
- item,
- i;
-
- for (i = 0; i < data.length; ++i) {
- item = data[i];
- if (!item.name) {
- throw new Error(ERR_NO_NAME);
- }
- if (!(item.inverseOf || item.bmp || item.astral)) {
- throw new Error(ERR_NO_DATA + item.name);
- }
- unicode[normalize(item.name)] = item;
- if (item.alias) {
- unicode[normalize(item.alias)] = item;
- }
- }
-
- // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and
- // flags might now produce different results
- XRegExp.cache.flush('patterns');
- };
-
-};
diff --git a/tools/eslint/node_modules/xregexp/src/addons/unicode-blocks.js b/tools/eslint/node_modules/xregexp/src/addons/unicode-blocks.js
deleted file mode 100644
index 97cc71fbb1..0000000000
--- a/tools/eslint/node_modules/xregexp/src/addons/unicode-blocks.js
+++ /dev/null
@@ -1,1076 +0,0 @@
-/*!
- * XRegExp Unicode Blocks 3.1.1
- * <xregexp.com>
- * Steven Levithan (c) 2010-2016 MIT License
- * Unicode data by Mathias Bynens <mathiasbynens.be>
- */
-
-module.exports = function(XRegExp) {
- 'use strict';
-
- /**
- * Adds support for all Unicode blocks. Block names use the prefix 'In'. E.g.,
- * `\p{InBasicLatin}`. Token names are case insensitive, and any spaces, hyphens, and
- * underscores are ignored.
- *
- * Uses Unicode 8.0.0.
- *
- * @requires XRegExp, Unicode Base
- */
-
- if (!XRegExp.addUnicodeData) {
- throw new ReferenceError('Unicode Base must be loaded before Unicode Blocks');
- }
-
- XRegExp.addUnicodeData([
- {
- name: 'InAegean_Numbers',
- astral: '\uD800[\uDD00-\uDD3F]'
- },
- {
- name: 'InAhom',
- astral: '\uD805[\uDF00-\uDF3F]'
- },
- {
- name: 'InAlchemical_Symbols',
- astral: '\uD83D[\uDF00-\uDF7F]'
- },
- {
- name: 'InAlphabetic_Presentation_Forms',
- bmp: '\uFB00-\uFB4F'
- },
- {
- name: 'InAnatolian_Hieroglyphs',
- astral: '\uD811[\uDC00-\uDE7F]'
- },
- {
- name: 'InAncient_Greek_Musical_Notation',
- astral: '\uD834[\uDE00-\uDE4F]'
- },
- {
- name: 'InAncient_Greek_Numbers',
- astral: '\uD800[\uDD40-\uDD8F]'
- },
- {
- name: 'InAncient_Symbols',
- astral: '\uD800[\uDD90-\uDDCF]'
- },
- {
- name: 'InArabic',
- bmp: '\u0600-\u06FF'
- },
- {
- name: 'InArabic_Extended_A',
- bmp: '\u08A0-\u08FF'
- },
- {
- name: 'InArabic_Mathematical_Alphabetic_Symbols',
- astral: '\uD83B[\uDE00-\uDEFF]'
- },
- {
- name: 'InArabic_Presentation_Forms_A',
- bmp: '\uFB50-\uFDFF'
- },
- {
- name: 'InArabic_Presentation_Forms_B',
- bmp: '\uFE70-\uFEFF'
- },
- {
- name: 'InArabic_Supplement',
- bmp: '\u0750-\u077F'
- },
- {
- name: 'InArmenian',
- bmp: '\u0530-\u058F'
- },
- {
- name: 'InArrows',
- bmp: '\u2190-\u21FF'
- },
- {
- name: 'InAvestan',
- astral: '\uD802[\uDF00-\uDF3F]'
- },
- {
- name: 'InBalinese',
- bmp: '\u1B00-\u1B7F'
- },
- {
- name: 'InBamum',
- bmp: '\uA6A0-\uA6FF'
- },
- {
- name: 'InBamum_Supplement',
- astral: '\uD81A[\uDC00-\uDE3F]'
- },
- {
- name: 'InBasic_Latin',
- bmp: '\0-\x7F'
- },
- {
- name: 'InBassa_Vah',
- astral: '\uD81A[\uDED0-\uDEFF]'
- },
- {
- name: 'InBatak',
- bmp: '\u1BC0-\u1BFF'
- },
- {
- name: 'InBengali',
- bmp: '\u0980-\u09FF'
- },
- {
- name: 'InBlock_Elements',
- bmp: '\u2580-\u259F'
- },
- {
- name: 'InBopomofo',
- bmp: '\u3100-\u312F'
- },
- {
- name: 'InBopomofo_Extended',
- bmp: '\u31A0-\u31BF'
- },
- {
- name: 'InBox_Drawing',
- bmp: '\u2500-\u257F'
- },
- {
- name: 'InBrahmi',
- astral: '\uD804[\uDC00-\uDC7F]'
- },
- {
- name: 'InBraille_Patterns',
- bmp: '\u2800-\u28FF'
- },
- {
- name: 'InBuginese',
- bmp: '\u1A00-\u1A1F'
- },
- {
- name: 'InBuhid',
- bmp: '\u1740-\u175F'
- },
- {
- name: 'InByzantine_Musical_Symbols',
- astral: '\uD834[\uDC00-\uDCFF]'
- },
- {
- name: 'InCJK_Compatibility',
- bmp: '\u3300-\u33FF'
- },
- {
- name: 'InCJK_Compatibility_Forms',
- bmp: '\uFE30-\uFE4F'
- },
- {
- name: 'InCJK_Compatibility_Ideographs',
- bmp: '\uF900-\uFAFF'
- },
- {
- name: 'InCJK_Compatibility_Ideographs_Supplement',
- astral: '\uD87E[\uDC00-\uDE1F]'
- },
- {
- name: 'InCJK_Radicals_Supplement',
- bmp: '\u2E80-\u2EFF'
- },
- {
- name: 'InCJK_Strokes',
- bmp: '\u31C0-\u31EF'
- },
- {
- name: 'InCJK_Symbols_and_Punctuation',
- bmp: '\u3000-\u303F'
- },
- {
- name: 'InCJK_Unified_Ideographs',
- bmp: '\u4E00-\u9FFF'
- },
- {
- name: 'InCJK_Unified_Ideographs_Extension_A',
- bmp: '\u3400-\u4DBF'
- },
- {
- name: 'InCJK_Unified_Ideographs_Extension_B',
- astral: '[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF]'
- },
- {
- name: 'InCJK_Unified_Ideographs_Extension_C',
- astral: '\uD86D[\uDC00-\uDF3F]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD869[\uDF00-\uDFFF]'
- },
- {
- name: 'InCJK_Unified_Ideographs_Extension_D',
- astral: '\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1F]'
- },
- {
- name: 'InCJK_Unified_Ideographs_Extension_E',
- astral: '[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEAF]|\uD86E[\uDC20-\uDFFF]'
- },
- {
- name: 'InCarian',
- astral: '\uD800[\uDEA0-\uDEDF]'
- },
- {
- name: 'InCaucasian_Albanian',
- astral: '\uD801[\uDD30-\uDD6F]'
- },
- {
- name: 'InChakma',
- astral: '\uD804[\uDD00-\uDD4F]'
- },
- {
- name: 'InCham',
- bmp: '\uAA00-\uAA5F'
- },
- {
- name: 'InCherokee',
- bmp: '\u13A0-\u13FF'
- },
- {
- name: 'InCherokee_Supplement',
- bmp: '\uAB70-\uABBF'
- },
- {
- name: 'InCombining_Diacritical_Marks',
- bmp: '\u0300-\u036F'
- },
- {
- name: 'InCombining_Diacritical_Marks_Extended',
- bmp: '\u1AB0-\u1AFF'
- },
- {
- name: 'InCombining_Diacritical_Marks_Supplement',
- bmp: '\u1DC0-\u1DFF'
- },
- {
- name: 'InCombining_Diacritical_Marks_for_Symbols',
- bmp: '\u20D0-\u20FF'
- },
- {
- name: 'InCombining_Half_Marks',
- bmp: '\uFE20-\uFE2F'
- },
- {
- name: 'InCommon_Indic_Number_Forms',
- bmp: '\uA830-\uA83F'
- },
- {
- name: 'InControl_Pictures',
- bmp: '\u2400-\u243F'
- },
- {
- name: 'InCoptic',
- bmp: '\u2C80-\u2CFF'
- },
- {
- name: 'InCoptic_Epact_Numbers',
- astral: '\uD800[\uDEE0-\uDEFF]'
- },
- {
- name: 'InCounting_Rod_Numerals',
- astral: '\uD834[\uDF60-\uDF7F]'
- },
- {
- name: 'InCuneiform',
- astral: '\uD808[\uDC00-\uDFFF]'
- },
- {
- name: 'InCuneiform_Numbers_and_Punctuation',
- astral: '\uD809[\uDC00-\uDC7F]'
- },
- {
- name: 'InCurrency_Symbols',
- bmp: '\u20A0-\u20CF'
- },
- {
- name: 'InCypriot_Syllabary',
- astral: '\uD802[\uDC00-\uDC3F]'
- },
- {
- name: 'InCyrillic',
- bmp: '\u0400-\u04FF'
- },
- {
- name: 'InCyrillic_Extended_A',
- bmp: '\u2DE0-\u2DFF'
- },
- {
- name: 'InCyrillic_Extended_B',
- bmp: '\uA640-\uA69F'
- },
- {
- name: 'InCyrillic_Supplement',
- bmp: '\u0500-\u052F'
- },
- {
- name: 'InDeseret',
- astral: '\uD801[\uDC00-\uDC4F]'
- },
- {
- name: 'InDevanagari',
- bmp: '\u0900-\u097F'
- },
- {
- name: 'InDevanagari_Extended',
- bmp: '\uA8E0-\uA8FF'
- },
- {
- name: 'InDingbats',
- bmp: '\u2700-\u27BF'
- },
- {
- name: 'InDomino_Tiles',
- astral: '\uD83C[\uDC30-\uDC9F]'
- },
- {
- name: 'InDuployan',
- astral: '\uD82F[\uDC00-\uDC9F]'
- },
- {
- name: 'InEarly_Dynastic_Cuneiform',
- astral: '\uD809[\uDC80-\uDD4F]'
- },
- {
- name: 'InEgyptian_Hieroglyphs',
- astral: '\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F]'
- },
- {
- name: 'InElbasan',
- astral: '\uD801[\uDD00-\uDD2F]'
- },
- {
- name: 'InEmoticons',
- astral: '\uD83D[\uDE00-\uDE4F]'
- },
- {
- name: 'InEnclosed_Alphanumeric_Supplement',
- astral: '\uD83C[\uDD00-\uDDFF]'
- },
- {
- name: 'InEnclosed_Alphanumerics',
- bmp: '\u2460-\u24FF'
- },
- {
- name: 'InEnclosed_CJK_Letters_and_Months',
- bmp: '\u3200-\u32FF'
- },
- {
- name: 'InEnclosed_Ideographic_Supplement',
- astral: '\uD83C[\uDE00-\uDEFF]'
- },
- {
- name: 'InEthiopic',
- bmp: '\u1200-\u137F'
- },
- {
- name: 'InEthiopic_Extended',
- bmp: '\u2D80-\u2DDF'
- },
- {
- name: 'InEthiopic_Extended_A',
- bmp: '\uAB00-\uAB2F'
- },
- {
- name: 'InEthiopic_Supplement',
- bmp: '\u1380-\u139F'
- },
- {
- name: 'InGeneral_Punctuation',
- bmp: '\u2000-\u206F'
- },
- {
- name: 'InGeometric_Shapes',
- bmp: '\u25A0-\u25FF'
- },
- {
- name: 'InGeometric_Shapes_Extended',
- astral: '\uD83D[\uDF80-\uDFFF]'
- },
- {
- name: 'InGeorgian',
- bmp: '\u10A0-\u10FF'
- },
- {
- name: 'InGeorgian_Supplement',
- bmp: '\u2D00-\u2D2F'
- },
- {
- name: 'InGlagolitic',
- bmp: '\u2C00-\u2C5F'
- },
- {
- name: 'InGothic',
- astral: '\uD800[\uDF30-\uDF4F]'
- },
- {
- name: 'InGrantha',
- astral: '\uD804[\uDF00-\uDF7F]'
- },
- {
- name: 'InGreek_Extended',
- bmp: '\u1F00-\u1FFF'
- },
- {
- name: 'InGreek_and_Coptic',
- bmp: '\u0370-\u03FF'
- },
- {
- name: 'InGujarati',
- bmp: '\u0A80-\u0AFF'
- },
- {
- name: 'InGurmukhi',
- bmp: '\u0A00-\u0A7F'
- },
- {
- name: 'InHalfwidth_and_Fullwidth_Forms',
- bmp: '\uFF00-\uFFEF'
- },
- {
- name: 'InHangul_Compatibility_Jamo',
- bmp: '\u3130-\u318F'
- },
- {
- name: 'InHangul_Jamo',
- bmp: '\u1100-\u11FF'
- },
- {
- name: 'InHangul_Jamo_Extended_A',
- bmp: '\uA960-\uA97F'
- },
- {
- name: 'InHangul_Jamo_Extended_B',
- bmp: '\uD7B0-\uD7FF'
- },
- {
- name: 'InHangul_Syllables',
- bmp: '\uAC00-\uD7AF'
- },
- {
- name: 'InHanunoo',
- bmp: '\u1720-\u173F'
- },
- {
- name: 'InHatran',
- astral: '\uD802[\uDCE0-\uDCFF]'
- },
- {
- name: 'InHebrew',
- bmp: '\u0590-\u05FF'
- },
- {
- name: 'InHigh_Private_Use_Surrogates',
- bmp: '\uDB80-\uDBFF'
- },
- {
- name: 'InHigh_Surrogates',
- bmp: '\uD800-\uDB7F'
- },
- {
- name: 'InHiragana',
- bmp: '\u3040-\u309F'
- },
- {
- name: 'InIPA_Extensions',
- bmp: '\u0250-\u02AF'
- },
- {
- name: 'InIdeographic_Description_Characters',
- bmp: '\u2FF0-\u2FFF'
- },
- {
- name: 'InImperial_Aramaic',
- astral: '\uD802[\uDC40-\uDC5F]'
- },
- {
- name: 'InInscriptional_Pahlavi',
- astral: '\uD802[\uDF60-\uDF7F]'
- },
- {
- name: 'InInscriptional_Parthian',
- astral: '\uD802[\uDF40-\uDF5F]'
- },
- {
- name: 'InJavanese',
- bmp: '\uA980-\uA9DF'
- },
- {
- name: 'InKaithi',
- astral: '\uD804[\uDC80-\uDCCF]'
- },
- {
- name: 'InKana_Supplement',
- astral: '\uD82C[\uDC00-\uDCFF]'
- },
- {
- name: 'InKanbun',
- bmp: '\u3190-\u319F'
- },
- {
- name: 'InKangxi_Radicals',
- bmp: '\u2F00-\u2FDF'
- },
- {
- name: 'InKannada',
- bmp: '\u0C80-\u0CFF'
- },
- {
- name: 'InKatakana',
- bmp: '\u30A0-\u30FF'
- },
- {
- name: 'InKatakana_Phonetic_Extensions',
- bmp: '\u31F0-\u31FF'
- },
- {
- name: 'InKayah_Li',
- bmp: '\uA900-\uA92F'
- },
- {
- name: 'InKharoshthi',
- astral: '\uD802[\uDE00-\uDE5F]'
- },
- {
- name: 'InKhmer',
- bmp: '\u1780-\u17FF'
- },
- {
- name: 'InKhmer_Symbols',
- bmp: '\u19E0-\u19FF'
- },
- {
- name: 'InKhojki',
- astral: '\uD804[\uDE00-\uDE4F]'
- },
- {
- name: 'InKhudawadi',
- astral: '\uD804[\uDEB0-\uDEFF]'
- },
- {
- name: 'InLao',
- bmp: '\u0E80-\u0EFF'
- },
- {
- name: 'InLatin_Extended_Additional',
- bmp: '\u1E00-\u1EFF'
- },
- {
- name: 'InLatin_Extended_A',
- bmp: '\u0100-\u017F'
- },
- {
- name: 'InLatin_Extended_B',
- bmp: '\u0180-\u024F'
- },
- {
- name: 'InLatin_Extended_C',
- bmp: '\u2C60-\u2C7F'
- },
- {
- name: 'InLatin_Extended_D',
- bmp: '\uA720-\uA7FF'
- },
- {
- name: 'InLatin_Extended_E',
- bmp: '\uAB30-\uAB6F'
- },
- {
- name: 'InLatin_1_Supplement',
- bmp: '\x80-\xFF'
- },
- {
- name: 'InLepcha',
- bmp: '\u1C00-\u1C4F'
- },
- {
- name: 'InLetterlike_Symbols',
- bmp: '\u2100-\u214F'
- },
- {
- name: 'InLimbu',
- bmp: '\u1900-\u194F'
- },
- {
- name: 'InLinear_A',
- astral: '\uD801[\uDE00-\uDF7F]'
- },
- {
- name: 'InLinear_B_Ideograms',
- astral: '\uD800[\uDC80-\uDCFF]'
- },
- {
- name: 'InLinear_B_Syllabary',
- astral: '\uD800[\uDC00-\uDC7F]'
- },
- {
- name: 'InLisu',
- bmp: '\uA4D0-\uA4FF'
- },
- {
- name: 'InLow_Surrogates',
- bmp: '\uDC00-\uDFFF'
- },
- {
- name: 'InLycian',
- astral: '\uD800[\uDE80-\uDE9F]'
- },
- {
- name: 'InLydian',
- astral: '\uD802[\uDD20-\uDD3F]'
- },
- {
- name: 'InMahajani',
- astral: '\uD804[\uDD50-\uDD7F]'
- },
- {
- name: 'InMahjong_Tiles',
- astral: '\uD83C[\uDC00-\uDC2F]'
- },
- {
- name: 'InMalayalam',
- bmp: '\u0D00-\u0D7F'
- },
- {
- name: 'InMandaic',
- bmp: '\u0840-\u085F'
- },
- {
- name: 'InManichaean',
- astral: '\uD802[\uDEC0-\uDEFF]'
- },
- {
- name: 'InMathematical_Alphanumeric_Symbols',
- astral: '\uD835[\uDC00-\uDFFF]'
- },
- {
- name: 'InMathematical_Operators',
- bmp: '\u2200-\u22FF'
- },
- {
- name: 'InMeetei_Mayek',
- bmp: '\uABC0-\uABFF'
- },
- {
- name: 'InMeetei_Mayek_Extensions',
- bmp: '\uAAE0-\uAAFF'
- },
- {
- name: 'InMende_Kikakui',
- astral: '\uD83A[\uDC00-\uDCDF]'
- },
- {
- name: 'InMeroitic_Cursive',
- astral: '\uD802[\uDDA0-\uDDFF]'
- },
- {
- name: 'InMeroitic_Hieroglyphs',
- astral: '\uD802[\uDD80-\uDD9F]'
- },
- {
- name: 'InMiao',
- astral: '\uD81B[\uDF00-\uDF9F]'
- },
- {
- name: 'InMiscellaneous_Mathematical_Symbols_A',
- bmp: '\u27C0-\u27EF'
- },
- {
- name: 'InMiscellaneous_Mathematical_Symbols_B',
- bmp: '\u2980-\u29FF'
- },
- {
- name: 'InMiscellaneous_Symbols',
- bmp: '\u2600-\u26FF'
- },
- {
- name: 'InMiscellaneous_Symbols_and_Arrows',
- bmp: '\u2B00-\u2BFF'
- },
- {
- name: 'InMiscellaneous_Symbols_and_Pictographs',
- astral: '\uD83D[\uDC00-\uDDFF]|\uD83C[\uDF00-\uDFFF]'
- },
- {
- name: 'InMiscellaneous_Technical',
- bmp: '\u2300-\u23FF'
- },
- {
- name: 'InModi',
- astral: '\uD805[\uDE00-\uDE5F]'
- },
- {
- name: 'InModifier_Tone_Letters',
- bmp: '\uA700-\uA71F'
- },
- {
- name: 'InMongolian',
- bmp: '\u1800-\u18AF'
- },
- {
- name: 'InMro',
- astral: '\uD81A[\uDE40-\uDE6F]'
- },
- {
- name: 'InMultani',
- astral: '\uD804[\uDE80-\uDEAF]'
- },
- {
- name: 'InMusical_Symbols',
- astral: '\uD834[\uDD00-\uDDFF]'
- },
- {
- name: 'InMyanmar',
- bmp: '\u1000-\u109F'
- },
- {
- name: 'InMyanmar_Extended_A',
- bmp: '\uAA60-\uAA7F'
- },
- {
- name: 'InMyanmar_Extended_B',
- bmp: '\uA9E0-\uA9FF'
- },
- {
- name: 'InNKo',
- bmp: '\u07C0-\u07FF'
- },
- {
- name: 'InNabataean',
- astral: '\uD802[\uDC80-\uDCAF]'
- },
- {
- name: 'InNew_Tai_Lue',
- bmp: '\u1980-\u19DF'
- },
- {
- name: 'InNumber_Forms',
- bmp: '\u2150-\u218F'
- },
- {
- name: 'InOgham',
- bmp: '\u1680-\u169F'
- },
- {
- name: 'InOl_Chiki',
- bmp: '\u1C50-\u1C7F'
- },
- {
- name: 'InOld_Hungarian',
- astral: '\uD803[\uDC80-\uDCFF]'
- },
- {
- name: 'InOld_Italic',
- astral: '\uD800[\uDF00-\uDF2F]'
- },
- {
- name: 'InOld_North_Arabian',
- astral: '\uD802[\uDE80-\uDE9F]'
- },
- {
- name: 'InOld_Permic',
- astral: '\uD800[\uDF50-\uDF7F]'
- },
- {
- name: 'InOld_Persian',
- astral: '\uD800[\uDFA0-\uDFDF]'
- },
- {
- name: 'InOld_South_Arabian',
- astral: '\uD802[\uDE60-\uDE7F]'
- },
- {
- name: 'InOld_Turkic',
- astral: '\uD803[\uDC00-\uDC4F]'
- },
- {
- name: 'InOptical_Character_Recognition',
- bmp: '\u2440-\u245F'
- },
- {
- name: 'InOriya',
- bmp: '\u0B00-\u0B7F'
- },
- {
- name: 'InOrnamental_Dingbats',
- astral: '\uD83D[\uDE50-\uDE7F]'
- },
- {
- name: 'InOsmanya',
- astral: '\uD801[\uDC80-\uDCAF]'
- },
- {
- name: 'InPahawh_Hmong',
- astral: '\uD81A[\uDF00-\uDF8F]'
- },
- {
- name: 'InPalmyrene',
- astral: '\uD802[\uDC60-\uDC7F]'
- },
- {
- name: 'InPau_Cin_Hau',
- astral: '\uD806[\uDEC0-\uDEFF]'
- },
- {
- name: 'InPhags_pa',
- bmp: '\uA840-\uA87F'
- },
- {
- name: 'InPhaistos_Disc',
- astral: '\uD800[\uDDD0-\uDDFF]'
- },
- {
- name: 'InPhoenician',
- astral: '\uD802[\uDD00-\uDD1F]'
- },
- {
- name: 'InPhonetic_Extensions',
- bmp: '\u1D00-\u1D7F'
- },
- {
- name: 'InPhonetic_Extensions_Supplement',
- bmp: '\u1D80-\u1DBF'
- },
- {
- name: 'InPlaying_Cards',
- astral: '\uD83C[\uDCA0-\uDCFF]'
- },
- {
- name: 'InPrivate_Use_Area',
- bmp: '\uE000-\uF8FF'
- },
- {
- name: 'InPsalter_Pahlavi',
- astral: '\uD802[\uDF80-\uDFAF]'
- },
- {
- name: 'InRejang',
- bmp: '\uA930-\uA95F'
- },
- {
- name: 'InRumi_Numeral_Symbols',
- astral: '\uD803[\uDE60-\uDE7F]'
- },
- {
- name: 'InRunic',
- bmp: '\u16A0-\u16FF'
- },
- {
- name: 'InSamaritan',
- bmp: '\u0800-\u083F'
- },
- {
- name: 'InSaurashtra',
- bmp: '\uA880-\uA8DF'
- },
- {
- name: 'InSharada',
- astral: '\uD804[\uDD80-\uDDDF]'
- },
- {
- name: 'InShavian',
- astral: '\uD801[\uDC50-\uDC7F]'
- },
- {
- name: 'InShorthand_Format_Controls',
- astral: '\uD82F[\uDCA0-\uDCAF]'
- },
- {
- name: 'InSiddham',
- astral: '\uD805[\uDD80-\uDDFF]'
- },
- {
- name: 'InSinhala',
- bmp: '\u0D80-\u0DFF'
- },
- {
- name: 'InSinhala_Archaic_Numbers',
- astral: '\uD804[\uDDE0-\uDDFF]'
- },
- {
- name: 'InSmall_Form_Variants',
- bmp: '\uFE50-\uFE6F'
- },
- {
- name: 'InSora_Sompeng',
- astral: '\uD804[\uDCD0-\uDCFF]'
- },
- {
- name: 'InSpacing_Modifier_Letters',
- bmp: '\u02B0-\u02FF'
- },
- {
- name: 'InSpecials',
- bmp: '\uFFF0-\uFFFF'
- },
- {
- name: 'InSundanese',
- bmp: '\u1B80-\u1BBF'
- },
- {
- name: 'InSundanese_Supplement',
- bmp: '\u1CC0-\u1CCF'
- },
- {
- name: 'InSuperscripts_and_Subscripts',
- bmp: '\u2070-\u209F'
- },
- {
- name: 'InSupplemental_Arrows_A',
- bmp: '\u27F0-\u27FF'
- },
- {
- name: 'InSupplemental_Arrows_B',
- bmp: '\u2900-\u297F'
- },
- {
- name: 'InSupplemental_Arrows_C',
- astral: '\uD83E[\uDC00-\uDCFF]'
- },
- {
- name: 'InSupplemental_Mathematical_Operators',
- bmp: '\u2A00-\u2AFF'
- },
- {
- name: 'InSupplemental_Punctuation',
- bmp: '\u2E00-\u2E7F'
- },
- {
- name: 'InSupplemental_Symbols_and_Pictographs',
- astral: '\uD83E[\uDD00-\uDDFF]'
- },
- {
- name: 'InSupplementary_Private_Use_Area_A',
- astral: '[\uDB80-\uDBBF][\uDC00-\uDFFF]'
- },
- {
- name: 'InSupplementary_Private_Use_Area_B',
- astral: '[\uDBC0-\uDBFF][\uDC00-\uDFFF]'
- },
- {
- name: 'InSutton_SignWriting',
- astral: '\uD836[\uDC00-\uDEAF]'
- },
- {
- name: 'InSyloti_Nagri',
- bmp: '\uA800-\uA82F'
- },
- {
- name: 'InSyriac',
- bmp: '\u0700-\u074F'
- },
- {
- name: 'InTagalog',
- bmp: '\u1700-\u171F'
- },
- {
- name: 'InTagbanwa',
- bmp: '\u1760-\u177F'
- },
- {
- name: 'InTags',
- astral: '\uDB40[\uDC00-\uDC7F]'
- },
- {
- name: 'InTai_Le',
- bmp: '\u1950-\u197F'
- },
- {
- name: 'InTai_Tham',
- bmp: '\u1A20-\u1AAF'
- },
- {
- name: 'InTai_Viet',
- bmp: '\uAA80-\uAADF'
- },
- {
- name: 'InTai_Xuan_Jing_Symbols',
- astral: '\uD834[\uDF00-\uDF5F]'
- },
- {
- name: 'InTakri',
- astral: '\uD805[\uDE80-\uDECF]'
- },
- {
- name: 'InTamil',
- bmp: '\u0B80-\u0BFF'
- },
- {
- name: 'InTelugu',
- bmp: '\u0C00-\u0C7F'
- },
- {
- name: 'InThaana',
- bmp: '\u0780-\u07BF'
- },
- {
- name: 'InThai',
- bmp: '\u0E00-\u0E7F'
- },
- {
- name: 'InTibetan',
- bmp: '\u0F00-\u0FFF'
- },
- {
- name: 'InTifinagh',
- bmp: '\u2D30-\u2D7F'
- },
- {
- name: 'InTirhuta',
- astral: '\uD805[\uDC80-\uDCDF]'
- },
- {
- name: 'InTransport_and_Map_Symbols',
- astral: '\uD83D[\uDE80-\uDEFF]'
- },
- {
- name: 'InUgaritic',
- astral: '\uD800[\uDF80-\uDF9F]'
- },
- {
- name: 'InUnified_Canadian_Aboriginal_Syllabics',
- bmp: '\u1400-\u167F'
- },
- {
- name: 'InUnified_Canadian_Aboriginal_Syllabics_Extended',
- bmp: '\u18B0-\u18FF'
- },
- {
- name: 'InVai',
- bmp: '\uA500-\uA63F'
- },
- {
- name: 'InVariation_Selectors',
- bmp: '\uFE00-\uFE0F'
- },
- {
- name: 'InVariation_Selectors_Supplement',
- astral: '\uDB40[\uDD00-\uDDEF]'
- },
- {
- name: 'InVedic_Extensions',
- bmp: '\u1CD0-\u1CFF'
- },
- {
- name: 'InVertical_Forms',
- bmp: '\uFE10-\uFE1F'
- },
- {
- name: 'InWarang_Citi',
- astral: '\uD806[\uDCA0-\uDCFF]'
- },
- {
- name: 'InYi_Radicals',
- bmp: '\uA490-\uA4CF'
- },
- {
- name: 'InYi_Syllables',
- bmp: '\uA000-\uA48F'
- },
- {
- name: 'InYijing_Hexagram_Symbols',
- bmp: '\u4DC0-\u4DFF'
- }
- ]);
-
-};
diff --git a/tools/eslint/node_modules/xregexp/src/addons/unicode-categories.js b/tools/eslint/node_modules/xregexp/src/addons/unicode-categories.js
deleted file mode 100644
index 4e201cb95c..0000000000
--- a/tools/eslint/node_modules/xregexp/src/addons/unicode-categories.js
+++ /dev/null
@@ -1,236 +0,0 @@
-/*!
- * XRegExp Unicode Categories 3.1.1
- * <xregexp.com>
- * Steven Levithan (c) 2010-2016 MIT License
- * Unicode data by Mathias Bynens <mathiasbynens.be>
- */
-
-module.exports = function(XRegExp) {
- 'use strict';
-
- /**
- * Adds support for Unicode's general categories. E.g., `\p{Lu}` or `\p{Uppercase Letter}`. See
- * category descriptions in UAX #44 <http://unicode.org/reports/tr44/#GC_Values_Table>. Token
- * names are case insensitive, and any spaces, hyphens, and underscores are ignored.
- *
- * Uses Unicode 8.0.0.
- *
- * @requires XRegExp, Unicode Base
- */
-
- if (!XRegExp.addUnicodeData) {
- throw new ReferenceError('Unicode Base must be loaded before Unicode Categories');
- }
-
- XRegExp.addUnicodeData([
- {
- name: 'C',
- alias: 'Other',
- isBmpLast: true,
- bmp: '\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u0380-\u0383\u038B\u038D\u03A2\u0530\u0557\u0558\u0560\u0588\u058B\u058C\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08B5-\u08E2\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0AF8\u0AFA-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0BFF\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D00\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5E\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F6\u13F7\u13FE\u13FF\u169D-\u169F\u16F9-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180E\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE\u1AAF\u1ABF-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7\u1CFA-\u1CFF\u1DF6-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BF-\u20CF\u20F1-\u20FF\u218C-\u218F\u23FB-\u23FF\u2427-\u243F\u244B-\u245F\u2B74\u2B75\u2B96\u2B97\u2BBA-\u2BBC\u2BC9\u2BD2-\u2BEB\u2BF0-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E43-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FD6-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA6F8-\uA6FF\uA7AE\uA7AF\uA7B8-\uA7F6\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FE\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB66-\uAB6F\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF',
- astral: '\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD73-\uDD7A\uDDE9-\uDDFF\uDE46-\uDEFF\uDF57-\uDF5F\uDF72-\uDFFF]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD6F\uDD9B-\uDDE5\uDE03-\uDE0F\uDE3B-\uDE3F\uDE49-\uDE4F\uDE52-\uDEFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDE70-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|\uD81B[\uDC00-\uDEFF\uDF45-\uDF4F\uDF7F-\uDF8E\uDFA0-\uDFFF]|\uD86E[\uDC1E\uDC1F]|\uD83D[\uDD7A\uDDA4\uDED1-\uDEDF\uDEED-\uDEEF\uDEF4-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD70-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8D-\uDD8F\uDD9C-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2F\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD869[\uDED7-\uDEFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7E\uDCBD\uDCC2-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD44-\uDD4F\uDD77-\uDD7F\uDDCE\uDDCF\uDDE0\uDDF5-\uDDFF\uDE12\uDE3E-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF3B\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD86D[\uDF35-\uDF3F]|[\uD807\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD81C-\uD82B\uD82D\uD82E\uD830-\uD833\uD837-\uD839\uD83F\uD874-\uD87D\uD87F-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD806[\uDC00-\uDC9F\uDCF3-\uDCFE\uDD00-\uDEBF\uDEF9-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD00-\uDE5F\uDE7F-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD805[\uDC00-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB8-\uDEBF\uDECA-\uDEFF\uDF1A-\uDF1C\uDF2C-\uDF2F\uDF40-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE34-\uDE37\uDE3B-\uDE3E\uDE48-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA0-\uDFFF]|\uD82C[\uDC02-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDD0F\uDD19-\uDD7F\uDD85-\uDDBF\uDDC1-\uDFFF]|\uD873[\uDEA2-\uDFFF]'
- },
- {
- name: 'Cc',
- alias: 'Control',
- bmp: '\0-\x1F\x7F-\x9F'
- },
- {
- name: 'Cf',
- alias: 'Format',
- bmp: '\xAD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB',
- astral: '\uDB40[\uDC01\uDC20-\uDC7F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uD804\uDCBD'
- },
- {
- name: 'Cn',
- alias: 'Unassigned',
- bmp: '\u0378\u0379\u0380-\u0383\u038B\u038D\u03A2\u0530\u0557\u0558\u0560\u0588\u058B\u058C\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u05FF\u061D\u070E\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08B5-\u08E2\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0AF8\u0AFA-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0BFF\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D00\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5E\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F6\u13F7\u13FE\u13FF\u169D-\u169F\u16F9-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE\u1AAF\u1ABF-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7\u1CFA-\u1CFF\u1DF6-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u2065\u2072\u2073\u208F\u209D-\u209F\u20BF-\u20CF\u20F1-\u20FF\u218C-\u218F\u23FB-\u23FF\u2427-\u243F\u244B-\u245F\u2B74\u2B75\u2B96\u2B97\u2BBA-\u2BBC\u2BC9\u2BD2-\u2BEB\u2BF0-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E43-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FD6-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA6F8-\uA6FF\uA7AE\uA7AF\uA7B8-\uA7F6\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FE\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB66-\uAB6F\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD\uFEFE\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFF8\uFFFE\uFFFF',
- astral: '\uDB40[\uDC00\uDC02-\uDC1F\uDC80-\uDCFF\uDDF0-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDDE9-\uDDFF\uDE46-\uDEFF\uDF57-\uDF5F\uDF72-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD6F\uDD9B-\uDDE5\uDE03-\uDE0F\uDE3B-\uDE3F\uDE49-\uDE4F\uDE52-\uDEFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDE70-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|\uD81B[\uDC00-\uDEFF\uDF45-\uDF4F\uDF7F-\uDF8E\uDFA0-\uDFFF]|\uD86E[\uDC1E\uDC1F]|\uD83D[\uDD7A\uDDA4\uDED1-\uDEDF\uDEED-\uDEEF\uDEF4-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD70-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8D-\uDD8F\uDD9C-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2F\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD869[\uDED7-\uDEFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|[\uDBBF\uDBFF][\uDFFE\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA4-\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD86D[\uDF35-\uDF3F]|[\uD807\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD81C-\uD82B\uD82D\uD82E\uD830-\uD833\uD837-\uD839\uD83F\uD874-\uD87D\uD87F-\uDB3F\uDB41-\uDB7F][\uDC00-\uDFFF]|\uD806[\uDC00-\uDC9F\uDCF3-\uDCFE\uDD00-\uDEBF\uDEF9-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD00-\uDE5F\uDE7F-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD805[\uDC00-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB8-\uDEBF\uDECA-\uDEFF\uDF1A-\uDF1C\uDF2C-\uDF2F\uDF40-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE34-\uDE37\uDE3B-\uDE3E\uDE48-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7E\uDCC2-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD44-\uDD4F\uDD77-\uDD7F\uDDCE\uDDCF\uDDE0\uDDF5-\uDDFF\uDE12\uDE3E-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF3B\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD82C[\uDC02-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDD0F\uDD19-\uDD7F\uDD85-\uDDBF\uDDC1-\uDFFF]|\uD873[\uDEA2-\uDFFF]'
- },
- {
- name: 'Co',
- alias: 'Private_Use',
- bmp: '\uE000-\uF8FF',
- astral: '[\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uDBBF\uDBFF][\uDC00-\uDFFD]'
- },
- {
- name: 'Cs',
- alias: 'Surrogate',
- bmp: '\uD800-\uDFFF'
- },
- {
- name: 'L',
- alias: 'Letter',
- bmp: 'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC',
- astral: '\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD83A[\uDC00-\uDCC4]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD80D[\uDC00-\uDC2E]|\uD87E[\uDC00-\uDE1D]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD809[\uDC80-\uDD43]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD808[\uDC00-\uDF99]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD811[\uDC00-\uDE46]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD82C[\uDC00\uDC01]|\uD873[\uDC00-\uDEA1]'
- },
- {
- name: 'Ll',
- alias: 'Lowercase_Letter',
- bmp: 'a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A',
- astral: '\uD803[\uDCC0-\uDCF2]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD801[\uDC28-\uDC4F]|\uD806[\uDCC0-\uDCDF]'
- },
- {
- name: 'Lm',
- alias: 'Modifier_Letter',
- bmp: '\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5\u06E6\u07F4\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D6A\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7C\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA69C\uA69D\uA717-\uA71F\uA770\uA788\uA7F8\uA7F9\uA9CF\uA9E6\uAA70\uAADD\uAAF3\uAAF4\uAB5C-\uAB5F\uFF70\uFF9E\uFF9F',
- astral: '\uD81A[\uDF40-\uDF43]|\uD81B[\uDF93-\uDF9F]'
- },
- {
- name: 'Lo',
- alias: 'Other_Letter',
- bmp: '\xAA\xBA\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05F0-\u05F2\u0620-\u063F\u0641-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E45\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10D0-\u10FA\u10FD-\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\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u2135-\u2138\u2D30-\u2D67\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A\uA62B\uA66E\uA6A0-\uA6E5\uA78F\uA7F7\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB\uAADC\uAAE0-\uAAEA\uAAF2\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\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\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC',
- astral: '\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD83A[\uDC00-\uDCC4]|\uD803[\uDC00-\uDC48]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD80D[\uDC00-\uDC2E]|\uD87E[\uDC00-\uDE1D]|\uD81B[\uDF00-\uDF44\uDF50]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCFF\uDEC0-\uDEF8]|\uD809[\uDC80-\uDD43]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD808[\uDC00-\uDF99]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF63-\uDF77\uDF7D-\uDF8F]|\uD801[\uDC50-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD811[\uDC00-\uDE46]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD82C[\uDC00\uDC01]|\uD873[\uDC00-\uDEA1]'
- },
- {
- name: 'Lt',
- alias: 'Titlecase_Letter',
- bmp: '\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC'
- },
- {
- name: 'Lu',
- alias: 'Uppercase_Letter',
- bmp: 'A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A',
- astral: '\uD806[\uDCA0-\uDCBF]|\uD803[\uDC80-\uDCB2]|\uD801[\uDC00-\uDC27]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]'
- },
- {
- name: 'M',
- alias: 'Mark',
- bmp: '\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F',
- astral: '\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDCA-\uDDCC\uDE2C-\uDE37\uDEDF-\uDEEA\uDF00-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD82F[\uDC9D\uDC9E]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]'
- },
- {
- name: 'Mc',
- alias: 'Spacing_Mark',
- bmp: '\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BE-\u09C0\u09C7\u09C8\u09CB\u09CC\u09D7\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD7\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0-\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0D02\u0D03\u0D3E-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D57\u0D82\u0D83\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DF2\u0DF3\u0F3E\u0F3F\u0F7F\u102B\u102C\u1031\u1038\u103B\u103C\u1056\u1057\u1062-\u1064\u1067-\u106D\u1083\u1084\u1087-\u108C\u108F\u109A-\u109C\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1B04\u1B35\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF2\u1CF3\u302E\u302F\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BD-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAA7B\uAA7D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC',
- astral: '\uD834[\uDD65\uDD66\uDD6D-\uDD72]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3E\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63]|\uD805[\uDCB0-\uDCB2\uDCB9\uDCBB-\uDCBE\uDCC1\uDDAF-\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF20\uDF21\uDF26]|\uD81B[\uDF51-\uDF7E]'
- },
- {
- name: 'Me',
- alias: 'Enclosing_Mark',
- bmp: '\u0488\u0489\u1ABE\u20DD-\u20E0\u20E2-\u20E4\uA670-\uA672'
- },
- {
- name: 'Mn',
- alias: 'Nonspacing_Mark',
- bmp: '\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D01\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F',
- astral: '\uD805[\uDCB3-\uDCB8\uDCBA\uDCBF\uDCC0\uDCC2\uDCC3\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDCA-\uDDCC\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3C\uDF40\uDF66-\uDF6C\uDF70-\uDF74]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]'
- },
- {
- name: 'N',
- alias: 'Number',
- bmp: '0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19',
- astral: '\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD803[\uDCFA-\uDCFF\uDE60-\uDE7E]|\uD835[\uDFCE-\uDFFF]|\uD83A[\uDCC7-\uDCCF]|\uD81A[\uDE60-\uDE69\uDF50-\uDF59\uDF5B-\uDF61]|\uD806[\uDCE0-\uDCF2]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD834[\uDF60-\uDF71]|\uD83C[\uDD00-\uDD0C]|\uD809[\uDC00-\uDC6E]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE47\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD805[\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]'
- },
- {
- name: 'Nd',
- alias: 'Decimal_Number',
- bmp: '0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19',
- astral: '\uD801[\uDCA0-\uDCA9]|\uD835[\uDFCE-\uDFFF]|\uD805[\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF39]|\uD806[\uDCE0-\uDCE9]|\uD804[\uDC66-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDEF0-\uDEF9]|\uD81A[\uDE60-\uDE69\uDF50-\uDF59]'
- },
- {
- name: 'Nl',
- alias: 'Letter_Number',
- bmp: '\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF',
- astral: '\uD809[\uDC00-\uDC6E]|\uD800[\uDD40-\uDD74\uDF41\uDF4A\uDFD1-\uDFD5]'
- },
- {
- name: 'No',
- alias: 'Other_Number',
- bmp: '\xB2\xB3\xB9\xBC-\xBE\u09F4-\u09F9\u0B72-\u0B77\u0BF0-\u0BF2\u0C78-\u0C7E\u0D70-\u0D75\u0F2A-\u0F33\u1369-\u137C\u17F0-\u17F9\u19DA\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215F\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA830-\uA835',
- astral: '\uD804[\uDC52-\uDC65\uDDE1-\uDDF4]|\uD803[\uDCFA-\uDCFF\uDE60-\uDE7E]|\uD83C[\uDD00-\uDD0C]|\uD806[\uDCEA-\uDCF2]|\uD83A[\uDCC7-\uDCCF]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE47\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD805[\uDF3A\uDF3B]|\uD81A[\uDF5B-\uDF61]|\uD834[\uDF60-\uDF71]|\uD800[\uDD07-\uDD33\uDD75-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23]'
- },
- {
- name: 'P',
- alias: 'Punctuation',
- bmp: '\x21-\x23\x25-\\x2A\x2C-\x2F\x3A\x3B\\x3F\x40\\x5B-\\x5D\x5F\\x7B\x7D\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65',
- astral: '\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD809[\uDC70-\uDC74]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD836[\uDE87-\uDE8B]|\uD801\uDD6F|\uD82F\uDC9F|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]'
- },
- {
- name: 'Pc',
- alias: 'Connector_Punctuation',
- bmp: '\x5F\u203F\u2040\u2054\uFE33\uFE34\uFE4D-\uFE4F\uFF3F'
- },
- {
- name: 'Pd',
- alias: 'Dash_Punctuation',
- bmp: '\\x2D\u058A\u05BE\u1400\u1806\u2010-\u2015\u2E17\u2E1A\u2E3A\u2E3B\u2E40\u301C\u3030\u30A0\uFE31\uFE32\uFE58\uFE63\uFF0D'
- },
- {
- name: 'Pe',
- alias: 'Close_Punctuation',
- bmp: '\\x29\\x5D\x7D\u0F3B\u0F3D\u169C\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E23\u2E25\u2E27\u2E29\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63'
- },
- {
- name: 'Pf',
- alias: 'Final_Punctuation',
- bmp: '\xBB\u2019\u201D\u203A\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21'
- },
- {
- name: 'Pi',
- alias: 'Initial_Punctuation',
- bmp: '\xAB\u2018\u201B\u201C\u201F\u2039\u2E02\u2E04\u2E09\u2E0C\u2E1C\u2E20'
- },
- {
- name: 'Po',
- alias: 'Other_Punctuation',
- bmp: '\x21-\x23\x25-\x27\\x2A\x2C\\x2E\x2F\x3A\x3B\\x3F\x40\\x5C\xA1\xA7\xB6\xB7\xBF\u037E\u0387\u055A-\u055F\u0589\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u166D\u166E\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u1805\u1807-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2016\u2017\u2020-\u2027\u2030-\u2038\u203B-\u203E\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205E\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00\u2E01\u2E06-\u2E08\u2E0B\u2E0E-\u2E16\u2E18\u2E19\u2E1B\u2E1E\u2E1F\u2E2A-\u2E2E\u2E30-\u2E39\u2E3C-\u2E3F\u2E41\u3001-\u3003\u303D\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFE10-\uFE16\uFE19\uFE30\uFE45\uFE46\uFE49-\uFE4C\uFE50-\uFE52\uFE54-\uFE57\uFE5F-\uFE61\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF07\uFF0A\uFF0C\uFF0E\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3C\uFF61\uFF64\uFF65',
- astral: '\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD809[\uDC70-\uDC74]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD836[\uDE87-\uDE8B]|\uD801\uDD6F|\uD82F\uDC9F|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]'
- },
- {
- name: 'Ps',
- alias: 'Open_Punctuation',
- bmp: '\\x28\\x5B\\x7B\u0F3A\u0F3C\u169B\u201A\u201E\u2045\u207D\u208D\u2308\u230A\u2329\u2768\u276A\u276C\u276E\u2770\u2772\u2774\u27C5\u27E6\u27E8\u27EA\u27EC\u27EE\u2983\u2985\u2987\u2989\u298B\u298D\u298F\u2991\u2993\u2995\u2997\u29D8\u29DA\u29FC\u2E22\u2E24\u2E26\u2E28\u2E42\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u3018\u301A\u301D\uFD3F\uFE17\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE47\uFE59\uFE5B\uFE5D\uFF08\uFF3B\uFF5B\uFF5F\uFF62'
- },
- {
- name: 'S',
- alias: 'Symbol',
- bmp: '\\x24\\x2B\x3C-\x3E\\x5E\x60\\x7C\x7E\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BE\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u23FA\u2400-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B98-\u2BB9\u2BBD-\u2BC8\u2BCA-\u2BD1\u2BEC-\u2BEF\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD',
- astral: '\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD10-\uDD2E\uDD30-\uDD6B\uDD70-\uDD9A\uDDE6-\uDE02\uDE10-\uDE3A\uDE40-\uDE48\uDE50\uDE51\uDF00-\uDFFF]|\uD83D[\uDC00-\uDD79\uDD7B-\uDDA3\uDDA5-\uDED0\uDEE0-\uDEEC\uDEF0-\uDEF3\uDF00-\uDF73\uDF80-\uDFD4]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C\uDD90-\uDD9B\uDDA0\uDDD0-\uDDFC]|\uD82F\uDC9C|\uD805\uDF3F|\uD802[\uDC77\uDC78\uDEC8]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD83B[\uDEF0\uDEF1]'
- },
- {
- name: 'Sc',
- alias: 'Currency_Symbol',
- bmp: '\\x24\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BE\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6'
- },
- {
- name: 'Sk',
- alias: 'Modifier_Symbol',
- bmp: '\\x5E\x60\xA8\xAF\xB4\xB8\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u309B\u309C\uA700-\uA716\uA720\uA721\uA789\uA78A\uAB5B\uFBB2-\uFBC1\uFF3E\uFF40\uFFE3',
- astral: '\uD83C[\uDFFB-\uDFFF]'
- },
- {
- name: 'Sm',
- alias: 'Math_Symbol',
- bmp: '\\x2B\x3C-\x3E\\x7C\x7E\xAC\xB1\xD7\xF7\u03F6\u0606-\u0608\u2044\u2052\u207A-\u207C\u208A-\u208C\u2118\u2140-\u2144\u214B\u2190-\u2194\u219A\u219B\u21A0\u21A3\u21A6\u21AE\u21CE\u21CF\u21D2\u21D4\u21F4-\u22FF\u2320\u2321\u237C\u239B-\u23B3\u23DC-\u23E1\u25B7\u25C1\u25F8-\u25FF\u266F\u27C0-\u27C4\u27C7-\u27E5\u27F0-\u27FF\u2900-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2AFF\u2B30-\u2B44\u2B47-\u2B4C\uFB29\uFE62\uFE64-\uFE66\uFF0B\uFF1C-\uFF1E\uFF5C\uFF5E\uFFE2\uFFE9-\uFFEC',
- astral: '\uD83B[\uDEF0\uDEF1]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]'
- },
- {
- name: 'So',
- alias: 'Other_Symbol',
- bmp: '\xA6\xA9\xAE\xB0\u0482\u058D\u058E\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u09FA\u0B70\u0BF3-\u0BF8\u0BFA\u0C7F\u0D79\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116\u2117\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u214A\u214C\u214D\u214F\u218A\u218B\u2195-\u2199\u219C-\u219F\u21A1\u21A2\u21A4\u21A5\u21A7-\u21AD\u21AF-\u21CD\u21D0\u21D1\u21D3\u21D5-\u21F3\u2300-\u2307\u230C-\u231F\u2322-\u2328\u232B-\u237B\u237D-\u239A\u23B4-\u23DB\u23E2-\u23FA\u2400-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u25B6\u25B8-\u25C0\u25C2-\u25F7\u2600-\u266E\u2670-\u2767\u2794-\u27BF\u2800-\u28FF\u2B00-\u2B2F\u2B45\u2B46\u2B4D-\u2B73\u2B76-\u2B95\u2B98-\u2BB9\u2BBD-\u2BC8\u2BCA-\u2BD1\u2BEC-\u2BEF\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA828-\uA82B\uA836\uA837\uA839\uAA77-\uAA79\uFDFD\uFFE4\uFFE8\uFFED\uFFEE\uFFFC\uFFFD',
- astral: '\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83D[\uDC00-\uDD79\uDD7B-\uDDA3\uDDA5-\uDED0\uDEE0-\uDEEC\uDEF0-\uDEF3\uDF00-\uDF73\uDF80-\uDFD4]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD10-\uDD2E\uDD30-\uDD6B\uDD70-\uDD9A\uDDE6-\uDE02\uDE10-\uDE3A\uDE40-\uDE48\uDE50\uDE51\uDF00-\uDFFA]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C\uDD90-\uDD9B\uDDA0\uDDD0-\uDDFC]|\uD82F\uDC9C|\uD805\uDF3F|\uD802[\uDC77\uDC78\uDEC8]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]'
- },
- {
- name: 'Z',
- alias: 'Separator',
- bmp: '\x20\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000'
- },
- {
- name: 'Zl',
- alias: 'Line_Separator',
- bmp: '\u2028'
- },
- {
- name: 'Zp',
- alias: 'Paragraph_Separator',
- bmp: '\u2029'
- },
- {
- name: 'Zs',
- alias: 'Space_Separator',
- bmp: '\x20\xA0\u1680\u2000-\u200A\u202F\u205F\u3000'
- }
- ]);
-
-};
diff --git a/tools/eslint/node_modules/xregexp/src/addons/unicode-properties.js b/tools/eslint/node_modules/xregexp/src/addons/unicode-properties.js
deleted file mode 100644
index 725a77050e..0000000000
--- a/tools/eslint/node_modules/xregexp/src/addons/unicode-properties.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/*!
- * XRegExp Unicode Properties 3.1.1
- * <xregexp.com>
- * Steven Levithan (c) 2012-2016 MIT License
- * Unicode data by Mathias Bynens <mathiasbynens.be>
- */
-
-module.exports = function(XRegExp) {
- 'use strict';
-
- /**
- * Adds properties to meet the UTS #18 Level 1 RL1.2 requirements for Unicode regex support. See
- * <http://unicode.org/reports/tr18/#RL1.2>. Following are definitions of these properties from
- * UAX #44 <http://unicode.org/reports/tr44/>:
- *
- * - Alphabetic
- * Characters with the Alphabetic property. Generated from: Lowercase + Uppercase + Lt + Lm +
- * Lo + Nl + Other_Alphabetic.
- *
- * - Default_Ignorable_Code_Point
- * For programmatic determination of default ignorable code points. New characters that should
- * be ignored in rendering (unless explicitly supported) will be assigned in these ranges,
- * permitting programs to correctly handle the default rendering of such characters when not
- * otherwise supported.
- *
- * - Lowercase
- * Characters with the Lowercase property. Generated from: Ll + Other_Lowercase.
- *
- * - Noncharacter_Code_Point
- * Code points permanently reserved for internal use.
- *
- * - Uppercase
- * Characters with the Uppercase property. Generated from: Lu + Other_Uppercase.
- *
- * - White_Space
- * Spaces, separator characters and other control characters which should be treated by
- * programming languages as "white space" for the purpose of parsing elements.
- *
- * The properties ASCII, Any, and Assigned are also included but are not defined in UAX #44. UTS
- * #18 RL1.2 additionally requires support for Unicode scripts and general categories. These are
- * included in XRegExp's Unicode Categories and Unicode Scripts addons.
- *
- * Token names are case insensitive, and any spaces, hyphens, and underscores are ignored.
- *
- * Uses Unicode 8.0.0.
- *
- * @requires XRegExp, Unicode Base
- */
-
- if (!XRegExp.addUnicodeData) {
- throw new ReferenceError('Unicode Base must be loaded before Unicode Properties');
- }
-
- var unicodeData = [
- {
- name: 'ASCII',
- bmp: '\0-\x7F'
- },
- {
- name: 'Alphabetic',
- bmp: 'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0345\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05B0-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0657\u0659-\u065F\u066E-\u06D3\u06D5-\u06DC\u06E1-\u06E8\u06ED-\u06EF\u06FA-\u06FC\u06FF\u0710-\u073F\u074D-\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0817\u081A-\u082C\u0840-\u0858\u08A0-\u08B4\u08E3-\u08E9\u08F0-\u093B\u093D-\u094C\u094E-\u0950\u0955-\u0963\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C4\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09F0\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A42\u0A47\u0A48\u0A4B\u0A4C\u0A51\u0A59-\u0A5C\u0A5E\u0A70-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC5\u0AC7-\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0-\u0AE3\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D-\u0B44\u0B47\u0B48\u0B4B\u0B4C\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4C\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCC\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D57\u0D5F-\u0D63\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E46\u0E4D\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0ECD\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F71-\u0F81\u0F88-\u0F97\u0F99-\u0FBC\u1000-\u1036\u1038\u103B-\u103F\u1050-\u1062\u1065-\u1068\u106E-\u1086\u108E\u109C\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1713\u1720-\u1733\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17B3\u17B6-\u17C8\u17D7\u17DC\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u1938\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A1B\u1A20-\u1A5E\u1A61-\u1A74\u1AA7\u1B00-\u1B33\u1B35-\u1B43\u1B45-\u1B4B\u1B80-\u1BA9\u1BAC-\u1BAF\u1BBA-\u1BE5\u1BE7-\u1BF1\u1C00-\u1C35\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1D00-\u1DBF\u1DE7-\u1DF4\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u24B6-\u24E9\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\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA674-\uA67B\uA67F-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA827\uA840-\uA873\uA880-\uA8C3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA92A\uA930-\uA952\uA960-\uA97C\uA980-\uA9B2\uA9B4-\uA9BF\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA60-\uAA76\uAA7A\uAA7E-\uAABE\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC',
- astral: '\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD804[\uDC00-\uDC45\uDC82-\uDCB8\uDCD0-\uDCE8\uDD00-\uDD32\uDD50-\uDD72\uDD76\uDD80-\uDDBF\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE34\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEE8\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D-\uDF44\uDF47\uDF48\uDF4B\uDF4C\uDF50\uDF57\uDF5D-\uDF63]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD83A[\uDC00-\uDCC4]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF36\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]|\uD80D[\uDC00-\uDC2E]|\uD87E[\uDC00-\uDE1D]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9E]|\uD808[\uDC00-\uDF99]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD805[\uDC80-\uDCC1\uDCC4\uDCC5\uDCC7\uDD80-\uDDB5\uDDB8-\uDDBE\uDDD8-\uDDDD\uDE00-\uDE3E\uDE40\uDE44\uDE80-\uDEB5\uDF00-\uDF19\uDF1D-\uDF2A]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD811[\uDC00-\uDE46]|\uD82C[\uDC00\uDC01]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF93-\uDF9F]|\uD873[\uDC00-\uDEA1]'
- },
- {
- name: 'Any',
- isBmpLast: true,
- bmp: '\0-\uFFFF',
- astral: '[\uD800-\uDBFF][\uDC00-\uDFFF]'
- },
- {
- name: 'Default_Ignorable_Code_Point',
- bmp: '\xAD\u034F\u061C\u115F\u1160\u17B4\u17B5\u180B-\u180E\u200B-\u200F\u202A-\u202E\u2060-\u206F\u3164\uFE00-\uFE0F\uFEFF\uFFA0\uFFF0-\uFFF8',
- astral: '[\uDB40-\uDB43][\uDC00-\uDFFF]|\uD834[\uDD73-\uDD7A]|\uD82F[\uDCA0-\uDCA3]'
- },
- {
- name: 'Lowercase',
- bmp: 'a-z\xAA\xB5\xBA\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02B8\u02C0\u02C1\u02E0-\u02E4\u0345\u0371\u0373\u0377\u037A-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1DBF\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u2071\u207F\u2090-\u209C\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2170-\u217F\u2184\u24D0-\u24E9\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7D\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B-\uA69D\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7F8-\uA7FA\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A',
- astral: '\uD803[\uDCC0-\uDCF2]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD801[\uDC28-\uDC4F]|\uD806[\uDCC0-\uDCDF]'
- },
- {
- name: 'Noncharacter_Code_Point',
- bmp: '\uFDD0-\uFDEF\uFFFE\uFFFF',
- astral: '[\uDB3F\uDB7F\uDBBF\uDBFF\uD83F\uD87F\uD8BF\uDAFF\uD97F\uD9BF\uD9FF\uDA3F\uD8FF\uDABF\uDA7F\uD93F][\uDFFE\uDFFF]'
- },
- {
- name: 'Uppercase',
- bmp: 'A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2160-\u216F\u2183\u24B6-\u24CF\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A',
- astral: '\uD806[\uDCA0-\uDCBF]|\uD803[\uDC80-\uDCB2]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD801[\uDC00-\uDC27]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]'
- },
- {
- name: 'White_Space',
- bmp: '\x09-\x0D\x20\x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000'
- }
- ];
-
- // Add non-generated data
- unicodeData.push({
- name: 'Assigned',
- // Since this is defined as the inverse of Unicode category Cn (Unassigned), the Unicode
- // Categories addon is required to use this property
- inverseOf: 'Cn'
- });
-
- XRegExp.addUnicodeData(unicodeData);
-
-};
diff --git a/tools/eslint/node_modules/xregexp/src/addons/unicode-scripts.js b/tools/eslint/node_modules/xregexp/src/addons/unicode-scripts.js
deleted file mode 100644
index 06983d6a82..0000000000
--- a/tools/eslint/node_modules/xregexp/src/addons/unicode-scripts.js
+++ /dev/null
@@ -1,560 +0,0 @@
-/*!
- * XRegExp Unicode Scripts 3.1.1
- * <xregexp.com>
- * Steven Levithan (c) 2010-2016 MIT License
- * Unicode data by Mathias Bynens <mathiasbynens.be>
- */
-
-module.exports = function(XRegExp) {
- 'use strict';
-
- /**
- * Adds support for all Unicode scripts. E.g., `\p{Latin}`. Token names are case insensitive,
- * and any spaces, hyphens, and underscores are ignored.
- *
- * Uses Unicode 8.0.0.
- *
- * @requires XRegExp, Unicode Base
- */
-
- if (!XRegExp.addUnicodeData) {
- throw new ReferenceError('Unicode Base must be loaded before Unicode Scripts');
- }
-
- XRegExp.addUnicodeData([
- {
- name: 'Ahom',
- astral: '\uD805[\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF3F]'
- },
- {
- name: 'Anatolian_Hieroglyphs',
- astral: '\uD811[\uDC00-\uDE46]'
- },
- {
- name: 'Arabic',
- bmp: '\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u08A0-\u08B4\u08E3-\u08FF\uFB50-\uFBC1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFD\uFE70-\uFE74\uFE76-\uFEFC',
- astral: '\uD803[\uDE60-\uDE7E]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]'
- },
- {
- name: 'Armenian',
- bmp: '\u0531-\u0556\u0559-\u055F\u0561-\u0587\u058A\u058D-\u058F\uFB13-\uFB17'
- },
- {
- name: 'Avestan',
- astral: '\uD802[\uDF00-\uDF35\uDF39-\uDF3F]'
- },
- {
- name: 'Balinese',
- bmp: '\u1B00-\u1B4B\u1B50-\u1B7C'
- },
- {
- name: 'Bamum',
- bmp: '\uA6A0-\uA6F7',
- astral: '\uD81A[\uDC00-\uDE38]'
- },
- {
- name: 'Bassa_Vah',
- astral: '\uD81A[\uDED0-\uDEED\uDEF0-\uDEF5]'
- },
- {
- name: 'Batak',
- bmp: '\u1BC0-\u1BF3\u1BFC-\u1BFF'
- },
- {
- name: 'Bengali',
- bmp: '\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FB'
- },
- {
- name: 'Bopomofo',
- bmp: '\u02EA\u02EB\u3105-\u312D\u31A0-\u31BA'
- },
- {
- name: 'Brahmi',
- astral: '\uD804[\uDC00-\uDC4D\uDC52-\uDC6F\uDC7F]'
- },
- {
- name: 'Braille',
- bmp: '\u2800-\u28FF'
- },
- {
- name: 'Buginese',
- bmp: '\u1A00-\u1A1B\u1A1E\u1A1F'
- },
- {
- name: 'Buhid',
- bmp: '\u1740-\u1753'
- },
- {
- name: 'Canadian_Aboriginal',
- bmp: '\u1400-\u167F\u18B0-\u18F5'
- },
- {
- name: 'Carian',
- astral: '\uD800[\uDEA0-\uDED0]'
- },
- {
- name: 'Caucasian_Albanian',
- astral: '\uD801[\uDD30-\uDD63\uDD6F]'
- },
- {
- name: 'Chakma',
- astral: '\uD804[\uDD00-\uDD34\uDD36-\uDD43]'
- },
- {
- name: 'Cham',
- bmp: '\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA5C-\uAA5F'
- },
- {
- name: 'Cherokee',
- bmp: '\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF'
- },
- {
- name: 'Common',
- bmp: '\0-\x40\\x5B-\x60\\x7B-\xA9\xAB-\xB9\xBB-\xBF\xD7\xF7\u02B9-\u02DF\u02E5-\u02E9\u02EC-\u02FF\u0374\u037E\u0385\u0387\u0589\u0605\u060C\u061B\u061C\u061F\u0640\u06DD\u0964\u0965\u0E3F\u0FD5-\u0FD8\u10FB\u16EB-\u16ED\u1735\u1736\u1802\u1803\u1805\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u2000-\u200B\u200E-\u2064\u2066-\u2070\u2074-\u207E\u2080-\u208E\u20A0-\u20BE\u2100-\u2125\u2127-\u2129\u212C-\u2131\u2133-\u214D\u214F-\u215F\u2189-\u218B\u2190-\u23FA\u2400-\u2426\u2440-\u244A\u2460-\u27FF\u2900-\u2B73\u2B76-\u2B95\u2B98-\u2BB9\u2BBD-\u2BC8\u2BCA-\u2BD1\u2BEC-\u2BEF\u2E00-\u2E42\u2FF0-\u2FFB\u3000-\u3004\u3006\u3008-\u3020\u3030-\u3037\u303C-\u303F\u309B\u309C\u30A0\u30FB\u30FC\u3190-\u319F\u31C0-\u31E3\u3220-\u325F\u327F-\u32CF\u3358-\u33FF\u4DC0-\u4DFF\uA700-\uA721\uA788-\uA78A\uA830-\uA839\uA92E\uA9CF\uAB5B\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFF70\uFF9E\uFF9F\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD',
- astral: '\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD82F[\uDCA0-\uDCA3]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDFCB\uDFCE-\uDFFF]|\uDB40[\uDC01\uDC20-\uDC7F]|\uD83D[\uDC00-\uDD79\uDD7B-\uDDA3\uDDA5-\uDED0\uDEE0-\uDEEC\uDEF0-\uDEF3\uDF00-\uDF73\uDF80-\uDFD4]|\uD800[\uDD00-\uDD02\uDD07-\uDD33\uDD37-\uDD3F\uDD90-\uDD9B\uDDD0-\uDDFC\uDEE1-\uDEFB]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD66\uDD6A-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDF00-\uDF56\uDF60-\uDF71]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD00-\uDD0C\uDD10-\uDD2E\uDD30-\uDD6B\uDD70-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE10-\uDE3A\uDE40-\uDE48\uDE50\uDE51\uDF00-\uDFFF]'
- },
- {
- name: 'Coptic',
- bmp: '\u03E2-\u03EF\u2C80-\u2CF3\u2CF9-\u2CFF'
- },
- {
- name: 'Cuneiform',
- astral: '\uD809[\uDC00-\uDC6E\uDC70-\uDC74\uDC80-\uDD43]|\uD808[\uDC00-\uDF99]'
- },
- {
- name: 'Cypriot',
- astral: '\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F]'
- },
- {
- name: 'Cyrillic',
- bmp: '\u0400-\u0484\u0487-\u052F\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F'
- },
- {
- name: 'Deseret',
- astral: '\uD801[\uDC00-\uDC4F]'
- },
- {
- name: 'Devanagari',
- bmp: '\u0900-\u0950\u0953-\u0963\u0966-\u097F\uA8E0-\uA8FD'
- },
- {
- name: 'Duployan',
- astral: '\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]'
- },
- {
- name: 'Egyptian_Hieroglyphs',
- astral: '\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]'
- },
- {
- name: 'Elbasan',
- astral: '\uD801[\uDD00-\uDD27]'
- },
- {
- name: 'Ethiopic',
- bmp: '\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E'
- },
- {
- name: 'Georgian',
- bmp: '\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u10FF\u2D00-\u2D25\u2D27\u2D2D'
- },
- {
- name: 'Glagolitic',
- bmp: '\u2C00-\u2C2E\u2C30-\u2C5E'
- },
- {
- name: 'Gothic',
- astral: '\uD800[\uDF30-\uDF4A]'
- },
- {
- name: 'Grantha',
- astral: '\uD804[\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]'
- },
- {
- name: 'Greek',
- bmp: '\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65',
- astral: '\uD800[\uDD40-\uDD8C\uDDA0]|\uD834[\uDE00-\uDE45]'
- },
- {
- name: 'Gujarati',
- bmp: '\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9'
- },
- {
- name: 'Gurmukhi',
- bmp: '\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75'
- },
- {
- name: 'Han',
- bmp: '\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DB5\u4E00-\u9FD5\uF900-\uFA6D\uFA70-\uFAD9',
- astral: '\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD87E[\uDC00-\uDE1D]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD873[\uDC00-\uDEA1]'
- },
- {
- name: 'Hangul',
- bmp: '\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC'
- },
- {
- name: 'Hanunoo',
- bmp: '\u1720-\u1734'
- },
- {
- name: 'Hatran',
- astral: '\uD802[\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDCFF]'
- },
- {
- name: 'Hebrew',
- bmp: '\u0591-\u05C7\u05D0-\u05EA\u05F0-\u05F4\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4F'
- },
- {
- name: 'Hiragana',
- bmp: '\u3041-\u3096\u309D-\u309F',
- astral: '\uD82C\uDC01|\uD83C\uDE00'
- },
- {
- name: 'Imperial_Aramaic',
- astral: '\uD802[\uDC40-\uDC55\uDC57-\uDC5F]'
- },
- {
- name: 'Inherited',
- bmp: '\u0300-\u036F\u0485\u0486\u064B-\u0655\u0670\u0951\u0952\u1AB0-\u1ABE\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u200C\u200D\u20D0-\u20F0\u302A-\u302D\u3099\u309A\uFE00-\uFE0F\uFE20-\uFE2D',
- astral: '\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD]|\uD800[\uDDFD\uDEE0]|\uDB40[\uDD00-\uDDEF]'
- },
- {
- name: 'Inscriptional_Pahlavi',
- astral: '\uD802[\uDF60-\uDF72\uDF78-\uDF7F]'
- },
- {
- name: 'Inscriptional_Parthian',
- astral: '\uD802[\uDF40-\uDF55\uDF58-\uDF5F]'
- },
- {
- name: 'Javanese',
- bmp: '\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF'
- },
- {
- name: 'Kaithi',
- astral: '\uD804[\uDC80-\uDCC1]'
- },
- {
- name: 'Kannada',
- bmp: '\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2'
- },
- {
- name: 'Katakana',
- bmp: '\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D',
- astral: '\uD82C\uDC00'
- },
- {
- name: 'Kayah_Li',
- bmp: '\uA900-\uA92D\uA92F'
- },
- {
- name: 'Kharoshthi',
- astral: '\uD802[\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F-\uDE47\uDE50-\uDE58]'
- },
- {
- name: 'Khmer',
- bmp: '\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF'
- },
- {
- name: 'Khojki',
- astral: '\uD804[\uDE00-\uDE11\uDE13-\uDE3D]'
- },
- {
- name: 'Khudawadi',
- astral: '\uD804[\uDEB0-\uDEEA\uDEF0-\uDEF9]'
- },
- {
- name: 'Lao',
- bmp: '\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF'
- },
- {
- name: 'Latin',
- bmp: 'A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A'
- },
- {
- name: 'Lepcha',
- bmp: '\u1C00-\u1C37\u1C3B-\u1C49\u1C4D-\u1C4F'
- },
- {
- name: 'Limbu',
- bmp: '\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1940\u1944-\u194F'
- },
- {
- name: 'Linear_A',
- astral: '\uD801[\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]'
- },
- {
- name: 'Linear_B',
- astral: '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA]'
- },
- {
- name: 'Lisu',
- bmp: '\uA4D0-\uA4FF'
- },
- {
- name: 'Lycian',
- astral: '\uD800[\uDE80-\uDE9C]'
- },
- {
- name: 'Lydian',
- astral: '\uD802[\uDD20-\uDD39\uDD3F]'
- },
- {
- name: 'Mahajani',
- astral: '\uD804[\uDD50-\uDD76]'
- },
- {
- name: 'Malayalam',
- bmp: '\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D75\u0D79-\u0D7F'
- },
- {
- name: 'Mandaic',
- bmp: '\u0840-\u085B\u085E'
- },
- {
- name: 'Manichaean',
- astral: '\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6]'
- },
- {
- name: 'Meetei_Mayek',
- bmp: '\uAAE0-\uAAF6\uABC0-\uABED\uABF0-\uABF9'
- },
- {
- name: 'Mende_Kikakui',
- astral: '\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6]'
- },
- {
- name: 'Meroitic_Cursive',
- astral: '\uD802[\uDDA0-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDDFF]'
- },
- {
- name: 'Meroitic_Hieroglyphs',
- astral: '\uD802[\uDD80-\uDD9F]'
- },
- {
- name: 'Miao',
- astral: '\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]'
- },
- {
- name: 'Modi',
- astral: '\uD805[\uDE00-\uDE44\uDE50-\uDE59]'
- },
- {
- name: 'Mongolian',
- bmp: '\u1800\u1801\u1804\u1806-\u180E\u1810-\u1819\u1820-\u1877\u1880-\u18AA'
- },
- {
- name: 'Mro',
- astral: '\uD81A[\uDE40-\uDE5E\uDE60-\uDE69\uDE6E\uDE6F]'
- },
- {
- name: 'Multani',
- astral: '\uD804[\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA9]'
- },
- {
- name: 'Myanmar',
- bmp: '\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F'
- },
- {
- name: 'Nabataean',
- astral: '\uD802[\uDC80-\uDC9E\uDCA7-\uDCAF]'
- },
- {
- name: 'New_Tai_Lue',
- bmp: '\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u19DE\u19DF'
- },
- {
- name: 'Nko',
- bmp: '\u07C0-\u07FA'
- },
- {
- name: 'Ogham',
- bmp: '\u1680-\u169C'
- },
- {
- name: 'Ol_Chiki',
- bmp: '\u1C50-\u1C7F'
- },
- {
- name: 'Old_Hungarian',
- astral: '\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDCFF]'
- },
- {
- name: 'Old_Italic',
- astral: '\uD800[\uDF00-\uDF23]'
- },
- {
- name: 'Old_North_Arabian',
- astral: '\uD802[\uDE80-\uDE9F]'
- },
- {
- name: 'Old_Permic',
- astral: '\uD800[\uDF50-\uDF7A]'
- },
- {
- name: 'Old_Persian',
- astral: '\uD800[\uDFA0-\uDFC3\uDFC8-\uDFD5]'
- },
- {
- name: 'Old_South_Arabian',
- astral: '\uD802[\uDE60-\uDE7F]'
- },
- {
- name: 'Old_Turkic',
- astral: '\uD803[\uDC00-\uDC48]'
- },
- {
- name: 'Oriya',
- bmp: '\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B77'
- },
- {
- name: 'Osmanya',
- astral: '\uD801[\uDC80-\uDC9D\uDCA0-\uDCA9]'
- },
- {
- name: 'Pahawh_Hmong',
- astral: '\uD81A[\uDF00-\uDF45\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]'
- },
- {
- name: 'Palmyrene',
- astral: '\uD802[\uDC60-\uDC7F]'
- },
- {
- name: 'Pau_Cin_Hau',
- astral: '\uD806[\uDEC0-\uDEF8]'
- },
- {
- name: 'Phags_Pa',
- bmp: '\uA840-\uA877'
- },
- {
- name: 'Phoenician',
- astral: '\uD802[\uDD00-\uDD1B\uDD1F]'
- },
- {
- name: 'Psalter_Pahlavi',
- astral: '\uD802[\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]'
- },
- {
- name: 'Rejang',
- bmp: '\uA930-\uA953\uA95F'
- },
- {
- name: 'Runic',
- bmp: '\u16A0-\u16EA\u16EE-\u16F8'
- },
- {
- name: 'Samaritan',
- bmp: '\u0800-\u082D\u0830-\u083E'
- },
- {
- name: 'Saurashtra',
- bmp: '\uA880-\uA8C4\uA8CE-\uA8D9'
- },
- {
- name: 'Sharada',
- astral: '\uD804[\uDD80-\uDDCD\uDDD0-\uDDDF]'
- },
- {
- name: 'Shavian',
- astral: '\uD801[\uDC50-\uDC7F]'
- },
- {
- name: 'Siddham',
- astral: '\uD805[\uDD80-\uDDB5\uDDB8-\uDDDD]'
- },
- {
- name: 'SignWriting',
- astral: '\uD836[\uDC00-\uDE8B\uDE9B-\uDE9F\uDEA1-\uDEAF]'
- },
- {
- name: 'Sinhala',
- bmp: '\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4',
- astral: '\uD804[\uDDE1-\uDDF4]'
- },
- {
- name: 'Sora_Sompeng',
- astral: '\uD804[\uDCD0-\uDCE8\uDCF0-\uDCF9]'
- },
- {
- name: 'Sundanese',
- bmp: '\u1B80-\u1BBF\u1CC0-\u1CC7'
- },
- {
- name: 'Syloti_Nagri',
- bmp: '\uA800-\uA82B'
- },
- {
- name: 'Syriac',
- bmp: '\u0700-\u070D\u070F-\u074A\u074D-\u074F'
- },
- {
- name: 'Tagalog',
- bmp: '\u1700-\u170C\u170E-\u1714'
- },
- {
- name: 'Tagbanwa',
- bmp: '\u1760-\u176C\u176E-\u1770\u1772\u1773'
- },
- {
- name: 'Tai_Le',
- bmp: '\u1950-\u196D\u1970-\u1974'
- },
- {
- name: 'Tai_Tham',
- bmp: '\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD'
- },
- {
- name: 'Tai_Viet',
- bmp: '\uAA80-\uAAC2\uAADB-\uAADF'
- },
- {
- name: 'Takri',
- astral: '\uD805[\uDE80-\uDEB7\uDEC0-\uDEC9]'
- },
- {
- name: 'Tamil',
- bmp: '\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA'
- },
- {
- name: 'Telugu',
- bmp: '\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7F'
- },
- {
- name: 'Thaana',
- bmp: '\u0780-\u07B1'
- },
- {
- name: 'Thai',
- bmp: '\u0E01-\u0E3A\u0E40-\u0E5B'
- },
- {
- name: 'Tibetan',
- bmp: '\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA'
- },
- {
- name: 'Tifinagh',
- bmp: '\u2D30-\u2D67\u2D6F\u2D70\u2D7F'
- },
- {
- name: 'Tirhuta',
- astral: '\uD805[\uDC80-\uDCC7\uDCD0-\uDCD9]'
- },
- {
- name: 'Ugaritic',
- astral: '\uD800[\uDF80-\uDF9D\uDF9F]'
- },
- {
- name: 'Vai',
- bmp: '\uA500-\uA62B'
- },
- {
- name: 'Warang_Citi',
- astral: '\uD806[\uDCA0-\uDCF2\uDCFF]'
- },
- {
- name: 'Yi',
- bmp: '\uA000-\uA48C\uA490-\uA4C6'
- }
- ]);
-
-};
diff --git a/tools/eslint/node_modules/xregexp/src/index.js b/tools/eslint/node_modules/xregexp/src/index.js
deleted file mode 100644
index 0d0bd455aa..0000000000
--- a/tools/eslint/node_modules/xregexp/src/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var XRegExp = require('./xregexp');
-
-require('./addons/build')(XRegExp);
-require('./addons/matchrecursive')(XRegExp);
-require('./addons/unicode-base')(XRegExp);
-require('./addons/unicode-blocks')(XRegExp);
-require('./addons/unicode-categories')(XRegExp);
-require('./addons/unicode-properties')(XRegExp);
-require('./addons/unicode-scripts')(XRegExp);
-
-module.exports = XRegExp;
diff --git a/tools/eslint/node_modules/xregexp/src/xregexp.js b/tools/eslint/node_modules/xregexp/src/xregexp.js
deleted file mode 100644
index 4cedd85177..0000000000
--- a/tools/eslint/node_modules/xregexp/src/xregexp.js
+++ /dev/null
@@ -1,1834 +0,0 @@
-/*!
- * XRegExp 3.1.1
- * <xregexp.com>
- * Steven Levithan (c) 2007-2016 MIT License
- */
-
-'use strict';
-
-/**
- * XRegExp provides augmented, extensible regular expressions. You get additional regex syntax and
- * flags, beyond what browsers support natively. XRegExp is also a regex utility belt with tools to
- * make your client-side grepping simpler and more powerful, while freeing you from related
- * cross-browser inconsistencies.
- */
-
-// ==--------------------------==
-// Private stuff
-// ==--------------------------==
-
-// Property name used for extended regex instance data
-var REGEX_DATA = 'xregexp';
-// Optional features that can be installed and uninstalled
-var features = {
- astral: false,
- natives: false
-};
-// Native methods to use and restore ('native' is an ES3 reserved keyword)
-var nativ = {
- exec: RegExp.prototype.exec,
- test: RegExp.prototype.test,
- match: String.prototype.match,
- replace: String.prototype.replace,
- split: String.prototype.split
-};
-// Storage for fixed/extended native methods
-var fixed = {};
-// Storage for regexes cached by `XRegExp.cache`
-var regexCache = {};
-// Storage for pattern details cached by the `XRegExp` constructor
-var patternCache = {};
-// Storage for regex syntax tokens added internally or by `XRegExp.addToken`
-var tokens = [];
-// Token scopes
-var defaultScope = 'default';
-var classScope = 'class';
-// Regexes that match native regex syntax, including octals
-var nativeTokens = {
- // Any native multicharacter token in default scope, or any single character
- 'default': /\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,
- // Any native multicharacter token in character class scope, or any single character
- 'class': /\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/
-};
-// Any backreference or dollar-prefixed character in replacement strings
-var replacementToken = /\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g;
-// Check for correct `exec` handling of nonparticipating capturing groups
-var correctExecNpcg = nativ.exec.call(/()??/, '')[1] === undefined;
-// Check for ES6 `flags` prop support
-var hasFlagsProp = /x/.flags !== undefined;
-// Shortcut to `Object.prototype.toString`
-var toString = {}.toString;
-
-function hasNativeFlag(flag) {
- // Can't check based on the presense of properties/getters since browsers might support such
- // properties even when they don't support the corresponding flag in regex construction (tested
- // in Chrome 48, where `'unicode' in /x/` is true but trying to construct a regex with flag `u`
- // throws an error)
- var isSupported = true;
- try {
- // Can't use regex literals for testing even in a `try` because regex literals with
- // unsupported flags cause a compilation error in IE
- new RegExp('', flag);
- } catch (exception) {
- isSupported = false;
- }
- if (isSupported && flag === 'y') {
- // Work around Safari 9.1.1 bug
- return new RegExp('aa|.', 'y').test('b');
- }
- return isSupported;
-}
-// Check for ES6 `u` flag support
-var hasNativeU = hasNativeFlag('u');
-// Check for ES6 `y` flag support
-var hasNativeY = hasNativeFlag('y');
-// Tracker for known flags, including addon flags
-var registeredFlags = {
- g: true,
- i: true,
- m: true,
- u: hasNativeU,
- y: hasNativeY
-};
-
-/**
- * Attaches extended data and `XRegExp.prototype` properties to a regex object.
- *
- * @param {RegExp} regex Regex to augment.
- * @param {Array} captureNames Array with capture names, or `null`.
- * @param {String} xSource XRegExp pattern used to generate `regex`, or `null` if N/A.
- * @param {String} xFlags XRegExp flags used to generate `regex`, or `null` if N/A.
- * @param {Boolean} [isInternalOnly=false] Whether the regex will be used only for internal
- * operations, and never exposed to users. For internal-only regexes, we can improve perf by
- * skipping some operations like attaching `XRegExp.prototype` properties.
- * @returns {RegExp} Augmented regex.
- */
-function augment(regex, captureNames, xSource, xFlags, isInternalOnly) {
- var p;
-
- regex[REGEX_DATA] = {
- captureNames: captureNames
- };
-
- if (isInternalOnly) {
- return regex;
- }
-
- // Can't auto-inherit these since the XRegExp constructor returns a nonprimitive value
- if (regex.__proto__) {
- regex.__proto__ = XRegExp.prototype;
- } else {
- for (p in XRegExp.prototype) {
- // An `XRegExp.prototype.hasOwnProperty(p)` check wouldn't be worth it here, since this
- // is performance sensitive, and enumerable `Object.prototype` or `RegExp.prototype`
- // extensions exist on `regex.prototype` anyway
- regex[p] = XRegExp.prototype[p];
- }
- }
-
- regex[REGEX_DATA].source = xSource;
- // Emulate the ES6 `flags` prop by ensuring flags are in alphabetical order
- regex[REGEX_DATA].flags = xFlags ? xFlags.split('').sort().join('') : xFlags;
-
- return regex;
-}
-
-/**
- * Removes any duplicate characters from the provided string.
- *
- * @param {String} str String to remove duplicate characters from.
- * @returns {String} String with any duplicate characters removed.
- */
-function clipDuplicates(str) {
- return nativ.replace.call(str, /([\s\S])(?=[\s\S]*\1)/g, '');
-}
-
-/**
- * Copies a regex object while preserving extended data and augmenting with `XRegExp.prototype`
- * properties. The copy has a fresh `lastIndex` property (set to zero). Allows adding and removing
- * flags g and y while copying the regex.
- *
- * @param {RegExp} regex Regex to copy.
- * @param {Object} [options] Options object with optional properties:
- * <li>`addG` {Boolean} Add flag g while copying the regex.
- * <li>`addY` {Boolean} Add flag y while copying the regex.
- * <li>`removeG` {Boolean} Remove flag g while copying the regex.
- * <li>`removeY` {Boolean} Remove flag y while copying the regex.
- * <li>`isInternalOnly` {Boolean} Whether the copied regex will be used only for internal
- * operations, and never exposed to users. For internal-only regexes, we can improve perf by
- * skipping some operations like attaching `XRegExp.prototype` properties.
- * @returns {RegExp} Copy of the provided regex, possibly with modified flags.
- */
-function copyRegex(regex, options) {
- if (!XRegExp.isRegExp(regex)) {
- throw new TypeError('Type RegExp expected');
- }
-
- var xData = regex[REGEX_DATA] || {},
- flags = getNativeFlags(regex),
- flagsToAdd = '',
- flagsToRemove = '',
- xregexpSource = null,
- xregexpFlags = null;
-
- options = options || {};
-
- if (options.removeG) {flagsToRemove += 'g';}
- if (options.removeY) {flagsToRemove += 'y';}
- if (flagsToRemove) {
- flags = nativ.replace.call(flags, new RegExp('[' + flagsToRemove + ']+', 'g'), '');
- }
-
- if (options.addG) {flagsToAdd += 'g';}
- if (options.addY) {flagsToAdd += 'y';}
- if (flagsToAdd) {
- flags = clipDuplicates(flags + flagsToAdd);
- }
-
- if (!options.isInternalOnly) {
- if (xData.source !== undefined) {
- xregexpSource = xData.source;
- }
- // null or undefined; don't want to add to `flags` if the previous value was null, since
- // that indicates we're not tracking original precompilation flags
- if (xData.flags != null) {
- // Flags are only added for non-internal regexes by `XRegExp.globalize`. Flags are never
- // removed for non-internal regexes, so don't need to handle it
- xregexpFlags = flagsToAdd ? clipDuplicates(xData.flags + flagsToAdd) : xData.flags;
- }
- }
-
- // Augment with `XRegExp.prototype` properties, but use the native `RegExp` constructor to avoid
- // searching for special tokens. That would be wrong for regexes constructed by `RegExp`, and
- // unnecessary for regexes constructed by `XRegExp` because the regex has already undergone the
- // translation to native regex syntax
- regex = augment(
- new RegExp(regex.source, flags),
- hasNamedCapture(regex) ? xData.captureNames.slice(0) : null,
- xregexpSource,
- xregexpFlags,
- options.isInternalOnly
- );
-
- return regex;
-}
-
-/**
- * Converts hexadecimal to decimal.
- *
- * @param {String} hex
- * @returns {Number}
- */
-function dec(hex) {
- return parseInt(hex, 16);
-}
-
-/**
- * Returns native `RegExp` flags used by a regex object.
- *
- * @param {RegExp} regex Regex to check.
- * @returns {String} Native flags in use.
- */
-function getNativeFlags(regex) {
- return hasFlagsProp ?
- regex.flags :
- // Explicitly using `RegExp.prototype.toString` (rather than e.g. `String` or concatenation
- // with an empty string) allows this to continue working predictably when
- // `XRegExp.proptotype.toString` is overriden
- nativ.exec.call(/\/([a-z]*)$/i, RegExp.prototype.toString.call(regex))[1];
-}
-
-/**
- * Determines whether a regex has extended instance data used to track capture names.
- *
- * @param {RegExp} regex Regex to check.
- * @returns {Boolean} Whether the regex uses named capture.
- */
-function hasNamedCapture(regex) {
- return !!(regex[REGEX_DATA] && regex[REGEX_DATA].captureNames);
-}
-
-/**
- * Converts decimal to hexadecimal.
- *
- * @param {Number|String} dec
- * @returns {String}
- */
-function hex(dec) {
- return parseInt(dec, 10).toString(16);
-}
-
-/**
- * Returns the first index at which a given value can be found in an array.
- *
- * @param {Array} array Array to search.
- * @param {*} value Value to locate in the array.
- * @returns {Number} Zero-based index at which the item is found, or -1.
- */
-function indexOf(array, value) {
- var len = array.length, i;
-
- for (i = 0; i < len; ++i) {
- if (array[i] === value) {
- return i;
- }
- }
-
- return -1;
-}
-
-/**
- * Determines whether a value is of the specified type, by resolving its internal [[Class]].
- *
- * @param {*} value Object to check.
- * @param {String} type Type to check for, in TitleCase.
- * @returns {Boolean} Whether the object matches the type.
- */
-function isType(value, type) {
- return toString.call(value) === '[object ' + type + ']';
-}
-
-/**
- * Checks whether the next nonignorable token after the specified position is a quantifier.
- *
- * @param {String} pattern Pattern to search within.
- * @param {Number} pos Index in `pattern` to search at.
- * @param {String} flags Flags used by the pattern.
- * @returns {Boolean} Whether the next token is a quantifier.
- */
-function isQuantifierNext(pattern, pos, flags) {
- return nativ.test.call(
- flags.indexOf('x') > -1 ?
- // Ignore any leading whitespace, line comments, and inline comments
- /^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/ :
- // Ignore any leading inline comments
- /^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,
- pattern.slice(pos)
- );
-}
-
-/**
- * Adds leading zeros if shorter than four characters. Used for fixed-length hexadecimal values.
- *
- * @param {String} str
- * @returns {String}
- */
-function pad4(str) {
- while (str.length < 4) {
- str = '0' + str;
- }
- return str;
-}
-
-/**
- * Checks for flag-related errors, and strips/applies flags in a leading mode modifier. Offloads
- * the flag preparation logic from the `XRegExp` constructor.
- *
- * @param {String} pattern Regex pattern, possibly with a leading mode modifier.
- * @param {String} flags Any combination of flags.
- * @returns {Object} Object with properties `pattern` and `flags`.
- */
-function prepareFlags(pattern, flags) {
- var i;
-
- // Recent browsers throw on duplicate flags, so copy this behavior for nonnative flags
- if (clipDuplicates(flags) !== flags) {
- throw new SyntaxError('Invalid duplicate regex flag ' + flags);
- }
-
- // Strip and apply a leading mode modifier with any combination of flags except g or y
- pattern = nativ.replace.call(pattern, /^\(\?([\w$]+)\)/, function($0, $1) {
- if (nativ.test.call(/[gy]/, $1)) {
- throw new SyntaxError('Cannot use flag g or y in mode modifier ' + $0);
- }
- // Allow duplicate flags within the mode modifier
- flags = clipDuplicates(flags + $1);
- return '';
- });
-
- // Throw on unknown native or nonnative flags
- for (i = 0; i < flags.length; ++i) {
- if (!registeredFlags[flags.charAt(i)]) {
- throw new SyntaxError('Unknown regex flag ' + flags.charAt(i));
- }
- }
-
- return {
- pattern: pattern,
- flags: flags
- };
-}
-
-/**
- * Prepares an options object from the given value.
- *
- * @param {String|Object} value Value to convert to an options object.
- * @returns {Object} Options object.
- */
-function prepareOptions(value) {
- var options = {};
-
- if (isType(value, 'String')) {
- XRegExp.forEach(value, /[^\s,]+/, function(match) {
- options[match] = true;
- });
-
- return options;
- }
-
- return value;
-}
-
-/**
- * Registers a flag so it doesn't throw an 'unknown flag' error.
- *
- * @param {String} flag Single-character flag to register.
- */
-function registerFlag(flag) {
- if (!/^[\w$]$/.test(flag)) {
- throw new Error('Flag must be a single character A-Za-z0-9_$');
- }
-
- registeredFlags[flag] = true;
-}
-
-/**
- * Runs built-in and custom regex syntax tokens in reverse insertion order at the specified
- * position, until a match is found.
- *
- * @param {String} pattern Original pattern from which an XRegExp object is being built.
- * @param {String} flags Flags being used to construct the regex.
- * @param {Number} pos Position to search for tokens within `pattern`.
- * @param {Number} scope Regex scope to apply: 'default' or 'class'.
- * @param {Object} context Context object to use for token handler functions.
- * @returns {Object} Object with properties `matchLength`, `output`, and `reparse`; or `null`.
- */
-function runTokens(pattern, flags, pos, scope, context) {
- var i = tokens.length,
- leadChar = pattern.charAt(pos),
- result = null,
- match,
- t;
-
- // Run in reverse insertion order
- while (i--) {
- t = tokens[i];
- if (
- (t.leadChar && t.leadChar !== leadChar) ||
- (t.scope !== scope && t.scope !== 'all') ||
- (t.flag && flags.indexOf(t.flag) === -1)
- ) {
- continue;
- }
-
- match = XRegExp.exec(pattern, t.regex, pos, 'sticky');
- if (match) {
- result = {
- matchLength: match[0].length,
- output: t.handler.call(context, match, scope, flags),
- reparse: t.reparse
- };
- // Finished with token tests
- break;
- }
- }
-
- return result;
-}
-
-/**
- * Enables or disables implicit astral mode opt-in. When enabled, flag A is automatically added to
- * all new regexes created by XRegExp. This causes an error to be thrown when creating regexes if
- * the Unicode Base addon is not available, since flag A is registered by that addon.
- *
- * @param {Boolean} on `true` to enable; `false` to disable.
- */
-function setAstral(on) {
- features.astral = on;
-}
-
-/**
- * Enables or disables native method overrides.
- *
- * @param {Boolean} on `true` to enable; `false` to disable.
- */
-function setNatives(on) {
- RegExp.prototype.exec = (on ? fixed : nativ).exec;
- RegExp.prototype.test = (on ? fixed : nativ).test;
- String.prototype.match = (on ? fixed : nativ).match;
- String.prototype.replace = (on ? fixed : nativ).replace;
- String.prototype.split = (on ? fixed : nativ).split;
-
- features.natives = on;
-}
-
-/**
- * Returns the object, or throws an error if it is `null` or `undefined`. This is used to follow
- * the ES5 abstract operation `ToObject`.
- *
- * @param {*} value Object to check and return.
- * @returns {*} The provided object.
- */
-function toObject(value) {
- // null or undefined
- if (value == null) {
- throw new TypeError('Cannot convert null or undefined to object');
- }
-
- return value;
-}
-
-// ==--------------------------==
-// Constructor
-// ==--------------------------==
-
-/**
- * Creates an extended regular expression object for matching text with a pattern. Differs from a
- * native regular expression in that additional syntax and flags are supported. The returned object
- * is in fact a native `RegExp` and works with all native methods.
- *
- * @class XRegExp
- * @constructor
- * @param {String|RegExp} pattern Regex pattern string, or an existing regex object to copy.
- * @param {String} [flags] Any combination of flags.
- * Native flags:
- * <li>`g` - global
- * <li>`i` - ignore case
- * <li>`m` - multiline anchors
- * <li>`u` - unicode (ES6)
- * <li>`y` - sticky (Firefox 3+, ES6)
- * Additional XRegExp flags:
- * <li>`n` - explicit capture
- * <li>`s` - dot matches all (aka singleline)
- * <li>`x` - free-spacing and line comments (aka extended)
- * <li>`A` - astral (requires the Unicode Base addon)
- * Flags cannot be provided when constructing one `RegExp` from another.
- * @returns {RegExp} Extended regular expression object.
- * @example
- *
- * // With named capture and flag x
- * XRegExp('(?<year> [0-9]{4} ) -? # year \n\
- * (?<month> [0-9]{2} ) -? # month \n\
- * (?<day> [0-9]{2} ) # day ', 'x');
- *
- * // Providing a regex object copies it. Native regexes are recompiled using native (not XRegExp)
- * // syntax. Copies maintain extended data, are augmented with `XRegExp.prototype` properties, and
- * // have fresh `lastIndex` properties (set to zero).
- * XRegExp(/regex/);
- */
-function XRegExp(pattern, flags) {
- if (XRegExp.isRegExp(pattern)) {
- if (flags !== undefined) {
- throw new TypeError('Cannot supply flags when copying a RegExp');
- }
- return copyRegex(pattern);
- }
-
- // Copy the argument behavior of `RegExp`
- pattern = pattern === undefined ? '' : String(pattern);
- flags = flags === undefined ? '' : String(flags);
-
- if (XRegExp.isInstalled('astral') && flags.indexOf('A') === -1) {
- // This causes an error to be thrown if the Unicode Base addon is not available
- flags += 'A';
- }
-
- if (!patternCache[pattern]) {
- patternCache[pattern] = {};
- }
-
- if (!patternCache[pattern][flags]) {
- var context = {
- hasNamedCapture: false,
- captureNames: []
- };
- var scope = defaultScope;
- var output = '';
- var pos = 0;
- var result;
-
- // Check for flag-related errors, and strip/apply flags in a leading mode modifier
- var applied = prepareFlags(pattern, flags);
- var appliedPattern = applied.pattern;
- var appliedFlags = applied.flags;
-
- // Use XRegExp's tokens to translate the pattern to a native regex pattern.
- // `appliedPattern.length` may change on each iteration if tokens use `reparse`
- while (pos < appliedPattern.length) {
- do {
- // Check for custom tokens at the current position
- result = runTokens(appliedPattern, appliedFlags, pos, scope, context);
- // If the matched token used the `reparse` option, splice its output into the
- // pattern before running tokens again at the same position
- if (result && result.reparse) {
- appliedPattern = appliedPattern.slice(0, pos) +
- result.output +
- appliedPattern.slice(pos + result.matchLength);
- }
- } while (result && result.reparse);
-
- if (result) {
- output += result.output;
- pos += (result.matchLength || 1);
- } else {
- // Get the native token at the current position
- var token = XRegExp.exec(appliedPattern, nativeTokens[scope], pos, 'sticky')[0];
- output += token;
- pos += token.length;
- if (token === '[' && scope === defaultScope) {
- scope = classScope;
- } else if (token === ']' && scope === classScope) {
- scope = defaultScope;
- }
- }
- }
-
- patternCache[pattern][flags] = {
- // Use basic cleanup to collapse repeated empty groups like `(?:)(?:)` to `(?:)`. Empty
- // groups are sometimes inserted during regex transpilation in order to keep tokens
- // separated. However, more than one empty group in a row is never needed.
- pattern: nativ.replace.call(output, /(?:\(\?:\))+/g, '(?:)'),
- // Strip all but native flags
- flags: nativ.replace.call(appliedFlags, /[^gimuy]+/g, ''),
- // `context.captureNames` has an item for each capturing group, even if unnamed
- captures: context.hasNamedCapture ? context.captureNames : null
- };
- }
-
- var generated = patternCache[pattern][flags];
- return augment(
- new RegExp(generated.pattern, generated.flags),
- generated.captures,
- pattern,
- flags
- );
-}
-
-// Add `RegExp.prototype` to the prototype chain
-XRegExp.prototype = new RegExp();
-
-// ==--------------------------==
-// Public properties
-// ==--------------------------==
-
-/**
- * The XRegExp version number as a string containing three dot-separated parts. For example,
- * '2.0.0-beta-3'.
- *
- * @static
- * @type String
- */
-XRegExp.version = '3.1.1';
-
-// ==--------------------------==
-// Public methods
-// ==--------------------------==
-
-// Intentionally undocumented; used in tests and addons
-XRegExp._hasNativeFlag = hasNativeFlag;
-XRegExp._dec = dec;
-XRegExp._hex = hex;
-XRegExp._pad4 = pad4;
-
-/**
- * Extends XRegExp syntax and allows custom flags. This is used internally and can be used to
- * create XRegExp addons. If more than one token can match the same string, the last added wins.
- *
- * @param {RegExp} regex Regex object that matches the new token.
- * @param {Function} handler Function that returns a new pattern string (using native regex syntax)
- * to replace the matched token within all future XRegExp regexes. Has access to persistent
- * properties of the regex being built, through `this`. Invoked with three arguments:
- * <li>The match array, with named backreference properties.
- * <li>The regex scope where the match was found: 'default' or 'class'.
- * <li>The flags used by the regex, including any flags in a leading mode modifier.
- * The handler function becomes part of the XRegExp construction process, so be careful not to
- * construct XRegExps within the function or you will trigger infinite recursion.
- * @param {Object} [options] Options object with optional properties:
- * <li>`scope` {String} Scope where the token applies: 'default', 'class', or 'all'.
- * <li>`flag` {String} Single-character flag that triggers the token. This also registers the
- * flag, which prevents XRegExp from throwing an 'unknown flag' error when the flag is used.
- * <li>`optionalFlags` {String} Any custom flags checked for within the token `handler` that are
- * not required to trigger the token. This registers the flags, to prevent XRegExp from
- * throwing an 'unknown flag' error when any of the flags are used.
- * <li>`reparse` {Boolean} Whether the `handler` function's output should not be treated as
- * final, and instead be reparseable by other tokens (including the current token). Allows
- * token chaining or deferring.
- * <li>`leadChar` {String} Single character that occurs at the beginning of any successful match
- * of the token (not always applicable). This doesn't change the behavior of the token unless
- * you provide an erroneous value. However, providing it can increase the token's performance
- * since the token can be skipped at any positions where this character doesn't appear.
- * @example
- *
- * // Basic usage: Add \a for the ALERT control code
- * XRegExp.addToken(
- * /\\a/,
- * function() {return '\\x07';},
- * {scope: 'all'}
- * );
- * XRegExp('\\a[\\a-\\n]+').test('\x07\n\x07'); // -> true
- *
- * // Add the U (ungreedy) flag from PCRE and RE2, which reverses greedy and lazy quantifiers.
- * // Since `scope` is not specified, it uses 'default' (i.e., transformations apply outside of
- * // character classes only)
- * XRegExp.addToken(
- * /([?*+]|{\d+(?:,\d*)?})(\??)/,
- * function(match) {return match[1] + (match[2] ? '' : '?');},
- * {flag: 'U'}
- * );
- * XRegExp('a+', 'U').exec('aaa')[0]; // -> 'a'
- * XRegExp('a+?', 'U').exec('aaa')[0]; // -> 'aaa'
- */
-XRegExp.addToken = function(regex, handler, options) {
- options = options || {};
- var optionalFlags = options.optionalFlags, i;
-
- if (options.flag) {
- registerFlag(options.flag);
- }
-
- if (optionalFlags) {
- optionalFlags = nativ.split.call(optionalFlags, '');
- for (i = 0; i < optionalFlags.length; ++i) {
- registerFlag(optionalFlags[i]);
- }
- }
-
- // Add to the private list of syntax tokens
- tokens.push({
- regex: copyRegex(regex, {
- addG: true,
- addY: hasNativeY,
- isInternalOnly: true
- }),
- handler: handler,
- scope: options.scope || defaultScope,
- flag: options.flag,
- reparse: options.reparse,
- leadChar: options.leadChar
- });
-
- // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and flags
- // might now produce different results
- XRegExp.cache.flush('patterns');
-};
-
-/**
- * Caches and returns the result of calling `XRegExp(pattern, flags)`. On any subsequent call with
- * the same pattern and flag combination, the cached copy of the regex is returned.
- *
- * @param {String} pattern Regex pattern string.
- * @param {String} [flags] Any combination of XRegExp flags.
- * @returns {RegExp} Cached XRegExp object.
- * @example
- *
- * while (match = XRegExp.cache('.', 'gs').exec(str)) {
- * // The regex is compiled once only
- * }
- */
-XRegExp.cache = function(pattern, flags) {
- if (!regexCache[pattern]) {
- regexCache[pattern] = {};
- }
- return regexCache[pattern][flags] || (
- regexCache[pattern][flags] = XRegExp(pattern, flags)
- );
-};
-
-// Intentionally undocumented; used in tests
-XRegExp.cache.flush = function(cacheName) {
- if (cacheName === 'patterns') {
- // Flush the pattern cache used by the `XRegExp` constructor
- patternCache = {};
- } else {
- // Flush the regex cache populated by `XRegExp.cache`
- regexCache = {};
- }
-};
-
-/**
- * Escapes any regular expression metacharacters, for use when matching literal strings. The result
- * can safely be used at any point within a regex that uses any flags.
- *
- * @param {String} str String to escape.
- * @returns {String} String with regex metacharacters escaped.
- * @example
- *
- * XRegExp.escape('Escaped? <.>');
- * // -> 'Escaped\?\ <\.>'
- */
-XRegExp.escape = function(str) {
- return nativ.replace.call(toObject(str), /[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
-};
-
-/**
- * Executes a regex search in a specified string. Returns a match array or `null`. If the provided
- * regex uses named capture, named backreference properties are included on the match array.
- * Optional `pos` and `sticky` arguments specify the search start position, and whether the match
- * must start at the specified position only. The `lastIndex` property of the provided regex is not
- * used, but is updated for compatibility. Also fixes browser bugs compared to the native
- * `RegExp.prototype.exec` and can be used reliably cross-browser.
- *
- * @param {String} str String to search.
- * @param {RegExp} regex Regex to search with.
- * @param {Number} [pos=0] Zero-based index at which to start the search.
- * @param {Boolean|String} [sticky=false] Whether the match must start at the specified position
- * only. The string `'sticky'` is accepted as an alternative to `true`.
- * @returns {Array} Match array with named backreference properties, or `null`.
- * @example
- *
- * // Basic use, with named backreference
- * var match = XRegExp.exec('U+2620', XRegExp('U\\+(?<hex>[0-9A-F]{4})'));
- * match.hex; // -> '2620'
- *
- * // With pos and sticky, in a loop
- * var pos = 2, result = [], match;
- * while (match = XRegExp.exec('<1><2><3><4>5<6>', /<(\d)>/, pos, 'sticky')) {
- * result.push(match[1]);
- * pos = match.index + match[0].length;
- * }
- * // result -> ['2', '3', '4']
- */
-XRegExp.exec = function(str, regex, pos, sticky) {
- var cacheKey = 'g',
- addY = false,
- match,
- r2;
-
- addY = hasNativeY && !!(sticky || (regex.sticky && sticky !== false));
- if (addY) {
- cacheKey += 'y';
- }
-
- regex[REGEX_DATA] = regex[REGEX_DATA] || {};
-
- // Shares cached copies with `XRegExp.match`/`replace`
- r2 = regex[REGEX_DATA][cacheKey] || (
- regex[REGEX_DATA][cacheKey] = copyRegex(regex, {
- addG: true,
- addY: addY,
- removeY: sticky === false,
- isInternalOnly: true
- })
- );
-
- r2.lastIndex = pos = pos || 0;
-
- // Fixed `exec` required for `lastIndex` fix, named backreferences, etc.
- match = fixed.exec.call(r2, str);
-
- if (sticky && match && match.index !== pos) {
- match = null;
- }
-
- if (regex.global) {
- regex.lastIndex = match ? r2.lastIndex : 0;
- }
-
- return match;
-};
-
-/**
- * Executes a provided function once per regex match. Searches always start at the beginning of the
- * string and continue until the end, regardless of the state of the regex's `global` property and
- * initial `lastIndex`.
- *
- * @param {String} str String to search.
- * @param {RegExp} regex Regex to search with.
- * @param {Function} callback Function to execute for each match. Invoked with four arguments:
- * <li>The match array, with named backreference properties.
- * <li>The zero-based match index.
- * <li>The string being traversed.
- * <li>The regex object being used to traverse the string.
- * @example
- *
- * // Extracts every other digit from a string
- * var evens = [];
- * XRegExp.forEach('1a2345', /\d/, function(match, i) {
- * if (i % 2) evens.push(+match[0]);
- * });
- * // evens -> [2, 4]
- */
-XRegExp.forEach = function(str, regex, callback) {
- var pos = 0,
- i = -1,
- match;
-
- while ((match = XRegExp.exec(str, regex, pos))) {
- // Because `regex` is provided to `callback`, the function could use the deprecated/
- // nonstandard `RegExp.prototype.compile` to mutate the regex. However, since `XRegExp.exec`
- // doesn't use `lastIndex` to set the search position, this can't lead to an infinite loop,
- // at least. Actually, because of the way `XRegExp.exec` caches globalized versions of
- // regexes, mutating the regex will not have any effect on the iteration or matched strings,
- // which is a nice side effect that brings extra safety.
- callback(match, ++i, str, regex);
-
- pos = match.index + (match[0].length || 1);
- }
-};
-
-/**
- * Copies a regex object and adds flag `g`. The copy maintains extended data, is augmented with
- * `XRegExp.prototype` properties, and has a fresh `lastIndex` property (set to zero). Native
- * regexes are not recompiled using XRegExp syntax.
- *
- * @param {RegExp} regex Regex to globalize.
- * @returns {RegExp} Copy of the provided regex with flag `g` added.
- * @example
- *
- * var globalCopy = XRegExp.globalize(/regex/);
- * globalCopy.global; // -> true
- */
-XRegExp.globalize = function(regex) {
- return copyRegex(regex, {addG: true});
-};
-
-/**
- * Installs optional features according to the specified options. Can be undone using
- * `XRegExp.uninstall`.
- *
- * @param {Object|String} options Options object or string.
- * @example
- *
- * // With an options object
- * XRegExp.install({
- * // Enables support for astral code points in Unicode addons (implicitly sets flag A)
- * astral: true,
- *
- * // DEPRECATED: Overrides native regex methods with fixed/extended versions
- * natives: true
- * });
- *
- * // With an options string
- * XRegExp.install('astral natives');
- */
-XRegExp.install = function(options) {
- options = prepareOptions(options);
-
- if (!features.astral && options.astral) {
- setAstral(true);
- }
-
- if (!features.natives && options.natives) {
- setNatives(true);
- }
-};
-
-/**
- * Checks whether an individual optional feature is installed.
- *
- * @param {String} feature Name of the feature to check. One of:
- * <li>`astral`
- * <li>`natives`
- * @returns {Boolean} Whether the feature is installed.
- * @example
- *
- * XRegExp.isInstalled('astral');
- */
-XRegExp.isInstalled = function(feature) {
- return !!(features[feature]);
-};
-
-/**
- * Returns `true` if an object is a regex; `false` if it isn't. This works correctly for regexes
- * created in another frame, when `instanceof` and `constructor` checks would fail.
- *
- * @param {*} value Object to check.
- * @returns {Boolean} Whether the object is a `RegExp` object.
- * @example
- *
- * XRegExp.isRegExp('string'); // -> false
- * XRegExp.isRegExp(/regex/i); // -> true
- * XRegExp.isRegExp(RegExp('^', 'm')); // -> true
- * XRegExp.isRegExp(XRegExp('(?s).')); // -> true
- */
-XRegExp.isRegExp = function(value) {
- return toString.call(value) === '[object RegExp]';
- //return isType(value, 'RegExp');
-};
-
-/**
- * Returns the first matched string, or in global mode, an array containing all matched strings.
- * This is essentially a more convenient re-implementation of `String.prototype.match` that gives
- * the result types you actually want (string instead of `exec`-style array in match-first mode,
- * and an empty array instead of `null` when no matches are found in match-all mode). It also lets
- * you override flag g and ignore `lastIndex`, and fixes browser bugs.
- *
- * @param {String} str String to search.
- * @param {RegExp} regex Regex to search with.
- * @param {String} [scope='one'] Use 'one' to return the first match as a string. Use 'all' to
- * return an array of all matched strings. If not explicitly specified and `regex` uses flag g,
- * `scope` is 'all'.
- * @returns {String|Array} In match-first mode: First match as a string, or `null`. In match-all
- * mode: Array of all matched strings, or an empty array.
- * @example
- *
- * // Match first
- * XRegExp.match('abc', /\w/); // -> 'a'
- * XRegExp.match('abc', /\w/g, 'one'); // -> 'a'
- * XRegExp.match('abc', /x/g, 'one'); // -> null
- *
- * // Match all
- * XRegExp.match('abc', /\w/g); // -> ['a', 'b', 'c']
- * XRegExp.match('abc', /\w/, 'all'); // -> ['a', 'b', 'c']
- * XRegExp.match('abc', /x/, 'all'); // -> []
- */
-XRegExp.match = function(str, regex, scope) {
- var global = (regex.global && scope !== 'one') || scope === 'all',
- cacheKey = ((global ? 'g' : '') + (regex.sticky ? 'y' : '')) || 'noGY',
- result,
- r2;
-
- regex[REGEX_DATA] = regex[REGEX_DATA] || {};
-
- // Shares cached copies with `XRegExp.exec`/`replace`
- r2 = regex[REGEX_DATA][cacheKey] || (
- regex[REGEX_DATA][cacheKey] = copyRegex(regex, {
- addG: !!global,
- removeG: scope === 'one',
- isInternalOnly: true
- })
- );
-
- result = nativ.match.call(toObject(str), r2);
-
- if (regex.global) {
- regex.lastIndex = (
- (scope === 'one' && result) ?
- // Can't use `r2.lastIndex` since `r2` is nonglobal in this case
- (result.index + result[0].length) : 0
- );
- }
-
- return global ? (result || []) : (result && result[0]);
-};
-
-/**
- * Retrieves the matches from searching a string using a chain of regexes that successively search
- * within previous matches. The provided `chain` array can contain regexes and or objects with
- * `regex` and `backref` properties. When a backreference is specified, the named or numbered
- * backreference is passed forward to the next regex or returned.
- *
- * @param {String} str String to search.
- * @param {Array} chain Regexes that each search for matches within preceding results.
- * @returns {Array} Matches by the last regex in the chain, or an empty array.
- * @example
- *
- * // Basic usage; matches numbers within <b> tags
- * XRegExp.matchChain('1 <b>2</b> 3 <b>4 a 56</b>', [
- * XRegExp('(?is)<b>.*?</b>'),
- * /\d+/
- * ]);
- * // -> ['2', '4', '56']
- *
- * // Passing forward and returning specific backreferences
- * html = '<a href="http://xregexp.com/api/">XRegExp</a>\
- * <a href="http://www.google.com/">Google</a>';
- * XRegExp.matchChain(html, [
- * {regex: /<a href="([^"]+)">/i, backref: 1},
- * {regex: XRegExp('(?i)^https?://(?<domain>[^/?#]+)'), backref: 'domain'}
- * ]);
- * // -> ['xregexp.com', 'www.google.com']
- */
-XRegExp.matchChain = function(str, chain) {
- return (function recurseChain(values, level) {
- var item = chain[level].regex ? chain[level] : {regex: chain[level]};
- var matches = [];
-
- function addMatch(match) {
- if (item.backref) {
- // Safari 4.0.5 (but not 5.0.5+) inappropriately uses sparse arrays to hold the
- // `undefined`s for backreferences to nonparticipating capturing groups. In such
- // cases, a `hasOwnProperty` or `in` check on its own would inappropriately throw
- // the exception, so also check if the backreference is a number that is within the
- // bounds of the array.
- if (!(match.hasOwnProperty(item.backref) || +item.backref < match.length)) {
- throw new ReferenceError('Backreference to undefined group: ' + item.backref);
- }
-
- matches.push(match[item.backref] || '');
- } else {
- matches.push(match[0]);
- }
- }
-
- for (var i = 0; i < values.length; ++i) {
- XRegExp.forEach(values[i], item.regex, addMatch);
- }
-
- return ((level === chain.length - 1) || !matches.length) ?
- matches :
- recurseChain(matches, level + 1);
- }([str], 0));
-};
-
-/**
- * Returns a new string with one or all matches of a pattern replaced. The pattern can be a string
- * or regex, and the replacement can be a string or a function to be called for each match. To
- * perform a global search and replace, use the optional `scope` argument or include flag g if using
- * a regex. Replacement strings can use `${n}` for named and numbered backreferences. Replacement
- * functions can use named backreferences via `arguments[0].name`. Also fixes browser bugs compared
- * to the native `String.prototype.replace` and can be used reliably cross-browser.
- *
- * @param {String} str String to search.
- * @param {RegExp|String} search Search pattern to be replaced.
- * @param {String|Function} replacement Replacement string or a function invoked to create it.
- * Replacement strings can include special replacement syntax:
- * <li>$$ - Inserts a literal $ character.
- * <li>$&, $0 - Inserts the matched substring.
- * <li>$` - Inserts the string that precedes the matched substring (left context).
- * <li>$' - Inserts the string that follows the matched substring (right context).
- * <li>$n, $nn - Where n/nn are digits referencing an existent capturing group, inserts
- * backreference n/nn.
- * <li>${n} - Where n is a name or any number of digits that reference an existent capturing
- * group, inserts backreference n.
- * Replacement functions are invoked with three or more arguments:
- * <li>The matched substring (corresponds to $& above). Named backreferences are accessible as
- * properties of this first argument.
- * <li>0..n arguments, one for each backreference (corresponding to $1, $2, etc. above).
- * <li>The zero-based index of the match within the total search string.
- * <li>The total string being searched.
- * @param {String} [scope='one'] Use 'one' to replace the first match only, or 'all'. If not
- * explicitly specified and using a regex with flag g, `scope` is 'all'.
- * @returns {String} New string with one or all matches replaced.
- * @example
- *
- * // Regex search, using named backreferences in replacement string
- * var name = XRegExp('(?<first>\\w+) (?<last>\\w+)');
- * XRegExp.replace('John Smith', name, '${last}, ${first}');
- * // -> 'Smith, John'
- *
- * // Regex search, using named backreferences in replacement function
- * XRegExp.replace('John Smith', name, function(match) {
- * return match.last + ', ' + match.first;
- * });
- * // -> 'Smith, John'
- *
- * // String search, with replace-all
- * XRegExp.replace('RegExp builds RegExps', 'RegExp', 'XRegExp', 'all');
- * // -> 'XRegExp builds XRegExps'
- */
-XRegExp.replace = function(str, search, replacement, scope) {
- var isRegex = XRegExp.isRegExp(search),
- global = (search.global && scope !== 'one') || scope === 'all',
- cacheKey = ((global ? 'g' : '') + (search.sticky ? 'y' : '')) || 'noGY',
- s2 = search,
- result;
-
- if (isRegex) {
- search[REGEX_DATA] = search[REGEX_DATA] || {};
-
- // Shares cached copies with `XRegExp.exec`/`match`. Since a copy is used, `search`'s
- // `lastIndex` isn't updated *during* replacement iterations
- s2 = search[REGEX_DATA][cacheKey] || (
- search[REGEX_DATA][cacheKey] = copyRegex(search, {
- addG: !!global,
- removeG: scope === 'one',
- isInternalOnly: true
- })
- );
- } else if (global) {
- s2 = new RegExp(XRegExp.escape(String(search)), 'g');
- }
-
- // Fixed `replace` required for named backreferences, etc.
- result = fixed.replace.call(toObject(str), s2, replacement);
-
- if (isRegex && search.global) {
- // Fixes IE, Safari bug (last tested IE 9, Safari 5.1)
- search.lastIndex = 0;
- }
-
- return result;
-};
-
-/**
- * Performs batch processing of string replacements. Used like `XRegExp.replace`, but accepts an
- * array of replacement details. Later replacements operate on the output of earlier replacements.
- * Replacement details are accepted as an array with a regex or string to search for, the
- * replacement string or function, and an optional scope of 'one' or 'all'. Uses the XRegExp
- * replacement text syntax, which supports named backreference properties via `${name}`.
- *
- * @param {String} str String to search.
- * @param {Array} replacements Array of replacement detail arrays.
- * @returns {String} New string with all replacements.
- * @example
- *
- * str = XRegExp.replaceEach(str, [
- * [XRegExp('(?<name>a)'), 'z${name}'],
- * [/b/gi, 'y'],
- * [/c/g, 'x', 'one'], // scope 'one' overrides /g
- * [/d/, 'w', 'all'], // scope 'all' overrides lack of /g
- * ['e', 'v', 'all'], // scope 'all' allows replace-all for strings
- * [/f/g, function($0) {
- * return $0.toUpperCase();
- * }]
- * ]);
- */
-XRegExp.replaceEach = function(str, replacements) {
- var i, r;
-
- for (i = 0; i < replacements.length; ++i) {
- r = replacements[i];
- str = XRegExp.replace(str, r[0], r[1], r[2]);
- }
-
- return str;
-};
-
-/**
- * Splits a string into an array of strings using a regex or string separator. Matches of the
- * separator are not included in the result array. However, if `separator` is a regex that contains
- * capturing groups, backreferences are spliced into the result each time `separator` is matched.
- * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably
- * cross-browser.
- *
- * @param {String} str String to split.
- * @param {RegExp|String} separator Regex or string to use for separating the string.
- * @param {Number} [limit] Maximum number of items to include in the result array.
- * @returns {Array} Array of substrings.
- * @example
- *
- * // Basic use
- * XRegExp.split('a b c', ' ');
- * // -> ['a', 'b', 'c']
- *
- * // With limit
- * XRegExp.split('a b c', ' ', 2);
- * // -> ['a', 'b']
- *
- * // Backreferences in result array
- * XRegExp.split('..word1..', /([a-z]+)(\d+)/i);
- * // -> ['..', 'word', '1', '..']
- */
-XRegExp.split = function(str, separator, limit) {
- return fixed.split.call(toObject(str), separator, limit);
-};
-
-/**
- * Executes a regex search in a specified string. Returns `true` or `false`. Optional `pos` and
- * `sticky` arguments specify the search start position, and whether the match must start at the
- * specified position only. The `lastIndex` property of the provided regex is not used, but is
- * updated for compatibility. Also fixes browser bugs compared to the native
- * `RegExp.prototype.test` and can be used reliably cross-browser.
- *
- * @param {String} str String to search.
- * @param {RegExp} regex Regex to search with.
- * @param {Number} [pos=0] Zero-based index at which to start the search.
- * @param {Boolean|String} [sticky=false] Whether the match must start at the specified position
- * only. The string `'sticky'` is accepted as an alternative to `true`.
- * @returns {Boolean} Whether the regex matched the provided value.
- * @example
- *
- * // Basic use
- * XRegExp.test('abc', /c/); // -> true
- *
- * // With pos and sticky
- * XRegExp.test('abc', /c/, 0, 'sticky'); // -> false
- * XRegExp.test('abc', /c/, 2, 'sticky'); // -> true
- */
-XRegExp.test = function(str, regex, pos, sticky) {
- // Do this the easy way :-)
- return !!XRegExp.exec(str, regex, pos, sticky);
-};
-
-/**
- * Uninstalls optional features according to the specified options. All optional features start out
- * uninstalled, so this is used to undo the actions of `XRegExp.install`.
- *
- * @param {Object|String} options Options object or string.
- * @example
- *
- * // With an options object
- * XRegExp.uninstall({
- * // Disables support for astral code points in Unicode addons
- * astral: true,
- *
- * // DEPRECATED: Restores native regex methods
- * natives: true
- * });
- *
- * // With an options string
- * XRegExp.uninstall('astral natives');
- */
-XRegExp.uninstall = function(options) {
- options = prepareOptions(options);
-
- if (features.astral && options.astral) {
- setAstral(false);
- }
-
- if (features.natives && options.natives) {
- setNatives(false);
- }
-};
-
-/**
- * Returns an XRegExp object that is the union of the given patterns. Patterns can be provided as
- * regex objects or strings. Metacharacters are escaped in patterns provided as strings.
- * Backreferences in provided regex objects are automatically renumbered to work correctly within
- * the larger combined pattern. Native flags used by provided regexes are ignored in favor of the
- * `flags` argument.
- *
- * @param {Array} patterns Regexes and strings to combine.
- * @param {String} [flags] Any combination of XRegExp flags.
- * @returns {RegExp} Union of the provided regexes and strings.
- * @example
- *
- * XRegExp.union(['a+b*c', /(dogs)\1/, /(cats)\1/], 'i');
- * // -> /a\+b\*c|(dogs)\1|(cats)\2/i
- */
-XRegExp.union = function(patterns, flags) {
- var numCaptures = 0;
- var numPriorCaptures;
- var captureNames;
-
- function rewrite(match, paren, backref) {
- var name = captureNames[numCaptures - numPriorCaptures];
-
- // Capturing group
- if (paren) {
- ++numCaptures;
- // If the current capture has a name, preserve the name
- if (name) {
- return '(?<' + name + '>';
- }
- // Backreference
- } else if (backref) {
- // Rewrite the backreference
- return '\\' + (+backref + numPriorCaptures);
- }
-
- return match;
- }
-
- if (!(isType(patterns, 'Array') && patterns.length)) {
- throw new TypeError('Must provide a nonempty array of patterns to merge');
- }
-
- var parts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g;
- var output = [];
- var pattern;
- for (var i = 0; i < patterns.length; ++i) {
- pattern = patterns[i];
-
- if (XRegExp.isRegExp(pattern)) {
- numPriorCaptures = numCaptures;
- captureNames = (pattern[REGEX_DATA] && pattern[REGEX_DATA].captureNames) || [];
-
- // Rewrite backreferences. Passing to XRegExp dies on octals and ensures patterns are
- // independently valid; helps keep this simple. Named captures are put back
- output.push(nativ.replace.call(XRegExp(pattern.source).source, parts, rewrite));
- } else {
- output.push(XRegExp.escape(pattern));
- }
- }
-
- return XRegExp(output.join('|'), flags);
-};
-
-// ==--------------------------==
-// Fixed/extended native methods
-// ==--------------------------==
-
-/**
- * Adds named capture support (with backreferences returned as `result.name`), and fixes browser
- * bugs in the native `RegExp.prototype.exec`. Calling `XRegExp.install('natives')` uses this to
- * override the native method. Use via `XRegExp.exec` without overriding natives.
- *
- * @param {String} str String to search.
- * @returns {Array} Match array with named backreference properties, or `null`.
- */
-fixed.exec = function(str) {
- var origLastIndex = this.lastIndex,
- match = nativ.exec.apply(this, arguments),
- name,
- r2,
- i;
-
- if (match) {
- // Fix browsers whose `exec` methods don't return `undefined` for nonparticipating capturing
- // groups. This fixes IE 5.5-8, but not IE 9's quirks mode or emulation of older IEs. IE 9
- // in standards mode follows the spec.
- if (!correctExecNpcg && match.length > 1 && indexOf(match, '') > -1) {
- r2 = copyRegex(this, {
- removeG: true,
- isInternalOnly: true
- });
- // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed
- // matching due to characters outside the match
- nativ.replace.call(String(str).slice(match.index), r2, function() {
- var len = arguments.length, i;
- // Skip index 0 and the last 2
- for (i = 1; i < len - 2; ++i) {
- if (arguments[i] === undefined) {
- match[i] = undefined;
- }
- }
- });
- }
-
- // Attach named capture properties
- if (this[REGEX_DATA] && this[REGEX_DATA].captureNames) {
- // Skip index 0
- for (i = 1; i < match.length; ++i) {
- name = this[REGEX_DATA].captureNames[i - 1];
- if (name) {
- match[name] = match[i];
- }
- }
- }
-
- // Fix browsers that increment `lastIndex` after zero-length matches
- if (this.global && !match[0].length && (this.lastIndex > match.index)) {
- this.lastIndex = match.index;
- }
- }
-
- if (!this.global) {
- // Fixes IE, Opera bug (last tested IE 9, Opera 11.6)
- this.lastIndex = origLastIndex;
- }
-
- return match;
-};
-
-/**
- * Fixes browser bugs in the native `RegExp.prototype.test`. Calling `XRegExp.install('natives')`
- * uses this to override the native method.
- *
- * @param {String} str String to search.
- * @returns {Boolean} Whether the regex matched the provided value.
- */
-fixed.test = function(str) {
- // Do this the easy way :-)
- return !!fixed.exec.call(this, str);
-};
-
-/**
- * Adds named capture support (with backreferences returned as `result.name`), and fixes browser
- * bugs in the native `String.prototype.match`. Calling `XRegExp.install('natives')` uses this to
- * override the native method.
- *
- * @param {RegExp|*} regex Regex to search with. If not a regex object, it is passed to `RegExp`.
- * @returns {Array} If `regex` uses flag g, an array of match strings or `null`. Without flag g,
- * the result of calling `regex.exec(this)`.
- */
-fixed.match = function(regex) {
- var result;
-
- if (!XRegExp.isRegExp(regex)) {
- // Use the native `RegExp` rather than `XRegExp`
- regex = new RegExp(regex);
- } else if (regex.global) {
- result = nativ.match.apply(this, arguments);
- // Fixes IE bug
- regex.lastIndex = 0;
-
- return result;
- }
-
- return fixed.exec.call(regex, toObject(this));
-};
-
-/**
- * Adds support for `${n}` tokens for named and numbered backreferences in replacement text, and
- * provides named backreferences to replacement functions as `arguments[0].name`. Also fixes browser
- * bugs in replacement text syntax when performing a replacement using a nonregex search value, and
- * the value of a replacement regex's `lastIndex` property during replacement iterations and upon
- * completion. Calling `XRegExp.install('natives')` uses this to override the native method. Note
- * that this doesn't support SpiderMonkey's proprietary third (`flags`) argument. Use via
- * `XRegExp.replace` without overriding natives.
- *
- * @param {RegExp|String} search Search pattern to be replaced.
- * @param {String|Function} replacement Replacement string or a function invoked to create it.
- * @returns {String} New string with one or all matches replaced.
- */
-fixed.replace = function(search, replacement) {
- var isRegex = XRegExp.isRegExp(search),
- origLastIndex,
- captureNames,
- result;
-
- if (isRegex) {
- if (search[REGEX_DATA]) {
- captureNames = search[REGEX_DATA].captureNames;
- }
- // Only needed if `search` is nonglobal
- origLastIndex = search.lastIndex;
- } else {
- search += ''; // Type-convert
- }
-
- // Don't use `typeof`; some older browsers return 'function' for regex objects
- if (isType(replacement, 'Function')) {
- // Stringifying `this` fixes a bug in IE < 9 where the last argument in replacement
- // functions isn't type-converted to a string
- result = nativ.replace.call(String(this), search, function() {
- var args = arguments, i;
- if (captureNames) {
- // Change the `arguments[0]` string primitive to a `String` object that can store
- // properties. This really does need to use `String` as a constructor
- args[0] = new String(args[0]);
- // Store named backreferences on the first argument
- for (i = 0; i < captureNames.length; ++i) {
- if (captureNames[i]) {
- args[0][captureNames[i]] = args[i + 1];
- }
- }
- }
- // Update `lastIndex` before calling `replacement`. Fixes IE, Chrome, Firefox, Safari
- // bug (last tested IE 9, Chrome 17, Firefox 11, Safari 5.1)
- if (isRegex && search.global) {
- search.lastIndex = args[args.length - 2] + args[0].length;
- }
- // ES6 specs the context for replacement functions as `undefined`
- return replacement.apply(undefined, args);
- });
- } else {
- // Ensure that the last value of `args` will be a string when given nonstring `this`,
- // while still throwing on null or undefined context
- result = nativ.replace.call(this == null ? this : String(this), search, function() {
- // Keep this function's `arguments` available through closure
- var args = arguments;
- return nativ.replace.call(String(replacement), replacementToken, function($0, $1, $2) {
- var n;
- // Named or numbered backreference with curly braces
- if ($1) {
- // XRegExp behavior for `${n}`:
- // 1. Backreference to numbered capture, if `n` is an integer. Use `0` for the
- // entire match. Any number of leading zeros may be used.
- // 2. Backreference to named capture `n`, if it exists and is not an integer
- // overridden by numbered capture. In practice, this does not overlap with
- // numbered capture since XRegExp does not allow named capture to use a bare
- // integer as the name.
- // 3. If the name or number does not refer to an existing capturing group, it's
- // an error.
- n = +$1; // Type-convert; drop leading zeros
- if (n <= args.length - 3) {
- return args[n] || '';
- }
- // Groups with the same name is an error, else would need `lastIndexOf`
- n = captureNames ? indexOf(captureNames, $1) : -1;
- if (n < 0) {
- throw new SyntaxError('Backreference to undefined group ' + $0);
- }
- return args[n + 1] || '';
- }
- // Else, special variable or numbered backreference without curly braces
- if ($2 === '$') { // $$
- return '$';
- }
- if ($2 === '&' || +$2 === 0) { // $&, $0 (not followed by 1-9), $00
- return args[0];
- }
- if ($2 === '`') { // $` (left context)
- return args[args.length - 1].slice(0, args[args.length - 2]);
- }
- if ($2 === "'") { // $' (right context)
- return args[args.length - 1].slice(args[args.length - 2] + args[0].length);
- }
- // Else, numbered backreference without curly braces
- $2 = +$2; // Type-convert; drop leading zero
- // XRegExp behavior for `$n` and `$nn`:
- // - Backrefs end after 1 or 2 digits. Use `${..}` for more digits.
- // - `$1` is an error if no capturing groups.
- // - `$10` is an error if less than 10 capturing groups. Use `${1}0` instead.
- // - `$01` is `$1` if at least one capturing group, else it's an error.
- // - `$0` (not followed by 1-9) and `$00` are the entire match.
- // Native behavior, for comparison:
- // - Backrefs end after 1 or 2 digits. Cannot reference capturing group 100+.
- // - `$1` is a literal `$1` if no capturing groups.
- // - `$10` is `$1` followed by a literal `0` if less than 10 capturing groups.
- // - `$01` is `$1` if at least one capturing group, else it's a literal `$01`.
- // - `$0` is a literal `$0`.
- if (!isNaN($2)) {
- if ($2 > args.length - 3) {
- throw new SyntaxError('Backreference to undefined group ' + $0);
- }
- return args[$2] || '';
- }
- // `$` followed by an unsupported char is an error, unlike native JS
- throw new SyntaxError('Invalid token ' + $0);
- });
- });
- }
-
- if (isRegex) {
- if (search.global) {
- // Fixes IE, Safari bug (last tested IE 9, Safari 5.1)
- search.lastIndex = 0;
- } else {
- // Fixes IE, Opera bug (last tested IE 9, Opera 11.6)
- search.lastIndex = origLastIndex;
- }
- }
-
- return result;
-};
-
-/**
- * Fixes browser bugs in the native `String.prototype.split`. Calling `XRegExp.install('natives')`
- * uses this to override the native method. Use via `XRegExp.split` without overriding natives.
- *
- * @param {RegExp|String} separator Regex or string to use for separating the string.
- * @param {Number} [limit] Maximum number of items to include in the result array.
- * @returns {Array} Array of substrings.
- */
-fixed.split = function(separator, limit) {
- if (!XRegExp.isRegExp(separator)) {
- // Browsers handle nonregex split correctly, so use the faster native method
- return nativ.split.apply(this, arguments);
- }
-
- var str = String(this),
- output = [],
- origLastIndex = separator.lastIndex,
- lastLastIndex = 0,
- lastLength;
-
- // Values for `limit`, per the spec:
- // If undefined: pow(2,32) - 1
- // If 0, Infinity, or NaN: 0
- // If positive number: limit = floor(limit); if (limit >= pow(2,32)) limit -= pow(2,32);
- // If negative number: pow(2,32) - floor(abs(limit))
- // If other: Type-convert, then use the above rules
- // This line fails in very strange ways for some values of `limit` in Opera 10.5-10.63, unless
- // Opera Dragonfly is open (go figure). It works in at least Opera 9.5-10.1 and 11+
- limit = (limit === undefined ? -1 : limit) >>> 0;
-
- XRegExp.forEach(str, separator, function(match) {
- // This condition is not the same as `if (match[0].length)`
- if ((match.index + match[0].length) > lastLastIndex) {
- output.push(str.slice(lastLastIndex, match.index));
- if (match.length > 1 && match.index < str.length) {
- Array.prototype.push.apply(output, match.slice(1));
- }
- lastLength = match[0].length;
- lastLastIndex = match.index + lastLength;
- }
- });
-
- if (lastLastIndex === str.length) {
- if (!nativ.test.call(separator, '') || lastLength) {
- output.push('');
- }
- } else {
- output.push(str.slice(lastLastIndex));
- }
-
- separator.lastIndex = origLastIndex;
- return output.length > limit ? output.slice(0, limit) : output;
-};
-
-// ==--------------------------==
-// Built-in syntax/flag tokens
-// ==--------------------------==
-
-/*
- * Letter escapes that natively match literal characters: `\a`, `\A`, etc. These should be
- * SyntaxErrors but are allowed in web reality. XRegExp makes them errors for cross-browser
- * consistency and to reserve their syntax, but lets them be superseded by addons.
- */
-XRegExp.addToken(
- /\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,
- function(match, scope) {
- // \B is allowed in default scope only
- if (match[1] === 'B' && scope === defaultScope) {
- return match[0];
- }
- throw new SyntaxError('Invalid escape ' + match[0]);
- },
- {
- scope: 'all',
- leadChar: '\\'
- }
-);
-
-/*
- * Unicode code point escape with curly braces: `\u{N..}`. `N..` is any one or more digit
- * hexadecimal number from 0-10FFFF, and can include leading zeros. Requires the native ES6 `u` flag
- * to support code points greater than U+FFFF. Avoids converting code points above U+FFFF to
- * surrogate pairs (which could be done without flag `u`), since that could lead to broken behavior
- * if you follow a `\u{N..}` token that references a code point above U+FFFF with a quantifier, or
- * if you use the same in a character class.
- */
-XRegExp.addToken(
- /\\u{([\dA-Fa-f]+)}/,
- function(match, scope, flags) {
- var code = dec(match[1]);
- if (code > 0x10FFFF) {
- throw new SyntaxError('Invalid Unicode code point ' + match[0]);
- }
- if (code <= 0xFFFF) {
- // Converting to \uNNNN avoids needing to escape the literal character and keep it
- // separate from preceding tokens
- return '\\u' + pad4(hex(code));
- }
- // If `code` is between 0xFFFF and 0x10FFFF, require and defer to native handling
- if (hasNativeU && flags.indexOf('u') > -1) {
- return match[0];
- }
- throw new SyntaxError('Cannot use Unicode code point above \\u{FFFF} without flag u');
- },
- {
- scope: 'all',
- leadChar: '\\'
- }
-);
-
-/*
- * Empty character class: `[]` or `[^]`. This fixes a critical cross-browser syntax inconsistency.
- * Unless this is standardized (per the ES spec), regex syntax can't be accurately parsed because
- * character class endings can't be determined.
- */
-XRegExp.addToken(
- /\[(\^?)]/,
- function(match) {
- // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S].
- // (?!) should work like \b\B, but is unreliable in some versions of Firefox
- return match[1] ? '[\\s\\S]' : '\\b\\B';
- },
- {leadChar: '['}
-);
-
-/*
- * Comment pattern: `(?# )`. Inline comments are an alternative to the line comments allowed in
- * free-spacing mode (flag x).
- */
-XRegExp.addToken(
- /\(\?#[^)]*\)/,
- function(match, scope, flags) {
- // Keep tokens separated unless the following token is a quantifier. This avoids e.g.
- // inadvertedly changing `\1(?#)1` to `\11`.
- return isQuantifierNext(match.input, match.index + match[0].length, flags) ?
- '' : '(?:)';
- },
- {leadChar: '('}
-);
-
-/*
- * Whitespace and line comments, in free-spacing mode (aka extended mode, flag x) only.
- */
-XRegExp.addToken(
- /\s+|#[^\n]*\n?/,
- function(match, scope, flags) {
- // Keep tokens separated unless the following token is a quantifier. This avoids e.g.
- // inadvertedly changing `\1 1` to `\11`.
- return isQuantifierNext(match.input, match.index + match[0].length, flags) ?
- '' : '(?:)';
- },
- {flag: 'x'}
-);
-
-/*
- * Dot, in dotall mode (aka singleline mode, flag s) only.
- */
-XRegExp.addToken(
- /\./,
- function() {
- return '[\\s\\S]';
- },
- {
- flag: 's',
- leadChar: '.'
- }
-);
-
-/*
- * Named backreference: `\k<name>`. Backreference names can use the characters A-Z, a-z, 0-9, _,
- * and $ only. Also allows numbered backreferences as `\k<n>`.
- */
-XRegExp.addToken(
- /\\k<([\w$]+)>/,
- function(match) {
- // Groups with the same name is an error, else would need `lastIndexOf`
- var index = isNaN(match[1]) ? (indexOf(this.captureNames, match[1]) + 1) : +match[1],
- endIndex = match.index + match[0].length;
- if (!index || index > this.captureNames.length) {
- throw new SyntaxError('Backreference to undefined group ' + match[0]);
- }
- // Keep backreferences separate from subsequent literal numbers. This avoids e.g.
- // inadvertedly changing `(?<n>)\k<n>1` to `()\11`.
- return '\\' + index + (
- endIndex === match.input.length || isNaN(match.input.charAt(endIndex)) ?
- '' : '(?:)'
- );
- },
- {leadChar: '\\'}
-);
-
-/*
- * Numbered backreference or octal, plus any following digits: `\0`, `\11`, etc. Octals except `\0`
- * not followed by 0-9 and backreferences to unopened capture groups throw an error. Other matches
- * are returned unaltered. IE < 9 doesn't support backreferences above `\99` in regex syntax.
- */
-XRegExp.addToken(
- /\\(\d+)/,
- function(match, scope) {
- if (
- !(
- scope === defaultScope &&
- /^[1-9]/.test(match[1]) &&
- +match[1] <= this.captureNames.length
- ) &&
- match[1] !== '0'
- ) {
- throw new SyntaxError('Cannot use octal escape or backreference to undefined group ' +
- match[0]);
- }
- return match[0];
- },
- {
- scope: 'all',
- leadChar: '\\'
- }
-);
-
-/*
- * Named capturing group; match the opening delimiter only: `(?<name>`. Capture names can use the
- * characters A-Z, a-z, 0-9, _, and $ only. Names can't be integers. Supports Python-style
- * `(?P<name>` as an alternate syntax to avoid issues in some older versions of Opera which natively
- * supported the Python-style syntax. Otherwise, XRegExp might treat numbered backreferences to
- * Python-style named capture as octals.
- */
-XRegExp.addToken(
- /\(\?P?<([\w$]+)>/,
- function(match) {
- // Disallow bare integers as names because named backreferences are added to match arrays
- // and therefore numeric properties may lead to incorrect lookups
- if (!isNaN(match[1])) {
- throw new SyntaxError('Cannot use integer as capture name ' + match[0]);
- }
- if (match[1] === 'length' || match[1] === '__proto__') {
- throw new SyntaxError('Cannot use reserved word as capture name ' + match[0]);
- }
- if (indexOf(this.captureNames, match[1]) > -1) {
- throw new SyntaxError('Cannot use same name for multiple groups ' + match[0]);
- }
- this.captureNames.push(match[1]);
- this.hasNamedCapture = true;
- return '(';
- },
- {leadChar: '('}
-);
-
-/*
- * Capturing group; match the opening parenthesis only. Required for support of named capturing
- * groups. Also adds explicit capture mode (flag n).
- */
-XRegExp.addToken(
- /\((?!\?)/,
- function(match, scope, flags) {
- if (flags.indexOf('n') > -1) {
- return '(?:';
- }
- this.captureNames.push(null);
- return '(';
- },
- {
- optionalFlags: 'n',
- leadChar: '('
- }
-);
-
-module.exports = XRegExp;
diff --git a/tools/eslint/node_modules/xtend/package.json b/tools/eslint/node_modules/xtend/package.json
index e6a1c013a0..175967a3ee 100644
--- a/tools/eslint/node_modules/xtend/package.json
+++ b/tools/eslint/node_modules/xtend/package.json
@@ -16,7 +16,6 @@
"_from": "xtend@>=4.0.0 <5.0.0",
"_id": "xtend@4.0.1",
"_inCache": true,
- "_installable": true,
"_location": "/xtend",
"_nodeVersion": "0.10.32",
"_npmUser": {
diff --git a/tools/eslint/package.json b/tools/eslint/package.json
index eba9c474f3..f0155d8933 100644
--- a/tools/eslint/package.json
+++ b/tools/eslint/package.json
@@ -14,14 +14,13 @@
]
],
"_from": "eslint@latest",
- "_id": "eslint@3.5.0",
+ "_id": "eslint@3.8.0",
"_inCache": true,
- "_installable": true,
"_location": "/eslint",
"_nodeVersion": "4.4.7",
"_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/eslint-3.5.0.tgz_1473451101299_0.8081250376999378"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/eslint-3.8.0.tgz_1476481030547_0.1366094599943608"
},
"_npmUser": {
"name": "eslint",
@@ -41,8 +40,8 @@
"_requiredBy": [
"#USER"
],
- "_resolved": "https://registry.npmjs.org/eslint/-/eslint-3.5.0.tgz",
- "_shasum": "22fc9f780ea5bca1306fab2b6d3336b0fa62c754",
+ "_resolved": "https://registry.npmjs.org/eslint/-/eslint-3.8.0.tgz",
+ "_shasum": "4fbbf6833d66654860c23a099c47a0f086de34b7",
"_shrinkwrap": null,
"_spec": "eslint",
"_where": "/Users/trott/io.js/tools",
@@ -62,7 +61,7 @@
"debug": "^2.1.1",
"doctrine": "^1.2.2",
"escope": "^3.6.0",
- "espree": "^3.1.6",
+ "espree": "^3.3.1",
"estraverse": "^4.2.0",
"esutils": "^2.0.2",
"file-entry-cache": "^2.0.0",
@@ -79,7 +78,7 @@
"lodash": "^4.0.0",
"mkdirp": "^0.5.0",
"natural-compare": "^1.4.0",
- "optionator": "^0.8.1",
+ "optionator": "^0.8.2",
"path-is-inside": "^1.0.1",
"pluralize": "^1.2.1",
"progress": "^1.1.8",
@@ -133,8 +132,8 @@
},
"directories": {},
"dist": {
- "shasum": "22fc9f780ea5bca1306fab2b6d3336b0fa62c754",
- "tarball": "https://registry.npmjs.org/eslint/-/eslint-3.5.0.tgz"
+ "shasum": "4fbbf6833d66654860c23a099c47a0f086de34b7",
+ "tarball": "https://registry.npmjs.org/eslint/-/eslint-3.8.0.tgz"
},
"engines": {
"node": ">=4"
@@ -147,7 +146,7 @@
"lib",
"messages"
],
- "gitHead": "18be52eab695f0d78d19b349fefb09db19751d51",
+ "gitHead": "82220042725dd0e86b5ddbeac4166e1eb147aa04",
"homepage": "http://eslint.org",
"keywords": [
"ast",
@@ -194,5 +193,5 @@
"release": "node Makefile.js release",
"test": "node Makefile.js test"
},
- "version": "3.5.0"
+ "version": "3.8.0"
}